From ce2fe779c028eeb198120b6d43e0a242a7113465 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Fri, 28 Sep 2012 12:34:33 -0400 Subject: Revert busybox for CM7 compatibility, add exclamation point to format data --- Android.mk | 14 -------------- gui/devices/1024x600/res/images/exclamation200.png | Bin 0 -> 5260 bytes gui/devices/1024x600/res/ui.xml | 16 +++++++++++++++- gui/devices/1024x768/res/images/exclamation200.png | Bin 0 -> 5260 bytes gui/devices/1024x768/res/ui.xml | 16 +++++++++++++++- gui/devices/1280x800/res/images/exclamation200.png | Bin 0 -> 5260 bytes gui/devices/1280x800/res/ui.xml | 16 +++++++++++++++- gui/devices/1920x1200/res/images/exclamation400.png | Bin 0 -> 11295 bytes gui/devices/1920x1200/res/ui.xml | 16 +++++++++++++++- gui/devices/320x480/res/images/exclamation150.png | Bin 0 -> 6460 bytes gui/devices/320x480/res/ui.xml | 18 ++++++++++++++++-- gui/devices/480x800/res/images/exclamation200.png | Bin 0 -> 5260 bytes gui/devices/480x800/res/ui.xml | 18 ++++++++++++++++-- gui/devices/480x854/res/images/exclamation200.png | Bin 0 -> 5260 bytes gui/devices/480x854/res/ui.xml | 18 ++++++++++++++++-- gui/devices/540x960/res/images/exclamation300.png | Bin 0 -> 13488 bytes gui/devices/540x960/res/ui.xml | 18 ++++++++++++++++-- gui/devices/720x1280/res/ui.xml | 16 ++++++++++++++-- gui/devices/800x1280/res/images/exclamation400.png | Bin 0 -> 11295 bytes gui/devices/800x1280/res/ui.xml | 18 ++++++++++++++++-- gui/devices/800x480/res/images/exclamation150.png | Bin 0 -> 6460 bytes gui/devices/800x480/res/ui.xml | 16 +++++++++++++++- partition.cpp | 8 +++++--- prebuilt/Android.mk | 9 +++++++++ prebuilt/bbinstall.sh | 14 ++++++++++++++ recovery.cpp | 2 ++ variables.h | 2 +- 27 files changed, 200 insertions(+), 35 deletions(-) create mode 100644 gui/devices/1024x600/res/images/exclamation200.png create mode 100644 gui/devices/1024x768/res/images/exclamation200.png create mode 100644 gui/devices/1280x800/res/images/exclamation200.png create mode 100644 gui/devices/1920x1200/res/images/exclamation400.png create mode 100644 gui/devices/320x480/res/images/exclamation150.png create mode 100644 gui/devices/480x800/res/images/exclamation200.png create mode 100644 gui/devices/480x854/res/images/exclamation200.png create mode 100644 gui/devices/540x960/res/images/exclamation300.png create mode 100644 gui/devices/800x1280/res/images/exclamation400.png create mode 100644 gui/devices/800x480/res/images/exclamation150.png create mode 100755 prebuilt/bbinstall.sh diff --git a/Android.mk b/Android.mk index 7187ae73e..f7d75f94c 100644 --- a/Android.mk +++ b/Android.mk @@ -205,22 +205,8 @@ ifeq ($(TW_INCLUDE_JB_CRYPTO), true) LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include endif - include $(BUILD_EXECUTABLE) -# Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead -BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links) -exclude := tune2fs mke2fs mkdosfs gzip gunzip -RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS)))) -$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox -$(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) - @echo "Symlink: $@ -> $(BUSYBOX_BINARY)" - @mkdir -p $(dir $@) - @rm -rf $@ - $(hide) ln -sf $(BUSYBOX_BINARY) $@ - -ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS) - include $(CLEAR_VARS) LOCAL_MODULE := verifier_test LOCAL_FORCE_STATIC_EXECUTABLE := true diff --git a/gui/devices/1024x600/res/images/exclamation200.png b/gui/devices/1024x600/res/images/exclamation200.png new file mode 100644 index 000000000..96258a1c3 Binary files /dev/null and b/gui/devices/1024x600/res/images/exclamation200.png differ diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index 7a0bbd00d..7fcb75aa8 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -41,6 +41,7 @@ + @@ -170,6 +171,8 @@ + + @@ -822,6 +825,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -829,6 +833,14 @@ + + + + + + + + @@ -855,7 +867,7 @@ - + Press back button to cancel. @@ -1575,9 +1587,11 @@ tw_action2_param=tw_zip_location=/sdcard tw_text1=Format Data? (This wipes all media tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/1024x768/res/images/exclamation200.png b/gui/devices/1024x768/res/images/exclamation200.png new file mode 100644 index 000000000..96258a1c3 Binary files /dev/null and b/gui/devices/1024x768/res/images/exclamation200.png differ diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index cc9701ba1..596c320e1 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -41,6 +41,7 @@ + @@ -170,6 +171,8 @@ + + @@ -822,6 +825,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -829,6 +833,14 @@ + + + + + + + + @@ -855,7 +867,7 @@ - + Press back button to cancel. @@ -1575,9 +1587,11 @@ tw_action2_param=tw_zip_location=/sdcard tw_text1=Format Data? (This wipes all media tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/1280x800/res/images/exclamation200.png b/gui/devices/1280x800/res/images/exclamation200.png new file mode 100644 index 000000000..96258a1c3 Binary files /dev/null and b/gui/devices/1280x800/res/images/exclamation200.png differ diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index 2e5b32905..4b06c0433 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -41,6 +41,7 @@ + @@ -170,6 +171,8 @@ + + @@ -822,6 +825,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -829,6 +833,14 @@ + + + + + + + + @@ -855,7 +867,7 @@ - + Press back button to cancel. @@ -1575,9 +1587,11 @@ tw_action2_param=tw_zip_location=/sdcard tw_text1=Format Data? (This wipes all media tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/1920x1200/res/images/exclamation400.png b/gui/devices/1920x1200/res/images/exclamation400.png new file mode 100644 index 000000000..f3a8aabb6 Binary files /dev/null and b/gui/devices/1920x1200/res/images/exclamation400.png differ diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index 17ccfe922..6ff72d643 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -41,6 +41,7 @@ + @@ -170,6 +171,8 @@ + + @@ -822,6 +825,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -829,6 +833,14 @@ + + + + + + + + @@ -855,7 +867,7 @@ - + Press back button to cancel. @@ -1575,9 +1587,11 @@ tw_action2_param=tw_zip_location=/sdcard tw_text1=Format Data? (This wipes all media tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/320x480/res/images/exclamation150.png b/gui/devices/320x480/res/images/exclamation150.png new file mode 100644 index 000000000..6e05987c1 Binary files /dev/null and b/gui/devices/320x480/res/images/exclamation150.png differ diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index efa980ac4..a98165b4a 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -39,6 +39,7 @@ + @@ -155,6 +156,8 @@ + + @@ -794,6 +797,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -801,6 +805,14 @@ + + + + + + + + @@ -827,7 +839,7 @@ - + Press back button to cancel. @@ -1153,11 +1165,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/480x800/res/images/exclamation200.png b/gui/devices/480x800/res/images/exclamation200.png new file mode 100644 index 000000000..96258a1c3 Binary files /dev/null and b/gui/devices/480x800/res/images/exclamation200.png differ diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index 435efb079..d348f3875 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -39,6 +39,7 @@ + @@ -154,6 +155,8 @@ + + @@ -793,6 +796,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -800,6 +804,14 @@ + + + + + + + + @@ -826,7 +838,7 @@ - + Press back button to cancel. @@ -1152,11 +1164,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/480x854/res/images/exclamation200.png b/gui/devices/480x854/res/images/exclamation200.png new file mode 100644 index 000000000..96258a1c3 Binary files /dev/null and b/gui/devices/480x854/res/images/exclamation200.png differ diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index ff0035723..7badfd3e7 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -39,6 +39,7 @@ + @@ -153,6 +154,8 @@ + + @@ -792,6 +795,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -799,6 +803,14 @@ + + + + + + + + @@ -825,7 +837,7 @@ - + Press back button to cancel. @@ -1151,11 +1163,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/540x960/res/images/exclamation300.png b/gui/devices/540x960/res/images/exclamation300.png new file mode 100644 index 000000000..1ac400d11 Binary files /dev/null and b/gui/devices/540x960/res/images/exclamation300.png differ diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index ca008d5ab..af8ea0d4d 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -39,6 +39,7 @@ + @@ -154,6 +155,8 @@ + + @@ -793,6 +796,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -800,6 +804,14 @@ + + + + + + + + @@ -826,7 +838,7 @@ - + Press back button to cancel. @@ -1152,11 +1164,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index d0973b2ef..62b04568d 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -39,6 +39,7 @@ + @@ -159,6 +160,8 @@ + + @@ -798,6 +801,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -805,6 +809,12 @@ + + + + + + @@ -831,7 +841,7 @@ - + Press back button to cancel. @@ -1157,11 +1167,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/800x1280/res/images/exclamation400.png b/gui/devices/800x1280/res/images/exclamation400.png new file mode 100644 index 000000000..f3a8aabb6 Binary files /dev/null and b/gui/devices/800x1280/res/images/exclamation400.png differ diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index b7c1e0429..54bc5dbed 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -39,6 +39,7 @@ + @@ -155,6 +156,8 @@ + + @@ -794,6 +797,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -801,6 +805,14 @@ + + + + + + + + @@ -827,7 +839,7 @@ - + Press back button to cancel. @@ -1153,11 +1165,13 @@ tw_has_action2=1 tw_action2=set tw_action2_param=tw_zip_location=/sdcard - tw_text1=Format Data? (This wipes all media + tw_text1=Format Data? (This wipes all internal storage tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/gui/devices/800x480/res/images/exclamation150.png b/gui/devices/800x480/res/images/exclamation150.png new file mode 100644 index 000000000..6e05987c1 Binary files /dev/null and b/gui/devices/800x480/res/images/exclamation150.png differ diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index 4454ffefb..7832ebbc8 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -41,6 +41,7 @@ + @@ -170,6 +171,8 @@ + + @@ -822,6 +825,7 @@ tw_has_cancel=0 tw_cancel_action= tw_cancel_param= + tw_show_exclamation=0 %tw_clear_destination% @@ -829,6 +833,14 @@ + + + + + + + + @@ -855,7 +867,7 @@ - + Press back button to cancel. @@ -1575,9 +1587,11 @@ tw_action2_param=tw_zip_location=/sdcard tw_text1=Format Data? (This wipes all media tw_text2=including backups & removes encryption) + tw_text3=Most of the time you do not need to do this. tw_action_text1=Formatting Data... tw_complete_text1=Data Format Complete tw_slider_text=Swipe to Format + tw_show_exclamation=1 confirm_action diff --git a/partition.cpp b/partition.cpp index 633011ba6..3ef206a80 100644 --- a/partition.cpp +++ b/partition.cpp @@ -209,9 +209,10 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) { Display_Name = "Cache"; Wipe_Available_in_GUI = true; Wipe_During_Factory_Reset = true; - if (!TWFunc::Path_Exists("/cache/recovery")) { + if (Mount(false) && !TWFunc::Path_Exists("/cache/recovery/.")) { + string Recreate_Command = "cd /cache && mkdir recovery"; LOGI("Recreating /cache/recovery folder.\n"); - TWFunc::Recursive_Mkdir("/cache/recovery"); + system(Recreate_Command.c_str()); } } else if (Mount_Point == "/datadata") { Wipe_During_Factory_Reset = true; @@ -1373,9 +1374,10 @@ void TWPartition::Recreate_AndSec_Folder(void) { LOGE("Unable to recreate android secure folder.\n"); } else if (!TWFunc::Path_Exists(Symlink_Path)) { LOGI("Recreating android secure folder.\n"); - TWFunc::Recursive_Mkdir(Symlink_Path); Command = "umount " + Symlink_Mount_Point; system(Command.c_str()); + Command = "cd " + Mount_Point + " && mkdir .android_secure"; + system(Command.c_str()); Command = "mount " + Symlink_Path + " " + Symlink_Mount_Point; system(Command.c_str()); } diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index 048077a22..8b7c2f17a 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -71,6 +71,15 @@ LOCAL_GENERATED_SOURCES := $(GEN) LOCAL_SRC_FILES := teamwin $(GEN) include $(BUILD_PREBUILT) +#bbinstall.sh +include $(CLEAR_VARS) +LOCAL_MODULE := bbinstall.sh +LOCAL_MODULE_TAGS := eng +LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +LOCAL_SRC_FILES := $(LOCAL_MODULE) +include $(BUILD_PREBUILT) + #fix_permissions include $(CLEAR_VARS) LOCAL_MODULE := fix_permissions.sh diff --git a/prebuilt/bbinstall.sh b/prebuilt/bbinstall.sh new file mode 100755 index 000000000..2aab96958 --- /dev/null +++ b/prebuilt/bbinstall.sh @@ -0,0 +1,14 @@ +#!/sbin/sh + +if [ -f "/sbin/[" ]; +then +exit +fi + +for cmd in $(/sbin/busybox --list); do + /sbin/busybox ln -s /sbin/busybox /sbin/$cmd +done + +ln -sf /sbin/pigz /sbin/gzip +ln -sf /sbin/unpigz /sbin/gunzip +rm /sbin/mkdosfs \ No newline at end of file diff --git a/recovery.cpp b/recovery.cpp index 41bd080ce..f6bfd4537 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -809,6 +809,8 @@ main(int argc, char **argv) { DataManager_LoadDefaults(); printf("Starting the UI..."); gui_init(); + printf("=> Installing busybox into /sbin\n"); + system("/sbin/bbinstall.sh"); // Let's install busybox printf("=> Linking mtab\n"); system("ln -s /proc/mounts /etc/mtab"); // And link mtab for mke2fs printf("=> Processing recovery.fstab\n"); diff --git a/variables.h b/variables.h index d3ca67eb6..860b35717 100644 --- a/variables.h +++ b/variables.h @@ -17,7 +17,7 @@ #ifndef _VARIABLES_HEADER_ #define _VARIABLES_HEADER_ -#define TW_VERSION_STR "2.3.0.0RC0" +#define TW_VERSION_STR "2.3.0.0RC1" #define TW_USE_COMPRESSION_VAR "tw_use_compression" #define TW_IGNORE_IMAGE_SIZE "tw_ignore_image_size" -- cgit v1.2.3