Disable userdebug diagnostics

Change-Id: Icbdc3a61ab7b27f2aa0a6a07181b96edd9ee191a
This commit is contained in:
Michael Bestas 2023-10-18 17:38:24 +03:00
parent 35f66e77be
commit d26fdcfef2
No known key found for this signature in database
GPG key ID: CC95044519BE6669
23 changed files with 23 additions and 24 deletions

View file

@ -179,7 +179,7 @@ int main() {
printf("\n------ UFS error history ------\n");
std::string build_type = android::base::GetProperty(BUILD_TYPE_PROPERTY, "");
if (build_type == "userdebug") {
if (build_type == "eng") {
std::string sg_read_buffer = "/vendor/bin/sg_read_buffer";
std::ifstream sg_read_buffer_file(sg_read_buffer.c_str());
if (sg_read_buffer_file.is_open()) {

View file

@ -1,4 +1,4 @@
on property:ro.build.type=userdebug
on property:ro.build.type=eng
write /dev/sys/block/bootdevice/pixel/enable_pixel_ufs_logging 1
chown system /dev/sg3

View file

@ -3,6 +3,6 @@ BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/storage/sepolicy
PRODUCT_PACKAGES += dump_storage
# Pixel storage tool
PRODUCT_PACKAGES_DEBUG += \
PRODUCT_PACKAGES_ENG += \
sg_write_buffer \
sg_read_buffer