2

I need to hand in my old phone, but before I do, I want to be sure I am not going to lose any data, including app data.

I've tried the usual adb backup -apk -shared -all, however this produced a file that is a little under 9 GiB. The device capacity is 64 G and is almost full. Also, I made a backup about five months ago that is a much more plausible 45 GiB. Alas, I don't recall what command I used five months ago. (More specifically, I don't remember what arguments; I'm 99% certain it was some invocation of adb backup.)

What am I doing wrong? How can I back up "everything"? (I don't need e.g. OS stuff, but I definitely have more than 9 GiB of pictures, user-installed apps, and such.)

16
  • 1
    @Robert that's not quite correct. The -shared parameter advises it to also include "shared data", i.e. SD card contents. // Matthew: apps can opt-out of backup, so with one monolitic file you never know what you get. Take a look at my tool Adebar, which a.o. creates a script to backup each app separately (so you see which fail) and optionally also shared storage (though that you could backup simpler by simply copying all its files). The script will already show which apps won't backup, just look inside once it is created.
    – Izzy
    Dec 24, 2020 at 21:31
  • 1
    depending on how old the phone is it may exploitable. the adb backup arguments are easy to figure out. Be aware not all flags are fully implemented, behavior may differ from expectation. But if your previous backup.ab was +36 GB bigger that sounds more like lost connection. for pictures i recommend 'adb pull -a /sdcard'
    – alecxs
    Dec 24, 2020 at 22:57
  • 1
    @alecxs say what? And what for? This is the first time I hear something has to be run in a second terminal for Adebar to work. Where did you get that idea from, and what do those touch-events do? Wild guess: confirming the backups? If it's that, please check your config. Adebar can do that itself (not for all devices, but most). Take a look at things like AUTO_CONFIRM*; if your device requires a specific sequence, even that can be configured.
    – Izzy
    Dec 27, 2020 at 1:49
  • 1
    @alecxs, I can't leave it blank. Because my phone is encrypted (seriously, why on Earth would you not encrypt a mobile device?!), I can't start a backup without providing a password.
    – Matthew
    Dec 27, 2020 at 18:52
  • 1
    @alecxs On (at least) Android 11 you can't leave it blank if your device is encrypted; the backup confirm screen says "Since your device is encrypted, you are required to encrypt your backup. Please enter a password below:", and the "Back up my data" button is greyed out until you do so. I don't know if it was like this on previous versions. If you have a workaround that would be great, though. Apparently Samsung phones (maybe all Android phones) are encrypted by default now. Mar 10, 2022 at 2:40

0

You must log in to answer this question.

Browse other questions tagged .