So how do we extract the APK apps to computer after installed from Play Store? Or, even the default system APK apps? If you're using Android device, you can use adb or root explorer to extract. If you're using Android in VirtualBox, we will use adb tool only to pull the original APK file from Android to computer. Before we moving further to the adb tool, first thing you should know is there are 2 categories of apps storing inside the Android system. One is system applications and another one is user applications. All the apps install from Play Store are considered as user applications. Now here is how to extract APK apps:
- Setup Android-x86 in VirtualBox and starts it.
- Extract adb tool archive.
- Press and hold shift key + right click on the adb tool folder, click "Open command window here".
- Type adb connect localhost in the command window.
- adb is connected with Android. We need to know the Android application's actual filename so that we can extract out the correct APK file. So we enter shell mode to explore around the Android system to check the actual APK filename. The system applications are located in /system/app and user applications are in /data/app
- Type adb shell to enter shell mode. If you get "error: more than one device or emulator" message, read HERE how to overcome it.
- Type su to root.
- Enter cd /system/app to look for system applications. Or, enter cd /data/app to locate user applications.
- Enter ls to view the list of files.
- After you know the APK filename, type exit to exit root.
- Type exit again to exit shell.
- Now you can execute the command to extract APK file with this command: adb pull /example.apk d:\example.apk
The first directory location is which file to copy out and the second directory is the location where the file to paste in. For example, I want to extract Angry Birds Space app from my Android device to computer's D:\Downloads. So, the command line will be like this:
adb pull /data/app/com.rovio.angrybirdsspace.ads-1.apk d:\downloads\angrybirdsspace.apk