summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-11-06 16:49:25 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-11-06 16:49:25 +0100
commit26860098e8716628f15422af268c5186c76c1b1b (patch)
treee21e8b799369e535f4a112783919aae079b3a35b
parentFix some includes that are not longer present (diff)
downloadandroid_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar.gz
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar.bz2
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar.lz
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar.xz
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.tar.zst
android_bootable_recovery-26860098e8716628f15422af268c5186c76c1b1b.zip
-rw-r--r--Android.mk2
-rw-r--r--adb_install.cpp10
-rw-r--r--verifier.cpp4
-rw-r--r--verifier.h2
4 files changed, 7 insertions, 11 deletions
diff --git a/Android.mk b/Android.mk
index 535b778f4..4cc8b419d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -479,7 +479,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libaosprecovery
LOCAL_MODULE_TAGS := eng optional
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
-LOCAL_SRC_FILES = adb_install.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c
+LOCAL_SRC_FILES = adb_install.cpp asn1_decoder.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c
LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload
LOCAL_STATIC_LIBRARIES += libmincrypttwrp
diff --git a/adb_install.cpp b/adb_install.cpp
index e10cb4a2e..c731d1cd2 100644
--- a/adb_install.cpp
+++ b/adb_install.cpp
@@ -107,11 +107,12 @@ apply_from_adb(const char* install_file) {
// appearance. (Note that inotify doesn't work with FUSE.)
int result;
int status;
+ int wipe_cache;
bool waited = false;
struct stat st;
for (int i = 0; i < ADB_INSTALL_TIMEOUT; ++i) {
if (waitpid(child, &status, WNOHANG) != 0) {
- result = INSTALL_ERROR;
+ result = -1;
waited = true;
break;
}
@@ -121,13 +122,14 @@ apply_from_adb(const char* install_file) {
sleep(1);
continue;
} else {
- ui->Print("\nTimed out waiting for package.\n\n", strerror(errno));
- result = INSTALL_ERROR;
+ printf("\nTimed out waiting for package.\n\n", strerror(errno));
+ result = -1;
kill(child, SIGKILL);
break;
}
}
- result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache, install_file, false);
+ printf("FIX ME: need to make adb sideload actually install the file!\n");
+ //result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, wipe_cache, install_file, false);
break;
}
diff --git a/verifier.cpp b/verifier.cpp
index b96ba3a0d..764b935b3 100644
--- a/verifier.cpp
+++ b/verifier.cpp
@@ -456,10 +456,6 @@ load_keys(const char* filename, int* numKeys) {
LOGE("unexpected character between keys\n");
goto exit;
}
-<<<<<<< HEAD
- LOGI("read key e=%d hash=%d\n", key->exponent, cert->hash_len);
-=======
->>>>>>> cddb68b5eafbeba696d5276bda1f1a9f70bbde42
}
}
diff --git a/verifier.h b/verifier.h
index 43fd5adcd..17ab257ad 100644
--- a/verifier.h
+++ b/verifier.h
@@ -26,8 +26,6 @@ enum { INSTALL_SUCCESS, INSTALL_ERROR, INSTALL_CORRUPT };
static const float VERIFICATION_PROGRESS_FRACTION = 0.25;
-typedef struct Certificate {
-
typedef struct {
p256_int x;
p256_int y;