[Q] Trying to get a proper android backup - Nexus 5 Q&A, Help & Troubleshooting

Migrated to android about a year ago and still haven't been able to work out proper android backup.
I want to be able to mess with the system without fear of losing my data/configurations.
For example when installing Lollipop I encountered a lot of problems and every time I ****ed something up and had to reflash it I need to reinstall and reconfigure ABSOLUTELY EVERYTHING (Including redownloading about 13GB of music for google play music).
This has been a major letdown as I love tweaking and messing with the system getting it 100% the way I like it.
I've been able to get a basic functioning Lollipop installation but I want more.
Here's what I want to be able to backup to my PC (a 13GB backup on the device isn't very practical, especially when messing with the system):
My apps and all their settings (Including google play's downloaded music).
System settings.
This way and I can mess with the system and once I get it the way I want- restore the backup.
I know this might seem like a lazy google question but I am really at a lose.
I've scoured the internet looking for a solution, Tried numerous programs with no success.
Please if someone can guide me in the right direction I'll be forever grateful.

TWRP and/or Titanium Backup.

The backup via won't be 13 GB. It doesn't back up the /sdcard mount.
There are 3 backups you should do.
1) Nandroid backup from custom recovery such as TWRP
This backs up /system (where your ROM is), boot (where your kernel is) and /data (where all your user apps, user data and system data is). By user data, I mean app data. Not /sdcard as already mentioned.
This backup will be 3/4GB most likely if compressed and can be copied to your computer from /sdcard.
Nandroid backup will return your ROM and settings exactly to the point at which the backup was taken. Its a complete snapshot of everything you need.
2 ) titanium backup. This app is most useful when switching between ROMs or having had to wipe to resolve some compatibility issue. It takes a snap shot of each app, but its best just to snapshot user apps NOT system apps. Sometimes system data becomes incompatible and causes problems after an upgrade or ROM change. That's why we wipe when flashing new ROMs. You'll always be best setting up system settings (ringtones, alarms etc) manually but titanium takes the sting out of setting up your own user apps.
3) some kind of sdcard backup. Personally I use foldersync to backup my entire /sdcard whilst I sleep over WiFi to my NAS. Something like this would be extremely wise. If not, at least backup your photos using some cloud app.

Related

[Q] Clockworkmod recovery backup not working properly

Hi gents. I am trying to restore my phone to a recent clockworkmod recovery backup but several of the latest backups won't restore the downloaded programs of the time, nor do they seem to be restoring the general Android settings. Older backups are working perfectly, however, and I can't think of any significant or unusual changes I made to the system that could stop it working properly. Also, I have been backing up and restoring the same way.
I'm using Revolutionary CWM v4.0.1.4, HTC ICS 4.0.4 (w/ older HBOOT for S-OFF), HTC Desire S.
I find this very strange, and unsettling that clockworkmod's backup may be unreliable. Has anybody experienced this?
Another thing, I have also been backing up the entire SD card data in the later backups (just copying to computer via card reader), thinking it may be best to restore backups with this data, but it seems to not make a difference whether this is done, or the data left as-is, or the card cleared. What's best practice in regard to the Android data that's put on the SD card?
My phone is up the creek. Help!?
i am having the same problem restoring CWM v4.0.1.4 backups on my galaxy s2: older backups restore perfectly and newer backups restore incompletely (some settings and SMSs, but no apps and no contacts).
i believe this is an issue with large nandroid images (containing >10,000 files) being unable to restore properly. this implies the backup itself is intact, luckily.
read this:
http://forum.xda-developers.com/showthread.php?t=1154892
to rebuild my phone i started by using unyaffs on my PC to access the files on the CWM nandroid image and restore my contacts, call logs, etc:
http://forum.xda-developers.com/showthread.php?t=1370349
you can find additional file locations listed in this thread:
http://forum.xda-developers.com/showthread.php?t=969650
i then used appextractor (available in the play store) to manually restore my apps and app data from the CWM nandroid image. some needed to be redownloaded.
it's a schlepp but better than losing everything entirely.
i've read that TWRP is a more reliable way to backup and restore. i'm certainly not using CWM again.
regarding your second question, the data on your internal and external SD card is irrelevant to the function of the OS, but some apps may rely on that data. for example large apps install on the SD card.
Thanks so much for that matey. I searched and searched but hadn't come across the 10,000 files limitation. How annoying!
Anyhoo, before I saw your post I ended up restoring the latest working backup and reinstalled apps, configured things, got the device mostly up to speed.. but there were some sentimental Messages I wanted to restore. I got that unyaffs exe, the 10,000 file fix one, and managed to extract the mmssms.db just fine..
But I soon learnt it seems to be a nightmare to get it back into ICS because the SQLite db is in full-vacuum mode or some such, meaning it is cached and rewritten to help avoid fragmentation or some such. So I overwrite the mmssms.db, set permissions and ownership, reboot, and it's overwritten with the current one. Argh. I tried clearing cache. Tried running SMS backup/restore apps while the 'good' mmssms.db was in place, but they seem to look at the db cache/temp data, not the mmssms.db.
For those facing my situation and want Messages from CWM/nandroid backups in ICS, I found a great tip just posted on one of the threads N-acetyltransferase linked;
RichAP said:
I did this yesterday using Titanium Backup for my SMS/MMS
You need to go into Preferences and check the *Migrate system data [Experimental] option
Then you go to More - Extract from nandroid backup
There it is listed as Dialer Storage
Click to expand...
Click to collapse
I had tried using TiBu to restore Messages from nandroid backup (no success), but Dialer Storage!? How annoying. Anyhoo it's sorted.
Then I quickly found a good alternative recovery and quickly bought the premium version of 4EXT. It's very good, but get this, it actually recovered my latest CWM recovery backup no drama, just like that! Ahh well I didn't need those hours of my life anyway. I've often thought the Desire S's codename Saga is rather apt.
In conclusion, TiBu looks damn good and 4EXT is a ripper. I'd recommend it however the Galaxy S2 support is apparently unconfirmed thus far. Maybe look into it nevertheless.
Thanks for the help dude.

[Q] Best use of Titanium Backup

Hi,
I need to do a factory reset (to see if it solves a problem that Asus could not solve) and in anyway I read it's safer to wipe data before sending to factory for repair.. So I'd like to make a full backup before this wipe and before the sending to repair..
I installed free Titanium backup (my tablet is rooted), but I'm confused on what I should do before doing the reset and the tutorials I found on Titanium even confused me more..(if you're aware of a nice tutoriel, link would be welcome, because I found none very explicit on xda and even on the web..)
-first, should I use the Asus tool for backup or Titanium ?
- Should I perform a full backup of apps only or apps+system ? I read that system restore could create issues in case restore is not done on same firmware, and I don't know with which FW my tablet will come back from repair.. so should I use apps+system anyway, or make 2 backups (apps first then system or vice versa ?) I'd prefer to restore my tablet as clsoe as it is today, even if possible with bluetooth pairs and wifi connections..
-Should I backup manually my personal files (videos ,various docs, pictures,..) before using Titanium ? (for instance to save space and make nbackups smaller?) If yes, how do we know which folders are backuped up by Titanium and which are not ?
- My sdcard is already largely used with only a few GB left. Can I ask Titanium to save directly to a PC ? Or should I use another sdcard (but then, what will happen to apps installed on sdcard ?) ?
Thanks a lot for your hints.
Ricorico94
There are several different options for you to choose from but I will share the way I usually back up my tablet. I flash different ROMs frequently and have had to use backups quite a bit.
I usually use Titanium Backup to backup everything but only restore non-system apps and data. You're right that restoring system data can result in problems if restoring to different ROMs, not necessarily firmware. It depends on how much the firmware has changed. Since there might be big enough changes that it might screw everything up then I'd avoid restoring system apps and data. If your tablet is backed up to Google, it will sometimes keep the WiFi and Bluetooth pairings and restore them once you log back into your Google account. Not always though. Also I'm not sure that the free version of Titanium Backup can save any place other than an SD card. The paid version can save to Dropbox and Google Drive.
If you're sending your tablet in for repair, you should move all of your personal files to your computer or SD card, deleting them off the tablet. At least, that's what I'd do.
There is one more option which would make saving a lot easier and that is if you have a custom recovery installed like TWRP or CWM you can create a Nandroid Backup of everything, System, Data and all. With all your pictures, etc the file would be huge but you could move that to your computer and restore it when your tablet comes back. That would keep an exact copy of your system and replace whatever ASUS does to it with what you currently have. If I wanted to keep my tablet as close to how I set it up, this is what I would do. Of course, your tablet has to be rooted and unlocked to do so.
wrynn7 said:
There are several different options for you to choose from but I will share the way I usually back up my tablet. I flash different ROMs frequently and have had to use backups quite a bit.
I usually use Titanium Backup to backup everything but only restore non-system apps and data. You're right that restoring system data can result in problems if restoring to different ROMs, not necessarily firmware. It depends on how much the firmware has changed. Since there might be big enough changes that it might screw everything up then I'd avoid restoring system apps and data. If your tablet is backed up to Google, it will sometimes keep the WiFi and Bluetooth pairings and restore them once you log back into your Google account. Not always though. Also I'm not sure that the free version of Titanium Backup can save any place other than an SD card. The paid version can save to Dropbox and Google Drive.
If you're sending your tablet in for repair, you should move all of your personal files to your computer or SD card, deleting them off the tablet. At least, that's what I'd do.
There is one more option which would make saving a lot easier and that is if you have a custom recovery installed like TWRP or CWM you can create a Nandroid Backup of everything, System, Data and all. With all your pictures, etc the file would be huge but you could move that to your computer and restore it when your tablet comes back. That would keep an exact copy of your system and replace whatever ASUS does to it with what you currently have. If I wanted to keep my tablet as close to how I set it up, this is what I would do. Of course, your tablet has to be rooted and unlocked to do so.
Click to expand...
Click to collapse
Hi,
Thanks a lot for this advice. Do you know if I can still make 2 separate backups, so that I could use system backup if there's no FW change ?
Regarding the TWRP custom recovery, I understood that since I am already with FW 10.4.4.25 (android 4.1.1) and only rooted, there's no way to install customer recovery. Did I understood properly, or is there a way to downgrade to previous versions first, istall custom and upgrade again back to current FW ?
What do you mean by "tablet backed up to Google" ? I have "save my datas" checked under "backup" menu of parameters, but is there a way to check that there's indeed something in their servers already ?
br,
Ricorico94
You could make as many backups as you wanted. Titanium Backup allows you to restore whatever you want it to so you really only have to make one backup. You can restore everything but the system apps and data or everything. You can even use it to uninstall or freeze what you're not using (as long as it's not an integral part of the FW of course). It's not an all or nothing deal. I would still move all of your personal data to a computer or SD card so nothing happens to it.
My understanding is that installing CWM or TWRP require your device to be unlocked using an app that is provided through the ASUS website. Just being rooted isn't sufficient. If you don't want to unlock your device then you're stuck with using the Titanium Backup method. Just make sure it is saving your apps to an external SD card and not the internal one.
And yes, I was referring to the setting that you already have checked about Google backing up your data. It doesn't always restore everything though so you might have to pair everything again anyway.
ricorico94 said:
Hi,
Thanks a lot for this advice. Do you know if I can still make 2 separate backups, so that I could use system backup if there's no FW change ?
Regarding the TWRP custom recovery, I understood that since I am already with FW 10.4.4.25 (android 4.1.1) and only rooted, there's no way to install customer recovery. Did I understood properly, or is there a way to downgrade to previous versions first, istall custom and upgrade again back to current FW ?
What do you mean by "tablet backed up to Google" ? I have "save my datas" checked under "backup" menu of parameters, but is there a way to check that there's indeed something in their servers already ?
br,
Ricorico94
Click to expand...
Click to collapse
I don't think it is a good idea to install a custom recovery if you are about to send the tablet to Asus - I assume for a warranty repair. You would have to unlock your bootloader and that negates your warranty. So just forgettaboutit.
Google backs up some of your data: Calendar and contacts mainly, but also all the apps you have downloaded or bought from the Play Store.
But it is much faster to restore apps with Titanium instead of downloading them from the Play Store.
So backup apps and data in TiBu and move the backup to your PC.
I don't quite understand why you want to backup system data. It's always potentially disruptive to mess with system data yourself. And you are on a pretty old rom and bootloader - so you're due for an update anyway.
Pictures, videos etc, I would just move to an external drive/card or your PC.
When you got everything backed up, do a Factory Reset. That will wipe your data partition.
Sent from my ASUS Transformer Pad TF700T using Tapatalk 4
Thanks to both of you for your help!
berndblb said:
I don't think it is a good idea to install a custom recovery if you are about to send the tablet to Asus - I assume for a warranty repair. You would have to unlock your bootloader and that negates your warranty. So just forgettaboutit.
Click to expand...
Click to collapse
You're right. I was asking this for future, when tablet comes back from repair: at that time, I might want to have a stronger debug/backup using a custom recovery (at least that's what I understood it's very helpful at): I'm soon at warranty end, so I can wait expiration.
It's a good news that the unlock tool of Asus can still be used to allow installation of custom recovery. I'll need to read more on how to do it, etc.
Thanks again !

Adventures in Android backup

Hi folks,
I've always been annoyed by the lack of a true simple backup option for Android. A recent device failure reminded me of this situation. The purpose of this post is to share my experience, and a solution that seems to work for me.
Google has a built-in backup capability in Android that backs up your contacts (assuming that you keep your contacts with Google), and it'll keep track of what apps you have installed, and it may even back up app settings if the app developer has chosen to opt into that feature. That's a few "if's" already here. Things that will not get backed up for sure are your photos, movies, and anything on your SD card. Also, various customizations, such as home screen layout and even other Android settings don't seem to be restored. Various carriers seem to have their own cloud backup options, but this seems vaguely redundant with some aspects of the Android-level backup, it's not immediately clear if it backs up *everything*, and it may cost extra money every month to have stuff backed up online. No thanks.
So how do you back up your own Android phone? The requirements before proceeding:
Root Access
A custom recovery ROM, such as CWM
Does anybody else find this somewhat ridiculous?
My first venture into backing up into the phone was to go the CIFS route so that stuff could be easily moved off of the phone. (The LG G2 doesn't have an external card). One of the problems with this was that if I didn't unmount the share before leaving the wifi network, some things could behave differently. Back to the drawing board...
First, in order to get as close to a "bare metal" backup, you'll need to make a nandroid backup. And in order to do this, you'll need a recovery rom. There are supposedly apps that do an online nandroid backup, but I've heard that this technique can be problematic at times. The two popular recovery roms are CWM and TWRP. I attempted to load these roms manually, but I'd get an error: "Loki aboot version does not match device". I didn't feel like digging into this much. Some other options, such as ROM Manager said that my phone wasn't supported. In the end I used FreeGee, which can install CWM or TWRP with a single touch.
One other speed bump that I ran into is that at least with the CWM and TWRP versions installed by FreeGee (6.0.4.7, and 2.6.3.3, respectively at this point), If you encrypt your phone, you cannot make a nandroid backup. Really? You have to choose between extra security or having a backup? Android seems to still have a lot of growing up to do. But I digress...
One notable difference that I ran into between TWRP and CWM is that TWRP puts your nandroid backups out in the open on the SD card, while CWM puts them in a protected area. Either technique has a downside. This means that with TWRP backups, a rogue application might be able to access sensitive bits of your phone. With CWM backups, this means that a non-root-enabled application won't be able to access the backups, even if you want it to. We'll run into this later. The other thing I ran into with my LG phone is that backups are dated 1970. Apparently LG doesn't expose time capability to the environment that CWM/TWRP run in. My workaround here is to use ROM Manager to rename the backup accordingly.
Now we've got a nandroid backup, and the next step is to get the data off of the phone. Rsync backup for Android works quite well. The default sdcard backup field used by this app ended up backing up a single symlink to my NAS, so I ended up changing it to back up /storage/emulated/legacy instead, and that works fine. Now with a single click I can sync my photos and anything else that lives on the SD card. And rsync over ssh is quite efficient as well.
Now, how to get the nandroid backups from CWM to rsync. While they're physically on the SD card storage of the phone, they're logically protected and not visible on /sdcard for security reasons. How to we back them up? We need rsync to have root access. I've tried a couple of options to make this happen, either by playing with the command-line options in the rsync android app, as well as by trying to create a wrapper for the rsync binary. No luck with either route. While not as simple, my fallback technique was to run a script to relax the permissions on the directory where the CWM nandroid backups live. And then once I'm done rsyncing them, I run a different script to restore the permissions.
opencwm
#!/system/bin/sh
mount -o rw,remount /
chmod 755 /mnt/shell
mount -o ro,remount /
echo done!
closecwm
#!/system/bin/sh
mount -o rw,remount /
chmod 700 /mnt/shell
mount -o ro,remount /
echo done!
You can use whichever android script runner app you're comfortable with. The (separate) rsync job that I created for CWM backups works on: /mnt/shell/emulated/clockworkmod.
That's about it. What's a sane backup strategy to use for your phone? Once you've got your phone set up mostly how you like, reboot to CWM and create a backup of the OS. Rsync this as described above. As you normally use your phone, rsync the sdcard periodically. If you want to have backups of your apps and system data as well, use something like TitaniumBackup to back them up to the SD card. Encrypt them if you want them to be protected. Now, every time you rsync the SD card, you'll have backups of that app data as well.
So in the end, you'll have a nandroid backup as your "bare metal" backup. I'd only expect you to create these when you do major OS changes. The usual backup will be the normal sdcard rsync job, which functions as an incremental backup. Run this job as frequently as you like. Now if you ever need to restore your phone, go into CWM and restore the backup. Then go restore the SD card contents, and restore the Titanium Backup. You'll obviously need CWM on the new phone (if it was replaced), and if you've cleared the CWM backup off of the phone itself (e.g. due to space constraints) you'll need to copy it back to the phone (or otherwise make it available, e.g. via USB OTG) before proceeding.
I have the same opinion. My set up is Helium.
https://play.google.com/store/apps/details?id=com.koushikdutta.backup
You don't have to be rooted. You do need a PC to give Helium "temp root access" though. If you are rooted this is not required. Essentially it makes a back up of your apps then you can upload these to most of the cloud storage services.
This is not the full solution for settings and customization of the phone etc nor is it the ideal solution. It gives me all my apps, their settings and game saves that I'd be worried about after a factory reset or losing my phone. Google backs up my photos but Helium offers this service too.
Give it a shot, for a simple back up solution it works for me.
forrestgump2000 said:
One notable difference that I ran into between TWRP and CWM is that TWRP puts your nandroid backups out in the open on the SD card, while CWM puts them in a protected area.
Click to expand...
Click to collapse
I've recently switched to TWRP, and it seems that there is an option to encrypt the nandroid backup. So this makes backup easier, as the script to change permissions on the CWM backup location is no longer necessary.
forrestgump2000 said:
I've recently switched to TWRP, and it seems that there is an option to encrypt the nandroid backup. So this makes backup easier, as the script to change permissions on the CWM backup location is no longer necessary.
Click to expand...
Click to collapse
However, the backup is ridiculously slow when encryption is enabled.

[Q] - Best way to backup and restore my phone?

I have a Nexus 6P, rooted. Previous to Marshmallow I used to be able to restore my apps/data/settings pretty easily with Titanium, but now it's a pain. What I want is to be able to perform a clean image install when updates come out, then flash TWRP, install Titanium, restore my stuff, move on. But now it's a headache. If I try to restore any system data (call log, anything) Android starts force closing the associated app/service. Can anyone steer me in the right direction?
Why titanium if you have twrp :/ twrp can backup everything fine, faster and easier. Data, cache partitions thats it.

Need help restoring app data from a backup

A few days ago, I upgraded my Redmi Note 4X from the Android 7 based MIUI 11 to custom MIUI 12 firmware, based on Android 9. Since I wanted to keep all my apps, I first rooted my phone and did a backup with Super Backup & Restore. After installing the new ROM (which was already rooted with Magisk) and installing Super Backup again. For some reason, it deleted all the data from its backup folder on my MicroSD Card. Fortunately, I was able to recover just about everything using some data recovery software on my PC.
For some reason, if I restore the apps using Super Backup, they crash when I open them. This is happening to, after flashing the MIUI 11 firmware again. It also is happening on a different phone.
As an alternative, instead of using Super Backup, I've tried copying and pasting the app data for an app (that has already been installed again on my phone) that Super Backup backed up, to apps folder on my phone's internal storage, replacing the current data there, with the data from by backup. However, when I do that, although what ever file manager I use, says it has successfully pasted the data, the app data on the phone does usually not get overwritten. To give two examples. When I try and replace the database used by the Meizu Notes app, with the database from the backup it does not get replaced. I even tried to do the same with AROMA File Manager with TWRP and it made no difference. Not only does the Notes app not show the data from my backup, but if I open the database file in a file manager, it also does not show that data. I find this to be strange, as I get no errors when pasting the data from my MicroSD Card and choosing to overwrite the existing data.
The second example, is this. I tried to use my old Coc Coc Browser's bookmarks file. After doing so, Coc Coc, had no bookmarks. I then manually added a bookmark to Coc Coc, after which, I tried copying the bookmarks file again. Coc Coc now actually had my old bookmarks and not the one bookmark I just added, which is quite strange, as it the file copy hadn't worked the first time.
I am looking for some way to be able to actually restore the app data from my backup. I've already quite a few hours trying to find a solution, with no luck so far. But I figure, that there must be some way to do it. Based on past experiences, I really should have made backups with two different backup apps, as I know that sometimes restoring backups can be problematic. But due to limited free space on my MicroSD Card, I decided not to. I just wish that there was a decent native backup solution for Android, as I always want all of my app data restored when switching ROMs, or phones and not just the apps themselves.

Categories

Resources