APK

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Getting the Android Device ID)
 
(8 intermediate revisions by 4 users not shown)
Line 6: Line 6:
  
 
'''APK''' is an archive format used for distributing [[Android]] apps. It is based on the [[Jar]] format (for [[Java]]), and like that format, is actually a [[ZIP]] archive with a different extension, and with specific files and directories within it.
 
'''APK''' is an archive format used for distributing [[Android]] apps. It is based on the [[Jar]] format (for [[Java]]), and like that format, is actually a [[ZIP]] archive with a different extension, and with specific files and directories within it.
 +
 +
The executable part of the app is usually in either [[Dalvik Executable]] (for older Android versions prior to 5.0 Lollipop) or [[ART (Android Runtime)|ART]] format (for newer versions).
  
 
Metadata about the app is in a '''META-INF''' directory within the archive (similarly to Jar files), compiled code is in a '''lib''' directory, and resources in a '''res''' directory. There are also a few files at the root level including '''AndroidManifest.xml''' (which may be regular [[XML]] or, often, [[binary XML]]).
 
Metadata about the app is in a '''META-INF''' directory within the archive (similarly to Jar files), compiled code is in a '''lib''' directory, and resources in a '''res''' directory. There are also a few files at the root level including '''AndroidManifest.xml''' (which may be regular [[XML]] or, often, [[binary XML]]).
Line 30: Line 32:
 
==== Obtaining the Android Device ID ====
 
==== Obtaining the Android Device ID ====
  
If you don't have an Android Device ID, you can obtain one by installing the Blue Stacks App Player (Windows only), which can be downloaded here:
+
If you don't have an Android Device ID, you can obtain one by running a (virtual) instance of Android. The best option here is  to [http://www.sysads.co.uk/2014/01/install-android-4-3-virtualbox-screenshots/ set up Android on a virtual machine using VirtualBox]. For Windows 11 users, use Windows Subsystem for Android, which is by far, the easiest option. For Windows 10 users a simpler alternative is the Blue Stacks App Player, which can be downloaded here:
  
 
http://www.bluestacks.com/app-player.html
 
http://www.bluestacks.com/app-player.html
  
After installation, start up the player and enter "device id" in the search field (see also [http://www.hackinguniversity.in/2013/10/android-device-id-bluestacks.html step 2 here]. Install and then run the app, which will give you a Device ID that can be used to unlock the '''Download APK''' extension as described above.
+
However, after a day or so the Player will stop working, unless you either pay a monthly license or accept the installation of sponsored apps. 
 +
 
 +
After installation, start up the player and enter "device id" in the search field (see also [http://www.hackinguniversity.in/2013/10/android-device-id-bluestacks.html step 2 here]. Install and then run the app, which will give you a Device ID that can be used to unlock the '''Download APK''' extension as described above. Note that you can use this Device ID on any other machine (it is not tied to the machine on which the Blue Stacks App Player is installed).
 +
 
 +
== See also ==
 +
* [[XAPK]]
 +
* [[OBB]]
  
 
== Links ==
 
== Links ==
Line 41: Line 49:
 
* [http://www.howtogeek.com/140239/how-to-download-apk-files-android-apps-from-google-play/ How to Download APK Files (Android Apps) from Google Play]
 
* [http://www.howtogeek.com/140239/how-to-download-apk-files-android-apps-from-google-play/ How to Download APK Files (Android Apps) from Google Play]
 
* [http://www.hackinguniversity.in/2013/10/android-device-id-bluestacks.html Get Android Device ID without Phone using Bluestacks]
 
* [http://www.hackinguniversity.in/2013/10/android-device-id-bluestacks.html Get Android Device ID without Phone using Bluestacks]
 +
* [http://www.sysads.co.uk/2014/01/install-android-4-3-virtualbox-screenshots/ Install Android 4.3 on VirtualBox with screenshots]
 +
* [http://www.openplanetsfoundation.org/blogs/2014-10-23-running-archived-android-apps-pc-first-impressions Running archived Android apps on a PC: first impressions]
  
 +
[[Category:Android]]
 
[[Category:ZIP based file formats]]
 
[[Category:ZIP based file formats]]

Latest revision as of 15:59, 8 August 2022

File Format
Name APK
Ontology
Extension(s) .apk

APK is an archive format used for distributing Android apps. It is based on the Jar format (for Java), and like that format, is actually a ZIP archive with a different extension, and with specific files and directories within it.

The executable part of the app is usually in either Dalvik Executable (for older Android versions prior to 5.0 Lollipop) or ART format (for newer versions).

Metadata about the app is in a META-INF directory within the archive (similarly to Jar files), compiled code is in a lib directory, and resources in a res directory. There are also a few files at the root level including AndroidManifest.xml (which may be regular XML or, often, binary XML).

Contents

[edit] Downloading APK files locally from Google Play

By default, Google Play only allows Android apps to be installed directly to a device, with no support for downloading the APK locally (e.g. from a Windows or Linux PC). In the following two workarounds are described. Note that these may well violate Google’s Terms of Service.

[edit] Option 1: APK Downloader website

The easiest option is to use the APK downloader website, which allows you to download (free) APKs without the need to log in to Google:

http://apk-downloader.org/

However, this does not appear to work in all cases (and obviously it won't work for non-free apps).

[edit] Option 2: APK Downloader extension for Chrome

An alternative is the APK Downloader extension for the Google Chrome browser, which adds a Download APK button to the Google Play interface (for this you need a Google account). It can be obtained here:

https://chrome.google.com/webstore/detail/apk-downloader/cgihflhdpokeobcfimliamffejfnmfii?hl=en

Upon using the extension for the first time, you need to provide your Google username, password and an Android Device ID. The latter is linked to a specific device (see below on what to do if you do not have a device, e.g. because you're running Android in an emulator). Entering the required details may result in a login error (username / password unknown), followed by a blocked a sign-in attempt notification from Google. This can be resolved by enabling access for less secure apps from the Google account settings. Details on this can be found here.

[edit] Obtaining the Android Device ID

If you don't have an Android Device ID, you can obtain one by running a (virtual) instance of Android. The best option here is to set up Android on a virtual machine using VirtualBox. For Windows 11 users, use Windows Subsystem for Android, which is by far, the easiest option. For Windows 10 users a simpler alternative is the Blue Stacks App Player, which can be downloaded here:

http://www.bluestacks.com/app-player.html

However, after a day or so the Player will stop working, unless you either pay a monthly license or accept the installation of sponsored apps.

After installation, start up the player and enter "device id" in the search field (see also step 2 here. Install and then run the app, which will give you a Device ID that can be used to unlock the Download APK extension as described above. Note that you can use this Device ID on any other machine (it is not tied to the machine on which the Blue Stacks App Player is installed).

[edit] See also

[edit] Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox