With Epsylon3 brilliant work, a new idea of flashing custom firmwares came to surface, allowing custom /system partition to be flashed directly from RSD Lite! This way you don't need to flash fixed SBFs and waste time with rooting and recovery install in case of system screw-up.
What you need:
1) MotoAndroidDepacker. With it, unpack sbf of the firmware you use as base.
2) Leave CG35(boot) and CG61(devtree) partition files, delete other smgs. Other files are not that important. You can delete all partition files if you're making backup for yourself...
3) Replace CG39(system) with your system dump:
adb shell:
su
dd if=/dev/block/system of=/sdcard/CG39.smg
copy CG39.smg from sd card to your firmware folder.
4) Compile sbf with MotoAndroidDepacker.
5) Flash your sbf in case of failure.
MAJOR CAVEAT: This sbf will work ONLY on devices with have same full SBF version applied last as your device. I.e. if you have flashed 3.4.2-107 and then upgraded it with nandroid to 3.4.2-177, the sbf you created from your system dump will work only for devices which flashed still 3.4.2-107 sbf last. To install such (custom) sbf, one would need to flash full 3.4.2-107 sbf first.
Technical: this is possible because of bug/feature in flashing process: system signature partiton is not checked if phone signature is already present. Phone signature is generated when flashing full genuine sbf and is verified aganist copy in sp partition and obviously differs for each firmware. It is stored at the end of the system partition.
Great news.
Some question:
If I install a full sbf. IE: 3.4.2-117 and then apply a custom ROM over it (CM).
So can I make a backup of my system and flash it again in case of any brick?
You can make a backup for yourself and flash it again all you want until you flash another full motorola sbf. Don't forget to make data backups as well, this method can't replace nandroid / titanium!
Interesting...
So I can flash my base sbf, integrate call recording, 720p playback, wvga recording, root, swype on my language and other mods and create a new sbf only to apply these mods.
It will be usefull....
Oh great all of us asked this question when this section began in xda. So essentially we can make an sbf out of our phones and keep it and not worry about any nandroid backups.
This is a great discovery, thanks a ton.
Cheers
So would it be possible creating custom bootmenus as these are updated by sbf's too?
If your current system contain boot menu. The custom sbf also, it is identical with the current system.
i think you can create a Full SBF with all original partitions and your "signed" CG39
I think it is not a bug... the thing is : i'm not sure sbf can work on other devices ... but anyway... it can be really usefull to recover device or to create a full backup with the good kernel made for the /system and /devtree
mbr and ebr are needed too, if the partition table has changes, you will have problems..
So the question is whether the signature is related to the specific part of every device, or it is universal as official sbf. Need to be verified .
Does this means that someone could create a sbf wich flashs dierctly CM7 or MiUi?
IE-coRe said:
Does this means that someone could create a sbf wich flashs dierctly CM7 or MiUi?
Click to expand...
Click to collapse
It's possible too.
Where i can finde the MotoAndroidDepacker?
Great news! But why are Android systems so complicated when it comes to flashing and banking up? I mean, with computers it's easy. You make an image of the system partition and you're done. Restoring is as simple as writing the backup back to the partition. So, why is it so hard to just make an entire nand backup that we can simply write back to go to a working state after failure?
Sent from my MB525 using Tapatalk
I made a custom sbf with nightly build in it . Then wipe and flash it, stuck at M logo. Bootmenu works, but it seems that it can't mount some partition , it's the same symptom when wipe in stock recovery in cm7.
Does it really need to flash a full sbf before the custom sbf ?
So if i wanted to do this i split my sbf, delete everything only leaving,
CG35.SMG
CG61.SMG
firmware.hmg
Then system dump and add that CG39.smg in and build and flash?
Have i missed anything?
Well you forgot RAMDLD... One CG39 is enough if you'll flash this SBF over ver 4 froyo (not Chinese or Korean) but i recommended CG35 and CG61 to make such sbf enough to flash over system downgraded with fixed sbf + nandroid.
Is it possible to keep all files and just replace CG39? Or are files removed for a reason? Thanks for replying.
You can keep all files, theoretically.
Well i made an sbf version of miui and it works
Wonder if it works on other peoples Defy?
Tested by formatting system and then applying sbf. Booted back into MIUI like a dream
EDIT:
Shame the SBF comes out at 300+mb May take a while to upload these things lol.
If I mount the CG39 as a loopback device in a linux box,
Can I just replace the contents and it will retain the signature?
Or the signature is based in a checksum?
So, is there's a software which could do a recovery backup without booting into recovery?
(This is technically possible and YaffsExpert can already backup the images separately, am just wondering if there's an app to make a CWM compatible backup.)
I'm sure it is technically possible, as we don't have such a tool. Manipulating .img files is not the same thing than creating them. Probably unmounting some part of the file system is a part of the explanation...
YaffsExpert already does the .img part.
so far, no tools for that..
Before anyone retorts, yes i have been through the forums and googled it. Nothing has worked yet
Ok, so i got this tablet called the skypad alpha2. There is an update for ics for it but it is a. Img file that has to be installed through their program calledlivesuite. Since it is a. Img file i am assuming it is a full system image because when it is installed it completely wipes everything.
Anyway, i have tried converting it, extracting it with unyaffs and all that.
Is there an alternative to unyaffs for windows?
DontExist said:
Before anyone retorts, yes i have been through the forums and googled it. Nothing has worked yet
Ok, so i got this tablet called the skypad alpha2. There is an update for ics for it but it is a. Img file that has to be installed through their program calledlivesuite. Since it is a. Img file i am assuming it is a full system image because when it is installed it completely wipes everything.
Anyway, i have tried converting it, extracting it with unyaffs and all that.
Is there an alternative to unyaffs for windows?
Click to expand...
Click to collapse
Actually that could be useful. No idea on how to do it, but good luck!
Yeah.... that was helpful. Please try and refrain from useless answers. Thank you
So I've made a user backup from the stock recovery mode on Android, everytime I restore the backup my phone starts to main screen and then reboots thus creating a bootloop. So, I guess there are some files that corrupts the boot process in a way but I had a lot of information that I won't like to have lost. It is possible to extract information from this file just to get the important bits?
P.S.: the backup file extension is .backup. So far I've seen some tools who are able to open just .img backups and at this point I just got confused on this backup thing. My phone is a Motorola XT914 on stock Android 4.1.2
shameless bump
Nandoid B/U with TWRP. Seems to backup just fine, but (immediately) restore on the same device causes boot loops.
It looks like the backup filed are something like win000, win001, etc that are actually tar files.
I'm wondering if I got into terminal mode on TWRP, could I just extract the tar files to restore the partition?? I've always used tar to b/u and restore /data/media.
FWIW, the device is a Pixel 3a running android 11 and the version 11 compatible TWRP flash file.
Help if you can...... Thanks
Hi @Boowho 1234,
seems you have accidentially posted in the wrong forum. I have moved your question to the Google Pixel 3a Questions & Answers forum.
regards
alecxs
moderator
alecxs said:
Hi @Boowho 1234,
seems you have accidentially posted in the wrong forum. I have moved your question to the Google Pixel 3a Questions & Answers forum.
regards
alecxs
moderator
Click to expand...
Click to collapse
sorry......
You're welcome! Regarding your question. May you clarify why you want to extract tar files manually - did the restoring via TWRP menu not extract the files successfully? Usually TWRP would throw an Error code in that case, and you can always have a look into /tmp/recovery.log
alecxs said:
You're welcome! Regarding your question. May you clarify why you want to extract tar files manually - did the restoring via TWRP menu not extract the files successfully? Usually TWRP would throw an Error code in that case, and you can always have a look into /tmp/recovery.log
Click to expand...
Click to collapse
Restoring using the TWRP restore option restored the files perfectly. But, upon rebooting back to SYSTEM just boot loops. No error code thrown, but I've not looked at recovery.log
It's probably because of one or more outdated files restored. try to delete this. you should also try to restore on formatted userdata partition (beware of / data/media = /sdcard is not included in backup)
/data/unencrypted
/data/misc/keystore
/data/misc/gatekeeper
/data/misc/vold
/data/system/locksettings.db*
You should ask TWRP maintainer to fix that issue.
I'm now using a Windows .bat file to backup ALL partitions on the device. It works great except throws errors on these two partitions : mmcblk0 and mmcblk0rpmb
I've read that these two partitions are not REALLY partitions at all, but are some sort of "special" files within the /dev/block directory.
The question is do I have a complete Nandroid back up without these two included?? Anyone??
Thanks