Thursday, 7 April 2016

Fixing Updater Script Error [Yunique]


What is a updater script?

To install any ROM through a custom recovery, you need to have an updater-script. It’s basically a few lines of commands that tells your Android recovery what to do. These files are also widely used with Aroma Installer and other scripting engines, but of course everyone knows this already. However, a problem arises when you need to create your own updater-script from scratch, as it’s not always generated during the build process.

Most frequent error that I have seen is the "Updater script error"

To solve this:-

Extract the .zip package of the ROM

Go to META-INF >> com >> google >> android.

Then open "updater-script" binary in Notepad++.

Delete the first line. which says this:- 

assert(getprop("ro.product.device") == "YUNIQUE" || getprop("") == "YUNIQUE" || abort("This package is for device: YUNIQUE; this device is " + getprop("ro.product.device") + "."););

After this repack(add to archive) the contents of the folder extracted.

Note:- Add to zip archive and archive the contents of the folder not the folder directly.