diff --git a/Android.mk b/Android.mk index ca204d39..89eb7c63 100755 --- a/Android.mk +++ b/Android.mk @@ -151,7 +151,7 @@ else LOCAL_SHARED_LIBRARIES += libcrypto endif -ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0) +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0) LOCAL_SHARED_LIBRARIES += libbase endif diff --git a/twrp.cpp b/twrp.cpp index f81bdf91..7689c253 100755 --- a/twrp.cpp +++ b/twrp.cpp @@ -43,6 +43,11 @@ extern "C" { #include "twrp-functions.hpp" #include "data.hpp" #include "partitions.hpp" +#ifdef __ANDROID_API_N__ +#include +#else +#include +#endif #include "openrecoveryscript.hpp" #include "variables.h" #include "twrpAdbBuFifo.hpp" @@ -161,6 +166,8 @@ int main(int argc, char **argv) { } else { other_prop = current_prop; } + other_prop = android::base::Trim(other_prop); + current_prop = android::base::Trim(current_prop); string sys_val = TWFunc::System_Property_Get(other_prop, SarPartitionManager, "/s"); if (!sys_val.empty()) { LOGINFO("Overriding %s with value: \"%s\" from system property %s\n", current_prop.c_str(), sys_val.c_str(), other_prop.c_str());