Fix for not loosing recovery flashing 5.0 "otapackage" Aosp Roms.

p4rot

Senior Member
Jan 5, 2013
537
319
0
Hi,
For those of you who don't know , flashing an Aosp source built ROM that was compiled with the command " make otapackage" will break and overwrite your custom recovery (for example Twrp).
But I came up with a fix for it when i saw that Scroler made a script to fix this problem for the Nexus 7 (2013) .
I modified it to work on the Nexus 4.
You only need to flash this in recovery as a zip file just after you flash your ROM.
So for example you would flash your ROM, the Don't_lose_Recovery. zip and after your gapps.
With this script your good to go and you will keep your beloved custom recovery.
Please note that I tested the script with Twrp and not with Clockworkmod recovery since I don't use this one.
Don't forget to hit the thanks button.
Happy flashing.
Link for the script : https://mega.co.nz/#!3wxB2azJ!nBoVqsrDWmfGDHP-egRt_Fwy3b2rRrseMSUPrj1PWzY
Thanks to Scroler for guiding me

Check out my Nexus 4 Aosp ROM here http://forum.xda-developers.com/nexus-4/development/rom-t2931659

Sent from my Nexus 4.
 
Last edited:

strapped365

Senior Member
Mar 14, 2011
5,161
2,797
0
Columbus
Can't you just remove the recovery from the zip....along with the line that flashes it from the updater script?

Its also easy to fastboot a recovery back when no one removes it from zips....
 

p4rot

Senior Member
Jan 5, 2013
537
319
0
Can't you just remove the recovery from the zip....along with the line that flashes it from the updater script?

Its also easy to fastboot a recovery back when no one removes it from zips....
It's not as easy as " if it break something I will remove it and everything will be fine", unfortunately.
But now this fix is built into my rom http://forum.xda-developers.com/showthread.php?t=2931659so there is one less zip to flash.

Sent from my nexus 4
 
Last edited:

strapped365

Senior Member
Mar 14, 2011
5,161
2,797
0
Columbus
Is this a new 5.0 thing?? I've been flashing for quite a long time and I've literally never heard of this happening before.
A clean aosp build will produce the recovery also. Its as easy as deleting it, and the corresponding lines from updater-script or using the git commits to not include it...