Alternative to `adb backup` for Android 12+ - General Questions and Answers

I wish to fully backup a list of apps (including their private data) to restore them all quickly on a new ROM after a clean-flash.
In the past I could use `adb backup` for this, but since Android 12, they deprecated this command (it'll be removed soon) and this command is no longer able to backup the app's private data.
Is there anything else I can use, on a rooted device?
I would prefer using a command from command line, rather than an App: this way I can save and paste the list of apps to backup, instead of having to select N apps one by one in a GUI every time.

peoro said:
I wish to fully backup a list of apps (including their private data) to restore them all quickly on a new ROM after a clean-flash.
In the past I could use `adb backup` for this, but since Android 12, they deprecated this command (it'll be removed soon) and this command is no longer able to backup the app's private data.
Is there anything else I can use, on a rooted device?
I would prefer using a command from command line, rather than an App: this way I can save and paste the list of apps to backup, instead of having to select N apps one by one in a GUI every time.
Click to expand...
Click to collapse
see Swift Backup
Swift Backup - Apps on Google Play
A simple, fast and smart backup solution for Android smartphones
play.google.com

Sorry to be a bit off topic, but I am surprised that you were able to even use that command
When I tried to use the command (yes, I tried on all my Android devices)it does not do anything and no dialog box shows up at all.
All apps I use have their own backup functions, Google backs up photos automatically, office backs up to onedrive, bookmarks back up to Google etc. and I have not run into a scenario that I have to back up any app data.
Would you like to share what type of data specifically that you want to backup? Maybe I can think of a workaround.

Nicknackpaddywack101 said:
Sorry to be a bit off topic, but I am surprised that you were able to even use that command
When I tried to use the command (yes, I tried on all my Android devices)it does not do anything and no dialog box shows up at all.
All apps I use have their own backup functions, Google backs up photos automatically, office backs up to onedrive, bookmarks back up to Google etc. and I have not run into a scenario that I have to back up any app data.
Would you like to share what type of data specifically that you want to backup? Maybe I can think of a workaround.
Click to expand...
Click to collapse
I have a number of apps which don't back stuff up automatically and reinstalling and reconfiguring all of them takes quite a bit of time:
Slide for Reddit: I have 4 different accounts and logging in to all of them + reapplying the general configuration is a pain.
Bitwarden, Telegram, Keybase (and a handful others): needs to log in through 2FA and I'd rather skip that.
andOTP: needs to manually export and import its data.
CovPas: needs me to re-scan the QR codes of all my COVID vaccines.
AdAway, Yi Action Camera: they're not on the Play Store, so the APK needs to be installed manually.
I just installed a new ROM and ran into some issues (after installing and configuring everything). I need to clean-flash it again, but don't want to reconfigure everything manually. I wish to copy the current configuration as it is and be done.
Fytdyh said:
see Swift Backup
Swift Backup - Apps on Google Play
A simple, fast and smart backup solution for Android smartphones
play.google.com
Click to expand...
Click to collapse
Thanks, I'd have preferred something via command line (without a GUI), so I can just paste the list of my apps and be done with it, but thiss will be a valid alternative if no CLI option is available.

peoro said:
I have a number of apps which don't back stuff up automatically and reinstalling and reconfiguring all of them takes quite a bit of time:
Slide for Reddit: I have 4 different accounts and logging in to all of them + reapplying the general configuration is a pain.
Bitwarden, Telegram, Keybase (and a handful others): needs to log in through 2FA and I'd rather skip that.
andOTP: needs to manually export and import its data.
CovPas: needs me to re-scan the QR codes of all my COVID vaccines.
AdAway, Yi Action Camera: they're not on the Play Store, so the APK needs to be installed manually.
I just installed a new ROM and ran into some issues (after installing and configuring everything). I need to clean-flash it again, but don't want to reconfigure everything manually. I wish to copy the current configuration as it is and be done.
Thanks, I'd have preferred something via command line (without a GUI), so I can just paste the list of my apps and be done with it, but thiss will be a valid alternative if no CLI option is available.
Click to expand...
Click to collapse
if you are using twrp, how about a twrp backup ?

what are adb backup alternatives?
i have a lenovoA319 i wanna get involved into the root thing , so i wanna make a backup of my stock phone in case i wanted to get it back to its conditions-i dont care about warranty but i lilke to keep a copy of every thing- as adb backup doesnt...
forum.xda-developers.com

If you have adb that is root (without su) and you can adb pull data/data/com.example.app/shared_prefs/App.xml
then you can try my AdbSync.exe (in my sig).
Code:
C:\>mkdir Backup
C:\>adbsync /hscu Backup data/data /i*:*
Yeah, the /i*:* ignores the one problematic file of com.google.android.gms/shared_prefs/nearbysharing:service:state.xml
Colons don't work so hot in Windows.
Code:
C:\>adb pull data/data/com.google.android.gms/shared_prefs/nearbysharing:service:state.xml
adb: error: cannot create '.\nearbysharing:service:state.xml': No such file or directory
To restore:
Code:
C:\>adbsync /ascu Backup data/data

Fytdyh said:
if you are using twrp, how about a twrp backup ?
Click to expand...
Click to collapse
I'm using OrangeFox (which supports a similar backup system)... However it backups the whole /data partition, not single apps, right?
I need to reinstall my ROM from scratch because something broke (Google Maps, after installing it both via the store and by flashing the NikGapps addon) and I'm afraid that part of the misconfiguration could be in the /data partition: would prefer to only save the data of a set of selected apps.

Renate said:
If you have adb that is root (without su) and you can adb pull data/data/com.example.app/shared_prefs/App.xml
then you can try my AdbSync.exe (in my sig).
Click to expand...
Click to collapse
I'm on Linux though.

xXx yYy said:
what are adb backup alternatives?
i have a lenovoA319 i wanna get involved into the root thing , so i wanna make a backup of my stock phone in case i wanted to get it back to its conditions-i dont care about warranty but i lilke to keep a copy of every thing- as adb backup doesnt...
forum.xda-developers.com
Click to expand...
Click to collapse
Sweet! That's a nice little script that seems to do what I need.
Would you know whether it's possible to pull the app's APK too? I'm not sure where/how it's stored.

Related

CRAFT_BACKUP, a script for application and data backup

***0.6.5***
-Full compatibility with froyo, now it backup application moved to sd (froyo way)
***0.6.4***
-Fixed some issue with froyo
***0.6.3***
-Fixed wifi broke bug
***0.6.2***
-Fixed apn restore bug
***0.6.1***
-Added possibility to restore the call history
-Both script can be launched from phone terminal without any problem.
***0.6***
-rewritten script , is now more stable
-It does backup of applications installed on sd, both "new" and "old" method.
-If there are applications on sd saved in the backup, it asks the location where to install them.
******
In the market there are good applications for android backup.
I made my own script, craft_backup, that allow to backup both applications(apk) and data, saving them in "craft_backup" folder on sdcard.
The restore script (craft_restore), allow to interactively restore this data.
The restore script is divided into phases:
1)Application reinstall( by Wes Garner) : It automatically reinstall all the application in the backup
2)Restore applications data
3)Restore system data that does not cause incompatibility issue: sms,Apn, bookmarks, wifi, user dictionary, call history.
4)fix permissions (by [email protected]).
Prerequisites:
1) Root permissions
Script installation
Download last version from this link and flash it from recovery
Script execution
Not from recovery!
To backup:
Code:
adb shell
craft_backup #You must execute this command on the new shell
To restore (in case of wipe, we have to the repeat the script install operation)
Code:
adb remount
adb shell
craft_restore #You must execute this command on the new shell
Sometimes the restore process may seems to be frozen, simply let it work
After the restore, It's possible to have some force close, no fear. If some applications doesn't work(rare), reinstall it.
Sorry for bad english!
I released a new version, some bugfixes.
The script it's fully functional, no force close,etc
Will check it out, I suggest you show something during the backup process so that it indicates how far along in the process it is. Something like,
Code:
Backing up apps:
Barcode.apk
Maps.apk
.
.
.
APN data
bcrook said:
Will check it out, I suggest you show something during the backup process so that it indicates how far along in the process it is. Something like,
Code:
Backing up apps:
Barcode.apk
Maps.apk
.
.
.
APN data
Click to expand...
Click to collapse
thanx.
The backup process take about a minute, it's short time.
The restore script take longer, and indicates the operation and the datas being processed!
pierissimo said:
thanx.
The backup process take about a minute, it's short time.
The restore script take longer, and indicates the operation and the datas being processed!
Click to expand...
Click to collapse
Hmm okay, mine didnt work. It wasnt doing anything. If its quick the status is less important, maybe just:
Code:
Backing up apps...
Backing up settings
Done!
do you mean the restore script doesn't work?
do you exec "adb shell craft_backup" ?
it must be executed in new phone shell, otherwise it does not work, like this:
Code:
adb shell #first
craft_restore #after
Ignore me - it works. I think the adb push went bad. It is working great now.
Thanks!
bcrook said:
Ignore me - it works. I think the adb push went bad. It is working great now.
Thanks!
Click to expand...
Click to collapse
It takes a bit long, about 30 minutes on 100 application reinstall, just let it works
How was it?
does it backup everything on the phone?
can you specify which data you want to backup?
can i backup/restore sms?
tnx.
Thesniperz said:
does it backup everything on the phone?
can you specify which data you want to backup?
can i backup/restore sms?
tnx.
Click to expand...
Click to collapse
It lets you choose what to backup.
It allow to backup all applications and applications data, sms, Apn, bookmarks, wifi, user dictionary(user dictionary is in testing)
updated, now it will make the backup of application on sd too.
Pierissimo perchè non fai un'applicazione da caricare sul market? Sarebbe una gran cosa davvero!
Try translate in english
Pierissimo you should create an application by that script
When i will have free time to work on java!!
Bump
I had this running and was browsing the web to kill time, forgot about it, and my phone rebooted.
The vibrate on my desk scared the sh*t out of me.
Anyways... awesome work dev.
fryguy18 said:
I had this running and was browsing the web to kill time, forgot about it, and my phone rebooted.
The vibrate on my desk scared the sh*t out of me.
Anyways... awesome work dev.
Click to expand...
Click to collapse
thanx man, perhaps I'll put the request to reboot, during the night the vibro is a bit tragic
I wouldn't worry about it... I was more just commenting in the section because I don't want it to be forgotten. I was using titanium backup before I found this, and this is a much better alternative
Yes i got it
Thanx tor the feedback man!
any suggestion for the script for next version?
Hi,
I had tried various backup solutions and even bought MyBackup Pro but there is a certain feature in which I had found to be lack of:-
Refreshing of the device market repository to sync with applications is what am I looking for. When we do an installation (or restore) on a fresh device through adb, mybackup or other apps, the device market repository was not updated, therefore any newer version of these applications would not be prompted off from the market app.
Unless there is a step, option or feature in the Android OS that I had missed. I would really like to see this feature to be implemented on application backup utilities.

[Q] "adb restore" leaves stuff out

I am trying to restore files back to my reset OnePlus One using "adb restore <file>" but while the restore happens without error, some files/folders are not restored. I have checked the backup file and the files and folders are present in the backup file, yet adb restore does not restore them
My backup is created with this command:
adb backup -f backup.ab -apk -obb -shared -all -system
And I try to restore with this:
adb restore backup.ab
Especially in the /sdcard/Android/data are a lot of files and folders missing and apps are not getting restored to their working state.
How do I restore the backup properly? Do I have to push every single file/folder to the phone manually?
Never mind. I just noticed that the backup files did not care to backup the /sdcard/Android folder and I have lost all files.
Why is it so impossible to make a proper backup on Android?
I am so close to ditching android just because I cannot get a working backup/restore to work!
And no, my phone is not rooted as rooting erases my files. Chicken and egg problem. I really hate android here.
"adb restore" didn't restore any of my accounts! I am so very pissed about android right now. Such a "mature" platform and no working backup/restore.
Plenty of tools offering to make backup/restore, but the all require me to erase all data (root) making the backup moot. And those tools that do not require root cannot backup anything besides what "adb backup" offers to back up (which is more miss than hit).
I am really envious of Apple users here. They have perfect (so it seems) working backup and restore.
... and I cannot add the missing accounts because they are already created. So, none of my accounts were restored and even though all accounts are actually there, none of them can synchronize as they are not there.
And all this trouble just to fix non-working MMS which turned out not to work after a reset anyway. I hate really hate android. So f...... unreliable.
I seriously cannot recommend anyone to use adb backup/restore. This will totally mess up your phone. Copy files manually and write down all your accounts (type/username/password/all settings) create them manually afterwards. "adb restore" cannot restore accounts.
If everything is lost at this point might as well root now and use titanium backup or parcel in the future? Not sure if parcel can backup accounts, titanium backup can though
Sent From Lollipopified Bacon Goodness!
ek69 said:
If everything is lost at this point might as well root now and use titanium backup or parcel in the future? Not sure if parcel can backup accounts, titanium backup can though
Sent From Lollipopified Bacon Goodness!
Click to expand...
Click to collapse
Indeed
galmok said:
And no, my phone is not rooted as rooting erases my files. Chicken and egg problem. I really hate android here.
Click to expand...
Click to collapse
Why didn't you just connect to your PC and copy your files across? Or at least research the phone before you bought it or started using it? If you unlock the bootloader when you receive the device the wiping that occurs during the unlocking process is a non-event.
There's no reason to "hate Android" because of this situation. There are several ways to make backups on an Android device, you just failed to unlock your device at the correct time. Just trying to put it into perspective a bit here.
Transmitted via Bacon
timmaaa said:
Why didn't you just connect to your PC and copy your files across? Or at least research the phone before you bought it or started using it? If you unlock the bootloader when you receive the device the wiping that occurs during the unlocking process is a non-event.
There's no reason to "hate Android" because of this situation. There are several ways to make backups on an Android device, you just failed to unlock your device at the correct time. Just trying to put it into perspective a bit here.
Transmitted via Bacon
Click to expand...
Click to collapse
I cannot copy everything to my pc. Accounts for instance cannot be copied. Same with system settings, Wi-Fi passwords and some apps do not survive the adb backup/restore (like Waze that enters a crash loop) and other apps just vanish. This system is not user friendly. There is no way I could make anyone I know accept this phone if they knew they couldn't back it up. They know nothing about rooting but they will not accept a non-working backup.
I at least tried (hard) to make a backup and restored it back and that was a horrible experience. I cannot help wondering why Google hasn't arranged android to have working backups. Apple has it and it seems near perfect compared to android.
galmok said:
I cannot copy everything to my pc. Accounts for instance cannot be copied. Same with system settings, Wi-Fi passwords and some apps do not survive the adb backup/restore (like Waze that enters a crash loop) and other apps just vanish. This system is not user friendly. There is no way I could make anyone I know accept this phone if they knew they couldn't back it up. They know nothing about rooting but they will not accept a non-working backup.
I at least tried (hard) to make a backup and restored it back and that was a horrible experience. I cannot help wondering why Google hasn't arranged android to have working backups. Apple has it and it seems near perfect compared to android.
Click to expand...
Click to collapse
Google does have backups, in the settings menu. Most of the system settings are backed up (and even if they weren't it should only take a total of ten mins to set them up again). Apps are backed up and downloaded again on a fresh install. It all works perfectly if you know what you're doing.
Transmitted via Bacon
timmaaa said:
Google does have backups, in the settings menu. Most of the system settings are backed up (and even if they weren't it should only take a total of ten mins to set them up again). Apps are backed up and downloaded again on a fresh install. It all works perfectly if you know what you're doing.
Transmitted via Bacon
Click to expand...
Click to collapse
Except I have apps that are not on Google Play. I cannot backup my Wi-Fi passwords and am forced to let Google keep a copy. And there are so many settings that 10 minutes is far from enough to find them all and fix them. And the point is, I shouldn't have to. I should be able to make a backup, preferably compartmentalized, and restore the sections I want, if not all. And it should be 1 tool.
Also, following a reset, the phone will begin reinstalling apps from Google Play and what happens if I begin adb restore at the same time? I didn't want to find out and let it install. But when some games use 1.5GB of storage, that takes a long time. Would be much faster if I knew I could use adb restore.
Oh well, I will have to accept the horrible backup/restore solution for this phone, but I really am envious of the backup/restore for iOS devices.

Non-rooted backup of app caches on data partition?

Hello all,
I've been searching this topic for a few weeks, and have yet to find a viable solution. I want to grab some files out of the app caches on the data partition of my Pixel 2. I don't necessarily want to root it, because I have no desire to modify anything, just want to view some stuff.
I've tried several backup apps - which have either failed because they need root, or "backup disallowed". I've also tried adb using pull, backup, cp, shell, etc. It seems a bit backwards to unlock the bootloader, wiping the device of the very data I'm trying to extract. It's been frustrating to not be able to access one's own personal data ?
Any ideas? Thank you.
+1 I'd love to have this answer as well. All my passwords are in Twik (Play store app). I don't think Google is backing up app data (or are they?). If I ever decide to flash the Pixel 2, I'll have to re-type all my websites, plus the private key. Twik is one of the few apps I rely on that isn't cloud based. I suspect the answer is there's no way on an unrooted android device.
Speaking of Google backing up app data, Google android says it can restore app and app data, but in my experience, unless the app uses cloud based data, it ain't happening. So why do they claim to backup app data? I suppose they are refering to Google apps, as of coarse, Google does keep your Google app cloud data anyway, so you'll have it restored when you log back into your android device.
You could try using Helium for backing up data. Even without root, if you follow the instructions (download the file to a Windows box and connect the phone to it) Helium should work.
Rukbat said:
You could try using Helium for backing up data. Even without root, if you follow the instructions (download the file to a Windows box and connect the phone to it) Helium should work.
Click to expand...
Click to collapse
I think I tried that once. But without root, it skips anything that has it's backup flag set to "false". Unless you know a way to trick it ?

How To Guide Backup/Restore your appdata/savegame between phones [adb Shell] | [Non-root]

Adb method acts like TitaniumBackup (rooted) and is more practical than Helium/Carbon (non-rooted). It is useful for: -
New phone and doesn’t want to root/waiting for unlocking & root [Like BS4/Pro Case ]
Don’t have account for the app/game or playing as a guest.
Appdata saved within privileges of root access.
Transfer savegame of old/new games.
The method is manually simple and performed individually for each app to outcome precious/efficient results. However, AppData directly saved within “Android/Obb” & “android/data” or by “login”, can be easily backed up by copy/paste. ADB method won’t be much help.
Requirement: -
PC/Laptop
USB cable
ADB software [Attached]
How to prepare USB debugging: -
Refer/Apply steps 1-3 from here.
How to Identify APK Name Package: -
Check out App Info from BS4/Pro.
How to Select/Search for APK Package Via ADB: -
Download/Extract “adb.rar” into PC
Connect the phone to PC via USB cable
Run CMD.exe as admin > type command
adb devices:: A message appears to indicate the correct connectionadb shell pm list packages | sort:: To get the list of your ALL installed alphabetically
Search for desired name package > Highlight and CTRL+C to copy name package
com.sega.sprintE.g. Sonic Force Package
How to backup
Run CMD as admin > Type any following CMD from below.
From phone, A Full Backup message appear > Press BACKUP MY DATA > Wait to finish.
A file with (.ab) extension is generated in “adb folder”.
adb backup -f <filename>.ab -apk <Package Name>
adb backup -f sega.sprint.ab -apk com.sega.sprint:: To backup app+data in (.ab) formatadb backup -f sega.sprint.DataOnly.ab -noapk com.sega.sprint:: To backup data ONLY in (.ab) format
Note: to avoid backup failure (1-KB size backup files outcome). Run your App & extend Battery saving/Optimization (sleep) for longer periods. Then, perform backup CMD process.
How to restore
Run CMD as admin > Type any following CMD from below.
A Full restore message > Press RESTORE MY DATA > Wait to finish.
Check out the phone
adb restore <filename>.ab
adb restore sega.sprint.ab:: To restore app+data in (.ab) formatadb restore sega.sprint.DataOnly.ab:: To backup data ONLY in (.ab) format
Note, restoration data will be the exact as the old phone. Reminder, this method is efficient for Appdata hidden under root access / guest account / app and game with no access with login.
List of App/Game that had been successfully applied: -
ActionTaimanincom.GREMORYGames.ActionTaimaninAngryBirdcom.rovio.angrybirdsAngryBirdSpaceHDcom.rovio.angrybirdsspaceHDBritishCouncilcom.britishcouncil.ieltsprepEveryCircuitcom.everycircuitGrammarorg.cambridge.englishgrammar.egiuRelicRuncom.squareenix.relicrunSonicE1com.sega.sonic4epiSonicForcecom.sega.sprint
You can try your lists & post them in the comments
Not sure how I'm the first to respond in ~8 mos, but ok.
Ok just to clarify, a snippet of my list after "adb shell pm list packages | sort" ::
package:com.spotify.music
package:com.sps.servicing
package:com.squareup.cash
package:com.strava
package:com.stremio.one
package:com.studiosoolter.miracast.screenmirroring.pro
package:com.supercell.clashofclans
Your example doesn't show that every line is prefixed with "package:" is this normal?
I also got the following after I initiated with, ""
"
A full backup of all data to a connected desktop
computer has been requested. Do you want to allow
this to happen?
If you did not request the backup yourself, do not
allow the operation to proceed.
Since your device is encrypted, you are required
to encrypt your backup. Please enter a password
below:
"
I threw some generics numbers in and nothing happened
wolvmarine said:
-----
A full backup of all data to a connected desktop
computer has been requested. Do you want to allow
this to happen?
If you did not request the backup yourself, do not
allow the operation to proceed.
Since your device is encrypted, you are required
to encrypt your backup. Please enter a password
below:
"
I threw some generics numbers in and nothing happened
Click to expand...
Click to collapse
# Firstly, No need for passwords. Just press " Backup My data " as shown in picture above.
## Secondly, to backup Data ONLY OR Data+APK. if you got nothing like "1.00kb" size.. Just run app, then perform backup process while running the app. You definitely will get some size XX.00MB for sure.
why this happened?! .... some apps aren't properly running in background due to "battery optimization feature". Thus, you must run it first.
ksbwings said:
# Firstly, No need for passwords. Just press " Backup My data " as shown in picture above.
## Secondly, to backup Data ONLY OR Data+APK. if you got nothing like "1.00kb" size.. Just run app, then perform backup process while running the app. You definitely will get some size XX.00MB for sure.
why this happened?! .... some apps aren't properly running in background due to "battery optimization feature". Thus, you must run it first.
Click to expand...
Click to collapse
Does this preserve app data and even allow me to copy it over to GrapheneOS when i get it installed and possibly even transfer between devices similar to what i see on your supplied screenshots?
Sh4dow_Hunt3r said:
Does this preserve app data and even allow me to copy it over to GrapheneOS when i get it installed and possibly even transfer between devices similar to what i see on your supplied screenshots?
Click to expand...
Click to collapse
I never tested GrapheneOS. However, as long as it's an android system with debugging mode enabled, the method is supposed to work fine with you. Just give it a try!!
Does this work with android 13?
xxqxpxx said:
Does this work with android 13?
Click to expand...
Click to collapse
Yup .. as long as you enable debugging mode
I did but i end up with 47 bytes file and when restoring nothing happens.
The app is OSN. What i care about is just the login as I don't have access to do a forget password atm
Old phone is pixel 6 rooted.
New phone is pixel 7 pro not rooted.
xxqxpxx said:
I did but i end up with 47 bytes file and when restoring nothing happens.
The app is OSN. What i care about is just the login as I don't have access to do a forget password atm
Old phone is pixel 6 rooted.
New phone is pixel 7 pro not rooted.
Click to expand...
Click to collapse
Your TV show app might act differently than other apps.
However, have you attempted to "run the app and access fully the login first" on your old phone?! After that, try to perform the backup process while the account accessing in the background.
This only works for apps which support the backup/restore API. This is a not a generic solution across all apps.
Google backup does the same thing and its incomplete. Never rely on it to restore all your apps.
what do you mean by "run the app and access fully the login first"? I can access the app on the old phone normally and do whatever. ofc I cant log out and login if that what u mean
xxqxpxx said:
what do you mean by "run the app and access fully the login first"? I can access the app on the old phone normally and do whatever. ofc I cant log out and login if that what u mean
Click to expand...
Click to collapse
Nope, simply
- Debugged mode/USB cable is already connected
- Run your app ( of course, you are login )
- Perform backup process commands from PC CMD while the app is running ( Press "Backup My Data" message )
- Check the size file. If reasonable size, that means the backup is well-made
In case it's not, issues have to be related to what "devsk" had explained.
Hope it works for you
I'm trying to restore data for one app, but when I run the restore cmd, my phone displays: "A full restore of all data from a connected computer has been requested. Do you want to allow this to happen?"..."This will replace any data currently on the device!"
Is this a generic message? I only want to overwrite the data of one app. I don't want it to do anything like erase all other apps' data.
Can anyone confirm that even when you're just restoring one app's data, you still get this message, and it's fine?
User.Hemlock said:
I'm trying to restore data for one app, but when I run the restore cmd, my phone displays: "A full restore of all data from a connected computer has been requested. Do you want to allow this to happen?"..."This will replace any data currently on the device!"
Is this a generic message? I only want to overwrite the data of one app. I don't want it to do anything like erase all other apps' data.
Can anyone confirm that even when you're just restoring one app's data, you still get this message, and it's fine?
Click to expand...
Click to collapse
As long as you are following the above CMD code for a single app, you are fine. I hope you re-check the example picture I provided above following this link.
ksbwings said:
- Check the size file. If reasonable size, that means the backup is well-made
Click to expand...
Click to collapse
Quick question as I am trying to get a backup of my phone before sending it for repairs, how much do you think a reasonable size would be if I try and back up my phone with around 55GB of data?
Hm, so when I ran `adb restore` with the .ab file containing a single app backup, I got the expected dialog, on device I saw "restore starting..." and then "restore ended," but when I launched the app, nothing changed and none of my backed-up data was present.
It looks like adb restore just... doesn't work. Any ideas why? (non-rooted phone, and I checked the app and allowBackup=true)
i can confirmed backup apk+data for
Code:
com.tapblaze.pizzabusiness
work just fine , now my wife dont have to worry her progress gone on modded apk coz i just unlocked bootloader so yeah
This won't work for game save data on an app with backup disabled, such as Candy Crush, correct?
Also, is "adb.rar" a specific program, or is it just whatever the latest version of ADB was at that time? Wondering if I should download that or look elsewhere for the latest.
Finally, what is the "BS4/Pro case" referenced when talking about getting app info?
Thanks dude, u saved me from grinding
Good evening, I would like to restore a backup from the old smartphone to the new one, but I should especially restore the settings data of certain apps (for example the settings of icsee, other camera apps and pages saved in Opera bookmarks) which are important for me.
Is it possible to reset app settings? Thanks.

Restoring Google Authenticator after stock to LineageOS 19.1

Hi,
I've just upgraded from latest OnePlus stock ROM of Android 11 to LineageOS 19.1. I've made backups before formatting everything, a full NANDroid with TWRP, one using the Migrate app, one with Oandbackupx of all apps. Also Google's way, but that doesn't back this app up, which seems to be quiet bad...
After trying to restore from all the mentioned sources, Google Authenticator can't seem to be restored. It always ends up empty. Is there a a specific protection for that data? I've similar issue with Dropbox as an example, it asks me to login after a restore. Whereas other apps preserved their logins...
Would be great to restore it, as I had like 30+ MFA codes added. Any suggestions?
Thank you!
There is only one way to transfer codes to another phone in the case of Google Authenticator.
Perhaps there is an analogy with the Dropbox access application. You'll have to check it out for yourself.
Hi,
Ok, thanks for the info. This is just sad to hear.
Going back to the original system with restoring the NANDroid backup go get this code might not work either?
Thank you.
I can't seem to find a solution. So I'm switching to Authy and in the same time I'll add it to KeePassXC, which can also do it... This can't happen again, I have to reset 2FA on 30+ sites
antivirtel said:
I can't seem to find a solution. So I'm switching to Authy and in the same time I'll add it to KeePassXC, which can also do it... This can't happen again, I have to reset 2FA on 30+ sites
Click to expand...
Click to collapse
whats stopping you from flashing your nandroid backup back to regain access? Isn't the whole beauty of nandroid backups the fact that they're more like system snapshots?
We currently are running into the same problem (although different phone, different situation but same effective result. We already came from a custom rom but forgot to get the transfer QRs from the Auth app.)
Okay so let me update you on my findings. If you have a back-up of Authenticators data (made before the update Google pushed out earlier this month*) you could fish out the database file (called database, without any file extention, stored in the folder database (full path to the file in a TWRP backup would be /data/data/com.google.android.apps.authenticator2/database/database)) and just read out the table accounts using any sqlite3 tool. This table has a column called secrets which contains the keys. There even is a free (linux/cygwin) set of scripts that can generate QRs for you if you do not feel like punching in the keys manually.
Theoretically placing the database file into the database folder of the app (overwriting the empty one) or using something like Titanium Backup should work too if you have not updated the app on your old device/installation yet.
*With the last update Google started encrypting the secrets before writing them to the database and nobody has been able to find the key which they used for that (yet)
screen said:
whats stopping you from flashing your nandroid backup back to regain access? Isn't the whole beauty of nandroid backups the fact that they're more like system snapshots?
Click to expand...
Click to collapse
I'm now on Android 12, and since TWRP doesn't support the new encryption, I can't just take a NANDroid backup of the current one and flash the old one in (without losing much of the current one, which I don't want). Unless there's something new around this, that won't be too much of a help.
I can think of restoring the NANDroid backup to an Android emulator, but it doesn't seem to be possible:
https://www.reddit.com/r/Android/comments/k7v4c/_/c2i5l9g
(unless it has changed in the last 11 years).
screen said:
Okay so let me update you on my findings. If you have a back-up of Authenticators data (made before the update Google pushed out earlier this month*) you could fish out the database file (called database, without any file extention, stored in the folder database (full path to the file in a TWRP backup would be /data/data/com.google.android.apps.authenticator2/database/database)) and just read out the table accounts using any sqlite3 tool. This table has a column called secrets which contains the keys. There even is a free (linux/cygwin) set of scripts that can generate QRs for you if you do not feel like punching in the keys manually.
Theoretically placing the database file into the database folder of the app (overwriting the empty one) or using something like Titanium Backup should work too if you have not updated the app on your old device/installation yet.
*With the last update Google started encrypting the secrets before writing them to the database and nobody has been able to find the key which they used for that (yet)
Click to expand...
Click to collapse
Yeah, I already checked that file, it's encrypted in there, I was using the latest versions of the apps when I made the backup, didn't think that won't be enough. The weird thing is that restoring it won't restore the data. So it must use some device related key or it just detects that it's a different device... Annoying, backing it up doesn't actually do any good...
Do you have any other idea? Thank you!
antivirtel said:
I'm now on Android 12, and since TWRP doesn't support the new encryption, I can't just take a NANDroid backup of the current one and flash the old one in (without losing much of the current one, which I don't want). Unless there's something new around this, that won't be too much of a help.
I can think of restoring the NANDroid backup to an Android emulator, but it doesn't seem to be possible:
https://www.reddit.com/r/Android/comments/k7v4c/_/c2i5l9g
(unless it has changed in the last 11 years).
Yeah, I already checked that file, it's encrypted in there, I was using the latest versions of the apps when I made the backup, didn't think that won't be enough. The weird thing is that restoring it won't restore the data. So it must use some device related key or it just detects that it's a different device... Annoying, backing it up doesn't actually do any good...
Do you have any other idea? Thank you!
Click to expand...
Click to collapse
Well, if Authenticator doesn't pick up on databases from other installations that would sugest that Authenticator has a way to link a database to an Authenticator installation. Meaning, the only way you could possibly have a chance to retrieve the data is to restore your nandroid backup (and use the Authenticator in there to make your transfer QR codes), count your losses as far as your current installation goes and reinstall a 12 rom from scratch. (Or find a way to get the key used to encrypt the secrets, if you have the key you just decrypt them and punch them in manually (or use the earlier scripts for QR code gen))
screen said:
Well, if Authenticator doesn't pick up on databases from other installations that would sugest that Authenticator has a way to link a database to an Authenticator installation. Meaning, the only way you could possibly have a chance to retrieve the data is to restore your nandroid backup (and use the Authenticator in there to make your transfer QR codes), count your losses as far as your current installation goes and reinstall a 12 rom from scratch. (Or find a way to get the key used to encrypt the secrets, if you have the key you just decrypt them and punch them in manually (or use the earlier scripts for QR code gen))
Click to expand...
Click to collapse
It's sad that nobody seems to have the keys to decrypt the secrets.
Wish I had a nandroid backup or just an earlier backup of the app's data before they started to encrypt their db.
I'm losing many accounts here.
shokolatha said:
It's sad that nobody seems to have the keys to decrypt the secrets.
Wish I had a nandroid backup or just an earlier backup of the app's data before they started to encrypt their db.
I'm losing many accounts here.
Click to expand...
Click to collapse
To prevent exactly this from happening (again) I've switched to Authy like @antivirtel suggested earlier. Authy saves your secrets to your authy-account, and a big plus they actually have a desktop program too so I don't have to use my phone per se (I often just leave it home not needing my phone _untill_ I need 2FA somewhere lol). I'm sorry for your losses but at least take this as a learning oppertunity and switch to an 2FA/MFA application that does cloud
Exporting a QR code from google authenticator then taking a screenshot\pic of it and saving that for future phones has served me well so far..
I think if I read correctly, TWRP just released their new version with Android 12 decryption support, so I can go and extract it now from my nandroid backup. https://twrp.me/site/update/2022/10/10/3.7.0-released.html - did someone test this?
BTW, I also saved the 2FA codes to KeePassXC/DX, works brilliantly there too, has nice integration both on desktop and Android.
Hi,
I've finally found a way to save my current ROM and go back to my old backup of stock A11 (restore a NANDroid backup), and try to access G Auth, but it was empty straight away. Tried a restore with Neo Backup, no change. Unfortunately it seems like it's all gone. At least I have the DB file, it has a list of accounts, so I at least know where I had MFA...
Unless someone else has a clue how to restore it, someone?
Given it's finally getting cloud sync feature, Google should release a way to restore it. Google please do!
Thanks!

Categories

Resources