Backing Up to External SD Using TWRP Command Line and No Display - General Questions and Answers

I've spent the last couple days searching around to fix this problem, not only on XDA and Google, but in TWRP's Issues and code on GitHub; all to no avail. So here it is:
I have a device with a broken display. The only way I can initiate commands on it are with the power, volume, and home buttons, and with adb. I've installed TWRP on it, and I'm able to boot into it. I'm trying to back up everything on the device I can to a 32GB external SD card in the device's SD card slot. But when I keep getting the following result:
Code:
~ # twrp backup SDBOM
Setting backup options:
System
Data
Boot
Compression is on
Digest Generation is off
Updating partition details...
...done
* Total number of partitions to back up: 3
* Total size of all data: 7976MB
* Available space: 496MB
Not enough free space on storage.
Backup Failed
Done processing script file
The External SD Card has more than enough space for the backup (several times over, in fact), so clearly TWRP is attempting to save the backup to the device's internal storage. It seems, from testing I've done on an identical device with a working display, that twrp backup in the command line saves to the Storage last selected in the graphical version, but since my device's display is broken I can't select the External SD Card as the storage for the backup.
Since I have no display, I also can't do adb backup --twrp, since that requires confirmation on the screen.
Is there any way to select the storage for twrp backup fully through the terminal? For example, is there an environment variable I can set, or something I can pass twrp backup?
I figure this is an easy one to answer, and that it's something really, obviously, simple (so much so that I'll have to hang my head and never show my face here again!). But for the life of me, I can't find it.

Same thing here. In my case I have a working display but my kernel does not allow any touchscreen operations when in recovery so I can see TWRP but not input anything. So the command line is my only way to use TWRP but like you I cannot switch to creating backups to my external SD card.
It seems funny there is no solution to this since having touch screen problems with TWRP seems to be a common issue so how do all those folks with no touch recoveries do their backups?

check to which folder mount yours external SD
and set var "tw_storage_path" with "twrp set"
example "twrp set tw_storage_path /external_sd"
you can find this var in android_bootable_recovery/openrecoveryscript.cpp
also
you can change backup folder
example "twrp set tw_backups_folder /external_sd/all"
can find it in android_bootable_recovery/variables.h

OrBitRo said:
check to which folder mount yours external SD
and set var "tw_storage_path" with "twrp set"
example "twrp set tw_storage_path /external_sd"
you can find this var in android_bootable_recovery/openrecoveryscript.cpp
also
you can change backup folder
example "twrp set tw_backups_folder /external_sd/all"
can find it in android_bootable_recovery/variables.h
Click to expand...
Click to collapse
Hello and thank you very much for helping on this issue.
I gave up on this long ago but it is still of great interest to me since I am still using the same phone and TWRP backup would be welcome. But since so much time has passed since I unpacked the recovery, I am a bit rusty at it. I am an old programmer but my android knowledge is limited, still I did succeed to make the sdcard visible to the recovery (cant remember how but I think I changed its block name in recovery.fstab then for some other reason also had to un-repack) so I can handle such things if I am guided a bit.
So your help is very welcome and also reignited my interest to solve this issue. Problem is I cannot find the "android_bootable_recovery/openrecoveryscript.cpp" script in the unpacked recovery or the phone's file system. I am sure I am missing something silly but googling around did not help me either.
Could you possibly guide me into finding those scripts so I can edit the aforementioned variables?
Thank you very much for your attention and help.
Chris.

cfrantzol said:
(cant remember how but I think I changed its block name in recovery.fstab then for some other reason also had to un-repack) so I can handle such things if I am guided a bit.
Click to expand...
Click to collapse
Nice hack too!
cfrantzol said:
Problem is I cannot find the "android_bootable_recovery/openrecoveryscript.cpp" script in the unpacked recovery or the phone's file system. I am sure I am missing something silly but googling around did not help me either.
Could you possibly guide me into finding those scripts so I can edit the aforementioned variables?
Thank you very much for your attention and help.
Chris.
Click to expand...
Click to collapse
I find it (i have same problem like yours after 6 hours mess in adb and googling ) in sources of twrp on github github.com/omnirom/android_bootable_recovery
And also about factory reset (to whom it may concern) github.com/omnirom/android_bootable_recovery/issues/146

OrBitRo said:
Nice hack too!
I find it (i have same problem like yours after 6 hours mess in adb and googling ) in sources of twrp on github github.com/omnirom/android_bootable_recovery
And also about factory reset (to whom it may concern) github.com/omnirom/android_bootable_recovery/issues/146
Click to expand...
Click to collapse
Hi again.
Okay now I understand, I will download from there and check what I can come up with. I already feel that this will involve some compiling and I wonder how that is going to affect my custom TWRP (which I found at twrp builder). I will step into it and see.
Thanks a lot for your prompt help, I really appreciate.

cfrantzol said:
I already feel that this will involve some compiling and
Click to expand...
Click to collapse
Sorry if i misunderstand you but why compiling? You dont need it. You can change this vars from adb terminal. Boot device into TWRP connect USB to PC run adb shell and you can change vars in shell via commands like this: 'twrp set tw_storage_path /external_sd' and so on.

OrBitRo said:
Sorry if i misunderstand you but why compiling? You dont need it. You can change this vars from adb terminal. Boot device into TWRP connect USB to PC run adb shell and you can change vars in shell via commands like this: 'twrp set tw_storage_path /external_sd' and so on.
Click to expand...
Click to collapse
Oops, I thought I had to change the variable in the source files and then compile the recovery from scratch. This is now great news I will check it tonight.
Thank you again!
EDIT: For anyone who has the same problem I confirm that I checked it and the method above works fine! Kudos to you OrBitRo!

Related

Nandroid Problems

Sorry for creating a new thread, but I have searched and worked at this problem for hours and can't find a solution. I have a myTouch 3G running the latest Cyanogen ROM, the latest Amon_RA recover image, and the Engineering 2010 SPL. This phone is a replacement and I had done a Nandroid backup on the old one before sending it back. Oddly enough, it would not let me do a BART backup, saying there was an unknown error and I should do it from a computer. Since there is not Apps to SD, I figured Nandroid would be good.
Now my problem is restoring it, if I try to restore it from the recovery image, it says "Error : run 'nandroid-mobile.sh restore' via adb!" Does anyone know why the recover will not run a BART backup or Nandroid restore without me doing it via the computer? Both of these functions work fine on my G1. At first, I thought it might be the SPL as I read of problems with the stock SPL not writing in fastboot mode. I actually tried to do the Nandroid restore via fastboot, but kept getting an error there. When researching that error, I saw that it was a result of the "Perfect SPL" so I changed it to the engineering SPL. I had a thought that this might be why the recovery would not complete these functions, but the problem persists.
I decided to follow the directions and loaded up my adb shell to try it that way. When following the directions on Cyanogen's website, I was unable to even mount my SD card, getting this error: "Mounting on sdcard failed: Device or resource busy". I then tried the 'nandroid-mobile.sh restore' function, but got this message: "nandroid-mobile.sh not found". It seems nothing works as it should, and I can't figure out why, especially since they all work fine on my G1. Any help is greatly appreciated. Thanks.
Edit: I just tried doing it via fastboot again following these directions: http://code.google.com/p/android-roms/wiki/NANDROID_Fastboot
It worked well, until I got to the UserData section when it said "FAILED <remote: data length is too large>"
you may get that error when using bart if you do not have an ext partition. check make sure you have properly formatted your sd card, fat32 and ext2/3/4.
r u on adb shell mode? while on the recovery mode?
ensure that everything has been wipe~
i also face the same problem while restore it.. but.. it work when using adb..
its very simple..
I do not have an EXT partition as I do not need apps to SD. If you're saying I can't do a BART backup without one, that's fine. Any ideas as to why the Nandroid restore won't work?
@moosunk What do you mean by ADB shell mode? I am using the Windows Command Prompt and have typed "ADB Shell." I am able to navigate through all the normal ADB shell commands I'm used to (ie ls, cd, etc), but it doesn't find the restore option. I did try wiping right before doing the restore in the recovery mode. To get to ADB shell, I had to let the phone boot as I don't see any option in my recover image to access the phone via ADB, but if there is a way, please let me know. Thanks.
jimbo831 said:
I do not have an EXT partition as I do not need apps to SD. If you're saying I can't do a BART backup without one, that's fine. Any ideas as to why the Nandroid restore won't work?
@moosunk What do you mean by ADB shell mode? I am using the Windows Command Prompt and have typed "ADB Shell." I am able to navigate through all the normal ADB shell commands I'm used to (ie ls, cd, etc), but it doesn't find the restore option. I did try wiping right before doing the restore in the recovery mode. To get to ADB shell, I had to let the phone boot as I don't see any option in my recover image to access the phone via ADB, but if there is a way, please let me know. Thanks.
Click to expand...
Click to collapse
ahaa.. u face the same problem with me..
nandroid from adb doesnt recognize any of the default backup that have been created...
u need to key in manually, when u do a nandroid recovery on your phone, there have specific file name base on date,
what i do is, just use the file name as a string to search the backup..
use this location also on adb..
/sdcard/nandroid/HT95YKF08716/BCDMRS-20091210-0806
this is mine, i dont know what is yours.. but u can check it by yourself i think..
I get that error message when using Amon_ra's recovery but when I reboot all of my information is there.
decepticon said:
I get that error message when using Amon_ra's recovery but when I reboot all of my information is there.
Click to expand...
Click to collapse
Hmm, it doesn't seem to do anything on mine. I only get one little status dot before I get the message and it takes less than a second, so I don't think it's copying anything.
Regarding typing out the string in ADB, I have tried that, but the problem seems to be that the nandroid script isn't recognized by my phone since it says "android-mobile.sh not found." If I understand that message correctly, it's saying it is not finding the script it needs to run the nandroid restore. Do I have to CD to a certain directory first or something, and shouldn't this script be built into my Cyanogen ROM?
and what if you try to restore it with an older recovery image? this problem has surfaced with the latest releases, I think (it gave me that error on the last restore too but the backup was restored)
ID?
I am getting the same error. It started to happen right after (test)flashing a Motoblur Rom. My wild guess is that flashing this ROM has changed some ID (maybe of the SD CARD) leading to a missmatch error and failure to reflash the backup. However, at this point only a wild guess. As it is possible to access the SD card from PC via new Recovery, it does not worry me too much (read backup from Recovery to Desktop, switch to Fastboot, flash the .img's). But I agree it is a pain in the ....
For all the "why" questions : Check /tmp/recovery.log right after you have an issue to see what is going wrong!!! I even added an extra menu option to move the log to your sd card so you can view it more easily....
feicher said:
I am getting the same error. It started to happen right after (test)flashing a Motoblur Rom. My wild guess is that flashing this ROM has changed some ID (maybe of the SD CARD) leading to a missmatch error and failure to reflash the backup. However, at this point only a wild guess. As it is possible to access the SD card from PC via new Recovery, it does not worry me too much (read backup from Recovery to Desktop, switch to Fastboot, flash the .img's). But I agree it is a pain in the ....
Click to expand...
Click to collapse
I finally gave in and tried that, but it didn't work either. When I was doing this, I got this error message when flashing the data.img: "FAILED <remote: data length is too large>"
This is just getting more and more frustrating. I finally figured out how to use ADB with the phone in recover mode and access the nandroid-mobile.sh commands and that is not working either. It finds the backup and the nandroid.md5 file, but then says "Error: no backups found" when I try to use it or any of the three I have. It says the nandroid.md5 is not found, even though it shows that file in the path. I can't do this using adb shell, fastboot, or the recovery menu like every guide I have found on the internet says, and I can't figure out why it doesn't work. I highly doubt the backups are corrupted as I have 3 seperate backups and none of them are working. However, I have been able to read these backups off the SD card using windows and even flash all the files via Fastboot (except the most important data.img since it says it's too large for no apparent reason). Please somebody help, I am about to jump over a cliff.
Try the following :
Run the following in adb and note down the serial number :
Code:
cat /proc/cmdline | sed "s/.*serialno=//" | cut -d" " -f1
Rename the nandroid backup directory on your sdcard to the serialnumber you just noted down
/sdcard/nandroid/NEW-SERIAL/BCDMRS-20091210-0806
Run nandroid restore from the recovery menu and choose the new serialnumber ID and then the backup to restore.
Amon_RA said:
Run the following in adb and note down the serial number :
Code:
cat /proc/cmdline | sed "s/.*serialno=//" | cut -d" " -f1
Rename the nandroid backup directory on your sdcard to the serialnumber you just noted down
/sdcard/nandroid/NEW-SERIAL/BCDMRS-20091210-0806
Run nandroid restore from the recovery menu and choose the new serialnumber ID and then the backup to restore.
Click to expand...
Click to collapse
Thank you, I will try that when my wife gets home today. I sure hope it works, but I wonder why it wouldn't work without changing it. When I swapped my G1, the recovery found the old backup regardless of the serial number change, but that is definitely something I hadn't thought to try. <Fingers Crossed>
Edit: Thanks so much, it worked perfectly!!! You sir deserve a Redbull!
I was having this same problem, I figured it out I couldn't do a nandroid backup because I didn't have enough room on my sd card, easily solved. but bart still wouldn't work, in my search of solutions to my problem it was NguyenHuu post about the ext partition, so did a repair ext through the recovery and everything is working.
Hope this helps someone.

[GUIDE] Internal Memory Data / Deleted Files Recovery

This is the same tutorial written by Wartickler at this link. Thanks for his efforts, his work is appreciated.
Here we bring minor changes to the tutorial for those of you who are facing problems accomplishing the procedures.
The Problem
Internal Memory doesn't mount as a drive like external memory does. External memory would allow you to use data recovery tools that scan for deleted files and return them to a usable state. These tools work because most operating systems don't go through and set all of those 1's and 0's to just 0's when you delete a file. Usually the operating system will just delete the reference pointer in the index that says that a file exists with such-and-such name and it's located at this position on the hard disk / memory location. There are destructive delete tools out there that will overwrite the spot of a deleted file multiple times to discourage recovery in just this manner. The issue is that data recovery tools need an actual mounted drive in order to dig deep and unearth those funny pictures of cats you so tragically deleted by accident. These newest batches of phones don't have external SDcards which are super easy to mount as drives. Internal memory mounts as MTP/PTP which is not treated as a mounted drive and cannot be scanned by these data recovery tools. But still there is a hope.....
The Process
My phone is the Samsung Galaxy s4 (GT-I9500) though I imagine this should work for ANY phone with Internal Memory. We will be using a Windows 7 machine to:
back up the entire internal memory partition to your computer as a single, massive .RAW file,
convert the .RAW file output to a VHD,
mount the VHD as a disk in Disk Manager,
scan the attached VHD volume for files that have been deleted and recover them,
The Requirements
A rooted Android phone, (try to root with a non-destructive method as this appears to protect those who must root from wiping the device data a second time),
BusyBox installed on your device,
Cygwin installed to [c:\cygwin] with pv and util-linux from the repo (at the package selection screen search for pv then util-linux and click on Default to change it to Install). Make sure to open Cygwin once to make sure that the /bin folder is created. Also, I made a folder at [c:\cygwin\samsung] to put the exported .RAW file,
Netcat (download the ZIP file and extract nc.exe to [c:\cygwin\bin]),
ADB - You can use minimal adb and fastboot which is 2MB only. Attached, find the link at the bottom of this post. (make sure adb.exe is in your path. Path is in System Properties -> Advances -> Environment Variables -> System variables -> Path and add to the end: ";C:\Program Files\Android\sdk\platform-tools" or where ever you placed your adb.exe),
USB Debugging enabled on your device,
VHD tool from the mighty M$. Put the VhdTool.exe file in [c:\cygwin\samsung],
Piriform Recuva or your favorite data recovery tool, (it appears Recuva only finds the more common file types like images, videos, etc. Those were the file types in which I was interested. If you are after more exotic file types perhaps you might share the software you used.)
A calm sense of peace and serenity that you will get your files back... :fingers-crossed:
The Work
*****Based on the number of people having trouble with this step it is now my recommendation that you choose to recover your entire memory block instead of just the data partition. In my phone's case that is mmcblk0. Please discover if yours is different.
[*]*****For identifying which block/partition you want to recover, install DiskInfo from Playstore. Open the app and click on Data (USERDATA) to see the partition name for yours. For our purpose here we are seeking to recover the userdata partition: /dev/block/mmcblk0p21
Turn on your phone
Connect the phone in ADB mode
Unlock the screen.
Open a Cygwin terminal and enter (This assumes your BusyBox installation is at [/system/bin/busybox]. It may be at [/system/xbin/busybox]):
*Remember to enter codes line-by-line. After you enter su, you have to grant permission on your mobile phone at the same time
Code:
adb forward tcp:5555 tcp:5555
adb shell
su
/system/bin/busybox nc -l -p 5555 -e /system/bin/busybox dd if=/dev/block/mmcblk0p21
Open another Cygwin terminal and enter:
Code:
adb forward tcp:5555 tcp:5555
cd /samsung
nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p21.raw
[*]Depending on the size of partition it may take a while to backup.
We need to convert the .RAW file to a virtual hard drive. VhdTool.exe basically just puts a VHD footer on the end of the .RAW file. Open a Windows command prompt, go to [c:\cygwin\samsung], and type:
Code:
VhdTool.exe /convert mmcblk0p21.raw
Now we need to mount the VHD in Windows. Select the Start button-->right-click Computer-->select Manage.
Select Storage-->Disk Management.
In the menu select Action-->Attach VHD.
For Location enter [c:\cygwin\samsung\mmcblk0p21.raw] and select the OK button.
Right-click on the name (e.g. "Disk 1") to the left of the Unallocated space and select Initialize Disk.
Select the GPT (GUID Partition Table) radio button and select the OK button.
Right-click on the Unallocated space and select New Simple Volume...
In the Wizard select Next>, leave the default for the volume size, select Next>, select a drive letter (e.g. K), select Next>, MAKE SURE to select the 'Do not format this volume' radio button, select Next>, select Finish.
A box will pop up asking you to format the drive. You DO NOT want to format the drive at this time.
Right-click on the RAW space and select Format... MAKE SURE to change the File system to FAT32. Set the Allocation unit size dropdown to 'Default.' MAKE SURE that the Perform a quick format checkbox is CHECKED. You do not want to overwrite the entire new drive with all zeroes (0's) and destroy your data. Quick Format means that it will only attempt to destroy the index for the drive by establishing a new index. Without this box checked the Windows operating system will write zeroes (0's) across the entire volume, potentially destroying your data. Select the OK button.
A box will pop up saying that Formatting this volume will erase all data on it. That would be doubly true if you actually didn't check the 'Perform a quick format' checkbox. Double check that you actually did check the box and select the OK button. (Don't worry. This essentially leaves the volume in the exact same state that your phone's internal memory is living in right now: there is data on the drive...you just can't see it. It's coming back, I promise!)
Open the Piriform Recuva application. In the wizard select the 'Next >' button. Select the 'Other' radio button and select Next >. Select the 'In a specific location' radio button and enter: k:\ (assuming K is the drive letter you chose...) Select the Next > button. Select the Enable Deep Scan checkbox. This is the magical setting that finds files that have been deleted...but not really deleted. Select the Start button.
The application may take about an hour to do the 'Deep Scan.' It's time for more laps around the house! Once the application has returned its results you can choose which files to recover using the checkboxes. Select the 'Recover...' button and choose the location to which you wish to output your files.
?
Profit! :victory:
Good Luck :good:
help
M S T F said:
This is the same tutorial written by Wartickler at this link. Thanks for his efforts, his work is appreciated.
Here we bring minor changes to the tutorial for those of you who are facing problems accomplishing the procedures.
Good Luck :good:
Click to expand...
Click to collapse
You should add that the x86 version of Cygwin is needed, not the x64.
Do you also know that as of Android 4.3 this method doesn't work anymore?
yes
Lennyz1988 said:
Do you also know that as of Android 4.3 this method doesn't work anymore?
Click to expand...
Click to collapse
it works with 4.4.x and 5.1.1, it probably also works with 4.3. it's just an adb command after all.
Filoppi said:
it works with 4.4.x and 5.1.1, it probably also works with 4.3. it's just an adb command after all.
Click to expand...
Click to collapse
No its not that. As of Android 4.3 Google enabled Trim on our decives. That means when you delete a file its really gone. Not even a professional company can get it back.
I have tried the above methode and I could not get any data back. Thats when I started reading about Google enabling Trim and found out its impossible to get it back.
Did you try it on Android 4.3+?
try
Lennyz1988 said:
Do you also know that as of Android 4.3 this method doesn't work anymore?
Click to expand...
Click to collapse
Lennyz1988 said:
No its not that. As of Android 4.3 Google enabled Trim on our devices. That means when you delete a file its really gone. Not even a professional company can get it back.
I have tried the above method and I could not get any data back. Thats when I started reading about Google enabling Trim and found out its impossible to get it back.
Did you try it on Android 4.3+?
Click to expand...
Click to collapse
I have tried on my previous Samsung galaxy s3 (i9300) and my one plus one, both 64gb, i got at least 20% of the pictures back (.png, .jpg, ...), possibly even 50% since i had no idea how many i had on the device, some zip, most of .pdf and .doc and some other random stuff.
In both cases i did not manually delete the files from the phone, instead, i screwed up the partitions by deleting some system file, so after restarting, the SDcard/used data partition was empty.
i noticed though that even if my phone only had 500mb of free space available, the .raw partitions i extracted with this method were mostly empty, they only had about 10% of the data, so i guess some happened when android restarted, maybe yeah, some kind of trimming.
i think its worth trying anyway. just remember to not open any program or copy any file in the memory, as it would lower the chances to get anything back.
Filoppi said:
I have tried on my previous Samsung galaxy s3 (i9300) and my one plus one, both 64gb, i got at least 20% of the pictures back (.png, .jpg, ...), possibly even 50% since i had no idea how many i had on the device, some zip, most of .pdf and .doc and some other random stuff.
In both cases i did not manually delete the files from the phone, instead, i screwed up the partitions by deleting some system file, so after restarting, the SDcard/used data partition was empty.
i noticed though that even if my phone only had 500mb of free space available, the .raw partitions i extracted with this method were mostly empty, they only had about 10% of the data, so i guess some happened when android restarted, maybe yeah, some kind of trimming.
i think its worth trying anyway. just remember to not open any program or copy any file in the memory, as it would lower the chances to get anything back.
Click to expand...
Click to collapse
Yes but that's something different I think. Then you never deleted the files, they were there but not accessible.
If you look for example in the last 10 pages of the main thread, then no one is able to recover anything. Because it's simple not possible anymore. That's just how Trim works.
Lennyz1988 said:
Yes but that's something different I think. Then you never deleted the files, they were there but not accessible.
If you look for example in the last 10 pages of the main thread, then no one is able to recover anything. Because it's simple not possible anymore. That's just how Trim works.
Click to expand...
Click to collapse
I'm sorry for your loss.
Filoppi said:
I'm sorry for your loss.
Click to expand...
Click to collapse
What kind of response is that?
gonna try.
for those of u who want to know the blocks and partitions to recover the user data..
ls -l /dev/block/platform/*/by-name
after the adb shell will list them
127.0.0.1 5555 | pv -i 0.5 > mmcblk0p16.raw 0 B 0:00:02 [ 0 B/s]
i stuck at step 7 which is
0 B/s transfer rate
GoGopowerRanger said:
i stuck at step 7 which is
0 B/s transfer rate
Click to expand...
Click to collapse
That su is the most important part of command, if you miss it adb will not be able to transfer any data
M S T F said:
That su is the most important part of command, if you miss it adb will not be able to transfer any data
Click to expand...
Click to collapse
You should be honest with people. You should put in the op that it will only work on Android versions below 4.3. People are just getting false hope and wasting their time.
This method does NOT work anymore.
Lennyz1988 said:
You should be honest with people. You should put in the op that it will only work on Android versions below 4.3. People are just getting false hope and wasting their time.
This method does NOT work anymore.
Click to expand...
Click to collapse
This is not my method nor I have, my self said that 100% you will get what you have deleted. I have only brought minor changes to the tutorial for the sake of successful transfer of data to the pc.
Now if you feel responsible for the feeling of people, definitely I will appreciate if you find another way.
M S T F said:
This is not my method nor I have, my self said that 100% you will get what you have deleted. I have only brought minor changes to the tutorial for the sake of successful transfer of data to the pc.
Now if you feel responsible for the feeling of people, definitely I will appreciate if you find another way.
Click to expand...
Click to collapse
That's the thing. You just copy paste a tutorial that does not work. Why would you do that? I can imagine that you did not know that it would not work anymore. But now you do know. What do you hope to achieve? Raising your thanks meter? You give people false hope and you waste their time.
And about me finding another way....There is not even a professional company that can do it. It's impossible at the moment.
Lennyz1988 said:
That's the thing. You just copy paste a tutorial that does not work. Why would you do that? I can imagine that you did not know that it would not work anymore. But now you do know. What do you hope to achieve? Raising your thanks meter? You give people false hope and you waste their time.
And about me finding another way....There is not even a professional company that can do it. It's impossible at the moment.
Click to expand...
Click to collapse
I don't need thanks... why I should do.... it doesnt give me anything... I have got my own forum with its nice members.... if someone is in need of thanks, thats is you which is trying to show himself as a defender of others feeling, time, blah blah.......
I have recovered my file on a 4.4.2 android after a system crash which I had to reset the phone. if someone is in desperate need of something s/he will try anything and as far as I know trying this one doesn't harm anyone.
for you I have a recommendation, go and drink something cold and calm down!!!
Errr...
Awesome....the raw extraction worked on my S6 running Android 5.0.2. This time I tried it on a Mac and used Homebrew to install PV. Is there a way to get the entire image, even with the unused space?
Great
Thank you!
Worked on my sm-g900f
If you get nc/pv command not found , try this:
When you open cygwin terminal, start with this line: export PATH="/cygdrive/c/cygwin/bin";$PATH
The terminal should now know the location of them.
Same if you get that "adb: command not found" just type: export PATH=/cygdrive/c/XXXXX";$PATH
Just replace that XXXXX= to your location of adb.exe.
Hope it helps someone out of this ****

Cant delete backups / Memory Full

Hi, Im new to this device but right after I got it I did the right thing and voided my warranty Rooted and installed a custom recovery. The recovery has been a bit of a pain but that is a story for another thread.
The problem I am having is that when I try to take a backup from recovery it errors (I forget the error, sorry. ) however the backup is still right there in the backup directory. I tried a second attempt at a backup (to see if it would error again) and these two backups filled my remaining memory. lI of course used my file explorer to delete these extraneous backups-- only to see that they are not deletable. I also tried on the PC. The folder lists read and write in the permissions. I am kind of at a loss as to what to do. IIRC correctly from a while back with this issue the answer lies somewhere in CHMOD, but I cant quite seem figure it out. CD to the directory in a terminal emulator and then CHMOD 777? Thanks for your help in advance.
knoober said:
Hi, Im new to this device but right after I got it I did the right thing and voided my warranty Rooted and installed a custom recovery. The recovery has been a bit of a pain but that is a story for another thread.
The problem I am having is that when I try to take a backup from recovery it errors (I forget the error, sorry. ) however the backup is still right there in the backup directory. I tried a second attempt at a backup (to see if it would error again) and these two backups filled my remaining memory. lI of course used my file explorer to delete these extraneous backups-- only to see that they are not deletable. I also tried on the PC. The folder lists read and write in the permissions. I am kind of at a loss as to what to do. IIRC correctly from a while back with this issue the answer lies somewhere in CHMOD, but I cant quite seem figure it out. CD to the directory in a terminal emulator and then CHMOD 777? Thanks for your help in advance.
Click to expand...
Click to collapse
If you are using TWRP, It is not possible to delete twrp backup images using normal ways. Either you can install esfile explorer and navigate to device/data/media/0/twrp/backups/ and delete from there. Or use file manager in TWRP to delete the backups. I think there is also another option in twrp to view or delete backups.
Sent from my Moto G using Tapatalk 2
Ill check out the other things you said, but Im actually getting this problem in ESfile... Ill report back if I can get at it through the recovery.
Edit: ESfile works. I followed the path you laid out ad got there just fine I didnt realize Id have to take such a roundabout path. Thank you.

[HOW TO] Fully Backup & Restore Android Device

NOTE:
I'm not a developer or something even near to that. I'm a newbie and will be, seems so. All information provided here is copied and compiled from different internet sources. This information is according to best of my knowledge and comprehension and is just for curious souls like me who want to understand things in quite simple words.
I have tested this on different devices. I'll not be responsible for any harm to you or your device. It works perfectly for me. You may try it on your own risk.
Encrypted memory may cause problem in backing up and restoring data. So better decrypt it before proceeding. Or the Recovery should support decryption of /data partition.
WHY YOU NEED TO BACKUP YOUR DATA
For security, in case if device is lost. Read here more about the risks.
If you are going to change your device.
If your device is running out of memory space.
If your device is slowing down or giving random errors and you want a clean start i.e. by factory data reset.
If you are upgrading your Factory Firmware or ROM (OS).
If you are a curious soul like me and interested in experimenting with device.
WHAT TO BACKUP
Backup is a broad term used in many contexts.
PERSONAL DATA
On an android device, backing up personal data like pictures, music, videos, documents, e-books etc. means backing up Internal Memory (/data/media/) and SD card (if you use one). If you have disabled internal memory (D.I.M), your SD Card would be working as Internal Memory.
Personal data might be created by apps (like Camera, Facebook, WhatsApp etc) or imported from internet or other devices by yourself.
APPS & APPS DATA
If you are upgrading your ROM permanently, you might be interested in backing up your apps and their data as well. So that you don't lose important data and don't have to install apps again. System apps are stored in different folders under /system/ while user apps under /data/.
Apps typically store their data in /data/data/ but it's not a rule. Many apps save / backup their data on Internal Memory and/or SD Card as well. That's why you see folders named 'Android', 'data' etc. on Internal Memory and SD Card. Also, there are numerous folders named after app names. These folders may contain Personal Data as well, created by that certain app.
Contacts and messages are also stored in their default apps' data folder i.e. in /data/data/ and are not usually backed up manually.
OPERATING SYSTEM & APPS & APPS DATA
If you are going to install new ROM temporarily, you may want a complete backup so that you don't have to go through the hassle of installing apps and setting up / personalizing your device again. It usually includes /system, /boot and /data partitions.
OS consists of SYSTEM and BOOT. While user apps & apps data is stored in DATA.
PARTITION IMAGES
From a developer's perspective, one may want to backup the whole device partitions, in case if something goes wrong during experimenting.
Read here more about android partitions.
WHERE TO BACKUP
INTERNAL MEMORY (/sdcard) (/storage/sdcard0) (/data/media/0)
This memory can be used to save data if you are not going to wipe / clean it. A Factory Data Reset usually doesn't wipe this but it can. It depends on the device. Similarly, Recoveries usually don't wipe internal memory but you can manually do so. However, formatting /data would certainly erase internal memory. Formatting might be a part of flashable zip if you are going to install new ROM. Flashing Factory Firmware using flasher will also erase internal memory.
EXTERNAL SD CARD (/external_sd) (/storage/sdcard1)
This is a more safer place to save / backup data because it is not wiped unless done manually or accidentally.
PERSONAL COMPUTER (USB Flash drive or Internal / External Hard Disk)
This is the safest place to keep data with abundant space and the least chances of losing / corrupting data.
ONLINE / CLOUD STORAGE
Some apps, including Google offer backing up your data online and auto-synchronizes it. You should certainly avail this option particularly for sensitive and light weight data like contacts, messages, documents, saved passwords, bookmarks, financial transactions etc. WhatsApp also has a good online backup option. You can use apps like Drive, SMS Backup & Restore, FolderSync, KeepSafe etc. to better utilize this option. But technically, this is a limited option.
HOW TO BACKUP
FILE EXPLORER APPS
You can use a file explorer like ES Explorer or Solid Explorer to manually copy files from, say, Internal Memory to SD Card to back it up.
BACKUP APPS
Some default apps have built-in feature to backup data and settings locally and online e.g. GO-SMS, Tasker etc. You can check apps for this feature.
Also, special backup apps like Titanium Backup can backup almost all of your user and system apps and their data. It can also backup contacts, messages, device settings etc. It can create a flashable zip of backed up data to flash through recovery. However, backups from one ROM may not fully work with other ROM's.
CUSTOM RECOVERY
Backing up data when ROM is running isn't safe. When files are being used by OS, they might not be written / read sometimes. So, a custom recovery is the best option to backup/restore data. Custom recoveries (TWRP/CWM) can backup / restore partitions SYSTEM, BOOT and DATA (excluding internal memory) for sure. Some new recoveries offer backing up more (or all) partitions on device. You can choose where to save backup files i.e. Internal Memory or SD Card. Then you can transfer these files to PC as well.
You can also use recovery's File Explorer to copy Internal Memory to SD Card. However, it's a slower process if you have a large number of files to backup.
PC
You can use PC in multiple ways to backup/restore data within device or from/to PC.
First of all, you will often come across different software advertised on net claiming to fully backup your device when connected to PC. They work but are not much useful / reliable according to my experience. Give them a try, if you want to.
Secondly, you can use USB cable to directly connect your device (as MTP in ROM or recovery) to PC or use apps like Wi-Fi File Transfer to wirelessly connect (in ROM) and then explore Internal Memory and SD Card. FTP or SFTP (SSH) server may also be setup on Android to remotely access it from PC if both are on same network.
Thirdly, you can mount SD Card as flash drive (UMS in ROM) or switch off your device, remove SD Card and then insert directly into PC through card reader to manually copy files. This method is faster, to copy large data. However, mounting as UMS in running ROM isn't recommended, particularly if you are using D.I.M. It will crash apps.
In Android 5+ UMS may not be available in USB settings as it has been deprecated in favor of MTP to avoid problems. However, to copy large data from internal SD card is really problematic without direct USB connection. Or what if we need to recover accidentally deleted data from internal memory? We can directly attach internal memory (as in UMS) to PC by a little hacking.
Fourthly and ultimately, like a boss , you can use life saving ADB feature of android to backup/restore your data as well as recovering your device from difficult situations and doing a lot of stuff. It's the best and fastest method to backup Internal Memory to SD Card and then restore (COPY WHOLE FOLDER (within device)). Or you can COPY WHOLE FOLDER (From/To PC) or COPY WHOLE PARTITION IMAGE (within device) or BACKUP / RESTORE APPS & DATA (From/To PC) in seconds.
Read here more about android partitions.
Another application that you can use to backup your phone to computer is Apowersoft Phone Manager. This works greatly in managing your devices plus it make sure that all your files are secured from being corrupted or loss.
doublematteo said:
Another application that you can use to backup your phone to computer is Apowersoft Phone Manager. This works greatly in managing your devices plus it make sure that all your files are secured from being corrupted or loss.
Click to expand...
Click to collapse
I can't determine the efficiency of the Apowersoft tool, but if you want to backup data , this is right way , after the phone data is backuped ,you don't have to worry about the deleted data unable be recovered back ,
The backup files is the best way to recover deleted data from phone
Kindly guide me on restoring app data alone from a nandroid to newer version of an app..
The scenario is that ,I upgraded to a higher android OS but find some of my apps(with no cloud storage),restored from my nandroid ,crashing; probably prompted by the change in OS.
I downloaded the compatible version of the app from playstore,but am clueless how to sync restored app data from nandroid to this version.
DIGVIJAY24 said:
Kindly guide me on restoring app data alone from a nandroid to newer version of an app..
The scenario is that ,I upgraded to a higher android OS but find some of my apps(with no cloud storage),restored from my nandroid ,crashing; probably prompted by the change in OS.
I downloaded the compatible version of the app from playstore,but am clueless how to sync restored app data from nandroid to this version.
Click to expand...
Click to collapse
Would you please mention apps names? Don't uninstall previous version. Just install compatible version over it. It should automatically have previous app data.
The backup program is much simpler than the android recovery program,
I came here looking for the best way to back up my internal storage before activities like flashing a new ROM or firmware. Previously, I'd plug my phone into my PC and just drag and drop the internal storage partition to a folder on my computer, but I'd often have to do it a few times because some file would get hung up, or the phone would randomly disconnect (even though my phone, cables, and computer are all new and high quality).
I'm currently using the TWRP file explorer to copy /sdcard to /external-sd/!InternalBackup, but there is no running log or progress indicator... So, this approach is less than ideal.
I'm still looking for the best method (not necessarily a software that will do it for me) that will do it fast, not get interrupted, and provide good feedback on if it's working and how much longer it will take. (The TWRP method above checks the first 2 criteria, but the 3rd is woefully insufficient.
I'm thinking that the best way to back up the internal SD will be in recovery, otherwise something might be in use and will halt the process.
Any suggestions?
DrPhant0m said:
I came here looking for the best way to back up my internal storage before activities like flashing a new ROM or firmware. Previously, I'd plug my phone into my PC and just drag and drop the internal storage partition to a folder on my computer, but I'd often have to do it a few times because some file would get hung up, or the phone would randomly disconnect (even though my phone, cables, and computer are all new and high quality).
I'm currently using the TWRP file explorer to copy /sdcard to /external-sd/!InternalBackup, but there is no running log or progress indicator... So, this approach is less than ideal.
I'm still looking for the best method (not necessarily a software that will do it for me) that will do it fast, not get interrupted, and provide good feedback on if it's working and how much longer it will take. (The TWRP method above checks the first 2 criteria, but the 3rd is woefully insufficient.
I'm thinking that the best way to back up the internal SD will be in recovery, otherwise something might be in use and will halt the process.
Any suggestions?
Click to expand...
Click to collapse
Commandline solutions are always best. You have better control over them. Use TWRP built-in terminal to run commands.
Simply 'cp' with verbose option "-v" is what fulfills your needs. 'rsync' is better if you want to save time by automatically skipping unchanged existing files. If you want to preserve file attributes and permissions, use 'tar'. Added compression can be achieved by 'xz' or '7za'. All of these commands are stable solutions, with high speed and ability to handle/resume broken/interrupted operations.
TWRP comes with busybox bundled. Busybox utilities have limited functionality and mostly suffice the need but rarely we face unexpected behavior. Instead you can use full static binaries of these commands.
Typing lengthy commands in TWRP shell terminal is somewhat challenging. Either use 'adb shell' or for repeated use, create a shell script and place it in internal memory or SD card. Or you can unpack TWRP image and save script in /sbin directly to run it just as a normal command. Another easy way is to create a flashable zip of your script. This way you can also see progress bar moving if you write a proper script for it.
Hope it helped.
mirfatif said:
Commandline solutions are always best. You have better control over them. Use TWRP built-in terminal to run commands.
Simply 'cp' with verbose option "-v" is what fulfills your needs. 'rsync' is better if you want to save time by automatically skipping unchanged existing files. If you want to preserve file attributes and permissions, use 'tar'. Added compression can be achieved by 'xz' or '7za'. All of these commands are stable solutions, with high speed and ability to handle/resume broken/interrupted operations.
TWRP comes with busybox bundled. Busybox utilities have limited functionality and mostly suffice the need but rarely we face unexpected behavior. Instead you can use full static binaries of these commands.
Typing lengthy commands in TWRP shell terminal is somewhat challenging. Either use 'adb shell' or for repeated use, create a shell script and place it in internal memory or SD card. Or you can unpack TWRP image and save script in /sbin directly to run it just as a normal command. Another easy way is to create a flashable zip of your script. This way you can also see progress bar moving if you write a proper script for it.
Hope it helped.
Click to expand...
Click to collapse
That's a lot of help... But I lack the basic understanding and experience to make use of it all. I'll have to Google it a bit and look at some examples. Thanks!
UPDATE: I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
Code:
sh: rsync: not found
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Any help?
Thanks!
DrPhant0m said:
I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Click to expand...
Click to collapse
'cp -r' copies recursively i.e. files/directories under directories and so on. So it's definitely required if you want to copy directories. 'cp -v' shows each file which is being copied, but not the progress during a single file copying. Check 'cp --help' for options.
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
Code:
sh: rsync: not found
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
Click to expand...
Click to collapse
TWRP uses busybox which doesn't have rsync built-in. You can get a copy of static (independently working) rsync binary from many sources like this. Aarch64 will be a bit faster. Check 'getrpop | grep ro.product.cpu' to find your CPU architecture if it's 64-bit or 32. When in TWRP, place binary in /sbin directory. Then do 'chmod 0777 /sbin/rsync' to make it executable. Now you can use rsync. 'rsync --help' will show you options and basic help. Do note, /sbin is on volatile filesystem i.e. it will be gone on reboot. Don't expect it to be permanently there. You can also use rsync from other locations like sd card but that will need to call binary with full path and filesystem may put restrictions on execution.
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Click to expand...
Click to collapse
It's expected. When we do 'su' on Termux, it's environment is gone and PATH is set to /system/bin etc. So any binaries which Termux downloaded to /data/data/com.termux/files/usr/bin won't work. There are better options, but easiest is to use 'tsu' instead of 'su' on Termux. It will handle things for you to run Termux binaries in superuser mode. Do 'apt install tsu' when connected to internet. Once installed, simply execute 'tsu'. Now you can use Termux rsync binary.
Or use rsync static bianry instead as explained above. Copy rsync to /system/bin/ or /system/xbin/ etc. and set permissions. SELinux may interfere if it's set to "Enforcing". Do 'getenforce' to check and 'setenforce 0' to set it "Permissive".
DrPhant0m said:
That's a lot of help... But I lack the basic understanding and experience to make use of it all. I'll have to Google it a bit and look at some examples. Thanks!
UPDATE: I did a little research, and I succeeded in using "cp" to do a test move in TWRP (I had to use -r and -v), but even using -v didn't create a progress bar or any indication that files were being moved. It just finished and went to the next new line. Is this expected?
Also... my version of TWRP doesn't seem to have rsync available. When I try to use rsync in TWRP, I get
So it seems that TWRP's terminal doesn't have rsync. I'm using TWRP 3.0.2-1
So... I'm currently using the Termux app to do the cp operation. I'd prefer to use rsync, which is supported in Termux, however, unless I do "su" first, it says it doesn't have access to the destination folder. And, when I use "su" I can't use rsync. I get pretty much the same message as when I try to use it in TWRP... something like "rsync not found"
Does this mean that when Termux is using root, it can't use rsync? Does that make sense?
Any help?
Thanks!
Click to expand...
Click to collapse
This reply is probably a bit late for you, but...
If you install tsu (pkg install tsu) in TermUX and use tsu rather than su, it'll work.
Tsu sets up the runtime context for su properly.
Sent from my OnePlus3T using XDA Labs
BillGoss said:
This reply is probably a bit late for you, but...
If you install tsu (pkg install tsu) in TermUX and use tsu rather than su, it'll work.
Tsu sets up the runtime context for su properly.
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
Hey, it's never too late to refine your backup strategy. Thanks for letting me know.
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
Code:
$ [B]pkg install tsu[/B]
[COLOR="Gray"][I]~~
~~[LOTS OF LINES DETAILING THE INSTALLATION OF TSU]~~
~~[/I][/COLOR]
Setting up tsu (1.1)...
$ [B]su[/B]
elsa:/data/data/com.termux/files/home # [B]rsync[/B]
sh: rsync: not found
127|elsa:/data/data/com.termux/files/home #
*** Though I did enjoy watching the movie with my son, I did not pick the name Elsa for my device. That's just what LG called the carrier-free V20, Model US996.
Am I doing something wrong? To be clear.. I just did "rsync" without any commands/switches to see if it would produce the help info. I knew it wouldn't actually attempt to copy anything.
DrPhant0m said:
Hey, it's never too late to refine your backup strategy. Thanks for letting me know.
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
*** Though I did enjoy watching the movie with my son, I did not pick the name Elsa for my device. That's just what LG called the carrier-free V20, Model US996.
Am I doing something wrong? To be clear.. I just did "rsync" without any commands/switches to see if it would produce the help info. I knew it wouldn't actually attempt to copy anything.
Click to expand...
Click to collapse
Lol! You missed the key point: use tsu instead of su.
Instead of typing "su", type "tsu".
But don't take it too hard - I did the same thing when I first started.
Sent from my OnePlus3T using XDA Labs
Got it. Worked just fine. Thanks!
DrPhant0m said:
I installed tsu in Termux, and when it finished, I tried to use rsync with su, and got the same "rsync: not found" error. Please see the following output, with my entries in Bold[/B].
Click to expand...
Click to collapse
I mentioned to use 'tsu' instead of 'su' but probably you missed that.
mirfatif said:
When we do 'su' on Termux, it's environment is gone and PATH is set to /system/bin etc. So any binaries which Termux downloaded to /data/data/com.termux/files/usr/bin won't work. There are better options, but easiest is to use 'tsu' instead of 'su' on Termux. It will handle things for you to run Termux binaries in superuser mode. Do 'apt install tsu' when connected to internet. Once installed, simply execute 'tsu'. Now you can use Termux rsync binary.
Click to expand...
Click to collapse
/data/data/com.termux/files/bin/tsu is just a wrapper i.e. a shell script that sets environment variables for Termux and then executes 'su'.
mirfatif said:
I mentioned to use 'tsu' instead of 'su' but probably you missed that.
/data/data/com.termux/files/bin/tsu is just a wrapper i.e. a shell script that sets environment variables for Termux and then executes 'su'.
Click to expand...
Click to collapse
I see it now. I gave a thanks, though admittedly late. Sorry!
Is backup feasible when sd external card has been mounted extending the internal storage (Android 6.0), working as internal storage as well?
Can some expert comment on this, just not to go crazy for nothing. I don't want to upgrade with last rom by manufacturer and lose my data.
I have ADB , fastboot and usb drivers, but trying and use Helium backup I was unable to pair, even though the phone is connected (I can select onscreen for instance PTP or usb storage, tried both, nothing).
Not even sure about nandroid backup also.
HeyRicardo said:
Is backup feasible when sd external card has been mounted extending the internal storage (Android 6.0), working as internal storage as well?
Can some expert comment on this, just not to go crazy for nothing. I don't want to upgrade with last rom by manufacturer and lose my data.
I have ADB , fastboot and usb drivers, but trying and use Helium backup I was unable to pair, even though the phone is connected (I can select onscreen for instance PTP or usb storage, tried both, nothing).
Not even sure about nandroid backup also.
Click to expand...
Click to collapse
Yes it's feasible but depends on what, how and where you want to backup.
mirfatif said:
Yes it's feasible but depends on what, how and where you want to backup.
Click to expand...
Click to collapse
Any solution is fine to me, I just want to be able to restore apps and launcher (Nova launcher prime) with icons arranged as they are, without having to start all over from scratch.
Other data are on the cloud, so if I can possibly backup some folder (from phone or sd card, if the difference matter in my case) good, or I'll take care of it in advance.
Just having the phone upgraded but not reset from the beginning.
If necessary I can try rooting it. Thx for replying.
how to use a twrp data backup for oder rom?

Backup problems and questions

Hi, first of all, thank you for reading me.
I think i messed up big time.
I had Havoc OS 4.1 installed since more than a year and it was kinda messy e.g. the sim card card wasnt recognized anymore so wasnt able to make calls because i played to much in the settings.
Having some stupid but incredibly addictive games on this smartphone i decided to keep it like this and since i'm a complete n00bs and being afraid of security risk of rooting my device i never rooted it.
Big mistake.
So, recently, one games needed an update (like they all do at least once a week) and since i'm anti-google/f***book (no comment please) i nvever saved my progress in the cloud and "that" game required absolutely an update.
I installed the update from an alternative apk source and , (applause if you want and laugh), it screwed up the game.
Now the nightmare begin.
Since the device isnt rooted i made a backup of /data partition. Gone crazy and before i might explode in an uncontrollable fury and madness i used LMSA to rescue the phone. And myself, lol.
Now i have stock android and i am googled to the bone. My butt hurts. My head too.
THE (first) simple question is : how can i restore this backup because i have the error 255?
Notes and observations; logically i would say because the device is back with stock rom and doesnt have the same os/rom installed and/or the partition and whatever is not the same wich may explain the error 255.
SECOND QUESTION: can i extract/uncompress this backup and take the precious data wich is my games progresses and restore it somehow?
I know i have to give as much information possible but i dont what else to give. If you need logs, or everything else just say it nicely and i will give it to you with immense pleasure.
Oh yeah, model : XT2113-2 5g Kiev RETCA 128gb a/b type and maybe was crypted before because twrp asked me the password to make backup or else.
Thank you in advance and i really hope somebody would help, if not i just loosed 1.5 years of stupid gaming because i messed up like an idiot. (A lesson well learned, the hard way...)
Thank you so much for not answering this simple question.
Kerplunk83 said:
Thank you so much for not answering this simple question.
Click to expand...
Click to collapse
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
Finally a sign of life from someone here.
Thank you sd_shadow
sd_shadow said:
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
Click to expand...
Click to collapse
These precious brief and concise 2 lines of a simple answer is immensely welcomed.
Wich point me to reply that to my knowledge i interpret it as a security chip with big chances that its in relation to the knox technology.
It also point me to ask WHY, if i cant back up because of that, why/how is it possible to install a custom rom or gsi (sorry i still dont make the difference because i dont understand it) on this very protected smartphone?
That must explain why i had problems trying to root it and fail each time.
Finally i think that i should use another device for android gaming since i dont want to depend on f***book and google.
Thanks again sd_shadow. Even if it was a very simple answer it enlightens me alot.
Note: sorry for my bad english.
Kerplunk83 said:
how can i restore this backup because i have the error 255?
Click to expand...
Click to collapse
This error code means that at some point your backup of /data could not be extracted further. But for more detailed infos you must provide a recovery.log which will be generated when doing a backup of e.g. /boot.
>>> Please DO NOT copy+paste it here!! <<<​Rename it (recovery.log > recovery.log.txt) to be able to upload it within "Attach files".
Kerplunk83 said:
can i extract/uncompress this backup and take the precious data wich is my games progresses and restore it somehow?
Click to expand...
Click to collapse
Yes, use Titanium Backup (TB). Although it's very outdated it still features a restore of single apps out of a TWRP backup. Here's how you do it:
1. IMPORTANT: TB will only search for TWRP backup files on internal storage!! Use the default path created by TWRP, e.g.: /sdcard/TWRP/BACKUPS/ZY322V8K28/2023-04-08--06-53-20/
2. Install and open Titanium Backup.
3. In the upper right corner tap
MENU > scroll down to "Extract from Nandroid backup" > choose your backup folder
##############
Notes:
- Usually a TWRP backup of /data consists of several parts (data.ext4.win000, ~win001, ~win002 etc). TB requires all of them (or at least those ones with the /data/data/ path inside).
- If you are facing this error message:
Could not find any data in this TWRP backup
then your TWRP backup is compressed with gzip. To decompress it you must rename the file
data.ext4.win001 > data.ext4.win001.gz
and extract it with any archiver tool, e.g.:
- ZArchiver (Android)
- 7zip (Windows)
- Problems finding any TWRP backup data with Titanium Backup? Then please check your path!! (see above section)
Good luck!!
Thank you very much WoKoschekk i'll do it as soon i'll have the time for since i'm working today.
Thank you so much again, i'll keep you posted with logs and such.
I'm sorry i didnt gave news since, i'm not doing very well.
there's those 2 question i still have in my head;
1-With all the instructions you gave me is it worthy to continue because when i did the backup i wasnt rooted?
2- i'm sure i read many time to use Titanium Backup (wich is a paid app?) i have to be rooted or have root access.
Ultimately, how can i be rooted if there's a chip preventing me to do so?
I'll keep you posted when i'll be of better health, thank you.
Kerplunk83 said:
-With all the instructions you gave me is it worthy to continue because when i did the backup i wasnt rooted?
Click to expand...
Click to collapse
TWRP backup = *.tar archive
TB unpacks the needed app's data and nothing else. You must be rooted to have access on /data for restoring your apps. But for the backup process it doesn't matter if you were rooted. Root is part of your boot.img.
Kerplunk83 said:
2- i'm sure i read many time to use Titanium Backup (wich is a paid app?) i have to be rooted or have root access.
Click to expand...
Click to collapse
TB is for free. But a paid version unlocks additional features (not related to the TWRP restoring feature).
And yes... root is mandatory for TB. As I said before you must have r/w access on /data/*.
Kerplunk83 said:
if there's a chip preventing me to do so?
Click to expand...
Click to collapse
Which chip?? You already have root access via TWRP. Magisk is only needed in system and just a patched boot.img (custom kernel).
Get well soon!
WoKoschekk thank you for this insanely fast reply.
All those answers and infos have now a gigantic value for me, if only i knew that before.
To describe a bit more my situation i slept only few hours since 5 days, vomiting, heavy coughs and fever.
I'm sure i'm not supposed to but i will anyway, i engage myself and promise to reward you (in particular) and others for the help you're bringing me. It wont be much but very important to me.
I'll go try to get (again) some rest. Just before i go, why was there a mention about my device;
"
The problem is it's a Motorola with a Qualcomm chip.
If you find a solution I would love to see it.
"
I dont ask you (WoKoschekk) or other to explain in the most explicit and endless details of what is exactly this "chip" and all the history that goes with it cause i dont want to be a pain but just why it was mentionned. Only, why?, it has ben mentionned.
I cant wait to get better since i finally see possibilities to get back those files.
Have a nice week-end and thanks again.
@Kerplunk83 To reveal the mystery behind "the chip": Motorola released two variants (Snapdragon/Mediatek CPU) of this model. Since the CPU largely determines the system structure, building a functional TWRP for both of them is very challenging. It seems that TWRP for the SD's variant got some bugs while the MT's variant runs more smooth. Due to this fact the error 255 is caused by something that you weren't be able to fix.
Regarding your problem: To restore an app and its specific app data you need the proper permissions to write in /data/data and /data/app. For this permissions you either need TWRP or Magisk installed. TWRP seems to be unable to write in that specific directory. On the other hand you don't want to install Magisk. I'm sorry but with this setup your problem can't be fixed.
Just out of curiosity, could you provide me a recovery.log showing error 255 during the restore process?
Please DO NOT copy/paste the whole log and post it here!! Instead of this you should rename the file (recovery.log => recovery.txt) because a file called *.log isn't allowed for upload. But a *.txt file is.
Options to create a recovery.log:
1. adb pull /tmp/recovery.log
=> copies a recovery.log into your ADB/fastboot folder
2. Do a backup of sth. like "boot" because the backup process will create a recovery.log by default
3. TWRP mainscreen > advanced > create log (kernel log isn't needed here)
=> log is stored on the default storage (internal or external) that you have choosen for backups etc.

Categories

Resources