예제 #1
0
def set_eavb_mode(serial, mode):
    try:
        adb_connection = Adb(serial=serial)
        adb_connection.set_prop(prop="persist.eavb.mode", value=mode.lower())
        return True
    except Exception as e:
        print "[{0}] Failed to set eavb mode '{1}'".format(serial, mode)
        print e.message
        return False
예제 #2
0
def set_gptp_automotive_profile(serial, state):
    try:
        state = "y" if state.lower() == "on" else "n"
        adb_connection = Adb(serial=serial)
        adb_connection.set_prop(prop="persist.gptp.automotive_profile",
                                value=state)
        return True
    except Exception as e:
        print "[{0}] Failed to set gptp automotive profile to {1}".format(
            serial, state)
        print e.message
        return False