FORUMS
Remove All Ads from XDA

[HOWTO] Creating custom SBF firmware

143 posts
Thanks Meter: 111
 
By Simplestas, Senior Member on 26th May 2011, 07:49 PM
Post Reply Email Thread
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.
The Following 20 Users Say Thank You to Simplestas For This Useful Post: [ View ] Gift Simplestas Ad-Free
 
 
26th May 2011, 08:04 PM |#2  
dedraks's Avatar
Senior Member
Flag Belo Horizonte
Thanks Meter: 296
 
Donate to Me
More
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?
26th May 2011, 08:12 PM |#3  
OP Senior Member
Thanks Meter: 111
 
More
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!
26th May 2011, 08:33 PM |#4  
dedraks's Avatar
Senior Member
Flag Belo Horizonte
Thanks Meter: 296
 
Donate to Me
More
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....
26th May 2011, 08:46 PM |#5  
Senior Member
Thanks Meter: 53
 
More
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
26th May 2011, 10:40 PM |#6  
Member
Thanks Meter: 1
 
More
So would it be possible creating custom bootmenus as these are updated by sbf's too?
27th May 2011, 01:32 AM |#7  
sunoldman's Avatar
Senior Member
Thanks Meter: 34
 
More
If your current system contain boot menu. The custom sbf also, it is identical with the current system.
27th May 2011, 01:40 AM |#8  
Epsylon3's Avatar
Recognized Developer
Flag Geneva
Thanks Meter: 4,330
 
Donate to Me
More
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..
The Following User Says Thank You to Epsylon3 For This Useful Post: [ View ]
27th May 2011, 02:11 AM |#9  
sunoldman's Avatar
Senior Member
Thanks Meter: 34
 
More
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 .
27th May 2011, 02:28 PM |#10  
IE-coRe's Avatar
Senior Member
Flag G├╝strow
Thanks Meter: 184
 
More
Does this means that someone could create a sbf wich flashs dierctly CM7 or MiUi?
27th May 2011, 03:37 PM |#11  
Senior Member
Flag Recife
Thanks Meter: 158
 
More
Quote:
Originally Posted by IE-coRe

Does this means that someone could create a sbf wich flashs dierctly CM7 or MiUi?

It's possible too.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes