Jump to content

Check us out:

- - - - -

How to create an insecure boot image


8 replies to this topic

#1 OFFLINE   p3droid

    Chief Of Staff

  • Administrators
  • 1,396 posts
  • Device:Motorola Droid

Posted 15 December 2011 - 09:08 PM

THIS MUST ALL BE DONE IN LINUX ***

You will need the fastboot files from Google or a boot image.

1) you will need to extract the ramdisk from the kernel
2) you will then need to unpack the ramdisk
3) you will need to edit the default.prop
4) you need to repack the ramdisk
5) you need to marry the ramdisk to the kernel
6) you need to flash this to your device


*****************************************************************************
Getting it all Ready
1. create a folder and name it whatever you want
2. put the following files in the folder: split_bootimg.pl, mkbootimg,
3. put the boot.img in the folder

Unpacking the bootimg
1. open command terminal and navigate to the folder you created
2. in terminal type the following command: ./split_bootimg.pl boot.img

Unpacking the ramdisk
1. in terminal create a new folder named ram - type - mkdir ram
2. go to the new folder - type - cd ram
3. unpack the ramdisk - type - gunzip -c ../boot.img-ramdisk.gz | cpio -i

Edit the Default.prop
1. Change this line from ro.secure=1 to ro.secure=0

Repack the Ramdisk
1. in terminal - type - find . | cpio -o -H newc | gzip > ../new.cpio.gz
2. in terminal - type - cd ..

Rejoin kernel and ramdisk
1. in terminal - type - ./mkbootimg --cmdline 'console=ttyO2,115200n8 androidboot.console=ttyO2' --kernel boot.img-kernel --ramdisk new.cpio.gz -o rooted.img

***********************************************
Congratulations you have just create your insecure boot image, now just flash it to your device.
***********************************************

The below script will do all that for you in less than 5 seconds, just place your boot.img in the extracted folder and select runme.bat, select run in terminal. Your new boot image is named rooted.img

Attached Files


Posted Image
> Register at MDW | MDW Rules and Guidelines <
Click the Posted Image in a member's post to thank them for their post!


Remove Advertisements Sponsored Links

    MyDroidWorld.com



#2 OFFLINE   Dustin0308

    Junior Droid

  • Members
  • PipPip
  • 12 posts
  • Device:HTC Thunderbolt

Posted 15 December 2011 - 09:58 PM

Great info. Thanks!

#3 OFFLINE   bigfoot

    MDW Noob

  • Members
  • Pip
  • 1 posts
  • Device:Droid Bionic

Posted 15 December 2011 - 10:55 PM

thanks

#4 OFFLINE   agreenbhm

    Android Pro

  • Members
  • 629 posts
  • Device:Droid

Posted 16 December 2011 - 09:31 AM

Good stuff P3. Only issue I ran into was permission denied on executing commands and/or the script. I d/l'd the package you provided in Windows then copied the extracted files to a Ubuntu virtual machine. I had to change to the folder on Ubuntu and run a chmod +x * in order to allow the scripts to execute.

#5 OFFLINE   p3droid

    Chief Of Staff

  • Administrators
  • 1,396 posts
  • Device:Motorola Droid

Posted 16 December 2011 - 05:13 PM

yes sorry, you always need to chmod +x or right click and set to executable.

Posted Image
> Register at MDW | MDW Rules and Guidelines <
Click the Posted Image in a member's post to thank them for their post!


#6 OFFLINE   RANDYRKELLY

    Android Master

  • Members
  • 992 posts
  • Twitter:twitter.com/rrkmdw
  • Device:Moto Droid

Posted 16 December 2011 - 10:33 PM

Thanks P3

Posted Image

:confusedIf Your Ever In A Bind And Can't Fix Your Droid, Just Gtalk Or Email Me RANDYRKELLY@GMAIL.COM:fire


#7 OFFLINE   runandhide05

    Junior Droid

  • Members
  • PipPip
  • 11 posts
  • Device:gnex

Posted 23 January 2012 - 06:40 PM

im missing something, and can not find after extensive googling, how in the heck do i pull my boot.img?

#8 OFFLINE   victorokinda

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 28 July 2012 - 12:54 AM

View Postrunandhide05, on 23 January 2012 - 06:40 PM, said:

im missing something, and can not find after extensive googling, how in the heck do i pull my boot.img?
I think you can get it from a CWM backup

#9 OFFLINE   ashoknrah

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 27 October 2012 - 03:51 AM

View Postp3droid, on 15 December 2011 - 09:08 PM, said:

THIS MUST ALL BE DONE IN LINUX ***

You will need the fastboot files from Google or a boot image.

1) you will need to extract the ramdisk from the kernel
2) you will then need to unpack the ramdisk
3) you will need to edit the default.prop
4) you need to repack the ramdisk
5) you need to marry the ramdisk to the kernel
6) you need to flash this to your device


*****************************************************************************
Getting it all Ready
1. create a folder and name it whatever you want
2. put the following files in the folder: split_bootimg.pl, mkbootimg,
3. put the boot.img in the folder

Unpacking the bootimg
1. open command terminal and navigate to the folder you created
2. in terminal type the following command: ./split_bootimg.pl boot.img

Unpacking the ramdisk
1. in terminal create a new folder named ram - type - mkdir ram
2. go to the new folder - type - cd ram
3. unpack the ramdisk - type - gunzip -c ../boot.img-ramdisk.gz | cpio -i

Edit the Default.prop
1. Change this line from ro.secure=1 to ro.secure=0

Repack the Ramdisk
1. in terminal - type - find . | cpio -o -H newc | gzip > ../new.cpio.gz
2. in terminal - type - cd ..

Rejoin kernel and ramdisk
1. in terminal - type - ./mkbootimg --cmdline 'console=ttyO2,115200n8 androidboot.console=ttyO2' --kernel boot.img-kernel --ramdisk new.cpio.gz -o rooted.img

***********************************************
Congratulations you have just create your insecure boot image, now just flash it to your device.
***********************************************

The below script will do all that for you in less than 5 seconds, just place your boot.img in the extracted folder and select runme.bat, select run in terminal. Your new boot image is named rooted.img


i am getting the following error

*****************************************
* Image Resize and Watermarking Script *
* By Gilbert Mendoza - SavvyAdmin.com! *
*****************************************

Page size: 2048 (0x00000800)
Kernel size: 2389352 (0x00247568)
Ramdisk size: 291391 (0x0004723f)
Second size: 0 (0x00000000)
Board name: S66-LAF-1
Command line:
Writing boot.img-kernel ... complete.
Writing boot.img-ramdisk.gz ... complete.
gzip: ../boot.img-ramdisk.gz: not in gzip format
cpio: premature end of archive
1 block
clean up
all done
now pushing to phone

please help!!!





8 user(s) are reading this topic

0 members, 8 guests, 0 anonymous users