Android Cheat Sheet

 · Jean Schurger
Table of contents

Permitting the backup of an existing app

adb shell pm path com.the.app adb pull /data/app/com.the.app/base.apk apktool d ../base.apk

apktool b base zipalign -v 4 base/dist/base.apk base-backup.apk jarsigner –verbose –sigalg SHA1withRSA -digestalg SHA1 -keystore ~/.android.keystore base-backup.apk signkey

It looks like Android kind of remember the the original app has the allowBackup flag, so don't install the app before that change.

Basic package management notes about pre-loaded packages

Disable

pm uninstall -k –user 0 PACKAGE

Enable

cmd package install-existing PACKAGE

List

pm list packages -u