• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Mods Dummy Test OTA Package

I am trying to figure out how to create a dummy test file for testing out the OTA process. I have been told there is a way to make such a test OTA file, but have not been able to find any info on how to do so online.

Essentially, I want it to be in the format of an OTA package, but not to actually perform an OS update.
 
Welcome to AF, @Sofia Clover.

Are you familiar with the edify language / syntax used in the updater-script files of OTA .zip files?

Also, is your device rooted and do you have a custom recovery installed? If not, then you can't flash a modified .zip file without being able to sign it with the manufacturers signing keys...

You can indeed do what you're asking about, but you must be careful about what expressions you leave inside the updater-script file when you test it or flash it.

There's also a way to test it from a command line vs. flashing it from a custom recovery...but again, you'll need root for this.
 
Upvote 0
Well, probably the best way of doing what you're asking (and how I'd do it) would be to:
  • grab/use a OTA .zip file for my particular device
  • un-zip / extract the updater-script file or unpack the entire .zip file
  • carefully edit it to implement the desired changes; be sure to to NOT include any commands that might change your device (ui_print is okay and non-destructive)
  • replace the old updater-script in your archive or extracted archived hiearchy
  • re-pack (re-zip) the .zip archive
  • test "flashing" the new (hopefully flashable) .zip file
You should be able to examine an existing updater-script file for "ui_print" expressions that are used to display output on the screen when flashed. From what you described, that's the only kind of expression you'd want in the file.

There are some caveats in the above process:
  • you must be careful to use an editor that does NOT introduce carriage-return characters at the end of each line; you only want newline characters as your line terminators
  • you also want to re-pack the .zip archive without compression; if you're using a Linux zip command, you'd use the -0 (that's a dash-zero, btw) option to indicate no compression should be performed
  • you should probably avoid using an OTA .zip file from a different device since the update-binary might not be the proper version
You can test flashing the .zip in the usual way via custom recovery (TWRP, etc.) or you can also test it from a root enable shell on your device (that takes a little extra work and other caveats so I won't include that here unless you ask).

Hope that helps!

:)
 
  • Like
Reactions: sweetndreemy73
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones