On This Page
Extracting .APK Files from a Physical Android Device
Extracting installed applications (.apk files) from an Android device is a common task for security analysis, backup, or reverse engineering. This guide walks you through the process using Android Debug Bridge (ADB).
Prerequisites
- Enable Developer Options and USB Debugging on your Android device.
- Connect the device to your computer via USB cable.
- Install ADB tools on your computer.
Step 1: Verify Device Connection
List all connected devices (including emulators):
adb devices
You should see your device listed. If multiple devices are connected, use the -s
flag with the device serial number to target a specific one.
Step 2: Access the Device Shell (Optional)
To enter the device shell directly:
adb -s W8F6D6Q8MBKJFANV shell
Replace W8F6D6Q8MBKJFANV
with your actual device ID from adb devices
.
Step 3: Extract the APK from the Device
- List all installed packages:
adb shell pm list packages
- Find the APK path for the target app:
adb shell pm path com.example.app
Replace
com.example.app
with the actual package name. The output will look like:package:/data/app/com.example.app-XXX==/base.apk
- Pull the APK file to your computer:
adb pull /data/app/com.example.app-XXX==/base.apk .
The dot (
.
) at the end means "current directory". You can specify any path, e.g.:adb -s W8F6D6Q8MBKJFANV pull /data/app/com.example.app-XXX==/base.apk D:\NewFolder
If the app uses split APKs (e.g., language, screen density, or architecture splits), repeat the process to extract all related .apk
files.
Step 4: Install Multiple APKs on an Emulator
Navigate to the directory containing the extracted APKs and use:
adb install-multiple base.apk split_config.armeabi_v7a.apk split_config.ru.apk split_config.xhdpi.apk
This command installs all components of a split APK application, allowing full functionality on the emulator.
See Also
- Official ADB Documentation
- Attack Surface (Wikipedia) - Understand exposed vectors in mobile environments.
Published on Aug 19, 2025