Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
abootimg

This is an old revision of the document!


TODO

abootimg

Introduction

abootimg is a tool created by Gilles Grandou for manipulating Android Boot Images directly from the AC100 (Be carefull to not mess your bootimg otherwise you will need the free tool putusb or the proprietary NVidia's nvflash to flash again a bootable image). abootimg can work directly on block devices, or, the safest way, on a file image.

For further informations, enter abootimg -h in a terminal or read the README.

Usage

  • reading current boot image
abootimg -i /dev/mmcblk0p2
  • extracting current bootable image
cd /tmp/bootimg
abootimg -x /dev/mmcblk0p2
  • updating the kernel on a copy of the current bootable image
  dd if=/dev/mmcblk0p2 of=/tmp/part-6.img
  abootimg -u /tmp/part-6.img -k /boot/vmlinuz

<html> <span style=“color:red;font-size:150%;font-weight:bold;”>WARNING</span> </html> : if you want to modify /dev/mmcblk0p2, DO A BACKUP BEFORE AND STORE IT ON REMOVABLE MEDIA!

Output examples

below there is the output of the previous commands for an AC100-114:

root@ac100:/tmp/bootimg# abootimg -i /dev/mmcblk0p2

Android Boot Image Info:

* file name = /dev/mmcblk0p2 [block device]

* image size = 8388608 bytes (8.00 MB)
  page size  = 2048 bytes

* Boot Name = "Ubuntu Boot Img"

* kernel size       = 3146584 bytes (3.00 MB)
  ramdisk size      = 2310081 bytes (2.20 MB)

* load addresses:
  kernel:       0x10008000
  ramdisk:      0x11000000
  tags:         0x10000100

* cmdline = mem=448M@0M tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800 root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx zcache debug verbose console=tty0 console=ttyGS0,115200n8 console-setup/layoutcode=fr console-setup/variantcode=oss locale=fr_FR

* id = 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000

root@ac100:/tmp/bootimg# abootimg -x /dev/mmcblk0p2
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
root@ac100:/tmp/bootimg# ls -1
bootimg.cfg
initrd.img
zImage

root@ac100:/tmp/bootimg# dd if=/dev/mmcblk0p2 of=/tmp/part-6.img
16384+0 records in
16384+0 records out
8388608 bytes (8.4 MB) copied, 0.430688 s, 19.5 MB/s
root@ac100:/tmp/bootimg# abootimg -u /tmp/part-6.img -k /boot/vmlinuz-2.6.38-1001-ac100 
reading kernel from /boot/vmlinuz-2.6.38-1001-ac100
Writing Boot Image /tmp/part-6.img

Compiling

if your distribution don't provide this tool, follow this method to compile it under Ubuntu Oneiric:

apt-get install libblkid-dev
git clone git://gitorious.org/ac100/abootimg.git
cd abootimg
make
cp -p abootimg /usr/local/sbin

References

Greatings

Thank you very much for this great tools ggrandou! ;-)

abootimg.1329262547.txt.gz · Last modified: 2012/02/15 00:35 by armelf