Back up android with adb backup
Asked Answered
C

1

6

With the backup command you could make a complete backup of android smartphones, now that I know only the pull command remains but it is not like the backup command, are there alternatives?

Cesaria answered 10/11, 2022 at 10:47 Comment(0)
S
9

The adb backup command may be able to make a complete backup of an Android smartphone, but nowadays it becomes more and more useless:

  1. adb backup can only backup apps that allow backup at all (an app has to declare allowBackup=true in it's AndroidManifest.xml or don't have such an entry at all). If it sets allowBackup=false then adb backup can not get any data on this app.

  2. Cryptographic keys stored in AndroidKeystore can not be extracted, they are bound to the phone hardware. https://developer.android.com/training/articles/keystore

  3. adb backup fails if the Android system is version 12 or higher and the app to be backuped has a targetSDK level of 31 or higher - only exception: the app is a debuggable app (debuggable="true" in AndroidManifest.xml) but this is never the case for apps from Play Store or third party download sites). adb backup was marked deprecated years ago, seems like Google wants to finally cut it off. https://developer.android.com/about/versions/12/behavior-changes-12#adb-backup-restrictions

The only "alternative" exists if you want to switch devices and the old device is still functional. According to the Google Android documentation when using a direct device-to-device connection e.g. via USB a different mode is used that still allows to transfer apps and partially also their data.

Spook answered 10/11, 2022 at 12:20 Comment(13)
Ok, but what is the current alternative to that command? And which allows the entire android backup? The various tools that do android backups rely on adb, for example andriller, which adb command are they based on?Cesaria
@Cesaria On unrooted devices there is no real alternative. If you can not access the data you can not backup or transfer them. If a tool uses adb backup command it will fail. Some apps allow Google cloud backup and others can be transfered to a new device using direct USB connection. That are the ways Google allows.Spook
Tools like andriller are adb based and work, without root, something escapes meCesaria
@Cesaria I did not say adb backup does not work at all, there are still apps which allow backup and on older phones adb backup also still works for apps that allow it, but the number of apps is getting smaller and smaller and on newer devices for newer apps it doesn't work at all.Spook
ok, but then tools like andriller or similar that back up all android use adb only for the connection with the device, then for the backup they do not use the adb "backup" command but it is the program with which the tool was developed back up?Cesaria
@Cesaria Have you tried to create an abckup of an app that refuses backup via adb? Most likely you will get the same result using andriller.Spook
So andriller and the like use the adb "backup" function to extract the data? However apart from applications, data such as images, audio, media in general are extracted right? The alternatives are then the adb command "pull" or root the device and then perform the copy with commands like dd?Cesaria
@Cesaria I don't use andriller and such tools, you say it uses adb backup. As I don't use it I don't know how it works and what data it backup.Spook
No I'm not sure, I was just askingCesaria
@Cesaria as I wrote for app private data of non-debug apps on a non-rooted device there is only adb backup, thus if these tools claim to create a backup they can only use adb backup and are affected by the problems I mentioned. All the other data on the sdcard section can be accessed by commands like adb pull.Spook
ok, clearer this way, in order to root the device can you tell me any particular tool?Cesaria
@Cesaria - you want topjohnwu/Magisk on github for root. I'm not posting a link just because there are so many fake (maklware) links out there that it's good to get in the habit of going straight to github. Termux app can be helpful with root; tar and split are available. Your USB storage is under /mnt/media_rw/ .Joellajoelle
Note that you cannot root the device to create a backup of it because rooting the device will require doing factory reset. Google really dropped the ball when it comes to backups!Musso

© 2022 - 2024 — McMap. All rights reserved.