[DNM] init: Spoof build type property to user
Also set release-keys and disable `ro.debuggable`. Avoids "root" detection in some banking-related apps whilst having the convenience of userdebug builds, such as adb root or permissive selinux. Avoid this in eng build to keep necessary debugging intact. Change-Id: I78ec5abe4db8083c0e02157c0bcd1a3d99fb9a5d
This commit is contained in:
parent
62be9a675d
commit
d46c1bffa9
|
@ -153,6 +153,7 @@ libinit_cc_defaults {
|
|||
},
|
||||
eng: {
|
||||
cppflags: [
|
||||
"-DENG_BUILD",
|
||||
"-USHUTDOWN_ZERO_TIMEOUT",
|
||||
"-DSHUTDOWN_ZERO_TIMEOUT=1",
|
||||
],
|
||||
|
|
|
@ -1366,6 +1366,12 @@ static void SetSafetyNetProps() {
|
|||
InitPropertySet("ro.boot.verifiedbootstate", "green");
|
||||
InitPropertySet("ro.boot.veritymode", "enforcing");
|
||||
InitPropertySet("ro.build.tags", "release-keys");
|
||||
|
||||
#ifndef ENG_BUILD
|
||||
// Spoof non-eng builds (such as userdebug) to user
|
||||
InitPropertySet("ro.build.type", "user");
|
||||
InitPropertySet("ro.debuggable", "0");
|
||||
#endif
|
||||
}
|
||||
|
||||
void PropertyInit() {
|
||||
|
|
Loading…
Reference in New Issue