[Q] Copying a TWRP backup to a new device - Galaxy Note 8.0 (Tablet) Q&A, Help & Troubleshooti

I made a TWRP backup after setting my device up, now I want to copy this image to new devices. I made a backup of the wanted config inside TWRP and copied it to a PC. I factory reset the device to restore onto, rooted it, made a TWRP backup of boot only so I have the hashcode folder ready to roll to place the main backup into. Now when I connect the device to my PC and try to copy into this hashcode folder, I get errors like 'folder has been removed' or something, which I expect is to do with permissions. In TWRP in advanced, filesystem management, I apply chmod 777 to the hashcode folder, I still can't copy the backup into that folder from the PC, same message. Ideally I don't want to go through a full setup of the new device in order to install root explorer and change permissions etc., I have 8 of these units and want to make the process painless, not a multi-hour job.
Sooo, is there a process via TWRP whereby I can make the backup hashcode folder writeable from the PC so I can simply copy my backup across to the new device and proceed with the restore? If I must use ADB I can probably live with that, just if someone can help me out with a set of commands that can 'make it so'. Ideally I just want to change settings in TWRP with the "right" commands, reboot it and copy my backup across, before rebooting back into TWRP and running the restore.
I'm doing this so I can quickly setup a standard configuration for some specific software we use, replicate that across to units, have people access the apps via a restricted profile, then after field use, be able to return the unit back to a standard config via a TWRP restore using the minimum number of steps.

The way I got it working was to copy the backup folder to a temporary location on the new device from the PC, then move it to TWRP's backup folder using the TWRP file management tools.

Related

[Q] What are you using to backup your roms?

My HD2 can use clockworkmod from the bootloader to create a backup of sys & boot. Even windows had sprite backup to make a image of the rom.....so what do tilt users have to backup their rom so they can get back to a good copy of it or try a new rom without losing everything?
famewolf said:
My HD2 can use clockworkmod from the bootloader to create a backup of sys & boot. Even windows had sprite backup to make a image of the rom.....so what do tilt users have to backup their rom so they can get back to a good copy of it or try a new rom without losing everything?
Click to expand...
Click to collapse
You can backup data from within install menu(dont remember how its properly called)
And system well if you have a flashed image on sd card than there is no point to back it up.
-Arturo- said:
You can backup data from within install menu(dont remember how its properly called)
And system well if you have a flashed image on sd card than there is no point to back it up.
Click to expand...
Click to collapse
Some of us change our system as well such as custom kernels, customized framework's and additional tweaks to files such as the build.conf etc we'd rather not have to keep doing over.
famewolf said:
Some of us change our system as well such as custom kernels, customized framework's and additional tweaks to files such as the build.conf etc we'd rather not have to keep doing over.
Click to expand...
Click to collapse
Well the thing with system is that after you flash it ..it stays in the memory card then you can move it(back it up) to your computer and change it accordingly. So for example you have changed the framework in the system on your phone.... you can do the same with the backed up system on computer and it will take you not more then 15 seconds. You just open it with 7zip and the world is yours you can pretty much do whatever you want with it remove/add files replace them and so on....and that is all the files and folders in the system image. If you have ever removed/replaced/added files to a simple rar archive then you pretty much know how easy it is to edit a rom on your computer.
backing up your kaiser
Android is just Linux so you can do almost anything you can do in Linux if you can get to the shell. I use a program called Terminal Emulator from a guy called jackpal that I got from the Market. It will give you a command prompt so you can perform any Linux commands you like and if you type su it will act as super user and give you a # prompt.
I also went as far as writing my own userinit.sh that runs each time I boot and copies files from my data partition on NAND to the SD card. I just copy the /data/data, /data/app, /data/local, and /data/system folders to a folder named backup on the root of the SD card. The script also moves the previous backup to a folder called backup.old and if backup.old already exists it deletes it first.
This way if my phone reboots and data is corrupt I can use Root Explorer to copy the files in either backup or backup.old on my SD card back to NAND and my phone is restored.
You can also us the backup routines that are in the menu that comes up when you press the DPAD during the boot process but that backs up the entire data partition to the tune of 256MB and if there is corruption it really doesn't do much good.
As a side note you can mount the file created by the backup on any linux box using the mount command and a loop device. Once mounted you can just copy files that you need out and transfer them back to your phone using the SD card.

[Q] TWRP folder with backups with large question mark (invisible)

The strangest thing happened on my wifi Nexus 7 2013. I'm running Android 5.0 (Lollipop), unlocked and rooted (using Nexus Root Toolkit), with TWRP.
TWRP was working just fine until yesterday. afternoon. I ran a backup around noon and everything was fine. I could access and manage the backup folder under 'TWRP' from Root Explorer, ES File Explorer, and my computer (through USB cable). Copying, etc., all was working fine.
Then, later in the afternoon, I did another build and things are different. The backup completed just fine, but after rebooting I can't see the backup folder from my computer or Root Explorer, so I can't copy it to my computer or a OTG flash drive. I see it in ES File Explorer, but its icon has a big question mark and when I tap it to open the folder, I get an "Open As" dialog. I can't remove the folder (is it still a folder?), or rather the removal doesn't 'stick'; in other words, the folder keeps coming back. The only way I can remove the backup is from the File Manager within TWRP itself. All backups after the one I did yesterday afternoon now behave that same way now. They're taking up a lot of unusable space like this.
It's the strangest thing. I actually ended up going back to stock and root again, just to see if that makes a difference. But what's really odd now is the TWRP folder itself now has the question mark. So this behavior persists even with completely starting fresh.
Does anyone have any idea what's going on here? I *believe*, but I'm not entirely sure, that TWRP was updated from 2.8.0.x to 2.8.1 between these backups. Could it have something to do with that? How do I copy the backup folder to my computer or a flash drive for safekeeping outside of my Nexus?
Thanks!
Ron
I'm having this same issue right now. I need to restore from a backup but I am unable to access the twrp folder as it is corrupted or something. Reflashed stock 5.0 and the issue persists. Nexus 5 though.
Okay I fixed the issue, this is what I did.
- Wiped everything in twrp
- Flashed factory 4.4.4 image
- Flashed previous version of twrp
- The folder was now normal, so I added my old backup to it
- Restored from backup and all is good.
If I had to guess, it looks like a lollipop issue. I also had problems with recovery changing back to stock when lollipop was installed. I'm sticking to my perfect 4.4.4 setup or now.
I just replaced TWRP with ClockworkMod recovery, and I'm seeing the exact same thing there! The ClockworkMod folder has a big question mark and is essentially inaccessible. I wonder if this is a Lollipop issue.
--Ron
I *think* I resolved the problem (thanks to this post in the Nexus 5 forum):
Open a terminal emulator application and enter the following two-line command (press enter after each line):
Code:
su
restorecon -FR /data/media/0
After doing that and rebooting, the TWRP and ClockworkMod folders seem normal again and I can access them, and the backups in them, as normal.
--Ron
I think it is a lollipop issue. It doesn't seem to like custom recovery. My folder stopped working after trying to transfer a backup to it from my computer. I also had to flash twrp twice or more because it would keep reverting to stock recovery after reboot.

Downgrade and restore from other Bullhead

Hi all,
I have my 5x back from repair and a want to restore from my old trwp backup. What roadmap do i need to follow?
The phone has a new serialnummer so i expect the board is replaced.
I know how to unlock and install twrp.
Twrp backup is from 7.1.2. New phone is on 8.1.
Possible steps:
1. Unlock bootloader
2. Install factory image 7.1.2
3. Install twrp
4. Push twrp backup from pc to nexus
5. What partitions to restore?
@Rexylian: if you want to step up to Oreo (recommendable imo), you shouldn't restore Nougat-stuff. So this may be the moment.
Otherwise choose the factory-image which matches to your backup, and restore (boot&)data&system.
@rp158: Thank for the quick replay.
I copied the twrp backup to my phone. (adb push)
Booted into twrp but i can see the folder in trwp but cant select any partition to restore....
What i'm doing wrong?
NP: I found it already: different serialnumber
twrp looks for a folder named after the serialnumber.
Renaming the folder to the correct serialnumber works....
@Rexylian: Move your backup to /sdcard. Make any dummy backup to let TWRP create its favourite folder. Move your backup there. Then you should see and be able to choose the dummy and your real backup (the folder names) in TWRP.
@rp158: thanks for your replies. It's up and running now! So happy
The only bump i had was to remove the old password files via twrp...
The reason i downgraded to 7.1.2 was that i could not get safetynet to pass on the latest oreo..

Best way to do a full backup (and restore it)?

Hi, on my previous phones I used TWRP to create full backups of my phone. My A2 lite is rooted with Magisk and I decided to keep the stock recovery to simplify OTA updates (also there is no official TWRP build available supporting encryption). The phone is already setup completely and I don't want to start all over again so formatting is not an option. Still I want to be able to create a full backup in case something goes wrong or the phone gets damaged. Is there a way to do this or do I have to continue with SD and TB backups? Thanks in advance.
nice q >>>waiting for an answer ???
I used Titanium Backup before. But now I'm using Migrate for backups.
My backup is TB and rsync of /sdcard to a server at home (automated overnight).
I never bothered getting anything else setup. I try not to brick my devices
I did have to restore a few times when I first got the phone, until I figures out how to recover from Magisk/xposed errors without factory reset.
i prefer Titanium Backup method with batch file to backup folders i need from phone memory to PC. of course i backup Titanium Backup folder too,
minimal adb&fastboot package is installed (portable) so i can perform below backup:
backup.bat
these example lines inside
adb pull /storage/emulated/0/DCIM
adb pull /storage/emulated/0/Download
adb pull /storage/emulated/0/Pictures
...

xiaomi mi a2 lite how to take full backup with TWRP or any other method

hello
as title is showing i want to take to take full backup with TWRP or any other method and restore whenever i want it if something happens
like
rom with data for example contains
installed apps,contacts,photos...etc
thanks
I don't have TWRP so I backup my data using Migrate.
owais16 said:
hello
as title is showing i want to take to take full backup with TWRP or any other method and restore whenever i want it if something happens
like
rom with data for example contains
installed apps,contacts,photos...etc
thanks
Click to expand...
Click to collapse
Google back-up is integrated on the phone and does a great job.
Stores app list + app data to be restored on a later date.
Sync contacts, calling lists and messages in your cloud.
Photos are getting stored in the cloud also, you just need to make sure you selected the right settings in the Photos app.
I have a paid subscription to Google for just 10 euros per month and I have 60gb of storage on their cloud, more than I need, and all the data from the phone is going there. If for some reason I change even brands, my data will migrate to the new device without any worries.
Also, with TWRP is pretty damn straight forward. Get TWRP, click back-up, select storage for the back-up and wait. You can select what partitions you want to back-up and that's it. But note that, this back-up is only for your device and that's about it. Also installing TWRP tampers with your system and may affect OTAs.
I use a combination of titanium backup and rsync for off-device backup of apps and data. Very custom. It's not complete but it's close enough for me. Takes about an hour to put everything back when I break the phone.
Because of the encryption, you can't do a 'nandroid' (raw) backup of the data partition and restore it later. You'll need some extra partitions for the encryption keys, and that's assuming there isn't an on-SoC flash chip involved.
I suspect it would be feasible to just tarball the decrypted data partition and restore that afterwards, though that would be a bit non-trivial to restore.
Complete RAW Storage Backup/Restore using TWRP & ADB
EDIT: Apologies, confirmed as per @a1291762 above that it complains about encryption after restoring the backup image, even if encryption was turned off before backing up.
You can do a raw dump of the entire storage, but the output file will be the total size of your storage (e.g. 32GB - which you could zip on your PC to save space).
You can also then restore that raw image back to the phone. I've confirmed this works with my older Redmi 2. Haven't yet confirmed the restore process on my Mi A2 Lite, but it does back up fine.
Connect phone to PC with USB and reboot to bootloader
Boot into TWRP using "fastboot boot [twrp-xxxx.img]" (e.g. "fastboot boot twrp-3.3.1-dees_troy-daisy.img")
Confirm phone is available in recovery mode using "adb devices" command (it'll show serial # and "recovery")
[To Back Up] Type in "adb pull /dev/block/mmcblk0 backup.img"
[To Restore] Type in "adb push backup.img /dev/block/mmcblk0"
Reboot to System from TWRP menu
I suggest running your CMD window (or Minimal ADB and Fastboot) as Admin to avoid write issues to that folder.
The backup image (backup.img) can be opened/extracted with 7zip, as well as some contained partition images.

Categories

Resources