18 Practical Android skills: adb extracts the apk installed on the mobile phone, androidapk
Scenario:
When a friend sees that a game or app in your Android phone is very fun, he wants to install this app, but he cannot download it from the Internet due to network conditions. The simplest method is to directly deduct the apk from your phone and install it for him.
Pm command
Step 1: Find the package name of the program
Use the adb shell pm command to list all installed application packages:
$ adb shell pm list packagespackage:androidpackage:cn.wps.mofficepackage:com.android.backupconfirmpackage:com.android.bluetoothpackage:com.android.browserpackage:com.android.calculator2package:com.android.camerapackage:com.android.certinstallerpackage:com.android.contacts
Step 2: Find the apk location
$ adb shell pm path com.tence01.mmpackage:/data/app/com.tence01.mm-1.apk
Step 3: pull out
$ adb pull /data/app/com.tence01.mm-1.apk ~/apks2407 KB/s (25567735 bytes in 10.370s)
Root phones will be better handled
$ adb shellshell@android:/ $ sushell@android:/ # cd data/appshell@android:/data/app # lscom.android.update.dmp-2.apkcom.baidu.superservice-1.apkcom.tence01.mm-1.apkcom.tencent.mm-1.apk
Or directly search for the desired apk:
Shell @ android: // # find-name *. apk./udisk/my download/my application/aqgj_1365562277812.apk