1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Devices' started by DRockstar, Sep 17, 2011.

  1. DRockstar

    DRockstar Newbie
    Thread Starter
    Rank:
    None
    Points:
    43
    Posts:
    24
    Joined:
    Jul 10, 2011

    Jul 10, 2011
    24
    40
    43
    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 (Text):
    1. ui_print("Verifying Phone Model...");
    2. assert(getprop("ro.product.device") == "SCH-R910" ||
    3.        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.
     

    Advertisement

    tiede and isujoy like this.
  2. PlayfulGod

    PlayfulGod Extreme Android User
    Rank:
    None
    Points:
    353
    Posts:
    8,103
    Joined:
    Jan 28, 2011

    Jan 28, 2011
    8,103
    4,933
    353
    Male
    Web Design and Hosting/PC Repair
    NW Georgia
    yea CM does this automatically when it packages after compiling.

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

Share This Page

Loading...