summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:26 +0200
committerEthan Yonker <dees_troy@teamw.in>2015-10-09 18:15:29 +0200
commitc798c9cd2486e0ff83776002c74f113677b10a84 (patch)
treed128a80cbc58e63a622fda2774e727611f9d2cd4 /twrp.cpp
parentAdd TW_IGNORE_ABS_MT_TRACKING_ID (diff)
parentmerge in mnc-release history after reset to mnc-dev (diff)
downloadandroid_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.gz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.bz2
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.lz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.xz
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.tar.zst
android_bootable_recovery-c798c9cd2486e0ff83776002c74f113677b10a84.zip
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 219c30612..c6d98c025 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -24,7 +24,6 @@
#include "cutils/properties.h"
extern "C" {
-#include "minadbd/adb.h"
#include "bootloader.h"
}
@@ -45,6 +44,13 @@ extern "C" {
#include "openrecoveryscript.hpp"
#include "variables.h"
#include "twrpDU.hpp"
+#ifdef TW_USE_NEW_MINADBD
+#include "adb.h"
+#else
+extern "C" {
+#include "minadbd.old/adb.h"
+}
+#endif
#ifdef HAVE_SELINUX
#include "selinux/label.h"
@@ -78,7 +84,11 @@ int main(int argc, char **argv) {
// Handle ADB sideload
if (argc == 3 && strcmp(argv[1], "--adbd") == 0) {
property_set("ctl.stop", "adbd");
+#ifdef TW_USE_NEW_MINADBD
+ adb_main(0, DEFAULT_ADB_PORT);
+#else
adb_main(argv[2]);
+#endif
return 0;
}