Accéder au contenu principal

(How to) unpack/repack boot.img using terminal apk

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/>





from xda-developers http://ift.tt/1GU0Mpi

Commentaires

Posts les plus consultés de ce blog

The company behind Maker Faire and Make magazine has abruptly shut down

Maker Media, the company that publishes Make Magazine and Maker Faire is laying off its staff and halting its operations amidst financial troubles, according to TechCrunch . Maker Media CEO and founder Dale Dougherty confirmed to TechCrunch that the company was ceasing operations and that it had laid off 22 employees, citing financial difficulties with publishing a magazine and the lack of corporate sponsorship. “I started this 15 years ago and it’s always been a struggle as a business to make this work,” he told TechCrunch . “Print publishing is not a great business for anybody, but it works…barely. Events are hard . . . there was a drop off in corporate sponsorship.” Launched in 2005, Maker became a major publication covering the “Maker... Continue reading… from The Verge - All Posts http://bit.ly/2Kyfryk via IFTTT

[TOOL][UTILITY] CIKA - Carliv Image Kitchen for Android - unpack/repack boot-recovery

Hi, I present you my latest work: CIKA aka Carliv Image Kitchen for Android . So, what is this? It's a utility (tool) for unpacking and repacking boot and recovery images for many kind of android phones. I made two versions, one for windows users and one for linux users. The windows version works by dragging&dropping over the script you want to use, while the linux version will work with terminal commans (very simple commands though). What's inside? For windows version the scripts are batch files and for linux bash files , but the names are the same and they do same thing: clear_all will clear the working folder deleting any unpacked boot/recovery folder, but not the boot or recovery files (original or repacked). image_info will print on screen all informations about the image you want to check (sizes, offsets, cmdline, etc.) and all these infos will be saved in a text file (which will be deleted when you clear the folder - see point 1). This is handy if you don't...

Microsoft and Facebook’s record-setting undersea cable sets another record

The world’s highest capacity undersea cable could be capable of speeds that are 20 percent faster than thought theoretically possible. A recent experiment using 16QAM modulation achieved record transfer speeds of 26.2 Terabits per second on a 4,000 mile transatlantic cable jointly owned by Facebook and Microsoft. This represents a 20 percent improvement on the 20 Tbps each pair of the cable’s eight optic fibers was originally thought capable of, according to the team of researchers from Infinera that conducted the test. The speeds were demonstrated on the MAREA cable, which is currently the world’s highest capacity subsea cable with a total theoretical capacity of 160 Tbps. The cable, operated by Telxius, runs between Bilbao in Spain and... Continue reading… from The Verge - All Posts https://ift.tt/2TqZhLU via IFTTT