[Q] Question about Nandroid MD5 checksum and modifying backed up files..... - Android Q&A, Help & Troubleshooting

Hey guys, just 2 quick questions about nandroid.
Is it possible to either bypass the MD5 checksum right at the start of every nandroid restore? OR, is it possible to generate your own one somehow?
The reason I ask is, I wanna try and replace the backed up files made by nandroid such as "boot.img", "system.img", "cache.img", "recovery.img" etc with the ones that I have extracted from a stock rom.
The stock rom I have can only be flashed through USB connected to PC, by using "SP Flash Tool". However, I have 2 problems using it. The first is that it doesn't work properly for me. I can only flash the "system.img" file but not the other .img files. It seems I need a USB-to-UART cable to flash ALL the .img files, which I don't have and I don't plan on wasting my money buying it either. Besides, I find flashing on a PC a lot more risky than from memory card.
The 2nd problem I have is that I often have problems getting my phone detected by "SP Flash Tool". I tried using Windows 7 and XP and it's hard to get a connection properly. It's most likely because the phone i'm using a chinese clone, called "STAR A1000". It's cheap and crap, so I'm not surprised that I can't establish a stable connection to my PC. I only got lucky like once or twice but haven't been able to flash from my PC ever since.
So anyway, the stock rom I have contains all the .img files. I wanna try and replace those files with the files generated by nandroid, but of course there's the problem with the MD5 checksum file that will check if the file matches or not. So I need a way to bypass the MD5 checksum completely or force nandroid to perform a restore regardless of the conditions. Either that, or I need a way to generate a MD5 checksum for the .img files from the stock rom, and use that for my nandroid backup.
My last question is, I also have custom roms that are made to be flashed on the memory card. Of course, they contain the "boot.img" file, and so I wanna try and replace that with my own working "boot.img" file. I want to know if this will work when I try to flash it in the recovery, or will it fail and brick my phone?

Related

Already a MD5 mismatch-cant restore stock backup

just rooted my evo3d, everything went great and i even git CWM to install the first time correctly. heres where i think i went wrong-
i downloaded rom manager and i attempted to use it and it worked great. to me it seemed like it worked because i was able to choose my phone and even flashed the CWM over the original one i had. i made a backup of my stock rom and tried a rom from the dev forum, didnt like it and tried to switch back and got the MD5 mismatch error when i tried to restore my stock rom. now, i thought i would try to flash the original CWM which was blue over the CWM(orange) and then attempted to get the rom to restore. that was also a fail. what can i do? i read that installing busy box could effect this? any help would be appreciated.
sucks but it happens download the RUU from here and reroot if you need too
FIXING MD5 MISMATCH
adb shell
# cd /sdcard/clockworkmod/backup/name_of_backup
# rm nandroid.md5
# md5sum *img > nandroid.md5
gaaah i dont have ADB installed on my mac. is there not a simpler way? anyway to fix this?! i dont think i need to reroot honestly..
Nope sorry.
I may have found a way to fix the MD5 issue.
Well, it worked for mine.
I saved a backup of the stock ROM before I installed the needle kernel.
it was named 2011-08-01-23.53.47
The I saved another backup of the ROM with the needle kernel/
it was named 2011-08-02-19.06.28 w/ needlekernel
What happened was that on the sd card the backup folder was named 2011-08-02-19.06.28 w/ then inside that folder was another folder named needlekernel . And that folder contained the backup files.
It seems that putting the space in the name caused it to create another folder within the backup folder instead of just having the backup files in there. I kept getting the MD5 mismatch when I tried to restore that backup.
So I took the files out of the needlekernel folder and put them in the 2011-08-02-19.06.28 w/ folder. I then deleted the needlekernel folder. The last thing was to take the (space)w/ off of the end of the folder name so it was just as the program named it to begin with.. 2011-08-02-19.06.28
After doing that I was able to restore the backup through ROM Manager. So apparently it's best not to add anything to the backup name when saving it.
One other thing I'll mention. When I restored the backup with the needle kernel in it it put the stock kernel back in the ROM.
Hope this helps anyone with the MD5 issue.

Restore file fails checksum verification...

I recently tried a new ROM and made a Rom Manager recovery restore file prior to changing. Things didn't work out as well as I had hoped and when attempting to restore, it fails at the checking MD5 sum process.
Any way to work around this? I really would like to restore to the previous ROM without starting over.
Anybody? I am not quite sure how the restore file can be created on this phone and then not pass verification?
Any ideas or am I stuck starting over?
sandiegopaneraiguy said:
Anybody? I am not quite sure how the restore file can be created on this phone and then not pass verification?
Any ideas or am I stuck starting over?
Click to expand...
Click to collapse
depending on the type of file format used to backup, the restoring could be done manually but a changed md5sum generally means the files are not the same as the original. this could result in corruption and generally it isnt recommended to restore corrupted files as you run the risk of nothing working.
if you're still wanting to proceeding with attempting to restore files which are different than the original and could be corrupted, off the top of my head, you can probably dd the .img files back and untar the .tar files back.
i would suggest starting over and perhaps copying the backup files over to your desktop instead of only leaving on the sdard. this should help ensure at least one of the copies maintains their integrity.
hope that helps!
You can boot into recovery, and run nandroid via adb shell command line, no md5 checksum file needed. Now if the image is bad, you of course get bad results, but if the checksum is just hosed for some reason, it will work fine.
Put the .win files for the partitions you want to restore in /sdacrd
then issue the command "tar xvpf /sdcard/data.win" or "tar xvpf /sdcard/system.win" from the adb shell while in /data or /system respectively. .win files are what TWRP creates for backups.
I had this happen with TWRP 1.01 or 1.02 once on a good backup that passed the checksum tests when I backed it up.
I was testing the reliability of the TWRP package's nandroid and first one failed.
Once I moved to the newer version, I've not had that issue.

Corrupt nandroid backup - how do I delete a single file from the system.ext4.tar?

Today I wanted to see what the JellyBean for SGS III is like so I made a nandroid backup of my current setup. After playing with JB for a while, I wanted to restore the backup, but I was greeted with an error message.
I've been messing with this the entire F****** day and so far I've isolated the file that is corrupted (it's /system/app/Keystring_factory.apk).
So I need to delete that file from within the archive. The problem is how do I do that? When I try to copy the file to my computer, it hangs on it and says "corrupted file" (tried windows explorer but also total commander). I am able to open the archive on my SGS III using something like ZArchiver, but it doesn't have the option to delete the file from within the archive.
Help?
Deusdies said:
Today I wanted to see what the JellyBean for SGS III is like so I made a nandroid backup of my current setup. After playing with JB for a while, I wanted to restore the backup, but I was greeted with an error message.
I've been messing with this the entire F****** day and so far I've isolated the file that is corrupted (it's /system/app/Keystring_factory.apk).
So I need to delete that file from within the archive. The problem is how do I do that? When I try to copy the file to my computer, it hangs on it and says "corrupted file" (tried windows explorer but also total commander). I am able to open the archive on my SGS III using something like ZArchiver, but it doesn't have the option to delete the file from within the archive.
Help?
Click to expand...
Click to collapse
U can extract cwm with titanium backup or use a file explorer to extract the backup and delete the file then zip it.
But I would flash a new Rom and extract cwm with TB and restore the parts u need with TB.then when all is good make a new backup.
I don't think it's a good idea to restore a corrupted file even if u find the errors
Btw. Fayaab has tweeted that he is going to release a JB for gs3 tomorrow and this should be working
Tried that too, Titanium got stuck at the file. 7-Zip got stuck even when "Testing Archive". I'll write the file off as corrupt. Interestingly enough, the data.ext4.tar is also corrupt. Does this mean it's a time for a new microSD card? Or is it CWM that's writing corrupt files somehow?
Access system files from recovery any use .
http://forum.xda-developers.com/showthread.php?t=1646108
Works on SGS3
jje

VZW XT912 Safestrap Error Restoring /data, Backup File Over 2 GB

Hi folks,
The adventures continue. I've been trying to restore my Safestrap backup for ages, and no matter what I try, I continue to get
Code:
Error restoring /data!
at the conclusion of the restoration. I can restore via Fastboot to stock, but no matter what I can't get my full backup restored successfully. Generally unless I restore to stock factory the system ends up in a kind of broken state where there are apps that are installed but have file size 0B, and don't run.
The final error in the recovery log is
Code:
tar: seek failure: Value too large for defined data type
Error while restoring /data!
Of course the first thing I thought was that the backup was corrupt, but it extracts completely fine with plain ole' tar on my Linux laptop.
I have:
Updated Safestrap to 2.11 for Droid Razr
Updated BusyBox via Stericson's BusyBox updater app from Google Play
Attempted restore again after those two steps
Wiped /data and restored to Factory via both Fastboot flash through Matt's Utility and Motorola Recovery menu
Attempted to split the data.ext3.tar file into two, one with my apps directory, one without (since that way, both files are below 2 GB). The first file, the one with the apps directory removed, restored fine. The second one, consisting of just the apps directory, did not (with the same error). It might be a moot point anyway since I think Safestrap formats the partitions before restoring, so it wouldn't "recombine" them anyway.
Bought the XDADevelopers Android Hackers' Toolkit from the bookstore. Haven't finished reading it yet, but hopefully it will give me some ideas.
So I can get access to what my apps directory should look like (I can extract it locally here on my laptop) but I can't get Safestrap to extract it all at once to the correct partition on my phone.
I'm currently almost out of ideas. It seems this is a common problem and that newer versions of CWM Recovery split the tars so to avoid the file size limit imposed by BusyBox, if I'm interpreting what I've read correctly. This might be the case with the newer Safestrap but it doesn't help my old backup, unless I can split it in a way that Safestrap expects and will deal with (is this possible?)
Given that I have the actual files that should be on the phone, and that my phone is rooted, would it make sense to simply attempt to extract the apps-only tar overtop of the apps directory? Would the files be locked when the phone was on normally?
Could this still be a free space issue? Currently I'm showing 1.7 GB free after the latest failed restore. One would think if it was a disk space issue, it would show 0 B free, right? To test this, would it hurt to delete the files in the safestrap directory (i.e. orig and safe, containing a data.ext3.tar in each of about 2.2 GB) since Safestrap is currently in unsafe mode right now anyway?
Also, is there anything I can do to help here? I know C and C++; while I'm not a low-level hardware hacker by any means (I'm a professional web developer) this issue has bugged me enough that I want to try to fix it. I know that Safestrap is on Github but I'm not really sure where to start.
Do you have any other suggestions for ways to get my Safestrap-generated nandroid backup of my data correctly restored to my phone?
Please let me know if I did something wrong in asking this question; I tried to do as much research as I could beforehand. If I haven't done enough, I would appreciate a point in the right direction.
Or maybe the post was too long and drawn out, so I'll try to compact it here.
My phone won't restore a successful Safestrap backup that is 2.2 GB in size. The backup (a tar file) extracts fine on my PC. I'm getting "error restoring /data!". It seems to be the same issue others have had with restoring a CWM backup over 2 GB.
Would it make sense to simply attempt to extract the apps-only tar overtop of the apps directory, or would the files be locked when the phone was on normally?
Could this still be a free space issue?
Do you have any other suggestions for ways to get my Safestrap-generated nandroid backup of my data correctly restored to my phone?
Edit: Could the tar be converted to an image file to be flashed to the data partition with Fastboot?
Final bump. Anyone? Anyone? Bueler?
Is it safe to just grab a root shell through ADB, push the tar containing the apps, and extract over top of my phone's existing apps directory, while the phone is running? Are there risks associated with this?
Edit: Alternatively, is there a native Android GNU tar binary available anywhere, or instructions for cross-compiling one, since this seems to be a problem with BusyBox?
...Answering my own question, apparently yes. I'm going to try replacing the tar symlink to BusyBox with this native version and try again tonight, I'll let you know how it goes.
I had the same problem and the tar from your link worked for me for a 4GB tar extract. Thanks for your tip!

Anyway to Clone a Rooted Android Tv Box?

I'm looking for a way to clone a Rooted android box to other android boxes. I want to clone my Tv launcher and apps plus settings.. I have tried a few programs Titanium backup but it seemed to back it up and restore fine but fails to recovery the settings for each app. If there is a faster way of doing this please let me know. The boxes are all different, but have the same processors s905x amlogic. Is there a way to make a IMG then use the usb burning tool to write to each box?
I Used Filezilla to grab files but it also fails to load all the files from the entire box?
Use twrp to create a image then flash that image to the other
I'd agree with Bcoates84, I've been testing out the process of cloning some Samsung tablets by simply restoring TWRP backups and so far everything's worked out pretty well.
It would be a good idea to backup the target ones just in case before trying it since you mentioned they are different boxes.
If you look up TWRP for your specific model(s) there should be some good information to get you heading in the right direction.
So i have done my backup on the box i want to clone, ill call it A-box. I got a Folder called TWRP/Backups With a few files
Boot.emmc.win
data.ext4.win000
data.ext4.win001
data.info
recovery.log
system.ext4.win
system.info
I plugged the stick into the box i want to clone, ill call it b-box went to restore this time and it fails to see the backup?
So I copied the TWRP folder with it's contents this time to my desktop and deleted the TWRP folder from the USB stick. Decided to do a Backup on b-box even know i didn't need the backup just wanted the folder structure to compare the two which i then got.
Boot.emmc.win
data.ext4.win
data.info
recovery.log
system.ext4.win
system.info
So I removed all the FILES from the usb only leaving the folder structure TWRP/BACKUP/SERIALNUMBERS I'm guessing? Also the p212-userdebug_6.0.1 folder. Then copied my files from A-box into the file structure and went to do a restore and it sees the image! Restore went smooth, went to reboot and it's stuck on android splash screen for 30mins now so guessing it's bricked. I can flash stock img back thats not a issue. Just trying to figure out how to clone this damn thing lol.
Is there anyway to simply make a Img so i can flash it via the amlogic usb burning tool. I saw this guide https://forum.xda-developers.com/showthread.php?t=2746044 which i can extract the system.ext4 seeing all the system files, fast_preinstall, addon.d, app, bin, fonts, usr ect... But i don't see boot.emmc.win anywhere? I'm assuming this methods for phones only?

Categories

Resources