Jump to content

25/Jul r1 BootBuilder for PulseMini (ALPHA Release)


Guest m2te

Recommended Posts

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
Link to comment
Share on other sites

Guest gforums

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
Link to comment
Share on other sites

Guest freddyemmer
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.com/file/ik54u4d0i8jdxa4/Bootrom.rar

Edited by freddyemmer
Link to comment
Share on other sites

Guest freddyemmer

Maybe someone could explane this line?

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Guest freddyemmer
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!!

Link to comment
Share on other sites

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.net/projects/npp-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.

Link to comment
Share on other sites

Guest freddyemmer

m2te,

thanx for your explanation now i get it ;-)

yes it works just fine for the vodafone845...

Edited by freddyemmer
Link to comment
Share on other sites

  • 2 weeks later...
Guest Gjole86
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 .....

boot.img

Link to comment
Share on other sites

Guest kallt_kaffe
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
Link to comment
Share on other sites

  • 2 months later...
Guest ramalhais

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

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.