Difference between revisions of "ROM Androud: Manipulasi recovery.img"

From OnnoWiki
Jump to navigation Jump to search
(New page: ==Menggunakan unpack-MT.pl== Download dari https://github.com/bgcngm/mtk-tools/ Caranya cd ~/Downloads wget https://github.com/bgcngm/mtk-tools/archive/master.zip mv master.zip MTK...)
 
Line 9: Line 9:
 
  cd ~/Downloads
 
  cd ~/Downloads
 
  wget https://github.com/bgcngm/mtk-tools/archive/master.zip
 
  wget https://github.com/bgcngm/mtk-tools/archive/master.zip
mv master.zip MTK-tools.zip
 
  
 
Buka  
 
Buka  
  
  unzip MTK-tools.zip
+
cd ~/Downloads
 +
  unzip mtk-tools-master.zip
  
 
unpack boot.img dari upgrade ROM MTK
 
unpack boot.img dari upgrade ROM MTK
  
 
  cd ~/lokasi-upgrade-ROM-MTK/
 
  cd ~/lokasi-upgrade-ROM-MTK/
  ~/Downloads/mtk-tools-master/unpack-MTK.pl boot.img
+
  ~/Downloads/mtk-tools-master/unpack-MTK.pl TWRP_2810_Micromax_A350_KK.img  
  
==Menggunakan split_bootimg.pl==
+
Hasilnya
 
 
The Android boot.img file contains a kernel and a ramdisk. While researching Android, I've needed to manipulate the ramdisk of a phone. I created the split_bootimg.pl script to parse the boot.img file format and extract the parts.
 
 
 
split_bootimg.pl
 
http://www.enck.org/tools/split_bootimg_pl.txt
 
 
 
The following example uses the boot.img from the full TC4-RC28 update:
 
 
 
% ./split_bootimg.pl boot.img
 
Page size: 2048 (0x00000800)
 
Kernel size: 1388548 (0x00153004)
 
Ramdisk size: 141518 (0x000228ce)
 
Second size: 0 (0x00000000)
 
Board name:
 
Command line: no_console_suspend=1
 
Writing boot.img-kernel ... complete.
 
Writing boot.img-ramdisk.gz ... complete.
 
 
 
Extract the ramdisk.
 
 
 
% mkdir ramdisk
 
% cd ramdisk
 
% gzip -dc ../boot.img-ramdisk.gz | cpio -i
 
% cd ..
 
 
 
 
 
Cara ini tampaknya tidak berlaku untuk boot.img upgrade ROM untuk MTK.
 
 
 
Make any changes necessary (e.g., set ro.secure=0 in default.prop).
 
 
 
Recreate the cpio archive using the mkbootfs binary produced from building the Android source code (The cpio utility in OS X does not recognize the newc format, therefore mkbootfs is the best option for OS X users).
 
 
 
% mkbootfs ./ramdisk | gzip > ramdisk-new.gz
 
 
 
Recreate the image file using the mkbootimg binary produced from building the Android source code.
 
 
 
% mkbootimg --cmdline 'no_console_suspend=1 console=null' \
 
        --kernel boot.img-kernel \
 
    --ramdisk ramdisk-new.gz \
 
            -o boot-new.img
 
 
 
Additional Notes:
 
 
 
    For Nexus One: Add --base 0x20000000 to mkbootimg command-line.
 
    The console=null command line option was introduced in the TC4-RC30 boot images to remove the root shell
 
    Do not use a boot.img image extracted directly from /dev/mtd/mtd2. This image may become corrupted during the read process.
 
  
 +
MTK-Tools by Bruno Martins
 +
MTK unpack script (last update: 30-12-2014)
 +
 +
Valid Android signature found...
 +
 +
Input file information:
 +
 +
  Header:
 +
 +
  Boot magic: ANDROID!
 +
  Kernel size (bytes): 5076992 (0x004d7800)
 +
  Kernel load address: 0x10008000
 +
 +
  Ramdisk size (bytes): 4099097 (0x003e8c19)
 +
  Ramdisk load address: 0x11000000
 +
  Second stage size (bytes): 0 (0x00000000)
 +
  Second stage load address: 0x10f00000
 +
 +
  Tags address: 0x10000100
 +
  Page size (bytes): 2048 (0x00000800)
 +
  ASCIIZ product name: ''
 +
  Command line: ''
 +
  ID: b2fff3b00c887fac7dd1eb1b1615b1817f6adec3
 +
 +
  Other:
 +
 +
  Boot magic offset: 0x00000000
 +
  Base address: 0x10000000
 +
 +
  Kernel offset: 0x00008000
 +
  Ramdisk offset: 0x01000000
 +
  Second stage offset: 0x00f00000
 +
  Tags offset: 0x00000100
 +
 +
Extra arguments written to 'TWRP_2810_Micromax_A350_KK.img-args.txt'
 +
Kernel written to 'TWRP_2810_Micromax_A350_KK.img-kernel.img'
 +
Ramdisk size: 13717 blocks
 +
Extracted ramdisk contents to directory 'TWRP_2810_Micromax_A350_KK.img-ramdisk'
 +
 +
Successfully unpacked kernel and ramdisk.
  
  

Revision as of 17:50, 5 January 2015

Menggunakan unpack-MT.pl

Download dari

https://github.com/bgcngm/mtk-tools/

Caranya

cd ~/Downloads
wget https://github.com/bgcngm/mtk-tools/archive/master.zip

Buka

cd ~/Downloads
unzip mtk-tools-master.zip

unpack boot.img dari upgrade ROM MTK

cd ~/lokasi-upgrade-ROM-MTK/
~/Downloads/mtk-tools-master/unpack-MTK.pl TWRP_2810_Micromax_A350_KK.img 

Hasilnya

MTK-Tools by Bruno Martins
MTK unpack script (last update: 30-12-2014)

Valid Android signature found...

Input file information:

 Header:

  Boot magic:			ANDROID!
  Kernel size (bytes):		5076992		(0x004d7800)
  Kernel load address:		0x10008000

  Ramdisk size (bytes):		4099097		(0x003e8c19)
  Ramdisk load address:		0x11000000
  Second stage size (bytes):	0		(0x00000000)
  Second stage load address:	0x10f00000 

  Tags address:			0x10000100
  Page size (bytes):		2048		(0x00000800)
  ASCIIZ product name:		
  Command line:			
  ID:				b2fff3b00c887fac7dd1eb1b1615b1817f6adec3

 Other:

  Boot magic offset:		0x00000000
  Base address:			0x10000000

  Kernel offset:		0x00008000
  Ramdisk offset:		0x01000000
  Second stage offset:		0x00f00000
  Tags offset:			0x00000100

Extra arguments written to 'TWRP_2810_Micromax_A350_KK.img-args.txt'
Kernel written to 'TWRP_2810_Micromax_A350_KK.img-kernel.img'
Ramdisk size: 13717 blocks
Extracted ramdisk contents to directory 'TWRP_2810_Micromax_A350_KK.img-ramdisk'

Successfully unpacked kernel and ramdisk.


Referensi