• 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
Jul 10, 2011
24
40
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.
 
  • Like
Reactions: tiede and isujoy

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