[Tutorial] Make Your Own Recovery[Noob Friendly][World's First Recovery Editing Tuto]
Hi. Before continuing, what is recovery? Your Android device has 6-10 partitions. They are boot, recovery, system, misc and many more. Almost all devices has eMMC partition system but also MTD is alive. And there are some exceptional devices like Galaxy Nexus. So what is an exceptional partition system? Galaxy Nexus has MTD0 ( Boot partition ). But other partitions are in eMMC system. So let's go on; recovery is a partition like boot or system. In Linux, you can see partitions as files. But they are not files. They are symlinks in Linux. They are 0 Bite as you see. When you flash a partition IMG like recovery, the IMG file sits on the recovery partition. But we can't see real directory of those symlinks on Android 1.7 or above. Yes, that means Android is not fully opensource. Android was a fully opensoruce OS until Android 1.7 ( 1.6 was fully opensource. ). That means we can' t really edit the Android OS because we can't see real directories of partition symlinks. In this tutorial, we'll edit a recovery IMG.
Let' s Begin!
If you know C and Perl, you're not a noob you can add new features to recoveries. But this tutorial is noob friendly so in this tutorial, we'll just edit the ramdisk of recovery. So what is ramdisk? Ramdisk is a small partition in Linux. It manages and contains init files. A normal ramdisk contains these files and folders :
A recovery ramdisk contains extra files. Why? Because an Android recovery has a user interface and it should contain images and more. So recovery ramdisk is not a normal Linux ramdisk. Here are extra files and folders :
So we know contents of ramdisks, let' s edit a recovery!
First, you must use Linux for this. I prefer Ubuntu 13.04. Then, install Gzip and Gunzip packages to unpack recovery IMG. Then find and download a recovery IMG for your device. I prefer; download CWM image because TWRP isn't basic. You can download CWM from here: http://www.clockworkmod.com/rommanager
Unpacking the recovery image
Create a new directory on your desktop. Then download and put these Perl scripts to that directory( Perl scripts are in zip files. Extract those scripts! ): http://forum.xda-developers.com/atta...4&d=1226283768
. Then put your downloaded recovery image to the same folder and rename it to recovery.img . Then open a terminal console and navigate it to your folder. Run unpack script with this command ( Just enter this command when you're in the your new directory on terminal ) :
And finally, we unpacked the recovery image. Note that these scripts should work for all partition images.
Editing the ramdisk
Now, we unpacked the image that means you can edit everything in the image. But in this tutorial we'll edit the ramdisk. Go to ramdisk-recovery.img folder. That is ramdisk of our recovery image. So you're free! Edit as you like. Just tamper the ramdisk and other folders. By the way, recovery PNGs is in the /res/images/ ( In ramdisk folder ) folder. After editing the ramdisk let' s pack the recovery image;
Repacking the recovery image
To repacking the image just enter this command in terminal ( Don't forget to navigate your directory using this command; cd /UserName/Desktop/FolderName ) :
Congrats! You maked your own Android Recovery
. Don' t forget to use Thanks button
. You can install the IMG file using Fastboot.