Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP DaRk-L0rD

14th March 2014, 12:20 AM   |  #1  
DaRk-L0rD's Avatar
OP Recognized Contributor / Themer
Isla de Muerte
Thanks Meter: 5,279
 
2,082 posts
Join Date:Joined: Sep 2012
Donate to Me
More


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
Last edited by DaRk-L0rD; 17th March 2014 at 08:48 AM.
The Following 27 Users Say Thank You to DaRk-L0rD For This Useful Post: [ View ]
14th March 2014, 12:21 AM   |  #2  
DaRk-L0rD's Avatar
OP Recognized Contributor / Themer
Isla de Muerte
Thanks Meter: 5,279
 
2,082 posts
Join Date:Joined: Sep 2012
Donate to Me
More
reserved
The Following User Says Thank You to DaRk-L0rD For This Useful Post: [ View ]
14th March 2014, 03:34 AM   |  #3  
dipesh1502's Avatar
Recognized Themer
Flag MUMbai
Thanks Meter: 3,756
 
2,389 posts
Join Date:Joined: Sep 2013
Donate to Me
More
Too good
So you are back with your pc i guess:P
14th March 2014, 06:45 AM   |  #4  
Senior Member
Thanks Meter: 63
 
264 posts
Join Date:Joined: Feb 2014
Awesome! Definitely looks much, much better than the "ms-dos" clone I see in my device
14th March 2014, 04:45 PM   |  #5  
Pandemic's Avatar
Senior Member
Flag MePpEl
Thanks Meter: 12,124
 
16,011 posts
Join Date:Joined: Aug 2010
Donate to Me
More
Bro @DaRk-L0rD
Very nice and very clear explained, specially for new ones
15th March 2014, 05:55 AM   |  #6  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 10,604
 
2,830 posts
Join Date:Joined: Apr 2011
Donate to Me
More
Very clever tutorial my friend!!
keep rocking...
The Following 2 Users Say Thank You to serajr For This Useful Post: [ View ]
16th March 2014, 09:18 AM   |  #7  
sandy7's Avatar
Recognized Contributor / Recognized Developer
Flag bangalore
Thanks Meter: 6,883
 
6,202 posts
Join Date:Joined: May 2012
Donate to Me
More
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: [ View ]
16th March 2014, 06:25 PM   |  #8  
josephnero's Avatar
Senior Member
Flag Sanford NC
Thanks Meter: 507
 
1,639 posts
Join Date:Joined: Mar 2011
More
Congratz bro.your post is on portal.nice job
The Following User Says Thank You to josephnero For This Useful Post: [ View ]
17th July 2014, 07:07 PM   |  #9  
Dickey Kid'deviel's Avatar
Senior Member
Thanks Meter: 171
 
147 posts
Join Date:Joined: Oct 2012
Great, its work for me!

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes