From 3454ade92db48236057814f0ade5fa45bd57cd62 Mon Sep 17 00:00:00 2001 From: Dees Troy Date: Tue, 20 Jan 2015 19:21:04 +0000 Subject: Use /twres instead of /res for theme resources AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7 --- twrp-functions.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'twrp-functions.cpp') diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 50f05a70a..15f442f76 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -354,30 +354,30 @@ void TWFunc::install_htc_dumlock(void) { return; gui_print("Installing HTC Dumlock to system...\n"); - copy_file("/res/htcd/htcdumlocksys", "/system/bin/htcdumlock", 0755); + copy_file(TWHTCD_PATH "htcdumlocksys", "/system/bin/htcdumlock", 0755); if (!Path_Exists("/system/bin/flash_image")) { gui_print("Installing flash_image...\n"); - copy_file("/res/htcd/flash_imagesys", "/system/bin/flash_image", 0755); + copy_file(TWHTCD_PATH "flash_imagesys", "/system/bin/flash_image", 0755); need_libs = 1; } else gui_print("flash_image is already installed, skipping...\n"); if (!Path_Exists("/system/bin/dump_image")) { gui_print("Installing dump_image...\n"); - copy_file("/res/htcd/dump_imagesys", "/system/bin/dump_image", 0755); + copy_file(TWHTCD_PATH "dump_imagesys", "/system/bin/dump_image", 0755); need_libs = 1; } else gui_print("dump_image is already installed, skipping...\n"); if (need_libs) { gui_print("Installing libs needed for flash_image and dump_image...\n"); - copy_file("/res/htcd/libbmlutils.so", "/system/lib/libbmlutils.so", 0755); - copy_file("/res/htcd/libflashutils.so", "/system/lib/libflashutils.so", 0755); - copy_file("/res/htcd/libmmcutils.so", "/system/lib/libmmcutils.so", 0755); - copy_file("/res/htcd/libmtdutils.so", "/system/lib/libmtdutils.so", 0755); + copy_file(TWHTCD_PATH "libbmlutils.so", "/system/lib/libbmlutils.so", 0644); + copy_file(TWHTCD_PATH "libflashutils.so", "/system/lib/libflashutils.so", 0644); + copy_file(TWHTCD_PATH "libmmcutils.so", "/system/lib/libmmcutils.so", 0644); + copy_file(TWHTCD_PATH "libmtdutils.so", "/system/lib/libmtdutils.so", 0644); } gui_print("Installing HTC Dumlock app...\n"); mkdir("/data/app", 0777); unlink("/data/app/com.teamwin.htcdumlock*"); - copy_file("/res/htcd/HTCDumlock.apk", "/data/app/com.teamwin.htcdumlock.apk", 0777); + copy_file(TWHTCD_PATH "HTCDumlock.apk", "/data/app/com.teamwin.htcdumlock.apk", 0777); sync(); gui_print("HTC Dumlock is installed.\n"); } -- cgit v1.2.3