How to extract or backup apk from android system?


As an android developer, I always wanna hack awesome app to learn its design inside. The first step of that is to get the APK file itself, and the obvious way to do that is to extract it from our android phone.

There are two ways to make that, both of them need no root privilege.

1. Use android adb backup command
adb shell pm list packages
adb backup -apk com.google.android.wearable.app
dd if=backup.ab bs=1 skip=24 | python -c “import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))” | tar -xvf -
2. Use adb package management cmd
 adb shell pm list packages
 adb shell pm path com.google.android.wearable.app
 adb pull /data/app/com.google.android.wearable.app-1.apk

Comments

Popular posts from this blog

How Bluetooth LE works? -- Link Layer

Bluedroid stack in android

Network programming in elisp