Jump to content


Photo

25/Jul r1 BootBuilder for PulseMini (ALPHA Release)


  • Please log in to reply
12 replies to this topic

#1
m2te

m2te

    Newbie

  • Members
  • Pip
  • 42 posts
  • Devices:HTC Desire; T-Mo Pulse Mini
BootBuilder for PulseMini

Announcing a set of linux basic tools for unpacking and extracting the contents of the Pulse Mini boot.img allowing more customisation capability for the PulseMini custom roms.

To use-

1. Extract the tar file to your file system.
2. Place the source boot.img into the 'bootworkspace' folder.
3. In a shell, change directory to the 'Scripts' folder.
4. In the shell, enter './Unpack-bootimg' to unpack the boot.img.
5. Modify the ramdisk as required in the 'bootworkspace/boot.img-ramdisk' folder.
6. In the shell, enter './Build-ramdisk' to build the ramdisk.
7. In the shell, enter ./Build-bootimg to build the new boot-new.img.


To test / install, boot the phone into fastboot - turn if off, then tap the powerbutton while holding the 'Volume Down' and 'End (Red)' keys.

From your favourite operating system, run the following to test-
fastboot boot boot-new.img

Or the following to flash the new boot image-
fastboot flash boot boot-new.img


Download


CREDITS
------------
Too many to mention, sadly I can't remember who to credit for the perl unpacking file.


NOTES
----------
* Use with caution, bricking devices is a possibility with custom roms / boot images.

* The process requires an understanding of the Android and boot.img files.
* Tested on Ubuntu 10.4 LTS.
* If Fastboot is required, the Fastboot binaries can be found in any of the custom recovery downloads.
* Source for the mkboot tools is included in the 'BootBuilder/Tools/mkboot' folder, it may need to be rebuild on certain operating systems.
* Requires perl to be installed.

Known Issues
-----------------
* The boot.img build process does not put the correct values into the boot image header resulting in an image file that will not boot. Still investigating the cause.

Copying the first 16 bytes (bytes 0x00 to 0x0f) and the ram image offset (bytes 0x14-0x17) from an out of the box image to the new image appears to fix it using Notepad++ for example with the Hex Editor plugin.

Edited by m2te, 31 July 2010 - 05:49 PM.

  • 0

#2
gforums

gforums

    Regular

  • Members
  • PipPip
  • 120 posts
  • Gender:Male
  • Location:Germany
  • Devices:null
Did you resolve the issue? Or how did you create a modified boot.img for your rom?
best! G

forget about it...didn't see the 2nd sentence with how you can fix it :(

Edited by gforums, 25 July 2010 - 10:16 PM.

  • 0

#3
freddyemmer

freddyemmer

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:The Netherlands
  • Devices:HTC desire & Vodafone 845

Did you resolve the issue? Or how did you create a modified boot.img for your rom?
best! G

forget about it...didn't see the 2nd sentence with how you can fix it :(


Could you please give some more information.. I don't realy get it.. from were do i need to adjust?

I have used your tool to make a new boot.img i have adjust the init.rc for ap2sd direct methode.
then i repacked everything with your tool and than you are telling to adjust the new boot img with a hex editor and at that point im stuck..

could anyone take a look at this? it for a vodafone 845 phone (huawei 8210)
I have uploaded the orginal and the new one.

http://www.mediafire...xa4/Bootrom.rar

Edited by freddyemmer, 31 July 2010 - 08:44 AM.

  • 0
Check out my custom vodafone 845 ROM
-----------------------------------------------------------------------------
Name: HTC Desire
ROM: Opendesire
Recovery: AmonRA Recovery

Name: Vodafone 845 (Huawei 8120)
ROM: Vodafone 845 Mr Edition
Recovery: AmonRA Recovery 1.6.2

#4
freddyemmer

freddyemmer

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:The Netherlands
  • Devices:HTC desire & Vodafone 845
Maybe someone could explane this line?

Coping the first 16 bytes (bytes 0x00 to 0x0f) and the ram image offset (bytes 0x14-0x17)

  • 0
Check out my custom vodafone 845 ROM
-----------------------------------------------------------------------------
Name: HTC Desire
ROM: Opendesire
Recovery: AmonRA Recovery

Name: Vodafone 845 (Huawei 8120)
ROM: Vodafone 845 Mr Edition
Recovery: AmonRA Recovery 1.6.2

#5
m2te

m2te

    Newbie

  • Members
  • Pip
  • 42 posts
  • Devices:HTC Desire; T-Mo Pulse Mini

Maybe someone could explane this line?

Coping the first 16 bytes (bytes 0x00 to 0x0f) and the ram image offset (bytes 0x14-0x17)

Apologies, I will get around to answering you, I've got a spam problem at the moment though

  • 0

#6
freddyemmer

freddyemmer

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:The Netherlands
  • Devices:HTC desire & Vodafone 845

Apologies, I will get around to answering you, I've got a spam problem at the moment though


You don't have to aplogies i just being unpatient :( Thanx in advance!!

  • 0
Check out my custom vodafone 845 ROM
-----------------------------------------------------------------------------
Name: HTC Desire
ROM: Opendesire
Recovery: AmonRA Recovery

Name: Vodafone 845 (Huawei 8120)
ROM: Vodafone 845 Mr Edition
Recovery: AmonRA Recovery 1.6.2

#7
m2te

m2te

    Newbie

  • Members
  • Pip
  • 42 posts
  • Devices:HTC Desire; T-Mo Pulse Mini

You don't have to aplogies i just being unpatient :( Thanx in advance!!


I'm using Notepad++

http://notepad-plus-plus.org/

And the hex editor plugin from-

http://sourceforge.n...-plugins/files/

I open the boot.img file in Notepad++, change the view by clicking on the 'Plugins' menu follwed by 'HEX-Editor' then 'View in HEX'. You should get a view something like-
Adress	0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f   Dump
00000000 41 4e 44 52 4f 49 44 21 d0 22 24 00 00 80 20 00   ANDROID!........
00000010 08 8c 02 00 00 00 20 01 00 00 00 00 00 00 10 01   ................
00000020 00 01 20 00 00 08 00 00 00 00 00 00 00 00 00 00   ................

I have been copying the first sixteen bytes (41 4e 44 52 4f 49 44 21 d0 22 24 00 00 80 20 00) from the working boot.img to the rebuilt boot.img and the four bytes as position 0x14 to 0x17 (00 00 20 01).

Without doing this the boot.img doesn't seem to boot; for me anyway, I don't know how gforums got on with rebuilding the boot.img. For some reason the mkbootimg tool doesn't seem to get the header correct.

You may not need to do any of this, you can try booting the boot.img from within fastboot without actually flashing it. Connect the phone to your computer, start it up in fastboot then use the command 'fastboot boot <boot.img file name>' on your computer. This should download the boot.img file to the phone and boot it, if it works flash it, if it doesn't try tweaking the boot.img file.

  • 0

#8
freddyemmer

freddyemmer

    Newbie

  • Members
  • Pip
  • 40 posts
  • Location:The Netherlands
  • Devices:HTC desire & Vodafone 845
m2te,

thanx for your explanation now i get it ;-)

yes it works just fine for the vodafone845...

Edited by freddyemmer, 01 August 2010 - 09:05 AM.

  • 0
Check out my custom vodafone 845 ROM
-----------------------------------------------------------------------------
Name: HTC Desire
ROM: Opendesire
Recovery: AmonRA Recovery

Name: Vodafone 845 (Huawei 8120)
ROM: Vodafone 845 Mr Edition
Recovery: AmonRA Recovery 1.6.2

#9
Gjole86

Gjole86

    Enthusiast

  • Members
  • PipPipPip
  • 176 posts
  • Devices:Pulse Mini with GM0d
cant build boot.img in win7 with cygwin. Build-ramdisk asks for some binaries *shrug*

  • 0

#10
gforums

gforums

    Regular

  • Members
  • PipPip
  • 120 posts
  • Gender:Male
  • Location:Germany
  • Devices:null
well...a full ubuntu/linux still is the best choice :D

  • 0

#11
Gjole86

Gjole86

    Enthusiast

  • Members
  • PipPipPip
  • 176 posts
  • Devices:Pulse Mini with GM0d

well...a full ubuntu/linux still is the best choice :D

bah shared folders in VBox with linux guest is horrible :D
if u are up to, mod this boot.img with usual crap. flibs memory tweaks, a2sd .....

Attached Files

  • Attached File  boot.img   2.47MB   17 downloads

  • 0

#12
kallt_kaffe

kallt_kaffe

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 1,185 posts
  • Gender:Male
  • Devices:Nexus 4 + 10 + Asus Fonepad

Known Issues
-----------------
* The boot.img build process does not put the correct values into the boot image header resulting in an image file that will not boot. Still investigating the cause.

Copying the first 16 bytes (bytes 0x00 to 0x0f) and the ram image offset (bytes 0x14-0x17) from an out of the box image to the new image appears to fix it using Notepad++ for example with the Hex Editor plugin.


Add "--base 200000" to the mkbootimg command. That gave me a header identical to the superboot img. However my device (U8100) refuses to boot my img not matter if I copy with hexedit or use the --base switch. The superboot image worked though.

All I did was extracting the superboot image, replaced Superuser with latest version and created a new image but it says it's invalid when I try to fastboot it.

Edited by kallt_kaffe, 23 August 2010 - 12:09 PM.

  • 0
Blog - App

#13
ramalhais

ramalhais

    Newbie

  • Members
  • Pip
  • 1 posts
If anyone is struggling with mkbootimg and Vodafone 845 Android Cell Phone, i figured that this cell phone expects the boot.img to have 2048 bytes extra after the 2048 bytes header block.
I have created this script which builds "correct" images for this device:


mkbootimg-v845.sh:
-----------------------------------------------------------------------------------------------------
KERNEL="$1"
RAMDISK="$2"
OUTPUT="$3"

CMDLINE="mem=211M console=ttyMSM2,115200n8 androidboot.hardware=qcom console=ttyUSBCONSOLE0 androidboot.console=ttyUSBCONSOLE0"
BASE="0x200000"

mkbootimg --kernel "$KERNEL" --ramdisk "$RAMDISK" --cmdline "$CMDLINE" --base "$BASE" -o "$OUTPUT"
dd if="$OUTPUT" of="$OUTPUT-v845.img" bs=2048 count=1
dd if=/dev/zero of="$OUTPUT-v845.img" bs=2048 count=1 seek=1
dd if="$OUTPUT" of="$OUTPUT-v845.img" bs=2048 skip=1 seek=2
-----------------------------------------------------------------------------------------------------

Then run
chmod +x mkbootimg-v845.sh
./mkbootimg-v845.sh zImage ramdisk.cpio.gz newboot.img
fastboot boot newboot.img-v845.img

And you should be booting your new boot.img!

If anyone is interested, i have built a C program that extracts kernel, ramdisk and second image according to the android header specification, reading the kernel, ramdisk and second images size from the header and extracting it accordingly. Of course this doesn't work on the boot images generated by this script, however i could add a switch for taking into account the extra 2048 bytes.

Happy hacking!
--
Pedro Ramalhais

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users