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

Root [dev] ensuring your rom only flashes on the intended phone model

DRockstar

Newbie
For the record, I'm putting these tutorials in the second post of the All in One Root thread, but I didn't think some would think to look there, and this is important information for all ROM developers, especially for the indulge phone, since both models have different mounts and ROMs between the two really shouldn't be mixed if the mount points are used, or kernels are involved.

ENSURING YOUR ROM ONLY FLASHES ON THE INTENDED PHONE MODEL

Since the SCH-R910 (MetroPCS) and SCH-R915 (Cricket) phone models differ in their mounts, ROMs that use model exclusive mount points and kernels should have an assert included in the top of the updater-script to ensure that the zip will only flash on the intended phone model. This can be achieved by using the foollowing edify script:
Code:
ui_print("Verifying Phone Model...");
assert(getprop("ro.product.device") == "SCH-R910" ||
       getprop("ro.build.product") == "SCH-R910");
This will prevent a lot of borks we have to deal with in the IRC channels due to someone with with a Cricket model flashing a MetroPCS ROM, for example.
 
yea CM does this automatically when it packages after compiling.

Very good info and a must for phones like the indulge.
 
Back
Top Bottom