Loading init/init.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -849,21 +849,6 @@ int SecondStageMain(int argc, char** argv) { auto is_installed = android::gsi::IsGsiInstalled() ? "1" : "0"; SetProperty(gsi::kGsiInstalledProp, is_installed); /* * For debug builds of S launching devices, init mounts debugfs for * enabling vendor debug data collection setup at boot time. Init will unmount it on * boot-complete after vendor code has performed the required initializations * during boot. Dumpstate will then mount debugfs in order to read data * from the same using the dumpstate HAL during bugreport creation. * Dumpstate will also unmount debugfs after bugreport creation. * first_api_level comparison is done here instead * of init.rc since init.rc parser does not support >/< operators. */ auto api_level = android::base::GetIntProperty("ro.product.first_api_level", 0); bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false); auto mount_debugfs = (is_debuggable && (api_level >= 31)) ? "1" : "0"; SetProperty("init.mount_debugfs", mount_debugfs); am.QueueBuiltinAction(SetupCgroupsAction, "SetupCgroups"); am.QueueBuiltinAction(SetKptrRestrictAction, "SetKptrRestrict"); am.QueueBuiltinAction(TestPerfEventSelinuxAction, "TestPerfEventSelinux"); Loading libutils/String8.cpp +10 −32 Original line number Diff line number Diff line Loading @@ -415,50 +415,28 @@ bool String8::removeAll(const char* other) { void String8::toLower() { toLower(0, size()); } const size_t length = size(); if (length == 0) return; void String8::toLower(size_t start, size_t length) { const size_t len = size(); if (start >= len) { return; } if (start+length > len) { length = len-start; } char* buf = lockBuffer(len); buf += start; while (length > 0) { char* buf = lockBuffer(length); for (size_t i = length; i > 0; --i) { *buf = static_cast<char>(tolower(*buf)); buf++; length--; } unlockBuffer(len); unlockBuffer(length); } void String8::toUpper() { toUpper(0, size()); } const size_t length = size(); if (length == 0) return; void String8::toUpper(size_t start, size_t length) { const size_t len = size(); if (start >= len) { return; } if (start+length > len) { length = len-start; } char* buf = lockBuffer(len); buf += start; while (length > 0) { char* buf = lockBuffer(length); for (size_t i = length; i > 0; --i) { *buf = static_cast<char>(toupper(*buf)); buf++; length--; } unlockBuffer(len); unlockBuffer(length); } // --------------------------------------------------------------------------- Loading libutils/include/utils/String8.h +0 −2 Original line number Diff line number Diff line Loading @@ -130,9 +130,7 @@ public: bool removeAll(const char* other); void toLower(); void toLower(size_t start, size_t numChars); void toUpper(); void toUpper(size_t start, size_t numChars); /* Loading rootdir/etc/linker.config.json +2 −3 Original line number Diff line number Diff line { "requireLibs": [ // Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt. "libdexfile_external.so", "libdexfiled_external.so", "libdexfile.so", "libdexfiled.so", "libnativebridge.so", "libnativehelper.so", "libnativeloader.so", Loading rootdir/init.rc +2 −2 Original line number Diff line number Diff line Loading @@ -985,7 +985,7 @@ on boot && property:ro.config.low_ram=true write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 on property:sys.boot_completed=1 && property:init.mount_debugfs=1 on property:sys.boot_completed=1 && property:ro.product.enforce_debugfs_restrictions=true umount /sys/kernel/debug on boot Loading Loading @@ -1263,7 +1263,7 @@ on userspace-reboot-resume on property:sys.boot_completed=1 && property:sys.init.userspace_reboot.in_progress=1 setprop sys.init.userspace_reboot.in_progress "" on early-init && property:init.mount_debugfs=1 on early-init && property:ro.product.enforce_debugfs_restrictions=true mount debugfs debugfs /sys/kernel/debug chmod 0755 /sys/kernel/debug Loading Loading
init/init.cpp +0 −15 Original line number Diff line number Diff line Loading @@ -849,21 +849,6 @@ int SecondStageMain(int argc, char** argv) { auto is_installed = android::gsi::IsGsiInstalled() ? "1" : "0"; SetProperty(gsi::kGsiInstalledProp, is_installed); /* * For debug builds of S launching devices, init mounts debugfs for * enabling vendor debug data collection setup at boot time. Init will unmount it on * boot-complete after vendor code has performed the required initializations * during boot. Dumpstate will then mount debugfs in order to read data * from the same using the dumpstate HAL during bugreport creation. * Dumpstate will also unmount debugfs after bugreport creation. * first_api_level comparison is done here instead * of init.rc since init.rc parser does not support >/< operators. */ auto api_level = android::base::GetIntProperty("ro.product.first_api_level", 0); bool is_debuggable = android::base::GetBoolProperty("ro.debuggable", false); auto mount_debugfs = (is_debuggable && (api_level >= 31)) ? "1" : "0"; SetProperty("init.mount_debugfs", mount_debugfs); am.QueueBuiltinAction(SetupCgroupsAction, "SetupCgroups"); am.QueueBuiltinAction(SetKptrRestrictAction, "SetKptrRestrict"); am.QueueBuiltinAction(TestPerfEventSelinuxAction, "TestPerfEventSelinux"); Loading
libutils/String8.cpp +10 −32 Original line number Diff line number Diff line Loading @@ -415,50 +415,28 @@ bool String8::removeAll(const char* other) { void String8::toLower() { toLower(0, size()); } const size_t length = size(); if (length == 0) return; void String8::toLower(size_t start, size_t length) { const size_t len = size(); if (start >= len) { return; } if (start+length > len) { length = len-start; } char* buf = lockBuffer(len); buf += start; while (length > 0) { char* buf = lockBuffer(length); for (size_t i = length; i > 0; --i) { *buf = static_cast<char>(tolower(*buf)); buf++; length--; } unlockBuffer(len); unlockBuffer(length); } void String8::toUpper() { toUpper(0, size()); } const size_t length = size(); if (length == 0) return; void String8::toUpper(size_t start, size_t length) { const size_t len = size(); if (start >= len) { return; } if (start+length > len) { length = len-start; } char* buf = lockBuffer(len); buf += start; while (length > 0) { char* buf = lockBuffer(length); for (size_t i = length; i > 0; --i) { *buf = static_cast<char>(toupper(*buf)); buf++; length--; } unlockBuffer(len); unlockBuffer(length); } // --------------------------------------------------------------------------- Loading
libutils/include/utils/String8.h +0 −2 Original line number Diff line number Diff line Loading @@ -130,9 +130,7 @@ public: bool removeAll(const char* other); void toLower(); void toLower(size_t start, size_t numChars); void toUpper(); void toUpper(size_t start, size_t numChars); /* Loading
rootdir/etc/linker.config.json +2 −3 Original line number Diff line number Diff line { "requireLibs": [ // Keep in sync with the "platform" namespace in art/build/apex/ld.config.txt. "libdexfile_external.so", "libdexfiled_external.so", "libdexfile.so", "libdexfiled.so", "libnativebridge.so", "libnativehelper.so", "libnativeloader.so", Loading
rootdir/init.rc +2 −2 Original line number Diff line number Diff line Loading @@ -985,7 +985,7 @@ on boot && property:ro.config.low_ram=true write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 on property:sys.boot_completed=1 && property:init.mount_debugfs=1 on property:sys.boot_completed=1 && property:ro.product.enforce_debugfs_restrictions=true umount /sys/kernel/debug on boot Loading Loading @@ -1263,7 +1263,7 @@ on userspace-reboot-resume on property:sys.boot_completed=1 && property:sys.init.userspace_reboot.in_progress=1 setprop sys.init.userspace_reboot.in_progress "" on early-init && property:init.mount_debugfs=1 on early-init && property:ro.product.enforce_debugfs_restrictions=true mount debugfs debugfs /sys/kernel/debug chmod 0755 /sys/kernel/debug Loading