A customer brought me a new off-brand Android tablet. Had to break the bad news about its fake specs (4->8 GB RAM, 32->256 GB storage, Android 10->13), but the ROM turned out to have some diabolical mods beyond that. 🧵
The TextView UI widget class is also rigged to reach into AnTuTu and change the reported benchmark score, percentile and device specs based on build.prop values.
TextView hooks don't end there: the Play Store, Play Services, Chrome and Google Files also get a few, faking the device's certification status, Android version and patch level, as well as hiding storage space numbers which would presumably report the real amount.
But perhaps most appalling is a complete defeat of the Android permissions system: since this build.prop value is unset, every app gets GRANT_INSTALL for every permission at install time. The function didn't decompile cleanly (reconstruction below) but I did confirm the behavior.
Also worth noting are ActivityManager hooks to engage a /proc/meminfo spoofer in the kernel at boot time (writes 8 to set MemTotal to 8388608 KB and update MemFree accordingly), and to divert the AnTuTu device verification screen.
PackageManager was modified to block installation of 36 system information/testing apps. Install attempts will return INSTALL_FAILED_INVALID_APK and display a "Software Error" toast. I had to mod CPU-Z with a new package name to take the screenshot above.