mirror of
https://github.com/CTCaer/CTCaer-TWRP.git
synced 2024-11-26 19:50:24 +00:00
fixes for fakeflash zips
For some reason fakeflash doesn't like to have superuser/su in /res, move it to its own subdir in /supersu. This allows a fakeflash zip built with 'make recoveryzip' to work correctly. Change-Id: I32e2e0f6dba55281d5c917e931c3ef0034964bcb
This commit is contained in:
parent
2cf31af561
commit
113ee73445
@ -192,7 +192,7 @@ ifneq ($(TW_EXCLUDE_SUPERSU), true)
|
||||
LOCAL_MODULE := su
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/supersu
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
@ -201,7 +201,7 @@ ifneq ($(TW_EXCLUDE_SUPERSU), true)
|
||||
LOCAL_MODULE := Superuser.apk
|
||||
LOCAL_MODULE_TAGS := eng
|
||||
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res/supersu
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
|
||||
LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||
include $(BUILD_PREBUILT)
|
||||
endif
|
||||
endif
|
||||
|
@ -981,7 +981,7 @@ main(int argc, char **argv) {
|
||||
rename("/system/recovery-from-boot.p", "/system/recovery-from-boot.bak");
|
||||
ui_print("Renamed stock recovery file in /system to prevent\nthe stock ROM from replacing TWRP.\n");
|
||||
}
|
||||
if (TWFunc::Path_Exists("/res/supersu/su") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) {
|
||||
if (TWFunc::Path_Exists("/supersu/su") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) {
|
||||
// Device doesn't have su installed
|
||||
DataManager_SetIntValue("tw_busy", 1);
|
||||
if (gui_startPage("installsu") != 0) {
|
||||
|
@ -716,11 +716,11 @@ bool TWFunc::Install_SuperSU(void) {
|
||||
if (!PartitionManager.Mount_By_Path("/system", true))
|
||||
return false;
|
||||
|
||||
if (copy_file("/res/supersu/su", "/system/xbin/su", 0755) != 0) {
|
||||
if (copy_file("/supersu/su", "/system/xbin/su", 0755) != 0) {
|
||||
LOGE("Failed to copy su binary to /system/bin\n");
|
||||
return false;
|
||||
}
|
||||
if (copy_file("/res/supersu/Superuser.apk", "/system/app/Superuser.apk", 0644) != 0) {
|
||||
if (copy_file("/supersu/Superuser.apk", "/system/app/Superuser.apk", 0644) != 0) {
|
||||
LOGE("Failed to copy Superuser app to /system/app\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user