5,594,564 Members 32,795 Now Online
XDA Developers Android and Mobile Development Forum

How to patching an updated boot.img.p(atch) to a fastboot boot.img -For Leak Install-

Tip us?
 
mattlgroff
Old
(Last edited by stylez; 3rd July 2012 at 12:21 AM.)
#1  
mattlgroff's Avatar
Recognized Developer - OP
Thanks Meter 2339
Posts: 2,175
Join Date: Dec 2011
Location: San Diego

 
DONATE TO ME
Tutorial How to patching an updated boot.img.p(atch) to a fastboot boot.img -For Leak Install-

My email is mattlgroff@gmail.com

Be rooted. Have a computer with adb working, or do this from an android terminal emulator. The instructions are for adb.

The applypatch commands are going to have [] around them to show you what to put, but we not used in the actualy script.


-----------------------------------------------------------------
Code:
adb shell
su
cd sdcard-ext
applypatch [Original Boot.img] [Desired Name of new Boot.img] [A] [B] [C]:[boot.img.p]
-----------------------------------------------------------------

A = Desired Boot.img's Sha-1 sum
B = Size (in bytes) of the desired boot.img
C = Original Boot.img's Sha-1sum




Looking at the updater-script you can see this line of code or something similar for applying the boot.img.p to the phone's boot.img.
You need this as a reference for the SHA-1 sums of the patch and boot.img and desired final boot.img.


//Reference script\\

Code:
assert(apply_patch("MTD:boot:[B]:[C]:[B]:[A]",
       "-", [A], [B],
       [C], package_extract_file("patch/boot.img.p")));


//Actual script\\

Code:
assert(apply_patch("MTD:boot:8388608:fe086e1f547082c3cf2a5f65dacb81fd232ecd89:8388608:4a7070c32d0312aa48e52e207c7932434bc46cb1",
       "-", 4a7070c32d0312aa48e52e207c7932434bc46cb1, 8388608,
       fe086e1f547082c3cf2a5f65dacb81fd232ecd89, package_extract_file("patch/boot.img.p")));



Actual commands used to patch D4 .219 fastboot file boot.img with D4 6.16.208 boot.img.p:
------------------------------------------------------------------------------------------
Code:
adb shell
su	
cd sdcard-ext
applypatch boot219.img boot208.img 4a7070c32d0312aa48e52e207c7932434bc46cb1 8388608 fe086e1f547082c3cf2a5f65dacb81fd232ecd89:boot208.img.p
------------------------------------------------------------------------------------------
The Following 15 Users Say Thank You to mattlgroff For This Useful Post: [ Click to Expand ]
 
pedrotorresfilho
Old
(Last edited by pedrotorresfilho; 10th June 2012 at 07:47 PM.)
#2  
pedrotorresfilho's Avatar
Senior Member
Thanks Meter 1090
Posts: 1,587
Join Date: Jan 2012

 
DONATE TO ME
Quote:
Originally Posted by mattlgroff View Post
My email is mattlgroff@gmail.com

Be rooted. Have a computer with adb working, or do this from an android terminal emulator. The instructions are for adb.

The applypatch commands are going to have [] around them to show you what to put, but we not used in the actualy script.

Thank you very much mattlgroff. Our Razr Dev section really need more tutorials as this one.

Excellent !

-- Edit --

Do you mind bringing us a Tutorial to port an ICS system app to make it work in another ICS?

Here's an example: SoundRecorder.app from a Motola GSM ICS leak to Retail.BR GSM ICS 4.0.4

This really worth a really cold beer.

BTW. I can provide you all the files you may need or follow a guide to make it work to upcoming Razr's ICS. I've tools to extract .img, DD's even an app compiler. But I get stuck in signing. framework-res.apk etc.

Reason: Some features are built in some ICS versions but not in others. There's more apps, like SIP native support wich are not present in most ICS 4.0.4. I've tried a few Tutorials, but they aren't that much noob Engineering friendly. lol

Thanks man
 
mattlgroff
Old
#3  
mattlgroff's Avatar
Recognized Developer - OP
Thanks Meter 2339
Posts: 2,175
Join Date: Dec 2011
Location: San Diego

 
DONATE TO ME
Quote:
Originally Posted by pedrotorresfilho View Post
Do you mind bringing us a Tutorial to port an ICS system app to make it work in another ICS?

Here's an example: SoundRecorder.app from a Motola GSM ICS leak to Retail.BR GSM ICS 4.0.4

This really worth a really cold beer.

BTW. I can provide you all the files you may need or follow a guide to make it work to upcoming Razr's ICS. I've tools to extract .img, DD's even an app compiler. But I get stuck in signing. framework-res.apk etc.

Reason: Some features are built in some ICS versions but not in others. There's more apps, like SIP native support wich are not present in most ICS 4.0.4. I've tried a few Tutorials, but they aren't that much noob Engineering friendly. lol

Thanks man
I've never done any modifications of apk's like this, I'm more into leaks and utilities

I agree that someone should make tutorials on this though. Sharing our knowledge is the best way to not have to repeat trying things that don't work over and over.
The Following 2 Users Say Thank You to mattlgroff For This Useful Post: [ Click to Expand ]
 
pedrotorresfilho
Old
#4  
pedrotorresfilho's Avatar
Senior Member
Thanks Meter 1090
Posts: 1,587
Join Date: Jan 2012

 
DONATE TO ME
Quote:
Originally Posted by mattlgroff View Post
I've never done any modifications of apk's like this, I'm more into leaks and utilities

I agree that someone should make tutorials on this though. Sharing our knowledge is the best way to not have to repeat trying things that don't work over and over.
Hi mattlgroff!

Do you know a Dev that may help us?

Thanks
 
mattlgroff
Old
#5  
mattlgroff's Avatar
Recognized Developer - OP
Thanks Meter 2339
Posts: 2,175
Join Date: Dec 2011
Location: San Diego

 
DONATE TO ME
Quote:
Originally Posted by pedrotorresfilho View Post
Hi mattlgroff!

Do you know a Dev that may help us?

Thanks
I don't sorry.
The Following User Says Thank You to mattlgroff For This Useful Post: [ Click to Expand ]
 
xlightwaverx
Old
#6  
xlightwaverx's Avatar
Member
Thanks Meter 23
Posts: 75
Join Date: Jun 2010

 
DONATE TO ME
Default apktool

I thought it was possible to make changes to an apk with apktool and then repack those changes back into original apk so you don't lose signing.

X
 
stangri
Old
(Last edited by stangri; 13th June 2012 at 07:12 PM.)
#7  
Senior Member
Thanks Meter 39
Posts: 414
Join Date: Dec 2009
Location: Burnaby

 
DONATE TO ME
Quote:
Originally Posted by xlightwaverx View Post
I thought it was possible to make changes to an apk with apktool and then repack those changes back into original apk so you don't lose signing.

X
We need to figure out how to check for dependencies on these disassembled APK files.

Also, these applypatch instructions have been posted by whirleyes before: http://forum.xda-developers.com/show...01&postcount=2
 
Q9Nap
Old
#8  
Q9Nap's Avatar
Senior Member
Thanks Meter 278
Posts: 402
Join Date: Feb 2009

 
DONATE TO ME
trying to figure out why manually patching would be necessary, why not just dd the boot.img partition after updating?
 
mattlgroff
Old
#9  
mattlgroff's Avatar
Recognized Developer - OP
Thanks Meter 2339
Posts: 2,175
Join Date: Dec 2011
Location: San Diego

 
DONATE TO ME
Quote:
Originally Posted by Q9Nap View Post
trying to figure out why manually patching would be necessary, why not just dd the boot.img partition after updating?
If no one who knows how can upgrade to that version. Here on the XT912 Verizon front, barely anyone is left on GB who can help us with this. This way I can pull a leak and flash it within minutes with no external help.
The Following User Says Thank You to mattlgroff For This Useful Post: [ Click to Expand ]
 
dtrail1
Old
(Last edited by dtrail1; 19th June 2012 at 02:13 PM.)
#10  
Recognized Contributor
Thanks Meter 7092
Posts: 4,577
Join Date: Oct 2011
Location: Frankfurt

 
DONATE TO ME
What I am doing wrong? It doesnt work. I get always an error:

"bootxxx.img" is already target; no patch needed.

I did everything like described in the OP.

Edit: My fault. Want to update an older boot.img to the newer one using the boot.img.p, but it doesn't work.

EDIT: It worked. As you said, it shows an error but done it already. Thx!
At the moment I want to save my work, specially the OTA/Website/Work server. Every little cup of coffee will be great + Very big THANKS to all who supported me in any way and this great community!! Without you this project probably have been already dead.

Currently needed: 0,00 Suddenly it was raining donations!
(to keep everything as is and safe me a lot of (re-)work. Otherwise, no worries)


You can also help me by registering here via THIS banner - and earn some BTC for yourself:



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes