metalx1000

Android ADB backup APP

May 8th, 2020
1,992
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #get a list of all installed package names
  2. adb shell "pm list packages -f"|cut -d\= -f2
  3.  
  4. #backup an app
  5. adb backup -noapk com.your.packagename
  6.  
  7. #the backup.ab file is tar file with special headers
  8. #remove that header and untar the file
  9. ( printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 backup.ab ) |  tar xfvz -
RAW Paste Data