Android Lollipop Lands for the Sony Xperia Z Ultra

The undisputed king of the beasts–at least in Sony’s current stable,is the … more

Android 5.0 Lollipop in 3D–EVO 3D, That Is!

It is that time of the year once again. Flowers bloom (or snow falls, depending on which … more

Gaming Console with Lollipop? Ouya Gets an Android TV Port

Android is a very flexible platform, and it can be used on a large variety of … more

Android App Review: Manage Your Connections Automagically – XDA TV

Material Design is all the buzz in the Android world right now. … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[REF] Create boot.img for the One S

OP xkonni

6th April 2012, 11:45 AM   |  #1  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 720
 
360 posts
Join Date:Joined: Jan 2010
Donate to Me
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 11:59 AM.
The Following 17 Users Say Thank You to xkonni For This Useful Post: [ View ]
6th April 2012, 05:52 PM   |  #2  
Senior Member
Flag Fort Worth
Thanks Meter: 48
 
291 posts
Join Date:Joined: Apr 2010
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, 07:39 PM   |  #3  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 720
 
360 posts
Join Date:Joined: Jan 2010
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
19th April 2012, 09:29 PM   |  #4  
fulky's Avatar
Member
Flag Cuneo
Thanks Meter: 2
 
43 posts
Join Date:Joined: Feb 2010
More
someone could download your boot.ini? I have a problem with my htc one s
tnk
19th April 2012, 10:05 PM   |  #5  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 720
 
360 posts
Join Date:Joined: Jan 2010
Donate to Me
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, 10:52 PM   |  #6  
fulky's Avatar
Member
Flag Cuneo
Thanks Meter: 2
 
43 posts
Join Date:Joined: Feb 2010
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, 11:11 PM   |  #7  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 720
 
360 posts
Join Date:Joined: Jan 2010
Donate to Me
Quote:
Originally Posted by fulky

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

ok... glad to help!
20th April 2012, 12:37 AM   |  #8  
Senior Member
Flag Karlsruhe
Thanks Meter: 10
 
282 posts
Join Date:Joined: Feb 2009
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, 08:25 AM   |  #9  
xkonni's Avatar
OP Senior Member
berlin
Thanks Meter: 720
 
360 posts
Join Date:Joined: Jan 2010
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...
3rd May 2012, 08:12 AM   |  #10  
zylith's Avatar
Senior Member
Flag Collinsville
Thanks Meter: 166
 
192 posts
Join Date:Joined: Aug 2009
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