Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,638 Members 54,225 Now Online
XDA Developers Android and Mobile Development Forum

[TUTORIAL] How to integrate a custom recovery into your custom ROM

Tip us?
 
DaRk-L0rD
Old
(Last edited by DaRk-L0rD; 17th March 2014 at 07:48 AM.)
#1  
DaRk-L0rD's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 4552
Posts: 1,922
Join Date: Sep 2012
Location: Isla de Muerta

 
DONATE TO ME
Angry [TUTORIAL] How to integrate a custom recovery into your custom ROM



Hello everyone

In this tutorial i will show you how to integrate the recovery into a custom rom.
This way users will not have to install it separately






REQUIREMENTS:
  • You must know how to build a custom rom using Android Kitchen.
  • You must know how to edit an updater-script using Notepad++.
  • The WORKING folder of your rom (the one you get from the android kitchen when you extract system.img or zip folder or system.tar).
  • The recovery's flashable zip.


For this tutorial i am gonna use the PhilZ Touch CWM as example but this method is universal for all recoveries.


So, let's start:


1. Create in the kitchen's WORKING folder, a new folder and name it system2 (in your case working folder's name is gonna be different).

 


2. Extact the recovery's system folder contents into the system2 folder (the one previously created).


 


3. From the recovery's META-INF folder open, using Notepad++, the updater-script.

In my case looks like this:


 



4. Before proceeding, let me explain what is going on with the following lines:

package_extract_file("system/bin/recovery.tar", "/system/bin/recovery.tar");
package_extract_file("system/bin/taimport", "/system/bin/taimport");
package_extract_file("system/bin/taimportx", "/system/bin/taimportx");
package_extract_dir("system/btmgr", "/system/btmgr");


----- package_extract_dir( , /) This command extracts all the files from the folder mentioned inside first quotation to the directory inside second quotation. -----


So since you created a new folder named system2, the above lines should be edited and look like this:

package_extract_file("system2/bin/recovery.tar", "/system/bin/recovery.tar");
package_extract_file("system2/bin/taimport", "/system/bin/taimport");
package_extract_file("system2/bin/taimportx", "/system/bin/taimportx");
package_extract_dir("system2/btmgr", "/system/btmgr");


 


5. Now open, using Notepad++, the updater-script for your rom.

6. Now copy the edited lines from the recovery's updater-script into the updater-script of your rom (add them at the bottom). Remove the show_progress lines. Now save the file.

 


7. Now you can build your rom and enjoy the integrated recovery!

8. Happy rom building

If you like my work, please consider buying me a beer! Thanks in advance!
SONY XPERIA Z1 & T

MY CONTRIBUTIONS
The Following 26 Users Say Thank You to DaRk-L0rD For This Useful Post: [ Click to Expand ]
 
DaRk-L0rD
Old
#2  
DaRk-L0rD's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 4552
Posts: 1,922
Join Date: Sep 2012
Location: Isla de Muerta

 
DONATE TO ME
reserved

If you like my work, please consider buying me a beer! Thanks in advance!
SONY XPERIA Z1 & T

MY CONTRIBUTIONS
The Following User Says Thank You to DaRk-L0rD For This Useful Post: [ Click to Expand ]
 
dipesh1502
Old
#3  
dipesh1502's Avatar
Senior Member
Thanks Meter 3223
Posts: 2,219
Join Date: Sep 2013
Location: MUMbai

 
DONATE TO ME
Too good
So you are back with your pc i guess:P


If You Like My Work Please Consider A Small Donation


For Donating Click Here
 
please do the following:
Sign in to your PayPal account page
Go to 'Send Payment'
Enter my email id "dipesh.febrius@gmail.com"
option "Personal payment" doesn't work for India, please set "Online purchases". and check Goods or Service (preferably service)
Make the payment of the desired amount of donation you want to send.
Thank you for your kind donations!
 
headache59
Old
#4  
Senior Member
Thanks Meter 61
Posts: 249
Join Date: Feb 2014
Awesome! Definitely looks much, much better than the "ms-dos" clone I see in my device
 
Pandemic
Old
#5  
Pandemic's Avatar
Senior Member
Thanks Meter 10973
Posts: 14,754
Join Date: Aug 2010
Location: MePpEl

 
DONATE TO ME
Bro @DaRk-L0rD
Very nice and very clear explained, specially for new ones



... My Projects & Work ...
 

... Latest ...
>> [XZ]MoonWalker SuperB V2 <<
>> [XZL]MoonWalker SuperB V2 <<
-----------------------
||> All My Work <||


 
serajr
Old
#6  
serajr's Avatar
Recognized Developer / Recognized Themer
Thanks Meter 8824
Posts: 2,283
Join Date: Apr 2011
Location: Rafard - SP
Very clever tutorial my friend!!
keep rocking...
I have paced these forests for so long
I don`t know, if I am a man or I am beast
I though hold deep within me, a quest for revenge
Then I must be a man as much as I can be
I have learned to speak the tongue of animal
I have learned to read the signs in bark and snow
I have taken within myself the spirits of my fathers long time gone
In this short time, far from home
A man of iron I`ve grown...
...A man of iron I have grown

(Hail Quorthon... RIP)

If you like my work and consider me worthy, consider DONATE me too. Thanks in advance!
The Following 2 Users Say Thank You to serajr For This Useful Post: [ Click to Expand ]
 
sandy7
Old
#7  
sandy7's Avatar
Recognized Contributor / Recognized Developer
Thanks Meter 6840
Posts: 6,179
Join Date: May 2012
Location: bangalore

 
DONATE TO ME
Nice guide..

U are featured on portal. Congrats

Sent from my C5303 using XDA Premium 4 mobile app
The Following User Says Thank You to sandy7 For This Useful Post: [ Click to Expand ]
 
josephnero
Old
#8  
josephnero's Avatar
Senior Member
Thanks Meter 503
Posts: 1,611
Join Date: Mar 2011
Location: Sanford NC
Congratz bro.your post is on portal.nice job
Galaxy S4 9505
The Following User Says Thank You to josephnero For This Useful Post: [ Click to Expand ]
 
Dickey Kid'deviel
Old
#9  
Dickey Kid'deviel's Avatar
Senior Member
Thanks Meter 123
Posts: 125
Join Date: Oct 2012
Great, its work for me!

Tags
build rom, custom rom, kitchen rom, recovery, xperia
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes