metalx1000

Move and apk and settings to new Android Device

Jul 21st, 2025
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. ###BACKUP
  2. # on desktop
  3. apk="ch.rmy.android.http_shortcuts"
  4. adb pull "$(adb shell pm path $apk | awk -F':' '{print $2}')"
  5. mv base.apk $apk.apk &> /dev/null
  6.  
  7. # on phone as root
  8. adb shell su -c tar czf /sdcard/ch.rmy.android.http_shortcuts.tar.gz  /data/data/ch.rmy.android.http_shortcuts
  9. adb pull /sdcard/ch.rmy.android.http_shortcuts.tar.gz
  10.  
  11. ###Restore
  12. adb push $apk.tar.gz /sdcard/
  13. adb install -g $apk.apk
  14.  
  15.  
  16. #on phone
  17. cd /sdcard/
  18. mkdir ch.rmy.android.http_shortcuts
  19. cd ch.rmy.android.http_shortcuts
  20. tar xvf ../ch.rmy.android.http_shortcuts.tar.gz
  21.  
  22. #as root
  23. find data|while read file;do echo $file; cat $file > /$file;done
Advertisement
Add Comment
Please, Sign In to add comment