Given a package name of a system app, how can I get its APK path ?
First, connect your device and from the platform-tools, and do a :
adb shell dumpsys > dumpsys.txt
Now, you can edit the file dumpsys.txt
with your favorite editor and search for the following string :
Package [<YOUR_PACKAGE_NAME>]
For example : with the package name com.google.android.setupwizard
you’ll have :
Package [com.google.android.setupwizard] (bf142e1):
userId=10018 gids=[3003]
pkg=Package{33203806 com.google.android.setupwizard}
codePath=/system/priv-app/SetupWizard
...
You see that codePath
is interesting here. You can now easily navigate to thiscodePath
to get the name of the APK , by listing the files available :
$ adb shell
$ cd /system/priv-app/SetupWizard
$ ls
SetupWizard.apk
arm64
To backup this APK, you can now simply run the following :
adb pull /system/priv-app/SetupWizard/SetupWizard.apk SetupWizard-backup.apk
Aucun commentaire:
Enregistrer un commentaire