Fixing up your Android OTA file

If you’ve deleted some apps (e.g. using TitaniumBackup) and have a custom recovery, but you still want to apply an OTA, here’s what you can do:

  • unzip the OTA file (into a directory named “n”)
  • Run some sed commands:

cp $FILE t
sed -i '/apply_patch_check.*EmailGoogle/d;/apply_patch.*EmailGoogle/,+2d' $FILE
sed -i '/apply_patch_check.*PlusOne/d;/apply_patch.*PlusOne/,+2d' $FILE
sed -i '/apply_patch_check.*Gmail/d;/apply_patch.*Gmail/,+2d' $FILE
diff -u t $FILE
rm n/recovery/etc/
cd n
zip -r ../ .

and then use your custom recovery (e.g. clockwork) to install the zip.

2 Responses to Fixing up your Android OTA file

  1. Stephan says:

    Hi Miron, thanks for the post! I have a question, which I posted here: . Would be great if you could have a look at it. 🙂


Leave a Reply

Name and Email Address are required fields. Your email will not be published or shared with third parties.