resolved conflicts for merge of 35efcd27 to lmp-mr1-dev-plus-aosp
Change-Id: I6f2ea07df2ab80a44301d9c3a2a8841c40a46002
This commit is contained in:
+1
-3
@@ -61,9 +61,7 @@ stop_adbd() {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
maybe_restart_adbd() {
|
maybe_restart_adbd() {
|
||||||
char value[PROPERTY_VALUE_MAX+1];
|
if (is_ro_debuggable()) {
|
||||||
int len = property_get("ro.debuggable", value, NULL);
|
|
||||||
if (len == 1 && value[0] == '1') {
|
|
||||||
ui->Print("Restarting adbd...\n");
|
ui->Print("Restarting adbd...\n");
|
||||||
set_usb_driver(true);
|
set_usb_driver(true);
|
||||||
property_set("ctl.start", "adbd");
|
property_set("ctl.start", "adbd");
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
#ifndef RECOVERY_COMMON_H
|
#ifndef RECOVERY_COMMON_H
|
||||||
#define RECOVERY_COMMON_H
|
#define RECOVERY_COMMON_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
@@ -46,6 +47,8 @@ FILE* fopen_path(const char *path, const char *mode);
|
|||||||
|
|
||||||
void ui_print(const char* format, ...);
|
void ui_print(const char* format, ...);
|
||||||
|
|
||||||
|
bool is_ro_debuggable();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+6
-3
@@ -169,6 +169,11 @@ fopen_path(const char *path, const char *mode) {
|
|||||||
return fp;
|
return fp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_ro_debuggable() {
|
||||||
|
char value[PROPERTY_VALUE_MAX+1];
|
||||||
|
return (property_get("ro.debuggable", value, NULL) == 1 && value[0] == '1');
|
||||||
|
}
|
||||||
|
|
||||||
static void redirect_stdio(const char* filename) {
|
static void redirect_stdio(const char* filename) {
|
||||||
// If these fail, there's not really anywhere to complain...
|
// If these fail, there's not really anywhere to complain...
|
||||||
freopen(filename, "a", stdout); setbuf(stdout, NULL);
|
freopen(filename, "a", stdout); setbuf(stdout, NULL);
|
||||||
@@ -1111,9 +1116,7 @@ main(int argc, char **argv) {
|
|||||||
// If this is an eng or userdebug build, then automatically
|
// If this is an eng or userdebug build, then automatically
|
||||||
// turn the text display on if the script fails so the error
|
// turn the text display on if the script fails so the error
|
||||||
// message is visible.
|
// message is visible.
|
||||||
char buffer[PROPERTY_VALUE_MAX+1];
|
if (is_ro_debuggable()) {
|
||||||
property_get("ro.build.fingerprint", buffer, "");
|
|
||||||
if (strstr(buffer, ":userdebug/") || strstr(buffer, ":eng/")) {
|
|
||||||
ui->ShowText(true);
|
ui->ShowText(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user