diff options
276 files changed, 1415 insertions, 14748 deletions
diff --git a/Android.mk b/Android.mk index 582b710ea..d6a318ba5 100644 --- a/Android.mk +++ b/Android.mk @@ -40,6 +40,12 @@ TWHTCD_PATH := $(TWRES_PATH)htcd/ TARGET_RECOVERY_GUI := true +ifneq ($(TW_DEVICE_VERSION),) + LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-$(TW_DEVICE_VERSION)"' +else + LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-0"' +endif + LOCAL_SRC_FILES := \ twrp.cpp \ fixContexts.cpp \ @@ -153,25 +159,16 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) #LOCAL_STATIC_LIBRARIES += liblz4 endif endif -ifneq ($(wildcard external/libselinux/Android.mk),) - TWHAVE_SELINUX := true -endif -ifeq ($(TWHAVE_SELINUX), true) - #LOCAL_C_INCLUDES += external/libselinux/include - #LOCAL_STATIC_LIBRARIES += libselinux - #LOCAL_CFLAGS += -DHAVE_SELINUX -g -endif # HAVE_SELINUX -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_C_INCLUDES += external/libselinux/include - LOCAL_SHARED_LIBRARIES += libselinux - LOCAL_CFLAGS += -DHAVE_SELINUX -g - ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) - LOCAL_CFLAGS += -DUSE_EXT4 - LOCAL_C_INCLUDES += system/extras/ext4_utils - LOCAL_SHARED_LIBRARIES += libext4_utils - ifneq ($(wildcard external/lz4/Android.mk),) - LOCAL_STATIC_LIBRARIES += liblz4 - endif + +LOCAL_C_INCLUDES += external/libselinux/include +LOCAL_SHARED_LIBRARIES += libselinux +LOCAL_CFLAGS += -g +ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) + LOCAL_CFLAGS += -DUSE_EXT4 + LOCAL_C_INCLUDES += system/extras/ext4_utils + LOCAL_SHARED_LIBRARIES += libext4_utils + ifneq ($(wildcard external/lz4/Android.mk),) + LOCAL_STATIC_LIBRARIES += liblz4 endif endif @@ -302,6 +299,8 @@ ifeq ($(TW_INCLUDE_CRYPTO), true) LOCAL_SHARED_LIBRARIES += libe4crypt endif endif +WITH_CRYPTO_UTILS := \ + $(if $(wildcard system/core/libcrypto_utils/Android.mk),true) ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true) LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID endif @@ -362,7 +361,6 @@ LOCAL_ADDITIONAL_DEPENDENCIES += \ teamwin \ toolbox_symlinks \ twrp \ - unpigz_symlink \ fsck.fat \ fatlabel \ mkfs.fat \ @@ -382,6 +380,11 @@ else endif ifneq ($(TW_USE_TOOLBOX), true) LOCAL_ADDITIONAL_DEPENDENCIES += busybox_symlinks + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) + LOCAL_POST_INSTALL_CMD := \ + $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin && \ + ln -sf /sbin/busybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh + endif else ifneq ($(wildcard external/toybox/Android.mk),) LOCAL_ADDITIONAL_DEPENDENCIES += toybox_symlinks @@ -393,6 +396,7 @@ else LOCAL_ADDITIONAL_DEPENDENCIES += unzip endif endif + ifneq ($(TW_NO_EXFAT), true) LOCAL_ADDITIONAL_DEPENDENCIES += mkexfatfs fsckexfat ifneq ($(TW_NO_EXFAT_FUSE), true) @@ -501,10 +505,8 @@ endif # If busybox does not have restorecon, assume it does not have SELinux support. # Then, let toolbox provide 'ls' so -Z is available to list SELinux contexts. -ifeq ($(TWHAVE_SELINUX), true) - ifeq ($(filter restorecon, $(notdir $(BUSYBOX_LINKS))),) - exclude += ls - endif +ifeq ($(filter restorecon, $(notdir $(BUSYBOX_LINKS))),) + exclude += ls endif RECOVERY_BUSYBOX_TOOLS := $(filter-out $(exclude), $(notdir $(BUSYBOX_LINKS))) @@ -600,10 +602,6 @@ ifeq ($(AB_OTA_UPDATER),true) LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 endif -ifneq ($(BOARD_RECOVERY_BLDRMSG_OFFSET),) - LOCAL_CFLAGS += -DBOARD_RECOVERY_BLDRMSG_OFFSET=$(BOARD_RECOVERY_BLDRMSG_OFFSET) -endif - include $(BUILD_SHARED_LIBRARY) # All the APIs for testing @@ -615,7 +613,7 @@ LOCAL_SRC_FILES := \ asn1_decoder.cpp \ verifier.cpp \ ui.cpp -LOCAL_STATIC_LIBRARIES := libcrypto +LOCAL_STATIC_LIBRARIES := libcrypto_static include $(BUILD_STATIC_LIBRARY) commands_recovery_local_path := $(LOCAL_PATH) diff --git a/bootloader_message/Android.mk b/bootloader_message/Android.mk index 8653fd525..1d5c85fe3 100644 --- a/bootloader_message/Android.mk +++ b/bootloader_message/Android.mk @@ -37,5 +37,9 @@ else LOCAL_SHARED_LIBRARIES += libc++ endif LOCAL_CFLAGS := -DEXCLUDE_FS_MGR +# ignore bootloader's factory reset command even when written to /misc +ifeq ($(TW_IGNORE_MISC_WIPE_DATA), true) + LOCAL_CFLAGS += -DIGNORE_MISC_WIPE_DATA +endif LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include include $(BUILD_SHARED_LIBRARY) diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp index eb99bdb42..449f40e11 100644 --- a/bootloader_message/bootloader_message.cpp +++ b/bootloader_message/bootloader_message.cpp @@ -39,7 +39,7 @@ static std::string misc_blkdev; -void set_misc_device(const char* type, const char* name) { +void set_misc_device(std::string name) { misc_blkdev = name; } @@ -159,7 +159,10 @@ static bool write_misc_partition(const void* p, size_t size, size_t offset, std: *err = "no misc device set"; return false; } - int fd = (open(misc_blk_device.c_str(), O_WRONLY | O_SYNC)); + int open_flags = O_WRONLY | O_SYNC; + if (offset > 0) + open_flags = O_RDWR | O_APPEND | O_SYNC; + int fd = (open(misc_blk_device.c_str(), open_flags)); if (fd == -1) { *err = "failed to open " + misc_blk_device + ": "; *err += strerror(errno); @@ -284,6 +287,17 @@ get_args(int *argc, char ***argv) { (*argv)[0] = strdup(arg); for (*argc = 1; *argc < MAX_ARGS; ++*argc) { if ((arg = strtok(NULL, "\n")) == NULL) break; + +// if the device does not have an own recovery key combo we just want to open TWRP after +// walking through the factory reset screen - without actually doing a factory reset +#ifdef IGNORE_MISC_WIPE_DATA + if (!strcmp(arg, "--wipe_data")) { + (*argv)[*argc] = ""; + *argc = *argc -1; + printf("Bootloader arg \"%s\" ignored because TWRP was compiled with TW_IGNORE_MISC_WIPE_DATA\n", arg); + continue; + } +#endif (*argv)[*argc] = strdup(arg); } printf("Got arguments from boot message\n"); diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h index b4d3604e7..e0fc2cd8a 100644 --- a/bootloader_message/include/bootloader_message/bootloader_message.h +++ b/bootloader_message/include/bootloader_message/bootloader_message.h @@ -25,8 +25,13 @@ // 16K - 64K Used by uncrypt and recovery to store wipe_package for A/B devices // Note that these offsets are admitted by bootloader,recovery and uncrypt, so they // are not configurable without changing all of them. +#ifdef BOARD_RECOVERY_BLDRMSG_OFFSET +static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = BOARD_RECOVERY_BLDRMSG_OFFSET; +static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024 + BOOTLOADER_MESSAGE_OFFSET_IN_MISC; +#else static const size_t BOOTLOADER_MESSAGE_OFFSET_IN_MISC = 0; static const size_t WIPE_PACKAGE_OFFSET_IN_MISC = 16 * 1024; +#endif /* Bootloader Message * @@ -86,7 +91,7 @@ bool clear_bootloader_message(std::string* err); bool read_wipe_package(std::string* package_data, size_t size, std::string* err); bool write_wipe_package(const std::string& package_data, std::string* err); -void set_misc_device(const char* type, const char* name); +void set_misc_device(std::string name); void get_args(int *argc, char ***argv); #else diff --git a/crypto/lollipop/cryptfs.c b/crypto/lollipop/cryptfs.c index 0c7848d8f..986507e22 100644 --- a/crypto/lollipop/cryptfs.c +++ b/crypto/lollipop/cryptfs.c @@ -1328,6 +1328,21 @@ static int decrypt_master_key(char *passwd, unsigned char *decrypted_master_key, return ret; } +static int try_mount_multiple_fs(const char *crypto_blkdev, + const char *mount_point, + const char *file_system) +{ + if (!mount(crypto_blkdev, mount_point, file_system, 0, NULL)) + return 0; + if (strcmp(file_system, "ext4") && + !mount(crypto_blkdev, mount_point, "ext4", 0, NULL)) + return 0; + if (strcmp(file_system, "f2fs") && + !mount(crypto_blkdev, mount_point, "f2fs", 0, NULL)) + return 0; + return 1; +} + static int test_mount_encrypted_fs(struct crypt_mnt_ftr* crypt_ftr, char *passwd, char *mount_point, char *label) { @@ -1426,7 +1441,7 @@ static int test_mount_encrypted_fs(struct crypt_mnt_ftr* crypt_ftr, * the footer, not the key. */ sprintf(tmp_mount_point, "%s/tmp_mnt", mount_point); mkdir(tmp_mount_point, 0755); - if (mount(crypto_blkdev, tmp_mount_point, file_system, 0, NULL) != 0) { + if (try_mount_multiple_fs(crypto_blkdev, tmp_mount_point, file_system)) { printf("Error temp mounting decrypted block device '%s'\n", crypto_blkdev); delete_crypto_blk_dev(label); rc = 1; @@ -91,7 +91,6 @@ void DataManager::sanitize_device_id(char* device_id) { void DataManager::get_device_id(void) { FILE *fp; - size_t i; char line[2048]; char hardware_id[HWID_MAX] = { 0 }; char device_id[DEVID_MAX] = { 0 }; @@ -104,7 +103,7 @@ void DataManager::get_device_id(void) { if (strcmp(model_id, "error") != 0) { LOGINFO("=> product model: '%s'\n", model_id); // Replace spaces with underscores - for (i = 0; i < strlen(model_id); i++) { + for (size_t i = 0; i < strlen(model_id); i++) { if (model_id[i] == ' ') model_id[i] = '_'; } @@ -253,7 +252,7 @@ int DataManager::LoadValues(const string& filename) pthread_mutex_unlock(&m_valuesLock); string current = GetCurrentStoragePath(); TWPartition* Part = PartitionManager.Find_Partition_By_Path(current); - if(!Part) + if (!Part) Part = PartitionManager.Get_Default_Storage_Partition(); if (Part && current != Part->Storage_Path && Part->Mount(false)) { LOGINFO("LoadValues setting storage path to '%s'\n", Part->Storage_Path.c_str()); @@ -536,7 +535,7 @@ void DataManager::SetDefaultValues() mPersist.SetValue("tw_action_vibrate", "160"); TWPartition *store = PartitionManager.Get_Default_Storage_Partition(); - if(store) + if (store) mPersist.SetValue("tw_storage_path", store->Storage_Path); else mPersist.SetValue("tw_storage_path", "/"); @@ -753,7 +752,7 @@ void DataManager::SetDefaultValues() string maxbrightpath = findbright.insert(findbright.rfind('/') + 1, "max_"); if (TWFunc::Path_Exists(maxbrightpath)) { ifstream maxVal(maxbrightpath.c_str()); - if(maxVal >> maxBrightness) { + if (maxVal >> maxBrightness) { LOGINFO("Got max brightness %s from '%s'\n", maxBrightness.c_str(), maxbrightpath.c_str()); } else { // Something went wrong, set that to indicate error @@ -873,38 +872,37 @@ int DataManager::GetMagicValue(const string& varName, string& value) } else if (varName == "tw_cpu_temp") { - int tw_no_cpu_temp; - GetValue("tw_no_cpu_temp", tw_no_cpu_temp); - if (tw_no_cpu_temp == 1) return -1; - - string cpu_temp_file; - static unsigned long convert_temp = 0; - static time_t cpuSecCheck = 0; - int divisor = 0; - struct timeval curTime; - string results; - - gettimeofday(&curTime, NULL); - if (curTime.tv_sec > cpuSecCheck) - { + int tw_no_cpu_temp; + GetValue("tw_no_cpu_temp", tw_no_cpu_temp); + if (tw_no_cpu_temp == 1) return -1; + + string cpu_temp_file; + static unsigned long convert_temp = 0; + static time_t cpuSecCheck = 0; + struct timeval curTime; + string results; + + gettimeofday(&curTime, NULL); + if (curTime.tv_sec > cpuSecCheck) + { #ifdef TW_CUSTOM_CPU_TEMP_PATH - cpu_temp_file = EXPAND(TW_CUSTOM_CPU_TEMP_PATH); - if (TWFunc::read_file(cpu_temp_file, results) != 0) - return -1; + cpu_temp_file = EXPAND(TW_CUSTOM_CPU_TEMP_PATH); + if (TWFunc::read_file(cpu_temp_file, results) != 0) + return -1; #else - cpu_temp_file = "/sys/class/thermal/thermal_zone0/temp"; - if (TWFunc::read_file(cpu_temp_file, results) != 0) - return -1; + cpu_temp_file = "/sys/class/thermal/thermal_zone0/temp"; + if (TWFunc::read_file(cpu_temp_file, results) != 0) + return -1; #endif - convert_temp = strtoul(results.c_str(), NULL, 0) / 1000; - if (convert_temp <= 0) - convert_temp = strtoul(results.c_str(), NULL, 0); - if (convert_temp >= 150) - convert_temp = strtoul(results.c_str(), NULL, 0) / 10; - cpuSecCheck = curTime.tv_sec + 5; - } - value = TWFunc::to_string(convert_temp); - return 0; + convert_temp = strtoul(results.c_str(), NULL, 0) / 1000; + if (convert_temp <= 0) + convert_temp = strtoul(results.c_str(), NULL, 0); + if (convert_temp >= 150) + convert_temp = strtoul(results.c_str(), NULL, 0) / 10; + cpuSecCheck = curTime.tv_sec + 5; + } + value = TWFunc::to_string(convert_temp); + return 0; } else if (varName == "tw_battery") { @@ -924,7 +922,7 @@ int DataManager::GetMagicValue(const string& varName, string& value) #else FILE * cap = fopen("/sys/class/power_supply/battery/capacity","rt"); #endif - if (cap){ + if (cap) { fgets(cap_s, 4, cap); fclose(cap); lastVal = atoi(cap_s); @@ -997,7 +995,7 @@ void DataManager::ReadSettingsFile(void) #ifndef TW_OEM_BUILD // Load up the values for TWRP - Sleep to let the card be ready char mkdir_path[255], settings_file[255]; - int is_enc, has_dual, use_ext, has_data_media, has_ext; + int is_enc, has_data_media; GetValue(TW_IS_ENCRYPTED, is_enc); GetValue(TW_HAS_DATA_MEDIA, has_data_media); diff --git a/etc/init.rc b/etc/init.rc index a62b68d84..14e7b1fe6 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -87,9 +87,6 @@ on late-init # issued fs triggers have completed. trigger load_system_props_action - # Load properties, Android 6.0+ - trigger load_system_props_action - # Load properties, Android 6.0+, vendor init lives here trigger load_persist_props_action diff --git a/exclude.cpp b/exclude.cpp index f992ecf02..8ce138ad7 100644 --- a/exclude.cpp +++ b/exclude.cpp @@ -81,7 +81,7 @@ uint64_t TWExclude::Get_Folder_Size(const string& Path) { } if ((st.st_mode & S_IFDIR) && !check_skip_dirs(FullPath) && de->d_type != DT_SOCK) { dusize += Get_Folder_Size(FullPath); - } else if (st.st_mode & S_IFREG) { + } else if (st.st_mode & S_IFREG || st.st_mode & S_IFLNK) { dusize += (uint64_t)(st.st_size); } } @@ -100,8 +100,8 @@ bool TWExclude::check_absolute_skip_dirs(const string& path) { bool TWExclude::check_skip_dirs(const string& path) { string normalized = TWFunc::Remove_Trailing_Slashes(path); size_t slashIdx = normalized.find_last_of('/'); - if(slashIdx != std::string::npos && slashIdx+1 < normalized.size()) { - if(check_relative_skip_dirs(normalized.substr(slashIdx+1))) + if (slashIdx != std::string::npos && slashIdx+1 < normalized.size()) { + if (check_relative_skip_dirs(normalized.substr(slashIdx+1))) return true; } return check_absolute_skip_dirs(normalized); diff --git a/fb2png/fb.h b/fb2png/fb.h index 25922c83b..b82acba24 100644 --- a/fb2png/fb.h +++ b/fb2png/fb.h @@ -37,6 +37,7 @@ struct fb { void* data; }; +void fb_dump(const struct fb* fb); int fb_save_png(const struct fb *fb, const char *path); #endif diff --git a/fb2png/fb2png.c b/fb2png/fb2png.c index a357b7fee..1123b053b 100644 --- a/fb2png/fb2png.c +++ b/fb2png/fb2png.c @@ -17,13 +17,15 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include <errno.h> +#include <fcntl.h> +#include <linux/fb.h> #include <stdio.h> #include <stdlib.h> -#include <fcntl.h> #include <sys/ioctl.h> #include <sys/mman.h> -#include <linux/fb.h> -#include <errno.h> +#include <sys/types.h> +#include <unistd.h> #include "log.h" #include "fb2png.h" diff --git a/fb2png/log.h b/fb2png/log.h index 96e90d796..2b7cf8cec 100644 --- a/fb2png/log.h +++ b/fb2png/log.h @@ -21,6 +21,7 @@ #define __KYAN_LOG_H__ #include <errno.h> +#include <string.h> #ifdef ANDROID_XXX diff --git a/fb2png/main.c b/fb2png/main.c index 84e08a968..235e958f9 100644 --- a/fb2png/main.c +++ b/fb2png/main.c @@ -17,9 +17,12 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <stdio.h> + #include <limits.h> +#include <stdio.h> #include <stdlib.h> +#include <string.h> + #include "fb2png.h" #ifdef ANDROID diff --git a/fixContexts.cpp b/fixContexts.cpp index 64429446e..7e650c209 100644 --- a/fixContexts.cpp +++ b/fixContexts.cpp @@ -25,16 +25,13 @@ #include "fixContexts.hpp" #include "twrp-functions.hpp" #include "twcommon.h" -#ifdef HAVE_SELINUX -#include "selinux/selinux.h" -#include "selinux/label.h" -#include "selinux/android.h" -#include "selinux/label.h" -#endif +#include <selinux/selinux.h> +#include <selinux/label.h> +#include <selinux/android.h> +#include <selinux/label.h> using namespace std; -#ifdef HAVE_SELINUX struct selabel_handle *sehandle; struct selinux_opt selinux_options[] = { { SELABEL_OPT_PATH, "/file_contexts" } @@ -146,18 +143,3 @@ int fixContexts::fixDataMediaContexts(string Mount_Point) { selabel_close(sehandle); return 0; } - -#else - -int fixContexts::restorecon(string entry __unused, struct stat *sb __unused) { - return -1; -} - -int fixContexts::fixContextsRecursively(string name __unused, int level __unused) { - return -1; -} - -int fixContexts::fixDataMediaContexts(string Mount_Point __unused) { - return -1; -} -#endif diff --git a/flashutils/flashutils.c b/flashutils/flashutils.c index 5a5e0094f..640193969 100644 --- a/flashutils/flashutils.c +++ b/flashutils/flashutils.c @@ -22,10 +22,12 @@ int device_flash_type() if (the_flash_type == UNKNOWN) { if (access(BOARD_BML_BOOT, F_OK) == 0) { the_flash_type = BML; - } else if (access("/proc/emmc", F_OK) == 0) { - the_flash_type = MMC; } else if (access("/proc/mtd", F_OK) == 0) { the_flash_type = MTD; + } else if (access("/proc/emmc", F_OK) == 0 || + access("/dev/block/mmcblk0", F_OK) == 0 || + access("/dev/block/sda", F_OK) == 0) { + the_flash_type = MMC; } else { the_flash_type = UNSUPPORTED; } diff --git a/gui/Android.mk b/gui/Android.mk index b514e5be1..51cf4ca05 100644 --- a/gui/Android.mk +++ b/gui/Android.mk @@ -55,9 +55,6 @@ endif ifneq ($(TW_NO_SCREEN_TIMEOUT),) LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT endif -ifeq ($(HAVE_SELINUX), true) - LOCAL_CFLAGS += -DHAVE_SELINUX -endif ifeq ($(TW_OEM_BUILD), true) LOCAL_CFLAGS += -DTW_OEM_BUILD endif @@ -67,11 +64,21 @@ endif ifneq ($(TW_Y_OFFSET),) LOCAL_CFLAGS += -DTW_Y_OFFSET=$(TW_Y_OFFSET) endif +ifneq ($(TW_W_OFFSET),) + LOCAL_CFLAGS += -DTW_W_OFFSET=$(TW_W_OFFSET) +endif +ifneq ($(TW_H_OFFSET),) + LOCAL_CFLAGS += -DTW_H_OFFSET=$(TW_H_OFFSET) +endif ifeq ($(TW_ROUND_SCREEN), true) LOCAL_CFLAGS += -DTW_ROUND_SCREEN endif -LOCAL_C_INCLUDES += bionic system/core/libpixelflinger/include +LOCAL_C_INCLUDES += \ + bionic \ + system/core/include \ + system/core/libpixelflinger/include + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) LOCAL_C_INCLUDES += external/stlport/stlport endif @@ -86,100 +93,96 @@ LOCAL_MODULE := twrp LOCAL_MODULE_TAGS := eng LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) -TWRP_RES := $(commands_recovery_local_path)/gui/devices/common/res/* -# enable this to use new themes: -TWRP_NEW_THEME := true + +# The extra blank line before *** is intentional to ensure it ends up on its own line +define TW_THEME_WARNING_MSG + +**************************************************************************** + Could not find ui.xml for TW_THEME: $(TW_THEME) + Set TARGET_SCREEN_WIDTH and TARGET_SCREEN_HEIGHT to automatically select + an appropriate theme, or set TW_THEME to one of the following: + $(notdir $(wildcard $(commands_recovery_local_path)/gui/theme/*_*)) +**************************************************************************** +endef +define TW_CUSTOM_THEME_WARNING_MSG + +**************************************************************************** + Could not find ui.xml for TW_CUSTOM_THEME: $(TW_CUSTOM_THEME) + Expected to find cutom theme's ui.xml at: + $(TWRP_THEME_LOC)/ui.xml + Please fix this or set TW_THEME to one of the following: + $(notdir $(wildcard $(commands_recovery_local_path)/gui/theme/*_*)) +**************************************************************************** +endef + +TWRP_RES := $(commands_recovery_local_path)/gui/theme/common/fonts +TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/languages +ifeq ($(TW_EXTRA_LANGUAGES),true) + TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/fonts + TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/languages +endif ifeq ($(TW_CUSTOM_THEME),) ifeq ($(TW_THEME),) - # This converts the old DEVICE_RESOLUTION flag to the new TW_THEME flag - PORTRAIT_MDPI := 320x480 480x800 480x854 540x960 - PORTRAIT_HDPI := 720x1280 800x1280 1080x1920 1200x1920 1440x2560 1600x2560 - WATCH_MDPI := 240x240 280x280 320x320 - LANDSCAPE_MDPI := 800x480 1024x600 1024x768 - LANDSCAPE_HDPI := 1280x800 1920x1200 2560x1600 - ifneq ($(filter $(DEVICE_RESOLUTION), $(PORTRAIT_MDPI)),) - TW_THEME := portrait_mdpi - else ifneq ($(filter $(DEVICE_RESOLUTION), $(PORTRAIT_HDPI)),) - TW_THEME := portrait_hdpi - else ifneq ($(filter $(DEVICE_RESOLUTION), $(WATCH_MDPI)),) - TW_THEME := watch_mdpi - else ifneq ($(filter $(DEVICE_RESOLUTION), $(LANDSCAPE_MDPI)),) - TW_THEME := landscape_mdpi - else ifneq ($(filter $(DEVICE_RESOLUTION), $(LANDSCAPE_HDPI)),) - TW_THEME := landscape_hdpi + ifeq ($(DEVICE_RESOLUTION),) + GUI_WIDTH := $(TARGET_SCREEN_WIDTH) + GUI_HEIGHT := $(TARGET_SCREEN_HEIGHT) + else + SPLIT_DEVICE_RESOLUTION := $(subst x, ,$(DEVICE_RESOLUTION)) + GUI_WIDTH := $(word 1, $(SPLIT_DEVICE_RESOLUTION)) + GUI_HEIGHT := $(word 2, $(SPLIT_DEVICE_RESOLUTION)) + endif + + # Minimum resolution of 100x100 + # This also ensures GUI_WIDTH and GUI_HEIGHT are numbers + ifeq ($(shell test $(GUI_WIDTH) -ge 100; echo $$?),0) + ifeq ($(shell test $(GUI_HEIGHT) -ge 100; echo $$?),0) + ifeq ($(shell test $(GUI_WIDTH) -gt $(GUI_HEIGHT); echo $$?),0) + ifeq ($(shell test $(GUI_WIDTH) -ge 1280; echo $$?),0) + TW_THEME := landscape_hdpi + else + TW_THEME := landscape_mdpi + endif + else ifeq ($(shell test $(GUI_WIDTH) -lt $(GUI_HEIGHT); echo $$?),0) + ifeq ($(shell test $(GUI_WIDTH) -ge 720; echo $$?),0) + TW_THEME := portrait_hdpi + else + TW_THEME := portrait_mdpi + endif + else ifeq ($(shell test $(GUI_WIDTH) -eq $(GUI_HEIGHT); echo $$?),0) + # watch_hdpi does not yet exist + TW_THEME := watch_mdpi + endif + endif endif endif -ifeq ($(TWRP_NEW_THEME),true) TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/theme/$(TW_THEME) - TWRP_RES := $(commands_recovery_local_path)/gui/theme/common/fonts - TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/languages - TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/$(word 1,$(subst _, ,$(TW_THEME))).xml -ifeq ($(TW_EXTRA_LANGUAGES),true) - TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/fonts - TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/languages -endif -# for future copying of used include xmls and fonts: -# UI_XML := $(TWRP_THEME_LOC)/ui.xml -# TWRP_INCLUDE_XMLS := $(shell xmllint --xpath '/recovery/include/xmlfile/@name' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq) -# TWRP_FONTS_TTF := $(shell xmllint --xpath '/recovery/resources/font/@filename' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)niq) -ifeq ($(wildcard $(TWRP_THEME_LOC)/ui.xml),) - $(warning ****************************************************************************) - $(warning * TW_THEME is not valid: '$(TW_THEME)') - $(warning * Please choose an appropriate TW_THEME or create a new one for your device.) - $(warning * Available themes:) - $(warning * $(notdir $(wildcard $(commands_recovery_local_path)/gui/theme/*_*))) - $(warning ****************************************************************************) - $(error stopping) -endif -else - TWRP_RES += $(commands_recovery_local_path)/gui/devices/$(word 1,$(subst _, ,$(TW_THEME)))/res/* - ifeq ($(TW_THEME), portrait_mdpi) - TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/480x800/res - else ifeq ($(TW_THEME), portrait_hdpi) - TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/1080x1920/res - else ifeq ($(TW_THEME), watch_mdpi) - TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/320x320/res - else ifeq ($(TW_THEME), landscape_mdpi) - TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/800x480/res - else ifeq ($(TW_THEME), landscape_hdpi) - TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/devices/1920x1200/res - else - $(warning ****************************************************************************) - $(warning * TW_THEME ($(TW_THEME)) is not valid.) - $(warning * Please choose an appropriate TW_THEME or create a new one for your device.) - $(warning * Valid options are portrait_mdpi portrait_hdpi watch_mdpi) - $(warning * landscape_mdpi landscape_hdpi) - $(warning ****************************************************************************) - $(error stopping) + ifeq ($(wildcard $(TWRP_THEME_LOC)/ui.xml),) + $(warning $(TW_THEME_WARNING_MSG)) + $(error Theme selection failed; exiting) endif -endif + + TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/$(word 1,$(subst _, ,$(TW_THEME))).xml + # for future copying of used include xmls and fonts: + # UI_XML := $(TWRP_THEME_LOC)/ui.xml + # TWRP_INCLUDE_XMLS := $(shell xmllint --xpath '/recovery/include/xmlfile/@name' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq) + # TWRP_FONTS_TTF := $(shell xmllint --xpath '/recovery/resources/font/@filename' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)niq) else TWRP_THEME_LOC := $(TW_CUSTOM_THEME) + ifeq ($(wildcard $(TWRP_THEME_LOC)/ui.xml),) + $(warning $(TW_CUSTOM_THEME_WARNING_MSG)) + $(error Theme selection failed; exiting) + endif endif + TWRP_RES += $(TW_ADDITIONAL_RES) TWRP_RES_GEN := $(intermediates)/twrp -ifneq ($(TW_USE_TOOLBOX), true) - TWRP_SH_TARGET := /sbin/busybox -else - TWRP_SH_TARGET := /sbin/mksh -endif - $(TWRP_RES_GEN): mkdir -p $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) cp -fr $(TWRP_RES) $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) cp -fr $(TWRP_THEME_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH) - mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/ -ifneq ($(TW_USE_TOOLBOX), true) -ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) - ln -sf $(TWRP_SH_TARGET) $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh -endif -endif - ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip - ln -sf /sbin/unpigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip - LOCAL_GENERATED_SOURCES := $(TWRP_RES_GEN) LOCAL_SRC_FILES := twrp $(TWRP_RES_GEN) diff --git a/gui/action.cpp b/gui/action.cpp index fe573697e..9c8af35f4 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -32,7 +32,7 @@ #include <stdlib.h> #include <sys/wait.h> #include <dirent.h> -#include <pwd.h> +#include <private/android_filesystem_config.h> #include <string> #include <sstream> @@ -62,7 +62,6 @@ GUIAction::mapFunc GUIAction::mf; std::set<string> GUIAction::setActionsRunningInCallerThread; static string zip_queue[10]; static int zip_queue_index; -static pthread_t terminal_command; pid_t sideload_child_pid; static void *ActionThread_work_wrapper(void *data); @@ -107,7 +106,7 @@ ActionThread::ActionThread() ActionThread::~ActionThread() { pthread_mutex_lock(&m_act_lock); - if(m_thread_running) { + if (m_thread_running) { pthread_mutex_unlock(&m_act_lock); pthread_join(m_thread, NULL); } else { @@ -199,6 +198,7 @@ GUIAction::GUIAction(xml_node<>* node) ADD_ACTION(mountsystemtoggle); ADD_ACTION(setlanguage); ADD_ACTION(checkforapp); + ADD_ACTION(togglebacklight); // remember actions that run in the caller thread for (mapFunc::const_iterator it = mf.begin(); it != mf.end(); ++it) @@ -262,7 +262,7 @@ GUIAction::GUIAction(xml_node<>* node) if (attr) { std::vector<std::string> keys = TWFunc::Split_String(attr->value(), "+"); - for(size_t i = 0; i < keys.size(); ++i) + for (size_t i = 0; i < keys.size(); ++i) { const int key = getKeyByName(keys[i]); mKeys[key] = false; @@ -297,7 +297,7 @@ int GUIAction::NotifyTouch(TOUCH_STATE state, int x __unused, int y __unused) int GUIAction::NotifyKey(int key, bool down) { std::map<int, bool>::iterator itr = mKeys.find(key); - if(itr == mKeys.end()) + if (itr == mKeys.end()) return 1; bool prevState = itr->second; @@ -307,20 +307,20 @@ int GUIAction::NotifyKey(int key, bool down) // doesn't trigger with multi-key actions. // Else, check if all buttons are pressed, then consume their release events // so they don't trigger one-button actions and reset mKeys pressed status - if(mKeys.size() == 1) { - if(!down && prevState) { + if (mKeys.size() == 1) { + if (!down && prevState) { doActions(); return 0; } - } else if(down) { - for(itr = mKeys.begin(); itr != mKeys.end(); ++itr) { - if(!itr->second) + } else if (down) { + for (itr = mKeys.begin(); itr != mKeys.end(); ++itr) { + if (!itr->second) return 1; } // Passed, all req buttons are pressed, reset them and consume release events HardwareKeyboard *kb = PageManager::GetHardwareKeyboard(); - for(itr = mKeys.begin(); itr != mKeys.end(); ++itr) { + for (itr = mKeys.begin(); itr != mKeys.end(); ++itr) { kb->ConsumeKeyRelease(itr->first); itr->second = false; } @@ -338,7 +338,7 @@ int GUIAction::NotifyVarChange(const std::string& varName, const std::string& va if (varName.empty() && !isConditionValid() && mKeys.empty() && !mActionW) doActions(); - else if((varName.empty() || IsConditionVariable(varName)) && isConditionValid() && isConditionTrue()) + else if ((varName.empty() || IsConditionVariable(varName)) && isConditionValid() && isConditionTrue()) doActions(); return 0; @@ -707,7 +707,7 @@ int GUIAction::compute(std::string arg) int divide_by = atoi(divide_by_str.c_str()); int value; - if(divide_by != 0) + if (divide_by != 0) { DataManager::GetValue(varName, value); DataManager::SetValue(varName, value/divide_by); @@ -855,13 +855,12 @@ int GUIAction::checkpartitionlist(std::string arg) } else { DataManager::SetValue("tw_check_partition_list", 0); } - return 0; + return 0; } int GUIAction::getpartitiondetails(std::string arg) { string List, part_path; - int count = 0; if (arg.empty()) arg = "tw_wipe_list"; @@ -939,23 +938,17 @@ int GUIAction::screenshot(std::string arg __unused) time_t tm; char path[256]; int path_len; - uid_t uid = -1; - gid_t gid = -1; - - struct passwd *pwd = getpwnam("media_rw"); - if(pwd) { - uid = pwd->pw_uid; - gid = pwd->pw_gid; - } + uid_t uid = AID_MEDIA_RW; + gid_t gid = AID_MEDIA_RW; const std::string storage = DataManager::GetCurrentStoragePath(); - if(PartitionManager.Is_Mounted_By_Path(storage)) { + if (PartitionManager.Is_Mounted_By_Path(storage)) { snprintf(path, sizeof(path), "%s/Pictures/Screenshots/", storage.c_str()); } else { strcpy(path, "/tmp/"); } - if(!TWFunc::Create_Dir_Recursive(path, 0775, uid, gid)) + if (!TWFunc::Create_Dir_Recursive(path, 0775, uid, gid)) return 0; tm = time(NULL); @@ -965,7 +958,7 @@ int GUIAction::screenshot(std::string arg __unused) strftime(path+path_len, sizeof(path)-path_len, "Screenshot_%Y-%m-%d-%H-%M-%S.png", localtime(&tm)); int res = gr_save_screenshot(path); - if(res == 0) { + if (res == 0) { chmod(path, 0666); chown(path, uid, gid); @@ -1078,7 +1071,7 @@ int GUIAction::wipe(std::string arg) else if (arg == "DATAMEDIA") { ret_val = PartitionManager.Format_Data(); } else if (arg == "INTERNAL") { - int has_datamedia, dual_storage; + int has_datamedia; DataManager::GetValue(TW_HAS_DATA_MEDIA, has_datamedia); if (has_datamedia) { @@ -1097,7 +1090,6 @@ int GUIAction::wipe(std::string arg) string Wipe_List, wipe_path; bool skip = false; ret_val = true; - TWPartition* wipe_part = NULL; DataManager::GetValue("tw_wipe_list", Wipe_List); LOGINFO("wipe list '%s'\n", Wipe_List.c_str()); @@ -1384,11 +1376,11 @@ int GUIAction::terminalcommand(std::string arg) if (fp == NULL) { LOGERR("Error opening command to run (%s).\n", strerror(errno)); } else { - int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1, bytes_read = 0; + int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1; struct timeval timeout; fd_set fdset; - while(keep_going) + while (keep_going) { FD_ZERO(&fdset); FD_SET(fd, &fdset); @@ -1406,7 +1398,7 @@ int GUIAction::terminalcommand(std::string arg) keep_going = 0; } else { // Try to read output - if(fgets(line, sizeof(line), fp) != NULL) + if (fgets(line, sizeof(line), fp) != NULL) gui_print("%s", line); // Display output else keep_going = 0; // Done executing @@ -1425,8 +1417,6 @@ int GUIAction::terminalcommand(std::string arg) int GUIAction::killterminal(std::string arg __unused) { - int op_status = 0; - LOGINFO("Sending kill command...\n"); operation_start("KillCommand"); DataManager::SetValue("tw_operation_status", 0); @@ -1870,13 +1860,18 @@ int GUIAction::setlanguage(std::string arg __unused) return 0; } +int GUIAction::togglebacklight(std::string arg __unused) +{ + blankTimer.toggleBlank(); + return 0; +} + int GUIAction::setbootslot(std::string arg) { operation_start("Set Boot Slot"); if (!simulate) - { PartitionManager.Set_Active_Slot(arg); - } else + else simulate_progress_bar(); operation_end(0); return 0; @@ -1884,7 +1879,6 @@ int GUIAction::setbootslot(std::string arg) int GUIAction::checkforapp(std::string arg __unused) { - int op_status = 1; operation_start("Check for TWRP App"); if (!simulate) { @@ -1914,11 +1908,12 @@ int GUIAction::checkforapp(std::string arg __unused) DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed goto exit; } - } else if (PartitionManager.Mount_By_Path("/data", false)) { + } + if (PartitionManager.Mount_By_Path("/data", false)) { string parent_path = "/data/app"; DIR *d = opendir("/data/app"); struct dirent *p; - int len = strlen("me.twrp.twrpapp-"); + size_t len = strlen("me.twrp.twrpapp-"); while ((p = readdir(d))) { if (!strcmp(p->d_name, ".") || !strcmp(p->d_name, "..")) continue; @@ -1959,7 +1954,7 @@ int GUIAction::installapp(std::string arg __unused) LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } - if (setfilecon(install_path.c_str(), context.c_str()) < 0) { + if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) { LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } @@ -1973,7 +1968,7 @@ int GUIAction::installapp(std::string arg __unused) LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } - if (setfilecon(install_path.c_str(), context.c_str()) < 0) { + if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) { LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } @@ -1986,7 +1981,7 @@ int GUIAction::installapp(std::string arg __unused) LOGERR("chown %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } - if (setfilecon(install_path.c_str(), context.c_str()) < 0) { + if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) { LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } @@ -2006,7 +2001,7 @@ int GUIAction::installapp(std::string arg __unused) install_path += "/twrpapp"; LOGINFO("Installing app to '%s'\n", install_path.c_str()); if (mkdir(install_path.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == 0) { - if (setfilecon(install_path.c_str(), context.c_str()) < 0) { + if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) { LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } @@ -2015,7 +2010,7 @@ int GUIAction::installapp(std::string arg __unused) LOGERR("Error copying apk file\n"); goto exit; } - if (setfilecon(install_path.c_str(), context.c_str()) < 0) { + if (setfilecon(install_path.c_str(), (security_context_t)context.c_str()) < 0) { LOGERR("setfilecon %s error: %s\n", install_path.c_str(), strerror(errno)); goto exit; } diff --git a/gui/animation.cpp b/gui/animation.cpp index d45373d81..2244503e8 100644 --- a/gui/animation.cpp +++ b/gui/animation.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // animation.cpp - GUIAnimation object #include <stdarg.h> @@ -88,7 +106,7 @@ GUIAnimation::GUIAnimation(xml_node<>* node) : GUIObject(node) int GUIAnimation::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (!mAnimation || !mAnimation->GetResource(mFrame)) return -1; @@ -99,7 +117,7 @@ int GUIAnimation::Render(void) int GUIAnimation::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (!mAnimation) return -1; diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp index 4662b1fab..220525387 100644 --- a/gui/blanktimer.cpp +++ b/gui/blanktimer.cpp @@ -116,3 +116,37 @@ void blanktimer::resetTimerAndUnblank(void) { pthread_mutex_unlock(&mutex); #endif } + +void blanktimer::blank(void) { +/* 1) No need for timer handling since checkForTimeout() verifies + * state of screen before performing screen-off + * 2) Assume screen-off causes issues for devices that set + * TW_NO_SCREEN_TIMEOUT and do not blank screen here either + */ + +#ifndef TW_NO_SCREEN_TIMEOUT + pthread_mutex_lock(&mutex); + if (state == kOn) { + orig_brightness = getBrightness(); + state = kOff; + TWFunc::Set_Brightness("0"); + TWFunc::check_and_run_script("/sbin/postscreenblank.sh", "blank"); + } +#ifndef TW_NO_SCREEN_BLANK + if (state == kOff) { + gr_fb_blank(true); + state = kBlanked; + } +#endif + pthread_mutex_unlock(&mutex); +#endif +} + +void blanktimer::toggleBlank(void) { + if (state == kOn) { + blank(); + PageManager::ChangeOverlay("lock"); + } else { + resetTimerAndUnblank(); + } +} diff --git a/gui/blanktimer.hpp b/gui/blanktimer.hpp index 5e617901f..fe7b77c17 100644 --- a/gui/blanktimer.hpp +++ b/gui/blanktimer.hpp @@ -37,11 +37,15 @@ public: // call this when an input event is received or when an operation is finished void resetTimerAndUnblank(); + // call this when power button is pressed + void toggleBlank(void); + bool isScreenOff(); private: void setTimer(void); string getBrightness(void); + void blank(void); pthread_mutex_t mutex; enum State { kOn = 0, kDim = 1, kOff = 2, kBlanked = 3 }; diff --git a/gui/button.cpp b/gui/button.cpp index 45614e461..a9b02a305 100644 --- a/gui/button.cpp +++ b/gui/button.cpp @@ -85,7 +85,7 @@ GUIButton::GUIButton(xml_node<>* node) mHighlightColor = LoadAttrColor(FindNode(node, "highlight"), "color", &hasHighlightColor); - int x, y, w, h; + int x = 0, y = 0, w = 0, h = 0; TextPlacement = TOP_LEFT; if (mButtonImg) { mButtonImg->GetRenderPos(x, y, w, h); diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp index e79f0cdcd..a2958db99 100644 --- a/gui/checkbox.cpp +++ b/gui/checkbox.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // checkbox.cpp - GUICheckbox object #include <stdarg.h> diff --git a/gui/console.cpp b/gui/console.cpp index 6f375ff28..b518e77dc 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -78,7 +78,7 @@ extern "C" void __gui_print(const char *color, char *buf) } // The text after last \n (or whole string if there is no \n) - if(*start) { + if (*start) { gConsole.push_back(start); gConsoleColor.push_back(color); } @@ -205,7 +205,10 @@ GUIConsole::GUIConsole(xml_node<>* node) : GUIScrollList(node) if (!node) { - mRenderX = 0; mRenderY = 0; mRenderW = gr_fb_width(); mRenderH = gr_fb_height(); + mRenderX = 0; + mRenderY = 0; + mRenderW = gr_fb_width(); + mRenderH = gr_fb_height(); } else { @@ -276,7 +279,7 @@ int GUIConsole::RenderConsole(void) int GUIConsole::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (mSlideout && mSlideoutState == hidden) @@ -346,7 +349,7 @@ int GUIConsole::IsInRegion(int x, int y) // Return 0 on success, >0 to ignore remainder of touch, and <0 on error int GUIConsole::NotifyTouch(TOUCH_STATE state, int x, int y) { - if(!isConditionTrue()) + if (!isConditionTrue()) return -1; if (mSlideout && x >= mSlideoutX && x < mSlideoutX + mSlideoutW && y >= mSlideoutY && y < mSlideoutY + mSlideoutH) { diff --git a/gui/devices/1080x1920/res/images/back-icon.png b/gui/devices/1080x1920/res/images/back-icon.png Binary files differdeleted file mode 100644 index 08e13b0f5..000000000 --- a/gui/devices/1080x1920/res/images/back-icon.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/checkbox_checked.png b/gui/devices/1080x1920/res/images/checkbox_checked.png Binary files differdeleted file mode 100644 index c1173de51..000000000 --- a/gui/devices/1080x1920/res/images/checkbox_checked.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/checkbox_empty.png b/gui/devices/1080x1920/res/images/checkbox_empty.png Binary files differdeleted file mode 100644 index be5301f4f..000000000 --- a/gui/devices/1080x1920/res/images/checkbox_empty.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/cursor.png b/gui/devices/1080x1920/res/images/cursor.png Binary files differdeleted file mode 100644 index 39a7d6cdc..000000000 --- a/gui/devices/1080x1920/res/images/cursor.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/curtain.jpg b/gui/devices/1080x1920/res/images/curtain.jpg Binary files differdeleted file mode 100644 index 269941d5e..000000000 --- a/gui/devices/1080x1920/res/images/curtain.jpg +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/file.png b/gui/devices/1080x1920/res/images/file.png Binary files differdeleted file mode 100644 index 419ec10a5..000000000 --- a/gui/devices/1080x1920/res/images/file.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/folder.png b/gui/devices/1080x1920/res/images/folder.png Binary files differdeleted file mode 100644 index 8fa307749..000000000 --- a/gui/devices/1080x1920/res/images/folder.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/home-icon.png b/gui/devices/1080x1920/res/images/home-icon.png Binary files differdeleted file mode 100644 index 23a02948c..000000000 --- a/gui/devices/1080x1920/res/images/home-icon.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate001.png b/gui/devices/1080x1920/res/images/indeterminate001.png Binary files differdeleted file mode 100644 index 73918eeed..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate001.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate002.png b/gui/devices/1080x1920/res/images/indeterminate002.png Binary files differdeleted file mode 100644 index fbf230433..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate002.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate003.png b/gui/devices/1080x1920/res/images/indeterminate003.png Binary files differdeleted file mode 100644 index 8edb400d7..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate003.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate004.png b/gui/devices/1080x1920/res/images/indeterminate004.png Binary files differdeleted file mode 100644 index 2810f8c1b..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate004.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate005.png b/gui/devices/1080x1920/res/images/indeterminate005.png Binary files differdeleted file mode 100644 index fe9bfa38f..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate005.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/indeterminate006.png b/gui/devices/1080x1920/res/images/indeterminate006.png Binary files differdeleted file mode 100644 index e43aab7d1..000000000 --- a/gui/devices/1080x1920/res/images/indeterminate006.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/keyboard1.png b/gui/devices/1080x1920/res/images/keyboard1.png Binary files differdeleted file mode 100644 index 5c273378a..000000000 --- a/gui/devices/1080x1920/res/images/keyboard1.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/keyboard2.png b/gui/devices/1080x1920/res/images/keyboard2.png Binary files differdeleted file mode 100644 index fd3b628ca..000000000 --- a/gui/devices/1080x1920/res/images/keyboard2.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/keyboard3.png b/gui/devices/1080x1920/res/images/keyboard3.png Binary files differdeleted file mode 100644 index 400e8e728..000000000 --- a/gui/devices/1080x1920/res/images/keyboard3.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/keyboard4.png b/gui/devices/1080x1920/res/images/keyboard4.png Binary files differdeleted file mode 100644 index 14c53fff3..000000000 --- a/gui/devices/1080x1920/res/images/keyboard4.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/medium-button.png b/gui/devices/1080x1920/res/images/medium-button.png Binary files differdeleted file mode 100644 index 9eabb3b2f..000000000 --- a/gui/devices/1080x1920/res/images/medium-button.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/menu-button.png b/gui/devices/1080x1920/res/images/menu-button.png Binary files differdeleted file mode 100644 index 01fd37baa..000000000 --- a/gui/devices/1080x1920/res/images/menu-button.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/minus-button.png b/gui/devices/1080x1920/res/images/minus-button.png Binary files differdeleted file mode 100644 index 2e4be8fa3..000000000 --- a/gui/devices/1080x1920/res/images/minus-button.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/plus-button.png b/gui/devices/1080x1920/res/images/plus-button.png Binary files differdeleted file mode 100644 index 33ca71e65..000000000 --- a/gui/devices/1080x1920/res/images/plus-button.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/progress_empty.png b/gui/devices/1080x1920/res/images/progress_empty.png Binary files differdeleted file mode 100644 index 87735f935..000000000 --- a/gui/devices/1080x1920/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/progress_fill.png b/gui/devices/1080x1920/res/images/progress_fill.png Binary files differdeleted file mode 100644 index e359ea223..000000000 --- a/gui/devices/1080x1920/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/radio_empty.png b/gui/devices/1080x1920/res/images/radio_empty.png Binary files differdeleted file mode 100644 index 1b76f1460..000000000 --- a/gui/devices/1080x1920/res/images/radio_empty.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/radio_selected.png b/gui/devices/1080x1920/res/images/radio_selected.png Binary files differdeleted file mode 100644 index f16f62956..000000000 --- a/gui/devices/1080x1920/res/images/radio_selected.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/slideout.png b/gui/devices/1080x1920/res/images/slideout.png Binary files differdeleted file mode 100644 index 6fb41303d..000000000 --- a/gui/devices/1080x1920/res/images/slideout.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/slider-touch.png b/gui/devices/1080x1920/res/images/slider-touch.png Binary files differdeleted file mode 100644 index df02672f0..000000000 --- a/gui/devices/1080x1920/res/images/slider-touch.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/slider-used.png b/gui/devices/1080x1920/res/images/slider-used.png Binary files differdeleted file mode 100644 index a30331bfa..000000000 --- a/gui/devices/1080x1920/res/images/slider-used.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/slider.png b/gui/devices/1080x1920/res/images/slider.png Binary files differdeleted file mode 100644 index e73cbf28d..000000000 --- a/gui/devices/1080x1920/res/images/slider.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/sort-button.png b/gui/devices/1080x1920/res/images/sort-button.png Binary files differdeleted file mode 100644 index e28c58c9e..000000000 --- a/gui/devices/1080x1920/res/images/sort-button.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/twrplogo.png b/gui/devices/1080x1920/res/images/twrplogo.png Binary files differdeleted file mode 100644 index a3f433a94..000000000 --- a/gui/devices/1080x1920/res/images/twrplogo.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/images/unlock.png b/gui/devices/1080x1920/res/images/unlock.png Binary files differdeleted file mode 100644 index e582e1cf2..000000000 --- a/gui/devices/1080x1920/res/images/unlock.png +++ /dev/null diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml deleted file mode 100644 index 79bf5025d..000000000 --- a/gui/devices/1080x1920/res/ui.xml +++ /dev/null @@ -1,506 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <details> - <resolution width="1080" height="1920" /> - <author>TeamWin</author> - <title>Backup Naowz</title> - <description>Default basic theme</description> - <preview>preview.jpg</preview> - </details> - - <include> - <xmlfile name="portrait.xml" /> - </include> - - <resources> - <resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="40" /> - <resource name="mediumfont" type="font" filename="RobotoCondensed-Regular.ttf" size="40" /> - <resource name="filelist" type="font" filename="RobotoCondensed-Regular.ttf" size="40" /> - <resource name="keylabel" type="font" filename="RobotoCondensed-Regular.ttf" size="50" /> - <resource name="keylabel-small" type="font" filename="RobotoCondensed-Regular.ttf" size="40" /> - <resource name="keylabel-longpress" type="font" filename="RobotoCondensed-Regular.ttf" size="30" /> - <resource name="fixed" type="font" filename="DroidSansMono.ttf" size="30" /> - <resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" /> - <resource name="main_button" type="image" filename="menu-button" /> - <resource name="file_icon" type="image" filename="file" retainaspect="1" /> - <resource name="folder_icon" type="image" filename="folder" retainaspect="1" /> - <resource name="slideout" type="image" filename="slideout" retainaspect="1" /> - <resource name="progress" type="animation" filename="indeterminate" /> - <resource name="progress_empty" type="image" filename="progress_empty" /> - <resource name="progress_full" type="image" filename="progress_fill" /> - <resource name="checkbox_false" type="image" filename="checkbox_empty" retainaspect="1" /> - <resource name="checkbox_true" type="image" filename="checkbox_checked" retainaspect="1" /> - <resource name="radio_false" type="image" filename="radio_empty" retainaspect="1" /> - <resource name="radio_true" type="image" filename="radio_selected" retainaspect="1" /> - <resource name="medium_button" type="image" filename="medium-button" /> - <resource name="sort_button" type="image" filename="sort-button" /> - <resource name="minus_button" type="image" filename="minus-button" /> - <resource name="plus_button" type="image" filename="plus-button" /> - <resource name="home_icon" type="image" filename="home-icon" retainaspect="1" /> - <resource name="back_icon" type="image" filename="back-icon" retainaspect="1" /> - <resource name="slider" type="image" filename="slider" retainaspect="1" /> - <resource name="slider-used" type="image" filename="slider-used" retainaspect="1" /> - <resource name="slider-touch" type="image" filename="slider-touch" retainaspect="1" /> - <resource name="unlock-icon" type="image" filename="unlock" retainaspect="1" /> - <resource name="keyboard1" type="image" filename="keyboard1" /> - <resource name="keyboard2" type="image" filename="keyboard2" /> - <resource name="keyboard3" type="image" filename="keyboard3" /> - <resource name="keyboard4" type="image" filename="keyboard4" /> - <resource name="cursor" type="image" filename="cursor" retainaspect="1" /> - </resources> - - <variables> - <variable name="col1_x" value="10" /> - <variable name="col2_x" value="565" /> - <variable name="col_center_x" value="288" /> - <variable name="col_center_medium_x" value="414" /> - <variable name="center_x" value="540" /> - <variable name="row1_y" value="255" /> - <variable name="row2_y" value="615" /> - <variable name="row3_y" value="975" /> - <variable name="row4_y" value="1335" /> - <variable name="col1_center_x" value="179" /> - <variable name="col2_center_x" value="552" /> - <variable name="row1_text2_y" value="310" /> - <variable name="row2_text2_y" value="550" /> - <variable name="row_queue_y" value="1140" /> - <variable name="row1_header_y" value="180" /> - <variable name="row1_text_y" value="255" /> - <variable name="row2_text_y" value="330" /> - <variable name="row3_text_y" value="405" /> - <variable name="row4_text_y" value="480" /> - <variable name="row5_text_y" value="555" /> - <variable name="row6_text_y" value="630" /> - <variable name="row7_text_y" value="705" /> - <variable name="row8_text_y" value="780" /> - <variable name="row9_text_y" value="855" /> - <variable name="row10_text_y" value="930" /> - <variable name="row11_text_y" value="1005" /> - <variable name="row12_text_y" value="1080" /> - <variable name="row13_text_y" value="1155" /> - <variable name="row14_text_y" value="1230" /> - <variable name="row15_text_y" value="1305" /> - <variable name="row16_text_y" value="1380" /> - <variable name="row17_text_y" value="1455" /> - <variable name="row18_text_y" value="1530" /> - <variable name="zip_status_y" value="922" /> - <variable name="flash_list_height" value="500" /> - <variable name="tz_selected_y" value="240" /> - <variable name="tz_set_y" value="1500" /> - <variable name="tz_current_y" value="1425" /> - <variable name="system_ro_y" value="1770" /> - <variable name="col_progressbar_x" value="351" /> - <variable name="row_progressbar_y" value="1650" /> - <variable name="col1_medium_x" value="10" /> - <variable name="col2_medium_x" value="282" /> - <variable name="col3_medium_x" value="545" /> - <variable name="col4_medium_x" value="817" /> - <variable name="row1_medium_y" value="195" /> - <variable name="row2_medium_y" value="345" /> - <variable name="row3_medium_y" value="392" /> - <variable name="row4_medium_y" value="645" /> - <variable name="row5_medium_y" value="795" /> - <variable name="row6_medium_y" value="1260" /> - <variable name="row7_medium_y" value="730" /> - <variable name="slider_y" value="1575" /> - <variable name="slider_text_y" value="1676" /> - <variable name="button_text_color" value="#AAAAAA" /> - <variable name="text_color" value="#FFFFFF" /> - <variable name="text_success_color" value="#33B5E5" /> - <variable name="text_fail_color" value="#FF0101" /> - <variable name="highlight_color" value="#90909080" /> - <variable name="caps_highlight_color" value="#33B5E580" /> - <variable name="home_button_x" value="10" /> - <variable name="home_button_y" value="1839" /> - <variable name="back_button_x" value="1070" /> - <variable name="back_button_y" value="1839" /> - <variable name="sort_text_x" value="10" /> - <variable name="sort_asc_text_y" value="1635" /> - <variable name="sort_asc_button_y" value="1620" /> - <variable name="sort_desc_text_y" value="1725" /> - <variable name="sort_desc_button_y" value="1710" /> - <variable name="sort_col1_button_x" value="390" /> - <variable name="sort_col2_button_x" value="540" /> - <variable name="sort_col3_button_x" value="690" /> - <variable name="input_width" value="1060" /> - <variable name="input_height" value="75" /> - <variable name="input_background_color" value="#303030" /> - <variable name="input_cursor_color" value="#33B5E5" /> - <variable name="input_cursor_width" value="4" /> - <variable name="console_x" value="0" /> - <variable name="console_width" value="1080" /> - <variable name="console_foreground" value="#A0A0A0" /> - <variable name="warning" value="#F8F8A0" /> - <variable name="error" value="#FF4040" /> - <variable name="highlight" value="#33B5E5" /> - <variable name="console_background" value="#303030" /> - <variable name="console_scroll" value="#303030" /> - <variable name="console_action_height" value="705" /> - <variable name="console_install_height" value="900" /> - <variable name="console_installdone_height" value="660" /> - <variable name="fileselector_x" value="5" /> - <variable name="fileselector_width" value="1070" /> - <variable name="fileselector_install_height" value="1170" /> - <variable name="fileselector_header_background" value="#202020" /> - <variable name="fileselector_header_textcolor" value="#AAAAAA" /> - <variable name="fileselector_header_separatorcolor" value="#33B5E5" /> - <variable name="fileselector_header_separatorheight" value="4" /> - <variable name="fileselector_separatorcolor" value="#505050" /> - <variable name="fileselector_separatorheight" value="3" /> - <variable name="fileselector_background" value="#303030" /> - <variable name="fileselector_highlight_color" value="#505050" /> - <variable name="fileselector_highlight_font_color" value="#33B5E5" /> - <variable name="fileselector_spacing" value="48" /> - <variable name="fastscroll_linecolor" value="#50505080" /> - <variable name="fastscroll_rectcolor" value="#33B5E580" /> - <variable name="fastscroll_w" value="90" /> - <variable name="fastscroll_linew" value="3" /> - <variable name="fastscroll_rectw" value="21" /> - <variable name="fastscroll_recth" value="60" /> - <variable name="listbox_x" value="5" /> - <variable name="listbox_width" value="1070" /> - <variable name="listbox_tz_height" value="885" /> - <variable name="listbox_background" value="#303030" /> - <variable name="listbox_spacing" value="24" /> - <variable name="sd_plus_x" value="525" /> - <variable name="sdext_text_x" value="165" /> - <variable name="sdext_text_y" value="270" /> - <variable name="sdswap_button_y" value="390" /> - <variable name="sdswap_text_x" value="165" /> - <variable name="sdswap_text_y" value="405" /> - <variable name="sdfilesystem_text_y" value="510" /> - <variable name="sdfilesystem_button_y" value="570" /> - <variable name="lock_y" value="700" /> - <variable name="filemanager_select_x" value="840" /> - <variable name="filemanager_select_y" value="1620" /> - <variable name="backup_name_y" value="825" /> - <variable name="terminal_console_height" value="1200" /> - <variable name="terminal_text_y" value="1095" /> - <variable name="terminal_button_y" value="1050" /> - <variable name="row_dst_text_y" value="1080" /> - <variable name="row_offset_text_y" value="1155" /> - <variable name="row_offset_medium_y" value="1260" /> - <variable name="button_fill_color" value="#303030" /> - <variable name="button_fill_full_width" value="1060" /> - <variable name="button_fill_main_width" value="505" /> - <variable name="button_fill_main_height" value="324" /> - <variable name="button_fill_half_height" value="162" /> - <variable name="button_fill_quarter_height" value="81" /> - <variable name="backup_list_height" value="780" /> - <variable name="backup_button_row1" value="1118" /> - <variable name="backup_button_row2" value="1220" /> - <variable name="mount_list_height" value="1035" /> - <variable name="mount_storage_row" value="1240" /> - <variable name="storage_list_height" value="1000" /> - <variable name="wipe_list_height" value="1105" /> - <variable name="wipe_button_row1" value="1350" /> - <variable name="wipe_button_y" value="975" /> - <variable name="slidervalue_w" value="1060" /> - <variable name="slidervalue_line_clr" value="#FFFFFF" /> - <variable name="slidervalue_slider_clr" value="#33B5E5" /> - <variable name="slidervalue_lineh" value="3" /> - <variable name="slidervalue_padding" value="30" /> - <variable name="slidervalue_sliderw" value="15" /> - <variable name="slidervalue_sliderh" value="90" /> - <variable name="pattern_button3_x" value="275" /> - <variable name="pattern_button4_x" value="409" /> - <variable name="pattern_button5_x" value="543" /> - <variable name="pattern_button6_x" value="677" /> - <variable name="pattern_x" value="92" /> - <variable name="pattern_y" value="508" /> - <variable name="pattern_width" value="896" /> - <variable name="pattern_dot_color" value="#33B5E5" /> - <variable name="pattern_dot_color_active" value="#FFFFFF" /> - <variable name="pattern_dot_radius" value="23" /> - <variable name="pattern_line_color" value="#33B5E5" /> - <variable name="pattern_line_width" value="18" /> - <variable name="pattern_cancel_y" value="1440" /> - </variables> - - <mousecursor> - <placement w="15" h="15" /> - <background color="#FFFF00FF" resource="cursor" /> - <speed multiplier="2.5" /> - </mousecursor> - - <templates> - <template name="header"> - <background color="#000000FF" /> - - <object type="fill" color="%button_fill_color%"> - <placement x="0" y="0" w="1080" h="176" /> - </object> - - <object type="fill" color="%highlight%"> - <placement x="0" y="176" w="1080" h="4" /> - </object> - - <object type="image"> - <image resource="twrplogo" /> - <placement x="85" y="85" placement="4" /> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="180" y="15" /> - <text>Team Win Recovery Project v%tw_version%</text> - </object> - - <object type="text" color="%text_color%"> - <condition var1="tw_simulate_actions" var2="1" /> - <font resource="font" /> - <placement x="180" y="60" /> - <text>SIMULATING ACTIONS</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="180" y="114" /> - <text>%tw_time%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="405" y="114" /> - <conditions> - <condition var1="tw_no_battery_percent" var2="0" /> - <condition var1="tw_battery" op=">" var2="0" /> - <condition var1="tw_battery" op="<" var2="101" /> - </conditions> - <text>Battery: %tw_battery%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="760" y="114" /> - <conditions> - <condition var1="tw_no_cpu_temp" var2="0" /> - </conditions> - <text>CPU: %tw_cpu_temp% °C</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%home_button_x%" y="%home_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%back_button_x%" y="%back_button_y%" placement="1" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="overlay">lock</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - </template> - - <template name="progress_bar"> - <object type="progressbar"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource empty="progress_empty" full="progress_full" /> - <data name="ui_progress" /> - </object> - - <object type="animation"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource name="progress" /> - <speed fps="15" render="2" /> - <loop frame="1" /> - </object> - </template> - - <template name="pattern_options"> - <object type="button"> - <placement x="%pattern_button3_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>3x3</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=3</action> - </object> - - <object type="button"> - <placement x="%pattern_button4_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>4x4</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=4</action> - </object> - - <object type="button"> - <placement x="%pattern_button5_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>5x5</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=5</action> - </object> - - <object type="button"> - <placement x="%pattern_button6_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>6x6</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=6</action> - </object> - </template> - - <template name="sort_options"> - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_asc_text_y%" /> - <text>Sort Ascending:</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col1_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=1</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col2_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=2</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col3_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=3</action> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_desc_text_y%" /> - <text>Sort Descending:</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col1_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-1</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col2_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-2</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col3_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-3</action> - </object> - </template> - - <template name="action_page_console"> - <object type="console"> - <placement x="0" y="%row2_y%" w="1080" h="705" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="footer"> - <object type="console"> - <slideout resource="slideout" x="%center_x%" y="1841" placement="5" /> - <placement x="%console_x%" y="0" w="%console_width%" h="1841" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="keyboardtemplate"> - <object type="keyboard"> - <placement x="0" y="1200" w="1080" h="644" /> - <keymargin x="6" y="6"/> - <background color="#202020"/> - <key-alphanumeric color="#282828" font="keylabel" textcolor="#ffffff"/> - <key-other color="#242424" font="keylabel-small" textcolor="#c0c0c0"/> - <longpress font="keylabel-longpress" textcolor="#808080" x="4" y="0"/> - <keylabel key="0:c:8" text="Bksp" resource="backspace"/> - <keylabel key="0:action" text="Enter" resource="enter"/> - <keylabel key="0:k:105" text="<"/> - <keylabel key="0:k:108" text="v"/> - <keylabel key="0:k:103" text="^"/> - <keylabel key="0:k:106" text=">"/> - <!-- - <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" /> - --> - <highlight color="%highlight_color%" /> - <capshighlight color="%caps_highlight_color%" /> - <layout1> - <keysize height="161" width="108" /> - <row1 key01="q" long01="1" key02="w" long02="2" key03="e" long03="3" key04="r" long04="4" key05="t" long05="5" key06="y" long06="6" key07="u" long07="7" key08="i" long08="8" key09="o" long09="9" key10="p" long10="0" /> - <row2 key01="162:a" long01="@" key02="s" long02="#" key03="d" long03="$" key04="f" long04="%" key05="g" long05="&" key06="h" long06="*" key07="j" long07="-" key08="k" long08="+" key09="162:l" long09="_" /> - <row3 key01="162:layout2" key02="z" long02="!" key03="x" key04="c" long04="'" key05="v" long05=":" key06="b" long06=";" key07="n" long07="/" key08="m" long08="?" key09="162:c:8" /> - <row4 key01="162:layout3" key02="108:c:47" key03="108:c:27" long03=":c:3" key04="432: " key05="." key06="162:action" /> - <keylabel key="0:layout2" text="Shift" resource="shift"/> - <keylabel key="0:layout3" text="?123"/> - </layout1> - <layout2> - <keysize height="161" width="108" capslock="0" revert_layout="1" /> - <row1 key01="Q" long01="1" key02="W" long02="2" key03="E" long03="3" key04="R" long04="4" key05="T" long05="5" key06="Y" long06="6" key07="U" long07="7" key08="I" long08="8" key09="O" long09="9" key10="P" long10="0" /> - <row2 key01="162:A" long01="@" key02="S" long02="#" key03="D" long03="$" key04="F" long04="%" key05="G" long05="&" key06="H" long06="*" key07="J" long07="-" key08="K" long08="+" key09="162:L" long09="_" /> - <row3 key01="162:layout1" key02="Z" long02="!" key03="X" key04="C" long04="'" key05="V" long05=":" key06="B" long06=";" key07="N" long07="/" key08="M" long08="?" key09="162:c:8" /> - <row4 key01="162:layout3" key02="/" key03="108:" key04="432: " key05="." key06="162:action" /> - <keylabel key="0:layout1" text="Shift" resource="shift_fill"/> - <keylabel key="0:layout3" text="?123"/> - </layout2> - <layout3> - <keysize height="161" width="108" /> - <row1 key01="1" key02="2" key03="3" key04="4" key05="5" key06="6" key07="7" key08="8" key09="9" key10="0" /> - <row2 key01="@" key02="#" key03="$" key04="%" key05="&" key06="*" key07="-" key08="+" key09="(" key10=")" /> - <row3 key01="162:layout4" key02="!" key03="108:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="162:c:8" /> - <row4 key01="162:layout1" key02="," key03="108:" key04="432: " key05="." key06="162:action" /> - <keylabel key="0:layout1" text="ABC"/> - <keylabel key="0:layout4" text="~\{"/> - </layout3> - <layout4> - <keysize height="161" width="108" /> - <row1 key01="~" key02="`" key03="|" key04="108:" key05="108:" key06="108:" key07="%" key08="108:" key09="{" key10="}" /> - <row2 key01="108:c:9" key02="108:k:105" key03="108:k:108" key04="108:k:103" key05="108:k:106" key06="^" key07="_" key08="=" key09="[" key10="]" /> - <row3 key01="162:layout3" key02="108:" key03="108:" key04="108:" key05="108:" key06="\" key07="<" key08=">" key09="162:c:8" /> - <row4 key01="162:layout1" key02="108:c:34" key03="108:" key04="432: " key05="." key06="162:action" /> - <keylabel key="0:layout1" text="ABC"/> - <keylabel key="0:layout3" text="?123"/> - </layout4> - </object> - </template> - </templates> -</recovery> diff --git a/gui/devices/1920x1200/res/images/back-icon.png b/gui/devices/1920x1200/res/images/back-icon.png Binary files differdeleted file mode 100644 index 521359709..000000000 --- a/gui/devices/1920x1200/res/images/back-icon.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/button.png b/gui/devices/1920x1200/res/images/button.png Binary files differdeleted file mode 100644 index b785f9969..000000000 --- a/gui/devices/1920x1200/res/images/button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/checkbox_checked.png b/gui/devices/1920x1200/res/images/checkbox_checked.png Binary files differdeleted file mode 100644 index 2b7ad5919..000000000 --- a/gui/devices/1920x1200/res/images/checkbox_checked.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/checkbox_empty.png b/gui/devices/1920x1200/res/images/checkbox_empty.png Binary files differdeleted file mode 100644 index 5c0b7bab3..000000000 --- a/gui/devices/1920x1200/res/images/checkbox_empty.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/console-icon.png b/gui/devices/1920x1200/res/images/console-icon.png Binary files differdeleted file mode 100644 index 1e800e6ac..000000000 --- a/gui/devices/1920x1200/res/images/console-icon.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/console-toggle.png b/gui/devices/1920x1200/res/images/console-toggle.png Binary files differdeleted file mode 100644 index 76d0e4888..000000000 --- a/gui/devices/1920x1200/res/images/console-toggle.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/cursor.png b/gui/devices/1920x1200/res/images/cursor.png Binary files differdeleted file mode 100644 index 39a7d6cdc..000000000 --- a/gui/devices/1920x1200/res/images/cursor.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/curtain.jpg b/gui/devices/1920x1200/res/images/curtain.jpg Binary files differdeleted file mode 100644 index 409664c6c..000000000 --- a/gui/devices/1920x1200/res/images/curtain.jpg +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/file.png b/gui/devices/1920x1200/res/images/file.png Binary files differdeleted file mode 100644 index 9d645770f..000000000 --- a/gui/devices/1920x1200/res/images/file.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/folder.png b/gui/devices/1920x1200/res/images/folder.png Binary files differdeleted file mode 100644 index 04017d272..000000000 --- a/gui/devices/1920x1200/res/images/folder.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/home-icon.png b/gui/devices/1920x1200/res/images/home-icon.png Binary files differdeleted file mode 100644 index a326d3005..000000000 --- a/gui/devices/1920x1200/res/images/home-icon.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate001.png b/gui/devices/1920x1200/res/images/indeterminate001.png Binary files differdeleted file mode 100644 index 93916fc25..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate001.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate002.png b/gui/devices/1920x1200/res/images/indeterminate002.png Binary files differdeleted file mode 100644 index 087bafe99..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate002.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate003.png b/gui/devices/1920x1200/res/images/indeterminate003.png Binary files differdeleted file mode 100644 index 881de5bd5..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate003.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate004.png b/gui/devices/1920x1200/res/images/indeterminate004.png Binary files differdeleted file mode 100644 index 757a0cd1c..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate004.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate005.png b/gui/devices/1920x1200/res/images/indeterminate005.png Binary files differdeleted file mode 100644 index 3092415ca..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate005.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/indeterminate006.png b/gui/devices/1920x1200/res/images/indeterminate006.png Binary files differdeleted file mode 100644 index 25bbb3d1c..000000000 --- a/gui/devices/1920x1200/res/images/indeterminate006.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/keyboard1.png b/gui/devices/1920x1200/res/images/keyboard1.png Binary files differdeleted file mode 100644 index 7d42276e9..000000000 --- a/gui/devices/1920x1200/res/images/keyboard1.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/keyboard2.png b/gui/devices/1920x1200/res/images/keyboard2.png Binary files differdeleted file mode 100644 index ff0600d55..000000000 --- a/gui/devices/1920x1200/res/images/keyboard2.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/keyboard3.png b/gui/devices/1920x1200/res/images/keyboard3.png Binary files differdeleted file mode 100644 index 8c90d0c6d..000000000 --- a/gui/devices/1920x1200/res/images/keyboard3.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/keyboard4.png b/gui/devices/1920x1200/res/images/keyboard4.png Binary files differdeleted file mode 100644 index d0f3e414a..000000000 --- a/gui/devices/1920x1200/res/images/keyboard4.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/medium-button.png b/gui/devices/1920x1200/res/images/medium-button.png Binary files differdeleted file mode 100644 index 51593feff..000000000 --- a/gui/devices/1920x1200/res/images/medium-button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/mediumwide-button.png b/gui/devices/1920x1200/res/images/mediumwide-button.png Binary files differdeleted file mode 100644 index b18b65334..000000000 --- a/gui/devices/1920x1200/res/images/mediumwide-button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/minus-button.png b/gui/devices/1920x1200/res/images/minus-button.png Binary files differdeleted file mode 100644 index 7e86486a5..000000000 --- a/gui/devices/1920x1200/res/images/minus-button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/plus-button.png b/gui/devices/1920x1200/res/images/plus-button.png Binary files differdeleted file mode 100644 index ccd96d991..000000000 --- a/gui/devices/1920x1200/res/images/plus-button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/progress_empty.png b/gui/devices/1920x1200/res/images/progress_empty.png Binary files differdeleted file mode 100644 index dab79ea3a..000000000 --- a/gui/devices/1920x1200/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/progress_fill.png b/gui/devices/1920x1200/res/images/progress_fill.png Binary files differdeleted file mode 100644 index 199913063..000000000 --- a/gui/devices/1920x1200/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/radio_empty.png b/gui/devices/1920x1200/res/images/radio_empty.png Binary files differdeleted file mode 100644 index 10d0b94aa..000000000 --- a/gui/devices/1920x1200/res/images/radio_empty.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/radio_selected.png b/gui/devices/1920x1200/res/images/radio_selected.png Binary files differdeleted file mode 100644 index eabd5c4c5..000000000 --- a/gui/devices/1920x1200/res/images/radio_selected.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/slider-touch.png b/gui/devices/1920x1200/res/images/slider-touch.png Binary files differdeleted file mode 100644 index 9f8b4f54b..000000000 --- a/gui/devices/1920x1200/res/images/slider-touch.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/slider-used.png b/gui/devices/1920x1200/res/images/slider-used.png Binary files differdeleted file mode 100644 index 5117203b3..000000000 --- a/gui/devices/1920x1200/res/images/slider-used.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/slider.png b/gui/devices/1920x1200/res/images/slider.png Binary files differdeleted file mode 100644 index ea2a272c8..000000000 --- a/gui/devices/1920x1200/res/images/slider.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/sort-button.png b/gui/devices/1920x1200/res/images/sort-button.png Binary files differdeleted file mode 100644 index e10a3863b..000000000 --- a/gui/devices/1920x1200/res/images/sort-button.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/twrplogo.png b/gui/devices/1920x1200/res/images/twrplogo.png Binary files differdeleted file mode 100644 index 77c771247..000000000 --- a/gui/devices/1920x1200/res/images/twrplogo.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/images/unlock.png b/gui/devices/1920x1200/res/images/unlock.png Binary files differdeleted file mode 100644 index 11109bb06..000000000 --- a/gui/devices/1920x1200/res/images/unlock.png +++ /dev/null diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml deleted file mode 100644 index ae75f8de0..000000000 --- a/gui/devices/1920x1200/res/ui.xml +++ /dev/null @@ -1,491 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <details> - <resolution width="1920" height="1200" /> - <author>TeamWin</author> - <title>Backup Naowz</title> - <description>Default basic theme</description> - <preview>preview.jpg</preview> - </details> - - <include> - <xmlfile name="landscape.xml" /> - </include> - - <resources> - <resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="30" /> - <resource name="fixed" type="font" filename="DroidSansMono.ttf" size="22" /> - <resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" /> - <resource name="main_button" type="image" filename="button" /> - <resource name="file_icon" type="image" filename="file" retainaspect="1" /> - <resource name="folder_icon" type="image" filename="folder" retainaspect="1" /> - <resource name="progress" type="animation" filename="indeterminate" /> - <resource name="progress_empty" type="image" filename="progress_empty" /> - <resource name="progress_full" type="image" filename="progress_fill" /> - <resource name="checkbox_false" type="image" filename="checkbox_empty" retainaspect="1" /> - <resource name="checkbox_true" type="image" filename="checkbox_checked" retainaspect="1" /> - <resource name="radio_false" type="image" filename="radio_empty" retainaspect="1" /> - <resource name="radio_true" type="image" filename="radio_selected" retainaspect="1" /> - <resource name="medium_button" type="image" filename="medium-button" /> - <resource name="mediumwide_button" type="image" filename="mediumwide-button" /> - <resource name="sort_button" type="image" filename="sort-button" /> - <resource name="minus_button" type="image" filename="minus-button" /> - <resource name="plus_button" type="image" filename="plus-button" /> - <resource name="home_icon" type="image" filename="home-icon" retainaspect="1" /> - <resource name="back_icon" type="image" filename="back-icon" retainaspect="1" /> - <resource name="console_button" type="image" filename="console-toggle" retainaspect="1" /> - <resource name="slider" type="image" filename="slider" retainaspect="1" /> - <resource name="slider-used" type="image" filename="slider-used" retainaspect="1" /> - <resource name="slider-touch" type="image" filename="slider-touch" retainaspect="1" /> - <resource name="unlock-icon" type="image" filename="unlock" retainaspect="1" /> - <resource name="keyboard1" type="image" filename="keyboard1" /> - <resource name="keyboard2" type="image" filename="keyboard2" /> - <resource name="keyboard3" type="image" filename="keyboard3" /> - <resource name="keyboard4" type="image" filename="keyboard4" /> - <resource name="cursor" type="image" filename="cursor" retainaspect="1" /> - </resources> - - <variables> - <variable name="col1_x" value="210" /> - <variable name="col2_x" value="590" /> - <variable name="col3_x" value="970" /> - <variable name="col4_x" value="1350" /> - <variable name="row1_y" value="220" /> - <variable name="row2_y" value="680" /> - <variable name="col_center_x" value="780" /> - <variable name="center_x" value="960" /> - <variable name="screen_width" value="1920" /> - <variable name="screen_height" value="1200" /> - <variable name="col_progressbar_x" value="771" /> - <variable name="row_progressbar_y" value="1100" /> - <variable name="col1_medium_x" value="570" /> - <variable name="col2_medium_x" value="770" /> - <variable name="col3_medium_x" value="970" /> - <variable name="col4_medium_x" value="1170" /> - <variable name="row1_medium_y" value="105" /> - <variable name="row2_medium_y" value="365" /> - <variable name="row3_medium_y" value="245" /> - <variable name="row4_medium_y" value="720" /> - <variable name="row5_medium_y" value="700" /> - <variable name="row1_text_y" value="90" /> - <variable name="row2_text_y" value="140" /> - <variable name="row3_text_y" value="190" /> - <variable name="row4_text_y" value="240" /> - <variable name="row5_text_y" value="290" /> - <variable name="row6_text_y" value="340" /> - <variable name="row7_text_y" value="390" /> - <variable name="row8_text_y" value="440" /> - <variable name="row9_text_y" value="490" /> - <variable name="row10_text_y" value="540" /> - <variable name="row11_text_y" value="590" /> - <variable name="row12_text_y" value="640" /> - <variable name="row13_text_y" value="690" /> - <variable name="row14_text_y" value="740" /> - <variable name="row15_text_y" value="790" /> - <variable name="row16_text_y" value="840" /> - <variable name="row17_text_y" value="890" /> - <variable name="row18_text_y" value="940" /> - <variable name="row_offsetmedium_y" value="775" /> - <variable name="home_button_x" value="1620" /> - <variable name="home_button_y" value="5" /> - <variable name="back_button_x" value="1720" /> - <variable name="back_button_y" value="5" /> - <variable name="console_button_x" value="1820" /> - <variable name="console_button_y" value="5" /> - <variable name="nandcheck_col1" value="328" /> - <variable name="nandcheck_col2" value="800" /> - <variable name="nandcheck_row1" value="200" /> - <variable name="nandcheck_row2" value="275" /> - <variable name="nandcheck_row3" value="350" /> - <variable name="nandcheck_row4" value="425" /> - <variable name="nandcheck_row5" value="500" /> - <variable name="nandcheck_row6" value="575" /> - <variable name="nandcheck_row7" value="650" /> - <variable name="nandcheck_row8" value="725" /> - <variable name="button_text_color" value="#AAAAAA" /> - <variable name="text_color" value="#A0A0A0" /> - <variable name="text_success_color" value="#33B5E5" /> - <variable name="text_fail_color" value="#FF0101" /> - <variable name="highlight_color" value="#90909080" /> - <variable name="caps_highlight_color" value="#33B5E580" /> - <variable name="slider_y" value="1000" /> - <variable name="slider_text_y" value="1075" /> - <variable name="sort_text_x" value="400" /> - <variable name="sort_asc_text_y" value="1045" /> - <variable name="sort_asc_button_y" value="1040" /> - <variable name="sort_desc_text_y" value="1105" /> - <variable name="sort_desc_button_y" value="1100" /> - <variable name="sort_col1_button_x" value="670" /> - <variable name="sort_col2_button_x" value="770" /> - <variable name="sort_col3_button_x" value="870" /> - <variable name="col1_sdext_x" value="720" /> - <variable name="col2_sdext_x" value="1100" /> - <variable name="row1_sdext_y" value="180" /> - <variable name="row2_sdext_y" value="265" /> - <variable name="row_extsize_y" value="175" /> - <variable name="row_swapsize_y" value="260" /> - <variable name="input_x" value="50" /> - <variable name="input_width" value="1820" /> - <variable name="input_height" value="50" /> - <variable name="input_background_color" value="#303030" /> - <variable name="input_cursor_color" value="#33B5E5" /> - <variable name="input_cursor_width" value="3" /> - <variable name="console_x" value="50" /> - <variable name="console_width" value="1820" /> - <variable name="console_foreground" value="#A0A0A0" /> - <variable name="warning" value="#F8F8A0" /> - <variable name="error" value="#FF4040" /> - <variable name="highlight" value="#33B5E5" /> - <variable name="console_background" value="#303030" /> - <variable name="console_scroll" value="#303030" /> - <variable name="console_action_height" value="320" /> - <variable name="console_install_height" value="440" /> - <variable name="console_installdone_height" value="300" /> - <variable name="fileselector_folder_x" value="50" /> - <variable name="fileselector_folder_width" value="610" /> - <variable name="fileselector_folderonly_width" value="800" /> - <variable name="fileselector_file_x" value="700" /> - <variable name="fileselector_file_width" value="1170" /> - <variable name="fileselector_install_y" value="205" /> - <variable name="fileselector_install_height" value="800" /> - <variable name="fileselector_header_background" value="#202020" /> - <variable name="fileselector_header_textcolor" value="#AAAAAA" /> - <variable name="fileselector_header_separatorcolor" value="#33B5E5" /> - <variable name="fileselector_header_separatorheight" value="3" /> - <variable name="fileselector_separatorcolor" value="#505050" /> - <variable name="fileselector_separatorheight" value="2" /> - <variable name="fileselector_background" value="#303030" /> - <variable name="fileselector_highlight_color" value="#505050" /> - <variable name="fileselector_highlight_font_color" value="#33B5E5" /> - <variable name="fileselector_spacing" value="18" /> - <variable name="fastscroll_linecolor" value="#50505080" /> - <variable name="fastscroll_rectcolor" value="#33B5E580" /> - <variable name="fastscroll_w" value="60" /> - <variable name="fastscroll_linew" value="3" /> - <variable name="fastscroll_rectw" value="15" /> - <variable name="fastscroll_recth" value="40" /> - <variable name="zipstorage_text_y" value="130" /> - <variable name="listbox_x" value="560" /> - <variable name="listbox_y" value="150" /> - <variable name="listbox_width" value="800" /> - <variable name="listbox_tz_height" value="400" /> - <variable name="listbox_background" value="#303030" /> - <variable name="listbox_spacing" value="18" /> - <variable name="sd_plus_x" value="408" /> - <variable name="lock_y" value="300" /> - <variable name="filemanager_select_x" value="1500" /> - <variable name="filemanager_select_y" value="980" /> - <variable name="backup_name_text_y" value="440" /> - <variable name="backup_name_button_y" value="390" /> - <variable name="col_right_x" value="1870" /> - <variable name="cancel_button_y" value="240" /> - <variable name="terminal_console_y" value="0" /> - <variable name="terminal_console_height" value="610" /> - <variable name="terminal_text_y" value="624" /> - <variable name="terminal_button_y" value="615" /> - <variable name="terminal_input_width" value="1550" /> - <variable name="button_fill_color" value="#303030" /> - <variable name="button_fill_full_width" value="960" /> - <variable name="button_fill_main_width" value="900" /> - <variable name="button_fill_main_height" value="240" /> - <variable name="button_fill_half_height" value="80" /> - <variable name="button_fill_quarter_height" value="60" /> - <variable name="button_full_center_x" value="480" /> - <variable name="flash_list_height" value="300" /> - <variable name="backup_list_x" value="50" /> - <variable name="backup_list_y" value="160" /> - <variable name="backup_list_width" value="900" /> - <variable name="backup_list_height" value="660" /> - <variable name="backup_storage_y" value="405" /> - <variable name="backup_encrypt_y" value="495" /> - <variable name="restore_list_y" value="190" /> - <variable name="restore_list_height" value="600" /> - <variable name="mount_list_height" value="900" /> - <variable name="mount_storage_row" value="850" /> - <variable name="wipe_list_height" value="850" /> - <variable name="wipe_button_y" value="375" /> - <variable name="slidervalue_x" value="540" /> - <variable name="slidervalue_w" value="960" /> - <variable name="slidervalue_line_clr" value="#FFFFFF" /> - <variable name="slidervalue_slider_clr" value="#33B5E5" /> - <variable name="slidervalue_lineh" value="3" /> - <variable name="slidervalue_padding" value="0" /> - <variable name="slidervalue_sliderw" value="20" /> - <variable name="slidervalue_sliderh" value="80" /> - <variable name="pattern_x" value="480" /> - <variable name="pattern_y" value="240" /> - <variable name="pattern_width" value="720" /> - <variable name="pattern_dot_color" value="#33B5E5" /> - <variable name="pattern_dot_color_active" value="#FFFFFF" /> - <variable name="pattern_dot_radius" value="23" /> - <variable name="pattern_line_color" value="#33B5E5" /> - <variable name="pattern_line_width" value="18" /> - <variable name="pattern_button_y" value="190" /> - </variables> - - <mousecursor> - <placement w="15" h="15" /> - <background color="#FFFF00FF" resource="cursor" /> - <speed multiplier="2.5" /> - </mousecursor> - - <templates> - <template name="header"> - <background color="#000000FF" /> - - <object type="fill" color="%button_fill_color%"> - <placement x="0" y="0" w="1920" h="87" /> - </object> - - <object type="fill" color="%highlight%"> - <placement x="0" y="87" w="1920" h="3" /> - </object> - - <object type="image"> - <image resource="twrplogo" /> - <placement x="55" y="45" placement="4" /> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="100" y="5" /> - <text>Team Win Recovery Project v%tw_version%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="100" y="40" /> - <conditions> - <condition var1="tw_no_battery_percent" var2="0" /> - <condition var1="tw_battery" op=">" var2="0" /> - <condition var1="tw_battery" op="<" var2="101" /> - </conditions> - <text>Battery Level: %tw_battery%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="600" y="40" /> - <text>%tw_time%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="1150" y="40" /> - <conditions> - <condition var1="tw_no_cpu_temp" var2="0" /> - </conditions> - <text>CPU: %tw_cpu_temp% °C</text> - </object> - - <object type="text" color="%text_color%"> - <condition var1="tw_simulate_actions" var2="1" /> - <font resource="font" /> - <placement x="750" y="40" /> - <text>SIMULATING ACTIONS</text> - </object> - - <object type="button"> - <placement x="%home_button_x%" y="%home_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <placement x="%back_button_x%" y="%back_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="overlay">lock</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - </template> - - <template name="progress_bar"> - <object type="progressbar"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource empty="progress_empty" full="progress_full" /> - <data name="ui_progress" /> - </object> - - <object type="animation"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource name="progress" /> - <speed fps="15" render="6" /> - <loop frame="1" /> - </object> - </template> - - <template name="pattern_options"> - <object type="button"> - <placement x="%col1_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>3x3</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=3</action> - </object> - - <object type="button"> - <placement x="%col2_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>4x4</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=4</action> - </object> - - <object type="button"> - <placement x="%col3_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>5x5</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=5</action> - </object> - - <object type="button"> - <placement x="%col4_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>6x6</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=6</action> - </object> - </template> - - <template name="sort_options"> - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_asc_text_y%" /> - <text>Sort Ascending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=3</action> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_desc_text_y%" /> - <text>Sort Descending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-3</action> - </object> - </template> - - <template name="flash_zip_console"> - <object type="console"> - <placement x="%console_x%" y="140" w="%console_width%" h="700" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="action_page_console"> - <object type="console"> - <placement x="%console_x%" y="400" w="%console_width%" h="600" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="footer"> - <object type="console"> - <slideout resource="console_button" x="%console_button_x%" y="%console_button_y%" /> - <placement x="%console_x%" y="150" w="%console_width%" h="1000" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="keyboardtemplate"> - <object type="keyboard"> - <placement x="0" y="684" /> - <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" /> - <highlight color="%highlight_color%" /> - <capshighlight color="%caps_highlight_color%" /> - <layout1> - <keysize height="129" width="159" /> - <row1 key01="153:c:9" key02="q" long02="1" key03="w" long03="2" key04="e" long04="3" key05="r" long05="4" key06="t" long06="5" key07="y" long07="6" key08="u" long08="7" key09="i" long09="8" key10="o" long10="9" key11="p" long11="0" key12="177:c:8" /> - <row2 key01="213:layout3" key02="156:a" key03="156:s" key04="156:d" key05="156:f" key06="156:g" key07="156:h" key08="156:j" key09="k" key10="156:l" key11="303:action" /> - <row3 key01="269:layout2" key02="154:z" key03="154:x" key04="154:c" key05="154:v" key06="154:b" key07="154:n" key08="154:m" key09="154:," long09="!" key10="154:." long10="?" key11="265:layout2" /> - <row4 key01="600:c:27" long01=":c:3" key02="720: " key03="/" long03=":" key04="-" long04="_" /> - </layout1> - <layout2> - <keysize height="129" width="159" capslock="0" revert_layout="1" /> - <row1 key01="153:" key02="Q" long02="1" key03="W" long03="2" key04="E" long04="3" key05="R" long05="4" key06="T" long06="5" key07="Y" long07="6" key08="U" long08="7" key09="I" long09="8" key10="O" long10="9" key11="P" long11="0" key12="177:c:8" /> - <row2 key01="213:layout3" key02="156:A" key03="156:S" key04="156:D" key05="156:F" key06="156:G" key07="156:H" key08="156:J" key09="156:K" key10="156:L" key11="303:action" /> - <row3 key01="269:layout1" key02="154:Z" key03="154:X" key04="154:C" key05="154:V" key06="154:B" key07="154:N" key08="154:M" key09="154:!" key10="154:?" key11="265:layout1" /> - <row4 key01="600:" key02="720: " key03=":" key04="_" /> - </layout2> - <layout3> - <keysize height="129" width="159" /> - <row1 key01="153:" key02="1" key03="2" key04="3" key05="4" key06="5" key07="6" key08="7" key09="8" key10="9" key11="0" key12="177:c:8" /> - <row2 key01="213:layout1" key02="156:#" key03="156:$" key04="156:%" key05="156:&" key06="156:*" key07="156:-" key08="156:+" key09="156:(" key10="156:)" key11="303:action" /> - <row3 key01="269:layout4" key02="154:<" key03="154:>" key04="154:=" key05="154:'" key06="154:;" key07="154:," key08="154:." key09="154:!" key10="154:?" key11="265:layout4" /> - <row4 key01="282:" key02="/" key03="@" key04="720: " key05="159:c:34" key06="_" /> - </layout3> - <layout4> - <keysize height="129" width="159" /> - <row1 key01="153:" key02="~" key03="`" key04="|" key05="159:" key06="159:" key07="159:" key08="159:" key09="159:" key10="159:" key11="159:" key12="177:c:8" /> - <row2 key01="213:layout1" key02="156:c:-105" key03="156:c:-108" key04="156:c:-103" key05="156:c:-106" key06="156:^" key07="156:" key08="156:" key09="156:{" key10="156:}" key11="303:action" /> - <row3 key01="269:layout3" key02="154:\" key03="154:" key04="154:" key05="154:" key06="154:" key07="154:[" key08="154:]" key09="154:!" key10="154:?" key11="265:layout3" /> - <row4 key01="600:" key02="720: " /> - </layout4> - </object> - </template> - </templates> -</recovery> diff --git a/gui/devices/320x320/res/images/back-icon.png b/gui/devices/320x320/res/images/back-icon.png Binary files differdeleted file mode 100644 index 85b05e664..000000000 --- a/gui/devices/320x320/res/images/back-icon.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/checkbox_checked.png b/gui/devices/320x320/res/images/checkbox_checked.png Binary files differdeleted file mode 100644 index 6a130f2c9..000000000 --- a/gui/devices/320x320/res/images/checkbox_checked.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/checkbox_empty.png b/gui/devices/320x320/res/images/checkbox_empty.png Binary files differdeleted file mode 100644 index 67fe20b3d..000000000 --- a/gui/devices/320x320/res/images/checkbox_empty.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/cursor.png b/gui/devices/320x320/res/images/cursor.png Binary files differdeleted file mode 100644 index 39a7d6cdc..000000000 --- a/gui/devices/320x320/res/images/cursor.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/curtain.jpg b/gui/devices/320x320/res/images/curtain.jpg Binary files differdeleted file mode 100644 index 0368a6574..000000000 --- a/gui/devices/320x320/res/images/curtain.jpg +++ /dev/null diff --git a/gui/devices/320x320/res/images/file.png b/gui/devices/320x320/res/images/file.png Binary files differdeleted file mode 100644 index 4e77eab63..000000000 --- a/gui/devices/320x320/res/images/file.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/folder.png b/gui/devices/320x320/res/images/folder.png Binary files differdeleted file mode 100644 index 7797226d7..000000000 --- a/gui/devices/320x320/res/images/folder.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/home-icon.png b/gui/devices/320x320/res/images/home-icon.png Binary files differdeleted file mode 100644 index c14b53b56..000000000 --- a/gui/devices/320x320/res/images/home-icon.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate001.png b/gui/devices/320x320/res/images/indeterminate001.png Binary files differdeleted file mode 100644 index 63117b4a6..000000000 --- a/gui/devices/320x320/res/images/indeterminate001.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate002.png b/gui/devices/320x320/res/images/indeterminate002.png Binary files differdeleted file mode 100644 index 428caa01b..000000000 --- a/gui/devices/320x320/res/images/indeterminate002.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate003.png b/gui/devices/320x320/res/images/indeterminate003.png Binary files differdeleted file mode 100644 index 0ce350433..000000000 --- a/gui/devices/320x320/res/images/indeterminate003.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate004.png b/gui/devices/320x320/res/images/indeterminate004.png Binary files differdeleted file mode 100644 index 837280465..000000000 --- a/gui/devices/320x320/res/images/indeterminate004.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate005.png b/gui/devices/320x320/res/images/indeterminate005.png Binary files differdeleted file mode 100644 index 9985f085b..000000000 --- a/gui/devices/320x320/res/images/indeterminate005.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/indeterminate006.png b/gui/devices/320x320/res/images/indeterminate006.png Binary files differdeleted file mode 100644 index 5f7ee9922..000000000 --- a/gui/devices/320x320/res/images/indeterminate006.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/keyboard1.png b/gui/devices/320x320/res/images/keyboard1.png Binary files differdeleted file mode 100644 index 43d588a2d..000000000 --- a/gui/devices/320x320/res/images/keyboard1.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/keyboard2.png b/gui/devices/320x320/res/images/keyboard2.png Binary files differdeleted file mode 100644 index 31807abbe..000000000 --- a/gui/devices/320x320/res/images/keyboard2.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/keyboard3.png b/gui/devices/320x320/res/images/keyboard3.png Binary files differdeleted file mode 100644 index cbb1cfbb4..000000000 --- a/gui/devices/320x320/res/images/keyboard3.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/keyboard4.png b/gui/devices/320x320/res/images/keyboard4.png Binary files differdeleted file mode 100644 index a6173baf2..000000000 --- a/gui/devices/320x320/res/images/keyboard4.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/medium-button.png b/gui/devices/320x320/res/images/medium-button.png Binary files differdeleted file mode 100644 index dec6945a2..000000000 --- a/gui/devices/320x320/res/images/medium-button.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/menu-button.png b/gui/devices/320x320/res/images/menu-button.png Binary files differdeleted file mode 100644 index 80670123a..000000000 --- a/gui/devices/320x320/res/images/menu-button.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/minus-button.png b/gui/devices/320x320/res/images/minus-button.png Binary files differdeleted file mode 100644 index 8e7496977..000000000 --- a/gui/devices/320x320/res/images/minus-button.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/plus-button.png b/gui/devices/320x320/res/images/plus-button.png Binary files differdeleted file mode 100644 index de8e3339b..000000000 --- a/gui/devices/320x320/res/images/plus-button.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/progress_empty.png b/gui/devices/320x320/res/images/progress_empty.png Binary files differdeleted file mode 100644 index cc65c388f..000000000 --- a/gui/devices/320x320/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/progress_fill.png b/gui/devices/320x320/res/images/progress_fill.png Binary files differdeleted file mode 100644 index bdce31f85..000000000 --- a/gui/devices/320x320/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/radio_empty.png b/gui/devices/320x320/res/images/radio_empty.png Binary files differdeleted file mode 100644 index 00451f798..000000000 --- a/gui/devices/320x320/res/images/radio_empty.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/radio_selected.png b/gui/devices/320x320/res/images/radio_selected.png Binary files differdeleted file mode 100644 index 6db0504e3..000000000 --- a/gui/devices/320x320/res/images/radio_selected.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/slideout.png b/gui/devices/320x320/res/images/slideout.png Binary files differdeleted file mode 100644 index a5a5fcbd0..000000000 --- a/gui/devices/320x320/res/images/slideout.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/slider-touch.png b/gui/devices/320x320/res/images/slider-touch.png Binary files differdeleted file mode 100644 index d06e99f6f..000000000 --- a/gui/devices/320x320/res/images/slider-touch.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/slider-used.png b/gui/devices/320x320/res/images/slider-used.png Binary files differdeleted file mode 100644 index 1d8196226..000000000 --- a/gui/devices/320x320/res/images/slider-used.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/slider.png b/gui/devices/320x320/res/images/slider.png Binary files differdeleted file mode 100644 index f05205955..000000000 --- a/gui/devices/320x320/res/images/slider.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/sort-button.png b/gui/devices/320x320/res/images/sort-button.png Binary files differdeleted file mode 100644 index 7b4a535ab..000000000 --- a/gui/devices/320x320/res/images/sort-button.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/twrplogo.png b/gui/devices/320x320/res/images/twrplogo.png Binary files differdeleted file mode 100644 index d6a400ad7..000000000 --- a/gui/devices/320x320/res/images/twrplogo.png +++ /dev/null diff --git a/gui/devices/320x320/res/images/unlock.png b/gui/devices/320x320/res/images/unlock.png Binary files differdeleted file mode 100644 index 4007e0d70..000000000 --- a/gui/devices/320x320/res/images/unlock.png +++ /dev/null diff --git a/gui/devices/320x320/res/ui.xml b/gui/devices/320x320/res/ui.xml deleted file mode 100644 index 345a81c6a..000000000 --- a/gui/devices/320x320/res/ui.xml +++ /dev/null @@ -1,469 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <details> - <resolution width="320" height="320" /> - <roundscreen offset_x="40" offset_y="40" /> - <author>TeamWin</author> - <title>Backup Naowz</title> - <description>Default basic theme</description> - <preview>preview.jpg</preview> - </details> - - <include> - <xmlfile name="watch.xml" /> - </include> - - <resources> - <resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="14" /> - <resource name="mediumfont" type="font" filename="RobotoCondensed-Regular.ttf" size="14" /> - <resource name="filelist" type="font" filename="RobotoCondensed-Regular.ttf" size="14" /> - <resource name="fixed" type="font" filename="DroidSansMono.ttf" size="12" /> - <resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" /> - <resource name="main_button" type="image" filename="menu-button" /> - <resource name="file_icon" type="image" filename="file" retainaspect="1" /> - <resource name="folder_icon" type="image" filename="folder" retainaspect="1" /> - <resource name="slideout" type="image" filename="slideout" retainaspect="1" /> - <resource name="progress" type="animation" filename="indeterminate" /> - <resource name="progress_empty" type="image" filename="progress_empty" /> - <resource name="progress_full" type="image" filename="progress_fill" /> - <resource name="checkbox_false" type="image" filename="checkbox_empty" retainaspect="1" /> - <resource name="checkbox_true" type="image" filename="checkbox_checked" retainaspect="1" /> - <resource name="radio_false" type="image" filename="radio_empty" retainaspect="1" /> - <resource name="radio_true" type="image" filename="radio_selected" retainaspect="1" /> - <resource name="medium_button" type="image" filename="medium-button" /> - <resource name="sort_button" type="image" filename="sort-button" /> - <resource name="minus_button" type="image" filename="minus-button" /> - <resource name="plus_button" type="image" filename="plus-button" /> - <resource name="home_icon" type="image" filename="home-icon" retainaspect="1" /> - <resource name="back_icon" type="image" filename="back-icon" retainaspect="1" /> - <resource name="slider" type="image" filename="slider" retainaspect="1" /> - <resource name="slider-used" type="image" filename="slider-used" retainaspect="1" /> - <resource name="slider-touch" type="image" filename="slider-touch" retainaspect="1" /> - <resource name="unlock-icon" type="image" filename="unlock" retainaspect="1" /> - <resource name="keyboard1" type="image" filename="keyboard1" /> - <resource name="keyboard2" type="image" filename="keyboard2" /> - <resource name="keyboard3" type="image" filename="keyboard3" /> - <resource name="keyboard4" type="image" filename="keyboard4" /> - <resource name="cursor" type="image" filename="cursor" retainaspect="1" /> - </resources> - - <variables> - <variable name="col1_x" value="6" /> - <variable name="col2_x" value="170" /> - <variable name="col_center_x" value="88" /> - <variable name="col_center_medium_x" value="130" /> - <variable name="center_x" value="160" /> - <variable name="row1_home_y" value="50" /> - <variable name="row2_home_y" value="110" /> - <variable name="row3_home_y" value="170" /> - <variable name="row4_home_y" value="230" /> - <variable name="row1_y" value="30" /> - <variable name="row2_y" value="100" /> - <variable name="row3_y" value="170" /> - <variable name="row4_y" value="240" /> - <variable name="row_queue_y" value="184" /> - <variable name="row1_header_y" value="0" /> - <variable name="row1_text_y" value="22" /> - <variable name="row2_text_y" value="44" /> - <variable name="row3_text_y" value="66" /> - <variable name="row4_text_y" value="88" /> - <variable name="row5_text_y" value="110" /> - <variable name="row6_text_y" value="132" /> - <variable name="row7_text_y" value="154" /> - <variable name="row8_text_y" value="176" /> - <variable name="row9_text_y" value="198" /> - <variable name="row10_text_y" value="220" /> - <variable name="row11_text_y" value="242" /> - <variable name="row12_text_y" value="284" /> - <variable name="row13_text_y" value="306" /> - <variable name="zip_status_y" value="300" /> - <variable name="flash_list_height" value="160" /> - <variable name="backup_text_y" value="60" /> - <variable name="col_progressbar_x" value="34" /> - <variable name="row_progressbar_y" value="285" /> - <variable name="col1_medium_x" value="6" /> - <variable name="col2_medium_x" value="83" /> - <variable name="col3_medium_x" value="174" /> - <variable name="col4_medium_x" value="254" /> - <variable name="row1_medium_y" value="24" /> - <variable name="row2_medium_y" value="40" /> - <variable name="row3_medium_y" value="56" /> - <variable name="row4_medium_y" value="72" /> - <variable name="row5_medium_y" value="88" /> - <variable name="row6_medium_y" value="104" /> - <variable name="row7_medium_y" value="120" /> - <variable name="slider_y" value="268" /> - <variable name="slider_text_y" value="294" /> - <variable name="button_text_color" value="#AAAAAA" /> - <variable name="text_color" value="#FFFFFF" /> - <variable name="text_success_color" value="#33B5E5" /> - <variable name="text_fail_color" value="#FF0101" /> - <variable name="highlight_color" value="#90909080" /> - <variable name="caps_highlight_color" value="#33B5E580" /> - <variable name="home_button_x" value="3" /> - <variable name="home_button_y" value="300" /> - <variable name="back_button_x" value="317" /> - <variable name="back_button_y" value="300" /> - <variable name="sort_text_x" value="20" /> - <variable name="sort_asc_text_y" value="232" /> - <variable name="sort_asc_button_y" value="230" /> - <variable name="sort_desc_text_y" value="262" /> - <variable name="sort_desc_button_y" value="260" /> - <variable name="sort_col1_button_x" value="135" /> - <variable name="sort_col2_button_x" value="195" /> - <variable name="sort_col3_button_x" value="255" /> - <variable name="input_width" value="308" /> - <variable name="input_width_conf" value="10" /> - <variable name="input_height" value="18" /> - <variable name="input_background_color" value="#303030" /> - <variable name="input_cursor_color" value="#33B5E5" /> - <variable name="input_cursor_width" value="2" /> - <variable name="console_x" value="0" /> - <variable name="console_width" value="320" /> - <variable name="console_foreground" value="#A0A0A0" /> - <variable name="warning" value="#F8F8A0" /> - <variable name="error" value="#FF4040" /> - <variable name="highlight" value="#33B5E5" /> - <variable name="console_background" value="#303030" /> - <variable name="console_scroll" value="#303030" /> - <variable name="console_action_height" value="160" /> - <variable name="console_install_height" value="160" /> - <variable name="console_installdone_height" value="160" /> - <variable name="fileselector_x" value="0" /> - <variable name="fileselector_y" value="44" /> - <variable name="fileselector_width" value="320" /> - <variable name="fileselector_install_height" value="182" /> - <variable name="fileselector_header_background" value="#202020" /> - <variable name="fileselector_header_textcolor" value="#AAAAAA" /> - <variable name="fileselector_header_separatorcolor" value="#33B5E5" /> - <variable name="fileselector_header_separatorheight" value="2" /> - <variable name="fileselector_separatorcolor" value="#505050" /> - <variable name="fileselector_separatorheight" value="1" /> - <variable name="fileselector_background" value="#303030" /> - <variable name="fileselector_highlight_color" value="#505050" /> - <variable name="fileselector_highlight_font_color" value="#33B5E5" /> - <variable name="fileselector_spacing" value="12" /> - <variable name="fastscroll_linecolor" value="#50505080" /> - <variable name="fastscroll_rectcolor" value="#33B5E580" /> - <variable name="fastscroll_w" value="32" /> - <variable name="fastscroll_linew" value="1" /> - <variable name="fastscroll_rectw" value="7" /> - <variable name="fastscroll_recth" value="24" /> - <variable name="listbox_x" value="0" /> - <variable name="listbox_width" value="320" /> - <variable name="listbox_background" value="#303030" /> - <variable name="listbox_spacing" value="12" /> - <variable name="sd_plus_x" value="174" /> - <variable name="sdext_text_x" value="56" /> - <variable name="sdext_text_y" value="18" /> - <variable name="sdswap_button_y" value="45" /> - <variable name="sdswap_text_x" value="56" /> - <variable name="sdswap_text_y" value="47" /> - <variable name="sdfilesystem_text_y" value="92" /> - <variable name="sdfilesystem_button_y" value="120" /> - <variable name="lock_y" value="120" /> - <variable name="filemanager_select_x" value="130" /> - <variable name="filemanager_select_y" value="280" /> - <variable name="terminal_console_height" value="126" /> - <variable name="terminal_text_y" value="128" /> - <variable name="terminal_button_y" value="300" /> - <variable name="listbox_tz_height" value="159" /> - <variable name="row_dst_text_y" value="162" /> - <variable name="row_offset_text_y" value="184" /> - <variable name="row_offset_medium_y" value="206" /> - <variable name="tz_set_y" value="271" /> - <variable name="tz_current_y" value="249" /> - <variable name="system_ro_y" value="216" /> - <variable name="button_fill_color" value="#303030" /> - <variable name="button_fill_full_width" value="308" /> - <variable name="button_fill_main_width" value="150" /> - <variable name="button_fill_med_width" value="72" /> - <variable name="button_fill_small_width" value="36" /> - <variable name="button_fill_main_height" value="44" /> - <variable name="button_fill_half_height" value="22" /> - <variable name="button_fill_quarter_height" value="22" /> - <variable name="button_refresh_x" value="152" /> - <variable name="backup_list_y" value="26" /> - <variable name="backup_list_height" value="184" /> - <variable name="restore_list_height" value="206" /> - <variable name="backup_button_row1" value="214" /> - <variable name="backup_button_row2" value="242" /> - <variable name="mount_list_height" value="190" /> - <variable name="mount_storage_row" value="193" /> - <variable name="storage_list_height" value="134" /> - <variable name="wipe_list_height" value="216" /> - <variable name="wipe_button_y" value="170" /> - <variable name="slidervalue_w" value="308" /> - <variable name="slidervalue_line_clr" value="#FFFFFF" /> - <variable name="slidervalue_slider_clr" value="#33B5E5" /> - <variable name="slidervalue_lineh" value="1" /> - <variable name="slidervalue_padding" value="8" /> - <variable name="slidervalue_sliderw" value="4" /> - <variable name="slidervalue_sliderh" value="20" /> - <variable name="wipe_button_row1" value="240" /> - <variable name="invalid_partition_y" value="218" /> - <variable name="pattern_x" value="70" /> - <variable name="pattern_y" value="22" /> - <variable name="pattern_width" value="180" /> - <variable name="pattern_dot_color" value="#33B5E5" /> - <variable name="pattern_dot_color_active" value="#FFFFFF" /> - <variable name="pattern_dot_radius" value="7" /> - <variable name="pattern_line_color" value="#33B5E5" /> - <variable name="pattern_line_width" value="4" /> - <variable name="pattern_button_y" value="33" /> - </variables> - - <templates> - <template name="twrpheader"> - <object type="fill" color="%button_fill_color%"> - <placement x="0" y="0" w="320" h="26" /> - </object> - - <object type="fill" color="%highlight%"> - <placement x="0" y="26" w="320" h="1" /> - </object> - - <object type="image"> - <image resource="twrplogo" /> - <placement x="13" y="13" placement="4" /> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="25" y="3" /> - <text>TWRP v%tw_version%</text> - </object> - - <object type="text" color="%text_fail_color%"> - <condition var1="tw_simulate_actions" var2="1" /> - <font resource="font" /> - <placement x="25" y="21" /> - <text>SIMULATION</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="160" y="3" placement="5" /> - <text>%tw_time%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="316" y="3" placement="1" /> - <conditions> - <condition var1="tw_no_battery_percent" var2="0" /> - <condition var1="tw_battery" op=">" var2="0" /> - <condition var1="tw_battery" op="<" var2="101" /> - </conditions> - <text>%tw_battery%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="190" y="3" /> - <conditions> - <condition var1="tw_no_cpu_temp" var2="0" /> - </conditions> - <text>CPU: %tw_cpu_temp% °C</text> - </object> - </template> - - <template name="header"> - <background color="#000000FF" /> - - <object type="button"> - <placement x="%home_button_x%" y="%home_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <placement x="%back_button_x%" y="%back_button_y%" placement="1" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - </template> - - <template name="progress_bar"> - <object type="progressbar"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource empty="progress_empty" full="progress_full" /> - <data name="ui_progress" /> - </object> - - <object type="animation"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource name="progress" /> - <speed fps="15" render="2" /> - <loop frame="1" /> - </object> - </template> - - <template name="action_page_console"> - <object type="console"> - <placement x="%console_x%" y="%row2_y%" w="%console_width%" h="%console_action_height%" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="pattern_options"> - <object type="button"> - <placement x="%col1_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>3x3</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=3</action> - </object> - - <object type="button"> - <placement x="%col2_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>4x4</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=4</action> - </object> - - <object type="button"> - <placement x="%col3_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>5x5</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=5</action> - </object> - - <object type="button"> - <placement x="%col4_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>6x6</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=6</action> - </object> - </template> - - <template name="sort_options"> - <object type="text" color="%text_color%"> - <font resource="mediumfont" /> - <placement x="%sort_text_x%" y="%sort_asc_text_y%" /> - <text>Sort Ascending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_asc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_asc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_asc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=3</action> - </object> - - <object type="text" color="%text_color%"> - <font resource="mediumfont" /> - <placement x="%sort_text_x%" y="%sort_desc_text_y%" /> - <text>Sort Descending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_desc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_desc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_desc_button_y%" /> - <font resource="mediumfont" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-3</action> - </object> - </template> - - <template name="footer"> - <object type="console"> - <slideout resource="slideout" x="%center_x%" y="288" placement="5" /> - <placement x="%console_x%" y="0" w="%console_width%" h="288" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="keyboardtemplate"> - <object type="keyboard"> - <placement x="0" y="150" /> - <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" /> - <highlight color="%highlight_color%" /> - <capshighlight color="%caps_highlight_color%" /> - <layout1> - <keysize height="36" width="32" /> - <row1 key01="q" long01="1" key02="w" long02="2" key03="e" long03="3" key04="r" long04="4" key05="t" long05="5" key06="y" long06="6" key07="u" long07="7" key08="i" long08="8" key09="o" long09="9" key10="p" long10="0" /> - <row2 key01="48:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="48:l" /> - <row3 key01="48:layout2" key02="z" key03="x" key04="c" key05="v" key06="b" key07="n" key08="m" key09="48:c:8" /> - <row4 key01="48:layout3" key02="32:," key03="160: " key04="32:." key05="48:a:action" /> - </layout1> - <layout2> - <keysize height="36" width="32" capslock="0" revert_layout="1" /> - <row1 key01="Q" long01="1" key02="W" long02="2" key03="E" long03="3" key04="R" long04="4" key05="T" long05="5" key06="Y" long06="6" key07="U" long07="7" key08="I" long08="8" key09="O" long09="9" key10="P" long10="0" /> - <row2 key01="48:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="48:L" /> - <row3 key01="48:layout1" key02="Z" key03="X" key04="C" key05="V" key06="B" key07="N" key08="M" key09="48:c:8" /> - <row4 key01="48:layout3" key02="32:," key03="160: " key04="32:." key05="48:action" /> - </layout2> - <layout3> - <keysize height="36" width="32" /> - <row1 key01="1" key02="2" key03="3" key04="4" key05="5" key06="6" key07="7" key08="8" key09="9" key10="0" /> - <row2 key01="@" key02="#" key03="$" key04="%" key05="&" key06="*" key07="-" key08="+" key09="(" key10=")" /> - <row3 key01="48:layout4" key02="!" key03="32:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="48:c:8" /> - <row4 key01="48:layout1" key02="32:," key03="160: " key04="32:." key05="48:action" /> - </layout3> - <layout4> - <keysize height="36" width="32" /> - <row1 key01="~" key02="`" key03="|" key04="32:" key05="32:" key06="32:" key07="%" key08="32:" key09="{" key10="}" /> - <row2 key01="32:" key02="32:" key03="32:" key04="32:" key05="32:" key06="^" key07="_" key08="=" key09="[" key10="]" /> - <row3 key01="48:layout3" key02="32:" key03="32:" key04="32:" key05="32:" key06="\" key07="<" key08=">" key09="48:c:8" /> - <row4 key01="48:layout1" key02="32:c:34" key03="160: " key04="32:." key05="48:action" /> - </layout4> - </object> - </template> - </templates> -</recovery> diff --git a/gui/devices/480x800/res/images/back-icon.png b/gui/devices/480x800/res/images/back-icon.png Binary files differdeleted file mode 100644 index 987d859cf..000000000 --- a/gui/devices/480x800/res/images/back-icon.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/checkbox_checked.png b/gui/devices/480x800/res/images/checkbox_checked.png Binary files differdeleted file mode 100644 index a9ccc1afa..000000000 --- a/gui/devices/480x800/res/images/checkbox_checked.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/checkbox_empty.png b/gui/devices/480x800/res/images/checkbox_empty.png Binary files differdeleted file mode 100644 index 209100fcb..000000000 --- a/gui/devices/480x800/res/images/checkbox_empty.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/cursor.png b/gui/devices/480x800/res/images/cursor.png Binary files differdeleted file mode 100644 index 39a7d6cdc..000000000 --- a/gui/devices/480x800/res/images/cursor.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/curtain.jpg b/gui/devices/480x800/res/images/curtain.jpg Binary files differdeleted file mode 100644 index dfd59d96b..000000000 --- a/gui/devices/480x800/res/images/curtain.jpg +++ /dev/null diff --git a/gui/devices/480x800/res/images/file.png b/gui/devices/480x800/res/images/file.png Binary files differdeleted file mode 100644 index 5b06f74aa..000000000 --- a/gui/devices/480x800/res/images/file.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/folder.png b/gui/devices/480x800/res/images/folder.png Binary files differdeleted file mode 100644 index a6def97dc..000000000 --- a/gui/devices/480x800/res/images/folder.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/home-icon.png b/gui/devices/480x800/res/images/home-icon.png Binary files differdeleted file mode 100644 index a7594a7ac..000000000 --- a/gui/devices/480x800/res/images/home-icon.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate001.png b/gui/devices/480x800/res/images/indeterminate001.png Binary files differdeleted file mode 100644 index d3fe95170..000000000 --- a/gui/devices/480x800/res/images/indeterminate001.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate002.png b/gui/devices/480x800/res/images/indeterminate002.png Binary files differdeleted file mode 100644 index 08ed1ed31..000000000 --- a/gui/devices/480x800/res/images/indeterminate002.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate003.png b/gui/devices/480x800/res/images/indeterminate003.png Binary files differdeleted file mode 100644 index cbe0bd6b3..000000000 --- a/gui/devices/480x800/res/images/indeterminate003.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate004.png b/gui/devices/480x800/res/images/indeterminate004.png Binary files differdeleted file mode 100644 index 0ec235762..000000000 --- a/gui/devices/480x800/res/images/indeterminate004.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate005.png b/gui/devices/480x800/res/images/indeterminate005.png Binary files differdeleted file mode 100644 index 36ac40135..000000000 --- a/gui/devices/480x800/res/images/indeterminate005.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/indeterminate006.png b/gui/devices/480x800/res/images/indeterminate006.png Binary files differdeleted file mode 100644 index a46811d8a..000000000 --- a/gui/devices/480x800/res/images/indeterminate006.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/keyboard1.png b/gui/devices/480x800/res/images/keyboard1.png Binary files differdeleted file mode 100644 index d40b65ada..000000000 --- a/gui/devices/480x800/res/images/keyboard1.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/keyboard2.png b/gui/devices/480x800/res/images/keyboard2.png Binary files differdeleted file mode 100644 index 398e31fda..000000000 --- a/gui/devices/480x800/res/images/keyboard2.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/keyboard3.png b/gui/devices/480x800/res/images/keyboard3.png Binary files differdeleted file mode 100644 index 366765791..000000000 --- a/gui/devices/480x800/res/images/keyboard3.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/keyboard4.png b/gui/devices/480x800/res/images/keyboard4.png Binary files differdeleted file mode 100644 index 18244e269..000000000 --- a/gui/devices/480x800/res/images/keyboard4.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/medium-button.png b/gui/devices/480x800/res/images/medium-button.png Binary files differdeleted file mode 100644 index 7befcc9b2..000000000 --- a/gui/devices/480x800/res/images/medium-button.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/menu-button.png b/gui/devices/480x800/res/images/menu-button.png Binary files differdeleted file mode 100644 index 4f70b89df..000000000 --- a/gui/devices/480x800/res/images/menu-button.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/minus-button.png b/gui/devices/480x800/res/images/minus-button.png Binary files differdeleted file mode 100644 index 265cb8540..000000000 --- a/gui/devices/480x800/res/images/minus-button.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/plus-button.png b/gui/devices/480x800/res/images/plus-button.png Binary files differdeleted file mode 100644 index 6d1434fda..000000000 --- a/gui/devices/480x800/res/images/plus-button.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/progress_empty.png b/gui/devices/480x800/res/images/progress_empty.png Binary files differdeleted file mode 100644 index 1a7471e44..000000000 --- a/gui/devices/480x800/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/progress_fill.png b/gui/devices/480x800/res/images/progress_fill.png Binary files differdeleted file mode 100644 index a67e8ff2b..000000000 --- a/gui/devices/480x800/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/radio_empty.png b/gui/devices/480x800/res/images/radio_empty.png Binary files differdeleted file mode 100644 index e161e398f..000000000 --- a/gui/devices/480x800/res/images/radio_empty.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/radio_selected.png b/gui/devices/480x800/res/images/radio_selected.png Binary files differdeleted file mode 100644 index 57c0242ee..000000000 --- a/gui/devices/480x800/res/images/radio_selected.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/slideout.png b/gui/devices/480x800/res/images/slideout.png Binary files differdeleted file mode 100644 index 6f6cde502..000000000 --- a/gui/devices/480x800/res/images/slideout.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/slider-touch.png b/gui/devices/480x800/res/images/slider-touch.png Binary files differdeleted file mode 100644 index b4d25dad8..000000000 --- a/gui/devices/480x800/res/images/slider-touch.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/slider-used.png b/gui/devices/480x800/res/images/slider-used.png Binary files differdeleted file mode 100644 index 085307f37..000000000 --- a/gui/devices/480x800/res/images/slider-used.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/slider.png b/gui/devices/480x800/res/images/slider.png Binary files differdeleted file mode 100644 index 246eb0376..000000000 --- a/gui/devices/480x800/res/images/slider.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/sort-button.png b/gui/devices/480x800/res/images/sort-button.png Binary files differdeleted file mode 100644 index e079700f9..000000000 --- a/gui/devices/480x800/res/images/sort-button.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/twrplogo.png b/gui/devices/480x800/res/images/twrplogo.png Binary files differdeleted file mode 100644 index 08acdddf2..000000000 --- a/gui/devices/480x800/res/images/twrplogo.png +++ /dev/null diff --git a/gui/devices/480x800/res/images/unlock.png b/gui/devices/480x800/res/images/unlock.png Binary files differdeleted file mode 100644 index 88e27bffe..000000000 --- a/gui/devices/480x800/res/images/unlock.png +++ /dev/null diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml deleted file mode 100644 index ec9df7ed8..000000000 --- a/gui/devices/480x800/res/ui.xml +++ /dev/null @@ -1,469 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <details> - <resolution width="480" height="800" /> - <author>TeamWin</author> - <title>Backup Naowz</title> - <description>Default basic theme</description> - <preview>preview.jpg</preview> - </details> - - <include> - <xmlfile name="portrait.xml" /> - </include> - - <resources> - <resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="20" /> - <resource name="mediumfont" type="font" filename="RobotoCondensed-Regular.ttf" size="20" /> - <resource name="filelist" type="font" filename="RobotoCondensed-Regular.ttf" size="20" /> - <resource name="fixed" type="font" filename="DroidSansMono.ttf" size="16" /> - <resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" /> - <resource name="main_button" type="image" filename="menu-button" /> - <resource name="file_icon" type="image" filename="file" retainaspect="1" /> - <resource name="folder_icon" type="image" filename="folder" retainaspect="1" /> - <resource name="slideout" type="image" filename="slideout" retainaspect="1" /> - <resource name="progress" type="animation" filename="indeterminate" /> - <resource name="progress_empty" type="image" filename="progress_empty" /> - <resource name="progress_full" type="image" filename="progress_fill" /> - <resource name="checkbox_false" type="image" filename="checkbox_empty" retainaspect="1" /> - <resource name="checkbox_true" type="image" filename="checkbox_checked" retainaspect="1" /> - <resource name="radio_false" type="image" filename="radio_empty" retainaspect="1" /> - <resource name="radio_true" type="image" filename="radio_selected" retainaspect="1" /> - <resource name="medium_button" type="image" filename="medium-button" /> - <resource name="sort_button" type="image" filename="sort-button" /> - <resource name="minus_button" type="image" filename="minus-button" /> - <resource name="plus_button" type="image" filename="plus-button" /> - <resource name="home_icon" type="image" filename="home-icon" retainaspect="1" /> - <resource name="back_icon" type="image" filename="back-icon" retainaspect="1" /> - <resource name="slider" type="image" filename="slider" retainaspect="1" /> - <resource name="slider-used" type="image" filename="slider-used" retainaspect="1" /> - <resource name="slider-touch" type="image" filename="slider-touch" retainaspect="1" /> - <resource name="unlock-icon" type="image" filename="unlock" retainaspect="1" /> - <resource name="keyboard1" type="image" filename="keyboard1" /> - <resource name="keyboard2" type="image" filename="keyboard2" /> - <resource name="keyboard3" type="image" filename="keyboard3" /> - <resource name="keyboard4" type="image" filename="keyboard4" /> - <resource name="cursor" type="image" filename="cursor" retainaspect="1" /> - </resources> - - <variables> - <variable name="col1_x" value="10" /> - <variable name="col2_x" value="240" /> - <variable name="col_center_x" value="128" /> - <variable name="col_center_medium_x" value="183" /> - <variable name="center_x" value="240" /> - <variable name="row1_y" value="140" /> - <variable name="row2_y" value="290" /> - <variable name="row3_y" value="450" /> - <variable name="row4_y" value="610" /> - <variable name="row_queue_y" value="510" /> - <variable name="row1_header_y" value="110" /> - <variable name="row1_text_y" value="140" /> - <variable name="row2_text_y" value="170" /> - <variable name="row3_text_y" value="200" /> - <variable name="row4_text_y" value="230" /> - <variable name="row5_text_y" value="260" /> - <variable name="row6_text_y" value="290" /> - <variable name="row7_text_y" value="320" /> - <variable name="row8_text_y" value="350" /> - <variable name="row9_text_y" value="380" /> - <variable name="row10_text_y" value="410" /> - <variable name="row11_text_y" value="440" /> - <variable name="row12_text_y" value="470" /> - <variable name="row13_text_y" value="500" /> - <variable name="row14_text_y" value="530" /> - <variable name="row15_text_y" value="560" /> - <variable name="row16_text_y" value="590" /> - <variable name="row17_text_y" value="620" /> - <variable name="row18_text_y" value="650" /> - <variable name="zip_status_y" value="585" /> - <variable name="flash_list_height" value="210" /> - <variable name="tz_selected_y" value="110" /> - <variable name="tz_set_y" value="580" /> - <variable name="tz_current_y" value="730" /> - <variable name="system_ro_y" value="550" /> - <variable name="col_progressbar_x" value="114" /> - <variable name="row_progressbar_y" value="720" /> - <variable name="col1_medium_x" value="10" /> - <variable name="col2_medium_x" value="125" /> - <variable name="col3_medium_x" value="240" /> - <variable name="col4_medium_x" value="355" /> - <variable name="row1_medium_y" value="130" /> - <variable name="row2_medium_y" value="205" /> - <variable name="row3_medium_y" value="280" /> - <variable name="row4_medium_y" value="355" /> - <variable name="row5_medium_y" value="430" /> - <variable name="row6_medium_y" value="505" /> - <variable name="row7_medium_y" value="580" /> - <variable name="slider_y" value="680" /> - <variable name="slider_text_y" value="721" /> - <variable name="button_text_color" value="#AAAAAA" /> - <variable name="text_color" value="#FFFFFF" /> - <variable name="text_success_color" value="#33B5E5" /> - <variable name="text_fail_color" value="#FF0101" /> - <variable name="highlight_color" value="#90909080" /> - <variable name="caps_highlight_color" value="#33B5E580" /> - <variable name="home_button_x" value="10" /> - <variable name="home_button_y" value="766" /> - <variable name="back_button_x" value="470" /> - <variable name="back_button_y" value="766" /> - <variable name="sort_asc_text_y" value="685" /> - <variable name="sort_asc_button_y" value="685" /> - <variable name="sort_desc_text_y" value="725" /> - <variable name="sort_desc_button_y" value="725" /> - <variable name="sort_col1_button_x" value="180" /> - <variable name="sort_col2_button_x" value="240" /> - <variable name="sort_col3_button_x" value="300" /> - <variable name="input_width" value="460" /> - <variable name="input_height" value="40" /> - <variable name="input_background_color" value="#303030" /> - <variable name="input_cursor_color" value="#33B5E5" /> - <variable name="input_cursor_width" value="3" /> - <variable name="console_x" value="0" /> - <variable name="console_width" value="480" /> - <variable name="console_foreground" value="#A0A0A0" /> - <variable name="warning" value="#F8F8A0" /> - <variable name="error" value="#FF4040" /> - <variable name="highlight" value="#33B5E5" /> - <variable name="console_background" value="#303030" /> - <variable name="console_scroll" value="#303030" /> - <variable name="console_action_height" value="320" /> - <variable name="console_install_height" value="440" /> - <variable name="console_installdone_height" value="300" /> - <variable name="fileselector_x" value="5" /> - <variable name="fileselector_width" value="470" /> - <variable name="fileselector_install_height" value="480" /> - <variable name="fileselector_header_background" value="#202020" /> - <variable name="fileselector_header_textcolor" value="#AAAAAA" /> - <variable name="fileselector_header_separatorcolor" value="#33B5E5" /> - <variable name="fileselector_header_separatorheight" value="3" /> - <variable name="fileselector_separatorcolor" value="#505050" /> - <variable name="fileselector_separatorheight" value="2" /> - <variable name="fileselector_background" value="#303030" /> - <variable name="fileselector_highlight_color" value="#505050" /> - <variable name="fileselector_highlight_font_color" value="#33B5E5" /> - <variable name="fileselector_spacing" value="18" /> - <variable name="fastscroll_linecolor" value="#50505080" /> - <variable name="fastscroll_rectcolor" value="#33B5E580" /> - <variable name="fastscroll_w" value="40" /> - <variable name="fastscroll_linew" value="2" /> - <variable name="fastscroll_rectw" value="10" /> - <variable name="fastscroll_recth" value="30" /> - <variable name="listbox_x" value="5" /> - <variable name="listbox_width" value="470" /> - <variable name="listbox_tz_height" value="310" /> - <variable name="listbox_background" value="#303030" /> - <variable name="listbox_spacing" value="18" /> - <variable name="sd_plus_x" value="280" /> - <variable name="sdext_text_x" value="84" /> - <variable name="sdext_text_y" value="145" /> - <variable name="sdswap_button_y" value="185" /> - <variable name="sdswap_text_x" value="84" /> - <variable name="sdswap_text_y" value="190" /> - <variable name="sdfilesystem_text_y" value="240" /> - <variable name="sdfilesystem_button_y" value="280" /> - <variable name="lock_y" value="250" /> - <variable name="filemanager_select_x" value="365" /> - <variable name="filemanager_select_y" value="690" /> - <variable name="backup_name_y" value="350" /> - <variable name="terminal_console_height" value="370" /> - <variable name="terminal_text_y" value="390" /> - <variable name="terminal_button_y" value="380" /> - <variable name="row_dst_text_y" value="440" /> - <variable name="row_offset_text_y" value="480" /> - <variable name="row_offset_medium_y" value="505" /> - <variable name="button_fill_color" value="#303030" /> - <variable name="button_fill_full_width" value="455" /> - <variable name="button_fill_main_width" value="225" /> - <variable name="button_fill_main_height" value="135" /> - <variable name="button_fill_half_height" value="67" /> - <variable name="button_fill_quarter_height" value="34" /> - <variable name="backup_list_height" value="300" /> - <variable name="backup_button_row1" value="480" /> - <variable name="backup_button_row2" value="520" /> - <variable name="mount_list_height" value="380" /> - <variable name="mount_storage_row" value="500" /> - <variable name="storage_list_height" value="400" /> - <variable name="wipe_list_height" value="460" /> - <variable name="wipe_button_row1" value="600" /> - <variable name="wipe_button_y" value="400" /> - <variable name="slidervalue_w" value="460" /> - <variable name="slidervalue_line_clr" value="#FFFFFF" /> - <variable name="slidervalue_slider_clr" value="#33B5E5" /> - <variable name="slidervalue_lineh" value="1" /> - <variable name="slidervalue_padding" value="13" /> - <variable name="slidervalue_sliderw" value="7" /> - <variable name="slidervalue_sliderh" value="40" /> - <variable name="pattern_button3_x" value="117" /> - <variable name="pattern_button4_x" value="180" /> - <variable name="pattern_button5_x" value="243" /> - <variable name="pattern_button6_x" value="306" /> - <variable name="pattern_x" value="41" /> - <variable name="pattern_y" value="250" /> - <variable name="pattern_width" value="398" /> - <variable name="pattern_dot_color" value="#33B5E5" /> - <variable name="pattern_dot_color_active" value="#FFFFFF" /> - <variable name="pattern_dot_radius" value="12" /> - <variable name="pattern_line_color" value="#33B5E5" /> - <variable name="pattern_line_width" value="9" /> - <variable name="pattern_cancel_y" value="672" /> - </variables> - - <mousecursor> - <placement w="15" h="15" /> - <background color="#FFFF00FF" resource="cursor" /> - <speed multiplier="1.5" /> - </mousecursor> - - <templates> - <template name="header"> - <background color="#000000FF" /> - - <object type="fill" color="%button_fill_color%"> - <placement x="0" y="0" w="480" h="98" /> - </object> - - <object type="fill" color="%highlight%"> - <placement x="0" y="98" w="480" h="2" /> - </object> - - <object type="image"> - <image resource="twrplogo" /> - <placement x="50" y="50" placement="4" /> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="100" y="10" /> - <text>Team Win Recovery Project v%tw_version%</text> - </object> - - <object type="text" color="%text_color%"> - <condition var1="tw_simulate_actions" var2="1" /> - <font resource="font" /> - <placement x="100" y="40" /> - <text>SIMULATING ACTIONS</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="100" y="70" /> - <text>%tw_time%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="190" y="70" /> - <conditions> - <condition var1="tw_no_battery_percent" var2="0" /> - <condition var1="tw_battery" op=">" var2="0" /> - <condition var1="tw_battery" op="<" var2="101" /> - </conditions> - <text>Battery: %tw_battery%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="350" y="70" /> - <conditions> - <condition var1="tw_no_cpu_temp" var2="0" /> - </conditions> - <text>CPU: %tw_cpu_temp% °C</text> - </object> - - <object type="button"> - <placement x="%home_button_x%" y="%home_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <placement x="%back_button_x%" y="%back_button_y%" placement="1" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="overlay">lock</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - </template> - - <template name="progress_bar"> - <object type="progressbar"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource empty="progress_empty" full="progress_full" /> - <data name="ui_progress" /> - </object> - - <object type="animation"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource name="progress" /> - <speed fps="15" render="2" /> - <loop frame="1" /> - </object> - </template> - - <template name="action_page_console"> - <object type="console"> - <placement x="%console_x%" y="%row2_y%" w="%console_width%" h="%console_action_height%" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="pattern_options"> - <object type="button"> - <placement x="%pattern_button3_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>3x3</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=3</action> - </object> - - <object type="button"> - <placement x="%pattern_button4_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>4x4</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=4</action> - </object> - - <object type="button"> - <placement x="%pattern_button5_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>5x5</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=5</action> - </object> - - <object type="button"> - <placement x="%pattern_button6_x%" y="%row2_text_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>6x6</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=6</action> - </object> - </template> - - <template name="sort_options"> - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%col1_x%" y="%sort_asc_text_y%" /> - <text>Sort Ascending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=3</action> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%col1_x%" y="%sort_desc_text_y%" /> - <text>Sort Descending:</text> - </object> - - <object type="button"> - <placement x="%sort_col1_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-1</action> - </object> - - <object type="button"> - <placement x="%sort_col2_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-2</action> - </object> - - <object type="button"> - <placement x="%sort_col3_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-3</action> - </object> - </template> - - <template name="footer"> - <object type="console"> - <slideout resource="slideout" x="%center_x%" y="760" placement="5" /> - <placement x="%console_x%" y="0" w="%console_width%" h="760" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="keyboardtemplate"> - <object type="keyboard"> - <placement x="0" y="450" /> - <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" /> - <highlight color="%highlight_color%" /> - <capshighlight color="%caps_highlight_color%" /> - <layout1> - <keysize height="78" width="48" /> - <row1 key01="q" long01="1" key02="w" long02="2" key03="e" long03="3" key04="r" long04="4" key05="t" long05="5" key06="y" long06="6" key07="u" long07="7" key08="i" long08="8" key09="o" long09="9" key10="p" long10="0" /> - <row2 key01="72:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="72:l" /> - <row3 key01="72:layout2" key02="z" key03="x" key04="c" key05="v" key06="b" key07="n" key08="m" key09="72:c:8" /> - <row4 key01="72:layout3" key02="48:" key03="240: " key04="48:." key05="72:a:action" /> - </layout1> - <layout2> - <keysize height="78" width="48" capslock="0" revert_layout="1" /> - <row1 key01="Q" long01="1" key02="W" long02="2" key03="E" long03="3" key04="R" long04="4" key05="T" long05="5" key06="Y" long06="6" key07="U" long07="7" key08="I" long08="8" key09="O" long09="9" key10="P" long10="0" /> - <row2 key01="72:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="72:L" /> - <row3 key01="72:layout1" key02="Z" key03="X" key04="C" key05="V" key06="B" key07="N" key08="M" key09="72:c:8" /> - <row4 key01="72:layout3" key02="48:" key03="240: " key04="48:." key05="72:action" /> - </layout2> - <layout3> - <keysize height="78" width="48" /> - <row1 key01="1" key02="2" key03="3" key04="4" key05="5" key06="6" key07="7" key08="8" key09="9" key10="0" /> - <row2 key01="@" key02="#" key03="$" key04="%" key05="&" key06="*" key07="-" key08="+" key09="(" key10=")" /> - <row3 key01="72:layout4" key02="!" key03="48:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="72:c:8" /> - <row4 key01="72:layout1" key02="48:," key03="240: " key04="48:." key05="72:action" /> - </layout3> - <layout4> - <keysize height="78" width="48" /> - <row1 key01="~" key02="`" key03="|" key04="48:" key05="48:" key06="48:" key07="%" key08="48:" key09="{" key10="}" /> - <row2 key01="48:" key02="48:" key03="48:" key04="48:" key05="48:" key06="^" key07="_" key08="=" key09="[" key10="]" /> - <row3 key01="72:layout3" key02="48:" key03="48:" key04="48:" key05="48:" key06="\" key07="<" key08=">" key09="72:c:8" /> - <row4 key01="72:layout1" key02="48:c:34" key03="240: " key04="48:." key05="72:action" /> - </layout4> - </object> - </template> - </templates> -</recovery> diff --git a/gui/devices/800x480/res/images/back-icon.png b/gui/devices/800x480/res/images/back-icon.png Binary files differdeleted file mode 100644 index 5b093deb9..000000000 --- a/gui/devices/800x480/res/images/back-icon.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/button.png b/gui/devices/800x480/res/images/button.png Binary files differdeleted file mode 100644 index 97b82b249..000000000 --- a/gui/devices/800x480/res/images/button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/checkbox_checked.png b/gui/devices/800x480/res/images/checkbox_checked.png Binary files differdeleted file mode 100644 index b8d709f39..000000000 --- a/gui/devices/800x480/res/images/checkbox_checked.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/checkbox_empty.png b/gui/devices/800x480/res/images/checkbox_empty.png Binary files differdeleted file mode 100644 index 9d84cfa5d..000000000 --- a/gui/devices/800x480/res/images/checkbox_empty.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/console-icon.png b/gui/devices/800x480/res/images/console-icon.png Binary files differdeleted file mode 100644 index da9536e8c..000000000 --- a/gui/devices/800x480/res/images/console-icon.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/console-toggle.png b/gui/devices/800x480/res/images/console-toggle.png Binary files differdeleted file mode 100644 index 6f6cde502..000000000 --- a/gui/devices/800x480/res/images/console-toggle.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/cursor.png b/gui/devices/800x480/res/images/cursor.png Binary files differdeleted file mode 100644 index 39a7d6cdc..000000000 --- a/gui/devices/800x480/res/images/cursor.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/curtain.jpg b/gui/devices/800x480/res/images/curtain.jpg Binary files differdeleted file mode 100644 index 1f03eb5e5..000000000 --- a/gui/devices/800x480/res/images/curtain.jpg +++ /dev/null diff --git a/gui/devices/800x480/res/images/file.png b/gui/devices/800x480/res/images/file.png Binary files differdeleted file mode 100644 index 5b06f74aa..000000000 --- a/gui/devices/800x480/res/images/file.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/folder.png b/gui/devices/800x480/res/images/folder.png Binary files differdeleted file mode 100644 index a6def97dc..000000000 --- a/gui/devices/800x480/res/images/folder.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/home-icon.png b/gui/devices/800x480/res/images/home-icon.png Binary files differdeleted file mode 100644 index 30bdc8aa7..000000000 --- a/gui/devices/800x480/res/images/home-icon.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate001.png b/gui/devices/800x480/res/images/indeterminate001.png Binary files differdeleted file mode 100644 index d3fe95170..000000000 --- a/gui/devices/800x480/res/images/indeterminate001.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate002.png b/gui/devices/800x480/res/images/indeterminate002.png Binary files differdeleted file mode 100644 index 08ed1ed31..000000000 --- a/gui/devices/800x480/res/images/indeterminate002.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate003.png b/gui/devices/800x480/res/images/indeterminate003.png Binary files differdeleted file mode 100644 index cbe0bd6b3..000000000 --- a/gui/devices/800x480/res/images/indeterminate003.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate004.png b/gui/devices/800x480/res/images/indeterminate004.png Binary files differdeleted file mode 100644 index 0ec235762..000000000 --- a/gui/devices/800x480/res/images/indeterminate004.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate005.png b/gui/devices/800x480/res/images/indeterminate005.png Binary files differdeleted file mode 100644 index 36ac40135..000000000 --- a/gui/devices/800x480/res/images/indeterminate005.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/indeterminate006.png b/gui/devices/800x480/res/images/indeterminate006.png Binary files differdeleted file mode 100644 index a46811d8a..000000000 --- a/gui/devices/800x480/res/images/indeterminate006.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/keyboard1.png b/gui/devices/800x480/res/images/keyboard1.png Binary files differdeleted file mode 100644 index 906e539f3..000000000 --- a/gui/devices/800x480/res/images/keyboard1.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/keyboard2.png b/gui/devices/800x480/res/images/keyboard2.png Binary files differdeleted file mode 100644 index 8b25311dc..000000000 --- a/gui/devices/800x480/res/images/keyboard2.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/keyboard3.png b/gui/devices/800x480/res/images/keyboard3.png Binary files differdeleted file mode 100644 index bb8a34709..000000000 --- a/gui/devices/800x480/res/images/keyboard3.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/keyboard4.png b/gui/devices/800x480/res/images/keyboard4.png Binary files differdeleted file mode 100644 index 0c1cb6638..000000000 --- a/gui/devices/800x480/res/images/keyboard4.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/medium-button.png b/gui/devices/800x480/res/images/medium-button.png Binary files differdeleted file mode 100644 index 6dbafb389..000000000 --- a/gui/devices/800x480/res/images/medium-button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/mediumwide-button.png b/gui/devices/800x480/res/images/mediumwide-button.png Binary files differdeleted file mode 100644 index 69355e0b1..000000000 --- a/gui/devices/800x480/res/images/mediumwide-button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/minus-button.png b/gui/devices/800x480/res/images/minus-button.png Binary files differdeleted file mode 100644 index 63c58699c..000000000 --- a/gui/devices/800x480/res/images/minus-button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/plus-button.png b/gui/devices/800x480/res/images/plus-button.png Binary files differdeleted file mode 100644 index da3e3f553..000000000 --- a/gui/devices/800x480/res/images/plus-button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/progress_empty.png b/gui/devices/800x480/res/images/progress_empty.png Binary files differdeleted file mode 100644 index 1a7471e44..000000000 --- a/gui/devices/800x480/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/progress_fill.png b/gui/devices/800x480/res/images/progress_fill.png Binary files differdeleted file mode 100644 index a67e8ff2b..000000000 --- a/gui/devices/800x480/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/radio_empty.png b/gui/devices/800x480/res/images/radio_empty.png Binary files differdeleted file mode 100644 index f3e2810b0..000000000 --- a/gui/devices/800x480/res/images/radio_empty.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/radio_selected.png b/gui/devices/800x480/res/images/radio_selected.png Binary files differdeleted file mode 100644 index c4900795f..000000000 --- a/gui/devices/800x480/res/images/radio_selected.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/slider-touch.png b/gui/devices/800x480/res/images/slider-touch.png Binary files differdeleted file mode 100644 index 4944fa772..000000000 --- a/gui/devices/800x480/res/images/slider-touch.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/slider-used.png b/gui/devices/800x480/res/images/slider-used.png Binary files differdeleted file mode 100644 index 5b2c46278..000000000 --- a/gui/devices/800x480/res/images/slider-used.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/slider.png b/gui/devices/800x480/res/images/slider.png Binary files differdeleted file mode 100644 index 445d923f9..000000000 --- a/gui/devices/800x480/res/images/slider.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/sort-button.png b/gui/devices/800x480/res/images/sort-button.png Binary files differdeleted file mode 100644 index 310cb4a37..000000000 --- a/gui/devices/800x480/res/images/sort-button.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/twrplogo.png b/gui/devices/800x480/res/images/twrplogo.png Binary files differdeleted file mode 100644 index a362980d3..000000000 --- a/gui/devices/800x480/res/images/twrplogo.png +++ /dev/null diff --git a/gui/devices/800x480/res/images/unlock.png b/gui/devices/800x480/res/images/unlock.png Binary files differdeleted file mode 100644 index c53181e69..000000000 --- a/gui/devices/800x480/res/images/unlock.png +++ /dev/null diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml deleted file mode 100644 index a561a3cc4..000000000 --- a/gui/devices/800x480/res/ui.xml +++ /dev/null @@ -1,500 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <details> - <resolution width="800" height="480" /> - <author>TeamWin</author> - <title>Backup Naowz</title> - <description>Default basic theme</description> - <preview>preview.jpg</preview> - </details> - - <include> - <xmlfile name="landscape.xml" /> - </include> - - <resources> - <resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="16" /> - <resource name="fixed" type="font" filename="DroidSansMono.ttf" size="12" /> - <resource name="twrplogo" type="image" filename="twrplogo" retainaspect="1" /> - <resource name="main_button" type="image" filename="button" /> - <resource name="file_icon" type="image" filename="file" retainaspect="1" /> - <resource name="folder_icon" type="image" filename="folder" retainaspect="1" /> - <resource name="progress" type="animation" filename="indeterminate" /> - <resource name="progress_empty" type="image" filename="progress_empty" /> - <resource name="progress_full" type="image" filename="progress_fill" /> - <resource name="checkbox_false" type="image" filename="checkbox_empty" retainaspect="1" /> - <resource name="checkbox_true" type="image" filename="checkbox_checked" retainaspect="1" /> - <resource name="radio_false" type="image" filename="radio_empty" retainaspect="1" /> - <resource name="radio_true" type="image" filename="radio_selected" retainaspect="1" /> - <resource name="medium_button" type="image" filename="medium-button" /> - <resource name="mediumwide_button" type="image" filename="mediumwide-button" /> - <resource name="sort_button" type="image" filename="sort-button" /> - <resource name="minus_button" type="image" filename="minus-button" /> - <resource name="plus_button" type="image" filename="plus-button" /> - <resource name="home_icon" type="image" filename="home-icon" retainaspect="1" /> - <resource name="back_icon" type="image" filename="back-icon" retainaspect="1" /> - <resource name="console_button" type="image" filename="console-toggle" retainaspect="1" /> - <resource name="slider" type="image" filename="slider" retainaspect="1" /> - <resource name="slider-used" type="image" filename="slider-used" retainaspect="1" /> - <resource name="slider-touch" type="image" filename="slider-touch" retainaspect="1" /> - <resource name="unlock-icon" type="image" filename="unlock" retainaspect="1" /> - <resource name="keyboard1" type="image" filename="keyboard1" /> - <resource name="keyboard2" type="image" filename="keyboard2" /> - <resource name="keyboard3" type="image" filename="keyboard3" /> - <resource name="keyboard4" type="image" filename="keyboard4" /> - <resource name="cursor" type="image" filename="cursor" retainaspect="1" /> - </resources> - - <variables> - <variable name="col1_x" value="23" /> - <variable name="col2_x" value="210" /> - <variable name="col3_x" value="410" /> - <variable name="col4_x" value="610" /> - <variable name="row1_y" value="90" /> - <variable name="row2_y" value="340" /> - <variable name="col_center_x" value="310" /> - <variable name="center_x" value="400" /> - <variable name="screen_width" value="800" /> - <variable name="screen_height" value="480" /> - <variable name="col_progressbar_x" value="300" /> - <variable name="row_progressbar_y" value="440" /> - <variable name="col1_medium_x" value="120" /> - <variable name="col2_medium_x" value="250" /> - <variable name="col3_medium_x" value="380" /> - <variable name="col4_medium_x" value="510" /> - <variable name="row1_medium_y" value="105" /> - <variable name="row2_medium_y" value="175" /> - <variable name="row3_medium_y" value="245" /> - <variable name="row4_medium_y" value="340" /> - <variable name="row5_medium_y" value="320" /> - <variable name="row1_text_y" value="58" /> - <variable name="row2_text_y" value="78" /> - <variable name="row3_text_y" value="100" /> - <variable name="row4_text_y" value="120" /> - <variable name="row5_text_y" value="140" /> - <variable name="row6_text_y" value="160" /> - <variable name="row7_text_y" value="180" /> - <variable name="row8_text_y" value="200" /> - <variable name="row9_text_y" value="220" /> - <variable name="row10_text_y" value="240" /> - <variable name="row11_text_y" value="260" /> - <variable name="row12_text_y" value="280" /> - <variable name="row13_text_y" value="300" /> - <variable name="row14_text_y" value="320" /> - <variable name="row15_text_y" value="340" /> - <variable name="row16_text_y" value="360" /> - <variable name="row17_text_y" value="380" /> - <variable name="row18_text_y" value="400" /> - <variable name="row_offsetmedium_y" value="320" /> - <variable name="home_button_x" value="589" /> - <variable name="home_button_y" value="5" /> - <variable name="back_button_x" value="659" /> - <variable name="back_button_y" value="5" /> - <variable name="console_button_x" value="729" /> - <variable name="console_button_y" value="5" /> - <variable name="nandcheck_col1" value="23" /> - <variable name="nandcheck_col2" value="360" /> - <variable name="nandcheck_row1" value="130" /> - <variable name="nandcheck_row2" value="160" /> - <variable name="nandcheck_row3" value="190" /> - <variable name="nandcheck_row4" value="220" /> - <variable name="nandcheck_row5" value="250" /> - <variable name="nandcheck_row6" value="280" /> - <variable name="nandcheck_row7" value="310" /> - <variable name="nandcheck_row8" value="340" /> - <variable name="button_text_color" value="#AAAAAA" /> - <variable name="text_color" value="#A0A0A0" /> - <variable name="text_success_color" value="#33B5E5" /> - <variable name="text_fail_color" value="#FF0101" /> - <variable name="highlight_color" value="#90909080" /> - <variable name="caps_highlight_color" value="#33B5E580" /> - <variable name="slider_x" value="225" /> - <variable name="slider_y" value="390" /> - <variable name="slider_text_y" value="425" /> - <variable name="sort_text_x" value="170" /> - <variable name="sort_asc_text_y" value="418" /> - <variable name="sort_asc_button_y" value="413" /> - <variable name="sort_desc_text_y" value="452" /> - <variable name="sort_desc_button_y" value="447" /> - <variable name="sort_col1_button_x" value="300" /> - <variable name="sort_col2_button_x" value="370" /> - <variable name="sort_col3_button_x" value="440" /> - <variable name="col1_sdext_x" value="265" /> - <variable name="col2_sdext_x" value="475" /> - <variable name="row1_sdext_y" value="85" /> - <variable name="row2_sdext_y" value="150" /> - <variable name="row_extsize_y" value="85" /> - <variable name="row_swapsize_y" value="150" /> - <variable name="input_x" value="28" /> - <variable name="input_width" value="720" /> - <variable name="input_height" value="25" /> - <variable name="input_background_color" value="#303030" /> - <variable name="input_cursor_color" value="#33B5E5" /> - <variable name="input_cursor_width" value="2" /> - <variable name="console_x" value="25" /> - <variable name="console_width" value="750" /> - <variable name="console_foreground" value="#A0A0A0" /> - <variable name="warning" value="#F8F8A0" /> - <variable name="error" value="#FF4040" /> - <variable name="highlight" value="#33B5E5" /> - <variable name="console_background" value="#303030" /> - <variable name="console_scroll" value="#303030" /> - <variable name="console_action_height" value="230" /> - <variable name="console_install_height" value="260" /> - <variable name="console_installdone_height" value="260" /> - <variable name="fileselector_folder_x" value="28" /> - <variable name="fileselector_folder_width" value="248" /> - <variable name="fileselector_folderonly_width" value="400" /> - <variable name="fileselector_file_x" value="278" /> - <variable name="fileselector_file_width" value="506" /> - <variable name="fileselector_install_y" value="120" /> - <variable name="fileselector_install_height" value="290" /> - <variable name="fileselector_header_background" value="#202020" /> - <variable name="fileselector_header_textcolor" value="#AAAAAA" /> - <variable name="fileselector_header_separatorcolor" value="#33B5E5" /> - <variable name="fileselector_header_separatorheight" value="2" /> - <variable name="fileselector_separatorcolor" value="#505050" /> - <variable name="fileselector_separatorheight" value="1" /> - <variable name="fileselector_background" value="#303030" /> - <variable name="fileselector_highlight_color" value="#505050" /> - <variable name="fileselector_highlight_font_color" value="#33B5E5" /> - <variable name="fileselector_spacing" value="12" /> - <variable name="fastscroll_linecolor" value="#50505080" /> - <variable name="fastscroll_rectcolor" value="#33B5E580" /> - <variable name="fastscroll_w" value="25" /> - <variable name="fastscroll_linew" value="2" /> - <variable name="fastscroll_rectw" value="12" /> - <variable name="fastscroll_recth" value="20" /> - <variable name="zipstorage_text_y" value="88" /> - <variable name="listbox_x" value="156" /> - <variable name="listbox_y" value="90" /> - <variable name="listbox_width" value="460" /> - <variable name="listbox_tz_height" value="170" /> - <variable name="listbox_background" value="#303030" /> - <variable name="listbox_spacing" value="12" /> - <variable name="sd_plus_x" value="280" /> - <variable name="lock_y" value="150" /> - <variable name="filemanager_select_x" value="610" /> - <variable name="filemanager_select_y" value="413" /> - <variable name="backup_name_text_y" value="440" /> - <variable name="backup_name_button_y" value="195" /> - <variable name="col_right_x" value="772" /> - <variable name="cancel_button_y" value="180" /> - <variable name="terminal_console_y" value="0" /> - <variable name="terminal_console_height" value="240" /> - <variable name="terminal_text_y" value="247" /> - <variable name="terminal_button_y" value="237" /> - <variable name="terminal_input_width" value="551" /> - <variable name="button_fill_color" value="#303030" /> - <variable name="button_fill_full_width" value="400" /> - <variable name="button_fill_main_width" value="367" /> - <variable name="button_fill_main_height" value="120" /> - <variable name="button_fill_half_height" value="40" /> - <variable name="button_fill_quarter_height" value="30" /> - <variable name="button_full_center_x" value="200" /> - <variable name="flash_list_height" value="140" /> - <variable name="backup_list_x" value="23" /> - <variable name="backup_list_y" value="80" /> - <variable name="backup_list_width" value="367" /> - <variable name="backup_list_height" value="290" /> - <variable name="backup_storage_y" value="190" /> - <variable name="backup_encrypt_y" value="235" /> - <variable name="restore_list_y" value="100" /> - <variable name="restore_list_height" value="270" /> - <variable name="mount_list_height" value="360" /> - <variable name="mount_storage_row" value="500" /> - <variable name="wipe_list_height" value="300" /> - <variable name="wipe_button_y" value="150" /> - <variable name="slidervalue_x" value="200" /> - <variable name="slidervalue_w" value="400" /> - <variable name="slidervalue_line_clr" value="#FFFFFF" /> - <variable name="slidervalue_slider_clr" value="#33B5E5" /> - <variable name="slidervalue_lineh" value="1" /> - <variable name="slidervalue_padding" value="0" /> - <variable name="slidervalue_sliderw" value="7" /> - <variable name="slidervalue_sliderh" value="40" /> - <variable name="pattern_x" value="200" /> - <variable name="pattern_y" value="110" /> - <variable name="pattern_width" value="300" /> - <variable name="pattern_dot_color" value="#33B5E5" /> - <variable name="pattern_dot_color_active" value="#FFFFFF" /> - <variable name="pattern_dot_radius" value="10" /> - <variable name="pattern_line_color" value="#33B5E5" /> - <variable name="pattern_line_width" value="7" /> - <variable name="pattern_button_y" value="94" /> - </variables> - - <mousecursor> - <placement w="15" h="15" /> - <background color="#FFFF00FF" resource="cursor" /> - <speed multiplier="1.5" /> - </mousecursor> - - <templates> - <template name="header"> - <background color="#000000FF" /> - - <object type="fill" color="%button_fill_color%"> - <placement x="0" y="0" w="800" h="58" /> - </object> - - <object type="fill" color="%highlight%"> - <placement x="0" y="58" w="800" h="2" /> - </object> - - <object type="image"> - <image resource="twrplogo" /> - <placement x="35" y="29" placement="4" /> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="70" y="2" /> - <text>Team Win Recovery Project v%tw_version%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="70" y="37" /> - <conditions> - <condition var1="tw_no_battery_percent" var2="0" /> - <condition var1="tw_battery" op=">" var2="0" /> - <condition var1="tw_battery" op="<" var2="101" /> - </conditions> - <text>Battery Level: %tw_battery%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="425" y="37" /> - <text>%tw_time%</text> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="500" y="37" /> - <conditions> - <condition var1="tw_no_cpu_temp" var2="0" /> - </conditions> - <text>CPU: %tw_cpu_temp% °C</text> - </object> - - <object type="text" color="%text_color%"> - <condition var1="tw_simulate_actions" var2="1" /> - <font resource="font" /> - <placement x="250" y="20" /> - <text>SIMULATING ACTIONS</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%home_button_x%" y="%home_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%back_button_x%" y="%back_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="overlay">lock</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - </template> - - <template name="progress_bar"> - <object type="progressbar"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource empty="progress_empty" full="progress_full" /> - <data name="ui_progress" /> - </object> - - <object type="animation"> - <placement x="%col_progressbar_x%" y="%row_progressbar_y%" /> - <resource name="progress" /> - <speed fps="15" render="2" /> - <loop frame="1" /> - </object> - </template> - - <template name="pattern_options"> - <object type="button"> - <placement x="%col1_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>3x3</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=3</action> - </object> - - <object type="button"> - <placement x="%col2_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>4x4</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=4</action> - </object> - - <object type="button"> - <placement x="%col3_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>5x5</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=5</action> - </object> - - <object type="button"> - <placement x="%col4_medium_x%" y="%pattern_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>6x6</text> - <image resource="sort_button" /> - <action function="set">tw_gui_pattern_grid_size=6</action> - </object> - </template> - - <template name="sort_options"> - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_asc_text_y%" /> - <text>Sort Ascending:</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col1_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=1</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col2_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=2</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col3_button_x%" y="%sort_asc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=3</action> - </object> - - <object type="text" color="%text_color%"> - <font resource="font" /> - <placement x="%sort_text_x%" y="%sort_desc_text_y%" /> - <text>Sort Descending:</text> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col1_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Name</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-1</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col2_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Date</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-2</action> - </object> - - <object type="button"> - <highlight color="%highlight_color%" /> - <placement x="%sort_col3_button_x%" y="%sort_desc_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>Size</text> - <image resource="sort_button" /> - <action function="set">tw_gui_sort_order=-3</action> - </object> - </template> - - <template name="flash_zip_console"> - <object type="console"> - <placement x="%console_x%" y="85" w="%console_width%" h="260" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="action_page_console"> - <object type="console"> - <placement x="%console_x%" y="160" w="%console_width%" h="230" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="footer"> - <object type="console"> - <slideout resource="console_button" x="%console_button_x%" y="%console_button_y%" /> - <placement x="%console_x%" y="60" w="%console_width%" h="380" /> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - </object> - </template> - - <template name="keyboardtemplate"> - <object type="keyboard"> - <placement x="0" y="277" /> - <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" /> - <highlight color="%highlight_color%" /> - <capshighlight color="%caps_highlight_color%" /> - <layout1> - <keysize height="51" width="73" /> - <row1 key01="q" long01="1" key02="w" long02="2" key03="e" long03="3" key04="r" long04="4" key05="t" long05="5" key06="y" long06="6" key07="u" long07="7" key08="i" long08="8" key09="o" long09="9" key10="p" long10="0" key11="70:c:8" /> - <row2 key01="107:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="l" key10="109:action" /> - <row3 key01="79:layout2" key02="72:z" key03="72:x" key04="72:c" key05="72:v" key06="72:b" key07="72:n" key08="72:m" key09="72:," long09="!" key10="72:." long10="?" key11="73::" long11="+" /> - <row4 key01="103:layout3" key02="72:" key03="/" long03="@" key04="315: " key05="'" long05="73:c:34" key06="-" long06="_" /> - </layout1> - <layout2> - <keysize height="51" width="73" capslock="0" revert_layout="1" /> - <row1 key01="Q" long01="1" key02="W" long02="2" key03="E" long03="3" key04="R" long04="4" key05="T" long05="5" key06="Y" long06="6" key07="U" long07="7" key08="I" long08="8" key09="O" long09="9" key10="P" long10="0" key11="70:c:8" /> - <row2 key01="107:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="L" key10="109:action" /> - <row3 key01="79:layout1" key02="72:Z" key03="72:X" key04="72:C" key05="72:V" key06="72:B" key07="72:N" key08="72:M" key09="72:," long09="!" key10="72:." long10="?" key11="73::" long11="+" /> - <row4 key01="103:layout3" key02="72:" key03="/" long03="@" key04="315: " key05="'" long05="73:c:34" key06="-" long06="_" /> - </layout2> - <layout3> - <keysize height="51" width="73" /> - <row1 key01="1" key02="2" key03="3" key04="4" key05="5" key06="6" key07="7" key08="8" key09="9" key10="0" key11="70:c:8" /> - <row2 key01="107:#" key02="$" key03="%" key04="&" key05="*" key06="-" key07="+" key08="(" key09=")" key10="109:action" /> - <row3 key01="79:layout4" key02="72:<" key03="72:>" key04="72:=" key05="72::" key06="72:;" key07="72:," key08="72:." key09="72:!" key10="72:?" key11="73:/" /> - <row4 key01="103:layout1" key02="72:" key03="@" key04="315: " key05="73:c:34" key06="_" /> - </layout3> - <layout4> - <keysize height="51" width="73" /> - <row1 key01="~" key02="`" key03="|" key04="73:" key05="73:" key06="73:" key07="73:" key08="73:" key09="73:" key10="73:" key11="70:c:8" /> - <row2 key01="107:" key02="73:" key03="73:" key04="73:" key05="^" key06="73:" key07="73:" key08="{" key09="}" key10="109:action" /> - <row3 key01="79:layout3" key02="72:\" key03="72:" key04="72:" key05="72:" key06="72:" key07="72:[" key08="72:]" key09="72:!" key10="72:?" /> - <row4 key01="103:layout1" key02="72:" key03="72:" key04="315: " /> - </layout4> - </object> - </template> - </templates> -</recovery> diff --git a/gui/devices/common/res/fonts/DroidSansMono.ttf b/gui/devices/common/res/fonts/DroidSansMono.ttf Binary files differdeleted file mode 100644 index 4085cee84..000000000 --- a/gui/devices/common/res/fonts/DroidSansMono.ttf +++ /dev/null diff --git a/gui/devices/common/res/fonts/RobotoCondensed-Regular.ttf b/gui/devices/common/res/fonts/RobotoCondensed-Regular.ttf Binary files differdeleted file mode 100644 index b9fc49c95..000000000 --- a/gui/devices/common/res/fonts/RobotoCondensed-Regular.ttf +++ /dev/null diff --git a/gui/devices/common/res/images/progress_empty.png b/gui/devices/common/res/images/progress_empty.png Binary files differdeleted file mode 100644 index 1a7471e44..000000000 --- a/gui/devices/common/res/images/progress_empty.png +++ /dev/null diff --git a/gui/devices/common/res/images/progress_fill.png b/gui/devices/common/res/images/progress_fill.png Binary files differdeleted file mode 100644 index 7f4121fe5..000000000 --- a/gui/devices/common/res/images/progress_fill.png +++ /dev/null diff --git a/gui/devices/common/res/languages/en.xml b/gui/devices/common/res/languages/en.xml deleted file mode 100644 index e47ee7050..000000000 --- a/gui/devices/common/res/languages/en.xml +++ /dev/null @@ -1,235 +0,0 @@ -<?xml version="1.0"?> - -<language> - <display>English</display> - - <resources> - <!-- Font overrides - only change these if your language requires special characters --> - <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" /> - - <!-- Partition display names --> - <string name="system">System</string> - <string name="system_image">System Image</string> - <string name="vendor">Vendor</string> - <string name="vendor_image">Vendor Image</string> - <string name="boot">Boot</string> - <string name="recovery">Recovery</string> - <string name="cache">Cache</string> - <string name="data">Data</string> - <string name="sdcard">SDCard</string> - <string name="internal">Internal Storage</string> - <string name="microsd">Micro SDCard</string> - <string name="usbotg">USB OTG</string> - <string name="android_secure">Android Secure</string> - <string name="dalvik">Dalvik / ART Cache</string> - <!-- This is a rarely used partition on a Micro SD card for a very old app2sd system --> - <string name="sdext">SD-EXT</string> - - <!-- GUI XML strings --> - <string name="install_button_text">Install</string> - - <!-- Various console messages - these consist of user displayed messages, oftentimes errors --> - <string name="no_kernel_selinux">Kernel does not have support for reading SELinux contexts.</string> - <string name="full_selinux">Full SELinux support is present.</string> - <string name="no_selinux">No SELinux support (no libselinux).</string> - <string name="mtp_enabled">MTP Enabled</string> - <string name="mtp_crash">MTP Crashed, not starting MTP on boot.</string> - <string name="rebooting">Rebooting...</string> - <string name="decrypt_success">Successfully decrypted with default password.</string> - <string name="unable_to_decrypt">Unable to decrypt with default password. You may need to perform a Format Data.</string> - <string name="generating_md51">Generating MD5</string> - <!-- Message displayed during a backup if we are generating an MD5, ideally, leave the leading " * " to help align and separate this text from other console text --> - <string name="generating_md52"> * Generating md5...</string> - <string name="md5_created"> * MD5 Created.</string> - <string name="md5_error"> * MD5 Error!</string> - <string name="md5_compute_error"> * Error computing MD5.</string> - <string name="current_date">(Current Date)</string> - <string name="auto_generate">(Auto Generate)</string> - <string name="unable_to_locate_partition">Unable to locate '{1}' partition for backup calculations.</string> - <string name="no_partition_selected">No partitions selected for backup.</string> - <string name="total_partitions_backup"> * Total number of partitions to back up: {1}</string> - <string name="total_backup_size"> * Total size of all data: {1}MB</string> - <string name="available_space"> * Available space: {1}MB</string> - <string name="unable_locate_storage">Unable to locate storage device.</string> - <string name="no_space">Not enough free space on storage.</string> - <string name="backup_started">[BACKUP STARTED]</string> - <string name="backup_folder"> * Backup Folder: {1}</string> - <string name="fail_backup_folder">Failed to make backup folder.</string> - <string name="avg_backup_fs">Average backup rate for file systems: {1} MB/sec</string> - <string name="avg_backup_img">Average backup rate for imaged drives: {1} MB/sec</string> - <string name="total_backed_size">[{1} MB TOTAL BACKED UP]</string> - <string name="backup_completed">[BACKUP COMPLETED IN {1} SECONDS]</string> - <string name="restore_started">[RESTORE STARTED]</string> - <string name="restore_folder">Restore folder: '{1}'</string> - <!-- {1} is the partition display name and {2} is the number of seconds --> - <string name="restore_part_done">[{1} done ({2} seconds)]</string> - <string name="verifying_md5">Verifying MD5</string> - <string name="skip_md5">Skipping MD5 check based on user setting.</string> - <string name="calc_restore">Calculating restore details...</string> - <string name="restore_read_only">Cannot restore {1} -- mounted read only.</string> - <string name="restore_unable_locate">Unable to locate '{1}' partition for restoring.</string> - <string name="no_part_restore">No partitions selected for restore.</string> - <string name="restore_part_count">Restoring {1} partitions...</string> - <string name="total_restore_size">Total restore size is {1}MB</string> - <string name="updating_system_details">Updating System Details</string> - <string name="restore_complete">Restore Complete</string> - <string name="restore_completed">[RESTORE COMPLETED IN {1} SECONDS]</string> - <!-- {1} is the path we could not open, {2} is strerror output --> - <string name="error_opening_strerr">Error opening: '{1}' ({2})</string> - <string name="unable_locate_part_backup_name">Unable to locate partition by backup name: '{1}'</string> - <string name="unable_find_part_path">Unable to find partition for path '{1}'</string> - <string name="update_part_details">Updating partition details...</string> - <string name="update_part_details_done">...done</string> - <string name="wiping_dalvik">Wiping Dalvik Cache Directories...</string> - <string name="cleaned">Cleaned: {1}...</string> - <string name="dalvik_done">-- Dalvik Cache Directories Wipe Complete!</string> - <string name="no_andsec">No android secure partitions found.</string> - <string name="unable_to_locate">Unable to locate {1}.</string> - <string name="wiping_datamedia">Wiping internal storage -- /data/media...</string> - <string name="unable_to_mount">Unable to mount {1}</string> - <string name="unable_to_mount_internal">Unable to mount internal_storage</string> - <string name="unable_to_mount_storage">Unable to mount storage</string> - <string name="fail_decrypt">Failed to decrypt data.</string> - <string name="no_crypto_support">No crypto support was compiled into this build.</string> - <string name="decrypt_success_dev">Data successfully decrypted, new block device: '{1}'</string> - <string name="done">Done.</string> - <string name="start_partition_sd">Partitioning SD Card...</string> - <string name="partition_sd_locate">Unable to locate device to partition.</string> - <string name="ext_swap_size">EXT + Swap size is larger than sdcard size.</string> - <string name="remove_part_table">Removing partition table...</string> - <string name="unable_rm_part">Unable to remove partition table.</string> - <string name="create_part">Creating {1} partition...</string> - <string name="unable_to_create_part">Unable to create {1} partition.</string> - <string name="format_sdext_as">Formatting sd-ext as {1}...</string> - <string name="part_complete">Partitioning complete.</string> - <string name="unable_to_open">Unable to open '{1}'.</string> - <string name="mtp_already_enabled">MTP already enabled</string> - <string name="mtp_fail">Failed to enable MTP</string> - <string name="no_mtp">MTP support not included</string> - <string name="image_flash_start">[IMAGE FLASH STARTED]</string> - <string name="img_to_flash">Image to flash: '{1}'</string> - <string name="flash_unable_locate">Unable to locate '{1}' partition for flashing.</string> - <string name="no_part_flash">No partitions selected for flashing.</string> - <string name="too_many_flash">Too many partitions selected for flashing.</string> - <string name="invalid_flash">Invalid flash partition specified.</string> - <string name="flash_done">[IMAGE FLASH COMPLETED]</string> - <string name="wiping">Wiping {1}</string> - <string name="repair_not_exist">{1} does not exist! Cannot repair!</string> - <string name="repairing_using">Repairing {1} using {2}...</string> - <string name="unable_repair">Unable to repair {1}.</string> - <string name="mount_data_footer">Could not mount /data and unable to find crypto footer.</string> - <!-- {1} is the folder name that we could not create, {2} is strerror output --> - <string name="create_folder_strerr">Can not create '{1}' folder ({2}).</string> - <!-- {1} is the folder name that we could not mount, {2} is strerror output --> - <string name="fail_mount">Failed to mount '{1}' ({2})</string> - <!-- {1} is the folder name that we could not unmount, {2} is strerror output --> - <string name="fail_unmount">Failed to unmount '{1}' ({2})</string> - <string name="cannot_resize">Cannot resize {1}.</string> - <string name="repair_resize">Repairing {1} before resizing.</string> - <string name="unable_resize">Unable to resize {1}.</string> - <string name="no_md5_found">No md5 file found for '{1}'. Please unselect Enable MD5 verification to restore.</string> - <string name="md5_fail_match">MD5 failed to match on '{1}'.</string> - <string name="fail_decrypt_tar">Failed to decrypt tar file '{1}'</string> - <string name="format_data_msg">You may need to reboot recovery to be able to use /data again.</string> - <string name="format_data_err">Unable to format to remove encryption.</string> - <string name="formatting_using">Formatting {1} using {2}...</string> - <string name="unable_to_wipe">Unable to wipe {1}.</string> - <string name="cannot_wipe">Partition {1} cannot be wiped.</string> - <string name="remove_all">Removing all files under '{1}'</string> - <string name="wiping_data">Wiping data without wiping /data/media ...</string> - <string name="backing_up">Backing up {1}...</string> - <string name="backing">Backing Up</string> - <string name="backup_size">Backup file size for '{1}' is 0 bytes.</string> - <string name="datamedia_fs_restore">WARNING: This /data backup was made with {1} file system! The backup may not boot unless you change back to {1}.</string> - <string name="restoring">Restoring {1}...</string> - <string name="restoring_hdr">Restoring</string> - <string name="recreate_folder_err">Unable to recreate {1} folder.</string> - <string name="img_size_err">Size of image is larger than target device</string> - <string name="flashing">Flashing {1}...</string> - <string name="backup_folder_set">Backup folder set to '{1}'</string> - <string name="locate_backup_err">Unable to locate backup '{1}'</string> - <string name="set_restore_opt">Setting restore options: '{1}':</string> - <string name="md5_check_skip">MD5 check skip is on</string> - <string name="ors_encrypt_restore_err">Unable to use OpenRecoveryScript to restore an encrypted backup.</string> - <string name="mounting">Mounting</string> - <string name="unmounting">Unmounting</string> - <string name="mounted">Mounted '{1}'</string> - <string name="unmounted">Unmounted '{1}'</string> - <string name="setting">Setting '{1}' to '{2}'</string> - <string name="setting_empty">Setting '{1}' to empty</string> - <string name="making_dir1">Making Directory</string> - <string name="making_dir2">Making directory: '{1}'</string> - <string name="running_command">Running Command</string> - <string name="sideload">ADB Sideload</string> - <string name="start_sideload">Starting ADB sideload feature...</string> - <string name="need_new_adb">You need adb 1.0.32 or newer to sideload to this device.</string> - <string name="no_pwd">No password provided.</string> - <string name="done_ors">Done processing script file</string> - <string name="injecttwrp">Injecting TWRP into boot image...</string> - <string name="zip_err">Error installing zip file '{1}'</string> - <string name="installing_zip">Installing zip file '{1}'</string> - <string name="select_backup_opt">Setting backup options:</string> - <string name="compression_on">Compression is on</string> - <string name="md5_off">MD5 Generation is off</string> - <string name="backup_fail">Backup Failed</string> - <string name="backup_clean">Backup Failed. Cleaning Backup Folder.</string> - <string name="running_recovery_commands">Running Recovery Commands</string> - <string name="recovery_commands_complete">Recovery Commands Complete</string> - <string name="running_ors">Running OpenRecoveryScript</string> - <string name="ors_complete">OpenRecoveryScript Complete</string> - <string name="no_updater_binary">Could not find '{1}' in the zip file.</string> - <string name="check_for_md5">Checking for MD5 file...</string> - <string name="fail_sysmap">Failed to map file '{1}'</string> - <string name="verify_zip_sig">Verifying zip signature...</string> - <string name="verify_zip_fail">Zip signature verification failed!</string> - <string name="verify_zip_done">Zip signature verified successfully.</string> - <string name="zip_corrupt">Zip file is corrupt!</string> - <string name="no_md5">Skipping MD5 check: no MD5 file found</string> - <string name="md5_fail">MD5 does not match</string> - <string name="md5_match">MD5 matched</string> - <string name="pid_signal">{1} process ended with signal: {2}</string> - <string name="pid_error">{1} process ended with ERROR: {2}</string> - <string name="install_dumlock">Installing HTC Dumlock to system...</string> - <string name="dumlock_restore">Restoring original boot...</string> - <string name="dumlock_reflash">Reflashing recovery to boot...</string> - <string name="run_script">Running {1} script...</string> - <string name="rename_stock">Renamed stock recovery file in /system to prevent the stock ROM from replacing TWRP.</string> - <string name="split_backup">Breaking backup file into multiple archives...</string> - <string name="backup_error">Error creating backup.</string> - <string name="restore_error">Error during restore process.</string> - <string name="split_thread">Splitting thread ID {1} into archive {2}</string> - <!-- These 2 items are saved in the data manager instead of resource manager, so %llu, etc is correct instead of {1} --> - <string name="file_progress">%llu of %llu files, %i%%</string> - <string name="size_progress">%lluMB of %lluMB, %i%%</string> - <string name="decrypt_cmd">Attempting to decrypt data partition via command line.</string> - <string name="base_pkg_err">Failed to load base packages.</string> - <string name="simulating">Simulating actions...</string> - <string name="backup_cancel">Backup Cancelled</string> - <string name="config_twrp">Configuring TWRP...</string> - <string name="config_twrp_err">Unable to configure TWRP with this kernel.</string> - <string name="copy_log">Copied recovery log to {1}.</string> - <string name="max_queue">Maximum zip queue reached!</string> - <string name="min_queue">Minimum zip queue reached!</string> - <string name="screenshot_err">Failed to take a screenshot!</string> - <string name="zip_wipe_cache">One or more zip requested a cache wipe -- Wiping cache now.</string> - <string name="and_sec_wipe_err">Unable to wipe android secure</string> - <string name="dalvik_wipe_err">Failed to wipe dalvik</string> - <string name="auto_gen">(Auto Generate)</string> - <string name="curr_date">(Current Date)</string> - <string name="backup_name_len">Backup name is too long.</string> - <string name="backup_name_invalid">Backup name '{1}' contains invalid character: '{1}'</string> - <string name="backup_name_exists">A backup with that name already exists!</string> - <string name="no_real_sdcard">This device does not have a real SD Card! Aborting!</string> - <string name="cancel_sideload">Cancelling ADB sideload...</string> - <string name="change_fs_err">Error changing file system.</string> - <string name="theme_ver_err">Custom theme version does not match TWRP version. Using stock theme.</string> - <string name="install_reboot">Rebooting in 5 seconds</string> - <string name="adbbackup_error">Error with ADB Backup. Quitting..."</string> - <string name="adbbackup_control_error">Cannot write to adb control channel</string> - <string name="twrp_adbbu_option">--twrp option is required to enable twrp adb backup</string> - <string name="partition_not_found">path: {1} not found in partititon list</string> - </resources> -</language> diff --git a/gui/devices/common/res/languages/es.xml b/gui/devices/common/res/languages/es.xml deleted file mode 100644 index ad5c54a7b..000000000 --- a/gui/devices/common/res/languages/es.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0"?> - -<language> - <display>Español</display> - - <resources> - <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" /> - <string name="install_button_text">Instalar</string> - </resources> -</language> diff --git a/gui/devices/common/res/languages/fi.xml b/gui/devices/common/res/languages/fi.xml deleted file mode 100644 index 0c4f5bc87..000000000 --- a/gui/devices/common/res/languages/fi.xml +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0"?> - -<language> - <display>Suomi</display> - - <resources> - <resource name="font" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="mediumfont" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="filelist" type="fontoverride" filename="RobotoCondensed-Regular.ttf" scale="100" /> - <resource name="fixed" type="fontoverride" filename="DroidSansMono.ttf" scale="100" /> - <string name="install_button_text">Asenna</string> - </resources> -</language> diff --git a/gui/devices/landscape/res/landscape.xml b/gui/devices/landscape/res/landscape.xml deleted file mode 100644 index c2a117dfa..000000000 --- a/gui/devices/landscape/res/landscape.xml +++ /dev/null @@ -1,3721 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <styles> - <style name="buttontext"> - <highlight color="%highlight_color%" /> - <font resource="font" color="%button_text_color%" /> - </style> - - <style name="button"> - <style name="buttontext" /> - <image resource="main_button" /> - </style> - - <style name="mediumbutton"> - <style name="buttontext" /> - <image resource="medium_button" /> - </style> - - <style name="mediumwidebutton"> - <style name="buttontext" /> - <image resource="mediumwide_button" /> - </style> - - <style name="fillbutton"> - <style name="buttontext" /> - <fill color="%button_fill_color%" /> - </style> - - <style name="rebootsystem"> - <condition var1="tw_reboot_system" var2="1" /> - <style name="button" /> - <text>Reboot System</text> - <actions> - <action function="set">tw_back=main2</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=system</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </style> - - <style name="scrolllist"> - <highlight color="%fileselector_highlight_color%" /> - <header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" /> - <background color="%fileselector_background%" /> - <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" /> - </style> - - <style name="fileselector"> - <style name="scrolllist" /> - <icon folder="folder_icon" file="file_icon" /> - <sort name="tw_gui_sort_order" /> - </style> - - <style name="patternpassword"> - <size name="tw_gui_pattern_grid_size" default="3" /> - </style> - - <style name="partitionlist"> - <style name="scrolllist" /> - <icon selected="checkbox_true" unselected="checkbox_false" /> - </style> - - <style name="text"> - <font resource="font" color="%text_color%" /> - </style> - - <style name="checkbox"> - <font resource="font" color="%text_color%" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </style> - - <style name="slider"> - <text>Swipe to Confirm</text> - <font resource="font" color="%text_color%" /> - <placement x="%center_x%" y="%slider_y%" placement="5" /> - <resource base="slider" used="slider-used" touch="slider-touch" /> - </style> - - <style name="console"> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - </style> - - <style name="input"> - <background color="%input_background_color%" /> - <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" /> - <font resource="font" color="%text_color%" /> - </style> - - <style name="slidervalue"> - <font resource="font" color="%text_color%" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%" /> - </style> - </styles> - - <pages> - <page name="main"> - <object type="action"> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="main2"> - <object type="template" name="header" /> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Install</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Backup</text> - <action function="page">backup</action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row1_y%" /> - <text>Restore</text> - <action function="page">restore</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Wipe</text> - <action function="page">wipe</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Mount</text> - <action function="page">mount</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Settings</text> - <action function="page">settings</action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row2_y%" /> - <text>Advanced</text> - <action function="page">advanced</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row2_y%" /> - <text>Reboot</text> - <action function="page">reboot</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="install"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Select Zip to Install</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" /> - <text>Folders:</text> - <filter folders="1" files="0" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="select" /> - </object> - - <object type="fileselector"> - <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".zip" folders="0" files="1" /> - <path name="tw_zip_location" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Images...</text> - <actions> - <action function="page">install_image</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <actions> - <action function="queuezip"></action> - <action function="page">flash_confirm</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flash_confirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>WARNING: This operation may install incompatible software and render your device unusable.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Folder:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>File to flash:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>Press back to cancel adding this zip.</text> - </object> - - <object type="checkbox"> - <placement x="%col2_x%" y="%row7_text_y%" /> - <text>Zip file signature verification?</text> - <data variable="tw_signed_zip_verify" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5" /> - <text>File %tw_zip_queue_count% of max of 10</text> - </object> - - <object type="button" style="mediumwidebutton"> - <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition> - <placement x="%col2_x%" y="%row5_medium_y%" /> - <text>Add More Zips</text> - <action function="page">install</action> - </object> - - <object type="button" style="mediumwidebutton"> - <placement x="%col3_x%" y="%row5_medium_y%" /> - <text>Clear Queue</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <action function="flash">flash_zip</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="cancelzip"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flash_zip"> - <object type="template" name="header" /> - - <object type="template" name="flash_zip_console" /> - - <object type="text"> - <placement x="%col1_x%" y="%row16_text_y%" /> - <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row17_text_y%" /> - <text>%tw_filename%</text> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <action function="page">flash_done</action> - </object> - </page> - - <page name="flash_done"> - <object type="template" name="header" /> - - <object type="template" name="flash_zip_console" /> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row17_text_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%" /> - <placement x="%center_x%" y="%row17_text_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%slider_y%" /> - <text>Wipe Cache/Dalvik</text> - <actions> - <action function="set">tw_back=flash_done</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=/cache</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=wipe</action> - <action function="set">tw_action2_param=dalvik</action> - <action function="set">tw_text1=Wipe Cache & Dalvik?</action> - <action function="set">tw_action_text1=Wiping Cache & Dalvik...</action> - <action function="set">tw_complete_text1=Cache & Dalvik Wipe Complete</action> - <action function="set">tw_slider_text=Swipe to Wipe</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button" style="rebootsystem"> - <placement x="%col4_x%" y="%slider_y%" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%slider_y%" /> - <text>Home</text> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="install_image"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Select Image to Flash</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install_image</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" /> - <text>Folders:</text> - <filter folders="1" files="0" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="select" /> - </object> - - <object type="fileselector"> - <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".img" folders="0" files="1" /> - <path name="tw_zip_location" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Zips...</text> - <actions> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <action function="page">flashimage_confirm</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">install</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flashimage_confirm"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%col2_x%" y="%row1_text_y%" w="%listbox_width%" h="%flash_list_height%" /> - <text>Select Partition to Flash Image:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_flash_partition" /> - <listtype name="flashimg" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row8_text_y%" placement="5" /> - <text>Folder:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row9_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5" /> - <text>File to flash:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <actions> - <action function="set">tw_back=flashimage_confirm</action> - <action function="set">tw_action=flashimage</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action_text1=Flashing Image...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Image Flashed</action> - <action function="page">action_page</action> - </actions> - <action function="flashimage"></action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install_image</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="clear_vars"> - <object type="action"> - <action function="set">tw_operation_state=0</action> - <action function="set">tw_text1=</action> - <action function="set">tw_text2=</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_action_param=</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action2=</action> - <action function="set">tw_action2_param=</action> - <action function="set">tw_has_cancel=0</action> - <action function="set">tw_cancel_action=</action> - <action function="set">tw_cancel_param=</action> - <action function="set">tw_show_exclamation=0</action> - <action function="set">tw_show_reboot=0</action> - <action function="page">%tw_clear_destination%</action> - </object> - </page> - - <page name="confirm_action"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>%tw_text4%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row12_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <text>%tw_slider_text%</text> - <action function="page">action_page</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="action_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button"> - <condition var1="tw_has_cancel" var2="1" /> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <action function="%tw_cancel_action%">%tw_cancel_param%</action> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="singleaction_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_page_done=1</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="action_complete"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_complete_text1%</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button"> - <condition var1="tw_show_reboot" var2="0" /> - <placement x="%col_center_x%" y="%slider_y%" /> - <text>Back</text> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="button" style="rebootsystem"> - <condition var1="tw_show_reboot" var2="1" /> - <placement x="%col_center_x%" y="%slider_y%" /> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="filecheck"> - <object type="action"> - <action function="fileexists">%tw_filecheck%</action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_fileexists=1</action> - <action function="page">%tw_existpage%</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="1" /> - </conditions> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">%tw_notexistpage%</action> - </actions> - </object> - </page> - - <page name="rebootcheck"> - <object type="action"> - <condition var1="tw_backup_system_size" op=">=" var2="%tw_min_system%" /> - <action function="reboot">%tw_action_param%</action> - </object> - - <object type="action"> - <condition var1="tw_backup_system_size" op="<" var2="%tw_min_system%" /> - <action function="page">confirm_action</action> - </object> - </page> - - <page name="reboot"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Reboot Menu</text> - </object> - - <object type="button" style="rebootsystem"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>System</text> - </object> - - <object type="button"> - <condition var1="tw_reboot_poweroff" var2="1" /> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Power Off</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=poweroff</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to power off?</action> - <action function="set">tw_action_text1=Turning Off...</action> - <action function="set">tw_complete_text1=Turning Off...</action> - <action function="set">tw_slider_text=Swipe to Power Off</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_recovery" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Recovery</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=recovery</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_bootloader" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Bootloader</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=bootloader</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_download_mode" var2="1" /> - <placement x="%col3_x%" y="%row2_y%" /> - <text>Download</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=download</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="selectstorage"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" /> - <text>Select Storage:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_storage_path" /> - <listtype name="storage" /> - </object> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%row2_y%" /> - <text>OK</text> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="mount"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Mount Menu</text> - </object> - - <object type="partitionlist"> - <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" /> - <text>Select Partitions to Mount:</text> - <listtype name="mount" /> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_is_decrypted" var2="0" /> - </conditions> - <placement x="%col3_x%" y="row1_y" /> - <text>Decrypt Data</text> - <action function="page">decrypt</action> - </object> - - <object type="button"> - <condition var1="tw_has_usb_storage" var2="1" /> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Mount USB Storage</text> - <action function="page">usb_mount</action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="0" /> - </conditions> - <placement x="%col3_x%" y="row1_y" /> - <text>Enable MTP</text> - <action function="startmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="1" /> - </conditions> - <placement x="%col3_x%" y="row1_y" /> - <text>Disable MTP</text> - <action function="stopmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_is_decrypted" var2="0" /> - </conditions> - <placement x="%col3_x%" y="row1_y" /> - <text>Decrypt Data</text> - <action function="page">decrypt</action> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row10_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_false" /> - <action function="mountsystemtoggle">1</action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row10_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="!=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_true" /> - <actions> - <action function="set">tw_lifetime_writes=2</action> - <action function="page">system_readonly_check</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_mount"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row1_y%" /> - <text>Unmount</text> - <action function="page">usb_umount</action> - </object> - - <object type="action"> - <action function="mount">usb</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_umount"> - <object type="action"> - <action function="unmount">usb</action> - </object> - - <object type="action"> - <action function="page">mount</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="system_readonly_check"> - <object type="action"> - <action function="checkpartitionlifetimewrites">/system</action> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="1" /> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="page">mount</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="0" /> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">system_readonly</action> - </actions> - </object> - </page> - - <page name="wipe"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Factory Reset: Wipes Data, Cache, and Dalvik</text> - </object> - - <object type="text"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>(not including internal storage)</text> - </object> - - <object type="text"> - <conditions> - <condition var1="tw_has_android_secure" var2="1" /> - <condition var1="fileexists" var2="/and-sec" /> - </conditions> - <placement x="%center_x%" y="%row3_text_y%" placement="1" /> - <text>Android Secure </text> - </object> - - <object type="text"> - <condition var1="tw_has_sdext_partition" var2="1" /> - <placement x="%center_x%" y="%row3_text_y%" /> - <text> SD-EXT</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Most of the time this is the only wipe that you need.</text> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%wipe_button_y%" /> - <text>Advanced Wipe</text> - <action function="page">advancedwipe</action> - </object> - - <object type="button"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%col3_x%" y="%wipe_button_y%" /> - <text>Format Data</text> - <actions> - <action function="page">formatdata</action> - </actions> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_has_data_media" var2="0" /> - </conditions> - <placement x="%col3_x%" y="%wipe_button_y%" /> - <text>Wipe Encryption</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Wipe Encryption from Data?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="set">tw_slider_text=Swipe to Format Data</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row12_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <text>Swipe to Factory Reset</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=data</action> - <action function="set">tw_action_text1=Factory Reset...</action> - <action function="set">tw_complete_text1=Factory Reset Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="advancedwipe"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" /> - <text>Select Partitions to Wipe:</text> - <data name="tw_wipe_list" /> - <listtype name="wipe" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> - <text>Repair or Change File System</text> - <actions> - <action function="checkpartitionlist"></action> - <action function="page">checkpartitionlist</action> - </actions> - </object> - - <object type="text"> - <condition var1="partitionlisterror" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%col3_x%" y="%backup_storage_y%" /> - <text>Invalid partition selection</text> - </object> - - <object type="slider"> - <text>Swipe to Wipe</text> - <actions> - <action function="set">tw_back=advancedwipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=LIST</action> - <action function="set">tw_text1=Wipe Selected Partition(s)?</action> - <action function="set">tw_action_text1=Wiping Partition(s)...</action> - <action function="set">tw_complete_text1=Wipe Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="formatdata"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Format Data will wipe all of your apps, backups, pictures,</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>videos, media, and removes encryption on internal storage.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>This cannot be undone. Press back to cancel.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Type yes to continue.</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row6_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_confirm_formatdata%</text> - <data name="tw_confirm_formatdata" /> - <restrict minlen="3" maxlen="3" allow="yes" /> - <action function="page">formatdata_confirm</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="formatdata_confirm"> - <object type="action"> - <condition var1="tw_confirm_formatdata" op="=" var2="yes" /> - <actions> - <action function="set">tw_back=formatdata</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_confirm_formatdata" op="!=" var2="yes" /> - <action function="page">formatdata</action> - </object> - </page> - - <page name="checkpartitionlist"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">partitionoptions</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="partitionoptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <text>Partition Options for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="!=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Present: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Present: No</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="!=" var2="0" /> - <placement x="%col3_x%" y="%row3_text_y%" /> - <text>Removable: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="=" var2="0" /> - <placement x="%col3_x%" y="%row3_text_y%" /> - <text>Removable: No</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Size: %tw_partition_size%MB</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row4_text_y%" /> - <text>Used: %tw_partition_used%MB</text> - </object> - - <object type="text"> - <placement x="%col3_x%" y="%row4_text_y%" /> - <text>Free: %tw_partition_free%MB</text> - </object> - - <object type="text"> - <placement x="%col4_x%" y="%row4_text_y%" /> - <text>Backup Size: %tw_partition_backup_size%MB</text> - </object> - - <object type="button"> - <condition var1="tw_partition_can_resize" op="=" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Resize</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=resize</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=getpartitiondetails</action> - <action function="set">tw_text1=Resize %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Resizing...</action> - <action function="set">tw_complete_text1=Resize Complete</action> - <action function="set">tw_slider_text=Swipe to Resize</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_can_repair" op="=" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Repair</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=repair</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Repair %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Repairing...</action> - <action function="set">tw_complete_text1=Repair Complete</action> - <action function="set">tw_slider_text=Swipe to Repair</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row2_y%" /> - <text>Change File System</text> - <action function="page">selectfilesystem</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advancedwipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="refreshfilesystem"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">selectfilesystem</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="selectfilesystem"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <text>Change file system for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col1_x%" y="%row1_y%" /> - <text>EXT2</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext2</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col2_x%" y="%row1_y%" /> - <text>EXT3</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext3</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col3_x%" y="%row1_y%" /> - <text>EXT4</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext4</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_f2fs" op="=" var2="1" /> - <placement x="%col4_x%" y="%row1_y%" /> - <text>F2FS</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=f2fs</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_vfat" op="=" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>FAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=vfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_exfat" op="=" var2="1" /> - <placement x="%col3_x%" y="%row2_y%" /> - <text>exFAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=exfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">partitionoptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backup"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Back Up Device</text> - </object> - - <object type="partitionlist"> - <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" /> - <text>Select Partitions to Back Up:</text> - <data name="tw_backup_list" /> - <listtype name="backup" /> - </object> - - <object type="text"> - <placement x="%col_right_x%" y="%row2_text_y%" placement="1" /> - <text>Backup Name: %tw_backup_name%</text> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row1_y%" /> - <text>Refresh Sizes</text> - <actions> - <action function="refreshsizes"></action> - <action function="page">backup</action> - </actions> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Set Backup Name</text> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">backupname1</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=backup</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="0" /> - </conditions> - <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> - <text>No Encryption</text> - <actions> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="1" /> - </conditions> - <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> - <text>Using Encryption</text> - <actions> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col3_x%" y="%nandcheck_row6%" /> - <text>Enable Compression (Requires more time)</text> - <data variable="tw_use_compression" /> - </object> - - <object type="checkbox"> - <placement x="%col3_x%" y="%nandcheck_row7%" /> - <text>Skip MD5 generation on backups</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col3_x%" y="%nandcheck_row8%" /> - <font resource="font" color="%text_color%" /> - <text>Disable Free Space Check.</text> - <data variable="tw_disable_free_space" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </object> - - <object type="slider"> - <text>Swipe to Back Up</text> - <actions> - <action function="set">tw_operation_state=0</action> - <action function="page">backup_run</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupname1"> - <object type="action"> - <condition var1="tw_backup_name" op="=" var2="(Auto Generate)" /> - <action function="generatebackupname"></action> - </object> - - <object type="action"> - <action function="page">backupname2</action> - </object> - </page> - - <page name="backupname2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter a Backup Name</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_name%</text> - <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> - <action function="set">tw_existpage=backupname2</action> - <action function="set">tw_notexistpage=backup</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%"/> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%cancel_button_y%" /> - <text>Append Date</text> - <action function="appenddatetobackupname"></action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%cancel_button_y%" /> - <text>Cancel / Clear</text> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">main</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Encrypt your backup? Please enter a password:</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display%</text> - <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <action function="page">backupencryption2</action> - </object> - - <object type="text"> - <condition var1="tw_password_not_match" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Passwords Do Not Match</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backup</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Encrypt your backup? Please Enter Password Again:</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display2%</text> - <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">checkbackuppassword</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backup</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="checkbackuppassword"> - <object type="action"> - <condition var1="tw_backup_password2" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=1</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_password_not_match=1</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backupencryption</action> - </actions> - </object> - </page> - - <page name="backup_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>%tw_file_progress%</text> - </object> - - <object type="text"> - <placement x="%col_right_x%" y="%row2_text_y%" placement="1" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Cancel</text> - <actions> - <action function="cancelbackup"></action> - </actions> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="nandroid">backup</action> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="0" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="1" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Cancelled</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore"> - <object type="template" name="header" /> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" /> - <text>Select Package to Restore:</text> - <filter folders="1" files="0" nav="0" /> - <path name="tw_backups_folder" /> - <data name="tw_restore" default="" /> - <selection name="tw_restore_name" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <condition var1="tw_restore" op="modified" /> - <actions> - <action function="readBackup"></action> - <action function="page">restore_read</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_read"> - <object type="action"> - <condition var1="tw_restore_encrypted" var2="1" /> - <actions> - <action function="set">tw_password_fail=0</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_restore_encrypted" var2="0" /> - <actions> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Backup encrypted. Please enter your password:</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_restore_display%</text> - <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">try_restore_decrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore</action> - </actions> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%cancel_button_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="try_restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt_backup"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_select"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Package to Restore: %tw_restore_name%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Package Date: %tw_restore_file_date%</text> - </object> - - <object type="partitionlist"> - <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" /> - <text>Select Partitions to Restore:</text> - <data name="tw_restore_list" selectedlist="tw_restore_selected" /> - <listtype name="restore" /> - </object> - - <object type="checkbox"> - <placement x="%col3_x%" y="%nandcheck_row6%" /> - <text>Enable MD5 checking of backup files</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Rename Backup</text> - <actions> - <action function="set">tw_backup_rename=</action> - <action function="set">tw_fileexists=0</action> - <action function="page">renamebackup</action> - </actions> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row1_y%" /> - <text>Delete Backup</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Restore</text> - <action function="page">restore_run</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="renamebackup"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter a New Backup Name</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_rename%</text> - <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && mv "%tw_restore_name%" "%tw_backup_rename%"</action> - <action function="set">tw_text1=Rename Backup?</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Renaming Backup...</action> - <action function="set">tw_complete_text1=Backup Rename Complete</action> - <action function="set">tw_slider_text=Swipe to Rename</action> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action> - <action function="set">tw_existpage=renamebackup</action> - <action function="set">tw_notexistpage=confirm_action</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%" /> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <action function="page">restore_select</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore_select</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_back=restore_select</action> - <action function="set">tw_complete_text1=Restore Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <action function="nandroid">restore</action> - </object> - </page> - - <page name="settings"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Settings</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Zip file signature verification?</text> - <data variable="tw_signed_zip_verify" />> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Use rm -rf instead of formatting?</text> - <data variable="tw_rm_rf" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Skip MD5 generation on backups</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Enable MD5 checking of backup files</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row6_text_y%" /> - <text>Use 24-hour clock</text> - <data variable="tw_military_time" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row7_text_y%" /> - <text>Simulate most actions for theme testing</text> - <data variable="tw_simulate_actions" /> - </object> - - <object type="checkbox"> - <condition var1="tw_simulate_actions" var2="1" /> - <placement x="%col1_x%" y="%row8_text_y%" /> - <text>Simulate failure for actions</text> - <data variable="tw_simulate_fail" /> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Time Zone</text> - <action function="page">timezone</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Restore Defaults</text> - <action function="restoredefaultsettings"></action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row2_y%" /> - <text>Vibration Duration</text> - <action function="page">Vibrate</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row2_y%" /> - <text>Screen</text> - <action function="page">screen</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="timezone"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Select Time Zone</text> - </object> - - <object type="listbox" style="scrolllist"> - <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" /> - <text>Select Time Zone:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_time_zone_guisel" /> - <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem> - <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem> - <listitem name="(UTC -9) Alaska">AST9;ADT</listitem> - <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem> - <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem> - <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem> - <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem> - <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem> - <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem> - <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem> - <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem> - <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem> - <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem> - <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem> - <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem> - <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem> - <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem> - </object> - - <object type="checkbox"> - <placement x="%col1_medium_x%" y="%row11_text_y%" /> - <text>Do you use daylight savings time (DST)?</text> - <data variable="tw_time_zone_guidst" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row13_text_y%" placement="5" /> - <text>Offset (usually 0): %tw_time_zone_guioffset%</text> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" /> - <text>0</text> - <action function="set">tw_time_zone_guioffset=0</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" /> - <text>15</text> - <action function="set">tw_time_zone_guioffset=15</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" /> - <text>30</text> - <action function="set">tw_time_zone_guioffset=30</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" /> - <text>45</text> - <action function="set">tw_time_zone_guioffset=45</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row2_y%" /> - <text>Set Time Zone</text> - <action function="setguitimezone"></action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row17_text_y%" placement="5" /> - <text>Current Time Zone: %tw_time_zone%</text> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="screen"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Screen Settings</text> - </object> - - <object type="button"> - <placement x="%slidervalue_x%" y="%row3_text_y%" textplacement="6" /> - <condition var1="tw_screen_timeout_secs" op="=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_false" /> - <action function="set">tw_screen_timeout_secs=60</action> - </object> - - <object type="button"> - <placement x="%slidervalue_x%" y="%row3_text_y%" textplacement="6" /> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_true" /> - <action function="set">tw_screen_timeout_secs=0</action> - </object> - - <object type="slidervalue"> - <conditions> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - </conditions> - <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" /> - <text>Screen timeout in seconds:</text> - <data variable="tw_screen_timeout_secs" min="15" max="300" /> - </object> - - <object type="slidervalue"> - <condition var1="tw_has_brightnesss_file" var2="1" /> - <placement x="slidervalue_x" y="%row12_text_y%" w="%slidervalue_w%" /> - <text>Brightness: %tw_brightness_pct%%</text> - <data variable="tw_brightness_pct" min="10" max="100" /> - <actions> - <action function="set">tw_brightness=%tw_brightness_max%</action> - <action function="compute">tw_brightness*%tw_brightness_pct%</action> - <action function="compute">tw_brightness/100</action> - <action function="setbrightness">%tw_brightness%</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="Vibrate"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Vibration Settings :</text> - </object> - - <object type="slidervalue"> - <placement x="slidervalue_x" y="%row3_text_y%" w="%slidervalue_w%" /> - <text>Button Vibration:</text> - <data variable="tw_button_vibrate" min="0" max="300" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - </object> - - <object type="slidervalue"> - <placement x="slidervalue_x" y="%row7_text_y%" w="%slidervalue_w%" /> - <text>Keyboard Vibration:</text> - <data variable="tw_keyboard_vibrate" min="0" max="300" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - </object> - - <object type="slidervalue"> - <placement x="slidervalue_x" y="%row11_text_y%" w="%slidervalue_w%" /> - <text>Action Vibration:</text> - <data variable="tw_action_vibrate" min="0" max="500" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="advanced"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Advanced</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Copy Log to SD</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=copylog</action> - <action function="set">tw_text1=Copy Log to SD Card?</action> - <action function="set">tw_action_text1=Copying Log to SD Card...</action> - <action function="set">tw_complete_text1=Log Copy Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Fix Permissions</text> - <action function="page">fixperms</action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row1_y%" /> - <text>Terminal Command</text> - <action function="page">terminalfolder</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row1_y%" /> - <text>ADB Sideload</text> - <action function="page">sideload</action> - </object> - - <object type="button"> - <condition var1="tw_allow_partition_sdcard" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Partition SD Card</text> - <action function="page">partsdcard</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>File Manager</text> - <action function="page">filemanagerlist</action> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row2_y%" /> - <text>Reload Theme</text> - <action function="reload"></action> - </object> - - <object type="button"> - <condition var1="tw_show_dumlock" var2="1" /> - <placement x="%col4_x%" y="%row2_y%" /> - <text>HTC Dumlock</text> - <action function="page">htcdumlock</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="partsdcard"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Partition SD Card</text> - </object> - - <object type="button"> - <placement x="%col1_sdext_x%" y="%row1_sdext_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_sdext_size-128</action> - </object> - - <object type="button"> - <placement x="%col2_sdext_x%" y="%row1_sdext_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_sdext_size+128</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row_extsize_y%" placement="5" /> - <text>EXT Size: %tw_sdext_size%</text> - </object> - - <object type="button"> - <placement x="%col1_sdext_x%" y="%row2_sdext_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_swap_size-32</action> - </object> - - <object type="button"> - <placement x="%col2_sdext_x%" y="%row2_sdext_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_swap_size+32</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row_swapsize_y%" placement="5" /> - <text>Swap Size: %tw_swap_size%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row8_text_y%" placement="5" /> - <text>File system: %tw_sdpart_file_system%</text> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col2_medium_x%" y="%row4_medium_y%" /> - <text>EXT3</text> - <action function="set">tw_sdpart_file_system=ext3</action> - </object> - - <object type="button" style="mediumbutton"> - <condition var1="tw_sdext_disable_ext4" var2="0" /> - <placement x="%col3_medium_x%" y="%row4_medium_y%" /> - <text>EXT4</text> - <action function="set">tw_sdpart_file_system=ext4</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row12_text_y%" placement="5" /> - <text>You will lose all files on your SD card!</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row13_text_y%" placement="5" /> - <text>This action cannot be undone!</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Partition</text> - <actions> - <action function="set">tw_back=partsdcard</action> - <action function="set">tw_action=partitionsd</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=set</action> - <action function="set">tw_action2_param=tw_zip_location=/sdcard</action> - <action function="set">tw_action_text1=Partitioning SD Card...</action> - <action function="set">tw_action_text2=This will take a few minutes.</action> - <action function="set">tw_complete_text1=Partitioning Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - - <page name="htcdumlock"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>HTC Dumlock</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Restore Original Boot</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockrestoreboot</action> - <action function="set">tw_text1=Restore original boot image?</action> - <action function="set">tw_action_text1=Restoring Original Boot...</action> - <action function="set">tw_complete_text1=Restore Original Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Reflash Recovery->Boot</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockreflashrecovery</action> - <action function="set">tw_text1=Reflash recovery to boot?</action> - <action function="set">tw_action_text1=Flashing recovery to boot...</action> - <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Install HTC Dumlock</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=installhtcdumlock</action> - <action function="set">tw_text1=Install HTC dumlock files to ROM?</action> - <action function="set">tw_action_text1=Installing HTC Dumlock...</action> - <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="lock"> - <background color="#000000A0" /> - - <object type="image"> - <image resource="unlock-icon" /> - <placement x="%center_x%" y="%lock_y%" placement="4" /> - </object> - - <object type="slider"> - <text>Swipe to Unlock</text> - <action function="overlay"></action> - </object> - </page> - - - <page name="filemanagerlist"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>File Manager: Select a File or Folder</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" /> - <text>Folders:</text> - <filter folders="1" files="0" /> - <path name="tw_file_location1" default="/sdcard" /> - <data name="select" /> - <selection name="tw_selection1" /> - </object> - - <object type="fileselector"> - <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location1%</text> - <filter folders="0" files="1" /> - <path name="tw_file_location1" default="/" /> - <data name="tw_filename1" /> - <selection name="tw_selection1" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <actions> - <action function="set">tw_fm_type=File</action> - <action function="set">tw_fm_isfolder=0</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="action"> - <condition var1="tw_filename1" op="modified" /> - <actions> - <action function="page">filemanageroptions</action> - </actions> - </object> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select Folder</text> - <actions> - <action function="set">tw_filename1=tw_file_location1</action> - <action function="set">tw_fm_isfolder=1</action> - <action function="set">tw_fm_type=Folder</action> - <action function="page">filemanageroptions</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanageroptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_type% Selected:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy File</text> - <actions> - <action function="set">tw_filemanager_command=cp</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy Folder</text> - <actions> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && cp -R</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Move</text> - <actions> - <action function="set">tw_filemanager_command=mv</action> - <action function="set">tw_fm_text1=Moving</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col3_x%" y="%row2_y%" /> - <text>chmod 755</text> - <actions> - <action function="set">tw_filemanager_command=chmod 755</action> - <action function="set">tw_fm_text1=chmod 755</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%row2_y%" /> - <text>chmod</text> - <actions> - <action function="set">tw_filemanager_rename=0000</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerchmod</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_filemanager_command=rm -rf</action> - <action function="set">tw_fm_text1=Deleting</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Rename File</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=mv</action> - <action function="page">filemanagerrenamefile</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col4_x%" y="%row1_y%" /> - <text>Rename Folder</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && mv</action> - <action function="page">filemanagerrenamefolder</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanagerlist</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="choosedestinationfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>Browse to Destination Folder & Press Select</text> - </object> - - <object type="fileselector"> - <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location2%</text> - <background color="%fileselector_background%" /> - <filter folders="1" files="0" /> - <path name="tw_file_location2" default="/sdcard" /> - <data name="tw_filename2" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select Folder</text> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_file_location2%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerrenamefile"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <font resource="font" color="%text_color%" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3="%tw_file_location1%/%tw_filemanager_rename%"</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerrenamefolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_filemanager_rename%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerchmod"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter New Permissions</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="3" maxlen="4" allow="0123456789" /> - <actions> - <action function="set">tw_filemanager_command=chmod %tw_filemanager_rename%</action> - <action function="set">tw_fm_text1=chmod %tw_filemanager_rename%</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerconfirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>%tw_fm_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5"/> - <text>%tw_fm_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5"/> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <action function="page">filemanageracction</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">%tw_back%</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanageracction"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_fm_text1%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_back=filemanagerlist</action> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="0" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%"</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="1" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%" "%tw_fm_text3%"</action> - </actions> - </object> - </page> - - <page name="decrypt"> - <object type="template" name="header" /> - - <object type="action"> - <condition var1="tw_crypto_pwtype" var2="2" /> - <action function="page">decrypt_pattern</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter Your Password</text> - </object> - - <object type="input"> - <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_crypto_display%</text> - <data name="tw_crypto_password" mask="*" maskvariable="tw_crypto_display" /> - <restrict minlen="1" maxlen="254" /> - <actions> - <action function="page">trydecrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="template" name="footer" /> - </page> - - <page name="decrypt_pattern"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter Your Pattern</text> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Pattern Failed, Please Try Again</text> - </object> - - <object type="template" name="pattern_options" /> - - <object type="patternpassword"> - <placement x="%pattern_x%" y="%pattern_y%" w="%pattern_width%" h="%pattern_width%" /> - <dot color="%pattern_dot_color%" activecolor="%pattern_dot_color_active%" radius="%pattern_dot_radius%" /> - <line color="%pattern_line_color%" width="%pattern_line_width%" /> - <data name="tw_crypto_password"/> - <action function="page">trydecrypt</action> - </object> - - <object type="button"> - <placement x="%col4_x%" y="%cancel_button_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="trydecrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - </page> - - <page name="terminalfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>Browse to Starting Folder</text> - </object> - - <object type="fileselector"> - <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" /> - <text>%tw_terminal_location%</text> - <filter folders="1" files="0" /> - <path name="tw_terminal_location" default="/" /> - <data name="tw_terminal" /> - <selection name="tw_terminal_selection" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="button"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select Folder</text> - <actions> - <action function="page">terminalcommand</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="terminalcommand"> - <background color="#000000FF" /> - - <object type="terminal" style="console"> - <font resource="fixed" spacing="3" color="%text_color%" /> - <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" /> - </object> - - <object type="text"> - <placement x="%input_x%" y="%terminal_text_y%" placement="0" /> - <text>Starting Path: %tw_terminal_location%</text> - </object> -<!-- - <object type="input"> - <condition var1="tw_terminal_state" var2="0" /> - <placement x="%input_x%" y="%terminal_text_y%" w="%terminal_input_width%" h="%input_height%" placement="0" /> - <text>%tw_terminal_command%</text> - <font resource="fixed" color="%text_color%" /> - <data name="tw_terminal_command" /> - <restrict minlen="1" /> - <action function="terminalcommand">%tw_terminal_command%</action> - </object> ---> - <object type="button" style="mediumbutton"> - <condition var1="tw_terminal_state" var2="1" /> - <placement x="%filemanager_select_x%" y="%terminal_button_y%" /> - <text>KILL</text> - <action function="killterminal"></action> - </object> - - <object type="button"> - <placement x="%home_button_x%" y="%terminal_button_y%" /> - <text></text> - <image resource="home_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">home</action> - </object> - - <object type="button"> - <placement x="%back_button_x%" y="%terminal_button_y%" /> - <text></text> - <image resource="back_icon" /> - <condition var1="tw_busy" var2="0" /> - <action function="key">back</action> - </object> - - <object type="action"> - <touch key="power" /> - <action function="overlay">lock</action> - </object> - - <object type="action"> - <touch key="power+voldown" /> - <action function="screenshot" /> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">terminalfolder</action> - </object> - </page> - - <page name="sideload"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>ADB Sideload</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Wipe Dalvik Cache.</text> - <data variable="tw_wipe_dalvik" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Wipe Cache.</text> - <data variable="tw_wipe_cache" /> - </object> - - <object type="slider"> - <text>Swipe to Start Sideload</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=adbsideload</action> - <action function="set">tw_action_text1=ADB Sideload</action> - <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action> - <action function="set">tw_complete_text1=ADB Sideload Complete</action> - <action function="set">tw_has_cancel=1</action> - <action function="set">tw_show_reboot=1</action> - <action function="set">tw_cancel_action=adbsideloadcancel</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="fixperms"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>Fix Permissions</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row2_text_y%" /> - <text>Note: Fixing permissions is rarely needed.</text> - </object> - - <object type="checkbox"> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Also fix SELinux contexts</text> - <data variable="tw_fixperms_restorecon" /> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row4_text_y%" /> - <text>Fixing SELinux contexts may cause your device to not boot properly.</text> - </object> - - <object type="slider"> - <text>Swipe to Fix Permissions</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=fixpermissions</action> - <action function="set">tw_action_text1=Fixing Permissions...</action> - <action function="set">tw_complete_text1=Fix Permissions Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="installsu"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>Install SuperSU?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>Your device does not appear to be rooted.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>Install SuperSU now? This will root your device.</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_medium_y%" /> - <text>Do Not Install</text> - <action function="set">tw_page_done=1</action> - </object> - - <object type="slider"> - <text>Swipe to Install</text> - <actions> - <action function="set">tw_action=installsu</action> - <action function="set">tw_action_text1=Installing SuperSU</action> - <action function="set">tw_action_text2=</action> - <action function="page">singleaction_page</action> - </actions> - </object> - </page> - - <page name="system_readonly"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Keep System Read Only?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>TWRP can leave your system partition unmodified to make it easier for you to take official updates.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>TWRP will be unable to prevent the stock ROM from replacing TWRP and will not offer to root your device.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Installing zips or performing adb operations may still modify the system partition.</text> - </object> - - <object type="checkbox"> - <condition var1="tw_is_encrypted" var2="0" /> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Never show this screen during boot again</text> - <data variable="tw_never_show_system_ro_page" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row7_text_y%" /> - <text>Keep Read Only</text> - <actions> - <action function="mountsystemtoggle">1</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Allow Modifications</text> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - </pages> -</recovery> diff --git a/gui/devices/portrait/res/portrait.xml b/gui/devices/portrait/res/portrait.xml deleted file mode 100644 index 8d21777db..000000000 --- a/gui/devices/portrait/res/portrait.xml +++ /dev/null @@ -1,3769 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <styles> - <style name="buttontext"> - <highlight color="%highlight_color%" /> - <font resource="font" color="%button_text_color%" /> - </style> - - <style name="button"> - <style name="buttontext" /> - <image resource="main_button" /> - </style> - - <style name="mediumbutton"> - <style name="buttontext" /> - <image resource="medium_button" /> - </style> - - <style name="fillbutton"> - <style name="buttontext" /> - <fill color="%button_fill_color%" /> - </style> - - <style name="rebootsystem"> - <condition var1="tw_reboot_system" var2="1" /> - <style name="button" /> - <text>Reboot System</text> - <actions> - <action function="set">tw_back=main2</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=system</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </style> - - <style name="scrolllist"> - <highlight color="%fileselector_highlight_color%" /> - <header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" /> - <background color="%fileselector_background%" /> - <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" /> - </style> - - <style name="fileselector"> - <style name="scrolllist" /> - <icon folder="folder_icon" file="file_icon" /> - <sort name="tw_gui_sort_order" /> - </style> - - <style name="patternpassword"> - <size name="tw_gui_pattern_grid_size" default="3" /> - </style> - - <style name="partitionlist"> - <style name="scrolllist" /> - <icon selected="checkbox_true" unselected="checkbox_false" /> - </style> - - <style name="text"> - <font resource="font" color="%text_color%" /> - </style> - - <style name="checkbox"> - <font resource="font" color="%text_color%" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </style> - - <style name="slider"> - <text>Swipe to Confirm</text> - <font resource="font" color="%text_color%" /> - <placement x="%center_x%" y="%slider_y%" placement="5" /> - <resource base="slider" used="slider-used" touch="slider-touch" /> - </style> - - <style name="console"> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - </style> - - <style name="input"> - <background color="%input_background_color%" /> - <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" /> - <font resource="font" color="%text_color%" /> - </style> - - <style name="slidervalue"> - <font resource="font" color="%text_color%" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%" /> - </style> - </styles> - - <pages> - <page name="main"> - <object type="action"> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="main2"> - <object type="template" name="header" /> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Install</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Wipe</text> - <action function="page">wipe</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Backup</text> - <action function="page">backup</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Restore</text> - <action function="page">restore</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Mount</text> - <action function="page">mount</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>Settings</text> - <action function="page">settings</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Advanced</text> - <action function="page">advanced</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Reboot</text> - <action function="page">reboot</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="install"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Select Zip to Install</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".zip" folders="1" files="1" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Images...</text> - <actions> - <action function="page">install_image</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <actions> - <action function="queuezip"></action> - <action function="page">flash_confirm</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flash_confirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>This operation may install incompatible</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>software and render your device unusable.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>Folder:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>File to flash:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row7_text_y%" placement="5" /> - <text>Press back to cancel adding this zip.</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row8_text_y%" /> - <text>Zip file signature verification.</text> - <data variable="tw_signed_zip_verify" /> - </object> - - <object type="checkbox"> - <condition var1="tw_has_injecttwrp" var2="1" /> - <placement x="%col1_x%" y="%row10_text_y%" /> - <text>Inject TWRP after install.</text> - <data variable="tw_inject_after_zip" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>File %tw_zip_queue_count% of max of 10</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <action function="flash">flash_zip</action> - </object> - - <object type="button"> - <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition> - <placement x="%col1_x%" y="%row_queue_y%" /> - <text>Add More Zips</text> - <action function="page">install</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row_queue_y%" /> - <text>Clear Zip Queue</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="cancelzip"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flash_zip"> - <object type="template" name="header" /> - - <object type="console"> - <placement x="%console_x%" y="%row1_y%" w="%console_width%" h="%console_install_height%" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row17_text_y%" placement="5" /> - <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row18_text_y%" placement="5" /> - <text>%tw_filename%</text> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <action function="page">flash_done</action> - </object> - </page> - - <page name="flash_done"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Zip Install Complete</text> - </object> - - <object type="console"> - <placement x="%console_x%" y="%row1_y%" w="%console_width%" h="%console_installdone_height%" /> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Wipe cache/dalvik</text> - <actions> - <action function="set">tw_back=flash_done</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=/cache</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=wipe</action> - <action function="set">tw_action2_param=dalvik</action> - <action function="set">tw_text1=Wipe Cache & Dalvik?</action> - <action function="set">tw_action_text1=Wiping Cache & Dalvik...</action> - <action function="set">tw_complete_text1=Cache & Dalvik Wipe Complete</action> - <action function="set">tw_slider_text=Swipe to Wipe</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <style name="rebootsystem" /> - <placement x="%col2_x%" y="%row4_y%" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row3_y%" /> - <text>Home</text> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%zip_status_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%"/> - <placement x="%center_x%" y="%zip_status_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="install_image"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Select Image to Install</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install_image</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".img" folders="1" files="1" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Zips...</text> - <actions> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <action function="page">flashimage_confirm</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">install</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flashimage_confirm"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%flash_list_height%" /> - <text>Select Partition to Flash Image:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_flash_partition" /> - <listtype name="flashimg" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row8_text_y%" placement="5" /> - <text>Folder:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row9_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5" /> - <text>File to flash:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <actions> - <action function="set">tw_back=flashimage_confirm</action> - <action function="set">tw_action=flashimage</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action_text1=Flashing Image...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Image Flashed</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install_image</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="clear_vars"> - <object type="action"> - <action function="set">tw_operation_state=0</action> - <action function="set">tw_text1=</action> - <action function="set">tw_text2=</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_action_param=</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action2=</action> - <action function="set">tw_action2_param=</action> - <action function="set">tw_has_cancel=0</action> - <action function="set">tw_cancel_action=</action> - <action function="set">tw_cancel_param=</action> - <action function="set">tw_show_exclamation=0</action> - <action function="set">tw_show_reboot=0</action> - <action function="page">%tw_clear_destination%</action> - </object> - </page> - - <page name="confirm_action"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>%tw_text4%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row15_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <text>%tw_slider_text%</text> - <action function="page">action_page</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="action_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button" style="mediumbutton"> - <condition var1="tw_has_cancel" var2="1" /> - <placement x="%col_center_medium_x%" y="%row4_y%" /> - <text>Cancel</text> - <action function="%tw_cancel_action%">%tw_cancel_param%</action> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="singleaction_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_page_done=1</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="action_complete"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_complete_text1%</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%"/> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button"> - <condition var1="tw_show_reboot" var2="0" /> - <placement x="%col_center_x%" y="%row4_y%" /> - <text>Back</text> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="button" style="rebootsystem"> - <condition var1="tw_show_reboot" var2="1" /> - <placement x="%col_center_x%" y="%row4_y%" /> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="filecheck"> - <object type="action"> - <action function="fileexists">%tw_filecheck%</action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_fileexists=1</action> - <action function="page">%tw_existpage%</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="1" /> - </conditions> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">%tw_notexistpage%</action> - </actions> - </object> - </page> - - <page name="rebootcheck"> - <object type="action"> - <condition var1="tw_backup_system_size" op=">=" var2="%tw_min_system%" /> - <action function="reboot">%tw_action_param%</action> - </object> - - <object type="action"> - <condition var1="tw_backup_system_size" op="<" var2="%tw_min_system%" /> - <action function="page">confirm_action</action> - </object> - </page> - - <page name="wipe"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Factory Reset</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Wipes Data, Cache, and Dalvik</text> - </object> - - <object type="text"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>(not including internal storage)</text> - </object> - - <object type="text"> - <conditions> - <condition var1="tw_has_android_secure" var2="1" /> - <condition var1="fileexists" var2="/and-sec" /> - </conditions> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Android Secure</text> - </object> - - <object type="text"> - <condition var1="tw_has_sdext_partition" var2="1" /> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>SD-EXT</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>Most of the time this is</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row7_text_y%" placement="5" /> - <text>the only wipe that you need.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row16_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%wipe_button_y%" /> - <text>Advanced Wipe</text> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="page">advancedwipe</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%col2_x%" y="%wipe_button_y%" /> - <text>Format Data</text> - <actions> - <action function="page">formatdata</action> - </actions> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_has_data_media" var2="0" /> - </conditions> - <placement x="%col2_x%" y="%wipe_button_y%" /> - <text>Wipe Encryption</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Wipe Encryption from Data?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="set">tw_slider_text=Swipe to Format Data</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Factory Reset</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=data</action> - <action function="set">tw_action_text1=Factory Reset...</action> - <action function="set">tw_complete_text1=Factory Reset Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="advancedwipe"> - <object type="template" name="header" /> - - <object type="action"> - <action function="set">tw_wipe_list=</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Wipe Menu</text> - </object> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" /> - <text>Select Partitions to Wipe:</text> - <data name="tw_wipe_list" /> - <listtype name="wipe" /> - </object> - - <object type="slider"> - <text>Swipe to Wipe</text> - <actions> - <action function="set">tw_back=advancedwipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=LIST</action> - <action function="set">tw_text1=Wipe Selected Partition(s)?</action> - <action function="set">tw_action_text1=Wiping Partition(s)...</action> - <action function="set">tw_complete_text1=Wipe Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" /> - <text>Repair or Change File System</text> - <actions> - <action function="checkpartitionlist"></action> - <action function="page">checkpartitionlist</action> - </actions> - </object> - - <object type="text"> - <font resource="font" color="%text_fail_color%"/> - <condition var1="partitionlisterror" var2="1" /> - <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> - <text>Invalid partition selection</text> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="formatdata"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Format Data will wipe all of your apps,</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>backups, pictures, videos, media, and</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>removes encryption on internal storage.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>This cannot be undone. Press back to cancel.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Type yes to continue.</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row6_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_confirm_formatdata%</text> - <data name="tw_confirm_formatdata" /> - <restrict minlen="3" maxlen="3" allow="yes" /> - <action function="page">formatdata_confirm</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="formatdata_confirm"> - <object type="action"> - <condition var1="tw_confirm_formatdata" op="=" var2="yes" /> - <actions> - <action function="set">tw_back=formatdata</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_confirm_formatdata" op="!=" var2="yes" /> - <action function="page">formatdata</action> - </object> - </page> - - <page name="checkpartitionlist"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">partitionoptions</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="partitionoptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Partition Options for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="!=" var2="0" /> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Present: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="=" var2="0" /> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Present: No</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="!=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Removable: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Removable: No</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Size: %tw_partition_size%MB</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row4_text_y%" /> - <text>Used: %tw_partition_used%MB</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Free: %tw_partition_free%MB</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row5_text_y%" /> - <text>Backup Size: %tw_partition_backup_size%MB</text> - </object> - - <object type="button"> - <condition var1="tw_partition_can_resize" op="=" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Resize</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=resize</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=getpartitiondetails</action> - <action function="set">tw_text1=Resize %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Resizing...</action> - <action function="set">tw_complete_text1=Resize Complete</action> - <action function="set">tw_slider_text=Swipe to Resize</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_can_repair" op="=" var2="1" /> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Repair</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=repair</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Repair %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Repairing...</action> - <action function="set">tw_complete_text1=Repair Complete</action> - <action function="set">tw_slider_text=Swipe to Repair</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Change File System</text> - <action function="page">selectfilesystem</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advancedwipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="refreshfilesystem"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">selectfilesystem</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="selectfilesystem"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Change file system for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>Some ROMs or kernels may not support some</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>file systems. Proceed with caution!</text> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>EXT2</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext2</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>EXT3</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext3</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>EXT4</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext4</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_f2fs" op="=" var2="1" /> - <placement x="%col2_x%" y="%row3_y%" /> - <text>F2FS</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=f2fs</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_vfat" op="=" var2="1" /> - <placement x="%col1_x%" y="%row4_y%" /> - <text>FAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=vfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_exfat" op="=" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>exFAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=exfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">partitionoptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backup"> - <object type="template" name="header" /> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Backup Name: %tw_backup_name%</text> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">backupname1</action> - </actions> - </object> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" /> - <text>Select Partitions to Back Up:</text> - <data name="tw_backup_list" /> - <listtype name="backup" /> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="0" /> - </conditions> - <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>No Encryption</text> - <actions> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="1" /> - </conditions> - <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Using Encryption</text> - <actions> - <action function="set">tw_password_not_match=0</action> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Refresh Sizes</text> - <actions> - <action function="refreshsizes"></action> - <action function="page">backup</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=backup</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row15_text_y%" /> - <text>Enable compression.</text> - <data variable="tw_use_compression" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row16_text_y%" /> - <text>Skip MD5 generation during backup.</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row17_text_y%" /> - <font resource="font" color="%text_color%" /> - <text>Disable Free Space Check.</text> - <data variable="tw_disable_free_space" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </object> - - <object type="slider"> - <text>Swipe to Back Up</text> - <action function="page">backup_run</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupname1"> - <object type="action"> - <condition var1="tw_backup_name" op="=" var2="(Auto Generate)" /> - <action function="generatebackupname"></action> - </object> - - <object type="action"> - <action function="page">backupname2</action> - </object> - </page> - - <page name="backupname2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a Backup Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_name%</text> - <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> - <action function="set">tw_existpage=backupname2</action> - <action function="set">tw_notexistpage=backup</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%"/> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Append Date</text> - <action function="appenddatetobackupname"></action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">main</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Encrypt your backup?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Please Enter A Password:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display%</text> - <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <action function="page">backupencryption2</action> - </object> - - <object type="text"> - <condition var1="tw_password_not_match" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Passwords Do Not Match</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backup</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Encrypt your backup?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Please Enter Password Again:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display2%</text> - <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">checkbackuppassword</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backup</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="checkbackuppassword"> - <object type="action"> - <condition var1="tw_backup_password2" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=1</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_password_not_match=1</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backupencryption</action> - </actions> - </object> - </page> - - <page name="backup_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_file_progress%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button" style="mediumbutton"> - <placement x="%col_center_medium_x%" y="%row4_y%" /> - <text>Cancel</text> - <actions> - <action function="cancelbackup"></action> - </actions> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="nandroid">backup</action> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="0" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="1" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Cancelled</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - </page> - - <page name="restore"> - <object type="template" name="header" /> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>Select Package to Restore:</text> - <filter folders="1" files="0" nav="0" /> - <path name="tw_backups_folder" /> - <data name="tw_restore" default="" /> - <selection name="tw_restore_name" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <condition var1="tw_restore" op="modified" /> - <actions> - <action function="readBackup"></action> - <action function="page">restore_read</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_read"> - <object type="action"> - <condition var1="tw_restore_encrypted" var2="1" /> - <actions> - <action function="set">tw_password_fail=0</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_restore_encrypted" var2="0" /> - <actions> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Backup Encrypted</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Please Enter Your Password:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_restore_display%</text> - <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">try_restore_decrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="try_restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt_backup"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_select"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" /> - <text>Restoring: %tw_restore_name%</text> - <data name="tw_restore_list" selectedlist="tw_restore_selected" /> - <listtype name="restore" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Rename Backup</text> - <actions> - <action function="set">tw_backup_rename=</action> - <action function="set">tw_fileexists=0</action> - <action function="page">renamebackup</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Delete Backup</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row15_text_y%" /> - <text>Enable MD5 verification of backup files.</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row16_text_y%" placement="5" /> - <text>Package Date: %tw_restore_file_date%</text> - </object> - - <object type="slider"> - <text>Swipe to Restore</text> - <action function="page">restore_run</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="renamebackup"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New Backup Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_rename%</text> - <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && mv "%tw_restore_name%" "%tw_backup_rename%"</action> - <action function="set">tw_text1=Rename Backup?</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Renaming Backup...</action> - <action function="set">tw_complete_text1=Backup Rename Complete</action> - <action function="set">tw_slider_text=Swipe to Rename</action> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action> - <action function="set">tw_existpage=renamebackup</action> - <action function="set">tw_notexistpage=confirm_action</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%"/> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">restore_select</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore_select</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_back=restore_select</action> - <action function="set">tw_complete_text1=Restore Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <action function="nandroid">restore</action> - </object> - </page> - - <page name="selectstorage"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" /> - <text>Select Storage:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_storage_path" /> - <listtype name="storage" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> - <text>OK</text> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="mount"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" /> - <text>Select Partitions to Mount:</text> - <listtype name="mount" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_has_usb_storage" var2="1" /> - <placement x="%col1_x%" y="row4_y" /> - <text>Mount USB Storage</text> - <action function="page">usb_mount</action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="0" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Enable MTP</text> - <action function="startmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="1" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Disable MTP</text> - <action function="stopmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_is_decrypted" var2="0" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Decrypt Data</text> - <action function="page">decrypt</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%system_ro_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_false" /> - <action function="mountsystemtoggle">1</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%system_ro_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="!=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_true" /> - <actions> - <action function="set">tw_lifetime_writes=2</action> - <action function="page">system_readonly_check</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_mount"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>USB Storage Mounted</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <text>Be sure to safely remove your device</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>from your computer before unmounting!</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Unmount</text> - <action function="page">usb_umount</action> - </object> - - <object type="action"> - <action function="mount">usb</action> - <action function="set">tw_busy=1</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_umount"> - <object type="action"> - <action function="unmount">usb</action> - </object> - - <object type="action"> - <action function="page">mount</action> - <action function="set">tw_busy=0</action> - </object> - </page> - - <page name="system_readonly_check"> - <object type="action"> - <action function="checkpartitionlifetimewrites">/system</action> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="1" /> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="page">mount</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="0" /> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">system_readonly</action> - </actions> - </object> - </page> - - <page name="reboot"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Reboot Menu</text> - </object> - - <object type="button" style="rebootsystem"> - <condition var1="tw_reboot_system" var2="1" /> - <placement x="%col1_x%" y="%row1_y%" /> - <text>System</text> - </object> - - <object type="button"> - <condition var1="tw_reboot_poweroff" var2="1" /> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Power Off</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=poweroff</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to power off?</action> - <action function="set">tw_action_text1=Turning Off...</action> - <action function="set">tw_complete_text1=Turning Off...</action> - <action function="set">tw_slider_text=Swipe to Power Off</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_recovery" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Recovery</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=recovery</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_bootloader" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Bootloader</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=bootloader</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_download_mode" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Download</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=download</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="settings"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Settings</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <text>Zip file signature verification.</text> - <data variable="tw_signed_zip_verify" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Use rm -rf instead of formatting.</text> - <data variable="tw_rm_rf" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Skip MD5 generation during backup.</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Enable MD5 verification of backup files.</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Use 24-hour clock.</text> - <data variable="tw_military_time" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row6_text_y%" /> - <text>Simulate actions for theme testing.</text> - <data variable="tw_simulate_actions" /> - </object> - - <object type="checkbox"> - <condition var1="tw_simulate_actions" var2="1" /> - <placement x="%col1_x%" y="%row7_text_y%" /> - <text>Simulate failure for actions.</text> - <data variable="tw_simulate_fail" /> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Time Zone</text> - <action function="page">timezone</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>Screen</text> - <action function="page">screen</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Restore Defaults</text> - <action function="restoredefaultsettings"></action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Vibration Duration</text> - <action function="page">Vibrate</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="timezone"> - <object type="template" name="header" /> - - <object type="listbox" style="scrolllist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" /> - <text>Select Time Zone:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_time_zone_guisel" /> - <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem> - <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem> - <listitem name="(UTC -9) Alaska">AST9;ADT</listitem> - <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem> - <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem> - <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem> - <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem> - <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem> - <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem> - <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem> - <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem> - <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem> - <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem> - <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem> - <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem> - <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem> - <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row_dst_text_y%" /> - <text>Do you use daylight savings time (DST)?</text> - <data variable="tw_time_zone_guidst" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row_offset_text_y%" placement="5" /> - <text>Offset (usually 0): %tw_time_zone_guioffset%</text> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col1_medium_x%" y="%row_offset_medium_y%" /> - <text>None</text> - <action function="set">tw_time_zone_guioffset=0</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col2_medium_x%" y="%row_offset_medium_y%" /> - <text>15</text> - <action function="set">tw_time_zone_guioffset=15</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col3_medium_x%" y="%row_offset_medium_y%" /> - <text>30</text> - <action function="set">tw_time_zone_guioffset=30</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col4_medium_x%" y="%row_offset_medium_y%" /> - <text>45</text> - <action function="set">tw_time_zone_guioffset=45</action> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%tz_set_y%" /> - <text>Set Time Zone</text> - <action function="setguitimezone"></action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%tz_current_y%" placement="5" /> - <text>Current Time Zone: %tw_time_zone%</text> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="screen"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Screen Settings</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_screen_timeout_secs" op="=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_false" /> - <action function="set">tw_screen_timeout_secs=60</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_true" /> - <action function="set">tw_screen_timeout_secs=0</action> - </object> - - <object type="slidervalue"> - <conditions> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - </conditions> - <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> - <text>Screen timeout in seconds:</text> - <data variable="tw_screen_timeout_secs" min="15" max="300" /> - </object> - - <object type="slidervalue"> - <condition var1="tw_has_brightnesss_file" var2="1" /> - <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> - <text>Brightness: %tw_brightness_pct%%</text> - <data variable="tw_brightness_pct" min="10" max="100" /> - <actions> - <action function="set">tw_brightness=%tw_brightness_max%</action> - <action function="compute">tw_brightness*%tw_brightness_pct%</action> - <action function="compute">tw_brightness/100</action> - <action function="setbrightness">%tw_brightness%</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="Vibrate"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Vibration Settings :</text> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> - <text>Button Vibration:</text> - <data variable="tw_button_vibrate" min="0" max="300" /> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> - <text>Keyboard Vibration:</text> - <data variable="tw_keyboard_vibrate" min="0" max="300" /> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row12_text_y%" w="%slidervalue_w%" /> - <text>Action Vibration:</text> - <data variable="tw_action_vibrate" min="0" max="500" /> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="advanced"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Advanced</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Copy Log to SD</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=copylog</action> - <action function="set">tw_text1=Copy Log to SD Card?</action> - <action function="set">tw_action_text1=Copying Log to SD Card...</action> - <action function="set">tw_complete_text1=Log Copy Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Fix Permissions</text> - <action function="page">fixperms</action> - </object> - - <object type="button"> - <condition var1="tw_allow_partition_sdcard" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Partition SD Card</text> - <action function="page">partsdcard</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>File Manager</text> - <action function="page">filemanagerlist</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Terminal Emulator</text> - <action function="page">terminalcommand</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>Reload Theme</text> - <action function="reload"></action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>ADB Sideload</text> - <action function="page">sideload</action> - </object> - - <object type="button"> - <condition var1="tw_show_dumlock" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>HTC Dumlock</text> - <action function="page">htcdumlock</action> - </object> - - <object type="button"> - <condition var1="tw_has_injecttwrp" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Re-Inject TWRP</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=reinjecttwrp</action> - <action function="set">tw_text1=Re-Inject TWRP?</action> - <action function="set">tw_action_text1=Re-Injecting TWRP...</action> - <action function="set">tw_complete_text1=TWRP Injection Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="partsdcard"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Partition SD Card</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_sdext_size-128</action> - </object> - - <object type="button"> - <placement x="%sd_plus_x%" y="%row1_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_sdext_size+128</action> - </object> - - <object type="text"> - <placement x="%sdext_text_x%" y="%sdext_text_y%" /> - <text>EXT Size: %tw_sdext_size%</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%sdswap_button_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_swap_size-32</action> - </object> - - <object type="button"> - <placement x="%sd_plus_x%" y="%sdswap_button_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_swap_size+32</action> - </object> - - <object type="text"> - <placement x="%sdswap_text_x%" y="%sdswap_text_y%" /> - <text>Swap Size: %tw_swap_size%</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%sdfilesystem_text_y%" /> - <text>File system: %tw_sdpart_file_system%</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%sdfilesystem_button_y%" /> - <text>EXT3</text> - <action function="set">tw_sdpart_file_system=ext3</action> - </object> - - <object type="button"> - <condition var1="tw_sdext_disable_ext4" var2="0" /> - <placement x="%col2_x%" y="%sdfilesystem_button_y%" /> - <text>EXT4</text> - <action function="set">tw_sdpart_file_system=ext4</action> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row12_text_y%" /> - <text>You will lose all files on your SD card!</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row13_text_y%" /> - <text>This action cannot be undone!</text> - </object> - - <object type="slider"> - <text>Swipe to Partition</text> - <action function="page">partsdcardaction</action> - <actions> - <action function="set">tw_back=partsdcard</action> - <action function="set">tw_action=partitionsd</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=set</action> - <action function="set">tw_action2_param=tw_zip_location=/sdcard</action> - <action function="set">tw_action_text1=Partitioning SD Card...</action> - <action function="set">tw_action_text2=This will take a few minutes.</action> - <action function="set">tw_complete_text1=Partitioning Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="htcdumlock"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>HTC Dumlock</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Restore Original Boot</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockrestoreboot</action> - <action function="set">tw_text1=Restore original boot image?</action> - <action function="set">tw_action_text1=Restoring Original Boot...</action> - <action function="set">tw_complete_text1=Restore Original Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Reflash Recovery</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockreflashrecovery</action> - <action function="set">tw_text1=Reflash recovery to boot?</action> - <action function="set">tw_action_text1=Flashing recovery to boot...</action> - <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Install HTC Dumlock</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=installhtcdumlock</action> - <action function="set">tw_text1=Install HTC dumlock files to ROM?</action> - <action function="set">tw_action_text1=Installing HTC Dumlock...</action> - <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="lock"> - <background color="#000000A0" /> - - <object type="image"> - <image resource="unlock-icon" /> - <placement x="%center_x%" y="%lock_y%" placement="4" /> - </object> - - <object type="slider"> - <text>Swipe to Unlock</text> - <action function="overlay"></action> - </object> - </page> - - <page name="filemanagerlist"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>File Manager: Select a File or Folder</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location1%</text> - <filter folders="1" files="1" /> - <path name="tw_file_location1" default="/" /> - <data name="tw_filename1" /> - <selection name="tw_selection1" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <actions> - <action function="set">tw_fm_type=File</action> - <action function="set">tw_fm_isfolder=0</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="action"> - <condition var1="tw_filename1" op="modified" /> - <actions> - <action function="page">filemanageroptions</action> - </actions> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="set">tw_filename1=tw_file_location1</action> - <action function="set">tw_fm_isfolder=1</action> - <action function="set">tw_fm_type=Folder</action> - <action function="page">filemanageroptions</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanageroptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_type% Selected:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy File</text> - <actions> - <action function="set">tw_filemanager_command=cp</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy Folder</text> - <actions> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && cp -R</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Move</text> - <actions> - <action function="set">tw_filemanager_command=mv</action> - <action function="set">tw_fm_text1=Moving</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>chmod 755</text> - <actions> - <action function="set">tw_filemanager_command=chmod 755</action> - <action function="set">tw_fm_text1=chmod 755</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>chmod</text> - <actions> - <action function="set">tw_filemanager_rename=0000</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerchmod</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_filemanager_command=rm -rf</action> - <action function="set">tw_fm_text1=Deleting</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Rename File</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=mv</action> - <action function="page">filemanagerrenamefile</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Rename Folder</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && mv</action> - <action function="page">filemanagerrenamefolder</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanagerlist</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="choosedestinationfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Browse to Destination Folder & Press Select</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location2%</text> - <filter folders="1" files="0" /> - <path name="tw_file_location2" default="/" /> - <data name="tw_filename2" /> - <selection name="tw_selection2" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_file_location2%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerrenamefile"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3="%tw_file_location1%/%tw_filemanager_rename%"</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerrenamefolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_filemanager_rename%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerchmod"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter New Permissions</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="3" maxlen="4" allow="0123456789" /> - <actions> - <action function="set">tw_filemanager_command=chmod %tw_filemanager_rename%</action> - <action function="set">tw_fm_text1=chmod %tw_filemanager_rename%</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerconfirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>%tw_fm_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5"/> - <text>%tw_fm_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5"/> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <action function="page">filemanageracction</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">%tw_back%</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanageracction"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_fm_text1%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_back=filemanagerlist</action> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="0" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%"</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="1" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%" "%tw_fm_text3%"</action> - </actions> - </object> - </page> - - <page name="decrypt"> - <object type="template" name="header" /> - - <object type="action"> - <condition var1="tw_crypto_pwtype" var2="2" /> - <action function="page">decrypt_pattern</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter Your Password</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_crypto_display%</text> - <data name="tw_crypto_password" mask="*" maskvariable="tw_crypto_display" /> - <restrict minlen="1" maxlen="254" /> - <actions> - <action function="page">trydecrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="template" name="footer" /> - </page> - - <page name="decrypt_pattern"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter Your Pattern</text> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Pattern Failed, Please Try Again</text> - </object> - - <object type="template" name="pattern_options" /> - - <object type="patternpassword"> - <placement x="%pattern_x%" y="%pattern_y%" w="%pattern_width%" h="%pattern_width%" /> - <dot color="%pattern_dot_color%" activecolor="%pattern_dot_color_active%" radius="%pattern_dot_radius%" /> - <line color="%pattern_line_color%" width="%pattern_line_width%" /> - <data name="tw_crypto_password"/> - <action function="page">trydecrypt</action> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%pattern_cancel_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="trydecrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - </page> -<!-- - <page name="terminalfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Browse to Starting Folder</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_terminal_location%</text> - <filter folders="1" files="0" /> - <path name="tw_terminal_location" default="/" /> - <data name="tw_terminal" /> - <selection name="tw_terminal_selection" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="page">terminalcommand</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> ---> - <page name="terminalcommand"> - <object type="template" name="header" /> - - <object type="terminal" style="console"> - <font resource="fixed" spacing="3" color="%text_color%" /> - <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" /> - </object> -<!-- - <object type="text"> - <placement x="%col1_x%" y="%terminal_text_y%" placement="0" /> - <text>Starting Path: %tw_terminal_location%</text> - </object> - - <object type="input"> - <condition var1="tw_terminal_state" var2="0" /> - <placement x="%col1_x%" y="%terminal_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_terminal_command%</text> - <font resource="fixed" color="%text_color%" /> - <data name="tw_terminal_command" /> - <restrict minlen="1" /> - <action function="terminalcommand">%tw_terminal_command%</action> - </object> - <object type="button" style="mediumbutton"> - <condition var1="tw_terminal_state" var2="1" /> - <placement x="%filemanager_select_x%" y="%terminal_button_y%" /> - <text>KILL</text> - <action function="killterminal"></action> - </object> ---> - - <object type="template" name="keyboardtemplate" /> - - <object type="keyboard"> - <placement x="120" y="1840" w="840" h="80" /> - <keymargin x="6" y="6"/> - <background color="#202020"/> - <key-alphanumeric color="#282828" font="keylabel" textcolor="#ffffff"/> - <key-other color="#242424" font="keylabel-small" textcolor="#c0c0c0"/> - <longpress font="keylabel-longpress" textcolor="#808080"/> - <keylabel key="0:k:29" text="Ctrl"/> - <keylabel key="0:c:27" text="Esc"/> - <keylabel key="0:c:9" text="Tab"/> - <keylabel key="0:k:105" text="<"/> - <keylabel key="0:k:108" text="v"/> - <keylabel key="0:k:103" text="^"/> - <keylabel key="0:k:106" text=">"/> - <highlight color="%highlight_color%" /> - <ctrlhighlight color="#E5333380" /> - <layout1> - <keysize height="80" width="120" /> - <row1 key01="120:k:29" key02="120:c:27" long02=":c:3" key03="120:c:9" key04="120:k:105" key05="120:k:108" key06="120:k:103" key07="120:k:106"/> - </layout1> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - </page> - - <page name="sideload"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>ADB Sideload</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Wipe Dalvik Cache.</text> - <data variable="tw_wipe_dalvik" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Wipe Cache.</text> - <data variable="tw_wipe_cache" /> - </object> - - <object type="slider"> - <text>Swipe to Start Sideload</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=adbsideload</action> - <action function="set">tw_action_text1=ADB Sideload</action> - <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action> - <action function="set">tw_complete_text1=ADB Sideload Complete</action> - <action function="set">tw_has_cancel=1</action> - <action function="set">tw_show_reboot=1</action> - <action function="set">tw_cancel_action=adbsideloadcancel</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="fixperms"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Fix Permissions</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Note: Fixing permissions is rarely needed.</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Also fix SELinux contexts</text> - <data variable="tw_fixperms_restorecon" /> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Fixing SELinux contexts may cause</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>your device to not boot properly.</text> - </object> - - <object type="slider"> - <text>Swipe to Fix Permissions</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=fixpermissions</action> - <action function="set">tw_action_text1=Fixing Permissions...</action> - <action function="set">tw_complete_text1=Fix Permissions Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="installsu"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Install SuperSU?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>Your device does not appear to be rooted.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>Install SuperSU now?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5"/> - <text>This will root your device.</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row3_y%" /> - <text>Do Not Install</text> - <action function="set">tw_page_done=1</action> - </object> - - <object type="slider"> - <text>Swipe to Install</text> - <actions> - <action function="set">tw_action=installsu</action> - <action function="set">tw_action_text1=Installing SuperSU</action> - <action function="set">tw_action_text2=</action> - <action function="page">singleaction_page</action> - </actions> - </object> - </page> - - <page name="system_readonly"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Keep System Read Only?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>TWRP can leave your system partition unmodified</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>to make it easier for you to take official updates.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>TWRP will be unable to prevent the stock ROM from</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>replacing TWRP and will not offer to root your device.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>Installing zips or performing adb operations may still</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row7_text_y%" placement="5" /> - <text>modify the system partition.</text> - </object> - - <object type="checkbox"> - <condition var1="tw_is_encrypted" var2="0" /> - <placement x="%col1_x%" y="%row8_text_y%" /> - <text>Never show this screen during boot again</text> - <data variable="tw_never_show_system_ro_page" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row10_text_y%" /> - <text>Keep Read Only</text> - <actions> - <action function="mountsystemtoggle">1</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Allow Modifications</text> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - </pages> -</recovery> diff --git a/gui/devices/watch/res/watch.xml b/gui/devices/watch/res/watch.xml deleted file mode 100644 index 2dc291224..000000000 --- a/gui/devices/watch/res/watch.xml +++ /dev/null @@ -1,3733 +0,0 @@ -<?xml version="1.0"?> - -<recovery> - <styles> - <style name="buttontext"> - <highlight color="%highlight_color%" /> - <font resource="font" color="%button_text_color%" /> - </style> - - <style name="button"> - <style name="buttontext" /> - <image resource="main_button" /> - </style> - - <style name="mediumbutton"> - <style name="buttontext" /> - <image resource="medium_button" /> - </style> - - <style name="fillbutton"> - <style name="buttontext" /> - <fill color="%button_fill_color%" /> - </style> - - <style name="rebootsystem"> - <condition var1="tw_reboot_system" var2="1" /> - <style name="button" /> - <text>Reboot System</text> - <actions> - <action function="set">tw_back=main2</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=system</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </style> - - <style name="scrolllist"> - <highlight color="%fileselector_highlight_color%" /> - <header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" /> - <background color="%fileselector_background%" /> - <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" /> - </style> - - <style name="fileselector"> - <style name="scrolllist" /> - <icon folder="folder_icon" file="file_icon" /> - <sort name="tw_gui_sort_order" /> - </style> - - <style name="patternpassword"> - <size name="tw_gui_pattern_grid_size" default="3" /> - </style> - - <style name="partitionlist"> - <style name="scrolllist" /> - <icon selected="checkbox_true" unselected="checkbox_false" /> - </style> - - <style name="text"> - <font resource="font" color="%text_color%" /> - </style> - - <style name="checkbox"> - <font resource="font" color="%text_color%" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </style> - - <style name="slider"> - <text>Swipe to Confirm</text> - <font resource="font" color="%text_color%" /> - <placement x="%center_x%" y="%slider_y%" placement="5" /> - <resource base="slider" used="slider-used" touch="slider-touch" /> - </style> - - <style name="console"> - <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" /> - <font resource="fixed" /> - <fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" /> - </style> - - <style name="input"> - <background color="%input_background_color%" /> - <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" /> - <font resource="font" color="%text_color%" /> - </style> - - <style name="slidervalue"> - <font resource="font" color="%text_color%" /> - <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" /> - <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%" /> - </style> - </styles> - - <pages> - <page name="main"> - <object type="action"> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="main2"> - <object type="template" name="twrpheader" /> - - <object type="template" name="header" /> - - <object type="button"> - <placement x="%col1_x%" y="%row1_home_y%" /> - <text>Install</text> - <action function="page">install_select</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_home_y%" /> - <text>Wipe</text> - <action function="page">wipe</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_home_y%" /> - <text>Backup</text> - <action function="page">backup</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_home_y%" /> - <text>Restore</text> - <action function="page">restore</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_home_y%" /> - <text>Mount</text> - <action function="page">mount</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_home_y%" /> - <text>Settings</text> - <action function="page">settings</action> - </object> - - - <object type="button"> - <placement x="%col1_x%" y="%row4_home_y%" /> - <text>Advanced</text> - <action function="page">advanced</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_home_y%" /> - <text>Reboot</text> - <action function="page">reboot</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="install_select"> - <object type="template" name="twrpheader" /> - - <object type="template" name="header" /> - - <object type="button"> - <placement x="%col1_x%" y="%row1_home_y%" /> - <text>Install Zips</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_home_y%" /> - <text>Install Images</text> - <action function="page">install_image</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="install"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Select Zip to Install</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%fileselector_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".zip" folders="1" files="1" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <actions> - <action function="queuezip"></action> - <action function="page">flash_confirm</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">install_select</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flash_confirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>This operation may install incompatible</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>software and render your device unusable.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Folder and File:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%" /> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%" /> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>Press back to cancel adding this zip.</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row6_text_y%" /> - <text>Zip file signature verification.</text> - <data variable="tw_signed_zip_verify" /> - </object> - - <object type="checkbox"> - <condition var1="tw_has_injecttwrp" var2="1" /> - <placement x="%col1_x%" y="%row7_text_y%" /> - <text>Inject TWRP after install.</text> - <data variable="tw_inject_after_zip" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>File %tw_zip_queue_count% of max of 10</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <action function="flash">flash_zip</action> - </object> - - <object type="button"> - <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition> - <placement x="%col1_x%" y="%row_queue_y%" /> - <text>Add More Zips</text> - <action function="page">install</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row_queue_y%" /> - <text>Clear Zip Queue</text> - <actions> - <action function="queueclear"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="cancelzip"></action> - <action function="page">install</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - </page> - - <page name="flash_zip"> - <object type="template" name="header" /> - - <object type="console"> - <placement x="%console_x%" y="%row1_y%" w="%console_width%" h="%console_install_height%" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5" /> - <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%"/> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>%tw_filename%</text> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <action function="page">flash_done</action> - </object> - </page> - - <page name="flash_done"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Zip Install Complete</text> - </object> - - <object type="console"> - <placement x="%console_x%" y="%row1_y%" w="%console_width%" h="%console_installdone_height%" /> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Wipe cache/dalvik</text> - <actions> - <action function="set">tw_back=flash_done</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=/cache</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=wipe</action> - <action function="set">tw_action2_param=dalvik</action> - <action function="set">tw_text1=Wipe Cache & Dalvik?</action> - <action function="set">tw_action_text1=Wiping Cache & Dalvik...</action> - <action function="set">tw_complete_text1=Cache & Dalvik Wipe Complete</action> - <action function="set">tw_slider_text=Swipe to Wipe</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button" style="rebootsystem"> - <placement x="%col2_x%" y="%row4_y%" /> - </object> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%zip_status_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%" /> - <placement x="%center_x%" y="%zip_status_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="install_image"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Select Image to Install</text> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=install_image</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_zip_location%</text> - <filter extn=".img" folders="1" files="1" /> - <path name="tw_zip_location" default="/sdcard" /> - <data name="tw_filename" /> - <selection name="tw_file" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <condition var1="tw_filename" op="modified" /> - <action function="page">flashimage_confirm</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">install_select</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="flashimage_confirm"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%flash_list_height%" /> - <text>Select Partition to Flash Image:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_flash_partition" /> - <listtype name="flashimg" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row8_text_y%" placement="5" /> - <text>Folder:</text> - </object> - - <object type="text"> - <font resource="mediumfont" color="%text_color%" /> - <placement x="%center_x%" y="%row9_text_y%" placement="5" /> - <text>%tw_zip_location%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5" /> - <text>File to flash:</text> - </object> - - <object type="text" > - <font resource="mediumfont" color="%text_color%" /> - <placement x="%center_x%" y="%row11_text_y%" placement="5" /> - <text>%tw_file%</text> - </object> - - <object type="slider"> - <text>Swipe to Confirm Flash</text> - <actions> - <action function="set">tw_back=flashimage_confirm</action> - <action function="set">tw_action=flashimage</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action_text1=Flashing Image...</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_complete_text1=Image Flashed</action> - <action function="page">action_page</action> - </actions> - <action function="flashimage"></action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=install_image</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="clear_vars"> - <object type="action"> - <action function="set">tw_operation_state=0</action> - <action function="set">tw_text1=</action> - <action function="set">tw_text2=</action> - <action function="set">tw_text3=</action> - <action function="set">tw_text4=</action> - <action function="set">tw_action_text1=</action> - <action function="set">tw_action_text2=</action> - <action function="set">tw_action_param=</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_action2=</action> - <action function="set">tw_action2_param=</action> - <action function="set">tw_has_cancel=0</action> - <action function="set">tw_cancel_action=</action> - <action function="set">tw_cancel_param=</action> - <action function="set">tw_show_exclamation=0</action> - <action function="set">tw_show_reboot=0</action> - <action function="page">%tw_clear_destination%</action> - </object> - </page> - - <page name="confirm_action"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>%tw_text4%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row15_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <text>%tw_slider_text%</text> - <action function="page">action_page</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - </page> - - <page name="action_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="button" style="mediumbutton"> - <condition var1="tw_has_cancel" var2="1" /> - <placement x="%col_center_medium_x%" y="%row4_y%" /> - <text>Cancel</text> - <action function="%tw_cancel_action%">%tw_cancel_param%</action> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="singleaction_page"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_action_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_action_text2%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_page_done=1</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="0" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_has_action2" var2="1" /> - <actions> - <action function="%tw_action%">%tw_action_param%</action> - <action function="%tw_action2%">%tw_action2_param%</action> - </actions> - </object> - </page> - - <page name="action_complete"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_complete_text1%</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" op="!=" var2="0" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Failed</text> - </object> - - <object type="text"> - <condition var1="tw_operation_status" var2="0" /> - <font resource="font" color="%text_success_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Successful</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_clear_destination=main2</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - </page> - - <page name="filecheck"> - <object type="action"> - <action function="fileexists">%tw_filecheck%</action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_fileexists=1</action> - <action function="page">%tw_existpage%</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="1" /> - </conditions> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">%tw_notexistpage%</action> - </actions> - </object> - </page> - - <page name="rebootcheck"> - <object type="action"> - <condition var1="tw_backup_system_size" op=">=" var2="%tw_min_system%" /> - <action function="reboot">%tw_action_param%</action> - </object> - - <object type="action"> - <condition var1="tw_backup_system_size" op="<" var2="%tw_min_system%" /> - <action function="page">confirm_action</action> - </object> - </page> - - <page name="wipe"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Factory Reset</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Wipes Data, Cache, and Dalvik</text> - </object> - - <object type="text"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>(not including internal storage)</text> - </object> - - <object type="text"> - <conditions> - <condition var1="tw_has_android_secure" var2="1" /> - <condition var1="fileexists" var2="/and-sec" /> - </conditions> - <placement x="%col2_x%" y="%row4_text_y%" placement="1" /> - <text>Android Secure </text> - </object> - - <object type="text"> - <condition var1="tw_has_sdext_partition" var2="1" /> - <placement x="%col2_x%" y="%row4_text_y%" /> - <text> SD-EXT</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>Most of the time this is</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>the only wipe that you need.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row16_text_y%" placement="5" /> - <text>Press back button to cancel.</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%wipe_button_y%" /> - <text>Advanced Wipe</text> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="page">advancedwipe</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_has_data_media" var2="1" /> - <placement x="%col2_x%" y="%wipe_button_y%" /> - <text>Format Data</text> - <actions> - <action function="page">formatdata</action> - </actions> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_has_data_media" var2="0" /> - </conditions> - <placement x="%col2_x%" y="%wipe_button_y%" /> - <text>Wipe Encryption</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Wipe Encryption from Data?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="set">tw_slider_text=Swipe to Format Data</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Factory Reset</text> - <actions> - <action function="set">tw_back=wipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=data</action> - <action function="set">tw_action_text1=Factory Reset...</action> - <action function="set">tw_complete_text1=Factory Reset Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - </page> - - <page name="advancedwipe"> - <object type="template" name="header" /> - - <object type="action"> - <action function="set">tw_wipe_list=</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Wipe Menu</text> - </object> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" /> - <text>Select Partitions to Wipe:</text> - <data name="tw_wipe_list" /> - <listtype name="wipe" /> - </object> - - <object type="slider"> - <text>Swipe to Wipe</text> - <actions> - <action function="set">tw_back=advancedwipe</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=LIST</action> - <action function="set">tw_text1=Wipe Selected Partition(s)?</action> - <action function="set">tw_action_text1=Wiping Partition(s)...</action> - <action function="set">tw_complete_text1=Wipe Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" /> - <text>Repair or Change File System</text> - <actions> - <action function="checkpartitionlist"></action> - <action function="page">checkpartitionlist</action> - </actions> - </object> - - <object type="text"> - <condition var1="partitionlisterror" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%invalid_partition_y%" placement="5" /> - <text>Invalid partition selection</text> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - </page> - - <page name="formatdata"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Format Data will wipe all of your apps,</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>backups, pictures, videos, media, and</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>removes encryption on internal storage.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>This cannot be undone. Press back to cancel.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>Type yes to continue.</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row6_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_confirm_formatdata%</text> - <data name="tw_confirm_formatdata" /> - <restrict minlen="3" maxlen="3" allow="yes" /> - <action function="page">formatdata_confirm</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">wipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="formatdata_confirm"> - <object type="action"> - <condition var1="tw_confirm_formatdata" op="=" var2="yes" /> - <actions> - <action function="set">tw_back=formatdata</action> - <action function="set">tw_action=wipe</action> - <action function="set">tw_action_param=DATAMEDIA</action> - <action function="set">tw_action_text1=Formatting Data...</action> - <action function="set">tw_complete_text1=Data Format Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_confirm_formatdata" op="!=" var2="yes" /> - <action function="page">formatdata</action> - </object> - </page> - - <page name="checkpartitionlist"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">partitionoptions</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="partitionoptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Partition Options for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="!=" var2="0" /> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Present: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_is_present" op="=" var2="0" /> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Present: No</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="!=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Removable: Yes</text> - </object> - - <object type="text"> - <condition var1="tw_partition_removable" op="=" var2="0" /> - <placement x="%col2_x%" y="%row3_text_y%" /> - <text>Removable: No</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Size: %tw_partition_size%MB</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row4_text_y%" /> - <text>Used: %tw_partition_used%MB</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Free: %tw_partition_free%MB</text> - </object> - - <object type="text"> - <placement x="%col2_x%" y="%row5_text_y%" /> - <text>Backup Size: %tw_partition_backup_size%MB</text> - </object> - - <object type="button"> - <condition var1="tw_partition_can_resize" op="=" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Resize</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=resize</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=getpartitiondetails</action> - <action function="set">tw_text1=Resize %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Resizing...</action> - <action function="set">tw_complete_text1=Resize Complete</action> - <action function="set">tw_slider_text=Swipe to Resize</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_can_repair" op="=" var2="1" /> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Repair</text> - <actions> - <action function="set">tw_back=partitionoptions</action> - <action function="set">tw_action=repair</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Repair %tw_partition_name%?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Repairing...</action> - <action function="set">tw_complete_text1=Repair Complete</action> - <action function="set">tw_slider_text=Swipe to Repair</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Change File Sys</text> - <action function="page">selectfilesystem</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advancedwipe</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="refreshfilesystem"> - <object type="action"> - <condition var1="tw_check_partition_list" op="=" var2="1" /> - <actions> - <action function="set">partitionlisterror=0</action> - <action function="getpartitiondetails"></action> - <action function="page">selectfilesystem</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_check_partition_list" op="!=" var2="1" /> - <actions> - <action function="set">partitionlisterror=1</action> - <action function="set">tw_wipe_list=</action> - <action function="page">advancedwipe</action> - </actions> - </object> - </page> - - <page name="selectfilesystem"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Change file system for: %tw_partition_name%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Mount Point: %tw_partition_mount_point%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Current file system: %tw_partition_file_system%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>Proceed with caution!</text> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>EXT2</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext2</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>EXT3</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext3</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_ext" op="=" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>EXT4</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=ext4</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_f2fs" op="=" var2="1" /> - <placement x="%col2_x%" y="%row3_y%" /> - <text>F2FS</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=f2fs</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_vfat" op="=" var2="1" /> - <placement x="%col1_x%" y="%row4_y%" /> - <text>FAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=vfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_partition_exfat" op="=" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>exFAT</text> - <actions> - <action function="set">tw_back=refreshfilesystem</action> - <action function="set">tw_action=changefilesystem</action> - <action function="set">tw_action_param=%tw_partition_mount_point%</action> - <action function="set">tw_action_new_file_system=exfat</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> - <action function="set">tw_text2=</action> - <action function="set">tw_action_text1=Formatting...</action> - <action function="set">tw_complete_text1=Format Complete</action> - <action function="set">tw_slider_text=Swipe to Change</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">partitionoptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backup"> - <object type="template" name="header" /> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Backup Name: %tw_backup_name%</text> - <actions> - <action function="set">tw_fileexists=0</action> - <action function="page">backupname1</action> - </actions> - </object> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%backup_list_y%" w="%listbox_width%" h="%backup_list_height%" /> - <text>Select Partitions to Back Up:</text> - <data name="tw_backup_list" /> - <listtype name="backup" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>More...</text> - <action function="page">backupoptions</action> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=backup</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%backup_button_row1%" /> - <text>Compression</text> - <data variable="tw_use_compression" /> - </object> - - <object type="slider"> - <text>Swipe to Back Up</text> - <action function="page">backup_run</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - </page> - - <page name="backupoptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>More Backup Options</text> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="0" /> - </conditions> - <placement x="%col1_x%" y="%row6_text_y%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>No Encryption</text> - <actions> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <conditions> - <condition var1="tw_include_encrypted_backup" var2="1" /> - <condition var1="tw_encrypt_backup" var2="1" /> - </conditions> - <placement x="%col1_x%" y="%row6_text_y%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Using Encryption</text> - <actions> - <action function="set">tw_password_not_match=0</action> - <action function="page">backupencryption</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%row6_text_y%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Refresh Sizes</text> - <actions> - <action function="refreshsizes"></action> - <action function="page">backupoptions</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=backupotions</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Enable compression.</text> - <data variable="tw_use_compression" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Skip MD5 generation during backup.</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <font resource="font" color="%text_color%" /> - <text>Disable Free Space Check.</text> - <data variable="tw_disable_free_space" /> - <image checked="checkbox_true" unchecked="checkbox_false" /> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backup</action> - </object> - </page> - - <page name="backupname1"> - <object type="action"> - <condition var1="tw_backup_name" op="=" var2="(Auto Generate)" /> - <action function="generatebackupname"></action> - </object> - - <object type="action"> - <action function="page">backupname2</action> - </object> - </page> - - <page name="backupname2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a Backup Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_name%</text> - <data name="tw_backup_name" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_name%</action> - <action function="set">tw_existpage=backupname2</action> - <action function="set">tw_notexistpage=backup</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%" /> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Append Date</text> - <action function="appenddatetobackupname"></action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">main</action> - </actions> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="set">tw_backup_name=(Auto Generate)</action> - <action function="page">backup</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Encrypt your backup?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter A Password:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display%</text> - <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <action function="page">backupencryption2</action> - </object> - - <object type="text"> - <condition var1="tw_password_not_match" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Passwords Do Not Match</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backupoptions</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backupoptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="backupencryption2"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Encrypt your backup?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter Password Again:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_encrypt_display2%</text> - <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">checkbackuppassword</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backupoptions</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">backupoptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="checkbackuppassword"> - <object type="action"> - <condition var1="tw_backup_password2" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=1</action> - <action function="page">backupoptions</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" /> - <actions> - <action function="set">tw_encrypt_backup=0</action> - <action function="set">tw_password_not_match=1</action> - <action function="set">tw_backup_password=</action> - <action function="set">tw_backup_password2=</action> - <action function="set">tw_backup_encrypt_display=</action> - <action function="set">tw_backup_encrypt_display2=</action> - <action function="page">backupencryption</action> - </actions> - </object> - </page> - - <page name="backup_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_file_progress%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - - - <object type="template" name="progress_bar" /> - - <object type="button" style="mediumbutton"> - <placement x="%col_center_medium_x%" y="%row4_y%" /> - <text>Cancel</text> - <actions> - <action function="cancelbackup"></action> - </actions> - </object> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="nandroid">backup</action> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="0" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_cancel_backup" var2="1" /> - <actions> - <action function="set">tw_back=backup</action> - <action function="set">tw_complete_text1=Backup Cancelled</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - </page> - - <page name="restore"> - <object type="template" name="header" /> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>Select Package to Restore:</text> - <filter folders="1" files="0" nav="0" /> - <path name="tw_backups_folder" /> - <data name="tw_restore" default="" /> - <selection name="tw_restore_name" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <condition var1="tw_restore" op="modified" /> - <actions> - <action function="readBackup"></action> - <action function="page">restore_read</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_read"> - <object type="action"> - <condition var1="tw_restore_encrypted" var2="1" /> - <actions> - <action function="set">tw_password_fail=0</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_restore_encrypted" var2="0" /> - <actions> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Backup Encrypted</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Please Enter Your Password:</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_restore_display%</text> - <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" /> - <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" /> - <actions> - <action function="page">try_restore_decrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="try_restore_decrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt_backup"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">restore_decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">restore_select</action> - </actions> - </object> - </page> - - <page name="restore_select"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%restore_list_height%" /> - <text>Restoring: %tw_restore_name%</text> - <data name="tw_restore_list" selectedlist="tw_restore_selected" /> - <listtype name="restore" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Rename Backup</text> - <actions> - <action function="set">tw_backup_rename=</action> - <action function="set">tw_fileexists=0</action> - <action function="page">renamebackup</action> - </actions> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col2_x%" y="%backup_button_row2%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" /> - <text>Delete Backup</text> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf "%tw_restore_name%"</action> - <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Deleting Backup...</action> - <action function="set">tw_complete_text1=Backup Delete Complete</action> - <action function="set">tw_slider_text=Swipe to Delete</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%backup_button_row1%" /> - <text>Enable MD5 verification of backup.</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="slider"> - <text>Swipe to Restore</text> - <action function="page">restore_run</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore</action> - </object> - </page> - - <page name="renamebackup"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New Backup Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_backup_rename%</text> - <data name="tw_backup_rename" /> - <restrict minlen="1" maxlen="64" allow=" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890-_.{}[]" /> - <actions> - <action function="set">tw_back=restore</action> - <action function="set">tw_action=cmd</action> - <action function="set">tw_action_param=cd %tw_backups_folder% && mv "%tw_restore_name%" "%tw_backup_rename%"</action> - <action function="set">tw_text1=Rename Backup?</action> - <action function="set">tw_text2=This cannot be undone!</action> - <action function="set">tw_action_text1=Renaming Backup...</action> - <action function="set">tw_complete_text1=Backup Rename Complete</action> - <action function="set">tw_slider_text=Swipe to Rename</action> - <action function="set">tw_filecheck=%tw_backups_folder%/%tw_backup_rename%</action> - <action function="set">tw_existpage=renamebackup</action> - <action function="set">tw_notexistpage=confirm_action</action> - <action function="page">filecheck</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_fileexists" var2="1" /> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <font resource="font" color="%text_fail_color%" /> - <text>A backup with that name already exists!</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">restore_select</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">restore_select</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="restore_run"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_operation% %tw_partition%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>%tw_size_progress%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <condition var1="tw_operation_state" var2="1" /> - <actions> - <action function="set">tw_back=restore_select</action> - <action function="set">tw_complete_text1=Restore Complete</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <action function="nandroid">restore</action> - </object> - </page> - - <page name="selectstorage"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" /> - <text>Select Storage:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_storage_path" /> - <listtype name="storage" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> - <text>OK</text> - <actions> - <action function="set">tw_clear_destination=%tw_back%</action> - <action function="page">clear_vars</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <actions> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="mount"> - <object type="template" name="header" /> - - <object type="partitionlist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" /> - <text>Select Partitions to Mount:</text> - <listtype name="mount" /> - </object> - - <object type="button" style="fillbutton"> - <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" /> - <text>Storage: %tw_storage_display_name% (%tw_storage_free_size% MB)</text> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">selectstorage</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_has_usb_storage" var2="1" /> - <placement x="%col1_x%" y="row4_y" /> - <text>USB Storage</text> - <action function="page">usb_mount</action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="0" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Enable MTP</text> - <action function="startmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_has_mtp" var2="1" /> - <condition var1="tw_mtp_enabled" var2="1" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Disable MTP</text> - <action function="stopmtp"></action> - </object> - - <object type="button"> - <conditions> - <condition var1="tw_is_encrypted" var2="1" /> - <condition var1="tw_is_decrypted" var2="0" /> - </conditions> - <placement x="%col2_x%" y="row4_y" /> - <text>Decrypt Data</text> - <action function="page">decrypt</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%system_ro_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_false" /> - <action function="mountsystemtoggle">1</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%system_ro_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_mount_system_ro" op="!=" var2="0" /> - <text>Only mount system read-only</text> - <image resource="checkbox_true" /> - <actions> - <action function="set">tw_lifetime_writes=2</action> - <action function="page">system_readonly_check</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_mount"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>USB Storage Mounted</text> - </object> - - <object type="text" color="%text_color%"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <font resource="font" /> - <text>Be sure to safely remove your device</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>from your computer before unmounting!</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Unmount</text> - <action function="page">usb_umount</action> - </object> - - <object type="action"> - <action function="mount">usb</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="usb_umount"> - <object type="action"> - <action function="unmount">usb</action> - </object> - - <object type="action"> - <action function="page">mount</action> - </object> - </page> - - <page name="system_readonly_check"> - <object type="action"> - <action function="checkpartitionlifetimewrites">/system</action> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="1" /> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="page">mount</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_lifetime_writes" var2="0" /> - <actions> - <action function="set">tw_back=mount</action> - <action function="page">system_readonly</action> - </actions> - </object> - </page> - - <page name="reboot"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Reboot Menu</text> - </object> - - <object type="button" style="rebootsystem"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>System</text> - </object> - - <object type="button"> - <condition var1="tw_reboot_poweroff" var2="1" /> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Power Off</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=poweroff</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to power off?</action> - <action function="set">tw_action_text1=Turning Off...</action> - <action function="set">tw_complete_text1=Turning Off...</action> - <action function="set">tw_slider_text=Swipe to Power Off</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_recovery" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Recovery</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=recovery</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_reboot_bootloader" var2="1" /> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Bootloader</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=bootloader</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_download_mode" var2="1" /> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Download</text> - <actions> - <action function="set">tw_back=reboot</action> - <action function="set">tw_action=reboot</action> - <action function="set">tw_action_param=download</action> - <action function="set">tw_has_action2=0</action> - <action function="set">tw_text1=No OS Installed! Are you</action> - <action function="set">tw_text2=sure you wish to reboot?</action> - <action function="set">tw_action_text1=Rebooting...</action> - <action function="set">tw_complete_text1=Rebooting...</action> - <action function="set">tw_slider_text=Swipe to Reboot</action> - <action function="page">rebootcheck</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="settings"> - <object type="template" name="header" /> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row1_header_y%" /> - <text>Zip file signature verification.</text> - <data variable="tw_signed_zip_verify" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row1_text_y%" /> - <text>Use rm -rf instead of formatting.</text> - <data variable="tw_rm_rf" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Skip MD5 generation during backup.</text> - <data variable="tw_skip_md5_generate" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Enable MD5 verification of backup files.</text> - <data variable="tw_skip_md5_check" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Use 24-hour clock.</text> - <data variable="tw_military_time" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>Simulate actions for theme testing.</text> - <data variable="tw_simulate_actions" /> - </object> - - <object type="checkbox"> - <condition var1="tw_simulate_actions" var2="1" /> - <placement x="%col1_x%" y="%row6_text_y%" /> - <text>Simulate failure for actions.</text> - <data variable="tw_simulate_fail" /> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Time Zone</text> - <action function="page">timezone</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>Screen</text> - <action function="page">screen</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Restore Defaults</text> - <action function="restoredefaultsettings"></action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Vibration</text> - <action function="page">vibrate</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="timezone"> - <object type="template" name="header" /> - - <object type="listbox" style="scrolllist"> - <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" /> - <text>Select Time Zone:</text> - <icon selected="radio_true" unselected="radio_false" /> - <data name="tw_time_zone_guisel" /> - <listitem name="(UTC -11) Samoa, Midway Island">BST11;BDT</listitem> - <listitem name="(UTC -10) Hawaii">HST10;HDT</listitem> - <listitem name="(UTC -9) Alaska">AST9;ADT</listitem> - <listitem name="(UTC -8) Pacific Time">PST8;PDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -7) Mountain Time">MST7;MDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -6) Central Time">CST6;CDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -5) Eastern Time">EST5;EDT,M3.2.0,M11.1.0</listitem> - <listitem name="(UTC -4) Atlantic Time">AST4;ADT</listitem> - <listitem name="(UTC -3) Brazil, Buenos Aires">GRNLNDST3;GRNLNDDT</listitem> - <listitem name="(UTC -2) Mid-Atlantic">FALKST2;FALKDT</listitem> - <listitem name="(UTC -1) Azores, Cape Verde">AZOREST1;AZOREDT</listitem> - <listitem name="(UTC 0) London, Dublin, Lisbon">GMT0;BST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +1) Berlin, Brussels, Paris">CET-1;CEST,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET,M3.5.0,M10.5.0</listitem> - <listitem name="(UTC +3) Moscow, Baghdad">SAUST-3;SAUDT</listitem> - <listitem name="(UTC +4) Abu Dhabi, Tbilisi, Muscat">WST-4;WDT</listitem> - <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem> - <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem> - <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem> - <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem> - <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem> - <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem> - <listitem name="(UTC +11) Vladivostok, Solomon Islands">MET-11;METDT</listitem> - <listitem name="(UTC +12) Auckland, Wellington, Fiji">NZST-12;NZDT</listitem> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row_dst_text_y%" /> - <text>Do you use daylight savings time (DST)?</text> - <data variable="tw_time_zone_guidst" /> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row_offset_text_y%" placement="5" /> - <text>Offset (usually 0): %tw_time_zone_guioffset%</text> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col1_medium_x%" y="%row_offset_medium_y%" /> - <text>None</text> - <action function="set">tw_time_zone_guioffset=0</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col2_medium_x%" y="%row_offset_medium_y%" /> - <text>15</text> - <action function="set">tw_time_zone_guioffset=15</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col3_medium_x%" y="%row_offset_medium_y%" /> - <text>30</text> - <action function="set">tw_time_zone_guioffset=30</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%col4_medium_x%" y="%row_offset_medium_y%" /> - <text>45</text> - <action function="set">tw_time_zone_guioffset=45</action> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%tz_set_y%" /> - <text>Set Time Zone</text> - <action function="setguitimezone"></action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%tz_current_y%" placement="5" /> - <text>Current Time Zone: %tw_time_zone%</text> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - </page> - - <page name="screen"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Screen Settings</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_screen_timeout_secs" op="=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_false" /> - <action function="set">tw_screen_timeout_secs=60</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_text_y%" textplacement="6" /> - <font resource="font" color="%text_color%" /> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - <text>Enable screen timeout.</text> - <image resource="checkbox_true" /> - <action function="set">tw_screen_timeout_secs=0</action> - </object> - - <object type="slidervalue"> - <conditions> - <condition var1="tw_screen_timeout_secs" op="!=" var2="0" /> - <condition var1="tw_no_screen_timeout" op="!=" var2="1" /> - </conditions> - <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" /> - <text>Screen timeout in seconds:</text> - <data variable="tw_screen_timeout_secs" min="15" max="300" /> - </object> - - <object type="slidervalue"> - <condition var1="tw_has_brightnesss_file" var2="1" /> - <placement x="col1_x" y="%row8_text_y%" w="%slidervalue_w%" /> - <text>Brightness: %tw_brightness_pct%%</text> - <data variable="tw_brightness_pct" min="10" max="100" /> - <actions> - <action function="set">tw_brightness=%tw_brightness_max%</action> - <action function="compute">tw_brightness*%tw_brightness_pct%</action> - <action function="compute">tw_brightness/100</action> - <action function="setbrightness">%tw_brightness%</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="vibrate"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Vibration Settings :</text> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row1_text_y%" w="%slidervalue_w%" /> - <text>Button Vibration:</text> - <data variable="tw_button_vibrate" min="0" max="300" /> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row5_text_y%" w="%slidervalue_w%" /> - <text>Keyboard Vibration:</text> - <data variable="tw_keyboard_vibrate" min="0" max="300" /> - </object> - - <object type="slidervalue"> - <placement x="col1_x" y="%row9_text_y%" w="%slidervalue_w%" /> - <text>Action Vibration:</text> - <data variable="tw_action_vibrate" min="0" max="500" /> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">settings</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="advanced"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Advanced</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Copy Log to SD</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=copylog</action> - <action function="set">tw_text1=Copy Log to SD Card?</action> - <action function="set">tw_action_text1=Copying Log to SD Card...</action> - <action function="set">tw_complete_text1=Log Copy Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Fix Permissions</text> - <action function="page">fixperms</action> - </object> - - <object type="button"> - <condition var1="tw_allow_partition_sdcard" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Partition SD Card</text> - <action function="page">partsdcard</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>File Manager</text> - <action function="page">filemanagerlist</action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>Terminal Command</text> - <action function="page">terminalfolder</action> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>Reload Theme</text> - <action function="reload"></action> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>ADB Sideload</text> - <action function="page">sideload</action> - </object> - - <object type="button"> - <condition var1="tw_show_dumlock" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>HTC Dumlock</text> - <action function="page">htcdumlock</action> - </object> - - <object type="button"> - <condition var1="tw_has_injecttwrp" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Re-Inject TWRP</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=reinjecttwrp</action> - <action function="set">tw_text1=Re-Inject TWRP?</action> - <action function="set">tw_action_text1=Re-Injecting TWRP...</action> - <action function="set">tw_complete_text1=TWRP Injection Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">main</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="partsdcard"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Partition SD Card</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_sdext_size-128</action> - </object> - - <object type="button"> - <placement x="%sd_plus_x%" y="%row1_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_sdext_size+128</action> - </object> - - <object type="text"> - <placement x="%sdext_text_x%" y="%sdext_text_y%" /> - <text>EXT Size: %tw_sdext_size%</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%sdswap_button_y%" /> - <text></text> - <image resource="minus_button" /> - <action function="addsubtract">tw_swap_size-32</action> - </object> - - <object type="button"> - <placement x="%sd_plus_x%" y="%sdswap_button_y%" /> - <text></text> - <image resource="plus_button" /> - <action function="addsubtract">tw_swap_size+32</action> - </object> - - <object type="text"> - <placement x="%sdswap_text_x%" y="%sdswap_text_y%" /> - <text>Swap Size: %tw_swap_size%</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%sdfilesystem_text_y%" /> - <text>File system: %tw_sdpart_file_system%</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%sdfilesystem_button_y%" /> - <font resource="font" color="%button_text_color%" /> - <text>EXT3</text> - <action function="set">tw_sdpart_file_system=ext3</action> - </object> - - <object type="button"> - <condition var1="tw_sdext_disable_ext4" var2="0" /> - <placement x="%col2_x%" y="%sdfilesystem_button_y%" /> - <text>EXT4</text> - <image resource="main_button" /> - <action function="set">tw_sdpart_file_system=ext4</action> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row10_text_y%" /> - <text>You will lose all files on your SD card!</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row11_text_y%" /> - <text>This action cannot be undone!</text> - </object> - - <object type="slider"> - <text>Swipe to Partition</text> - <actions> - <action function="set">tw_back=partsdcard</action> - <action function="set">tw_action=partitionsd</action> - <action function="set">tw_has_action2=1</action> - <action function="set">tw_action2=set</action> - <action function="set">tw_action2_param=tw_zip_location=/sdcard</action> - <action function="set">tw_action_text1=Partitioning SD Card...</action> - <action function="set">tw_action_text2=This will take a few minutes.</action> - <action function="set">tw_complete_text1=Partitioning Complete</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - </page> - - <page name="htcdumlock"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>HTC Dumlock</text> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row1_y%" /> - <text>Restore Original Boot</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockrestoreboot</action> - <action function="set">tw_text1=Restore original boot image?</action> - <action function="set">tw_action_text1=Restoring Original Boot...</action> - <action function="set">tw_complete_text1=Restore Original Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row1_y%" /> - <text>Reflash Recovery</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=htcdumlockreflashrecovery</action> - <action function="set">tw_text1=Reflash recovery to boot?</action> - <action function="set">tw_action_text1=Flashing recovery to boot...</action> - <action function="set">tw_complete_text1=Recovery Flash to Boot Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Install HTC Dumlock</text> - <actions> - <action function="set">tw_back=htcdumlock</action> - <action function="set">tw_action=installhtcdumlock</action> - <action function="set">tw_text1=Install HTC dumlock files to ROM?</action> - <action function="set">tw_action_text1=Installing HTC Dumlock...</action> - <action function="set">tw_complete_text1=HTC Dumlock Install Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="page">confirm_action</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="lock"> - <background color="#000000A0" /> - - <object type="image"> - <image resource="unlock-icon" /> - <placement x="%center_x%" y="%lock_y%" placement="4" /> - </object> - - <object type="slider"> - <text>Swipe to Unlock</text> - <action function="overlay"></action> - </object> - </page> - - <page name="filemanagerlist"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>File Manager: Select a File or Folder</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location1%</text> - <filter folders="1" files="1" /> - <path name="tw_file_location1" default="/" /> - <data name="tw_filename1" /> - <selection name="tw_selection1" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <actions> - <action function="set">tw_fm_type=File</action> - <action function="set">tw_fm_isfolder=0</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="action"> - <condition var1="tw_filename1" op="modified" /> - <actions> - <action function="page">filemanageroptions</action> - </actions> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="set">tw_filename1=tw_file_location1</action> - <action function="set">tw_fm_isfolder=1</action> - <action function="set">tw_fm_type=Folder</action> - <action function="page">filemanageroptions</action> - </actions> - </object> - </page> - - <page name="filemanageroptions"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_type% Selected:</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy File</text> - <actions> - <action function="set">tw_filemanager_command=cp</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col1_x%" y="%row2_y%" /> - <text>Copy Folder</text> - <actions> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && cp -R</action> - <action function="set">tw_fm_text1=Copying</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row2_y%" /> - <text>Move</text> - <actions> - <action function="set">tw_filemanager_command=mv</action> - <action function="set">tw_fm_text1=Moving</action> - <action function="page">choosedestinationfolder</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row3_y%" /> - <text>chmod 755</text> - <actions> - <action function="set">tw_filemanager_command=chmod 755</action> - <action function="set">tw_fm_text1=chmod 755</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col2_x%" y="%row3_y%" /> - <text>chmod</text> - <actions> - <action function="set">tw_filemanager_rename=0000</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerchmod</action> - </actions> - </object> - - <object type="button"> - <placement x="%col1_x%" y="%row4_y%" /> - <text>Delete</text> - <actions> - <action function="set">tw_filemanager_command=rm -rf</action> - <action function="set">tw_fm_text1=Deleting</action> - <action function="set">tw_fm_text2=</action> - <action function="set">tw_fm_text3=</action> - <action function="set">tw_include_text3=0</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="0" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Rename File</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=mv</action> - <action function="page">filemanagerrenamefile</action> - </actions> - </object> - - <object type="button"> - <condition var1="tw_fm_isfolder" var2="1" /> - <placement x="%col2_x%" y="%row4_y%" /> - <text>Rename Folder</text> - <actions> - <action function="set">tw_filemanager_rename=tw_selection1</action> - <action function="set">tw_fm_text1=Renaming</action> - <action function="set">tw_filemanager_command=cd "%tw_file_location1%" && cd .. && mv</action> - <action function="page">filemanagerrenamefolder</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanagerlist</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="choosedestinationfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Browse to Destination & Press Select</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_file_location2%</text> - <filter folders="1" files="0" /> - <path name="tw_file_location2" default="/" /> - <data name="tw_filename2" /> - <selection name="tw_selection2" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_file_location2%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - </page> - - <page name="filemanagerrenamefile"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3="%tw_file_location1%/%tw_filemanager_rename%"</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerrenamefolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter a New %tw_fm_type% Name</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="1" maxlen="128" /> - <actions> - <action function="set">tw_fm_text2=to</action> - <action function="set">tw_fm_text3=%tw_filemanager_rename%</action> - <action function="set">tw_include_text3=1</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerchmod"> - <object type="template" name="header" /> - - <object type="text" color="%text_color%"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <font resource="font" /> - <text>Please Enter New Permissions</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_filemanager_rename%</text> - <data name="tw_filemanager_rename" /> - <restrict minlen="3" maxlen="4" allow="0123456789" /> - <actions> - <action function="set">tw_filemanager_command=chmod %tw_filemanager_rename%</action> - <action function="set">tw_fm_text1=chmod %tw_filemanager_rename%</action> - <action function="set">tw_back=filemanageroptions</action> - <action function="page">filemanagerconfirm</action> - </actions> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">filemanageroptions</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="filemanagerconfirm"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5"/> - <text>%tw_fm_text1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>%tw_filename1%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>%tw_fm_text2%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5"/> - <text>%tw_fm_text3%</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row10_text_y%" placement="5"/> - <text>Press back button to cancel.</text> - </object> - - <object type="slider"> - <action function="page">filemanageracction</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">%tw_back%</action> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - </page> - - <page name="filemanageracction"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>%tw_fm_text1%</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" var2="0" /> - </conditions> - <actions> - <action function="set">tw_back=filemanagerlist</action> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_complete_text1=File Operation Complete</action> - <action function="page">action_complete</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="0" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%"</action> - </actions> - </object> - - <object type="action"> - <condition var1="tw_include_text3" var2="1" /> - <actions> - <action function="cmd">%tw_filemanager_command% "%tw_filename1%" "%tw_fm_text3%"</action> - </actions> - </object> - </page> - - <page name="decrypt"> - <object type="template" name="header" /> - - <object type="action"> - <condition var1="tw_crypto_pwtype" var2="2" /> - <action function="page">decrypt_pattern</action> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter Your Password</text> - </object> - - <object type="input"> - <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_crypto_display%</text> - <data name="tw_crypto_password" mask="*" maskvariable="tw_crypto_display" /> - <restrict minlen="1" maxlen="254" /> - <actions> - <action function="page">trydecrypt</action> - </actions> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%" /> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>Password Failed, Please Try Again</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row2_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="template" name="footer" /> - </page> - - <page name="decrypt_pattern"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Please Enter Your Pattern</text> - </object> - - <object type="text"> - <condition var1="tw_password_fail" var2="1" /> - <font resource="font" color="%text_fail_color%"/> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Pattern Failed, Please Try Again</text> - </object> - - <object type="template" name="pattern_options" /> - - <object type="patternpassword"> - <placement x="%pattern_x%" y="%pattern_y%" w="%pattern_width%" h="%pattern_width%" /> - <dot color="%pattern_dot_color%" activecolor="%pattern_dot_color_active%" radius="%pattern_dot_radius%" /> - <line color="%pattern_line_color%" width="%pattern_line_width%" /> - <data name="tw_crypto_password"/> - <action function="page">trydecrypt</action> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row4_y%" /> - <text>Cancel</text> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="trydecrypt"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>Trying Decryption with Your Password</text> - </object> - - <object type="template" name="action_page_console" /> - - <object type="template" name="progress_bar" /> - - <object type="action"> - <action function="decrypt"></action> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="!=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_password_fail=1</action> - <action function="page">decrypt</action> - </actions> - </object> - - <object type="action"> - <conditions> - <condition var1="tw_operation_state" var2="1" /> - <condition var1="tw_operation_status" op="=" var2="0" /> - </conditions> - <actions> - <action function="set">tw_page_done=1</action> - <action function="page">main</action> - </actions> - </object> - </page> - - <page name="terminalfolder"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Browse to Starting Folder</text> - </object> - - <object type="fileselector"> - <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" /> - <text>%tw_terminal_location%</text> - <filter folders="1" files="0" /> - <path name="tw_terminal_location" default="/" /> - <data name="tw_terminal" /> - <selection name="tw_terminal_selection" /> - </object> - - <object type="template" name="sort_options" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="button" style="mediumbutton"> - <placement x="%filemanager_select_x%" y="%filemanager_select_y%" /> - <text>Select</text> - <actions> - <action function="page">terminalcommand</action> - </actions> - </object> - </page> - - <page name="terminalcommand"> - <object type="template" name="header" /> - - <object type="console"> - <placement x="%console_x%" y="0" w="%console_width%" h="%terminal_console_height%" /> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%terminal_text_y%" placement="0" /> - <text>Starting Path: %tw_terminal_location%</text> - </object> - - <object type="input"> - <condition var1="tw_terminal_state" var2="0" /> - <placement x="%col1_x%" y="%terminal_text_y%" w="%input_width%" h="%input_height%" placement="0" /> - <text>%tw_terminal_command%</text> - <font resource="fixed" color="%text_color%" /> - <data name="tw_terminal_command" /> - <restrict minlen="1" /> - <action function="terminalcommand">%tw_terminal_command%</action> - </object> - - <object type="button" style="mediumbutton"> - <condition var1="tw_terminal_state" var2="1" /> - <placement x="%filemanager_select_x%" y="%terminal_button_y%" /> - <text>KILL</text> - <action function="killterminal"></action> - </object> - - <object type="template" name="keyboardtemplate" /> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">terminalfolder</action> - </object> - </page> - - <page name="sideload"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>ADB Sideload</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Wipe Dalvik Cache.</text> - <data variable="tw_wipe_dalvik" /> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Wipe Cache.</text> - <data variable="tw_wipe_cache" /> - </object> - - <object type="slider"> - <text>Swipe to Start Sideload</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=adbsideload</action> - <action function="set">tw_action_text1=ADB Sideload</action> - <action function="set">tw_action_text2=Usage: adb sideload filename.zip</action> - <action function="set">tw_complete_text1=ADB Sideload Complete</action> - <action function="set">tw_has_cancel=1</action> - <action function="set">tw_show_reboot=1</action> - <action function="set">tw_cancel_action=adbsideloadcancel</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - </page> - - <page name="fixperms"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Fix Permissions</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row2_text_y%" /> - <text>Note: Fixing permissions is rarely needed.</text> - </object> - - <object type="checkbox"> - <placement x="%col1_x%" y="%row3_text_y%" /> - <text>Also fix SELinux contexts</text> - <data variable="tw_fixperms_restorecon" /> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row4_text_y%" /> - <text>Fixing SELinux contexts may cause</text> - </object> - - <object type="text"> - <placement x="%col1_x%" y="%row5_text_y%" /> - <text>your device to not boot properly.</text> - </object> - - <object type="slider"> - <text>Swipe to Fix Permissions</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=fixpermissions</action> - <action function="set">tw_action_text1=Fixing Permissions...</action> - <action function="set">tw_complete_text1=Fix Permissions Complete</action> - <action function="set">tw_slider_text=Swipe to Confirm</action> - <action function="set">tw_show_reboot=1</action> - <action function="page">action_page</action> - </actions> - </object> - - <object type="action"> - <touch key="home" /> - <action function="page">main</action> - </object> - - <object type="action"> - <touch key="back" /> - <action function="page">advanced</action> - </object> - - <object type="template" name="footer" /> - </page> - - <page name="installsu"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5"/> - <text>Install SuperSU?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5"/> - <text>Your device does not appear to be rooted.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5"/> - <text>Install SuperSU now?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5"/> - <text>This will root your device.</text> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row3_y%" /> - <text>Do Not Install</text> - <action function="set">tw_page_done=1</action> - </object> - - <object type="slider"> - <text>Swipe to Install</text> - <actions> - <action function="set">tw_action=installsu</action> - <action function="set">tw_action_text1=Installing SuperSU</action> - <action function="set">tw_action_text2=</action> - <action function="page">singleaction_page</action> - </actions> - </object> - </page> - - <page name="system_readonly"> - <object type="template" name="header" /> - - <object type="text"> - <placement x="%center_x%" y="%row1_header_y%" placement="5" /> - <text>Keep System Read Only?</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row1_text_y%" placement="5" /> - <text>TWRP can leave your system partition unmodified</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row2_text_y%" placement="5" /> - <text>to make it easier for you to take official updates.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row3_text_y%" placement="5" /> - <text>TWRP will be unable to prevent the stock ROM from</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row4_text_y%" placement="5" /> - <text>replacing TWRP and will not offer to root your device.</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row5_text_y%" placement="5" /> - <text>Installing zips or performing adb operations may still</text> - </object> - - <object type="text"> - <placement x="%center_x%" y="%row6_text_y%" placement="5" /> - <text>modify the system partition.</text> - </object> - - <object type="checkbox"> - <condition var1="tw_is_encrypted" var2="0" /> - <placement x="%col1_x%" y="%row7_text_y%" /> - <text>Never show this screen during boot again</text> - <data variable="tw_never_show_system_ro_page" /> - </object> - - <object type="button"> - <placement x="%col_center_x%" y="%row9_text_y%" /> - <text>Keep Read Only</text> - <actions> - <action function="mountsystemtoggle">1</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - - <object type="slider"> - <text>Swipe to Allow Modifications</text> - <actions> - <action function="mountsystemtoggle">0</action> - <action function="set">tw_page_done=1</action> - <action function="page">%tw_back%</action> - </actions> - </object> - </page> - </pages> -</recovery> diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp index 9275d976d..a992b80ea 100644 --- a/gui/fileselector.cpp +++ b/gui/fileselector.cpp @@ -127,7 +127,7 @@ GUIFileSelector::~GUIFileSelector() int GUIFileSelector::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; GUIScrollList::Update(); @@ -155,7 +155,7 @@ int GUIFileSelector::NotifyVarChange(const std::string& varName, const std::stri { GUIScrollList::NotifyVarChange(varName, value); - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (varName.empty()) { @@ -305,7 +305,6 @@ size_t GUIFileSelector::GetItemCount() void GUIFileSelector::RenderItem(size_t itemindex, int yPos, bool selected) { size_t folderSize = mShowFolders ? mFolderList.size() : 0; - size_t fileSize = mShowFiles ? mFileList.size() : 0; ImageResource* icon; std::string text; diff --git a/gui/fill.cpp b/gui/fill.cpp index d0a1cfda7..3cfbe6ed4 100644 --- a/gui/fill.cpp +++ b/gui/fill.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // fill.cpp - GUIFill object #include <stdarg.h> @@ -42,7 +60,7 @@ GUIFill::GUIFill(xml_node<>* node) : GUIObject(node) int GUIFill::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha); diff --git a/gui/gui.cpp b/gui/gui.cpp index df41939fb..369b6b897 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -83,7 +83,7 @@ static int gRecorder = -1; extern "C" void gr_write_frame_to_file(int fd); -void flip(void) +static void flip(void) { if (gRecorder != -1) { @@ -205,7 +205,9 @@ bool InputHandler::processInput(int timeout_ms) break; } - blankTimer.resetTimerAndUnblank(); + if (ev.code != KEY_POWER && ev.code > KEY_RESERVED) + blankTimer.resetTimerAndUnblank(); + return true; // we got an event, so there might be more in the queue } @@ -300,15 +302,15 @@ void InputHandler::process_EV_KEY(input_event& ev) // Handle key-press here LOGEVENT("TOUCH_KEY: %d\n", ev.code); // Left mouse button is treated as a touch - if(ev.code == BTN_LEFT) + if (ev.code == BTN_LEFT) { MouseCursor *cursor = PageManager::GetMouseCursor(); - if(ev.value == 1) + if (ev.value == 1) { cursor->GetPos(x, y); doTouchStart(); } - else if(touch_status) + else if (touch_status) { // Left mouse button was previously pressed and now is // being released so send a TOUCH_RELEASE @@ -323,9 +325,9 @@ void InputHandler::process_EV_KEY(input_event& ev) } } // side mouse button, often used for "back" function - else if(ev.code == BTN_SIDE) + else if (ev.code == BTN_SIDE) { - if(ev.value == 1) + if (ev.value == 1) kb->KeyDown(KEY_BACK); else kb->KeyUp(KEY_BACK); @@ -366,12 +368,12 @@ void InputHandler::process_EV_REL(input_event& ev) // Mouse movement MouseCursor *cursor = PageManager::GetMouseCursor(); LOGEVENT("EV_REL %d %d\n", ev.code, ev.value); - if(ev.code == REL_X) + if (ev.code == REL_X) cursor->Move(ev.value, 0); - else if(ev.code == REL_Y) + else if (ev.code == REL_Y) cursor->Move(0, ev.value); - if(touch_status) { + if (touch_status) { cursor->GetPos(x, y); LOGEVENT("Mouse TOUCH_DRAG: %d, %d\n", x, y); key_status = KS_NONE; diff --git a/gui/hardwarekeyboard.cpp b/gui/hardwarekeyboard.cpp index 9ca607c0d..68be9065d 100644 --- a/gui/hardwarekeyboard.cpp +++ b/gui/hardwarekeyboard.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // hardwarekeyboard.cpp - HardwareKeyboard object #include <stdarg.h> @@ -19,6 +37,7 @@ extern "C" { #include "../common.h" } +#include "../twcommon.h" #include "objects.hpp" #include <linux/input.h> @@ -343,7 +362,7 @@ static int KeyCodeToChar(int key_code, bool shiftkey, bool ctrlkey) #ifdef _EVENT_LOGGING default: - LOGE("Unmapped keycode: %i\n", key_code); + LOGERR("Unmapped keycode: %i\n", key_code); break; #endif } @@ -366,7 +385,7 @@ bool HardwareKeyboard::IsKeyDown(int key_code) int HardwareKeyboard::KeyDown(int key_code) { #ifdef _EVENT_LOGGING - LOGE("HardwareKeyboard::KeyDown %i\n", key_code); + LOGERR("HardwareKeyboard::KeyDown %i\n", key_code); #endif key_code = TranslateKeyCode(key_code); mPressedKeys.insert(key_code); @@ -392,7 +411,7 @@ int HardwareKeyboard::KeyDown(int key_code) int HardwareKeyboard::KeyUp(int key_code) { #ifdef _EVENT_LOGGING - LOGE("HardwareKeyboard::KeyUp %i\n", key_code); + LOGERR("HardwareKeyboard::KeyUp %i\n", key_code); #endif key_code = TranslateKeyCode(key_code); std::set<int>::iterator itr = mPressedKeys.find(key_code); @@ -406,7 +425,7 @@ int HardwareKeyboard::KeyUp(int key_code) int HardwareKeyboard::KeyRepeat() { #ifdef _EVENT_LOGGING - LOGE("HardwareKeyboard::KeyRepeat: %i\n", mLastKeyChar); + LOGERR("HardwareKeyboard::KeyRepeat: %i\n", mLastKeyChar); #endif if (mLastKeyChar) PageManager::NotifyCharInput(mLastKeyChar); diff --git a/gui/image.cpp b/gui/image.cpp index 2107d5506..2b5c54197 100644 --- a/gui/image.cpp +++ b/gui/image.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // image.cpp - GUIImage object #include <stdarg.h> diff --git a/gui/input.cpp b/gui/input.cpp index ec370abe5..8dd981c24 100644 --- a/gui/input.cpp +++ b/gui/input.cpp @@ -236,7 +236,7 @@ void GUIInput::HandleCursorByTouch(int x) { unsigned index = 0, displaySize = displayValue.size(); int prevX = mRenderX + scrollingX; - for(index = 0; index <= displaySize; index++) { + for (index = 0; index <= displaySize; index++) { cursorString = displayValue.substr(0, index); cursorX = gr_ttf_measureEx(cursorString.c_str(), fontResource) + mRenderX + scrollingX; if (cursorX > x) { @@ -263,7 +263,7 @@ void GUIInput::HandleCursorByTouch(int x) { } void GUIInput::HandleCursorByText() { -// Uses mCursorLocation to find cursorX +// Uses mCursorLocation to find cursorX if (!DrawCursor) return; diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp index 4a78ad798..849cf19d8 100644 --- a/gui/keyboard.cpp +++ b/gui/keyboard.cpp @@ -346,7 +346,6 @@ void GUIKeyboard::DrawKey(Key& key, int keyX, int keyY, int keyW, int keyH) void* fontResource = mLongpressFont->GetResource(); gr_color(mLongpressFontColor.red, mLongpressFontColor.green, mLongpressFontColor.blue, mLongpressFontColor.alpha); string text(1, keychar); - int textH = mLongpressFont->GetHeight(); int textW = gr_ttf_measureEx(text.c_str(), fontResource); int textX = keyX + keyW - longpressOffsetX - textW; int textY = keyY + longpressOffsetY; diff --git a/gui/listbox.cpp b/gui/listbox.cpp index e10fee72a..05276e8ac 100644 --- a/gui/listbox.cpp +++ b/gui/listbox.cpp @@ -123,7 +123,7 @@ GUIListBox::~GUIListBox() int GUIListBox::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; GUIScrollList::Update(); @@ -140,7 +140,7 @@ int GUIListBox::NotifyVarChange(const std::string& varName, const std::string& v { GUIScrollList::NotifyVarChange(varName, value); - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; // Check to see if the variable that we are using to store the list selected value has been updated diff --git a/gui/mousecursor.cpp b/gui/mousecursor.cpp index bd730df6b..b87cac414 100644 --- a/gui/mousecursor.cpp +++ b/gui/mousecursor.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -52,15 +70,15 @@ void MouseCursor::LoadData(xml_node<>* node) xml_node<>* child; child = FindNode(node, "placement"); - if(child) + if (child) LoadPlacement(child, &mRenderX, &mRenderY, &mRenderW, &mRenderH); child = FindNode(node, "background"); - if(child) + if (child) { m_color = LoadAttrColor(child, "color", m_color); m_image = LoadAttrImage(child, "resource"); - if(m_image) + if (m_image) { mRenderW = m_image->GetWidth(); mRenderH = m_image->GetHeight(); @@ -68,20 +86,20 @@ void MouseCursor::LoadData(xml_node<>* node) } child = FindNode(node, "speed"); - if(child) + if (child) { attr = child->first_attribute("multiplier"); - if(attr) + if (attr) m_speedMultiplier = atof(attr->value()); } } int MouseCursor::Render(void) { - if(!m_present) + if (!m_present) return 0; - if(m_image) + if (m_image) { gr_blit(m_image->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY); } @@ -95,15 +113,15 @@ int MouseCursor::Render(void) int MouseCursor::Update(void) { - if(m_present != ev_has_mouse()) + if (m_present != ev_has_mouse()) { m_present = ev_has_mouse(); - if(m_present) + if (m_present) SetRenderPos(m_resX/2, m_resY/2); return 2; } - if(m_present && m_moved) + if (m_present && m_moved) { m_moved = false; return 2; @@ -113,7 +131,7 @@ int MouseCursor::Update(void) int MouseCursor::SetRenderPos(int x, int y, int w, int h) { - if(x == mRenderX && y == mRenderY) + if (x == mRenderX && y == mRenderY) m_moved = true; return RenderObject::SetRenderPos(x, y, w, h); @@ -121,7 +139,7 @@ int MouseCursor::SetRenderPos(int x, int y, int w, int h) void MouseCursor::Move(int deltaX, int deltaY) { - if(deltaX != 0) + if (deltaX != 0) { mRenderX += deltaX*m_speedMultiplier; mRenderX = (std::min)(mRenderX, m_resX); @@ -130,7 +148,7 @@ void MouseCursor::Move(int deltaX, int deltaY) m_moved = true; } - if(deltaY != 0) + if (deltaY != 0) { mRenderY += deltaY*m_speedMultiplier; mRenderY = (std::min)(mRenderY, m_resY); diff --git a/gui/object.cpp b/gui/object.cpp index e7d1bf99b..0cf2ccea6 100644 --- a/gui/object.cpp +++ b/gui/object.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // object.cpp - GUIObject base class #include <stdio.h> @@ -159,7 +177,7 @@ bool GUIObject::UpdateConditions(std::vector<Condition>& conditions, const std:: std::vector<Condition>::iterator iter; for (iter = conditions.begin(); iter != conditions.end(); ++iter) { - if(varNameEmpty && iter->mCompareOp == "modified") + if (varNameEmpty && iter->mCompareOp == "modified") { string val; @@ -172,10 +190,10 @@ bool GUIObject::UpdateConditions(std::vector<Condition>& conditions, const std:: iter->mLastVal = val; } - if(varNameEmpty || iter->mVar1 == varName || iter->mVar2 == varName) + if (varNameEmpty || iter->mVar1 == varName || iter->mVar2 == varName) iter->mLastResult = isConditionTrue(&(*iter)); - if(!iter->mLastResult) + if (!iter->mLastResult) result = false; } return result; diff --git a/gui/objects.hpp b/gui/objects.hpp index 2a95022d3..28ed29cdb 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -42,6 +42,12 @@ using namespace rapidxml; #ifndef TW_Y_OFFSET #define TW_Y_OFFSET 0 #endif +#ifndef TW_W_OFFSET +#define TW_W_OFFSET 0 +#endif +#ifndef TW_H_OFFSET +#define TW_H_OFFSET 0 +#endif class RenderObject { @@ -357,6 +363,7 @@ protected: int checkpartitionlifetimewrites(std::string arg); int mountsystemtoggle(std::string arg); int setlanguage(std::string arg); + int togglebacklight(std::string arg); int twcmd(std::string arg); int setbootslot(std::string arg); int installapp(std::string arg); @@ -1228,8 +1235,6 @@ COLOR LoadAttrColor(xml_node<>* element, const char* attrname, COLOR defaultvalu FontResource* LoadAttrFont(xml_node<>* element, const char* attrname); ImageResource* LoadAttrImage(xml_node<>* element, const char* attrname); AnimationResource* LoadAttrAnimation(xml_node<>* element, const char* attrname); - bool LoadPlacement(xml_node<>* node, int* x, int* y, int* w = NULL, int* h = NULL, Placement* placement = NULL); #endif // _OBJECTS_HEADER - diff --git a/gui/pages.cpp b/gui/pages.cpp index b6b72966a..b2a978f4d 100644 --- a/gui/pages.cpp +++ b/gui/pages.cpp @@ -51,7 +51,9 @@ extern "C" { #include "objects.hpp" #include "blanktimer.hpp" -#define TW_THEME_VERSION 1 +// version 2 requires theme to handle power button as action togglebacklight +#define TW_THEME_VERSION 2 + #define TW_THEME_VER_ERR -2 extern int gGuiRunning; @@ -71,6 +73,8 @@ std::vector<language_struct> Language_List; int tw_x_offset = 0; int tw_y_offset = 0; +int tw_w_offset = 0; +int tw_h_offset = 0; // Helper routine to convert a string to a color declaration int ConvertStrToColor(std::string str, COLOR* color) @@ -895,16 +899,17 @@ int PageSet::LoadDetails(LoadingContext& ctx, xml_node<>* root) } #endif if (width != 0 && height != 0) { - float scale_w = ((float)gr_fb_width() - ((float)offx * 2.0)) / (float)width; - float scale_h = ((float)gr_fb_height() - ((float)offy * 2.0)) / (float)height; + float scale_w = (((float)gr_fb_width() + (float)tw_w_offset) - ((float)offx * 2.0)) / (float)width; + float scale_h = (((float)gr_fb_height() + (float)tw_h_offset) - ((float)offy * 2.0)) / (float)height; #ifdef TW_ROUND_SCREEN - float scale_off_w = (float)gr_fb_width() / (float)width; - float scale_off_h = (float)gr_fb_height() / (float)height; + float scale_off_w = ((float)gr_fb_width() + (float)tw_w_offset) / (float)width; + float scale_off_h = ((float)gr_fb_height() + (float)tw_h_offset) / (float)height; tw_x_offset = offx * scale_off_w; tw_y_offset = offy * scale_off_h; #endif if (scale_w != 1 || scale_h != 1) { - LOGINFO("Scaling theme width %fx and height %fx, offsets x: %i y: %i\n", scale_w, scale_h, tw_x_offset, tw_y_offset); + LOGINFO("Scaling theme width %fx and height %fx, offsets x: %i y: %i w: %i h: %i\n", + scale_w, scale_h, tw_x_offset, tw_y_offset, tw_w_offset, tw_h_offset); set_scale_values(scale_w, scale_h); } } @@ -1006,7 +1011,7 @@ int PageSet::LoadVariables(xml_node<>* vars) name = child->first_attribute("name"); value = child->first_attribute("value"); persist = child->first_attribute("persist"); - if(name && value) + if (name && value) { if (strcmp(name->value(), "tw_x_offset") == 0) { tw_x_offset = atoi(value->value()); @@ -1018,6 +1023,16 @@ int PageSet::LoadVariables(xml_node<>* vars) child = child->next_sibling("variable"); continue; } + if (strcmp(name->value(), "tw_w_offset") == 0) { + tw_w_offset = atoi(value->value()); + child = child->next_sibling("variable"); + continue; + } + if (strcmp(name->value(), "tw_h_offset") == 0) { + tw_h_offset = atoi(value->value()); + child = child->next_sibling("variable"); + continue; + } p = persist ? atoi(persist->value()) : 0; string temp = value->value(); string valstr = gui_parse_text(temp); @@ -1180,7 +1195,7 @@ char* PageManager::LoadFileToBuffer(std::string filename, ZipArchive* package) { // We can try to load the XML directly... LOGINFO("PageManager::LoadFileToBuffer loading filename: '%s' directly\n", filename.c_str()); struct stat st; - if(stat(filename.c_str(),&st) != 0) { + if (stat(filename.c_str(),&st) != 0) { // This isn't always an error, sometimes we request files that don't exist. return NULL; } @@ -1340,6 +1355,8 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string LOGINFO("Load XML directly\n"); tw_x_offset = TW_X_OFFSET; tw_y_offset = TW_Y_OFFSET; + tw_w_offset = TW_W_OFFSET; + tw_h_offset = TW_H_OFFSET; if (name != "splash") { LoadLanguageList(NULL); languageFile = LoadFileToBuffer(TWRES "languages/en.xml", NULL); @@ -1351,6 +1368,8 @@ int PageManager::LoadPackage(std::string name, std::string package, std::string LOGINFO("Loading zip theme\n"); tw_x_offset = 0; tw_y_offset = 0; + tw_w_offset = 0; + tw_h_offset = 0; if (!TWFunc::Path_Exists(package)) return -1; if (sysMapFile(package.c_str(), &map) != 0) { @@ -1454,7 +1473,7 @@ int PageManager::ReloadPackage(std::string name, std::string package) if (iter == mPageSets.end()) return -1; - if(mMouseCursor) + if (mMouseCursor) mMouseCursor->ResetData(gr_fb_width(), gr_fb_height()); PageSet* set = (*iter).second; @@ -1572,18 +1591,18 @@ int PageManager::IsCurrentPage(Page* page) int PageManager::Render(void) { - if(blankTimer.isScreenOff()) + if (blankTimer.isScreenOff()) return 0; int res = (mCurrentSet ? mCurrentSet->Render() : -1); - if(mMouseCursor) + if (mMouseCursor) mMouseCursor->Render(); return res; } HardwareKeyboard *PageManager::GetHardwareKeyboard() { - if(!mHardwareKeyboard) + if (!mHardwareKeyboard) mHardwareKeyboard = new HardwareKeyboard(); return mHardwareKeyboard; } @@ -1613,14 +1632,14 @@ xml_node<>* PageManager::FindStyle(std::string name) MouseCursor *PageManager::GetMouseCursor() { - if(!mMouseCursor) + if (!mMouseCursor) mMouseCursor = new MouseCursor(gr_fb_width(), gr_fb_height()); return mMouseCursor; } void PageManager::LoadCursorData(xml_node<>* node) { - if(!mMouseCursor) + if (!mMouseCursor) mMouseCursor = new MouseCursor(gr_fb_width(), gr_fb_height()); mMouseCursor->LoadData(node); @@ -1628,7 +1647,7 @@ void PageManager::LoadCursorData(xml_node<>* node) int PageManager::Update(void) { - if(blankTimer.isScreenOff()) + if (blankTimer.isScreenOff()) return 0; if (RunReload()) @@ -1636,10 +1655,10 @@ int PageManager::Update(void) int res = (mCurrentSet ? mCurrentSet->Update() : -1); - if(mMouseCursor) + if (mMouseCursor) { int c_res = mMouseCursor->Update(); - if(c_res > res) + if (c_res > res) res = c_res; } return res; diff --git a/gui/pages.hpp b/gui/pages.hpp index 4bfd5b0e5..1e71b10e0 100644 --- a/gui/pages.hpp +++ b/gui/pages.hpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // pages.hpp - Base classes for page manager of GUI #ifndef _PAGES_HEADER_HPP diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp index ff207fa9a..c85339152 100644 --- a/gui/partitionlist.cpp +++ b/gui/partitionlist.cpp @@ -79,7 +79,7 @@ GUIPartitionList::~GUIPartitionList() int GUIPartitionList::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; // Check for changes in mount points if the list type is mount and update the list and render if needed @@ -99,10 +99,8 @@ int GUIPartitionList::Update(void) GUIScrollList::Update(); if (updateList) { - int listSize = 0; - - // Completely update the list if needed -- Used primarily for - // restore as the list for restore will change depending on what + // Completely update the list if needed -- Used primarily for + // restore as the list for restore will change depending on what // partitions were backed up mList.clear(); PartitionManager.Get_Partition_List(ListType, &mList); @@ -126,7 +124,7 @@ int GUIPartitionList::NotifyVarChange(const std::string& varName, const std::str { GUIScrollList::NotifyVarChange(varName, value); - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (varName == mVariable && !mUpdate) diff --git a/gui/patternpassword.cpp b/gui/patternpassword.cpp index ab446b9f0..c31737f32 100644 --- a/gui/patternpassword.cpp +++ b/gui/patternpassword.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -54,7 +72,7 @@ GUIPatternPassword::GUIPatternPassword(xml_node<>* node) mAction = new GUIAction(node); child = FindNode(node, "dot"); - if(child) + if (child) { mDotColor = LoadAttrColor(child, "color", mDotColor); mActiveDotColor = LoadAttrColor(child, "activecolor", mActiveDotColor); @@ -65,18 +83,18 @@ GUIPatternPassword::GUIPatternPassword(xml_node<>* node) } child = FindNode(node, "line"); - if(child) + if (child) { mLineColor = LoadAttrColor(child, "color", mLineColor); mLineWidth = LoadAttrIntScaleX(child, "width", mLineWidth); } child = FindNode(node, "data"); - if(child) + if (child) mPassVar = LoadAttrString(child, "name", ""); child = FindNode(node, "size"); - if(child) { + if (child) { mSizeVar = LoadAttrString(child, "name", ""); // Use the configured default, if set. @@ -84,7 +102,7 @@ GUIPatternPassword::GUIPatternPassword(xml_node<>* node) Resize(size); } - if(!mDotImage || !mDotImage->GetResource() || !mActiveDotImage || !mActiveDotImage->GetResource()) + if (!mDotImage || !mDotImage->GetResource() || !mActiveDotImage || !mActiveDotImage->GetResource()) { mDotCircle = gr_render_circle(mDotRadius, mDotColor.red, mDotColor.green, mDotColor.blue, mDotColor.alpha); mActiveDotCircle = gr_render_circle(mDotRadius/2, mActiveDotColor.red, mActiveDotColor.green, mActiveDotColor.blue, mActiveDotColor.alpha); @@ -104,10 +122,10 @@ GUIPatternPassword::~GUIPatternPassword() delete[] mDots; delete[] mConnectedDots; - if(mDotCircle) + if (mDotCircle) gr_free_surface(mDotCircle); - if(mActiveDotCircle) + if (mActiveDotCircle) gr_free_surface(mActiveDotCircle); } @@ -115,7 +133,7 @@ void GUIPatternPassword::ResetActiveDots() { mConnectedDotsLen = 0; mCurLineX = mCurLineY = -1; - for(size_t i = 0; i < mGridSize * mGridSize; ++i) + for (size_t i = 0; i < mGridSize * mGridSize; ++i) mDots[i].active = false; } @@ -155,9 +173,9 @@ void GUIPatternPassword::CalculateDotPositions(void) * n*n-1 */ - for(size_t r = 0; r < mGridSize; ++r) + for (size_t r = 0; r < mGridSize; ++r) { - for(size_t c = 0; c < mGridSize; ++c) + for (size_t c = 0; c < mGridSize; ++c) { mDots[mGridSize*r + c].x = x; mDots[mGridSize*r + c].y = y; @@ -170,29 +188,29 @@ void GUIPatternPassword::CalculateDotPositions(void) int GUIPatternPassword::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; gr_color(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha); - for(size_t i = 1; i < mConnectedDotsLen; ++i) { + for (size_t i = 1; i < mConnectedDotsLen; ++i) { const Dot& dp = mDots[mConnectedDots[i-1]]; const Dot& dc = mDots[mConnectedDots[i]]; gr_line(dp.x + mDotRadius, dp.y + mDotRadius, dc.x + mDotRadius, dc.y + mDotRadius, mLineWidth); } - if(mConnectedDotsLen > 0 && mTrackingTouch) { + if (mConnectedDotsLen > 0 && mTrackingTouch) { const Dot& dc = mDots[mConnectedDots[mConnectedDotsLen-1]]; gr_line(dc.x + mDotRadius, dc.y + mDotRadius, mCurLineX, mCurLineY, mLineWidth); } - for(size_t i = 0; i < mGridSize * mGridSize; ++i) { - if(mDotCircle) { + for (size_t i = 0; i < mGridSize * mGridSize; ++i) { + if (mDotCircle) { gr_blit(mDotCircle, 0, 0, gr_get_width(mDotCircle), gr_get_height(mDotCircle), mDots[i].x, mDots[i].y); - if(mDots[i].active) { + if (mDots[i].active) { gr_blit(mActiveDotCircle, 0, 0, gr_get_width(mActiveDotCircle), gr_get_height(mActiveDotCircle), mDots[i].x + mDotRadius/2, mDots[i].y + mDotRadius/2); } } else { - if(mDots[i].active) { + if (mDots[i].active) { gr_blit(mActiveDotImage->GetResource(), 0, 0, mActiveDotImage->GetWidth(), mActiveDotImage->GetHeight(), mDots[i].x + (mDotRadius - mActiveDotImage->GetWidth()/2), mDots[i].y + (mDotRadius - mActiveDotImage->GetHeight()/2)); } else { @@ -205,7 +223,7 @@ int GUIPatternPassword::Render(void) int GUIPatternPassword::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; int res = mNeedRender ? 2 : 1; @@ -214,7 +232,7 @@ int GUIPatternPassword::Update(void) } void GUIPatternPassword::Resize(size_t n) { - if(mGridSize == n) + if (mGridSize == n) return; delete[] mDots; @@ -247,8 +265,8 @@ static bool IsInCircle(int x, int y, int ox, int oy, int r) int GUIPatternPassword::InDot(int x, int y) { - for(size_t i = 0; i < mGridSize * mGridSize; ++i) { - if(IsInCircle(x, y, mDots[i].x + mDotRadius, mDots[i].y + mDotRadius, mDotRadius*3)) + for (size_t i = 0; i < mGridSize * mGridSize; ++i) { + if (IsInCircle(x, y, mDots[i].x + mDotRadius, mDots[i].y + mDotRadius, mDotRadius*3)) return i; } return -1; @@ -256,8 +274,8 @@ int GUIPatternPassword::InDot(int x, int y) bool GUIPatternPassword::DotUsed(int dot_idx) { - for(size_t i = 0; i < mConnectedDotsLen; ++i) { - if(mConnectedDots[i] == dot_idx) + for (size_t i = 0; i < mConnectedDotsLen; ++i) { + if (mConnectedDots[i] == dot_idx) return true; } return false; @@ -265,7 +283,7 @@ bool GUIPatternPassword::DotUsed(int dot_idx) void GUIPatternPassword::ConnectDot(int dot_idx) { - if(mConnectedDotsLen >= mGridSize * mGridSize) + if (mConnectedDotsLen >= mGridSize * mGridSize) { LOGERR("mConnectedDots in GUIPatternPassword has overflown!\n"); return; @@ -277,7 +295,7 @@ void GUIPatternPassword::ConnectDot(int dot_idx) void GUIPatternPassword::ConnectIntermediateDots(int next_dot_idx) { - if(mConnectedDotsLen == 0) + if (mConnectedDotsLen == 0) return; const int prev_dot_idx = mConnectedDots[mConnectedDotsLen-1]; @@ -311,15 +329,15 @@ void GUIPatternPassword::ConnectIntermediateDots(int next_dot_idx) int Dy = (ny > py) ? 1 : -1; // Vertical lines. - if(px == nx) + if (px == nx) Dx = 0; // Horizontal lines. - else if(py == ny) + else if (py == ny) Dy = 0; // Diagonal lines (|∆x| = |∆y|). - else if(abs(px - nx) == abs(py - ny)) + else if (abs(px - nx) == abs(py - ny)) ; // No valid intermediate dots. @@ -327,19 +345,19 @@ void GUIPatternPassword::ConnectIntermediateDots(int next_dot_idx) return; // Iterate along axis, adding dots in the correct order. - while((Dy == 0 || y != ny - Dy) && (Dx == 0 || x != nx - Dx)) { + while ((Dy == 0 || y != ny - Dy) && (Dx == 0 || x != nx - Dx)) { x += Dx; y += Dy; int idx = mGridSize * y + x; - if(!DotUsed(idx)) + if (!DotUsed(idx)) ConnectDot(idx); } } int GUIPatternPassword::NotifyTouch(TOUCH_STATE state, int x, int y) { - if(!isConditionTrue()) + if (!isConditionTrue()) return -1; switch (state) @@ -347,7 +365,7 @@ int GUIPatternPassword::NotifyTouch(TOUCH_STATE state, int x, int y) case TOUCH_START: { const int dot_idx = InDot(x, y); - if(dot_idx == -1) + if (dot_idx == -1) break; mTrackingTouch = true; @@ -361,11 +379,11 @@ int GUIPatternPassword::NotifyTouch(TOUCH_STATE state, int x, int y) } case TOUCH_DRAG: { - if(!mTrackingTouch) + if (!mTrackingTouch) break; const int dot_idx = InDot(x, y); - if(dot_idx != -1 && !DotUsed(dot_idx)) + if (dot_idx != -1 && !DotUsed(dot_idx)) { ConnectIntermediateDots(dot_idx); ConnectDot(dot_idx); @@ -379,7 +397,7 @@ int GUIPatternPassword::NotifyTouch(TOUCH_STATE state, int x, int y) } case TOUCH_RELEASE: { - if(!mTrackingTouch) + if (!mTrackingTouch) break; mNeedRender = true; @@ -396,10 +414,10 @@ int GUIPatternPassword::NotifyTouch(TOUCH_STATE state, int x, int y) int GUIPatternPassword::NotifyVarChange(const std::string& varName, const std::string& value) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; - if(varName == mSizeVar) { + if (varName == mSizeVar) { Resize(atoi(value.c_str())); mUpdate = true; } @@ -420,8 +438,8 @@ static unsigned int getSDKVersion(void) { std::string GUIPatternPassword::GeneratePassphrase() { char pattern[mConnectedDotsLen]; - for(size_t i = 0; i < mConnectedDotsLen; i++) { - pattern[i] = (char) mConnectedDots[i]; + for (size_t i = 0; i < mConnectedDotsLen; i++) { + pattern[i] = (char) mConnectedDots[i]; } std::stringstream pass; @@ -461,9 +479,9 @@ std::string GUIPatternPassword::GeneratePassphrase() void GUIPatternPassword::PatternDrawn() { - if(!mPassVar.empty() && mConnectedDotsLen > 0) + if (!mPassVar.empty() && mConnectedDotsLen > 0) DataManager::SetValue(mPassVar, GeneratePassphrase()); - if(mAction) + if (mAction) mAction->doActions(); } diff --git a/gui/progressbar.cpp b/gui/progressbar.cpp index fc2a4976c..56ce48091 100644 --- a/gui/progressbar.cpp +++ b/gui/progressbar.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // progressbar.cpp - GUIProgressBar object #include <stdarg.h> @@ -67,7 +85,7 @@ GUIProgressBar::GUIProgressBar(xml_node<>* node) : GUIObject(node) int GUIProgressBar::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; // This handles making sure timing updates occur @@ -90,7 +108,7 @@ int GUIProgressBar::RenderInternal(void) int GUIProgressBar::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; std::string str; @@ -165,7 +183,7 @@ int GUIProgressBar::NotifyVarChange(const std::string& varName, const std::strin { GUIObject::NotifyVarChange(varName, value); - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; static int nextPush = 0; diff --git a/gui/resources.cpp b/gui/resources.cpp index 8884dd796..bd71d50b0 100644 --- a/gui/resources.cpp +++ b/gui/resources.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // resource.cpp - Source to manage GUI resources #include <stdarg.h> @@ -124,7 +142,7 @@ void FontResource::LoadFont(xml_node<>* node, ZipArchive* pZip) file = attr->value(); - if(file.size() >= 4 && file.compare(file.size()-4, 4, ".ttf") == 0) + if (file.size() >= 4 && file.compare(file.size()-4, 4, ".ttf") == 0) { int font_size = 0; @@ -144,7 +162,7 @@ void FontResource::LoadFont(xml_node<>* node, ZipArchive* pZip) int dpi = 300; attr = node->first_attribute("dpi"); - if(attr) + if (attr) dpi = atoi(attr->value()); // we can't use TMP_RESOURCE_NAME here because the ttf subsystem is caching the name and scaling needs to reload the font @@ -166,10 +184,10 @@ void FontResource::LoadFont(xml_node<>* node, ZipArchive* pZip) } void FontResource::DeleteFont() { - if(mFont) + if (mFont) gr_ttf_freeFont(mFont); mFont = NULL; - if(origFont) + if (origFont) gr_ttf_freeFont(origFont); origFont = NULL; } diff --git a/gui/resources.hpp b/gui/resources.hpp index 528fecc14..2d3067667 100644 --- a/gui/resources.hpp +++ b/gui/resources.hpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // resources.hpp - Base classes for resource management of GUI #ifndef _RESOURCE_HEADER diff --git a/gui/scrolllist.cpp b/gui/scrolllist.cpp index 291b3820b..7540356bf 100644 --- a/gui/scrolllist.cpp +++ b/gui/scrolllist.cpp @@ -190,7 +190,7 @@ void GUIScrollList::SetVisibleListLocation(size_t list_index) int GUIScrollList::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; // First step, fill background @@ -352,7 +352,7 @@ void GUIScrollList::RenderStdItem(int yPos, bool selected, ImageResource* icon, int GUIScrollList::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (!mHeaderIsStatic) { @@ -421,7 +421,7 @@ size_t GUIScrollList::HitTestItem(int x __unused, int y) int GUIScrollList::NotifyTouch(TOUCH_STATE state, int x, int y) { - if(!isConditionTrue()) + if (!isConditionTrue()) return -1; switch (state) @@ -524,7 +524,7 @@ void GUIScrollList::HandleScrolling() { // handle dragging downward, scrolling upward // the offset should always be <= 0 and > -actualItemHeight, adjust the first display row and offset as needed - while(firstDisplayedItem && y_offset > 0) { + while (firstDisplayedItem && y_offset > 0) { firstDisplayedItem--; y_offset -= actualItemHeight; } @@ -569,7 +569,7 @@ int GUIScrollList::NotifyVarChange(const std::string& varName, const std::string { GUIObject::NotifyVarChange(varName, value); - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (!mHeaderIsStatic) { @@ -624,7 +624,7 @@ bool GUIScrollList::AddLines(std::vector<std::string>* origText, std::vector<std string curr_color; if (origColor) curr_color = origColor->at(i); - for(;;) { + for (;;) { size_t line_char_width = gr_ttf_maxExW(curr_line.c_str(), mFont->GetResource(), mRenderW); if (line_char_width < curr_line.size()) { //string left = curr_line.substr(0, line_char_width); diff --git a/gui/slider.cpp b/gui/slider.cpp index 59b295bd0..ed5c615ce 100644 --- a/gui/slider.cpp +++ b/gui/slider.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // slider.cpp - GUISlider object // Pulled & ported from https://raw.github.com/agrabren/RecoverWin/master/gui/slider.cpp @@ -108,7 +126,7 @@ GUISlider::~GUISlider() int GUISlider::Render(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (!sSlider || !sSlider->GetResource()) @@ -136,7 +154,7 @@ int GUISlider::Render(void) int GUISlider::Update(void) { - if(!isConditionTrue()) + if (!isConditionTrue()) return 0; if (sUpdate) @@ -146,7 +164,7 @@ int GUISlider::Update(void) int GUISlider::NotifyTouch(TOUCH_STATE state, int x, int y) { - if(!isConditionTrue()) + if (!isConditionTrue()) return -1; static bool dragging = false; diff --git a/gui/slidervalue.cpp b/gui/slidervalue.cpp index 088620a21..6f007e23b 100644 --- a/gui/slidervalue.cpp +++ b/gui/slidervalue.cpp @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + // slidervalue.cpp - GUISliderValue object #include <stdarg.h> @@ -62,7 +80,7 @@ GUISliderValue::GUISliderValue(xml_node<>* node) : GUIObject(node) } mLabel = new GUIText(node); - if(mLabel->Render() < 0) + if (mLabel->Render() < 0) { delete mLabel; mLabel = NULL; @@ -156,7 +174,7 @@ GUISliderValue::GUISliderValue(xml_node<>* node) : GUIObject(node) mFontHeight = mFont->GetHeight(); - if(mShowCurr) + if (mShowCurr) { int maxLen = std::max(strlen(mMinStr.c_str()), strlen(mMaxStr.c_str())); mValueStr = new char[maxLen+1]; @@ -182,10 +200,10 @@ GUISliderValue::~GUISliderValue() void GUISliderValue::loadValue(bool force) { - if(!mVariable.empty()) + if (!mVariable.empty()) { int value = DataManager::GetIntValue(mVariable); - if(mValue == value && !force) + if (mValue == value && !force) return; mValue = value; @@ -208,7 +226,7 @@ int GUISliderValue::SetRenderPos(int x, int y, int w, int h) } mRenderH = mSliderH; - if(mShowCurr) + if (mShowCurr) mRenderH += mFontHeight; if (mLabel) @@ -230,7 +248,7 @@ int GUISliderValue::SetRenderPos(int x, int y, int w, int h) mActionW = mRenderW; mActionH = mRenderH; - if(mBackgroundImage && mBackgroundImage->GetResource()) + if (mBackgroundImage && mBackgroundImage->GetResource()) { mLineW = mBackgroundImage->GetWidth(); mLineH = mBackgroundImage->GetHeight(); @@ -260,7 +278,7 @@ int GUISliderValue::Render(void) return 0; } - if(mLabel) + if (mLabel) { int w, h; mLabel->GetCurrentBounds(w, h); @@ -270,12 +288,12 @@ int GUISliderValue::Render(void) mLabel->SetRenderPos(textX, mRenderY); } int res = mLabel->Render(); - if(res < 0) + if (res < 0) return res; } // line - if(mBackgroundImage && mBackgroundImage->GetResource()) + if (mBackgroundImage && mBackgroundImage->GetResource()) { gr_blit(mBackgroundImage->GetResource(), 0, 0, mLineW, mLineH, mLineX, mLineY); } @@ -288,10 +306,10 @@ int GUISliderValue::Render(void) // slider uint32_t sliderX = mLineX + (mValuePct*(mLineW - mSliderW))/100; - if(mHandleImage && mHandleImage->GetResource()) + if (mHandleImage && mHandleImage->GetResource()) { gr_surface s = mHandleImage->GetResource(); - if(mDragging && mHandleHoverImage && mHandleHoverImage->GetResource()) + if (mDragging && mHandleHoverImage && mHandleHoverImage->GetResource()) s = mHandleHoverImage->GetResource(); gr_blit(s, 0, 0, mSliderW, mSliderH, sliderX, mLineY + (mLineH/2 - mSliderH/2)); } @@ -302,16 +320,16 @@ int GUISliderValue::Render(void) } void *fontResource = NULL; - if(mFont) fontResource = mFont->GetResource(); + if (mFont) fontResource = mFont->GetResource(); gr_color(mTextColor.red, mTextColor.green, mTextColor.blue, mTextColor.alpha); - if(mShowRange) + if (mShowRange) { int rangeY = (mLineY - mLineH/2) - mFontHeight/2; gr_textEx_scaleW(mRenderX + mPadding/2, rangeY, mMinStr.c_str(), fontResource, mRenderW, TOP_LEFT, 0); gr_textEx_scaleW(mLineX + mLineW + mPadding/2, rangeY, mMaxStr.c_str(), fontResource, mRenderW, TOP_LEFT, 0); } - if(mValueStr && mShowCurr) + if (mValueStr && mShowCurr) { sprintf(mValueStr, "%d", mValue); int textW = measureText(mValueStr); @@ -329,7 +347,7 @@ int GUISliderValue::Update(void) if (!mRendered) return 2; - if(mLabel) + if (mLabel) return mLabel->Update(); return 0; } @@ -406,7 +424,7 @@ int GUISliderValue::NotifyVarChange(const std::string& varName, const std::strin mLabel->NotifyVarChange(varName, value); if (varName == mVariable) { int newVal = atoi(value.c_str()); - if(newVal != mValue) { + if (newVal != mValue) { mValue = newVal; mValuePct = pctFromValue(mValue); mRendered = false; diff --git a/gui/terminal.cpp b/gui/terminal.cpp index b4194d0fb..fe80fb097 100644 --- a/gui/terminal.cpp +++ b/gui/terminal.cpp @@ -500,7 +500,7 @@ private: uint32_t u8state = 0, u8cp = 0; std::string& s = lines[y].text; unpackedLine.cells.clear(); - for(size_t i = 0; i < s.size(); ++i) { + for (size_t i = 0; i < s.size(); ++i) { uint32_t rc = utf8decode(&u8state, &u8cp, (unsigned char)s[i]); if (rc == UTF8_ACCEPT) unpackedLine.cells.push_back(Cell(u8cp)); @@ -776,7 +776,10 @@ GUITerminal::GUITerminal(xml_node<>* node) : GUIScrollList(node) lastCondition = false; if (!node) { - mRenderX = 0; mRenderY = 0; mRenderW = gr_fb_width(); mRenderH = gr_fb_height(); + mRenderX = 0; + mRenderY = 0; + mRenderW = gr_fb_width(); + mRenderH = gr_fb_height(); } engine = &gEngine; @@ -785,7 +788,7 @@ GUITerminal::GUITerminal(xml_node<>* node) : GUIScrollList(node) int GUITerminal::Update(void) { - if(!isConditionTrue()) { + if (!isConditionTrue()) { lastCondition = false; return 0; } @@ -816,7 +819,7 @@ int GUITerminal::Update(void) // Return 0 on success, >0 to ignore remainder of touch, and <0 on error int GUITerminal::NotifyTouch(TOUCH_STATE state, int x, int y) { - if(!isConditionTrue()) + if (!isConditionTrue()) return -1; // TODO: grab focus correctly diff --git a/gui/text.cpp b/gui/text.cpp index 49e27a104..61940ff9f 100644 --- a/gui/text.cpp +++ b/gui/text.cpp @@ -114,9 +114,6 @@ int GUIText::Render(void) mVarChanged = 0; - int x = mRenderX, y = mRenderY; - int width = gr_ttf_measureEx(mLastValue.c_str(), fontResource); - if (isHighlighted) gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, mHighlightColor.alpha); else diff --git a/gui/textbox.cpp b/gui/textbox.cpp index 2e2512c50..2c7d09f99 100644 --- a/gui/textbox.cpp +++ b/gui/textbox.cpp @@ -98,7 +98,7 @@ int GUITextBox::NotifyVarChange(const std::string& varName, const std::string& v { GUIScrollList::NotifyVarChange(varName, value); - if(!isConditionTrue() || mIsStatic) + if (!isConditionTrue() || mIsStatic) return 0; // Check to see if the variable exists in mText diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml index 3aed1981e..8ca508f51 100644 --- a/gui/theme/common/landscape.xml +++ b/gui/theme/common/landscape.xml @@ -3132,44 +3132,43 @@ </action> </page> - <page name="copylog"> - <template name="page"/> - - <text style="text_l"> - <placement x="%col1_x_header%" y="%row3_header_y%"/> - <text>{@copying_log=Copy Logs to SD Card}</text> - </text> - - <checkbox> - <placement x="%indent%" y="%row4_y%"/> - <text>{@include_kernel_log=Include Kernel Log}</text> - <data variable="tw_include_kernel_log" value="1"/> - </checkbox> - - <slider> - <text>{@copying_log=Copy Logs to SD Card}</text> - <actions> - <action function="set">tw_back=advanced</action> - <action function="set">tw_action=copylog</action> - <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> - <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> - <action function="page">action_page</action> - </actions> - </slider> - - <action> - <touch key="home"/> - <action function="page">main</action> - </action> - - <action> - <touch key="back"/> - <actions> - <action function="page">advanced</action> - </actions> - </action> - - </page> + <page name="copylog"> + <template name="page"/> + + <text style="text_l"> + <placement x="%col1_x_header%" y="%row3_header_y%"/> + <text>{@copying_log=Copy Logs to SD Card}</text> + </text> + + <checkbox> + <placement x="%indent%" y="%row4_y%"/> + <text>{@include_kernel_log=Include Kernel Log}</text> + <data variable="tw_include_kernel_log" value="1"/> + </checkbox> + + <slider> + <text>{@copying_log=Copy Logs to SD Card}</text> + <actions> + <action function="set">tw_back=advanced</action> + <action function="set">tw_action=copylog</action> + <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> + <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> + <action function="page">action_page</action> + </actions> + </slider> + + <action> + <touch key="home"/> + <action function="page">main</action> + </action> + + <action> + <touch key="back"/> + <actions> + <action function="page">advanced</action> + </actions> + </action> + </page> <page name="advanced"> <template name="page"/> @@ -3517,6 +3516,11 @@ <text>{@swipe_to_unlock=Swipe to Unlock}</text> <action function="overlay"/> </slider> + + <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> </page> <page name="filemanagerlist"> @@ -4674,6 +4678,11 @@ </button> <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> + + <action> <touch key="power+voldown"/> <action function="screenshot"/> </action> diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml index b36b5a615..fd35364b0 100644 --- a/gui/theme/common/portrait.xml +++ b/gui/theme/common/portrait.xml @@ -386,9 +386,9 @@ </checkbox> <checkbox> - <placement x="%indent%" y="%row13a_y%" /> + <placement x="%indent%" y="%row13a_y%"/> <text>{@install_reboot_chk=Reboot after installation is complete}</text> - <data variable="tw_install_reboot" /> + <data variable="tw_install_reboot"/> </checkbox> <checkbox> @@ -3410,8 +3410,8 @@ <actions> <action function="set">tw_back=advanced</action> <action function="set">tw_action=copylog</action> - <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> - <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> + <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> + <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> <action function="page">action_page</action> </actions> </slider> @@ -3427,7 +3427,6 @@ <action function="page">advanced</action> </actions> </action> - </page> <page name="advanced"> @@ -3779,6 +3778,11 @@ <text>{@swipe_to_unlock=Swipe to Unlock}</text> <action function="overlay"/> </slider> + + <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> </page> <page name="filemanagerlist"> @@ -4755,6 +4759,11 @@ </button> <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> + + <action> <touch key="power+voldown"/> <action function="screenshot"/> </action> diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml index 921e72c60..6a7e6ebb8 100644 --- a/gui/theme/common/watch.xml +++ b/gui/theme/common/watch.xml @@ -237,22 +237,22 @@ </button> </page> - <page name="copylog"> - <template name="page"/> + <page name="copylog"> + <template name="page"/> - <checkbox> + <checkbox> <placement x="%indent%" y="%row1_y%"/> - <text>{@include_kernel_log=Include Kernel Log}</text> - <data variable="tw_include_kernel_log" value="1"/> - </checkbox> + <text>{@include_kernel_log=Include Kernel Log}</text> + <data variable="tw_include_kernel_log" value="1"/> + </checkbox> <slider> <text>{@swipe_confirm= Confirm}</text> <actions> - <action function="set">tw_back=main3</action> - <action function="set">tw_action=copylog</action> - <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> - <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> + <action function="set">tw_back=main3</action> + <action function="set">tw_action=copylog</action> + <action function="set">tw_action_text1={@copying_log=Copy Logs to SD Card}</action> + <action function="set">tw_complete_text1={@copy_log_complete=Logs Copy Completed}</action> <action function="page">action_page</action> </actions> </slider> @@ -266,7 +266,7 @@ <touch key="home"/> <action function="page">main</action> </action> - </page> + </page> <page name="main3"> <template name="page"/> @@ -549,9 +549,9 @@ </checkbox> <checkbox> - <placement x="%indent%" y="%row4_y%" /> + <placement x="%indent%" y="%row4_y%"/> <text>{@install_reboot_chk=Reboot after installation is complete}</text> - <data variable="tw_install_reboot" /> + <data variable="tw_install_reboot"/> </checkbox> <button> @@ -4424,6 +4424,11 @@ <text>{@swipe_unlock= Unlock}</text> <action function="overlay"/> </slider> + + <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> </page> <page name="filemanagerlist"> @@ -5358,6 +5363,11 @@ </button> <action> + <touch key="power"/> + <action function="togglebacklight"/> + </action> + + <action> <touch key="power+voldown"/> <action function="screenshot"/> </action> diff --git a/gui/theme/landscape_hdpi/splash.xml b/gui/theme/landscape_hdpi/splash.xml index 6616038dd..8da2fe6ea 100644 --- a/gui/theme/landscape_hdpi/splash.xml +++ b/gui/theme/landscape_hdpi/splash.xml @@ -5,7 +5,7 @@ <author>TeamWin</author> <title>TWRP</title> <description>splash screen</description> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <resources> diff --git a/gui/theme/landscape_hdpi/ui.xml b/gui/theme/landscape_hdpi/ui.xml index 2e263520a..34ef530e3 100644 --- a/gui/theme/landscape_hdpi/ui.xml +++ b/gui/theme/landscape_hdpi/ui.xml @@ -6,7 +6,7 @@ <title>Backup Naowz</title> <description>Default basic theme</description> <preview>preview.png</preview> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <include> @@ -432,7 +432,7 @@ <action> <touch key="power"/> - <action function="overlay">lock</action> + <action function="togglebacklight"/> </action> <action> diff --git a/gui/theme/landscape_mdpi/splash.xml b/gui/theme/landscape_mdpi/splash.xml index 115d5bd90..ac71c2301 100644 --- a/gui/theme/landscape_mdpi/splash.xml +++ b/gui/theme/landscape_mdpi/splash.xml @@ -5,7 +5,7 @@ <author>TeamWin</author> <title>TWRP</title> <description>splash screen</description> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <resources> diff --git a/gui/theme/landscape_mdpi/ui.xml b/gui/theme/landscape_mdpi/ui.xml index 8b63dcbfd..c2cfc4fb3 100644 --- a/gui/theme/landscape_mdpi/ui.xml +++ b/gui/theme/landscape_mdpi/ui.xml @@ -6,7 +6,7 @@ <title>Backup Naowz</title> <description>Default basic theme</description> <preview>preview.png</preview> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <include> @@ -432,7 +432,7 @@ <action> <touch key="power"/> - <action function="overlay">lock</action> + <action function="togglebacklight"/> </action> <action> diff --git a/gui/theme/portrait_hdpi/splash.xml b/gui/theme/portrait_hdpi/splash.xml index 02717e274..93932b983 100644 --- a/gui/theme/portrait_hdpi/splash.xml +++ b/gui/theme/portrait_hdpi/splash.xml @@ -5,7 +5,7 @@ <author>TeamWin</author> <title>TWRP</title> <description>splash screen</description> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <resources> diff --git a/gui/theme/portrait_hdpi/ui.xml b/gui/theme/portrait_hdpi/ui.xml index a5ee22cd4..4bce1465c 100644 --- a/gui/theme/portrait_hdpi/ui.xml +++ b/gui/theme/portrait_hdpi/ui.xml @@ -6,7 +6,7 @@ <title>Backup Naowz</title> <description>Default basic theme</description> <preview>preview.png</preview> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <include> @@ -336,7 +336,7 @@ <action> <touch key="power"/> - <action function="overlay">lock</action> + <action function="togglebacklight"/> </action> <action> diff --git a/gui/theme/portrait_mdpi/splash.xml b/gui/theme/portrait_mdpi/splash.xml index e238ce15b..80338eb82 100644 --- a/gui/theme/portrait_mdpi/splash.xml +++ b/gui/theme/portrait_mdpi/splash.xml @@ -5,7 +5,7 @@ <author>TeamWin</author> <title>TWRP</title> <description>splash screen</description> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <resources> diff --git a/gui/theme/portrait_mdpi/ui.xml b/gui/theme/portrait_mdpi/ui.xml index 9a0adf334..94c142863 100644 --- a/gui/theme/portrait_mdpi/ui.xml +++ b/gui/theme/portrait_mdpi/ui.xml @@ -6,7 +6,7 @@ <title>Backup Naowz</title> <description>Default basic theme</description> <preview>preview.png</preview> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <include> @@ -336,7 +336,7 @@ <action> <touch key="power"/> - <action function="overlay">lock</action> + <action function="togglebacklight"/> </action> <action> diff --git a/gui/theme/watch_mdpi/splash.xml b/gui/theme/watch_mdpi/splash.xml index 2c2538a93..2d70e5948 100644 --- a/gui/theme/watch_mdpi/splash.xml +++ b/gui/theme/watch_mdpi/splash.xml @@ -5,7 +5,7 @@ <author>TeamWin</author> <title>TWRP</title> <description>splash screen</description> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <resources> diff --git a/gui/theme/watch_mdpi/ui.xml b/gui/theme/watch_mdpi/ui.xml index c56610bf2..3ef71aff0 100644 --- a/gui/theme/watch_mdpi/ui.xml +++ b/gui/theme/watch_mdpi/ui.xml @@ -7,7 +7,7 @@ <title>Backup Naowz</title> <description>Default basic theme</description> <preview>preview.png</preview> - <themeversion>1</themeversion> + <themeversion>2</themeversion> </details> <include> @@ -258,7 +258,7 @@ <action> <touch key="power"/> - <action function="overlay">lock</action> + <action function="togglebacklight"/> </action> <action> diff --git a/gui/twmsg.cpp b/gui/twmsg.cpp index 57f192234..ebd6fc313 100644 --- a/gui/twmsg.cpp +++ b/gui/twmsg.cpp @@ -33,7 +33,7 @@ class LocalLookup : public StringLookup { const std::vector<std::string>& vars; const StringLookup& next; - public: +public: LocalLookup(const std::vector<std::string>& vars, const StringLookup& next) : vars(vars), next(next) {} virtual std::string operator()(const std::string& name) const { diff --git a/libtar/Android.mk b/libtar/Android.mk index 14c19f73f..c8905d93f 100644 --- a/libtar/Android.mk +++ b/libtar/Android.mk @@ -10,16 +10,13 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) \ external/zlib LOCAL_SHARED_LIBRARIES += libz libc -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_C_INCLUDES += external/libselinux/include - LOCAL_SHARED_LIBRARIES += libselinux - LOCAL_CFLAGS += -DHAVE_SELINUX -endif +LOCAL_C_INCLUDES += external/libselinux/include +LOCAL_SHARED_LIBRARIES += libselinux ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) LOCAL_SHARED_LIBRARIES += libe4crypt LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT - LOCAL_C_INCLUDES += bootable/recovery/crypto/ext4crypt + LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/ext4crypt endif include $(BUILD_SHARED_LIBRARY) @@ -34,16 +31,13 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) \ external/zlib LOCAL_STATIC_LIBRARIES += libz libc -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_C_INCLUDES += external/libselinux/include - LOCAL_STATIC_LIBRARIES += libselinux - LOCAL_CFLAGS += -DHAVE_SELINUX -endif +LOCAL_C_INCLUDES += external/libselinux/include +LOCAL_STATIC_LIBRARIES += libselinux ifeq ($(TW_INCLUDE_CRYPTO_FBE), true) LOCAL_SHARED_LIBRARIES += libe4crypt LOCAL_CFLAGS += -DHAVE_EXT4_CRYPT - LOCAL_C_INCLUDES += bootable/recovery/crypto/ext4crypt + LOCAL_C_INCLUDES += $(LOCAL_PATH)/../crypto/ext4crypt endif include $(BUILD_STATIC_LIBRARY) diff --git a/libtar/append.c b/libtar/append.c index 438829753..d8ba3cad5 100644 --- a/libtar/append.c +++ b/libtar/append.c @@ -22,6 +22,10 @@ #include <sys/types.h> #include <stdbool.h> +#include <sys/capability.h> +#include <sys/xattr.h> +#include <linux/xattr.h> + #ifdef STDC_HEADERS # include <stdlib.h> # include <string.h> @@ -31,9 +35,7 @@ # include <unistd.h> #endif -#ifdef HAVE_SELINUX -# include "selinux/selinux.h" -#endif +#include <selinux/selinux.h> #ifdef HAVE_EXT4_CRYPT # include "ext4crypt_tar.h" @@ -101,7 +103,6 @@ tar_append_file(TAR *t, const char *realname, const char *savename) #endif th_set_path(t, (savename ? savename : realname)); -#ifdef HAVE_SELINUX /* get selinux context */ if (t->options & TAR_STORE_SELINUX) { @@ -125,7 +126,6 @@ tar_append_file(TAR *t, const char *realname, const char *savename) #endif } } -#endif #ifdef HAVE_EXT4_CRYPT if (TH_ISDIR(t) && t->options & TAR_STORE_EXT4_POL) @@ -154,6 +154,24 @@ tar_append_file(TAR *t, const char *realname, const char *savename) } #endif + /* get posix file capabilities */ + if (TH_ISREG(t) && t->options & TAR_STORE_POSIX_CAP) + { + if (t->th_buf.has_cap_data) + { + memset(&t->th_buf.cap_data, 0, sizeof(struct vfs_cap_data)); + t->th_buf.has_cap_data = 0; + } + + if (getxattr(realname, XATTR_NAME_CAPS, &t->th_buf.cap_data, sizeof(struct vfs_cap_data)) >= 0) + { + t->th_buf.has_cap_data = 1; +#if 1 //def DEBUG + print_caps(&t->th_buf.cap_data); +#endif + } + } + /* check if it's a hardlink */ #ifdef DEBUG puts("tar_append_file(): checking inode cache for hardlink..."); diff --git a/libtar/block.c b/libtar/block.c index 2fd61bb76..1b3ba8242 100644 --- a/libtar/block.c +++ b/libtar/block.c @@ -29,6 +29,10 @@ #define E4CRYPT_TAG "TWRP.security.e4crypt=" #define E4CRYPT_TAG_LEN 22 +// Used to identify Posix capabilities in extended ('x') +#define CAPABILITIES_TAG "SCHILY.xattr.security.capability=" +#define CAPABILITIES_TAG_LEN 33 + /* read a header block */ /* FIXME: the return value of this function should match the return value of tar_block_read(), which is a macro which references a prototype @@ -119,15 +123,18 @@ th_read(TAR *t) free(t->th_buf.gnu_longname); if (t->th_buf.gnu_longlink != NULL) free(t->th_buf.gnu_longlink); -#ifdef HAVE_SELINUX if (t->th_buf.selinux_context != NULL) free(t->th_buf.selinux_context); -#endif #ifdef HAVE_EXT4_CRYPT if (t->th_buf.e4crypt_policy != NULL) { free(t->th_buf.e4crypt_policy); } #endif + if (t->th_buf.has_cap_data) + { + memset(&t->th_buf.cap_data, 0, sizeof(struct vfs_cap_data)); + t->th_buf.has_cap_data = 0; + } memset(&(t->th_buf), 0, sizeof(struct tar_header)); @@ -241,8 +248,8 @@ th_read(TAR *t) } } -#ifdef HAVE_SELINUX - if(TH_ISEXTHEADER(t)) + // Extended headers (selinux contexts, posix file capabilities, ext4 encryption policies) + while(TH_ISEXTHEADER(t) || TH_ISPOLHEADER(t)) { sz = th_get_size(t); @@ -267,7 +274,19 @@ th_read(TAR *t) buf[T_BLOCKSIZE-1] = 0; int len = strlen(buf); - char *start = strstr(buf, SELINUX_TAG); + // posix capabilities + char *start = strstr(buf, CAPABILITIES_TAG); + if(start && start+CAPABILITIES_TAG_LEN < buf+len) + { + start += CAPABILITIES_TAG_LEN; + memcpy(&t->th_buf.cap_data, start, sizeof(struct vfs_cap_data)); + t->th_buf.has_cap_data = 1; +#ifdef DEBUG + printf(" th_read(): Posix capabilities detected\n"); +#endif + } // end posix capabilities + // selinux contexts + start = strstr(buf, SELINUX_TAG); if(start && start+SELINUX_TAG_LEN < buf+len) { start += SELINUX_TAG_LEN; @@ -279,46 +298,9 @@ th_read(TAR *t) printf(" th_read(): SELinux context xattr detected: %s\n", t->th_buf.selinux_context); #endif } - } - } - - i = th_read_internal(t); - if (i != T_BLOCKSIZE) - { - if (i != -1) - errno = EINVAL; - return -1; - } - } -#endif - + } // end selinux contexts #ifdef HAVE_EXT4_CRYPT - if(TH_ISPOLHEADER(t)) - { - sz = th_get_size(t); - - if(sz >= T_BLOCKSIZE) // Not supported - { -#ifdef DEBUG - printf(" th_read(): Policy header is too long!\n"); -#endif - } - else - { - char buf[T_BLOCKSIZE]; - i = tar_block_read(t, buf); - if (i != T_BLOCKSIZE) - { - if (i != -1) - errno = EINVAL; - return -1; - } - - // To be sure - buf[T_BLOCKSIZE-1] = 0; - - int len = strlen(buf); - char *start = strstr(buf, E4CRYPT_TAG); + start = strstr(buf, E4CRYPT_TAG); if(start && start+E4CRYPT_TAG_LEN < buf+len) { start += E4CRYPT_TAG_LEN; @@ -331,6 +313,7 @@ th_read(TAR *t) #endif } } +#endif // HAVE_EXT4_CRYPT } i = th_read_internal(t); @@ -341,11 +324,55 @@ th_read(TAR *t) return -1; } } -#endif return 0; } +/* write an extended block */ +static int +th_write_extended(TAR *t, char* buf, uint64_t sz) +{ + char type2; + uint64_t sz2; + int i; + + /* save old size and type */ + type2 = t->th_buf.typeflag; + sz2 = th_get_size(t); + + /* write out initial header block with fake size and type */ + t->th_buf.typeflag = TH_EXT_TYPE; + + if(sz >= T_BLOCKSIZE) // impossible + { + errno = EINVAL; + return -1; + } + + th_set_size(t, sz); + th_finish(t); + i = tar_block_write(t, &(t->th_buf)); + if (i != T_BLOCKSIZE) + { + if (i != -1) + errno = EINVAL; + return -1; + } + + i = tar_block_write(t, buf); + if (i != T_BLOCKSIZE) + { + if (i != -1) + errno = EINVAL; + return -1; + } + + /* reset type and size to original values */ + t->th_buf.typeflag = type2; + th_set_size(t, sz2); + memset(buf, 0, T_BLOCKSIZE); + return 0; +} /* write a header block */ int @@ -353,7 +380,7 @@ th_write(TAR *t) { int i, j; char type2; - uint64_t sz, sz2; + uint64_t sz, sz2, total_sz = 0; char *ptr; char buf[T_BLOCKSIZE]; @@ -464,20 +491,15 @@ th_write(TAR *t) th_set_size(t, sz2); } -#ifdef HAVE_SELINUX + memset(buf, 0, T_BLOCKSIZE); + ptr = buf; + if((t->options & TAR_STORE_SELINUX) && t->th_buf.selinux_context != NULL) { #ifdef DEBUG printf("th_write(): using selinux_context (\"%s\")\n", t->th_buf.selinux_context); #endif - /* save old size and type */ - type2 = t->th_buf.typeflag; - sz2 = th_get_size(t); - - /* write out initial header block with fake size and type */ - t->th_buf.typeflag = TH_EXT_TYPE; - /* setup size - EXT header has format "*size of this whole tag as ascii numbers* *space* *content* *newline* */ // size newline sz = SELINUX_TAG_LEN + strlen(t->th_buf.selinux_context) + 3 + 1; @@ -485,37 +507,10 @@ th_write(TAR *t) if(sz >= 100) // another ascci digit for size ++sz; - if(sz >= T_BLOCKSIZE) // impossible - { - errno = EINVAL; - return -1; - } - - th_set_size(t, sz); - th_finish(t); - i = tar_block_write(t, &(t->th_buf)); - if (i != T_BLOCKSIZE) - { - if (i != -1) - errno = EINVAL; - return -1; - } - - memset(buf, 0, T_BLOCKSIZE); - snprintf(buf, T_BLOCKSIZE, "%d "SELINUX_TAG"%s\n", (int)sz, t->th_buf.selinux_context); - i = tar_block_write(t, &buf); - if (i != T_BLOCKSIZE) - { - if (i != -1) - errno = EINVAL; - return -1; - } - - /* reset type and size to original values */ - t->th_buf.typeflag = type2; - th_set_size(t, sz2); + total_sz += sz; + snprintf(ptr, T_BLOCKSIZE, "%d "SELINUX_TAG"%s\n", (int)sz, t->th_buf.selinux_context); + ptr += sz; } -#endif #ifdef HAVE_EXT4_CRYPT if((t->options & TAR_STORE_EXT4_POL) && t->th_buf.e4crypt_policy != NULL) @@ -524,13 +519,6 @@ th_write(TAR *t) printf("th_write(): using e4crypt_policy %s\n", t->th_buf.e4crypt_policy); #endif - /* save old size and type */ - type2 = t->th_buf.typeflag; - sz2 = th_get_size(t); - - /* write out initial header block with fake size and type */ - t->th_buf.typeflag = TH_POL_TYPE; - /* setup size - EXT header has format "*size of this whole tag as ascii numbers* *space* *content* *newline* */ // size newline sz = E4CRYPT_TAG_LEN + EXT4_KEY_DESCRIPTOR_HEX + 3 + 1; @@ -538,37 +526,51 @@ th_write(TAR *t) if(sz >= 100) // another ascci digit for size ++sz; - if(sz >= T_BLOCKSIZE) // impossible + if (total_sz + sz >= T_BLOCKSIZE) { - errno = EINVAL; - return -1; + if (th_write_extended(t, &buf, total_sz)) + return -1; + ptr = buf; + total_sz = sz; } + else + total_sz += sz; - th_set_size(t, sz); - th_finish(t); - i = tar_block_write(t, &(t->th_buf)); - if (i != T_BLOCKSIZE) - { - if (i != -1) - errno = EINVAL; - return -1; - } + snprintf(ptr, T_BLOCKSIZE, "%d "E4CRYPT_TAG"%s", (int)sz, t->th_buf.e4crypt_policy); + char *nlptr = ptr + sz - 1; + *nlptr = '\n'; + ptr += sz; + } +#endif - memset(buf, 0, T_BLOCKSIZE); - snprintf(buf, T_BLOCKSIZE, "%d "E4CRYPT_TAG"%s\n", (int)sz, t->th_buf.e4crypt_policy); - i = tar_block_write(t, &buf); - if (i != T_BLOCKSIZE) + if((t->options & TAR_STORE_POSIX_CAP) && t->th_buf.has_cap_data) + { +#ifdef DEBUG + printf("th_write(): has a posix capability\n"); +#endif + sz = CAPABILITIES_TAG_LEN + sizeof(struct vfs_cap_data) + 3 + 1; + + if(sz >= 100) // another ascci digit for size + ++sz; + + if (total_sz + sz >= T_BLOCKSIZE) { - if (i != -1) - errno = EINVAL; - return -1; + if (th_write_extended(t, &buf, total_sz)) + return -1; + ptr = buf; + total_sz = sz; } + else + total_sz += sz; - /* reset type and size to original values */ - t->th_buf.typeflag = type2; - th_set_size(t, sz2); + snprintf(ptr, T_BLOCKSIZE, "%d "CAPABILITIES_TAG, (int)sz); + memcpy(ptr + CAPABILITIES_TAG_LEN + 3, &t->th_buf.cap_data, sizeof(struct vfs_cap_data)); + char *nlptr = ptr + sz - 1; + *nlptr = '\n'; + ptr += sz; } -#endif + if (total_sz > 0 && th_write_extended(t, &buf, total_sz)) // write any outstanding tar extended header + return -1; th_finish(t); diff --git a/libtar/extract.c b/libtar/extract.c index ba29a7771..87ccf245f 100644 --- a/libtar/extract.c +++ b/libtar/extract.c @@ -20,6 +20,10 @@ #include <errno.h> #include <utime.h> +#include <sys/capability.h> +#include <sys/xattr.h> +#include <linux/xattr.h> + #ifdef STDC_HEADERS # include <stdlib.h> #endif @@ -28,9 +32,7 @@ # include <unistd.h> #endif -#ifdef HAVE_SELINUX -# include "selinux/selinux.h" -#endif +#include <selinux/selinux.h> #ifdef HAVE_EXT4_CRYPT # include "ext4crypt_tar.h" @@ -155,7 +157,6 @@ tar_extract_file(TAR *t, const char *realname, const char *prefix, const int *pr return i; } -#ifdef HAVE_SELINUX if((t->options & TAR_STORE_SELINUX) && t->th_buf.selinux_context != NULL) { #ifdef DEBUG @@ -164,7 +165,16 @@ tar_extract_file(TAR *t, const char *realname, const char *prefix, const int *pr if (lsetfilecon(realname, t->th_buf.selinux_context) < 0) fprintf(stderr, "tar_extract_file(): failed to restore SELinux context %s to file %s !!!\n", t->th_buf.selinux_context, realname); } + + if((t->options & TAR_STORE_POSIX_CAP) && t->th_buf.has_cap_data) + { +#if 1 //def DEBUG + printf("tar_extract_file(): restoring posix capabilities to file %s\n", realname); + print_caps(&t->th_buf.cap_data); #endif + if (setxattr(realname, XATTR_NAME_CAPS, &t->th_buf.cap_data, sizeof(struct vfs_cap_data), 0) < 0) + fprintf(stderr, "tar_extract_file(): failed to restore posix capabilities to file %s !!!\n", realname); + } #ifdef LIBTAR_FILE_HASH pn = th_get_pathname(t); diff --git a/libtar/libtar.h b/libtar/libtar.h index ab5a3bede..4d921247b 100644 --- a/libtar/libtar.h +++ b/libtar/libtar.h @@ -15,6 +15,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <linux/capability.h> #include "tar.h" #include "libtar_listhash.h" @@ -43,7 +44,7 @@ extern "C" /* extended metadata for next file - used to store selinux_context */ #define TH_EXT_TYPE 'x' -#define TH_POL_TYPE 'p' +#define TH_POL_TYPE_DO_NOT_USE 'p' /* our version of the tar header structure */ struct tar_header @@ -67,12 +68,12 @@ struct tar_header char padding[12]; char *gnu_longname; char *gnu_longlink; -#ifdef HAVE_SELINUX char *selinux_context; -#endif #ifdef HAVE_EXT4_CRYPT char *e4crypt_policy; #endif + int has_cap_data; + struct vfs_cap_data cap_data; }; @@ -118,6 +119,7 @@ TAR; #define TAR_STORE_SELINUX 128 /* store selinux context */ #define TAR_USE_NUMERIC_ID 256 /* favor numeric owner over names */ #define TAR_STORE_EXT4_POL 512 /* store ext4 crypto policy */ +#define TAR_STORE_POSIX_CAP 1024 /* store posix file capabilities */ /* this is obsolete - it's here for backwards-compatibility only */ #define TAR_IGNORE_MAGIC 0 @@ -214,7 +216,7 @@ int th_write(TAR *t); #define TH_ISLONGNAME(t) ((t)->th_buf.typeflag == GNU_LONGNAME_TYPE) #define TH_ISLONGLINK(t) ((t)->th_buf.typeflag == GNU_LONGLINK_TYPE) #define TH_ISEXTHEADER(t) ((t)->th_buf.typeflag == TH_EXT_TYPE) -#define TH_ISPOLHEADER(t) ((t)->th_buf.typeflag == TH_POL_TYPE) +#define TH_ISPOLHEADER(t) ((t)->th_buf.typeflag == TH_POL_TYPE_DO_NOT_USE) /* decode tar header info */ #define th_get_crc(t) oct_to_int((t)->th_buf.chksum, sizeof((t)->th_buf.chksum)) @@ -323,6 +325,9 @@ void int_to_oct(int64_t num, char *oct, size_t octlen); /* integer to string-octal conversion, or binary as necessary */ void int_to_oct_ex(int64_t num, char *oct, size_t octlen); +/* prints posix file capabilities */ +void print_caps(struct vfs_cap_data *cap_data); + /***** wrapper.c **********************************************************/ diff --git a/libtar/util.c b/libtar/util.c index f472f38b5..7fb3f51f0 100644 --- a/libtar/util.c +++ b/libtar/util.c @@ -15,6 +15,7 @@ #include <stdio.h> #include <sys/param.h> #include <errno.h> +#include <linux/capability.h> #ifdef STDC_HEADERS # include <string.h> @@ -210,3 +211,11 @@ int_to_oct_ex(int64_t num, char *oct, size_t octlen) } int_to_oct(num, oct, octlen); } + +void print_caps(struct vfs_cap_data *cap_data) { + printf(" magic_etc=%u \n", cap_data->magic_etc); + printf(" data[0].permitted=%u \n", cap_data->data[0].permitted); + printf(" data[0].inheritable=%u \n", cap_data->data[0].inheritable); + printf(" data[1].permitted=%u \n", cap_data->data[1].permitted); + printf(" data[1].inheritable=%u \n", cap_data->data[1].inheritable); +} diff --git a/minadbd/Android.mk b/minadbd/Android.mk index 3d675dda5..24d16350f 100644 --- a/minadbd/Android.mk +++ b/minadbd/Android.mk @@ -30,7 +30,8 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) LOCAL_SHARED_LIBRARIES += libmincrypttwrp LOCAL_CFLAGS += -DUSE_MINCRYPT else - LOCAL_SHARED_LIBRARIES += libcrypto + LOCAL_SHARED_LIBRARIES += libcrypto \ + $(if $(WITH_CRYPTO_UTILS),libcrypto_utils) endif include $(BUILD_SHARED_LIBRARY) diff --git a/minui/Android.mk b/minui/Android.mk index 1faaf6dcc..09409a45f 100644 --- a/minui/Android.mk +++ b/minui/Android.mk @@ -6,13 +6,13 @@ LOCAL_SRC_FILES := \ graphics.cpp \ graphics_drm.cpp \ graphics_fbdev.cpp \ - resources.cpp \ - graphics_overlay.cpp + resources.cpp LOCAL_C_INCLUDES := external/libcxx/include external/libpng ifeq ($(TW_TARGET_USES_QCOM_BSP), true) LOCAL_CFLAGS += -DMSM_BSP + LOCAL_SRC_FILES += graphics_overlay.cpp ifeq ($(TARGET_PREBUILT_KERNEL),) LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include diff --git a/minui/graphics.cpp b/minui/graphics.cpp index 93b70da25..244db3c5d 100644 --- a/minui/graphics.cpp +++ b/minui/graphics.cpp @@ -477,6 +477,7 @@ int gr_init(void) gr_init_font(); gr_draw = NULL; +#ifdef MSM_BSP gr_backend = open_overlay(); if (gr_backend) { gr_draw = gr_backend->init(gr_backend); @@ -485,9 +486,10 @@ int gr_init(void) } else printf("Using overlay graphics.\n"); } +#endif #ifndef MSM_BSP - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_adf(); if (gr_backend) { gr_draw = gr_backend->init(gr_backend); @@ -501,14 +503,14 @@ int gr_init(void) printf("Skipping adf graphics because TW_TARGET_USES_QCOM_BSP := true\n"); #endif - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_drm(); gr_draw = gr_backend->init(gr_backend); if (gr_draw) printf("Using drm graphics.\n"); } - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_fbdev(); gr_draw = gr_backend->init(gr_backend); if (gr_draw == NULL) { diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk index 51246660b..054dd45d8 100644 --- a/minuitwrp/Android.mk +++ b/minuitwrp/Android.mk @@ -6,7 +6,6 @@ LOCAL_SRC_FILES := \ graphics.cpp \ graphics_fbdev.cpp \ resources.cpp \ - graphics_overlay.cpp \ truetype.cpp \ graphics_utils.cpp \ events.cpp @@ -20,6 +19,7 @@ endif ifeq ($(TW_TARGET_USES_QCOM_BSP), true) LOCAL_CFLAGS += -DMSM_BSP + LOCAL_SRC_FILES += graphics_overlay.cpp ifeq ($(TARGET_PREBUILT_KERNEL),) LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include diff --git a/minuitwrp/graphics.cpp b/minuitwrp/graphics.cpp index c8ea5cb73..3dc88d9db 100644 --- a/minuitwrp/graphics.cpp +++ b/minuitwrp/graphics.cpp @@ -296,6 +296,7 @@ int gr_init(void) { gr_draw = NULL; +#ifdef MSM_BSP gr_backend = open_overlay(); if (gr_backend) { gr_draw = gr_backend->init(gr_backend); @@ -304,9 +305,10 @@ int gr_init(void) } else printf("Using overlay graphics.\n"); } +#endif #ifdef HAS_ADF - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_adf(); if (gr_backend) { gr_draw = gr_backend->init(gr_backend); @@ -325,7 +327,7 @@ int gr_init(void) #endif #ifdef HAS_DRM - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_drm(); gr_draw = gr_backend->init(gr_backend); if (gr_draw) @@ -335,7 +337,7 @@ int gr_init(void) printf("Skipping drm graphics -- not present in build tree\n"); #endif - if (!gr_draw) { + if (!gr_backend || !gr_draw) { gr_backend = open_fbdev(); gr_draw = gr_backend->init(gr_backend); if (gr_draw == NULL) { diff --git a/minzip/Android.mk b/minzip/Android.mk index 957ab0b29..8b52f35dd 100644 --- a/minzip/Android.mk +++ b/minzip/Android.mk @@ -12,11 +12,8 @@ LOCAL_C_INCLUDES := \ external/zlib \ external/safe-iop/include -ifeq ($(TWHAVE_SELINUX),true) LOCAL_C_INCLUDES += external/libselinux/include LOCAL_SHARED_LIBRARIES += libselinux -LOCAL_CFLAGS += -DHAVE_SELINUX -endif LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) @@ -44,11 +41,8 @@ LOCAL_C_INCLUDES += \ external/zlib \ external/safe-iop/include -ifeq ($(TWHAVE_SELINUX),true) LOCAL_C_INCLUDES += external/libselinux/include LOCAL_STATIC_LIBRARIES += libselinux -LOCAL_CFLAGS += -DHAVE_SELINUX -endif LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) diff --git a/mtp/MtpServer.cpp b/mtp/MtpServer.cpp index 9cd67324f..11eca86bc 100644 --- a/mtp/MtpServer.cpp +++ b/mtp/MtpServer.cpp @@ -1,4 +1,5 @@ /* + * Copyright (C) 2017 TeamWin * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (C) 2014 TeamWin - bigbiff and Dees_Troy mtp database conversion to C++ */ #include <stdio.h> diff --git a/openrecoveryscript.cpp b/openrecoveryscript.cpp index f9c610a7c..b45cf0a4b 100644 --- a/openrecoveryscript.cpp +++ b/openrecoveryscript.cpp @@ -95,13 +95,13 @@ int OpenRecoveryScript::copy_script_file(string filename) { } int OpenRecoveryScript::run_script_file(void) { - FILE *fp = fopen(SCRIPT_FILE_TMP, "r"); int ret_val = 0, cindex, line_len, i, remove_nl, install_cmd = 0, sideload = 0; char script_line[SCRIPT_COMMAND_SIZE], command[SCRIPT_COMMAND_SIZE], - value[SCRIPT_COMMAND_SIZE], mount[SCRIPT_COMMAND_SIZE], - value1[SCRIPT_COMMAND_SIZE], value2[SCRIPT_COMMAND_SIZE]; + value[SCRIPT_COMMAND_SIZE], mount[SCRIPT_COMMAND_SIZE], + value1[SCRIPT_COMMAND_SIZE], value2[SCRIPT_COMMAND_SIZE]; char *val_start, *tok; + FILE *fp = fopen(SCRIPT_FILE_TMP, "r"); if (fp != NULL) { DataManager::SetValue(TW_SIMULATE_ACTIONS, 0); DataManager::SetValue("ui_progress", 0); // Reset the progress bar @@ -120,9 +120,9 @@ int OpenRecoveryScript::run_script_file(void) { memset(command, 0, sizeof(command)); memset(value, 0, sizeof(value)); if ((int)script_line[line_len - 1] == 10) - remove_nl = 2; - else - remove_nl = 1; + remove_nl = 2; + else + remove_nl = 1; if (cindex != 0) { strncpy(command, script_line, cindex); LOGINFO("command is: '%s'\n", command); @@ -604,7 +604,6 @@ int OpenRecoveryScript::Backup_Command(string Options) { char value1[SCRIPT_COMMAND_SIZE]; int line_len, i; string Backup_List; - bool adbbackup = false; strcpy(value1, Options.c_str()); @@ -748,22 +747,31 @@ int OpenRecoveryScript::Restore_ADB_Backup(void) { bool breakloop = false; int partition_count = 0; std::string Restore_Name; - std::size_t pos = 0; struct AdbBackupFileTrailer adbmd5; struct PartitionSettings part_settings; - int adb_control_twrp_fd, adb_write_fd, systemro; + int adb_control_twrp_fd; int adb_control_bu_fd, ret = 0; char cmd[512]; - int orsfd = open(ORS_OUTPUT_FILE, O_WRONLY); part_settings.total_restore_size = 0; PartitionManager.Mount_All_Storage(); DataManager::SetValue(TW_SKIP_MD5_CHECK_VAR, 0); + LOGINFO("opening TW_ADB_BU_CONTROL\n"); adb_control_bu_fd = open(TW_ADB_BU_CONTROL, O_WRONLY | O_NONBLOCK); + if (adb_control_bu_fd < 0) { + LOGERR("Error opening TW_ADB_BU_CONTROL\n"); + return -1; + } LOGINFO("opening TW_ADB_TWRP_CONTROL\n"); adb_control_twrp_fd = open(TW_ADB_TWRP_CONTROL, O_RDONLY | O_NONBLOCK); + if (adb_control_twrp_fd < 0) { + LOGERR("Error opening TW_ADB_TWRP_CONTROL\n"); + close(adb_control_bu_fd); + return -1; + } + memset(&adbmd5, 0, sizeof(adbmd5)); while (!breakloop) { @@ -849,6 +857,8 @@ int OpenRecoveryScript::Restore_ADB_Backup(void) { part_settings.progress = &progress; if (!PartitionManager.Restore_Partition(&part_settings)) { LOGERR("ADB Restore failed.\n"); + close(adb_control_twrp_fd); + close(adb_control_bu_fd); return 1; } } @@ -884,6 +894,8 @@ int OpenRecoveryScript::Restore_ADB_Backup(void) { LOGERR("Cannot write to ADB_CONTROL_BU_FD: %s\n", strerror(errno)); } gui_msg(Msg(msg::kError, "restore_read_only=Cannot restore {1} -- mounted read only.")(part_settings.Part->Backup_Display_Name)); + close(adb_control_twrp_fd); + close(adb_control_bu_fd); return 1; } @@ -897,12 +909,16 @@ int OpenRecoveryScript::Restore_ADB_Backup(void) { part_settings.progress = &progress; if (!PartitionManager.Restore_Partition(&part_settings)) { LOGERR("ADB Restore failed.\n"); + close(adb_control_twrp_fd); + close(adb_control_bu_fd); return 1; } } } } } + close(adb_control_twrp_fd); + close(adb_control_bu_fd); gui_msg("restore_complete=Restore Complete"); if (!twadbbu::Write_TWENDADB()) diff --git a/orscmd/Android.mk b/orscmd/Android.mk index 9f18c16a7..19837b4d0 100644 --- a/orscmd/Android.mk +++ b/orscmd/Android.mk @@ -1,12 +1,19 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +ifneq ($(TW_DEVICE_VERSION),) + LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-$(TW_DEVICE_VERSION)"' +else + LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-0"' +endif + LOCAL_SRC_FILES:= \ orscmd.cpp -LOCAL_CFLAGS:= -c -W -LOCAL_MODULE:=orscmd +LOCAL_CFLAGS += -c -W +LOCAL_MODULE := orscmd LOCAL_MODULE_STEM := twrp LOCAL_MODULE_TAGS:= eng LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +LOCAL_PACK_MODULE_RELOCATIONS := false LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin include $(BUILD_EXECUTABLE) diff --git a/orscmd/orscmd.cpp b/orscmd/orscmd.cpp index 53c5bc030..c008450ab 100644 --- a/orscmd/orscmd.cpp +++ b/orscmd/orscmd.cpp @@ -13,12 +13,20 @@ along with TWRP. If not, see <http://www.gnu.org/licenses/>. */ +#define __STDC_FORMAT_MACROS 1 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <string.h> #include <fcntl.h> +#include <errno.h> +#include <inttypes.h> + +// for setcap and getcap +#include <sys/capability.h> +#include <sys/xattr.h> +#include <linux/xattr.h> #include "orscmd.h" #include "../variables.h" @@ -44,6 +52,45 @@ void print_usage(void) { printf("\nSee more documentation at http://teamw.in/openrecoveryscript\n"); } +int do_setcap(const char* filename, const char* capabilities) +{ + uint64_t caps; + if (sscanf(capabilities, "%" SCNi64, &caps) != 1) + { + printf("setcap: invalid capabilities \"%s\"\n", filename); + return 1; + } + struct vfs_cap_data cap_data; + memset(&cap_data, 0, sizeof(cap_data)); + cap_data.magic_etc = VFS_CAP_REVISION | VFS_CAP_FLAGS_EFFECTIVE; + cap_data.data[0].permitted = (uint32_t) (caps & 0xffffffff); + cap_data.data[0].inheritable = 0; + cap_data.data[1].permitted = (uint32_t) (caps >> 32); + cap_data.data[1].inheritable = 0; + if (setxattr(filename, XATTR_NAME_CAPS, &cap_data, sizeof(cap_data), 0) < 0) { + printf("setcap of %s to %" PRIx64 " failed: %s\n", + filename, caps, strerror(errno)); + return 1; + } + return 0; +} + +int do_getcap(const char* filename) +{ + struct vfs_cap_data cap_data; + memset(&cap_data, 0, sizeof(cap_data)); + int rc = getxattr(filename, XATTR_NAME_CAPS, &cap_data, sizeof(vfs_cap_data)); + if (rc > 0) + { + uint64_t caps = (uint64_t) cap_data.data[1].permitted << 32 | cap_data.data[0].permitted; + printf("0x%" PRIx64 "\n", caps); + } + else + printf("getcap of %s failed: %s\n", filename, strerror(errno)); + + return rc > 0; +} + int main(int argc, char **argv) { int read_fd, write_fd, index; char command[1024], result[512]; @@ -57,6 +104,25 @@ int main(int argc, char **argv) { return 0; } + if (strcmp(argv[1], "setcap") == 0) { + if (argc != 4) + { + printf("Usage: setcap filename capabilities\n\n" + "capabilities must be specified as a number. Prefix with 0x for hexadecimal.\n"); + return 1; + } + return do_setcap(argv[2], argv[3]); + } + + if (strcmp(argv[1], "getcap") == 0) { + if (argc != 3) + { + printf("Usage: getcap filename\n"); + return 1; + } + return do_getcap(argv[2]); + } + sprintf(command, "%s", argv[1]); for (index = 2; index < argc; index++) { sprintf(command, "%s %s", command, argv[index]); diff --git a/partition.cpp b/partition.cpp index 5a53d619a..464438811 100644 --- a/partition.cpp +++ b/partition.cpp @@ -65,10 +65,8 @@ extern "C" { #define CRYPT_FOOTER_OFFSET 0x4000 #endif } -#ifdef HAVE_SELINUX -#include "selinux/selinux.h" +#include <selinux/selinux.h> #include <selinux/label.h> -#endif #ifdef HAVE_CAPABILITIES #include <sys/capability.h> #include <sys/xattr.h> @@ -853,8 +851,6 @@ bool TWPartition::Make_Dir(string Path, bool Display_Error) { } void TWPartition::Setup_File_System(bool Display_Error) { - struct statfs st; - Can_Be_Mounted = true; Can_Be_Wiped = true; @@ -978,7 +974,6 @@ bool TWPartition::Find_MTD_Block_Device(string MTD_Name) { { char device[32], label[32]; unsigned long size = 0; - char* fstype = NULL; int deviceId; sscanf(line, "%s %lx %*s %*c%s", device, &size, label); @@ -1130,7 +1125,6 @@ bool TWPartition::Find_Partition_Size(void) { { unsigned long major, minor, blocks; char device[512]; - char tmpString[64]; if (strlen(line) < 7 || line[0] == 'm') continue; sscanf(line + 1, "%lu %lu %lu %s", &major, &minor, &blocks, device); @@ -1739,6 +1733,7 @@ string TWPartition::Get_Restore_File_System(PartitionSettings *part_settings) { return string(); } Restore_File_System.resize(second_period); + LOGINFO("Restore file system is: '%s'.\n", Restore_File_System.c_str()); return Restore_File_System; } @@ -1913,7 +1908,7 @@ bool TWPartition::Wipe_EXT4() { if (!UnMount(true)) return false; -#if defined(HAVE_SELINUX) && defined(USE_EXT4) +#if defined(USE_EXT4) int ret; char *secontext = NULL; @@ -2230,7 +2225,6 @@ bool TWPartition::Backup_Tar(PartitionSettings *part_settings, pid_t *tar_fork_p bool TWPartition::Backup_Image(PartitionSettings *part_settings) { string Full_FileName, adb_file_name; - int adb_control_bu_fd, compressed; TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, gui_parse_text("{@backing}")); gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name)); @@ -2322,7 +2316,7 @@ bool TWPartition::Raw_Read_Write(PartitionSettings *part_settings) { while (Remain > 0) { if (Remain < RW_Block_Size) bs = (ssize_t)(Remain); - if (read(src_fd, buffer, bs) != bs) { + if (read(src_fd, buffer, bs) != bs) { LOGINFO("Error reading source fd (%s)\n", strerror(errno)); goto exit; } @@ -2331,7 +2325,7 @@ bool TWPartition::Raw_Read_Write(PartitionSettings *part_settings) { goto exit; } backedup_size += (unsigned long long)(bs); - Remain = Remain - (unsigned long long)(bs); + Remain -= (unsigned long long)(bs); if (part_settings->progress) part_settings->progress->UpdateSize(backedup_size); if (PartitionManager.Check_Backup_Cancel() != 0) @@ -2340,6 +2334,12 @@ bool TWPartition::Raw_Read_Write(PartitionSettings *part_settings) { if (part_settings->progress) part_settings->progress->UpdateDisplayDetails(true); fsync(dest_fd); + + if (!part_settings->adbbackup && part_settings->PM_Method == PM_BACKUP) { + tw_set_default_metadata(destfn.c_str()); + LOGINFO("Restored default metadata for %s\n", destfn.c_str()); + } + ret = true; exit: if (src_fd >= 0) @@ -2353,8 +2353,6 @@ exit: bool TWPartition::Backup_Dump_Image(PartitionSettings *part_settings) { string Full_FileName, Command; - int use_compression, adb_control_bu_fd; - unsigned long long compressed; TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, gui_parse_text("{@backing}")); gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name)); @@ -2392,9 +2390,9 @@ unsigned long long TWPartition::Get_Restore_Size(PartitionSettings *part_setting } } - string Full_FileName, Restore_File_System = Get_Restore_File_System(part_settings); + string Full_FileName = part_settings->Backup_Folder + "/" + Backup_FileName; + string Restore_File_System = Get_Restore_File_System(part_settings); - Full_FileName = part_settings->Backup_Folder + "/" + Backup_FileName; if (Is_Image(Restore_File_System)) { Restore_Size = TWFunc::Get_File_Size(Full_FileName); return Restore_Size; @@ -2547,7 +2545,6 @@ bool TWPartition::Update_Size(bool Display_Error) { if (Has_Data_Media) { if (Mount(Display_Error)) { - unsigned long long data_media_used, actual_data; Used = backup_exclusions.Get_Folder_Size(Mount_Point); Backup_Size = Used; int bak = (int)(Used / 1048576LLU); @@ -2620,14 +2617,14 @@ void TWPartition::Recreate_Media_Folder(void) { #ifdef TW_INTERNAL_STORAGE_PATH mkdir(EXPAND(TW_INTERNAL_STORAGE_PATH), 0770); #endif -#ifdef HAVE_SELINUX + // Afterwards, we will try to set the // default metadata that we were hopefully able to get during // early boot. tw_set_default_metadata(Media_Path.c_str()); if (!Internal_path.empty()) tw_set_default_metadata(Internal_path.c_str()); -#endif + // Toggle mount to ensure that "internal sdcard" gets mounted PartitionManager.UnMount_By_Path(Symlink_Mount_Point, true); PartitionManager.Mount_By_Path(Symlink_Mount_Point, true); @@ -2653,7 +2650,6 @@ uint64_t TWPartition::Get_Max_FileSize() { const uint64_t constGB = (uint64_t) 1024 * 1024 * 1024; const uint64_t constTB = (uint64_t) constGB * 1024; const uint64_t constPB = (uint64_t) constTB * 1024; - const uint64_t constEB = (uint64_t) constPB * 1024; if (Current_File_System == "ext4") maxFileSize = 16 * constTB; //16 TB else if (Current_File_System == "vfat") @@ -2702,7 +2698,6 @@ bool TWPartition::Flash_Image(PartitionSettings *part_settings) { return Flash_Sparse_Image(full_filename); } } - unsigned long long file_size = (unsigned long long)(TWFunc::Get_File_Size(full_filename)); return Raw_Read_Write(part_settings); } else if (Backup_Method == BM_FLASH_UTILS) { return Flash_Image_FI(full_filename, NULL); @@ -2911,6 +2906,7 @@ int TWPartition::Decrypt_Adopted() { } } exit: + close(fd); return ret; #else LOGINFO("Decrypt_Adopted: no crypto support\n"); diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 40e08634a..f94b6aa22 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -362,8 +362,7 @@ void TWPartitionManager::Output_Partition(TWPartition* Part) { printf(" Format_Block_Size: %lu\n", Part->Format_Block_Size); if (!Part->MTD_Name.empty()) printf(" MTD_Name: %s\n", Part->MTD_Name.c_str()); - string back_meth = Part->Backup_Method_By_Name(); - printf(" Backup_Method: %s\n", back_meth.c_str()); + printf(" Backup_Method: %s\n", Part->Backup_Method_By_Name().c_str()); if (Part->Mount_Flags || !Part->Mount_Options.empty()) printf(" Mount_Options: %s\n", Part->Mount_Options.c_str()); if (Part->MTP_Storage_ID) @@ -569,10 +568,9 @@ bool TWPartitionManager::Make_MD5(PartitionSettings *part_settings) return true; } - bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { time_t start, stop; - int use_compression, adb_control_bu_fd; + int use_compression; string backup_log = part_settings->Backup_Folder + "/recovery.log"; if (part_settings->Part == NULL) @@ -585,13 +583,11 @@ bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { if (part_settings->Part->Backup(part_settings, &tar_fork_pid)) { bool md5Success = false; - if (part_settings->adbbackup) { + if (part_settings->adbbackup) md5Success = true; - } else md5Success = Make_MD5(part_settings); - TWFunc::SetPerformanceMode(false); if (part_settings->Part->Has_SubPartition) { std::vector<TWPartition*>::iterator subpart; TWPartition *parentPart = part_settings->Part; @@ -600,10 +596,10 @@ bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { if ((*subpart)->Can_Be_Backed_Up && (*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == parentPart->Mount_Point) { part_settings->Part = *subpart; if (!(*subpart)->Backup(part_settings, &tar_fork_pid)) { - TWFunc::SetPerformanceMode(false); Clean_Backup_Folder(part_settings->Backup_Folder); TWFunc::copy_file("/tmp/recovery.log", backup_log, 0644); tw_set_default_metadata(backup_log.c_str()); + TWFunc::SetPerformanceMode(false); return false; } sync(); @@ -628,6 +624,7 @@ bool TWPartitionManager::Backup_Partition(PartitionSettings *part_settings) { } + TWFunc::SetPerformanceMode(false); return md5Success; } else { Clean_Backup_Folder(part_settings->Backup_Folder); @@ -697,14 +694,14 @@ int TWPartitionManager::Cancel_Backup() { int TWPartitionManager::Run_Backup(bool adbbackup) { PartitionSettings part_settings; - int check, partition_count = 0, disable_free_space_check = 0, do_md5 = 0; + int partition_count = 0, disable_free_space_check = 0, do_md5 = 0; int gui_adb_backup; string Backup_Name, Backup_List, backup_path; - unsigned long long total_bytes = 0, free_space = 0, subpart_size; + unsigned long long total_bytes = 0, free_space = 0; TWPartition* storage = NULL; std::vector<TWPartition*>::iterator subpart; struct tm *t; - time_t start, stop, seconds, total_start, total_stop; + time_t seconds, total_start, total_stop; size_t start_pos = 0, end_pos = 0; stop_backup.set_value(0); seconds = time(0); @@ -730,7 +727,6 @@ int TWPartitionManager::Run_Backup(bool adbbackup) { if (!Mount_Current_Storage(true)) return false; - DataManager::GetValue(TW_SKIP_MD5_GENERATE_VAR, do_md5); if (do_md5 == 0) part_settings.generate_md5 = true; @@ -842,7 +838,6 @@ int TWPartitionManager::Run_Backup(bool adbbackup) { part_settings.Part = Find_Partition_By_Path(backup_path); if (part_settings.Part != NULL) { if (!Backup_Partition(&part_settings)) - return false; } else { gui_msg(Msg(msg::kError, "unable_to_locate_partition=Unable to locate '{1}' partition for backup calculations.")(backup_path)); @@ -877,6 +872,7 @@ int TWPartitionManager::Run_Backup(bool adbbackup) { int prev_img_bps = 0, use_compression = 0; unsigned long long prev_file_bps = 0; + DataManager::GetValue(TW_BACKUP_AVG_IMG_RATE, prev_img_bps); img_bps += (prev_img_bps * 4); img_bps /= 5; @@ -920,7 +916,6 @@ bool TWPartitionManager::Restore_Partition(PartitionSettings *part_settings) { time(&Start); - if (!part_settings->Part->Restore(part_settings)) { TWFunc::SetPerformanceMode(false); return false; @@ -949,8 +944,7 @@ bool TWPartitionManager::Restore_Partition(PartitionSettings *part_settings) { int TWPartitionManager::Run_Restore(const string& Restore_Name) { PartitionSettings part_settings; - int check_md5, check, partition_count = 0; - TWPartition* restore_part = NULL; + int check_md5; time_t rStart, rStop; time(&rStart); @@ -1519,9 +1513,7 @@ void TWPartitionManager::Post_Decrypt(const string& Block_Device) { int TWPartitionManager::Decrypt_Device(string Password) { #ifdef TW_INCLUDE_CRYPTO - int ret_val, password_len; char crypto_state[PROPERTY_VALUE_MAX], crypto_blkdev[PROPERTY_VALUE_MAX], cPassword[255]; - size_t result; std::vector<TWPartition*>::iterator iter; // Mount any partitions that need to be mounted for decrypt @@ -1587,7 +1579,6 @@ int TWPartitionManager::Decrypt_Device(string Password) { } int TWPartitionManager::Fix_Contexts(void) { -#ifdef HAVE_SELINUX std::vector<TWPartition*>::iterator iter; for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Has_Data_Media) { @@ -1600,10 +1591,6 @@ int TWPartitionManager::Fix_Contexts(void) { UnMount_Main_Partitions(); gui_msg("done=Done."); return 0; -#else - LOGERR("Cannot fix contexts, no selinux support present.\n"); - return -1; -#endif } TWPartition* TWPartitionManager::Find_Next_Storage(string Path, bool Exclude_Data_Media) { @@ -1650,7 +1637,7 @@ int TWPartitionManager::Open_Lun_File(string Partition_Path, string Lun_File) { } int TWPartitionManager::usb_storage_enable(void) { - int has_dual, has_data_media; + int has_data_media; char lun_file[255]; bool has_multiple_lun = false; @@ -1763,7 +1750,7 @@ void TWPartitionManager::UnMount_Main_Partitions(void) { } int TWPartitionManager::Partition_SDCard(void) { - char mkdir_path[255], temp[255], line[512]; + char temp[255]; string Storage_Path, Command, Device, fat_str, ext_str, start_loc, end_loc, ext_format, sd_path, tmpdevice; int ext, swap, total_size = 0, fat_size; @@ -2078,13 +2065,13 @@ TWPartition *TWPartitionManager::Get_Default_Storage_Partition() { TWPartition *res = NULL; for (std::vector<TWPartition*>::iterator iter = Partitions.begin(); iter != Partitions.end(); ++iter) { - if(!(*iter)->Is_Storage) + if (!(*iter)->Is_Storage) continue; - if((*iter)->Is_Settings_Storage) + if ((*iter)->Is_Settings_Storage) return *iter; - if(!res) + if (!res) res = *iter; } return res; @@ -2310,7 +2297,7 @@ bool TWPartitionManager::Remove_MTP_Storage(unsigned int Storage_ID) { } bool TWPartitionManager::Flash_Image(string& path, string& filename) { - int check, partition_count = 0; + int partition_count = 0; TWPartition* flash_part = NULL; string Flash_List, flash_path, full_filename; size_t start_pos = 0, end_pos = 0; @@ -2448,7 +2435,6 @@ void TWPartitionManager::Decrypt_Adopted() { char* xmlFile = PageManager::LoadFileToBuffer("/data/system/storage.xml", NULL); xml_document<> *doc = NULL; xml_node<>* volumes = NULL; - xml_node<>* volume = NULL; string Primary_Storage_UUID = ""; if (xmlFile != NULL) { LOGINFO("successfully loaded storage.xml\n"); diff --git a/pigz/Android.mk b/pigz/Android.mk index 9fff2f95c..89f9635d7 100644 --- a/pigz/Android.mk +++ b/pigz/Android.mk @@ -12,29 +12,10 @@ LOCAL_C_INCLUDES += $(LOCAL_PATH) \ external/zlib LOCAL_SHARED_LIBRARIES += libz libc -include $(BUILD_EXECUTABLE) - -PIGZ_TOOLS := unpigz -SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(PIGZ_TOOLS)) -$(SYMLINKS): PIGZ_BINARY := $(LOCAL_MODULE) -$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) - @echo "Symlink: $@ -> $(PIGZ_BINARY)" - @mkdir -p $(dir $@) - @rm -rf $@ - $(hide) ln -sf $(PIGZ_BINARY) $@ - -ifneq (,$(filter $(PLATFORM_SDK_VERSION),16 17 18)) -ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) +LOCAL_POST_INSTALL_CMD := \ + $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin && \ + ln -sf pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gunzip && \ + ln -sf pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip && \ + ln -sf pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/unpigz -# We need this so that the installed files could be picked up based on the -# local module name -ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ - $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) -endif - -include $(CLEAR_VARS) -LOCAL_MODULE := unpigz_symlink -LOCAL_MODULE_TAGS := optional -LOCAL_ADDITIONAL_DEPENDENCIES := $(SYMLINKS) -include $(BUILD_PHONY_PACKAGE) -SYMLINKS := +include $(BUILD_EXECUTABLE) diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index b5891acdf..887ed5cd3 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -23,7 +23,7 @@ ifneq ($(TW_USE_TOOLBOX), true) else RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so - ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23)) + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0) RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toybox ifneq ($(wildcard external/zip/Android.mk),) RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip @@ -96,7 +96,9 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so endif ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0) - RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so + + RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so \ + $(if $(WITH_CRYPTO_UTILS),$(TARGET_OUT_SHARED_LIBRARIES)/libcrypto_utils.so) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpackagelistparser.so RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblzma.so endif @@ -133,19 +135,12 @@ endif ifneq ($(TW_EXCLUDE_MTP), true) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so endif -ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) - RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so -endif +RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so ifneq ($(TW_INCLUDE_JPEG),) RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so endif -ifeq ($(TWHAVE_SELINUX), true) - RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so - ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) - RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so - endif -endif +RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so ifeq ($(BUILD_ID), GINGERBREAD) TW_NO_EXFAT := true endif @@ -209,7 +204,7 @@ ifeq ($(TARGET_USERIMAGES_USE_F2FS), true) ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 4; echo $$?),0) RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libf2fs.so - else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0) + else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -eq 23; echo $$?),0) RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.f2fs else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) RELINK_SOURCE_FILES += $(TARGET_ROOT_OUT_SBIN)/mkfs.f2fs diff --git a/toolbox/Android.mk b/toolbox/Android.mk index 4c3e433c2..916080213 100644 --- a/toolbox/Android.mk +++ b/toolbox/Android.mk @@ -18,28 +18,26 @@ endif # If busybox does not have SELinux support, provide these tools with toolbox. # Note that RECOVERY_BUSYBOX_TOOLS will be empty if TW_USE_TOOLBOX == true. -ifeq ($(TWHAVE_SELINUX), true) - TOOLS_FOR_SELINUX := \ - ls +TOOLS_FOR_SELINUX := \ + ls - ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) - TOOLS_FOR_SELINUX += \ - load_policy \ - getenforce \ - chcon \ - restorecon \ - runcon \ - getsebool \ - setsebool - endif +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) + TOOLS_FOR_SELINUX += \ + load_policy \ + getenforce \ + chcon \ + restorecon \ + runcon \ + getsebool \ + setsebool +endif - OUR_TOOLS += $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(TOOLS_FOR_SELINUX)) +OUR_TOOLS += $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(TOOLS_FOR_SELINUX)) - # toolbox setenforce is used during init, so it needs to be included here - # symlink is omitted at the very end if busybox already provides this - ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) - OUR_TOOLS += setenforce - endif +# toolbox setenforce is used during init, so it needs to be included here +# symlink is omitted at the very end if busybox already provides this +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) + OUR_TOOLS += setenforce endif ifeq ($(TW_USE_TOOLBOX), true) @@ -50,26 +48,29 @@ ifeq ($(TW_USE_TOOLBOX), true) du \ OUR_TOOLS := \ - df \ iftop \ ioctl \ - ionice \ log \ - ls \ - lsof \ - mount \ nandread \ newfs_msdos \ ps \ prlimit \ - renice \ sendevent \ start \ stop \ top \ - uptime \ - watchprops \ + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 25; echo $$?),0) + OUR_TOOLS += \ + df \ + ionice \ + ls \ + lsof \ + mount \ + renice \ + uptime \ + watchprops + endif else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) OUR_TOOLS += \ @@ -150,9 +151,6 @@ ifeq ($(TW_USE_TOOLBOX), true) vmstat \ watchprops \ wipe - ifneq ($(TWHAVE_SELINUX), true) - OUR_TOOLS += ls - endif endif endif @@ -206,9 +204,7 @@ else liblog endif -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_SHARED_LIBRARIES += libselinux -endif +LOCAL_SHARED_LIBRARIES += libselinux ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23)) # libusbhost is only used by lsusb, and that isn't usually included in toolbox. @@ -217,7 +213,7 @@ ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23)) LOCAL_WHOLE_STATIC_LIBRARIES := $(patsubst %,libtoolbox_%,$(BSD_TOOLS)) endif -ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) +ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23 24)) # Rule to make getprop and setprop in M trees where toybox normally # provides these tools. Toybox does not allow for easy dynamic # configuration, so we would have to include the entire toybox binary @@ -262,13 +258,11 @@ $(TOOLS_H): $(LOCAL_PATH)/Android.mk $(TOOLS_H): $(transform-generated-source) -ifeq ($(TWHAVE_SELINUX), true) - # toolbox setenforce is used during init in non-symlink form, so it was - # required to be included as part of the suite above. if busybox already - # provides setenforce, we can omit the toolbox symlink - TEMP_TOOLS := $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(ALL_TOOLS)) - ALL_TOOLS := $(TEMP_TOOLS) -endif +# toolbox setenforce is used during init in non-symlink form, so it was +# required to be included as part of the suite above. if busybox already +# provides setenforce, we can omit the toolbox symlink +TEMP_TOOLS := $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(ALL_TOOLS)) +ALL_TOOLS := $(TEMP_TOOLS) # Make /sbin/toolbox launchers for each tool SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(ALL_TOOLS)) diff --git a/toybox/Android.mk b/toybox/Android.mk index a879151fc..b34c2c301 100644 --- a/toybox/Android.mk +++ b/toybox/Android.mk @@ -94,7 +94,6 @@ LOCAL_SRC_FILES := \ toys/other/freeramdisk.c \ toys/other/fsfreeze.c \ toys/other/help.c \ - toys/other/ifconfig.c \ toys/other/inotifyd.c \ toys/other/insmod.c \ toys/other/losetup.c \ @@ -106,7 +105,6 @@ LOCAL_SRC_FILES := \ toys/other/modinfo.c \ toys/other/mountpoint.c \ toys/other/nbd_client.c \ - toys/other/netcat.c \ toys/other/partprobe.c \ toys/other/pivot_root.c \ toys/other/pmap.c \ @@ -115,13 +113,11 @@ LOCAL_SRC_FILES := \ toys/other/readlink.c \ toys/other/realpath.c \ toys/other/rev.c \ - toys/other/rfkill.c \ toys/other/rmmod.c \ toys/other/setsid.c \ toys/other/stat.c \ toys/other/swapoff.c \ toys/other/swapon.c \ - toys/other/switch_root.c \ toys/other/sysctl.c \ toys/other/tac.c \ toys/other/taskset.c \ @@ -134,13 +130,9 @@ LOCAL_SRC_FILES := \ toys/other/yes.c \ toys/pending/dd.c \ toys/pending/expr.c \ - toys/pending/hwclock.c \ toys/pending/more.c \ - toys/pending/pgrep.c \ - toys/pending/netstat.c \ toys/pending/route.c \ toys/pending/tar.c \ - toys/pending/top.c \ toys/pending/tr.c \ toys/pending/traceroute.c \ toys/posix/basename.c \ @@ -196,7 +188,77 @@ LOCAL_SRC_FILES := \ toys/posix/uname.c \ toys/posix/uniq.c \ toys/posix/wc.c \ - toys/posix/xargs.c \ + toys/posix/xargs.c + +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 24; echo $$?),0) +# there are some conflicts here with AOSP-7.1 and CM-14.1 +# the following items have been removed for compatibility +# ifconfig, netcat, netstat, rfkill, switch_root +LOCAL_STATIC_LIBRARIES := libcrypto_static + +LOCAL_C_INCLUDES += \ + external/boringssl/include \ + bionic/libc/dns/include + +LOCAL_SRC_FILES += \ + lib/linestack.c \ + lib/password.c \ + toys/other/flock.c \ + toys/other/hwclock.c \ + toys/other/ionice.c \ + toys/other/lspci.c \ + toys/other/readahead.c \ + toys/other/reset.c \ + toys/other/uptime.c \ + toys/other/xxd.c \ + toys/pending/arp.c \ + toys/pending/diff.c \ + toys/pending/ftpget.c \ + toys/pending/lsof.c \ + toys/pending/telnet.c \ + toys/pending/test.c \ + toys/pending/watch.c \ + toys/pending/xzcat.c \ + toys/posix/ps.c \ + toys/posix/ulimit.c + +# Account for master branch changes pulld into CM14.1 +ifneq ($(CM_BUILD),) +LOCAL_SRC_FILES += \ + toys/android/log.c \ + toys/android/sendevent.c \ + toys/android/start.c \ + toys/net/ifconfig.c \ + toys/net/netcat.c \ + toys/net/netstat.c \ + toys/net/rfkill.c \ + toys/net/tunctl.c \ + toys/other/setfattr.c \ + toys/pending/chrt.c \ + toys/pending/fdisk.c \ + toys/pending/getfattr.c \ + toys/pending/host.c \ + toys/pending/resize.c \ + toys/posix/file.c +else +LOCAL_SRC_FILES += \ + toys/other/ifconfig.c \ + toys/other/netcat.c \ + toys/other/rfkill.c \ + toys/other/switch_root.c \ + toys/pending/netstat.c +endif +else +LOCAL_SRC_FILES += \ + toys/other/ifconfig.c \ + toys/other/netcat.c \ + toys/other/rfkill.c \ + toys/other/switch_root.c \ + toys/pending/hwclock.c \ + toys/pending/netstat.c \ + toys/pending/pgrep.c \ + toys/pending/top.c +endif LOCAL_CFLAGS += \ -std=c99 \ @@ -344,7 +406,82 @@ ALL_TOOLS := \ which \ whoami \ xargs \ - yes \ + yes + +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 24; echo $$?),0) +ALL_TOOLS += \ + arp \ + base64 \ + chattr \ + dd \ + df \ + diff \ + du \ + egrep \ + fgrep \ + flock \ + freeramdisk \ + fsfreeze \ + fstype \ + ftpget \ + ftpput \ + grep \ + help \ + install \ + ionice \ + iorenice \ + iotop \ + killall \ + ls \ + lsattr \ + lsof \ + lspci \ + makedevs \ + mkfifo \ + mount \ + nbd-client \ + nc \ + netcat \ + nproc \ + partprobe \ + pivot_root \ + ps \ + pwdx \ + readahead \ + renice \ + reset \ + rev \ + rfkill \ + sha224sum \ + sha256sum \ + sha384sum \ + sha512sum \ + telnet \ + test \ + top \ + traceroute \ + traceroute6 \ + tty \ + tunctl \ + ulimit \ + uptime \ + vconfig \ + watch \ + xxd \ + xzcat +# Account for master branch changes pulld into CM14.1 +ifneq ($(CM_BUILD),) +ALL_TOOLS += \ + chrt \ + fdisk \ + file \ + getfattr \ + host \ + log \ + resize \ + setfattr +endif +endif # Install the symlinks. LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/$(t);) diff --git a/twcommon.h b/twcommon.h index be243236f..089542859 100644 --- a/twcommon.h +++ b/twcommon.h @@ -1,3 +1,21 @@ +/* + Copyright 2017 TeamWin + This file is part of TWRP/TeamWin Recovery Project. + + TWRP is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + TWRP is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with TWRP. If not, see <http://www.gnu.org/licenses/>. +*/ + #ifndef TWCOMMON_HPP #define TWCOMMON_HPP diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 92d3a3b9d..3c6c55bce 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -64,7 +64,7 @@ int TWFunc::Exec_Cmd(const string& cmd, string &result) { int ret = 0; exec = __popen(cmd.c_str(), "r"); if (!exec) return -1; - while(!feof(exec)) { + while (!feof(exec)) { if (fgets(buffer, 128, exec) != NULL) { result += buffer; } @@ -179,20 +179,20 @@ int TWFunc::Try_Decrypting_File(string fn, string password) { uint8_t *buffer_out = NULL; uint8_t *ptr = NULL; size_t read_len = 0, out_len = 0; - int firstbyte = 0, secondbyte = 0, key_len; + int firstbyte = 0, secondbyte = 0; size_t _j = 0; size_t _key_data_len = 0; // mostly kanged from OpenAES oaes.c - for( _j = 0; _j < 32; _j++ ) + for ( _j = 0; _j < 32; _j++ ) _key_data[_j] = _j + 1; _key_data_len = password.size(); - if( 16 >= _key_data_len ) + if ( 16 >= _key_data_len ) _key_data_len = 16; - else if( 24 >= _key_data_len ) + else if ( 24 >= _key_data_len ) _key_data_len = 24; else - _key_data_len = 32; + _key_data_len = 32; memcpy(_key_data, password.c_str(), password.size()); ctx = oaes_alloc(); @@ -282,13 +282,13 @@ std::string TWFunc::Remove_Trailing_Slashes(const std::string& path, bool leaveL std::string res; size_t last_idx = 0, idx = 0; - while(last_idx != std::string::npos) + while (last_idx != std::string::npos) { - if(last_idx != 0) + if (last_idx != 0) res += '/'; idx = path.find_first_of('/', last_idx); - if(idx == std::string::npos) { + if (idx == std::string::npos) { res += path.substr(last_idx, idx); break; } @@ -297,7 +297,7 @@ std::string TWFunc::Remove_Trailing_Slashes(const std::string& path, bool leaveL last_idx = path.find_first_not_of('/', idx); } - if(leaveLast) + if (leaveLast) res += '/'; return res; } @@ -318,13 +318,13 @@ vector<string> TWFunc::split_string(const string &in, char del, bool skip_empty) string field; istringstream f(in); if (del == '\n') { - while(getline(f, field)) { + while (getline(f, field)) { if (field.empty() && skip_empty) continue; - res.push_back(field); + res.push_back(field); } } else { - while(getline(f, field, del)) { + while (getline(f, field, del)) { if (field.empty() && skip_empty) continue; res.push_back(field); @@ -889,49 +889,48 @@ void TWFunc::Fixup_Time_On_Boot() static const char *paths[] = { "/data/system/time/", "/data/time/" }; FILE *f; - DIR *d; offset = 0; struct dirent *dt; std::string ats_path; - if(!PartitionManager.Mount_By_Path("/data", false)) + if (!PartitionManager.Mount_By_Path("/data", false)) return; // Prefer ats_2, it seems to be the one we want according to logcat on hammerhead // - it is the one for ATS_TOD (time of day?). // However, I never saw a device where the offset differs between ats files. - for(size_t i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) + for (size_t i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) { DIR *d = opendir(paths[i]); - if(!d) + if (!d) continue; - while((dt = readdir(d))) + while ((dt = readdir(d))) { - if(dt->d_type != DT_REG || strncmp(dt->d_name, "ats_", 4) != 0) + if (dt->d_type != DT_REG || strncmp(dt->d_name, "ats_", 4) != 0) continue; - if(ats_path.empty() || strcmp(dt->d_name, "ats_2") == 0) + if (ats_path.empty() || strcmp(dt->d_name, "ats_2") == 0) ats_path = std::string(paths[i]).append(dt->d_name); } closedir(d); } - if(ats_path.empty()) + if (ats_path.empty()) { LOGINFO("TWFunc::Fixup_Time: no ats files found, leaving untouched!\n"); return; } f = fopen(ats_path.c_str(), "r"); - if(!f) + if (!f) { LOGINFO("TWFunc::Fixup_Time: failed to open file %s\n", ats_path.c_str()); return; } - if(fread(&offset, sizeof(offset), 1, f) != 1) + if (fread(&offset, sizeof(offset), 1, f) != 1) { LOGINFO("TWFunc::Fixup_Time: failed load uint64 from file %s\n", ats_path.c_str()); fclose(f); @@ -946,7 +945,7 @@ void TWFunc::Fixup_Time_On_Boot() tv.tv_sec += offset/1000; tv.tv_usec += (offset%1000)*1000; - while(tv.tv_usec >= 1000000) + while (tv.tv_usec >= 1000000) { ++tv.tv_sec; tv.tv_usec -= 1000000; @@ -964,13 +963,13 @@ std::vector<std::string> TWFunc::Split_String(const std::string& str, const std: std::vector<std::string> res; size_t idx = 0, idx_last = 0; - while(idx < str.size()) + while (idx < str.size()) { idx = str.find_first_of(delimiter, idx_last); - if(idx == std::string::npos) + if (idx == std::string::npos) idx = str.size(); - if(idx-idx_last != 0 || !removeEmpty) + if (idx-idx_last != 0 || !removeEmpty) res.push_back(str.substr(idx_last, idx-idx_last)); idx_last = idx + delimiter.size(); @@ -984,12 +983,12 @@ bool TWFunc::Create_Dir_Recursive(const std::string& path, mode_t mode, uid_t ui std::vector<std::string> parts = Split_String(path, "/"); std::string cur_path; struct stat info; - for(size_t i = 0; i < parts.size(); ++i) + for (size_t i = 0; i < parts.size(); ++i) { cur_path += "/" + parts[i]; - if(stat(cur_path.c_str(), &info) < 0 || !S_ISDIR(info.st_mode)) + if (stat(cur_path.c_str(), &info) < 0 || !S_ISDIR(info.st_mode)) { - if(mkdir(cur_path.c_str(), mode) < 0) + if (mkdir(cur_path.c_str(), mode) < 0) return false; chown(cur_path.c_str(), uid, gid); } @@ -53,10 +53,8 @@ extern "C" { } #endif -#ifdef HAVE_SELINUX -#include "selinux/label.h" +#include <selinux/label.h> struct selabel_handle *selinux_handle; -#endif extern int adb_server_main(int is_daemon, int server_port, int /* reply_fd */); @@ -133,7 +131,6 @@ int main(int argc, char **argv) { // Load up all the resources gui_loadResources(); -#ifdef HAVE_SELINUX if (TWFunc::Path_Exists("/prebuilt_file_contexts")) { if (TWFunc::Path_Exists("/file_contexts")) { printf("Renaming regular /file_contexts -> /file_contexts.bak\n"); @@ -170,23 +167,18 @@ int main(int argc, char **argv) { gui_msg("full_selinux=Full SELinux support is present."); } } -#else - gui_warn("no_selinux=No SELinux support (no libselinux)."); -#endif PartitionManager.Mount_By_Path("/cache", false); - bool Shutdown = false, Sideload = false; + bool Shutdown = false; string Send_Intent = ""; { TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc"); if (misc != NULL) { if (misc->Current_File_System == "emmc") { - set_misc_device("emmc", misc->Actual_Block_Device.c_str()); - } else if (misc->Current_File_System == "mtd") { - set_misc_device("mtd", misc->MTD_Name.c_str()); + set_misc_device(misc->Actual_Block_Device); } else { - LOGERR("Unknown file system for /misc\n"); + LOGERR("Only emmc /misc is supported\n"); } } get_args(&argc, &argv); @@ -254,7 +246,7 @@ int main(int argc, char **argv) { printf("\n"); } - if(crash_counter == 0) { + if (crash_counter == 0) { property_list(Print_Prop, NULL); printf("\n"); } else { @@ -309,7 +301,7 @@ int main(int argc, char **argv) { GUIConsole::Translate_Now(); // Fixup the RTC clock on devices which require it - if(crash_counter == 0) + if (crash_counter == 0) TWFunc::Fixup_Time_On_Boot(); // Run any outstanding OpenRecoveryScript diff --git a/twrpTar.cpp b/twrpTar.cpp index 4f9b63303..7e4d29a7a 100644 --- a/twrpTar.cpp +++ b/twrpTar.cpp @@ -55,9 +55,9 @@ extern "C" { #ifdef TW_INCLUDE_FBE #include "crypto/ext4crypt/ext4crypt_tar.h" -#define TWTAR_FLAGS TAR_GNU | TAR_STORE_SELINUX | TAR_STORE_EXT4_POL +#define TWTAR_FLAGS TAR_GNU | TAR_STORE_SELINUX | TAR_STORE_POSIX_CAP |TAR_STORE_EXT4_POL #else -#define TWTAR_FLAGS TAR_GNU | TAR_STORE_SELINUX +#define TWTAR_FLAGS TAR_GNU | TAR_STORE_SELINUX | TAR_STORE_POSIX_CAP #endif using namespace std; @@ -114,9 +114,7 @@ void twrpTar::Set_Archive_Type(Archive_Type archive_type) { int twrpTar::createTarFork(pid_t *tar_fork_pid) { int status = 0; - pid_t rc_pid; - int progress_pipe[2], ret; - char cmd[512]; + int progress_pipe[2]; file_count = 0; if (backup_exclusions == NULL) { @@ -484,8 +482,8 @@ int twrpTar::createTarFork(pid_t *tar_fork_pid) { int twrpTar::extractTarFork() { int status = 0; - pid_t rc_pid, tar_fork_pid; - int progress_pipe[2], ret; + pid_t tar_fork_pid; + int progress_pipe[2]; if (pipe(progress_pipe) < 0) { LOGINFO("Error creating progress tracking pipe\n"); @@ -661,7 +659,6 @@ int twrpTar::Generate_TarList(string Path, std::vector<TarListStruct> *TarList, struct stat st; string FileName; struct TarListStruct TarItem; - string::size_type i; int ret, file_count; file_count = 0; @@ -770,7 +767,6 @@ int twrpTar::tarList(std::vector<TarListStruct> *TarList, unsigned thread_id) { int list_size = TarList->size(), i = 0, archive_count = 0; string temp; char actual_filename[PATH_MAX]; - char *ptr; unsigned long long fs; if (split_archives) { @@ -987,7 +983,7 @@ int twrpTar::createTar() { fd = pipes[1]; init_libtar_no_buffer(progress_pipe_fd); tar_type.writefunc = write_tar_no_buffer; - if(tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { + if (tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { close(fd); LOGINFO("tar_fdopen failed\n"); gui_err("backup_error=Error creating backup."); @@ -1047,7 +1043,7 @@ int twrpTar::createTar() { fd = pigzfd[1]; // copy parent output init_libtar_no_buffer(progress_pipe_fd); tar_type.writefunc = write_tar_no_buffer; - if(tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { + if (tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { close(fd); LOGINFO("tar_fdopen failed\n"); gui_err("backup_error=Error creating backup."); @@ -1097,7 +1093,7 @@ int twrpTar::createTar() { fd = oaesfd[1]; // copy parent output init_libtar_no_buffer(progress_pipe_fd); tar_type.writefunc = write_tar_no_buffer; - if(tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { + if (tar_fdopen(&t, fd, charRootDir, &tar_type, O_WRONLY | O_CREAT | O_EXCL | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { close(fd); LOGINFO("tar_fdopen failed\n"); gui_err("backup_error=Error creating backup."); @@ -1220,7 +1216,7 @@ int twrpTar::openTar() { close(pipes[1]); close(pipes[3]); fd = pipes[2]; - if(tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { + if (tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { close(fd); LOGINFO("tar_fdopen failed\n"); gui_err("restore_error=Error during restore process."); @@ -1270,7 +1266,7 @@ int twrpTar::openTar() { // Parent close(oaesfd[1]); // close parent output fd = oaesfd[0]; // copy parent input - if(tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { + if (tar_fdopen(&t, fd, charRootDir, NULL, O_RDONLY | O_LARGEFILE, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH, TWTAR_FLAGS) != 0) { close(fd); LOGINFO("tar_fdopen failed\n"); gui_err("restore_error=Error during restore process."); @@ -1536,7 +1532,7 @@ unsigned long long twrpTar::uncompressedSize(string filename) { */ split = TWFunc::split_string(result, ' ', true); if (split.size() > 4) - total_size = atoi(split[5].c_str()); + total_size = atoi(split[5].c_str()); } } else if (current_archive_type == COMPRESSED_ENCRYPTED) { // File is encrypted and may be compressed @@ -1562,7 +1558,7 @@ unsigned long long twrpTar::uncompressedSize(string filename) { */ split = TWFunc::split_string(result, ' ', true); if (split.size() > 4) - total_size = atoi(split[5].c_str()); + total_size = atoi(split[5].c_str()); } } else { total_size = TWFunc::Get_File_Size(filename); @@ -23,4 +23,3 @@ ssize_t write_tar(int fd, const void *buffer, size_t size); ssize_t write_tar_no_buffer(int fd, const void *buffer, size_t size); #endif // _TWRPTAR_HEADER - diff --git a/twrpTar.hpp b/twrpTar.hpp index 78c4c5978..92674ee61 100644 --- a/twrpTar.hpp +++ b/twrpTar.hpp @@ -44,7 +44,6 @@ struct thread_data_struct { unsigned thread_id; }; - class twrpTar { public: twrpTar(); diff --git a/twrpTarMain/Android.mk b/twrpTarMain/Android.mk index f948708d9..a80b4de57 100644 --- a/twrpTarMain/Android.mk +++ b/twrpTarMain/Android.mk @@ -22,11 +22,9 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) endif LOCAL_STATIC_LIBRARIES += libstdc++ -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_C_INCLUDES += external/libselinux/include - LOCAL_STATIC_LIBRARIES += libselinux - LOCAL_CFLAGS += -DHAVE_SELINUX -endif +LOCAL_C_INCLUDES += external/libselinux/include +LOCAL_STATIC_LIBRARIES += libselinux + ifneq ($(RECOVERY_SDCARD_ON_DATA),) LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA endif @@ -65,11 +63,9 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) endif LOCAL_SHARED_LIBRARIES += libstdc++ -ifeq ($(TWHAVE_SELINUX), true) - LOCAL_C_INCLUDES += external/libselinux/include - LOCAL_SHARED_LIBRARIES += libselinux - LOCAL_CFLAGS += -DHAVE_SELINUX -endif +LOCAL_C_INCLUDES += external/libselinux/include +LOCAL_SHARED_LIBRARIES += libselinux + ifneq ($(RECOVERY_SDCARD_ON_DATA),) LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA endif diff --git a/updater/Android.mk b/updater/Android.mk index 23ba592a8..45f1a47b2 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -45,6 +45,10 @@ ifneq ($(wildcard external/lz4/Android.mk),) endif endif +ifeq ($(WITH_CRYPTO_UTILS), true) + LOCAL_STATIC_LIBRARIES += libcrypto_utils_static +endif + LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libbase libotafault libedify libmtdutils libminzip libz LOCAL_STATIC_LIBRARIES += libflashutils libmmcutils libbmlutils diff --git a/updater/install.cpp b/updater/install.cpp index b17c34fb2..d4ae64ee5 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -1456,6 +1456,7 @@ Value* RebootNowFn(const char* name, State* state, int argc, Expr* argv[]) { memset(buffer, 0, sizeof(((struct bootloader_message*)0)->command)); FILE* f = fopen(filename, "r+b"); fseek(f, offsetof(struct bootloader_message, command), SEEK_SET); + fseek(f, BOOTLOADER_MESSAGE_OFFSET_IN_MISC, SEEK_CUR); ota_fwrite(buffer, sizeof(((struct bootloader_message*)0)->command), 1, f); fclose(f); free(filename); @@ -1498,6 +1499,7 @@ Value* SetStageFn(const char* name, State* state, int argc, Expr* argv[]) { // package installation. FILE* f = fopen(filename, "r+b"); fseek(f, offsetof(struct bootloader_message, stage), SEEK_SET); + fseek(f, BOOTLOADER_MESSAGE_OFFSET_IN_MISC, SEEK_CUR); int to_write = strlen(stagestr)+1; int max_size = sizeof(((struct bootloader_message*)0)->stage); if (to_write > max_size) { @@ -1524,6 +1526,7 @@ Value* GetStageFn(const char* name, State* state, int argc, Expr* argv[]) { char buffer[sizeof(((struct bootloader_message*)0)->stage)]; FILE* f = fopen(filename, "rb"); fseek(f, offsetof(struct bootloader_message, stage), SEEK_SET); + fseek(f, BOOTLOADER_MESSAGE_OFFSET_IN_MISC, SEEK_CUR); ota_fread(buffer, sizeof(buffer), 1, f); fclose(f); buffer[sizeof(buffer)-1] = '\0'; diff --git a/variables.h b/variables.h index 9cdbfb61e..344690229 100644 --- a/variables.h +++ b/variables.h @@ -17,7 +17,8 @@ #ifndef _VARIABLES_HEADER_ #define _VARIABLES_HEADER_ -#define TW_VERSION_STR "3.0.3-0" +#define TW_MAIN_VERSION_STR "3.0.3" +#define TW_VERSION_STR TW_MAIN_VERSION_STR TW_DEVICE_VERSION #define TW_USE_COMPRESSION_VAR "tw_use_compression" #define TW_FILENAME "tw_filename" |