This is a tutorial I've decided to put together as I'm learning to compile kernels. It will cover unpacking and repacking a boot.img and/or recovery.img, and also touch on unpacking the ramdisk after we have unpacked the boot.img This tutorial will only focus on executing this on a android device using the terminal emulator app but of course you could use these tools on a PC in a adb shell. <br />
<br />
This would not be possible without the hard work of xda member @<a href="http://ift.tt/1MEbDE9; target="_blank">Modding.MyMind</a>. I am not responsible for anything you do to yourself or your device by using these tools. <br />
<br />
What you will need<br />
1. Android device<br />
2. Have root<br />
3. Have busybox installed (1.23.1 is recommended)<br />
4. Terminal Emulator app<br />
5. Root Explorer app <br />
6. Your devices boot.img<br />
7. mkbootimg_tools-master.zip (download below)<br />
<br />
http://ift.tt/1GurL7f<br />
<br />
Directions;<br />
1. Let's pull the boot.img we are going to work with using dd. Open your terminal and type su > press enter. Type dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img > press enter and now you should see a file on your sdcard called boot.img <br />
2. Place the zip file on the root of your internal sdcard and extract it. You will see a folder called mkbootimg_tools-master and inside that folder you will see 2 folders. One called ARM and one called README.md Now we are going to copy the ARM folder to data/local/tmp and paste it inside of the tmp folder.<br />
3. Now we need to go the ARM folder that you just copied inside tmp and set the permissions to 0777 (rwxrwxrwx) and also set the same permissions for each file inside the ARM folder.<br />
4. Now go inside the ARM folder and copy the bash file to system/xbin and set the permission to chmod 0755 (rwxr-xr-x)<br />
5. Ok now copy the boot.img file that we pulled onto your sdcard inside the ARM folder and leave the permissions for that file 0666 (rw-rw-rw-)<br />
6. Now we are ready for the fun stuff! Open up your terminal emulator app and type su > press enter<br />
7. Now we are going to change directories to the ARM folder which we want to be in by typing cd data/local/tmp/ARM > press enter<br />
<br />
########################################<br />
<br />
Now to unpack your boot.img<br />
<br />
1. Type ./mkboot boot.img bootfolder > press enter and you will see the magic happen. It will automatically create a folder called bootfolder which is your project folder and you can name it whatever you like but I like to call it bootfolder and if I was unpacking a recovery.img I would call it recoveryfolder<br />
2. So now you have your unpacked boot.img.<br />
3. Now go to your terminal and type cd bootfolder > and press enter. We are going into your bootfolder now because that is where your ramdisk.gz is located and we are now going to decompress your ramdisk by typing gunzip -dc ramdisk.gz | cpio -i > and press enter and it will decompress your ramdisk for you.<br />
4. So now you have unpacked a boot.img and also learned how to decompress your ramdisk. <br />
<br />
#######################################<br />
<br />
Now we are going to repack your boot.img <br />
<br />
1. In your terminal type cd .. > and press enter so you will move back 1 directory into your ARM folder. <br />
2. Now to repack you are going to type ./mkboot bootfolder boot.img > and press enter and that will repack your boot.img for you<br />
<br />
*wherever you saw me type a > don't ever type that as I was just showing that you are done the command or syntax and your are ready to press enter<br />
<br />
Well I hope I was able to shed some light on my current project I'm working on which is developing a custom kernel for our victara. I will try to do my best to answer questions but again I'm learning just like you guys so we're in this together. Any additional info is very much welcomed and i will add it to the op. Thanks<br />
<br />
Source code http://ift.tt/1GurL7i<br />
<br />
Screenshot - http://ift.tt/1MEbDEd<br />
<br />
Screenshot - http://ift.tt/1MEbDEf<br/>
<br />
This would not be possible without the hard work of xda member @<a href="http://ift.tt/1MEbDE9; target="_blank">Modding.MyMind</a>. I am not responsible for anything you do to yourself or your device by using these tools. <br />
<br />
What you will need<br />
1. Android device<br />
2. Have root<br />
3. Have busybox installed (1.23.1 is recommended)<br />
4. Terminal Emulator app<br />
5. Root Explorer app <br />
6. Your devices boot.img<br />
7. mkbootimg_tools-master.zip (download below)<br />
<br />
http://ift.tt/1GurL7f<br />
<br />
Directions;<br />
1. Let's pull the boot.img we are going to work with using dd. Open your terminal and type su > press enter. Type dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/sdcard/boot.img > press enter and now you should see a file on your sdcard called boot.img <br />
2. Place the zip file on the root of your internal sdcard and extract it. You will see a folder called mkbootimg_tools-master and inside that folder you will see 2 folders. One called ARM and one called README.md Now we are going to copy the ARM folder to data/local/tmp and paste it inside of the tmp folder.<br />
3. Now we need to go the ARM folder that you just copied inside tmp and set the permissions to 0777 (rwxrwxrwx) and also set the same permissions for each file inside the ARM folder.<br />
4. Now go inside the ARM folder and copy the bash file to system/xbin and set the permission to chmod 0755 (rwxr-xr-x)<br />
5. Ok now copy the boot.img file that we pulled onto your sdcard inside the ARM folder and leave the permissions for that file 0666 (rw-rw-rw-)<br />
6. Now we are ready for the fun stuff! Open up your terminal emulator app and type su > press enter<br />
7. Now we are going to change directories to the ARM folder which we want to be in by typing cd data/local/tmp/ARM > press enter<br />
<br />
########################################<br />
<br />
Now to unpack your boot.img<br />
<br />
1. Type ./mkboot boot.img bootfolder > press enter and you will see the magic happen. It will automatically create a folder called bootfolder which is your project folder and you can name it whatever you like but I like to call it bootfolder and if I was unpacking a recovery.img I would call it recoveryfolder<br />
2. So now you have your unpacked boot.img.<br />
3. Now go to your terminal and type cd bootfolder > and press enter. We are going into your bootfolder now because that is where your ramdisk.gz is located and we are now going to decompress your ramdisk by typing gunzip -dc ramdisk.gz | cpio -i > and press enter and it will decompress your ramdisk for you.<br />
4. So now you have unpacked a boot.img and also learned how to decompress your ramdisk. <br />
<br />
#######################################<br />
<br />
Now we are going to repack your boot.img <br />
<br />
1. In your terminal type cd .. > and press enter so you will move back 1 directory into your ARM folder. <br />
2. Now to repack you are going to type ./mkboot bootfolder boot.img > and press enter and that will repack your boot.img for you<br />
<br />
*wherever you saw me type a > don't ever type that as I was just showing that you are done the command or syntax and your are ready to press enter<br />
<br />
Well I hope I was able to shed some light on my current project I'm working on which is developing a custom kernel for our victara. I will try to do my best to answer questions but again I'm learning just like you guys so we're in this together. Any additional info is very much welcomed and i will add it to the op. Thanks<br />
<br />
Source code http://ift.tt/1GurL7i<br />
<br />
Screenshot - http://ift.tt/1MEbDEd<br />
<br />
Screenshot - http://ift.tt/1MEbDEf<br/>
from xda-developers http://ift.tt/1GU0Mpi
Commentaires
Enregistrer un commentaire