Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,145 Members 36,125 Now Online
XDA Developers Android and Mobile Development Forum

[REF] Create boot.img for the One S

Tip us?
 
xkonni
Old
(Last edited by xkonni; 6th April 2012 at 10:59 AM.)
#1  
xkonni's Avatar
Senior Member - OP
Thanks Meter 719
Posts: 360
Join Date: Jan 2010
Location: berlin

 
DONATE TO ME
Default [REF] Create boot.img for the One S

As mentioned before, there's something wrong with creating boot images for the HTC One S. They just don't boot.
I did some hexdumping, editing and finally found out what's really wrong.

When unpacking a boot.img you get the base_addr 80400000.

In cyanogenmod/system/core/mkbootimg/mkbootimg.c:146 you have the line
Code:
  hdr.ramdisk_addr = base + 0x01000000;
When using mkbootimg with the given base_addr of 80400000 this results in a ramdisk_addr of 81400000 whereas the correct address would be 81800000.

To create a boot.img you execute:
Code:
mkbootimg --kernel zImage --ramdisk ramdisk.gz --base 80400000 --ramdiskaddr 81800000 --cmdline console=ttyHSL0,115200,n8 -o boot.img
And it's important to specify --base BEFORE --ramdiskaddr as otherwise it gets overwritten.

Hope you can put this to good use
The Following 17 Users Say Thank You to xkonni For This Useful Post: [ Click to Expand ]
 
shiftedx
Old
#2  
Senior Member
Thanks Meter 47
Posts: 288
Join Date: Apr 2010
Location: Fort Worth

 
DONATE TO ME
Quote:
Originally Posted by xkonni View Post
As mentioned before, there's something wrong with creating boot images for the HTC One S. They just don't boot.
I did some hexdumping, editing and finally found out what's really wrong.

When unpacking a boot.img you get the base_addr 80400000.

In cyanogenmod/system/core/mkbootimg/mkbootimg.c:146 you have the line
Code:
  hdr.ramdisk_addr = base + 0x01000000;
When using mkbootimg with the given base_addr of 80400000 this results in a ramdisk_addr of 81400000 whereas the correct address would be 81800000.

To create a boot.img you execute:
Code:
mkbootimg --kernel zImage --ramdisk ramdisk.gz --base 80400000 --ramdiskaddr 81800000 --cmdline console=ttyHSL0,115200,n8 -o boot.img
And it's important to specify --base BEFORE --ramdiskaddr as otherwise it gets overwritten.

Hope you can put this to good use

Wow thank you! I was having such trouble with it I was about to post about this actually.
 
xkonni
Old
#3  
xkonni's Avatar
Senior Member - OP
Thanks Meter 719
Posts: 360
Join Date: Jan 2010
Location: berlin

 
DONATE TO ME
Me too. Took quite some time to figure it out, though once you know it's rather easy.

Sent from my HTC One S
 
fulky
Old
#4  
fulky's Avatar
Member
Thanks Meter 2
Posts: 43
Join Date: Feb 2010
Location: Cuneo
someone could download your boot.ini? I have a problem with my htc one s
tnk
Device: HTC one S
 
xkonni
Old
#5  
xkonni's Avatar
Senior Member - OP
Thanks Meter 719
Posts: 360
Join Date: Jan 2010
Location: berlin

 
DONATE TO ME
Quote:
Originally Posted by fulky View Post
someone could download your boot.ini? I have a problem with my htc one s
tnk
i'm not entirely sure how that would help you, its basically the same those you can find in any rom around here. but there you go: boot.img - mediafire
The Following User Says Thank You to xkonni For This Useful Post: [ Click to Expand ]
 
fulky
Old
#6  
fulky's Avatar
Member
Thanks Meter 2
Posts: 43
Join Date: Feb 2010
Location: Cuneo
Quote:
Originally Posted by xkonni View Post
i'm not entirely sure how that would help you, its basically the same those you can find in any rom around here. but there you go: boot.img - mediafire
you are my savior, it works.
thank you very much
Device: HTC one S
 
xkonni
Old
#7  
xkonni's Avatar
Senior Member - OP
Thanks Meter 719
Posts: 360
Join Date: Jan 2010
Location: berlin

 
DONATE TO ME
Quote:
Originally Posted by fulky View Post
you are my savior, it works.
thank you very much
ok... glad to help!
 
jammysunny
Old
#8  
Senior Member
Thanks Meter 10
Posts: 282
Join Date: Feb 2009
Location: Karlsruhe
I got one problem.....I did a mistake with Rooting my S....Everytime when I tried to restart, it hangs...so I must always go to bootloader back, installing this superboot form Modaco...So I flashed RUUs, all three, but failed....
So, does this .img-file do what?
 
xkonni
Old
#9  
xkonni's Avatar
Senior Member - OP
Thanks Meter 719
Posts: 360
Join Date: Jan 2010
Location: berlin

 
DONATE TO ME
its just a slightly modified stock boot.img with changed parameters in default.prop that allow adb shell as root. nothing fancy...
 
zylith
Old
#10  
zylith's Avatar
Senior Member
Thanks Meter 166
Posts: 192
Join Date: Aug 2009
Location: Collinsville
not doing this, would it cause a error in CWM as status 0? when I try to flash a rom.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Add the Xperia Z2 Lock Screen to Your Favorite KitKat ROM

Almost every OEM adds its own unique flair to their stock firmwares. While some of … more

Android App Review: Control Your Phone with Quick Control Panel – XDA Developer TV

Your Android smart device has many features that you … more

Play Music on Android Wear with Stellio Music Player

Android Wear smartwatchesare growing inpopularity every day. Some devices have already … more

Schedule is up for xda:devcon ’14

With xda:devcon ’14 just around the corner, and the venue close to selling out, there is a lot … more