diff options
author | big biff <bigbiff@teamw.in> | 2018-12-24 01:45:46 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.omnirom.org> | 2018-12-24 01:45:46 +0100 |
commit | cbd8cc5e06656a40f45b78adbb988b59564cb17a (patch) | |
tree | a9cfc4d4139549bdfeff66e4fe30d1d847375a6d /data.cpp | |
parent | prebuilt: resolve libext2_misc.so dependency for mke2fs (diff) | |
parent | Add option to use ro.serialno for generating device id (diff) | |
download | android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar.gz android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar.bz2 android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar.lz android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar.xz android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.tar.zst android_bootable_recovery-cbd8cc5e06656a40f45b78adbb988b59564cb17a.zip |
Diffstat (limited to 'data.cpp')
-rw-r--r-- | data.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -146,6 +146,16 @@ void DataManager::get_device_id(void) { #endif #ifndef TW_FORCE_CPUINFO_FOR_DEVICE_ID +#ifdef TW_USE_SERIALNO_PROPERTY_FOR_DEVICE_ID + // Check serial number system property + if (property_get("ro.serialno", line, "")) { + snprintf(device_id, DEVID_MAX, "%s", line); + sanitize_device_id(device_id); + mConst.SetValue("device_id", device_id); + return; + } +#endif + // Check the cmdline to see if the serial number was supplied fp = fopen("/proc/cmdline", "rt"); if (fp != NULL) { |