This is a quick and dirty cheat sheet / guide on how to extract Android .apk files from an Android device.

 

Tools needed:

SDK Platform-Tools for Windows

Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform, such as adb, fastboot, and systrace. These tools are required for Android app development. They’re also needed if you want to unlock your device bootloader and flash it with a new system image.

 

https://developer.android.com/studio/releases/platform-tools

 

Android Debug Bridge (adb)

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. It is a client-server program that includes three components:

 

https://developer.android.com/studio/command-line/adb

 

> A client, which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.

> A daemon (adbd), which runs commands on a device. The daemon runs as a background process on each device.

> A server, which manages communication between the client and the daemon. The server runs as a background process on your development machine. adb is included in the Android SDK Platform-Tools package.

 

Actions Walk-through

Debugging

Enable adb debugging on your device. To use adb with a device connected over USB, you must enable USB debugging in the device system settings, under Developer options. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options at the bottom. On some devices, the Developer options screen might be located or named differently.

 

List of devices attached

adb devices

Send commands to a specific device

adb -s serial_number shell

List packages

adb -s serial_number shell pm list packages

Get application full path

adb -s 052ecafe82920aca shell pm path com.blahblah.appname

Pull APK file from your PC

adb -s 052ecafe82920aca pull /data/app/com.com.blahblah.appname/base.apk

Share This

Share this post with your friends!