From f14af80a1418acdc0ae6fea3da0285a357d57182 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 10 Feb 2015 14:46:14 -0800 Subject: recovery: Properly detect userdebug or eng builds The recovery system behaves a little bit differently on userdebug or eng builds by presenting error reports to the user in the ui. This is controlled by checking the build fingerprint for the string :userdebug/ or :eng/. But with AOSP version numbers most AOSP builds blows the 92 char limit of ro.build.fingerprint and therefore the property is not set, so this condition will always be evaluated to false, for most builds. Instead of depending on the flaky ro.build.fingerprint this change uses ro.debuggable. Change-Id: I74bc00c655ac596aaf4b488ecea58f0a8de9c26b --- common.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common.h') diff --git a/common.h b/common.h index 768f499f9..4f1c099df 100644 --- a/common.h +++ b/common.h @@ -17,6 +17,7 @@ #ifndef RECOVERY_COMMON_H #define RECOVERY_COMMON_H +#include #include #include @@ -46,6 +47,8 @@ FILE* fopen_path(const char *path, const char *mode); void ui_print(const char* format, ...); +bool is_ro_debuggable(); + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 682c34bbc32f3a9f007dd949282651ed35d4f6e3 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 7 Apr 2015 17:16:35 -0700 Subject: Rotate logs only when there are actual operations Currently it rotates the log files every time it boots into the recovery mode. We lose useful logs after ten times. This CL changes the rotation condition so that it will rotate only if it performs some actual operations that modify the flash (installs, wipes, sideloads and etc). Bug: 19695622 Change-Id: Ie708ad955ef31aa500b6590c65faa72391705940 --- common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'common.h') diff --git a/common.h b/common.h index 4f1c099df..b818ceb84 100644 --- a/common.h +++ b/common.h @@ -40,6 +40,7 @@ extern "C" { #define STRINGIFY(x) #x #define EXPAND(x) STRINGIFY(x) +extern bool modified_flash; typedef struct fstab_rec Volume; // fopen a file, mounting volumes and making parent dirs as necessary. -- cgit v1.2.3