CRAFT_BACKUP, a script for application and data backup - myTouch 3G, Magic Android Development

***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.

Related

[Q] Titanium Backup: (filter) labels are not restored

I checked the "Auto-sync TB settings"
Then do a full wipe, reinstall TB (or launch the TB included in the ROM) and re-check that check box ... and
NOTHING
My filter labels don't reappear.
Everything else works fine, how does that setting work, is there a file on the SD card somewhere that I can check to see if TB created it fine?
I have the paid version and am now using 3.0.0.7 on Starburst 1.2.1
After 4 times re-classifying 300 apps I'd really like to solve this, what am I doing wrong, what can I check to make sure those settings are saved?
It is really hindering my ROM installations ;-)
Since no-one seems to have this problem I did some investigating myself and found a database called "custom" in /data/data/com.keramidas.TitaniumBackup/databases/ this seems to hold the filter information, I'll be keeping a copy of that next time I do a full wipe in case that "Sync" setting doesn't work again.
BelgianAtheist said:
Since no-one seems to have this problem I did some investigating myself and found a database called "custom" in /data/data/com.keramidas.TitaniumBackup/databases/ this seems to hold the filter information, I'll be keeping a copy of that next time I do a full wipe in case that "Sync" setting doesn't work again.
Click to expand...
Click to collapse
Nice Find dude! I was looking for a solution and you got it!
Lately it has been working well for me.
I've also found where the backup on the SD card is, it is in:
[sdcard]/data/com.keramidas.TitaniumBackup/
Here is a settings directory with the labels db and all settings and it also has a licensing file so that a fresh install knows you have the paid version without having to connect to the Market.
BelgianAtheist said:
Lately it has been working well for me.
I've also found where the backup on the SD card is, it is in:
[sdcard]/data/com.keramidas.TitaniumBackup/
Here is a settings directory with the labels db and all settings and it also has a licensing file so that a fresh install knows you have the paid version without having to connect to the Market.
Click to expand...
Click to collapse
Thanks.
But i don't understand how to solve the exact same problem as you had before. I know that this directory exists and the labels are saved there (/data/data/com.keramidas.TitaniumBackup/databases/).
You make a backup of this folder on the SD card and after wiping your mobile phone you restore this folder and start TB afterwards?
I hope you still track this topic
Thanks.
EDIT: At least i found a workaround for me. Seems like TB overwrites the Sync folder. Therefor i've installed a ROM (after wiping), installed Titanium Backup, made all my settings (encryption, labels, pro key, dropbox settings) and made a ROM backup with ROM Manager. It's not what i want. But i can live with that for now.
I have this same exact issue. No fixes yet
I wrote the TB support and they've requested some additional information. I hope they will fix it.
The support said TB has problems with dual sd devices.
I own a HTC Desize Z which is not a dual sd device.
1 - Replace files in SDCard\data\com.keramidas.TitaniumBackup\settings\ with your backup.
2 - Wipe Titanium data
3 - Start Titanium ..
Thinking it is it first start it will restore settings... don't know why it do not work the first time after flashing...
Seems that it do not check "Auto-Synced" settings on every start, only first start (empty data)
I have the same problem.
I hope it can be solved.
=======================
2011.12.21 Update
hi, guys, I found another app can restore TB's settings.
Delta Backup(market.android.com/details?id=com.ds.deltabackup)
u can use Delta Backup to backup "Titanium Backup".
When reinstall TB, just use Delta Backup to restore TB.
It works!
Honusnap said:
1 - Replace files in SDCard\data\com.keramidas.TitaniumBackup\settings\ with your backup.
2 - Wipe Titanium data
3 - Start Titanium ..
Thinking it is it first start it will restore settings... don't know why it do not work the first time after flashing...
Seems that it do not check "Auto-Synced" settings on every start, only first start (empty data)
Click to expand...
Click to collapse
This works - THANKS! Luckily, I had backed up /sdcard/data before the wipe.
Easy enough to have a script to do this, or TB can add a feature to copy /sdcard/data/com.keramidas.TB to /sdcard/data-backup/com.keramidas.TB whenever the app exits or is terminated, then look for that directory during its first start.
Unfortunately it seems we are a tiny minority. Theres practically no info on label deletion online or in the wiki. This used to happen often when I was flashing almost weekly but I haven't changed ROMs in a while and a sense rom I just tried had a modified TB included and it deleted my highly detailed labels. It should at least keep a cache of the old setting temporarily. Even my iPad does that in cydia when you change a plist. Gonna try restoring a nandroid with sdext, super outdated though. Kinda ridiculous that a great backup app's greatest weakness is backing itself up. I still get occasional licensing issues too so who knows.
Anyone happen to know a way to restore recently overwritten data either in the phone data/data or sd/data?
Here's to a useful daily update!
crammed174 said:
Kinda ridiculous that a great backup app's greatest weakness is backing itself up.
Click to expand...
Click to collapse
That's really weird. And the TB support doesn't even know what I'm talking about. After it got too complicated for them, they stopped writing me. Maybe someone should write them again and show TB support this topic.
I'm trying to fix this issue with symlinks. I will create a backed up ROM with ROM Manager where the database file links directly to my sdcard. I think this should work.
Galaxy S3 Problem Solved!
Honusnap said:
1 - Replace files in SDCard\data\com.keramidas.TitaniumBackup\settings\ with your backup.
2 - Wipe Titanium data
3 - Start Titanium ..
Thinking it is it first start it will restore settings... don't know why it do not work the first time after flashing...
Seems that it do not check "Auto-Synced" settings on every start, only first start (empty data)
Click to expand...
Click to collapse
Thanks man, this saved my problem.
The SD-Card in the SGS3 is in mnt/extSdCard, which means I also had to change the path for the backup folder to get it working.
There is also the possibility to manually import these settings to TB by opening the files in SDCard\data\com.keramidas.TitaniumBackup\settings\.
Honusnap said:
1 - Replace files in SDCard\data\com.keramidas.TitaniumBackup\settings\ with your backup.
2 - Wipe Titanium data
3 - Start Titanium ..
Thinking it is it first start it will restore settings... don't know why it do not work the first time after flashing...
Seems that it do not check "Auto-Synced" settings on every start, only first start (empty data)
Click to expand...
Click to collapse
I agree. This is probably the most straightforward approach.
Although..., I have to say, the the last time that I re-installed a fresh (from the Market) not an apk on my sd (my normal M.O) my labels were restored. Who knows!
Oh and as far as TiBu even knowing of or handling this issue, I still haven't heard anything from them after writing to them.
I guess every great warrior has a weakness.
BelgianAtheist said:
Since no-one seems to have this problem I did some investigating myself and found a database called "custom" in /data/data/com.keramidas.TitaniumBackup/databases/ this seems to hold the filter information, I'll be keeping a copy of that next time I do a full wipe in case that "Sync" setting doesn't work again.
Click to expand...
Click to collapse
Thank you fixed it for me
I was having this problem after including titanium backup in my rom. I think the problem is this:
System apps are allowed to start at boot (user apps aren't until they have been run at least once by the user)
Titanium backup starts at boot to check it if it needs to schedule any tasks
Sometimes this will happen on the first boot and before the sdcard has mounted, and it will fail to load the settings.
When you later run it yourself it will wipe the previous settings from the sdcard.
For now to get around this each time you install a new rom which includes titanium backup you can go in to settings and force close / clear data before you run it for the first time. Your previous settings should still be on the sdcard and will now be imported.
I will contact the developer about this - hopefully it wouldn't take much to fix.
[Edit] Thinking about it, pre-ics the boot permissions weren't enforced so this might happen with it installed as a user app too if you reboot before running it.
Originally Posted by Honusnap
1 - Replace files in SDCard\data\com.keramidas.TitaniumBackup\settings\ with your backup.
2 - Wipe Titanium data
3 - Start Titanium ..
Thinking it is it first start it will restore settings... don't know why it do not work the first time after flashing...
Seems that it do not check "Auto-Synced" settings on every start, only first start (empty data)
Click to expand...
Click to collapse
I am still not clear
1-there are 2 copies of the "data\com.keramidas.TitaniumBackup"
One on the internal memory and one in the external memory. Which one I back up and later over write .
2-How do I wipe titanium data?
Sorry if the questions sound stupid but I am stuck
------------------------------------
edit
I found the answers
thanks
ChromJ said:
I am still not clear
1-there are 2 copies of the "data\com.keramidas.TitaniumBackup"
One on the internal memory and one in the external memory. Which one I back up and later over write .
2-How do I wipe titanium data?
Sorry if the questions sound stupid but I am stuck
------------------------------------
edit
I found the answers
thanks
Click to expand...
Click to collapse
Hi!
Would you mind to post your answers? I am also interested in learning this...
Does anyone know if these problems we are having are due to the fact that some devices have both internal and external sdcards? (like the transformer family)
In preferences we are able to change the location of the back up copies but not the location of the titanium back up user configuration (labels, profiles, set up...)
Every time I have tried to use TB I end up loosing my TB configuration... quite annoying!
Thanks
Apps Organizer
An easy way to restore your labels in Titanium Backup (TB) is to use the recommended program Apps Organizer (AO) .
https://play.google.com/store/apps/details?id=com.google.code.appsorganizer
Assign labels using AO and you can see and use them to filter TB. Export the labels from AO. In your new ROM install AO and Import the labels. You will see them in TB in your new ROM and can use them to filter.
You may find my related Wiki is helpful:
http://forum.xda-developers.com/wiki/Android_ROM_Update
Cheers
Tom
Szczepanik said:
An easy way to restore your labels in Titanium Backup (TB) is to use the recommended program Apps Organizer (AO) .
https://play.google.com/store/apps/details?id=com.google.code.appsorganizer
Assign labels using AO and you can see and use them to filter TB. Export the labels from AO. In your new ROM install AO and Import the labels. You will see them in TB in your new ROM and can use them to filter.
You may find my related Wiki is helpful:
http://forum.xda-developers.com/wiki/Android_ROM_Update
Cheers
Tom
Click to expand...
Click to collapse
:
AO is helpful. I just restore AO with Data. Some things AO does not, tasker plugins for example.
It is ironic TiBU doesn't have a straightforward way to backup its settings.

[APP][ROOT][3.0+] Backup2Tar v0.1 Flashable App+Data Backup using Tar.

Backup2Tar is a Free backup tool that I created to help restore my apps after flashing a new rom.
How it works :
Select which apps to backup from the UI
The app generates a tar file on your sdcard (update.tar.gz) with the package files and data.
Finally, the app will generate restore_tar.zip which contains busybox and a small shell script to find update.tar.gz and extract it.
As of right now it's a very simple app, there are no options at all and I made it for personal use and to (re-)learn Java.
FAQ :
Why tar?
because it's the standard archive format on Linux, preserves permissions and user information.
But all the cool kids use zip files.
Yes, sure you can hack a nice updater-script to fix permissions on all files, but it's bound to screw up permissions some way or the other, specially with apps that have executable files in their /data/data/.
Your icons suck
Feel free to create new icons for the app and I will gladly use them.
Is there anyway to help?
Provide me with ideas, ways to improve it, better artwork and feel free to donate!
TODO :
Toggle saving apps' data and/or cache.
Store other important settings (wifi, gps, etc).
Clean up the source code and publish it.
Tested Devices :
N7000 (running 4.1.2 / Phillz Kernel).
Rooted 3.0.0, 4.0.3, 4.2.2 Android emulators (tested using update-binary, not from recovery).
All comments / suggestions are welcome.
Changelog :
v0.1
Initial alpha release.
Sounds useful, downloading now. Thanks!
Sent from my SGH-I897 using XDA
Will this backup my paid apps or only non "protected" apps?
famewolf said:
Will this backup my paid apps or only non "protected" apps?
Click to expand...
Click to collapse
I'm not sure, I don't have any protected apps at the moment to try with.
If you can test and report back it would be great.
The app copies /data/app/xxx.apk and /data/data/xxx, so if the protected files aren't in /data/data they won't be copied.
life.eq.null said:
I'm not sure, I don't have any protected apps at the moment to try with.
If you can test and report back it would be great.
The app copies /data/app/xxx.apk and /data/data/xxx, so if the protected files aren't in /data/data they won't be copied.
Click to expand...
Click to collapse
I'll see if I can get some time to install and try it.
Have you considered adding /system/app and it's associated data to the list? An app might be included in one rom and not in another so I'd still want the ability to back it up even if it has to back it up to /data
Also I didn't see it in the screenshots but if not there a single checkbox to backup ALL apps in list would be highly useful rather than having to click all of them.
You can backup system apps as well.
I found a bug in restoring, some apps won't restore right without "reinstalling" using the package manager, gonna try to figure out how to call the package manager from recovery.
Workaround to fix the apps that aren't working after restoring is to use adb shell.
PHP:
$ adb shell
$ su
# tar tzf /sdcard/update.tar.gz | grep data/app/ | while read APK; do pm install -r "/$APK"; done
This basicly will use the package manager to "properly" install all the apk.
I will release a fixed version later today.
I will add check-all option as well, I'm still getting the hang of action bars and such.
does this script preserve "move to sd" location? i mean, i used a lot "move to sd" standard android function, to move many big apps to sdcard/.android_secure folder... of course, none of the those that use widgets...
i found that restoring with titanium backup does not preserve this: if i batch restore my apps, it fills up my internal memory (samsung note n7000), and i've to move a bunch of them to sd before redoing restore of the remaining ones... very boring...
is there a way to restore apps EXACTLY in the same location where they were when backupped? thanks
Is it possible to backup the whole ext partition as well? As Im using Link2Sd and to restore it quite tedious. My apps + games are out of the internal space.. So, I extend using ext partition.
Can we flash the backup to stock unrooted rom ,from the stock recovery??
Sent from my GT-I9070 using xda premium
no answers in days from the developer to a fresh project... then no development at all? hope not...
mrshark said:
no answers in days from the developer to a fresh project... then no development at all? hope not...
Click to expand...
Click to collapse
You posted your original question late on the 28th and this most recent complaint early on the 30th at least by my timezone....perhaps you have an unreasonable expectation as to how soon he needs to respond to you.
famewolf said:
You posted your original question late on the 28th and this most recent complaint early on the 30th at least by my timezone....perhaps you have an unreasonable expectation as to how soon he needs to respond to you.
Click to expand...
Click to collapse
3 weeks is enough?

255 error with TWRP backup/restore (999)

UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.
Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.
If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.
/storage/emulated
/data/system/
data/system_ce/
data/system_de/
data/misc/
data/misc_ce/
data/misc_de/
data/user/
data/user_ce/
data/user_de/
If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.
Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.
Install Terminal Emulator from the play store
Open Terminal and type
su
Press enter and grant root permission
Next type
pm remove-user 999
Press enter
Close Terminal and reboot
Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?
I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"
Any help is appreciated. Thanks
dracoboss said:
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?
I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"
Any help is appreciated. Thanks
Click to expand...
Click to collapse
Try to remove your security pin code first before install new firmware.
Thanks for sharing the info :good:
Stupid question about backup ,
I normally use root essentials to make a system backup but I think with op6 it will not backup al the required files anymore I think.
So I want to make the backup true twrp but can someone list the files to backup. As there are also vendor partition listed. So please let me know what to backup exactly to make the correct backup.
Thanks in advance.
Regards ysco..
dracoboss said:
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?
I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"
Any help is appreciated. Thanks
Click to expand...
Click to collapse
Make sure you're doing "su" then enter first and its getting root permissions
I'm on official TWRP.
I have a backup of Renovate 2.0, which worked without any errors, but after I ran into issues with the 2.1 flash (bootloop) I wanted to restore my backup, which fails with the 255 error at the Data partition, the rest restores fine.
Now I was in TWRP terminal to do the above, but I couldn't find / delete any of the 999 folders. I also didn't have any other IDs on 2.0, nor did I have any security features active at the time of my backup.
What will this operation do for me with a complete but unrestorable backup anyway, surely it won't delete folders out of my backup?
What triggers the error, the destination (ROM) or the backup file?
Is there a way to get into my backup from TWRP terminal?
Any other ideas?
Thanks for any input!
geenyous said:
I'm on official TWRP.
I have a backup of Renovate 2.0, which worked without any errors, but after I ran into issues with the 2.1 flash (bootloop) I wanted to restore my backup, which fails with the 255 error at the Data partition, the rest restores fine.
Now I was in TWRP terminal to do the above, but I couldn't find / delete any of the 999 folders. I also didn't have any other IDs on 2.0, nor did I have any security features active at the time of my backup.
What will this operation do for me with a complete but unrestorable backup anyway, surely it won't delete folders out of my backup?
What triggers the error, the destination (ROM) or the backup file?
Is there a way to get into my backup from TWRP terminal?
Any other ideas?
Thanks for any input!
Click to expand...
Click to collapse
The directions that are listed above are to be used inside terminal emulator once your phone is booted up and before you make the backup. I'm not sure if you can actually take files out of the backup especially from your device. That may be something you have to pull from the device and put onto your computer to accomplish
ysco said:
Thanks for sharing the info :good:
Stupid question about backup ,
I normally use root essentials to make a system backup but I think with op6 it will not backup al the required files anymore I think.
So I want to make the backup true twrp but can someone list the files to backup. As there are also vendor partition listed. So please let me know what to backup exactly to make the correct backup.
Thanks in advance.
Regards ysco..
Click to expand...
Click to collapse
If you want to make a full and complete backup of your entire system then you go into backup in TWRP and you check mark every box and then make your backup.
dracoboss said:
I searched the locations you mentioned and didn't find any 999 folders but I still get the error 255 when trying to flash 5.1.6 full zip. Any ideas what the issue could be?
I even tried running the commands on terminal anyways and got an error saying "couldn't remove user ID 999"
Any help is appreciated. Thanks
Click to expand...
Click to collapse
Please if you could report back to us on this thread and let us know if the instructions you were given above help you or not
dgunn said:
If you want to make a full and complete backup of your entire system then you go into backup in TWRP and you check mark every box and then make your backup.
Click to expand...
Click to collapse
Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.
Thanks.
Regards ysco..
dgunn said:
Please if you could report back to us on this thread and let us know if the instructions you were given above help you or not
Click to expand...
Click to collapse
Oh sorry lol. Turns out I just had to use official twrp to flash the full zip instead of the unofficial one I was using. After that it was smooth sailing
ysco said:
Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.
Thanks.
Regards ysco..
Click to expand...
Click to collapse
boot, system image, vendor image, data.. and you are on the safe side.
Once I made a backup of boot, system, vendor, data (no images) I had to flash OOS afterwards. I don´t completely understand the difference between first and second way, finally both worked. But for sure it is not necessary to mark all partitions.
Flying Fox said:
boot, system image, vendor image, data.. and you are on the safe side.
Once I made a backup of boot, system, vendor, data (no images) I had to flash OOS afterwards. I don´t completely understand the difference between first and second way, finally both worked. But for sure it is not necessary to mark all partitions.
Click to expand...
Click to collapse
Thanks for pointing out the steps for a successful backup.
Regards ysco..
ysco said:
Thanks for the reply back to me.
I already did make a full backup and I know the procedure to make a backup in twrp but I wanted to know if all must be marked for a full backup. Some say that not all needs to be checked. If you mark all the backup is huge lol.
Thanks.
Regards ysco..
Click to expand...
Click to collapse
I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS
dgunn said:
I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS
Click to expand...
Click to collapse
Ahh good to know mate
Thanks.
Regards ysco..
dgunn said:
I backup everything to reduce the amount of steps for the restore process. If you check every box during the backup process you do not have to Flash the OS during restore. Yes it does take up more space but the restore process is simple if you do. By checking every box all you have to do is restore your backup and then Flash magisk and you're done no need to flash the OS
Click to expand...
Click to collapse
Actually you don't have to make a backup of system AND system image as well as you usually don't buy apples AND apples and pears. You just need the system image (and boot, vendor, data) to perform a complete and success backup.
dgunn said:
UPDATE: I have since updated to official 5.1.6 via OTA flashed TWRP and Magisk. The backup finished successfully with no sign of 255 error and once rebooted the USER ID and all 999 folders were still gone after the update and switched slots.
Only tested on OnePlus 6 but file structure should be the same on any device running Android O. Must be rooted to grant Terminal Emulator root permission. You cannot remove a user without root.
If anyone has had the 255 error while trying to create a backup file or trying to restore with TWRP. This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your OnePlus 6 or other devices you can do a quick check by go into your Root browser and look in these locations.
/storage/emulated
/data/system/
data/system_ce/
data/system_de/
data/misc/
data/misc_ce/
data/misc_de/
data/user/
data/user_ce/
data/user_de/
If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.
Currently there is only one solution that I have found to be able to delete all of the 999 folders and that is to open a terminal emulator to each of these locations and remove the 999 folders individually. I have found a solution where you can delete the user ID and by doing so it removes all of the 999 folders and not only does it remove the folders they do not return once you reboot your device. The solution is simple so let's get to it.
Install Terminal Emulator from the play store
Open Terminal and type
su
Press enter and grant root permission
Next type
pm remove-user 999
Press enter
Close Terminal and reboot
Once rebooted go back to your Root browser and check the locations listed above to ensure the 999 folders are gone. That's all, Enjoy.
Click to expand...
Click to collapse
I don't have parallel apps or multi-user. What I have is a "work profile" (latest feature by gsuite which is mandated by my organization). Work profiles isolate work/company account data into a separate encrypted/remote wipable silo. Android creates copies of the apps for the work profile. This is causing a folder called "/data/system_ce/10" which is failing to backup. Any solution for TWRP to work with work profiles? Ideally, can I "ignore" folders to not be backed up so that TWRP nandroid backups can work.
angadsingh said:
I don't have parallel apps or multi-user. What I have is a "work profile" (latest feature by gsuite which is mandated by my organization). Work profiles isolate work/company account data into a separate encrypted/remote wipable silo. Android creates copies of the apps for the work profile. This is causing a folder called "/data/system_ce/10" which is failing to backup. Any solution for TWRP to work with work profiles? Ideally, can I "ignore" folders to not be backed up so that TWRP nandroid backups can work.
Click to expand...
Click to collapse
You will have to remove those folders from the system before you can do a backup. Maybe cut and paste them onto an OTG drive, do the backup and then replace the folders. Twrp will not backup any multi-user accounts and that is exactly what gsuite has made.
See here for more info similar to your issue.
https://forum.xda-developers.com/pixel/development/twrp-alpha1-pixel-devices-t3500314/page56
Hello. Can you tell me how to properly restore a backup on TWRP? Do I have to change slots oraz something?
Restore does not work ...
I'm having the same problem. I simply cannot restore a TWRP backup. It always produces an error 255.
No, I do not have any "999" folder/files, nor do I have any lockscreen security. I also do not have parallel apps or anything involving multi-user.
I'm extremely experienced at flashing ROMs, as well as performing Nandroids and restoring them.
Nothing I've done is working. As I said, I simply cannot restore the data partition. That's when I get the 255 error. System restores fine, but that's it.
Any ideas?
Thank you,
Peter

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.

Alternative to `adb backup` for Android 12+

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.

Categories

Resources