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:

FILE=n/META-INF/com/google/android/updater-script
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/install-recovery.sh
cd n
zip -r ../o3.zip .

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

4 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: http://stackoverflow.com/questions/20162112/sed-syntax-explanation-android-updater-script . Would be great if you could have a look at it. 🙂

    Best

  2. […] I found the following suggestion to modify the updater script in order to be able to apply OTA updates to modified […]

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