FORUMS

Other than XDA (of Course), What’s Your Favorite Site That Covers Android?

There is a number of other great sites that cover … more

Introducing Voices of XDA: Have Your Ideas Heard

By far the greatest assets we have at XDA-Developers are you, the developers, the eager … more

Unofficial Xposed For Lollipop Touchwiz With Flashable Zip

XDA Recognized Developer arter97 has released an unofficial build … more

YotaPhone 2 Pre-Order, Xperia Z1 Price Cut – XDA TV

Android Wear 5.1.1 OTA downloads are now available. That and much more news is … more
Post Reply Subscribe to Thread Email Thread

[REF] Create boot.img for the One S

6th April 2012, 10:45 AM |#1  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 781
 
Donate to Me
More
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
Last edited by xkonni; 6th April 2012 at 10:59 AM.
The Following 17 Users Say Thank You to xkonni For This Useful Post: [ View ]
 
 
6th April 2012, 04:52 PM |#2  
Senior Member
Flag Fort Worth
Thanks Meter: 52
 
Donate to Me
More
Thumbs up
Quote:
Originally Posted by xkonni

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.
6th April 2012, 06:39 PM |#3  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 781
 
Donate to Me
More
Me too. Took quite some time to figure it out, though once you know it's rather easy.

Sent from my HTC One S
19th April 2012, 08:29 PM |#4  
fulky's Avatar
Member
Flag Cuneo
Thanks Meter: 2
 
More
someone could download your boot.ini? I have a problem with my htc one s
tnk
19th April 2012, 09:05 PM |#5  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 781
 
Donate to Me
More
Quote:
Originally Posted by fulky

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: [ View ]
19th April 2012, 09:52 PM |#6  
fulky's Avatar
Member
Flag Cuneo
Thanks Meter: 2
 
More
Thumbs up
Quote:
Originally Posted by xkonni

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
19th April 2012, 10:11 PM |#7  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 781
 
Donate to Me
More
Quote:
Originally Posted by fulky

you are my savior, it works.
thank you very much

ok... glad to help!
19th April 2012, 11:37 PM |#8  
Senior Member
Flag Karlsruhe
Thanks Meter: 10
 
More
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?
20th April 2012, 07:25 AM |#9  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 781
 
Donate to Me
More
its just a slightly modified stock boot.img with changed parameters in default.prop that allow adb shell as root. nothing fancy...
3rd May 2012, 07:12 AM |#10  
zylith's Avatar
Senior Member
Flag Collinsville
Thanks Meter: 170
 
More
not doing this, would it cause a error in CWM as status 0? when I try to flash a rom.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes