summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/Android.mk96
-rw-r--r--gui/action.cpp1398
-rw-r--r--gui/animation.cpp136
-rwxr-xr-xgui/basicTheme/mkTheme.sh6
-rwxr-xr-xgui/basicTheme/res/fonts/bluehighway-25.datbin0 -> 3299 bytes
-rwxr-xr-xgui/basicTheme/res/fonts/bluehighway-40.datbin0 -> 7367 bytes
-rw-r--r--gui/basicTheme/res/images/android.pngbin0 -> 2043 bytes
-rw-r--r--gui/basicTheme/res/images/checkbox_checked.pngbin0 -> 858 bytes
-rw-r--r--gui/basicTheme/res/images/checkbox_empty.pngbin0 -> 311 bytes
-rw-r--r--gui/basicTheme/res/images/file.pngbin0 -> 533 bytes
-rw-r--r--gui/basicTheme/res/images/folder.pngbin0 -> 591 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/basicTheme/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-medium-button.pngbin0 -> 1911 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-menu-button.pngbin0 -> 3925 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-minus-button.pngbin0 -> 819 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-plus-button.pngbin0 -> 845 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-small-button.pngbin0 -> 807 bytes
-rw-r--r--gui/basicTheme/res/images/qhd-sort-button.pngbin0 -> 854 bytes
-rw-r--r--gui/basicTheme/res/images/slideout.pngbin0 -> 1245 bytes
-rw-r--r--gui/basicTheme/res/ui.xml1949
-rw-r--r--gui/basicTheme/ui.zipbin0 -> 36681 bytes
-rw-r--r--gui/blanktimer.cpp169
-rw-r--r--gui/blanktimer.hpp60
-rw-r--r--gui/button.cpp290
-rw-r--r--gui/checkbox.cpp172
-rw-r--r--gui/conditional.cpp204
-rw-r--r--gui/console.cpp403
-rwxr-xr-xgui/devices/1024x600/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/1024x600/res/images/back-icon.pngbin0 -> 508 bytes
-rw-r--r--gui/devices/1024x600/res/images/background.jpgbin0 -> 5843 bytes
-rw-r--r--gui/devices/1024x600/res/images/button.pngbin0 -> 866 bytes
-rw-r--r--gui/devices/1024x600/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/1024x600/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/1024x600/res/images/console-icon.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/1024x600/res/images/console-toggle.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/1024x600/res/images/curtain.jpgbin0 -> 50571 bytes
-rw-r--r--gui/devices/1024x600/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/1024x600/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/1024x600/res/images/home-icon.pngbin0 -> 426 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rwxr-xr-xgui/devices/1024x600/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/1024x600/res/images/keyboard1.pngbin0 -> 21074 bytes
-rw-r--r--gui/devices/1024x600/res/images/keyboard2.pngbin0 -> 21920 bytes
-rw-r--r--gui/devices/1024x600/res/images/keyboard3.pngbin0 -> 21305 bytes
-rw-r--r--gui/devices/1024x600/res/images/keyboard4.pngbin0 -> 19039 bytes
-rw-r--r--gui/devices/1024x600/res/images/medium-button.pngbin0 -> 366 bytes
-rw-r--r--gui/devices/1024x600/res/images/mediumwide-button.pngbin0 -> 390 bytes
-rw-r--r--gui/devices/1024x600/res/images/minus-button.pngbin0 -> 275 bytes
-rw-r--r--gui/devices/1024x600/res/images/plus-button.pngbin0 -> 342 bytes
-rw-r--r--gui/devices/1024x600/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/1024x600/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/1024x600/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/1024x600/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/1024x600/res/images/slider-touch.pngbin0 -> 6365 bytes
-rw-r--r--gui/devices/1024x600/res/images/slider-used.pngbin0 -> 2067 bytes
-rw-r--r--gui/devices/1024x600/res/images/slider.pngbin0 -> 3730 bytes
-rw-r--r--gui/devices/1024x600/res/images/sort-button.pngbin0 -> 406 bytes
-rw-r--r--gui/devices/1024x600/res/images/unlock.pngbin0 -> 22631 bytes
-rwxr-xr-xgui/devices/1024x600/res/ui.xml3865
-rwxr-xr-xgui/devices/1024x768/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/1024x768/res/images/back-icon.pngbin0 -> 508 bytes
-rw-r--r--gui/devices/1024x768/res/images/background.jpgbin0 -> 5843 bytes
-rw-r--r--gui/devices/1024x768/res/images/button.pngbin0 -> 866 bytes
-rw-r--r--gui/devices/1024x768/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/1024x768/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/1024x768/res/images/console-icon.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/1024x768/res/images/console-toggle.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/1024x768/res/images/curtain.jpgbin0 -> 46463 bytes
-rw-r--r--gui/devices/1024x768/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/1024x768/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/1024x768/res/images/home-icon.pngbin0 -> 426 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rwxr-xr-xgui/devices/1024x768/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/1024x768/res/images/keyboard1.pngbin0 -> 32295 bytes
-rw-r--r--gui/devices/1024x768/res/images/keyboard2.pngbin0 -> 33493 bytes
-rw-r--r--gui/devices/1024x768/res/images/keyboard3.pngbin0 -> 31367 bytes
-rw-r--r--gui/devices/1024x768/res/images/keyboard4.pngbin0 -> 29916 bytes
-rw-r--r--gui/devices/1024x768/res/images/medium-button.pngbin0 -> 366 bytes
-rw-r--r--gui/devices/1024x768/res/images/mediumwide-button.pngbin0 -> 390 bytes
-rw-r--r--gui/devices/1024x768/res/images/minus-button.pngbin0 -> 275 bytes
-rw-r--r--gui/devices/1024x768/res/images/plus-button.pngbin0 -> 342 bytes
-rw-r--r--gui/devices/1024x768/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/1024x768/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/1024x768/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/1024x768/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/1024x768/res/images/slider-touch.pngbin0 -> 6365 bytes
-rw-r--r--gui/devices/1024x768/res/images/slider-used.pngbin0 -> 2067 bytes
-rw-r--r--gui/devices/1024x768/res/images/slider.pngbin0 -> 3730 bytes
-rw-r--r--gui/devices/1024x768/res/images/sort-button.pngbin0 -> 406 bytes
-rw-r--r--gui/devices/1024x768/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/1024x768/res/ui.xml3865
-rw-r--r--gui/devices/1080x1920/res/fonts/Roboto-Condensed-40.datbin0 -> 12724 bytes
-rw-r--r--gui/devices/1080x1920/res/images/back-icon.pngbin0 -> 2627 bytes
-rw-r--r--gui/devices/1080x1920/res/images/checkbox_checked.pngbin0 -> 1807 bytes
-rw-r--r--gui/devices/1080x1920/res/images/checkbox_empty.pngbin0 -> 586 bytes
-rw-r--r--gui/devices/1080x1920/res/images/curtain.jpgbin0 -> 107182 bytes
-rw-r--r--gui/devices/1080x1920/res/images/file.pngbin0 -> 1267 bytes
-rw-r--r--gui/devices/1080x1920/res/images/folder.pngbin0 -> 1069 bytes
-rw-r--r--gui/devices/1080x1920/res/images/home-icon.pngbin0 -> 2433 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate001.pngbin0 -> 3791 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate002.pngbin0 -> 3796 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate003.pngbin0 -> 3772 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate004.pngbin0 -> 3760 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate005.pngbin0 -> 3780 bytes
-rw-r--r--gui/devices/1080x1920/res/images/indeterminate006.pngbin0 -> 3732 bytes
-rw-r--r--gui/devices/1080x1920/res/images/keyboard1.pngbin0 -> 65355 bytes
-rw-r--r--gui/devices/1080x1920/res/images/keyboard2.pngbin0 -> 66480 bytes
-rw-r--r--gui/devices/1080x1920/res/images/keyboard3.pngbin0 -> 57703 bytes
-rw-r--r--gui/devices/1080x1920/res/images/keyboard4.pngbin0 -> 54577 bytes
-rw-r--r--gui/devices/1080x1920/res/images/medium-button.pngbin0 -> 3359 bytes
-rw-r--r--gui/devices/1080x1920/res/images/menu-button.pngbin0 -> 8122 bytes
-rw-r--r--gui/devices/1080x1920/res/images/minus-button.pngbin0 -> 815 bytes
-rw-r--r--gui/devices/1080x1920/res/images/plus-button.pngbin0 -> 1117 bytes
-rw-r--r--gui/devices/1080x1920/res/images/progress_empty.pngbin0 -> 261 bytes
-rw-r--r--gui/devices/1080x1920/res/images/progress_fill.pngbin0 -> 316 bytes
-rw-r--r--gui/devices/1080x1920/res/images/radio_empty.pngbin0 -> 2673 bytes
-rw-r--r--gui/devices/1080x1920/res/images/radio_selected.pngbin0 -> 3432 bytes
-rw-r--r--gui/devices/1080x1920/res/images/slideout.pngbin0 -> 3254 bytes
-rw-r--r--gui/devices/1080x1920/res/images/slider-touch.pngbin0 -> 29925 bytes
-rw-r--r--gui/devices/1080x1920/res/images/slider-used.pngbin0 -> 9123 bytes
-rw-r--r--gui/devices/1080x1920/res/images/slider.pngbin0 -> 21895 bytes
-rw-r--r--gui/devices/1080x1920/res/images/sort-button.pngbin0 -> 1495 bytes
-rw-r--r--gui/devices/1080x1920/res/images/top-bar.jpgbin0 -> 6749 bytes
-rw-r--r--gui/devices/1080x1920/res/images/unlock.pngbin0 -> 68671 bytes
-rw-r--r--gui/devices/1080x1920/res/ui.xml3859
-rw-r--r--gui/devices/1200x1920/res/fonts/Roboto-Condensed-40.datbin0 -> 12724 bytes
-rw-r--r--gui/devices/1200x1920/res/images/back-icon.pngbin0 -> 2627 bytes
-rw-r--r--gui/devices/1200x1920/res/images/checkbox_checked.pngbin0 -> 1807 bytes
-rw-r--r--gui/devices/1200x1920/res/images/checkbox_empty.pngbin0 -> 586 bytes
-rw-r--r--gui/devices/1200x1920/res/images/curtain.jpgbin0 -> 117734 bytes
-rw-r--r--gui/devices/1200x1920/res/images/file.pngbin0 -> 1267 bytes
-rw-r--r--gui/devices/1200x1920/res/images/folder.pngbin0 -> 1069 bytes
-rw-r--r--gui/devices/1200x1920/res/images/home-icon.pngbin0 -> 2433 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate001.pngbin0 -> 3791 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate002.pngbin0 -> 3796 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate003.pngbin0 -> 3772 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate004.pngbin0 -> 3760 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate005.pngbin0 -> 3780 bytes
-rw-r--r--gui/devices/1200x1920/res/images/indeterminate006.pngbin0 -> 3732 bytes
-rw-r--r--gui/devices/1200x1920/res/images/keyboard1.pngbin0 -> 44686 bytes
-rw-r--r--gui/devices/1200x1920/res/images/keyboard2.pngbin0 -> 47744 bytes
-rw-r--r--gui/devices/1200x1920/res/images/keyboard3.pngbin0 -> 46322 bytes
-rw-r--r--gui/devices/1200x1920/res/images/keyboard4.pngbin0 -> 41162 bytes
-rw-r--r--gui/devices/1200x1920/res/images/medium-button.pngbin0 -> 3359 bytes
-rw-r--r--gui/devices/1200x1920/res/images/menu-button.pngbin0 -> 8076 bytes
-rw-r--r--gui/devices/1200x1920/res/images/minus-button.pngbin0 -> 815 bytes
-rw-r--r--gui/devices/1200x1920/res/images/plus-button.pngbin0 -> 1117 bytes
-rw-r--r--gui/devices/1200x1920/res/images/progress_empty.pngbin0 -> 261 bytes
-rw-r--r--gui/devices/1200x1920/res/images/progress_fill.pngbin0 -> 316 bytes
-rw-r--r--gui/devices/1200x1920/res/images/radio_empty.pngbin0 -> 2673 bytes
-rw-r--r--gui/devices/1200x1920/res/images/radio_selected.pngbin0 -> 3432 bytes
-rw-r--r--gui/devices/1200x1920/res/images/slideout.pngbin0 -> 3254 bytes
-rw-r--r--gui/devices/1200x1920/res/images/slider-touch.pngbin0 -> 29925 bytes
-rw-r--r--gui/devices/1200x1920/res/images/slider-used.pngbin0 -> 9123 bytes
-rw-r--r--gui/devices/1200x1920/res/images/slider.pngbin0 -> 21895 bytes
-rw-r--r--gui/devices/1200x1920/res/images/sort-button.pngbin0 -> 1495 bytes
-rw-r--r--gui/devices/1200x1920/res/images/top-bar.jpgbin0 -> 14130 bytes
-rw-r--r--gui/devices/1200x1920/res/images/unlock.pngbin0 -> 68671 bytes
-rw-r--r--gui/devices/1200x1920/res/ui.xml3862
-rwxr-xr-xgui/devices/1280x800/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/1280x800/res/images/back-icon.pngbin0 -> 508 bytes
-rw-r--r--gui/devices/1280x800/res/images/background.jpgbin0 -> 7052 bytes
-rw-r--r--gui/devices/1280x800/res/images/button.pngbin0 -> 866 bytes
-rw-r--r--gui/devices/1280x800/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/1280x800/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/1280x800/res/images/console-icon.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/1280x800/res/images/console-toggle.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/1280x800/res/images/curtain.jpgbin0 -> 75849 bytes
-rw-r--r--gui/devices/1280x800/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/1280x800/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/1280x800/res/images/home-icon.pngbin0 -> 426 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rwxr-xr-xgui/devices/1280x800/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/1280x800/res/images/keyboard1.pngbin0 -> 29768 bytes
-rw-r--r--gui/devices/1280x800/res/images/keyboard2.pngbin0 -> 31635 bytes
-rw-r--r--gui/devices/1280x800/res/images/keyboard3.pngbin0 -> 31763 bytes
-rw-r--r--gui/devices/1280x800/res/images/keyboard4.pngbin0 -> 30614 bytes
-rw-r--r--gui/devices/1280x800/res/images/medium-button.pngbin0 -> 366 bytes
-rw-r--r--gui/devices/1280x800/res/images/mediumwide-button.pngbin0 -> 390 bytes
-rw-r--r--gui/devices/1280x800/res/images/minus-button.pngbin0 -> 275 bytes
-rw-r--r--gui/devices/1280x800/res/images/plus-button.pngbin0 -> 342 bytes
-rw-r--r--gui/devices/1280x800/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/1280x800/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/1280x800/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/1280x800/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/1280x800/res/images/slider-touch.pngbin0 -> 6365 bytes
-rw-r--r--gui/devices/1280x800/res/images/slider-used.pngbin0 -> 2067 bytes
-rw-r--r--gui/devices/1280x800/res/images/slider.pngbin0 -> 3730 bytes
-rw-r--r--gui/devices/1280x800/res/images/sort-button.pngbin0 -> 406 bytes
-rw-r--r--gui/devices/1280x800/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/1280x800/res/ui.xml3865
-rw-r--r--gui/devices/1920x1200/res/fonts/Roboto-Regular-30.datbin0 -> 8722 bytes
-rw-r--r--gui/devices/1920x1200/res/images/back-icon.pngbin0 -> 1614 bytes
-rw-r--r--gui/devices/1920x1200/res/images/background.jpgbin0 -> 10226 bytes
-rw-r--r--gui/devices/1920x1200/res/images/button.pngbin0 -> 3054 bytes
-rw-r--r--gui/devices/1920x1200/res/images/checkbox_checked.pngbin0 -> 1548 bytes
-rw-r--r--gui/devices/1920x1200/res/images/checkbox_empty.pngbin0 -> 440 bytes
-rw-r--r--gui/devices/1920x1200/res/images/console-icon.pngbin0 -> 2198 bytes
-rw-r--r--gui/devices/1920x1200/res/images/console-toggle.pngbin0 -> 2072 bytes
-rw-r--r--gui/devices/1920x1200/res/images/curtain.jpgbin0 -> 84783 bytes
-rw-r--r--gui/devices/1920x1200/res/images/file.pngbin0 -> 982 bytes
-rw-r--r--gui/devices/1920x1200/res/images/folder.pngbin0 -> 902 bytes
-rw-r--r--gui/devices/1920x1200/res/images/home-icon.pngbin0 -> 1466 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate001.pngbin0 -> 3791 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate002.pngbin0 -> 3796 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate003.pngbin0 -> 3772 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate004.pngbin0 -> 3760 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate005.pngbin0 -> 3780 bytes
-rwxr-xr-xgui/devices/1920x1200/res/images/indeterminate006.pngbin0 -> 3732 bytes
-rw-r--r--gui/devices/1920x1200/res/images/keyboard1.pngbin0 -> 107358 bytes
-rw-r--r--gui/devices/1920x1200/res/images/keyboard2.pngbin0 -> 115842 bytes
-rw-r--r--gui/devices/1920x1200/res/images/keyboard3.pngbin0 -> 111470 bytes
-rw-r--r--gui/devices/1920x1200/res/images/keyboard4.pngbin0 -> 107902 bytes
-rw-r--r--gui/devices/1920x1200/res/images/medium-button.pngbin0 -> 862 bytes
-rw-r--r--gui/devices/1920x1200/res/images/mediumwide-button.pngbin0 -> 910 bytes
-rw-r--r--gui/devices/1920x1200/res/images/minus-button.pngbin0 -> 635 bytes
-rw-r--r--gui/devices/1920x1200/res/images/plus-button.pngbin0 -> 977 bytes
-rw-r--r--gui/devices/1920x1200/res/images/progress_empty.pngbin0 -> 261 bytes
-rw-r--r--gui/devices/1920x1200/res/images/progress_fill.pngbin0 -> 316 bytes
-rw-r--r--gui/devices/1920x1200/res/images/radio_empty.pngbin0 -> 2673 bytes
-rw-r--r--gui/devices/1920x1200/res/images/radio_selected.pngbin0 -> 3432 bytes
-rw-r--r--gui/devices/1920x1200/res/images/slider-touch.pngbin0 -> 20867 bytes
-rw-r--r--gui/devices/1920x1200/res/images/slider-used.pngbin0 -> 6807 bytes
-rw-r--r--gui/devices/1920x1200/res/images/slider.pngbin0 -> 14723 bytes
-rw-r--r--gui/devices/1920x1200/res/images/sort-button.pngbin0 -> 1033 bytes
-rw-r--r--gui/devices/1920x1200/res/images/unlock.pngbin0 -> 68671 bytes
-rw-r--r--gui/devices/1920x1200/res/ui.xml3865
-rw-r--r--gui/devices/2560x1600/res/fonts/Roboto-Regular-40.datbin0 -> 15345 bytes
-rw-r--r--gui/devices/2560x1600/res/images/back-icon.pngbin0 -> 2786 bytes
-rw-r--r--gui/devices/2560x1600/res/images/background.jpgbin0 -> 15891 bytes
-rw-r--r--gui/devices/2560x1600/res/images/button.pngbin0 -> 6337 bytes
-rw-r--r--gui/devices/2560x1600/res/images/checkbox_checked.pngbin0 -> 2466 bytes
-rw-r--r--gui/devices/2560x1600/res/images/checkbox_empty.pngbin0 -> 641 bytes
-rw-r--r--gui/devices/2560x1600/res/images/console-icon.pngbin0 -> 3600 bytes
-rw-r--r--gui/devices/2560x1600/res/images/console-toggle.pngbin0 -> 3249 bytes
-rw-r--r--gui/devices/2560x1600/res/images/curtain.jpgbin0 -> 165524 bytes
-rw-r--r--gui/devices/2560x1600/res/images/file.pngbin0 -> 1502 bytes
-rw-r--r--gui/devices/2560x1600/res/images/folder.pngbin0 -> 1412 bytes
-rw-r--r--gui/devices/2560x1600/res/images/home-icon.pngbin0 -> 2634 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate001.pngbin0 -> 21968 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate002.pngbin0 -> 21883 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate003.pngbin0 -> 21993 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate004.pngbin0 -> 21960 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate005.pngbin0 -> 22105 bytes
-rwxr-xr-xgui/devices/2560x1600/res/images/indeterminate006.pngbin0 -> 21973 bytes
-rw-r--r--gui/devices/2560x1600/res/images/keyboard1.pngbin0 -> 52841 bytes
-rw-r--r--gui/devices/2560x1600/res/images/keyboard2.pngbin0 -> 54398 bytes
-rw-r--r--gui/devices/2560x1600/res/images/keyboard3.pngbin0 -> 51755 bytes
-rw-r--r--gui/devices/2560x1600/res/images/keyboard4.pngbin0 -> 48423 bytes
-rw-r--r--gui/devices/2560x1600/res/images/medium-button.pngbin0 -> 1306 bytes
-rw-r--r--gui/devices/2560x1600/res/images/mediumwide-button.pngbin0 -> 1395 bytes
-rw-r--r--gui/devices/2560x1600/res/images/minus-button.pngbin0 -> 943 bytes
-rw-r--r--gui/devices/2560x1600/res/images/plus-button.pngbin0 -> 1438 bytes
-rw-r--r--gui/devices/2560x1600/res/images/progress_empty.pngbin0 -> 310 bytes
-rw-r--r--gui/devices/2560x1600/res/images/progress_fill.pngbin0 -> 380 bytes
-rw-r--r--gui/devices/2560x1600/res/images/radio_empty.pngbin0 -> 4353 bytes
-rw-r--r--gui/devices/2560x1600/res/images/radio_selected.pngbin0 -> 5750 bytes
-rw-r--r--gui/devices/2560x1600/res/images/slider-touch.pngbin0 -> 34883 bytes
-rw-r--r--gui/devices/2560x1600/res/images/slider-used.pngbin0 -> 11888 bytes
-rw-r--r--gui/devices/2560x1600/res/images/slider.pngbin0 -> 25897 bytes
-rw-r--r--gui/devices/2560x1600/res/images/sort-button.pngbin0 -> 1583 bytes
-rw-r--r--gui/devices/2560x1600/res/images/unlock.pngbin0 -> 116644 bytes
-rw-r--r--gui/devices/2560x1600/res/ui.xml3865
-rw-r--r--gui/devices/320x480/res/fonts/Roboto-Condensed-14.datbin0 -> 1952 bytes
-rw-r--r--gui/devices/320x480/res/fonts/Roboto-Condensed-16.datbin0 -> 2469 bytes
-rw-r--r--gui/devices/320x480/res/images/android.pngbin0 -> 1120 bytes
-rw-r--r--gui/devices/320x480/res/images/back-icon.pngbin0 -> 558 bytes
-rw-r--r--gui/devices/320x480/res/images/checkbox_checked.pngbin0 -> 524 bytes
-rw-r--r--gui/devices/320x480/res/images/checkbox_empty.pngbin0 -> 207 bytes
-rw-r--r--gui/devices/320x480/res/images/curtain.jpgbin0 -> 16490 bytes
-rw-r--r--gui/devices/320x480/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/320x480/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-medium-button.pngbin0 -> 904 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-menu-button.pngbin0 -> 2051 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-minus-button.pngbin0 -> 552 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-plus-button.pngbin0 -> 603 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-small-button.pngbin0 -> 521 bytes
-rw-r--r--gui/devices/320x480/res/images/hdpi-sort-button.pngbin0 -> 578 bytes
-rw-r--r--gui/devices/320x480/res/images/home-icon.pngbin0 -> 549 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/320x480/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/320x480/res/images/keyboard1.pngbin0 -> 18053 bytes
-rw-r--r--gui/devices/320x480/res/images/keyboard2.pngbin0 -> 18719 bytes
-rw-r--r--gui/devices/320x480/res/images/keyboard3.pngbin0 -> 17189 bytes
-rw-r--r--gui/devices/320x480/res/images/keyboard4.pngbin0 -> 16166 bytes
-rw-r--r--gui/devices/320x480/res/images/medium-button.pngbin0 -> 712 bytes
-rw-r--r--gui/devices/320x480/res/images/menu-button.pngbin0 -> 1263 bytes
-rw-r--r--gui/devices/320x480/res/images/minus-button.pngbin0 -> 257 bytes
-rw-r--r--gui/devices/320x480/res/images/plus-button.pngbin0 -> 374 bytes
-rw-r--r--gui/devices/320x480/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/320x480/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/320x480/res/images/radio_empty.pngbin0 -> 810 bytes
-rw-r--r--gui/devices/320x480/res/images/radio_selected.pngbin0 -> 992 bytes
-rw-r--r--gui/devices/320x480/res/images/slideout.pngbin0 -> 684 bytes
-rw-r--r--gui/devices/320x480/res/images/slider-touch.pngbin0 -> 4445 bytes
-rw-r--r--gui/devices/320x480/res/images/slider-used.pngbin0 -> 1943 bytes
-rw-r--r--gui/devices/320x480/res/images/slider.pngbin0 -> 3028 bytes
-rw-r--r--gui/devices/320x480/res/images/sort-button.pngbin0 -> 368 bytes
-rw-r--r--gui/devices/320x480/res/images/top-bar.jpgbin0 -> 2022 bytes
-rw-r--r--gui/devices/320x480/res/images/top-bar.pngbin0 -> 7738 bytes
-rw-r--r--gui/devices/320x480/res/images/unlock.pngbin0 -> 20080 bytes
-rw-r--r--gui/devices/320x480/res/ui.xml3846
-rw-r--r--gui/devices/480x800/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/480x800/res/images/back-icon.pngbin0 -> 532 bytes
-rw-r--r--gui/devices/480x800/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/480x800/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/480x800/res/images/curtain.jpgbin0 -> 32644 bytes
-rw-r--r--gui/devices/480x800/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/480x800/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/480x800/res/images/home-icon.pngbin0 -> 467 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/480x800/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/480x800/res/images/keyboard1.pngbin0 -> 23278 bytes
-rw-r--r--gui/devices/480x800/res/images/keyboard2.pngbin0 -> 23552 bytes
-rw-r--r--gui/devices/480x800/res/images/keyboard3.pngbin0 -> 21745 bytes
-rw-r--r--gui/devices/480x800/res/images/keyboard4.pngbin0 -> 20998 bytes
-rw-r--r--gui/devices/480x800/res/images/medium-button.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/480x800/res/images/menu-button.pngbin0 -> 1323 bytes
-rw-r--r--gui/devices/480x800/res/images/minus-button.pngbin0 -> 273 bytes
-rw-r--r--gui/devices/480x800/res/images/plus-button.pngbin0 -> 321 bytes
-rw-r--r--gui/devices/480x800/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/480x800/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/480x800/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/480x800/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/480x800/res/images/slideout.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/480x800/res/images/slider-touch.pngbin0 -> 5147 bytes
-rw-r--r--gui/devices/480x800/res/images/slider-used.pngbin0 -> 1659 bytes
-rw-r--r--gui/devices/480x800/res/images/slider.pngbin0 -> 3181 bytes
-rw-r--r--gui/devices/480x800/res/images/sort-button.pngbin0 -> 388 bytes
-rw-r--r--gui/devices/480x800/res/images/top-bar.jpgbin0 -> 3180 bytes
-rw-r--r--gui/devices/480x800/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/480x800/res/ui.xml3846
-rw-r--r--gui/devices/480x854/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/480x854/res/fonts/Roboto-Regular-40.datbin0 -> 15345 bytes
-rw-r--r--gui/devices/480x854/res/images/back-icon.pngbin0 -> 532 bytes
-rw-r--r--gui/devices/480x854/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/480x854/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/480x854/res/images/curtain.jpgbin0 -> 29278 bytes
-rw-r--r--gui/devices/480x854/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/480x854/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/480x854/res/images/home-icon.pngbin0 -> 467 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/480x854/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/480x854/res/images/keyboard1.pngbin0 -> 23278 bytes
-rw-r--r--gui/devices/480x854/res/images/keyboard2.pngbin0 -> 23552 bytes
-rw-r--r--gui/devices/480x854/res/images/keyboard3.pngbin0 -> 21745 bytes
-rw-r--r--gui/devices/480x854/res/images/keyboard4.pngbin0 -> 20998 bytes
-rw-r--r--gui/devices/480x854/res/images/medium-button.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/480x854/res/images/menu-button.pngbin0 -> 1323 bytes
-rw-r--r--gui/devices/480x854/res/images/minus-button.pngbin0 -> 273 bytes
-rw-r--r--gui/devices/480x854/res/images/plus-button.pngbin0 -> 321 bytes
-rw-r--r--gui/devices/480x854/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/480x854/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/480x854/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/480x854/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/480x854/res/images/slideout.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/480x854/res/images/slider-touch.pngbin0 -> 5147 bytes
-rw-r--r--gui/devices/480x854/res/images/slider-used.pngbin0 -> 1659 bytes
-rw-r--r--gui/devices/480x854/res/images/slider.pngbin0 -> 3181 bytes
-rw-r--r--gui/devices/480x854/res/images/sort-button.pngbin0 -> 388 bytes
-rw-r--r--gui/devices/480x854/res/images/top-bar.jpgbin0 -> 3180 bytes
-rw-r--r--gui/devices/480x854/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/480x854/res/ui.xml3845
-rw-r--r--gui/devices/540x960/res/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/540x960/res/fonts/Roboto-Regular-25.datbin0 -> 6262 bytes
-rw-r--r--gui/devices/540x960/res/fonts/Roboto-Regular-40.datbin0 -> 15345 bytes
-rw-r--r--gui/devices/540x960/res/images/.BridgeSort29
-rw-r--r--gui/devices/540x960/res/images/back-icon.pngbin0 -> 584 bytes
-rw-r--r--gui/devices/540x960/res/images/checkbox_checked.pngbin0 -> 446 bytes
-rw-r--r--gui/devices/540x960/res/images/checkbox_empty.pngbin0 -> 216 bytes
-rw-r--r--gui/devices/540x960/res/images/curtain.jpgbin0 -> 41166 bytes
-rw-r--r--gui/devices/540x960/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/540x960/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/540x960/res/images/home-icon.pngbin0 -> 480 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/540x960/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/540x960/res/images/keyboard1.pngbin0 -> 22042 bytes
-rw-r--r--gui/devices/540x960/res/images/keyboard2.pngbin0 -> 23053 bytes
-rw-r--r--gui/devices/540x960/res/images/keyboard3.pngbin0 -> 22122 bytes
-rw-r--r--gui/devices/540x960/res/images/keyboard4.pngbin0 -> 21111 bytes
-rw-r--r--gui/devices/540x960/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/540x960/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-medium-button.pngbin0 -> 848 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-menu-button.pngbin0 -> 1493 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-minus-button.pngbin0 -> 253 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-plus-button.pngbin0 -> 325 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-small-button.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/540x960/res/images/qhd-sort-button.pngbin0 -> 427 bytes
-rw-r--r--gui/devices/540x960/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/540x960/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/540x960/res/images/slideout.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/540x960/res/images/slider-touch.pngbin0 -> 6365 bytes
-rw-r--r--gui/devices/540x960/res/images/slider-used.pngbin0 -> 2067 bytes
-rw-r--r--gui/devices/540x960/res/images/slider.pngbin0 -> 3730 bytes
-rw-r--r--gui/devices/540x960/res/images/top-bar.jpgbin0 -> 3312 bytes
-rw-r--r--gui/devices/540x960/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/540x960/res/ui.xml3846
-rw-r--r--gui/devices/720x1280/res/fonts/Roboto-Condensed-30.datbin0 -> 7929 bytes
-rw-r--r--gui/devices/720x1280/res/images/back-icon.pngbin0 -> 708 bytes
-rw-r--r--gui/devices/720x1280/res/images/checkbox_checked.pngbin0 -> 445 bytes
-rw-r--r--gui/devices/720x1280/res/images/checkbox_empty.pngbin0 -> 246 bytes
-rw-r--r--gui/devices/720x1280/res/images/curtain.jpgbin0 -> 49143 bytes
-rw-r--r--gui/devices/720x1280/res/images/file.pngbin0 -> 352 bytes
-rw-r--r--gui/devices/720x1280/res/images/folder.pngbin0 -> 349 bytes
-rw-r--r--gui/devices/720x1280/res/images/home-icon.pngbin0 -> 571 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/720x1280/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/720x1280/res/images/keyboard1.pngbin0 -> 33439 bytes
-rw-r--r--gui/devices/720x1280/res/images/keyboard2.pngbin0 -> 35988 bytes
-rw-r--r--gui/devices/720x1280/res/images/keyboard3.pngbin0 -> 32534 bytes
-rw-r--r--gui/devices/720x1280/res/images/keyboard4.pngbin0 -> 29543 bytes
-rw-r--r--gui/devices/720x1280/res/images/medium-button.pngbin0 -> 940 bytes
-rw-r--r--gui/devices/720x1280/res/images/menu-button.pngbin0 -> 1982 bytes
-rw-r--r--gui/devices/720x1280/res/images/minus-button.pngbin0 -> 327 bytes
-rw-r--r--gui/devices/720x1280/res/images/plus-button.pngbin0 -> 345 bytes
-rw-r--r--gui/devices/720x1280/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/720x1280/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/720x1280/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/720x1280/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/720x1280/res/images/slideout.pngbin0 -> 1751 bytes
-rw-r--r--gui/devices/720x1280/res/images/slider-touch.pngbin0 -> 8438 bytes
-rw-r--r--gui/devices/720x1280/res/images/slider-used.pngbin0 -> 2757 bytes
-rw-r--r--gui/devices/720x1280/res/images/slider.pngbin0 -> 5167 bytes
-rw-r--r--gui/devices/720x1280/res/images/sort-button.pngbin0 -> 571 bytes
-rw-r--r--gui/devices/720x1280/res/images/top-bar.jpgbin0 -> 4123 bytes
-rw-r--r--gui/devices/720x1280/res/images/unlock.pngbin0 -> 22631 bytes
-rw-r--r--gui/devices/720x1280/res/ui.xml3859
-rw-r--r--gui/devices/800x1280/res/fonts/Roboto-Condensed-30.datbin0 -> 7929 bytes
-rw-r--r--gui/devices/800x1280/res/images/back-icon.pngbin0 -> 708 bytes
-rw-r--r--gui/devices/800x1280/res/images/checkbox_checked.pngbin0 -> 445 bytes
-rw-r--r--gui/devices/800x1280/res/images/checkbox_empty.pngbin0 -> 246 bytes
-rw-r--r--gui/devices/800x1280/res/images/curtain.jpgbin0 -> 54865 bytes
-rw-r--r--gui/devices/800x1280/res/images/file.pngbin0 -> 352 bytes
-rw-r--r--gui/devices/800x1280/res/images/folder.pngbin0 -> 349 bytes
-rw-r--r--gui/devices/800x1280/res/images/home-icon.pngbin0 -> 571 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/800x1280/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rwxr-xr-xgui/devices/800x1280/res/images/keyboard1.pngbin0 -> 67299 bytes
-rwxr-xr-xgui/devices/800x1280/res/images/keyboard2.pngbin0 -> 70503 bytes
-rwxr-xr-xgui/devices/800x1280/res/images/keyboard3.pngbin0 -> 62993 bytes
-rwxr-xr-xgui/devices/800x1280/res/images/keyboard4.pngbin0 -> 59597 bytes
-rw-r--r--gui/devices/800x1280/res/images/medium-button.pngbin0 -> 790 bytes
-rw-r--r--gui/devices/800x1280/res/images/menu-button.pngbin0 -> 2293 bytes
-rw-r--r--gui/devices/800x1280/res/images/minus-button.pngbin0 -> 327 bytes
-rw-r--r--gui/devices/800x1280/res/images/plus-button.pngbin0 -> 345 bytes
-rw-r--r--gui/devices/800x1280/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/800x1280/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/800x1280/res/images/radio_empty.pngbin0 -> 983 bytes
-rw-r--r--gui/devices/800x1280/res/images/radio_selected.pngbin0 -> 1175 bytes
-rw-r--r--gui/devices/800x1280/res/images/slideout.pngbin0 -> 1751 bytes
-rw-r--r--gui/devices/800x1280/res/images/slider-touch.pngbin0 -> 8438 bytes
-rw-r--r--gui/devices/800x1280/res/images/slider-used.pngbin0 -> 2757 bytes
-rw-r--r--gui/devices/800x1280/res/images/slider.pngbin0 -> 5167 bytes
-rw-r--r--gui/devices/800x1280/res/images/sort-button.pngbin0 -> 571 bytes
-rw-r--r--gui/devices/800x1280/res/images/top-bar.jpgbin0 -> 5571 bytes
-rw-r--r--gui/devices/800x1280/res/images/unlock.pngbin0 -> 22631 bytes
-rwxr-xr-xgui/devices/800x1280/res/ui.xml3847
-rw-r--r--gui/devices/800x480/res/fonts/Roboto-Condensed-16.datbin0 -> 2469 bytes
-rw-r--r--gui/devices/800x480/res/images/back-icon.pngbin0 -> 508 bytes
-rw-r--r--gui/devices/800x480/res/images/background.jpgbin0 -> 9822 bytes
-rw-r--r--gui/devices/800x480/res/images/button.pngbin0 -> 1680 bytes
-rw-r--r--gui/devices/800x480/res/images/checkbox_checked.pngbin0 -> 555 bytes
-rw-r--r--gui/devices/800x480/res/images/checkbox_empty.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/800x480/res/images/console-icon.pngbin0 -> 653 bytes
-rw-r--r--gui/devices/800x480/res/images/console-toggle.pngbin0 -> 649 bytes
-rw-r--r--gui/devices/800x480/res/images/curtain.jpgbin0 -> 24248 bytes
-rw-r--r--gui/devices/800x480/res/images/file.pngbin0 -> 287 bytes
-rw-r--r--gui/devices/800x480/res/images/folder.pngbin0 -> 322 bytes
-rw-r--r--gui/devices/800x480/res/images/home-icon.pngbin0 -> 426 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate001.pngbin0 -> 1742 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate002.pngbin0 -> 1744 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate003.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate004.pngbin0 -> 1748 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate005.pngbin0 -> 1740 bytes
-rwxr-xr-xgui/devices/800x480/res/images/indeterminate006.pngbin0 -> 1740 bytes
-rw-r--r--gui/devices/800x480/res/images/keyboard1.pngbin0 -> 22425 bytes
-rw-r--r--gui/devices/800x480/res/images/keyboard2.pngbin0 -> 23869 bytes
-rw-r--r--gui/devices/800x480/res/images/keyboard3.pngbin0 -> 22275 bytes
-rw-r--r--gui/devices/800x480/res/images/keyboard4.pngbin0 -> 20659 bytes
-rw-r--r--gui/devices/800x480/res/images/medium-button.pngbin0 -> 366 bytes
-rw-r--r--gui/devices/800x480/res/images/mediumwide-button.pngbin0 -> 390 bytes
-rw-r--r--gui/devices/800x480/res/images/minus-button.pngbin0 -> 275 bytes
-rw-r--r--gui/devices/800x480/res/images/plus-button.pngbin0 -> 342 bytes
-rw-r--r--gui/devices/800x480/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/800x480/res/images/progress_fill.pngbin0 -> 238 bytes
-rw-r--r--gui/devices/800x480/res/images/radio_empty.pngbin0 -> 823 bytes
-rw-r--r--gui/devices/800x480/res/images/radio_selected.pngbin0 -> 1005 bytes
-rw-r--r--gui/devices/800x480/res/images/slider-touch.pngbin0 -> 9427 bytes
-rw-r--r--gui/devices/800x480/res/images/slider-used.pngbin0 -> 3833 bytes
-rw-r--r--gui/devices/800x480/res/images/slider.pngbin0 -> 6393 bytes
-rw-r--r--gui/devices/800x480/res/images/sort-button.pngbin0 -> 406 bytes
-rw-r--r--gui/devices/800x480/res/images/unlock.pngbin0 -> 26838 bytes
-rwxr-xr-xgui/devices/800x480/res/ui.xml3873
-rw-r--r--gui/devices/common/res/images/progress_empty.pngbin0 -> 1004 bytes
-rw-r--r--gui/devices/common/res/images/progress_fill.pngbin0 -> 1008 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-10.datbin0 -> 1297 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-12.datbin0 -> 1527 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-14.datbin0 -> 1952 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-16.datbin0 -> 2469 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-20.datbin0 -> 3671 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-25.datbin0 -> 5221 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-30.datbin0 -> 7929 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-40.datbin0 -> 12724 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-50.datbin0 -> 20320 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Condensed-60.datbin0 -> 28621 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-10.datbin0 -> 1430 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-12.datbin0 -> 1857 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-14.datbin0 -> 2269 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-16.datbin0 -> 2812 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-20.datbin0 -> 3876 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-25.datbin0 -> 6262 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-30.datbin0 -> 8722 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-40.datbin0 -> 15345 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-50.datbin0 -> 24152 bytes
-rw-r--r--gui/devices/resources/fonts/Roboto-Regular-60.datbin0 -> 34109 bytes
-rw-r--r--gui/fileselector.cpp1020
-rw-r--r--gui/fill.cpp57
-rw-r--r--gui/gui.cpp763
-rw-r--r--gui/gui.h31
-rw-r--r--gui/hardwarekeyboard.cpp62
-rw-r--r--gui/image.cpp105
-rw-r--r--gui/input.cpp757
-rw-r--r--gui/keyboard.cpp519
-rw-r--r--gui/listbox.cpp813
-rw-r--r--gui/objects.hpp983
-rw-r--r--gui/pages.cpp965
-rw-r--r--gui/pages.h7
-rw-r--r--gui/pages.hpp142
-rw-r--r--gui/partitionlist.cpp924
-rw-r--r--gui/progressbar.cpp226
-rw-r--r--gui/rapidxml.hpp2616
-rw-r--r--gui/remaining.txt4
-rw-r--r--gui/resources.cpp277
-rw-r--r--gui/resources.hpp92
-rw-r--r--gui/slider.cpp170
-rw-r--r--gui/slidervalue.cpp418
-rw-r--r--gui/text.cpp243
-rw-r--r--gui/twrp0
579 files changed, 70114 insertions, 0 deletions
diff --git a/gui/Android.mk b/gui/Android.mk
new file mode 100644
index 000000000..db7769d9b
--- /dev/null
+++ b/gui/Android.mk
@@ -0,0 +1,96 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ gui.cpp \
+ resources.cpp \
+ pages.cpp \
+ text.cpp \
+ image.cpp \
+ action.cpp \
+ console.cpp \
+ fill.cpp \
+ button.cpp \
+ checkbox.cpp \
+ fileselector.cpp \
+ progressbar.cpp \
+ animation.cpp \
+ conditional.cpp \
+ slider.cpp \
+ slidervalue.cpp \
+ listbox.cpp \
+ keyboard.cpp \
+ input.cpp \
+ blanktimer.cpp \
+ partitionlist.cpp
+
+ifneq ($(TWRP_CUSTOM_KEYBOARD),)
+ LOCAL_SRC_FILES += $(TWRP_CUSTOM_KEYBOARD)
+else
+ LOCAL_SRC_FILES += hardwarekeyboard.cpp
+endif
+
+LOCAL_SHARED_LIBRARIES += libminuitwrp libc libstdc++
+LOCAL_MODULE := libguitwrp
+
+# Use this flag to create a build that simulates threaded actions like installing zips, backups, restores, and wipes for theme testing
+#TWRP_SIMULATE_ACTIONS := true
+ifeq ($(TWRP_SIMULATE_ACTIONS), true)
+LOCAL_CFLAGS += -D_SIMULATE_ACTIONS
+endif
+
+#TWRP_EVENT_LOGGING := true
+ifeq ($(TWRP_EVENT_LOGGING), true)
+LOCAL_CFLAGS += -D_EVENT_LOGGING
+endif
+
+ifneq ($(RECOVERY_SDCARD_ON_DATA),)
+ LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
+endif
+ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
+ LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
+endif
+ifneq ($(TW_BRIGHTNESS_PATH),)
+ LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH)
+endif
+ifneq ($(TW_MAX_BRIGHTNESS),)
+ LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
+else
+ LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=255
+endif
+ifneq ($(TW_NO_SCREEN_BLANK),)
+ LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
+endif
+ifneq ($(TW_NO_SCREEN_TIMEOUT),)
+ LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT
+endif
+ifeq ($(HAVE_SELINUX), true)
+LOCAL_CFLAGS += -DHAVE_SELINUX
+endif
+
+LOCAL_C_INCLUDES += bionic external/stlport/stlport $(commands_recovery_local_path)/gui/devices/$(DEVICE_RESOLUTION)
+
+include $(BUILD_STATIC_LIBRARY)
+
+# Transfer in the resources for the device
+include $(CLEAR_VARS)
+LOCAL_MODULE := twrp
+LOCAL_MODULE_TAGS := eng
+LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/res
+
+TWRP_RES_LOC := $(commands_recovery_local_path)/gui/devices
+TWRP_RES_GEN := $(intermediates)/twrp
+
+$(TWRP_RES_GEN):
+ mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res/
+ cp -fr $(TWRP_RES_LOC)/common/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/
+ cp -fr $(TWRP_RES_LOC)/$(DEVICE_RESOLUTION)/res/* $(TARGET_RECOVERY_ROOT_OUT)/res/
+ mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/
+ ln -sf /sbin/busybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh
+ 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)
+include $(BUILD_PREBUILT)
diff --git a/gui/action.cpp b/gui/action.cpp
new file mode 100644
index 000000000..32adb8432
--- /dev/null
+++ b/gui/action.cpp
@@ -0,0 +1,1398 @@
+/*
+ Copyright 2013 bigbiff/Dees_Troy 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>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <linux/input.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/wait.h>
+#include <dirent.h>
+
+#include <string>
+#include <sstream>
+#include "../partitions.hpp"
+#include "../twrp-functions.hpp"
+#include "../openrecoveryscript.hpp"
+
+#include "../adb_install.h"
+#ifndef TW_NO_SCREEN_TIMEOUT
+#include "blanktimer.hpp"
+#endif
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+#include "../variables.h"
+#include "../twinstall.h"
+#include "cutils/properties.h"
+#include "../minadbd/adb.h"
+
+int TWinstall_zip(const char* path, int* wipe_cache);
+void run_script(const char *str1, const char *str2, const char *str3, const char *str4, const char *str5, const char *str6, const char *str7, int request_confirm);
+int gui_console_only();
+int gui_start();
+};
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+#ifndef TW_NO_SCREEN_TIMEOUT
+extern blanktimer blankTimer;
+#endif
+
+void curtainClose(void);
+
+GUIAction::GUIAction(xml_node<>* node)
+ : Conditional(node)
+{
+ xml_node<>* child;
+ xml_node<>* actions;
+ xml_attribute<>* attr;
+
+ mKey = 0;
+
+ if (!node) return;
+
+ // First, get the action
+ actions = node->first_node("actions");
+ if (actions) child = actions->first_node("action");
+ else child = node->first_node("action");
+
+ if (!child) return;
+
+ while (child)
+ {
+ Action action;
+
+ attr = child->first_attribute("function");
+ if (!attr) return;
+
+ action.mFunction = attr->value();
+ action.mArg = child->value();
+ mActions.push_back(action);
+
+ child = child->next_sibling("action");
+ }
+
+ // Now, let's get either the key or region
+ child = node->first_node("touch");
+ if (child)
+ {
+ attr = child->first_attribute("key");
+ if (attr)
+ {
+ std::string key = attr->value();
+
+ mKey = getKeyByName(key);
+ }
+ else
+ {
+ attr = child->first_attribute("x");
+ if (!attr) return;
+ mActionX = atol(attr->value());
+ attr = child->first_attribute("y");
+ if (!attr) return;
+ mActionY = atol(attr->value());
+ attr = child->first_attribute("w");
+ if (!attr) return;
+ mActionW = atol(attr->value());
+ attr = child->first_attribute("h");
+ if (!attr) return;
+ mActionH = atol(attr->value());
+ }
+ }
+}
+
+int GUIAction::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ if (state == TOUCH_RELEASE)
+ doActions();
+
+ return 0;
+}
+
+int GUIAction::NotifyKey(int key)
+{
+ if (!mKey || key != mKey)
+ return 1;
+
+ doActions();
+ return 0;
+}
+
+int GUIAction::NotifyVarChange(std::string varName, std::string value)
+{
+ if (varName.empty() && !isConditionValid() && !mKey && !mActionW)
+ doActions();
+
+ // This handles notifying the condition system of page start
+ if (varName.empty() && isConditionValid())
+ NotifyPageSet();
+
+ if ((varName.empty() || IsConditionVariable(varName)) && isConditionValid() && isConditionTrue())
+ doActions();
+
+ return 0;
+}
+
+void GUIAction::simulate_progress_bar(void)
+{
+ gui_print("Simulating actions...\n");
+ for (int i = 0; i < 5; i++)
+ {
+ usleep(500000);
+ DataManager::SetValue("ui_progress", i * 20);
+ }
+}
+
+int GUIAction::flash_zip(std::string filename, std::string pageName, const int simulate, int* wipe_cache)
+{
+ int ret_val = 0;
+
+ DataManager::SetValue("ui_progress", 0);
+
+ if (filename.empty())
+ {
+ LOGERR("No file specified.\n");
+ return -1;
+ }
+
+ // We're going to jump to this page first, like a loading page
+ gui_changePage(pageName);
+
+ int fd = -1;
+ ZipArchive zip;
+
+ if (!PartitionManager.Mount_By_Path(filename, true))
+ return -1;
+
+ if (mzOpenZipArchive(filename.c_str(), &zip))
+ {
+ LOGERR("Unable to open zip file.\n");
+ return -1;
+ }
+
+ // Check the zip to see if it has a custom installer theme
+ const ZipEntry* twrp = mzFindZipEntry(&zip, "META-INF/teamwin/twrp.zip");
+ if (twrp != NULL)
+ {
+ unlink("/tmp/twrp.zip");
+ fd = creat("/tmp/twrp.zip", 0666);
+ }
+ if (fd >= 0 && twrp != NULL &&
+ mzExtractZipEntryToFile(&zip, twrp, fd) &&
+ !PageManager::LoadPackage("install", "/tmp/twrp.zip", "main"))
+ {
+ mzCloseZipArchive(&zip);
+ PageManager::SelectPackage("install");
+ gui_changePage("main");
+ }
+ else
+ {
+ // In this case, we just use the default page
+ mzCloseZipArchive(&zip);
+ gui_changePage(pageName);
+ }
+ if (fd >= 0)
+ close(fd);
+
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ ret_val = TWinstall_zip(filename.c_str(), wipe_cache);
+
+ // Now, check if we need to ensure TWRP remains installed...
+ struct stat st;
+ if (stat("/sbin/installTwrp", &st) == 0)
+ {
+ DataManager::SetValue("tw_operation", "Configuring TWRP");
+ DataManager::SetValue("tw_partition", "");
+ gui_print("Configuring TWRP...\n");
+ if (TWFunc::Exec_Cmd("/sbin/installTwrp reinstall") < 0)
+ {
+ gui_print("Unable to configure TWRP with this kernel.\n");
+ }
+ }
+ }
+
+ // Done
+ DataManager::SetValue("ui_progress", 100);
+ DataManager::SetValue("ui_progress", 0);
+ return ret_val;
+}
+
+int GUIAction::doActions()
+{
+ if (mActions.size() < 1) return -1;
+ if (mActions.size() == 1)
+ return doAction(mActions.at(0), 0);
+
+ // For multi-action, we always use a thread
+ pthread_t t;
+ pthread_attr_t tattr;
+
+ if (pthread_attr_init(&tattr)) {
+ LOGERR("Unable to pthread_attr_init\n");
+ return -1;
+ }
+ if (pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE)) {
+ LOGERR("Error setting pthread_attr_setdetachstate\n");
+ return -1;
+ }
+ if (pthread_attr_setscope(&tattr, PTHREAD_SCOPE_SYSTEM)) {
+ LOGERR("Error setting pthread_attr_setscope\n");
+ return -1;
+ }
+ /*if (pthread_attr_setstacksize(&tattr, 524288)) {
+ LOGERR("Error setting pthread_attr_setstacksize\n");
+ return -1;
+ }
+ */
+ int ret = pthread_create(&t, &tattr, thread_start, this);
+ if (ret) {
+ LOGERR("Unable to create more threads for actions... continuing in same thread! %i\n", ret);
+ thread_start(this);
+ } else {
+ if (pthread_join(t, NULL)) {
+ LOGERR("Error joining threads\n");
+ }
+ }
+ if (pthread_attr_destroy(&tattr)) {
+ LOGERR("Failed to pthread_attr_destroy\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+void* GUIAction::thread_start(void *cookie)
+{
+ GUIAction* ourThis = (GUIAction*) cookie;
+
+ DataManager::SetValue(TW_ACTION_BUSY, 1);
+
+ if (ourThis->mActions.size() > 1)
+ {
+ std::vector<Action>::iterator iter;
+ for (iter = ourThis->mActions.begin(); iter != ourThis->mActions.end(); iter++)
+ ourThis->doAction(*iter, 1);
+ }
+ else
+ {
+ ourThis->doAction(ourThis->mActions.at(0), 1);
+ }
+ int check = 0;
+ DataManager::GetValue("tw_background_thread_running", check);
+ if (check == 0)
+ DataManager::SetValue(TW_ACTION_BUSY, 0);
+ return NULL;
+}
+
+void GUIAction::operation_start(const string operation_name)
+{
+ DataManager::SetValue(TW_ACTION_BUSY, 1);
+ DataManager::SetValue("ui_progress", 0);
+ DataManager::SetValue("tw_operation", operation_name);
+ DataManager::SetValue("tw_operation_status", 0);
+ DataManager::SetValue("tw_operation_state", 0);
+}
+
+void GUIAction::operation_end(const int operation_status, const int simulate)
+{
+ int simulate_fail;
+ DataManager::SetValue("ui_progress", 100);
+ if (simulate) {
+ DataManager::GetValue(TW_SIMULATE_FAIL, simulate_fail);
+ if (simulate_fail != 0)
+ DataManager::SetValue("tw_operation_status", 1);
+ else
+ DataManager::SetValue("tw_operation_status", 0);
+ } else {
+ if (operation_status != 0) {
+ DataManager::SetValue("tw_operation_status", 1);
+ }
+ else {
+ DataManager::SetValue("tw_operation_status", 0);
+ }
+ }
+ DataManager::SetValue("tw_operation_state", 1);
+ DataManager::SetValue(TW_ACTION_BUSY, 0);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+}
+
+int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
+{
+ static string zip_queue[10];
+ static int zip_queue_index;
+ static pthread_t terminal_command;
+ int simulate;
+
+ std::string arg = gui_parse_text(action.mArg);
+
+ std::string function = gui_parse_text(action.mFunction);
+
+ DataManager::GetValue(TW_SIMULATE_ACTIONS, simulate);
+
+ if (function == "reboot")
+ {
+ //curtainClose(); this sometimes causes a crash
+
+ sync();
+ DataManager::SetValue("tw_gui_done", 1);
+ DataManager::SetValue("tw_reboot_arg", arg);
+
+ return 0;
+ }
+ if (function == "home")
+ {
+ PageManager::SelectPackage("TWRP");
+ gui_changePage("main");
+ return 0;
+ }
+
+ if (function == "key")
+ {
+ PageManager::NotifyKey(getKeyByName(arg));
+ return 0;
+ }
+
+ if (function == "page") {
+ std::string page_name = gui_parse_text(arg);
+ return gui_changePage(page_name);
+ }
+
+ if (function == "reload") {
+ int check = 0, ret_val = 0;
+ std::string theme_path;
+
+ operation_start("Reload Theme");
+ theme_path = DataManager::GetSettingsStoragePath();
+ if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) {
+ LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str());
+ check = 1;
+ }
+
+ theme_path += "/TWRP/theme/ui.zip";
+ if (check != 0 || PageManager::ReloadPackage("TWRP", theme_path) != 0)
+ {
+ // Loading the custom theme failed - try loading the stock theme
+ LOGINFO("Attempting to reload stock theme...\n");
+ if (PageManager::ReloadPackage("TWRP", "/res/ui.xml"))
+ {
+ LOGERR("Failed to load base packages.\n");
+ ret_val = 1;
+ }
+ }
+ operation_end(ret_val, simulate);
+ return 0;
+ }
+
+ if (function == "readBackup")
+ {
+ string Restore_Name;
+ DataManager::GetValue("tw_restore", Restore_Name);
+ PartitionManager.Set_Restore_Files(Restore_Name);
+ return 0;
+ }
+
+ if (function == "set")
+ {
+ if (arg.find('=') != string::npos)
+ {
+ string varName = arg.substr(0, arg.find('='));
+ string value = arg.substr(arg.find('=') + 1, string::npos);
+
+ DataManager::GetValue(value, value);
+ DataManager::SetValue(varName, value);
+ }
+ else
+ DataManager::SetValue(arg, "1");
+ return 0;
+ }
+ if (function == "clear")
+ {
+ DataManager::SetValue(arg, "0");
+ return 0;
+ }
+
+ if (function == "mount")
+ {
+ if (arg == "usb")
+ {
+ DataManager::SetValue(TW_ACTION_BUSY, 1);
+ if (!simulate)
+ PartitionManager.usb_storage_enable();
+ else
+ gui_print("Simulating actions...\n");
+ }
+ else if (!simulate)
+ {
+ string cmd;
+ if (arg == "EXTERNAL")
+ PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
+ else if (arg == "INTERNAL")
+ PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
+ else
+ PartitionManager.Mount_By_Path(arg, true);
+ } else
+ gui_print("Simulating actions...\n");
+ return 0;
+ }
+
+ if (function == "umount" || function == "unmount")
+ {
+ if (arg == "usb")
+ {
+ if (!simulate)
+ PartitionManager.usb_storage_disable();
+ else
+ gui_print("Simulating actions...\n");
+ DataManager::SetValue(TW_ACTION_BUSY, 0);
+ }
+ else if (!simulate)
+ {
+ string cmd;
+ if (arg == "EXTERNAL")
+ PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
+ else if (arg == "INTERNAL")
+ PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
+ else
+ PartitionManager.UnMount_By_Path(arg, true);
+ } else
+ gui_print("Simulating actions...\n");
+ return 0;
+ }
+
+ if (function == "restoredefaultsettings")
+ {
+ operation_start("Restore Defaults");
+ if (simulate) // Simulated so that people don't accidently wipe out the "simulation is on" setting
+ gui_print("Simulating actions...\n");
+ else {
+ DataManager::ResetDefaults();
+ PartitionManager.Update_System_Details();
+ PartitionManager.Mount_Current_Storage(true);
+ }
+ operation_end(0, simulate);
+ return 0;
+ }
+
+ if (function == "copylog")
+ {
+ operation_start("Copy Log");
+ if (!simulate)
+ {
+ string dst;
+ PartitionManager.Mount_Current_Storage(true);
+ dst = DataManager::GetCurrentStoragePath() + "/recovery.log";
+ TWFunc::copy_file("/tmp/recovery.log", dst.c_str(), 0755);
+ sync();
+ gui_print("Copied recovery log to %s.\n", DataManager::GetCurrentStoragePath().c_str());
+ } else
+ simulate_progress_bar();
+ operation_end(0, simulate);
+ return 0;
+ }
+
+ if (function == "compute" || function == "addsubtract")
+ {
+ if (arg.find("+") != string::npos)
+ {
+ string varName = arg.substr(0, arg.find('+'));
+ string string_to_add = arg.substr(arg.find('+') + 1, string::npos);
+ int amount_to_add = atoi(string_to_add.c_str());
+ int value;
+
+ DataManager::GetValue(varName, value);
+ DataManager::SetValue(varName, value + amount_to_add);
+ return 0;
+ }
+ if (arg.find("-") != string::npos)
+ {
+ string varName = arg.substr(0, arg.find('-'));
+ string string_to_subtract = arg.substr(arg.find('-') + 1, string::npos);
+ int amount_to_subtract = atoi(string_to_subtract.c_str());
+ int value;
+
+ DataManager::GetValue(varName, value);
+ value -= amount_to_subtract;
+ if (value <= 0)
+ value = 0;
+ DataManager::SetValue(varName, value);
+ return 0;
+ }
+ if (arg.find("*") != string::npos)
+ {
+ string varName = arg.substr(0, arg.find('*'));
+ string multiply_by_str = gui_parse_text(arg.substr(arg.find('*') + 1, string::npos));
+ int multiply_by = atoi(multiply_by_str.c_str());
+ int value;
+
+ DataManager::GetValue(varName, value);
+ DataManager::SetValue(varName, value*multiply_by);
+ return 0;
+ }
+ if (arg.find("/") != string::npos)
+ {
+ string varName = arg.substr(0, arg.find('/'));
+ string divide_by_str = gui_parse_text(arg.substr(arg.find('/') + 1, string::npos));
+ int divide_by = atoi(divide_by_str.c_str());
+ int value;
+
+ if(divide_by != 0)
+ {
+ DataManager::GetValue(varName, value);
+ DataManager::SetValue(varName, value/divide_by);
+ }
+ return 0;
+ }
+ LOGERR("Unable to perform compute '%s'\n", arg.c_str());
+ return -1;
+ }
+
+ if (function == "setguitimezone")
+ {
+ string SelectedZone;
+ DataManager::GetValue(TW_TIME_ZONE_GUISEL, SelectedZone); // read the selected time zone into SelectedZone
+ string Zone = SelectedZone.substr(0, SelectedZone.find(';')); // parse to get time zone
+ string DSTZone = SelectedZone.substr(SelectedZone.find(';') + 1, string::npos); // parse to get DST component
+
+ int dst;
+ DataManager::GetValue(TW_TIME_ZONE_GUIDST, dst); // check wether user chose to use DST
+
+ string offset;
+ DataManager::GetValue(TW_TIME_ZONE_GUIOFFSET, offset); // pull in offset
+
+ string NewTimeZone = Zone;
+ if (offset != "0")
+ NewTimeZone += ":" + offset;
+
+ if (dst != 0)
+ NewTimeZone += DSTZone;
+
+ DataManager::SetValue(TW_TIME_ZONE_VAR, NewTimeZone);
+ DataManager::update_tz_environment_variables();
+ return 0;
+ }
+
+ if (function == "togglestorage") {
+ LOGERR("togglestorage action was deprecated from TWRP\n");
+ if (arg == "internal") {
+ DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
+ } else if (arg == "external") {
+ DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 1);
+ }
+ if (PartitionManager.Mount_Current_Storage(true)) {
+ if (arg == "internal") {
+ string zip_path, zip_root;
+ DataManager::GetValue(TW_ZIP_INTERNAL_VAR, zip_path);
+ zip_root = TWFunc::Get_Root_Path(zip_path);
+#ifdef RECOVERY_SDCARD_ON_DATA
+ #ifndef TW_EXTERNAL_STORAGE_PATH
+ if (zip_root != "/sdcard")
+ DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/sdcard");
+ #else
+ if (strcmp(EXPAND(TW_EXTERNAL_STORAGE_PATH), "/sdcard") == 0) {
+ if (zip_root != "/emmc")
+ DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/emmc");
+ } else {
+ if (zip_root != "/sdcard")
+ DataManager::SetValue(TW_ZIP_INTERNAL_VAR, "/sdcard");
+ }
+ #endif
+#else
+ if (zip_root != DataManager::GetCurrentStoragePath())
+ DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetCurrentStoragePath());
+#endif
+ // Save the current zip location to the external variable
+ DataManager::SetValue(TW_ZIP_EXTERNAL_VAR, DataManager::GetStrValue(TW_ZIP_LOCATION_VAR));
+ // Change the current zip location to the internal variable
+ DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetStrValue(TW_ZIP_INTERNAL_VAR));
+ } else if (arg == "external") {
+ string zip_path, zip_root;
+ DataManager::GetValue(TW_ZIP_EXTERNAL_VAR, zip_path);
+ zip_root = TWFunc::Get_Root_Path(zip_path);
+ if (zip_root != DataManager::GetCurrentStoragePath()) {
+ DataManager::SetValue(TW_ZIP_EXTERNAL_VAR, DataManager::GetCurrentStoragePath());
+ }
+ // Save the current zip location to the internal variable
+ DataManager::SetValue(TW_ZIP_INTERNAL_VAR, DataManager::GetStrValue(TW_ZIP_LOCATION_VAR));
+ // Change the current zip location to the external variable
+ DataManager::SetValue(TW_ZIP_LOCATION_VAR, DataManager::GetStrValue(TW_ZIP_EXTERNAL_VAR));
+ }
+ } else {
+ // We weren't able to toggle for some reason, restore original setting
+ if (arg == "internal") {
+ DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 1);
+ } else if (arg == "external") {
+ DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 0);
+ }
+ }
+ return 0;
+ }
+
+ if (function == "overlay")
+ return gui_changeOverlay(arg);
+
+ if (function == "queuezip")
+ {
+ if (zip_queue_index >= 10) {
+ gui_print("Maximum zip queue reached!\n");
+ return 0;
+ }
+ DataManager::GetValue("tw_filename", zip_queue[zip_queue_index]);
+ if (strlen(zip_queue[zip_queue_index].c_str()) > 0) {
+ zip_queue_index++;
+ DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
+ }
+ return 0;
+ }
+
+ if (function == "cancelzip")
+ {
+ if (zip_queue_index <= 0) {
+ gui_print("Minimum zip queue reached!\n");
+ return 0;
+ } else {
+ zip_queue_index--;
+ DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
+ }
+ return 0;
+ }
+
+ if (function == "queueclear")
+ {
+ zip_queue_index = 0;
+ DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
+ return 0;
+ }
+
+ if (function == "sleep")
+ {
+ operation_start("Sleep");
+ usleep(atoi(arg.c_str()));
+ operation_end(0, simulate);
+ return 0;
+ }
+
+ if (function == "appenddatetobackupname")
+ {
+ operation_start("AppendDateToBackupName");
+ string Backup_Name;
+ DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
+ Backup_Name += TWFunc::Get_Current_Date();
+ if (Backup_Name.size() > MAX_BACKUP_NAME_LEN)
+ Backup_Name.resize(MAX_BACKUP_NAME_LEN);
+ DataManager::SetValue(TW_BACKUP_NAME, Backup_Name);
+ operation_end(0, simulate);
+ return 0;
+ }
+
+ if (function == "generatebackupname")
+ {
+ operation_start("GenerateBackupName");
+ TWFunc::Auto_Generate_Backup_Name();
+ operation_end(0, simulate);
+ return 0;
+ }
+
+ if (isThreaded)
+ {
+ if (function == "fileexists")
+ {
+ struct stat st;
+ string newpath = arg + "/.";
+
+ operation_start("FileExists");
+ if (stat(arg.c_str(), &st) == 0 || stat(newpath.c_str(), &st) == 0)
+ operation_end(0, simulate);
+ else
+ operation_end(1, simulate);
+ return 0;
+ }
+
+ if (function == "flash")
+ {
+ int i, ret_val = 0, wipe_cache = 0;
+
+ for (i=0; i<zip_queue_index; i++) {
+ operation_start("Flashing");
+ DataManager::SetValue("tw_filename", zip_queue[i]);
+ DataManager::SetValue(TW_ZIP_INDEX, (i + 1));
+
+ ret_val = flash_zip(zip_queue[i], arg, simulate, &wipe_cache);
+ if (ret_val != 0) {
+ gui_print("Error flashing zip '%s'\n", zip_queue[i].c_str());
+ i = 10; // Error flashing zip - exit queue
+ ret_val = 1;
+ }
+ }
+ zip_queue_index = 0;
+ DataManager::SetValue(TW_ZIP_QUEUE_COUNT, zip_queue_index);
+
+ if (wipe_cache)
+ PartitionManager.Wipe_By_Path("/cache");
+
+ if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
+ operation_start("ReinjectTWRP");
+ gui_print("Injecting TWRP into boot image...\n");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
+ if (Boot == NULL || Boot->Current_File_System != "emmc")
+ TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
+ else {
+ string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
+ TWFunc::Exec_Cmd(injectcmd);
+ }
+ gui_print("TWRP injection complete.\n");
+ }
+ }
+ PartitionManager.Update_System_Details();
+ operation_end(ret_val, simulate);
+ return 0;
+ }
+ if (function == "wipe")
+ {
+ operation_start("Format");
+ DataManager::SetValue("tw_partition", arg);
+
+ int ret_val = false;
+
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ if (arg == "data")
+ ret_val = PartitionManager.Factory_Reset();
+ else if (arg == "battery")
+ ret_val = PartitionManager.Wipe_Battery_Stats();
+ else if (arg == "rotate")
+ ret_val = PartitionManager.Wipe_Rotate_Data();
+ else if (arg == "dalvik")
+ ret_val = PartitionManager.Wipe_Dalvik_Cache();
+ else if (arg == "DATAMEDIA") {
+ ret_val = PartitionManager.Format_Data();
+ } else if (arg == "INTERNAL") {
+ int has_datamedia, dual_storage;
+
+ DataManager::GetValue(TW_HAS_DATA_MEDIA, has_datamedia);
+ if (has_datamedia) {
+ ret_val = PartitionManager.Wipe_Media_From_Data();
+ } else {
+ ret_val = PartitionManager.Wipe_By_Path(DataManager::GetSettingsStoragePath());
+ }
+ } else if (arg == "EXTERNAL") {
+ string External_Path;
+
+ DataManager::GetValue(TW_EXTERNAL_PATH, External_Path);
+ ret_val = PartitionManager.Wipe_By_Path(External_Path);
+ } else if (arg == "ANDROIDSECURE") {
+ ret_val = PartitionManager.Wipe_Android_Secure();
+ } else if (arg == "LIST") {
+ 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());
+ if (!Wipe_List.empty()) {
+ size_t start_pos = 0, end_pos = Wipe_List.find(";", start_pos);
+ while (end_pos != string::npos && start_pos < Wipe_List.size()) {
+ wipe_path = Wipe_List.substr(start_pos, end_pos - start_pos);
+ LOGINFO("wipe_path '%s'\n", wipe_path.c_str());
+ if (wipe_path == "/and-sec") {
+ if (!PartitionManager.Wipe_Android_Secure()) {
+ LOGERR("Unable to wipe android secure\n");
+ ret_val = false;
+ break;
+ } else {
+ skip = true;
+ }
+ } else if (wipe_path == "DALVIK") {
+ if (!PartitionManager.Wipe_Dalvik_Cache()) {
+ LOGERR("Failed to wipe dalvik\n");
+ ret_val = false;
+ break;
+ } else {
+ skip = true;
+ }
+ } else if (wipe_path == "INTERNAL") {
+ if (!PartitionManager.Wipe_Media_From_Data()) {
+ ret_val = false;
+ break;
+ } else {
+ skip = true;
+ }
+ }
+ if (!skip) {
+ if (!PartitionManager.Wipe_By_Path(wipe_path)) {
+ LOGERR("Unable to wipe '%s'\n", wipe_path.c_str());
+ ret_val = false;
+ break;
+ } else if (wipe_path == DataManager::GetSettingsStoragePath()) {
+ arg = wipe_path;
+ }
+ } else {
+ skip = false;
+ }
+ start_pos = end_pos + 1;
+ end_pos = Wipe_List.find(";", start_pos);
+ }
+ }
+ } else
+ ret_val = PartitionManager.Wipe_By_Path(arg);
+
+ if (arg == DataManager::GetSettingsStoragePath()) {
+ // If we wiped the settings storage path, recreate the TWRP folder and dump the settings
+ string Storage_Path = DataManager::GetSettingsStoragePath();
+
+ if (PartitionManager.Mount_By_Path(Storage_Path, true)) {
+ LOGINFO("Making TWRP folder and saving settings.\n");
+ Storage_Path += "/TWRP";
+ mkdir(Storage_Path.c_str(), 0777);
+ DataManager::Flush();
+ } else {
+ LOGERR("Unable to recreate TWRP folder and save settings.\n");
+ }
+ }
+ }
+ PartitionManager.Update_System_Details();
+ if (ret_val)
+ ret_val = 0; // 0 is success
+ else
+ ret_val = 1; // 1 is failure
+ operation_end(ret_val, simulate);
+ return 0;
+ }
+ if (function == "refreshsizes")
+ {
+ operation_start("Refreshing Sizes");
+ if (simulate) {
+ simulate_progress_bar();
+ } else
+ PartitionManager.Update_System_Details();
+ operation_end(0, simulate);
+ return 0;
+ }
+ if (function == "nandroid")
+ {
+ operation_start("Nandroid");
+ int ret = 0;
+
+ if (simulate) {
+ DataManager::SetValue("tw_partition", "Simulation");
+ simulate_progress_bar();
+ } else {
+ if (arg == "backup") {
+ string Backup_Name;
+ DataManager::GetValue(TW_BACKUP_NAME, Backup_Name);
+ if (Backup_Name == "(Auto Generate)" || Backup_Name == "(Current Date)" || Backup_Name == "0" || Backup_Name == "(" || PartitionManager.Check_Backup_Name(true) == 0) {
+ ret = PartitionManager.Run_Backup();
+ }
+ else {
+ operation_end(1, simulate);
+ return -1;
+ }
+ DataManager::SetValue(TW_BACKUP_NAME, "(Auto Generate)");
+ } else if (arg == "restore") {
+ string Restore_Name;
+ DataManager::GetValue("tw_restore", Restore_Name);
+ ret = PartitionManager.Run_Restore(Restore_Name);
+ } else {
+ operation_end(1, simulate);
+ return -1;
+ }
+ }
+ DataManager::SetValue("tw_encrypt_backup", 0);
+ if (ret == false)
+ ret = 1; // 1 for failure
+ else
+ ret = 0; // 0 for success
+ operation_end(ret, simulate);
+ return 0;
+ }
+ if (function == "fixpermissions")
+ {
+ operation_start("Fix Permissions");
+ LOGINFO("fix permissions started!\n");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ int op_status = PartitionManager.Fix_Permissions();
+ if (op_status != 0)
+ op_status = 1; // failure
+ operation_end(op_status, simulate);
+ }
+ return 0;
+ }
+ if (function == "dd")
+ {
+ operation_start("imaging");
+
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ string cmd = "dd " + arg;
+ TWFunc::Exec_Cmd(cmd);
+ }
+ operation_end(0, simulate);
+ return 0;
+ }
+ if (function == "partitionsd")
+ {
+ operation_start("Partition SD Card");
+ int ret_val = 0;
+
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ int allow_partition;
+ DataManager::GetValue(TW_ALLOW_PARTITION_SDCARD, allow_partition);
+ if (allow_partition == 0) {
+ gui_print("This device does not have a real SD Card!\nAborting!\n");
+ } else {
+ if (!PartitionManager.Partition_SDCard())
+ ret_val = 1; // failed
+ }
+ }
+ operation_end(ret_val, simulate);
+ return 0;
+ }
+ if (function == "installhtcdumlock")
+ {
+ operation_start("Install HTC Dumlock");
+ if (simulate) {
+ simulate_progress_bar();
+ } else
+ TWFunc::install_htc_dumlock();
+
+ operation_end(0, simulate);
+ return 0;
+ }
+ if (function == "htcdumlockrestoreboot")
+ {
+ operation_start("HTC Dumlock Restore Boot");
+ if (simulate) {
+ simulate_progress_bar();
+ } else
+ TWFunc::htc_dumlock_restore_original_boot();
+
+ operation_end(0, simulate);
+ return 0;
+ }
+ if (function == "htcdumlockreflashrecovery")
+ {
+ operation_start("HTC Dumlock Reflash Recovery");
+ if (simulate) {
+ simulate_progress_bar();
+ } else
+ TWFunc::htc_dumlock_reflash_recovery_to_boot();
+
+ operation_end(0, simulate);
+ return 0;
+ }
+ if (function == "cmd")
+ {
+ int op_status = 0;
+
+ operation_start("Command");
+ LOGINFO("Running command: '%s'\n", arg.c_str());
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ op_status = TWFunc::Exec_Cmd(arg);
+ if (op_status != 0)
+ op_status = 1;
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "terminalcommand")
+ {
+ int op_status = 0;
+ string cmdpath, command;
+
+ DataManager::GetValue("tw_terminal_location", cmdpath);
+ operation_start("CommandOutput");
+ gui_print("%s # %s\n", cmdpath.c_str(), arg.c_str());
+ if (simulate) {
+ simulate_progress_bar();
+ operation_end(op_status, simulate);
+ } else {
+ command = "cd \"" + cmdpath + "\" && " + arg + " 2>&1";;
+ LOGINFO("Actual command is: '%s'\n", command.c_str());
+ DataManager::SetValue("tw_terminal_command_thread", command);
+ DataManager::SetValue("tw_terminal_state", 1);
+ DataManager::SetValue("tw_background_thread_running", 1);
+ op_status = pthread_create(&terminal_command, NULL, command_thread, NULL);
+ if (op_status != 0) {
+ LOGERR("Error starting terminal command thread, %i.\n", op_status);
+ DataManager::SetValue("tw_terminal_state", 0);
+ DataManager::SetValue("tw_background_thread_running", 0);
+ operation_end(1, simulate);
+ }
+ }
+ return 0;
+ }
+ if (function == "killterminal")
+ {
+ int op_status = 0;
+
+ LOGINFO("Sending kill command...\n");
+ operation_start("KillCommand");
+ DataManager::SetValue("tw_operation_status", 0);
+ DataManager::SetValue("tw_operation_state", 1);
+ DataManager::SetValue("tw_terminal_state", 0);
+ DataManager::SetValue("tw_background_thread_running", 0);
+ DataManager::SetValue(TW_ACTION_BUSY, 0);
+ return 0;
+ }
+ if (function == "reinjecttwrp")
+ {
+ int op_status = 0;
+ operation_start("ReinjectTWRP");
+ gui_print("Injecting TWRP into boot image...\n");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
+ gui_print("TWRP injection complete.\n");
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "checkbackupname")
+ {
+ int op_status = 0;
+
+ operation_start("CheckBackupName");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ op_status = PartitionManager.Check_Backup_Name(true);
+ if (op_status != 0)
+ op_status = 1;
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "decrypt")
+ {
+ int op_status = 0;
+
+ operation_start("Decrypt");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ string Password;
+ DataManager::GetValue("tw_crypto_password", Password);
+ op_status = PartitionManager.Decrypt_Device(Password);
+ if (op_status != 0)
+ op_status = 1;
+ else {
+ int load_theme = 1;
+
+ DataManager::SetValue(TW_IS_ENCRYPTED, 0);
+
+ if (load_theme) {
+ int has_datamedia;
+
+ // Check for a custom theme and load it if exists
+ DataManager::GetValue(TW_HAS_DATA_MEDIA, has_datamedia);
+ if (has_datamedia != 0) {
+ struct stat st;
+ int check = 0;
+ std::string theme_path;
+
+ theme_path = DataManager::GetSettingsStoragePath();
+ if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) {
+ LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str());
+ check = 1;
+ }
+
+ theme_path += "/TWRP/theme/ui.zip";
+ if (check == 0 && stat(theme_path.c_str(), &st) == 0) {
+ if (PageManager::ReloadPackage("TWRP", theme_path) != 0)
+ {
+ // Loading the custom theme failed - try loading the stock theme
+ LOGINFO("Attempting to reload stock theme...\n");
+ if (PageManager::ReloadPackage("TWRP", "/res/ui.xml"))
+ {
+ LOGERR("Failed to load base packages.\n");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "adbsideload")
+ {
+ int ret = 0;
+
+ operation_start("Sideload");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ int wipe_cache = 0;
+ int wipe_dalvik = 0;
+ string Sideload_File;
+
+ if (!PartitionManager.Mount_Current_Storage(true)) {
+ operation_end(1, simulate);
+ return 0;
+ }
+ Sideload_File = DataManager::GetCurrentStoragePath() + "/sideload.zip";
+ if (TWFunc::Path_Exists(Sideload_File)) {
+ unlink(Sideload_File.c_str());
+ }
+ gui_print("Starting ADB sideload feature...\n");
+ DataManager::GetValue("tw_wipe_dalvik", wipe_dalvik);
+ ret = apply_from_adb(Sideload_File.c_str());
+ DataManager::SetValue("tw_has_cancel", 0); // Remove cancel button from gui now that the zip install is going to start
+ if (ret != 0) {
+ ret = 1; // failure
+ } else if (TWinstall_zip(Sideload_File.c_str(), &wipe_cache) == 0) {
+ if (wipe_cache || DataManager::GetIntValue("tw_wipe_cache"))
+ PartitionManager.Wipe_By_Path("/cache");
+ if (wipe_dalvik)
+ PartitionManager.Wipe_Dalvik_Cache();
+ } else {
+ ret = 1; // failure
+ }
+ if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
+ operation_start("ReinjectTWRP");
+ gui_print("Injecting TWRP into boot image...\n");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ TWPartition* Boot = PartitionManager.Find_Partition_By_Path("/boot");
+ if (Boot == NULL || Boot->Current_File_System != "emmc")
+ TWFunc::Exec_Cmd("injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash");
+ else {
+ string injectcmd = "injecttwrp --dump /tmp/backup_recovery_ramdisk.img /tmp/injected_boot.img --flash bd=" + Boot->Actual_Block_Device;
+ TWFunc::Exec_Cmd(injectcmd);
+ }
+ gui_print("TWRP injection complete.\n");
+ }
+ }
+ }
+ operation_end(ret, simulate);
+ return 0;
+ }
+ if (function == "adbsideloadcancel")
+ {
+ int child_pid;
+ char child_prop[PROPERTY_VALUE_MAX];
+ string Sideload_File;
+ Sideload_File = DataManager::GetCurrentStoragePath() + "/sideload.zip";
+ unlink(Sideload_File.c_str());
+ property_get("tw_child_pid", child_prop, "error");
+ if (strcmp(child_prop, "error") == 0) {
+ LOGERR("Unable to get child ID from prop\n");
+ return 0;
+ }
+ child_pid = atoi(child_prop);
+ gui_print("Cancelling ADB sideload...\n");
+ kill(child_pid, SIGTERM);
+ DataManager::SetValue("tw_page_done", "1"); // For OpenRecoveryScript support
+ return 0;
+ }
+ if (function == "openrecoveryscript") {
+ operation_start("OpenRecoveryScript");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ // Check for the SCRIPT_FILE_TMP first as these are AOSP recovery commands
+ // that we converted to ORS commands during boot in recovery.cpp.
+ // Run those first.
+ int reboot = 0;
+ if (TWFunc::Path_Exists(SCRIPT_FILE_TMP)) {
+ gui_print("Processing AOSP recovery commands...\n");
+ if (OpenRecoveryScript::run_script_file() == 0) {
+ reboot = 1;
+ }
+ }
+ // Check for the ORS file in /cache and attempt to run those commands.
+ if (OpenRecoveryScript::check_for_script_file()) {
+ gui_print("Processing OpenRecoveryScript file...\n");
+ if (OpenRecoveryScript::run_script_file() == 0) {
+ reboot = 1;
+ }
+ }
+ if (reboot) {
+ usleep(2000000); // Sleep for 2 seconds before rebooting
+ TWFunc::tw_reboot(rb_system);
+ } else {
+ DataManager::SetValue("tw_page_done", 1);
+ }
+ }
+ return 0;
+ }
+ if (function == "installsu")
+ {
+ int op_status = 0;
+
+ operation_start("Install SuperSU");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ if (!TWFunc::Install_SuperSU())
+ op_status = 1;
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "fixsu")
+ {
+ int op_status = 0;
+
+ operation_start("Fixing Superuser Permissions");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ LOGERR("Fixing su permissions was deprecated from TWRP.\n");
+ LOGERR("4.3+ ROMs with SELinux will always lose su perms.\n");
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "decrypt_backup")
+ {
+ int op_status = 0;
+
+ operation_start("Try Restore Decrypt");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ string Restore_Path, Filename, Password;
+ DataManager::GetValue("tw_restore", Restore_Path);
+ Restore_Path += "/";
+ DataManager::GetValue("tw_restore_password", Password);
+ if (TWFunc::Try_Decrypting_Backup(Restore_Path, Password))
+ op_status = 0; // success
+ else
+ op_status = 1; // fail
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ }
+ else
+ {
+ pthread_t t;
+ pthread_create(&t, NULL, thread_start, this);
+ return 0;
+ }
+ LOGERR("Unknown action '%s'\n", function.c_str());
+ return -1;
+}
+
+int GUIAction::getKeyByName(std::string key)
+{
+ if (key == "home") return KEY_HOME;
+ else if (key == "menu") return KEY_MENU;
+ else if (key == "back") return KEY_BACK;
+ else if (key == "search") return KEY_SEARCH;
+ else if (key == "voldown") return KEY_VOLUMEDOWN;
+ else if (key == "volup") return KEY_VOLUMEUP;
+ else if (key == "power") {
+ int ret_val;
+ DataManager::GetValue(TW_POWER_BUTTON, ret_val);
+ if (!ret_val)
+ return KEY_POWER;
+ else
+ return ret_val;
+ }
+
+ return atol(key.c_str());
+}
+
+void* GUIAction::command_thread(void *cookie)
+{
+ string command;
+ FILE* fp;
+ char line[512];
+
+ DataManager::GetValue("tw_terminal_command_thread", command);
+ fp = popen(command.c_str(), "r");
+ if (fp == NULL) {
+ LOGERR("Error opening command to run.\n");
+ } else {
+ int fd = fileno(fp), has_data = 0, check = 0, keep_going = -1, bytes_read = 0;
+ struct timeval timeout;
+ fd_set fdset;
+
+ while(keep_going)
+ {
+ FD_ZERO(&fdset);
+ FD_SET(fd, &fdset);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 400000;
+ has_data = select(fd+1, &fdset, NULL, NULL, &timeout);
+ if (has_data == 0) {
+ // Timeout reached
+ DataManager::GetValue("tw_terminal_state", check);
+ if (check == 0) {
+ keep_going = 0;
+ }
+ } else if (has_data < 0) {
+ // End of execution
+ keep_going = 0;
+ } else {
+ // Try to read output
+ memset(line, 0, sizeof(line));
+ bytes_read = read(fd, line, sizeof(line));
+ if (bytes_read > 0)
+ gui_print("%s", line); // Display output
+ else
+ keep_going = 0; // Done executing
+ }
+ }
+ fclose(fp);
+ }
+ DataManager::SetValue("tw_operation_status", 0);
+ DataManager::SetValue("tw_operation_state", 1);
+ DataManager::SetValue("tw_terminal_state", 0);
+ DataManager::SetValue("tw_background_thread_running", 0);
+ DataManager::SetValue(TW_ACTION_BUSY, 0);
+ return NULL;
+}
diff --git a/gui/animation.cpp b/gui/animation.cpp
new file mode 100644
index 000000000..8c922786d
--- /dev/null
+++ b/gui/animation.cpp
@@ -0,0 +1,136 @@
+// animation.cpp - GUIAnimation object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+
+GUIAnimation::GUIAnimation(xml_node<>* node)
+{
+ xml_node<>* child;
+ xml_attribute<>* attr;
+
+ mAnimation = NULL;
+ mFrame = 1;
+ mFPS = 1;
+ mLoop = -1;
+ mRender = 1;
+ mUpdateCount = 0;
+
+ if (!node) return;
+
+ child = node->first_node("resource");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mAnimation = (AnimationResource*) PageManager::FindResource(attr->value());
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, NULL, NULL, &mPlacement);
+
+ child = node->first_node("speed");
+ if (child)
+ {
+ attr = child->first_attribute("fps");
+ if (attr)
+ mFPS = atoi(attr->value());
+ attr = child->first_attribute("render");
+ if (attr)
+ mRender = atoi(attr->value());
+ }
+ if (mFPS > 30) mFPS = 30;
+
+ child = node->first_node("loop");
+ if (child)
+ {
+ attr = child->first_attribute("frame");
+ if (attr)
+ mLoop = atoi(attr->value()) - 1;
+ attr = child->first_attribute("start");
+ if (attr)
+ mFrame = atoi(attr->value());
+ }
+
+ // Fetch the render sizes
+ if (mAnimation && mAnimation->GetResource())
+ {
+ mRenderW = gr_get_width(mAnimation->GetResource());
+ mRenderH = gr_get_height(mAnimation->GetResource());
+
+ // Adjust for placement
+ if (mPlacement != TOP_LEFT && mPlacement != BOTTOM_LEFT)
+ {
+ if (mPlacement == CENTER)
+ mRenderX -= (mRenderW / 2);
+ else
+ mRenderX -= mRenderW;
+ }
+ if (mPlacement != TOP_LEFT && mPlacement != TOP_RIGHT)
+ {
+ if (mPlacement == CENTER)
+ mRenderY -= (mRenderH / 2);
+ else
+ mRenderY -= mRenderH;
+ }
+ SetPlacement(TOP_LEFT);
+ }
+}
+
+int GUIAnimation::Render(void)
+{
+ if (!mAnimation || !mAnimation->GetResource(mFrame)) return -1;
+
+ gr_blit(mAnimation->GetResource(mFrame), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+ return 0;
+}
+
+int GUIAnimation::Update(void)
+{
+ if (!mAnimation) return -1;
+
+ // Handle the "end-of-animation" state
+ if (mLoop == -2) return 0;
+
+ // Determine if we need the next frame yet...
+ if (++mUpdateCount > 30 / mFPS)
+ {
+ mUpdateCount = 0;
+ if (++mFrame >= mAnimation->GetResourceCount())
+ {
+ if (mLoop < 0)
+ {
+ mFrame = mAnimation->GetResourceCount() - 1;
+ mLoop = -2;
+ }
+ else
+ mFrame = mLoop;
+ }
+ if (mRender == 2) return 2;
+ return (Render() == 0 ? 1 : -1);
+ }
+ return 0;
+}
+
diff --git a/gui/basicTheme/mkTheme.sh b/gui/basicTheme/mkTheme.sh
new file mode 100755
index 000000000..3b8d21be6
--- /dev/null
+++ b/gui/basicTheme/mkTheme.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd res
+zip -r ../ui.zip *
+cd ..
+
diff --git a/gui/basicTheme/res/fonts/bluehighway-25.dat b/gui/basicTheme/res/fonts/bluehighway-25.dat
new file mode 100755
index 000000000..a0944c9aa
--- /dev/null
+++ b/gui/basicTheme/res/fonts/bluehighway-25.dat
Binary files differ
diff --git a/gui/basicTheme/res/fonts/bluehighway-40.dat b/gui/basicTheme/res/fonts/bluehighway-40.dat
new file mode 100755
index 000000000..ce6d35c52
--- /dev/null
+++ b/gui/basicTheme/res/fonts/bluehighway-40.dat
Binary files differ
diff --git a/gui/basicTheme/res/images/android.png b/gui/basicTheme/res/images/android.png
new file mode 100644
index 000000000..73e94d8f0
--- /dev/null
+++ b/gui/basicTheme/res/images/android.png
Binary files differ
diff --git a/gui/basicTheme/res/images/checkbox_checked.png b/gui/basicTheme/res/images/checkbox_checked.png
new file mode 100644
index 000000000..2dd029dd7
--- /dev/null
+++ b/gui/basicTheme/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/basicTheme/res/images/checkbox_empty.png b/gui/basicTheme/res/images/checkbox_empty.png
new file mode 100644
index 000000000..1db36ffd1
--- /dev/null
+++ b/gui/basicTheme/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/basicTheme/res/images/file.png b/gui/basicTheme/res/images/file.png
new file mode 100644
index 000000000..133a681c6
--- /dev/null
+++ b/gui/basicTheme/res/images/file.png
Binary files differ
diff --git a/gui/basicTheme/res/images/folder.png b/gui/basicTheme/res/images/folder.png
new file mode 100644
index 000000000..e4bc250cd
--- /dev/null
+++ b/gui/basicTheme/res/images/folder.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate001.png b/gui/basicTheme/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate002.png b/gui/basicTheme/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate003.png b/gui/basicTheme/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate004.png b/gui/basicTheme/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate005.png b/gui/basicTheme/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/basicTheme/res/images/indeterminate006.png b/gui/basicTheme/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/basicTheme/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-medium-button.png b/gui/basicTheme/res/images/qhd-medium-button.png
new file mode 100644
index 000000000..c26298f8d
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-medium-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-menu-button.png b/gui/basicTheme/res/images/qhd-menu-button.png
new file mode 100644
index 000000000..b14bed9c3
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-menu-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-minus-button.png b/gui/basicTheme/res/images/qhd-minus-button.png
new file mode 100644
index 000000000..5e265fa32
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-minus-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-plus-button.png b/gui/basicTheme/res/images/qhd-plus-button.png
new file mode 100644
index 000000000..9f073825c
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-plus-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-small-button.png b/gui/basicTheme/res/images/qhd-small-button.png
new file mode 100644
index 000000000..0d01b35a4
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-small-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/qhd-sort-button.png b/gui/basicTheme/res/images/qhd-sort-button.png
new file mode 100644
index 000000000..bb4100b01
--- /dev/null
+++ b/gui/basicTheme/res/images/qhd-sort-button.png
Binary files differ
diff --git a/gui/basicTheme/res/images/slideout.png b/gui/basicTheme/res/images/slideout.png
new file mode 100644
index 000000000..ff05d6251
--- /dev/null
+++ b/gui/basicTheme/res/images/slideout.png
Binary files differ
diff --git a/gui/basicTheme/res/ui.xml b/gui/basicTheme/res/ui.xml
new file mode 100644
index 000000000..442f410c1
--- /dev/null
+++ b/gui/basicTheme/res/ui.xml
@@ -0,0 +1,1949 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="540" height="960" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="bluehighway-25" />
+ <resource name="filelist" type="font" filename="bluehighway-40" />
+ <resource name="android" type="image" filename="android" />
+ <resource name="main_button" type="image" filename="qhd-menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="small_button" type="image" filename="qhd-small-button" />
+ <resource name="medium_button" type="image" filename="qhd-medium-button" />
+ <resource name="sort_button" type="image" filename="qhd-sort-button" />
+ <resource name="minus_button" type="image" filename="qhd-minus-button" />
+ <resource name="plus_button" type="image" filename="qhd-plus-button" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="277" />
+ <variable name="col_center_x" value="143" />
+ <variable name="row1_y" value="120" />
+ <variable name="row2_y" value="312" />
+ <variable name="row3_y" value="504" />
+ <variable name="row4_y" value="696" />
+ <variable name="col_progressbar_x" value="144" />
+ <variable name="row_progressbar_y" value="920" />
+ <variable name="col1_medium_x" value="10" />
+ <variable name="col2_medium_x" value="150" />
+ <variable name="col3_medium_x" value="290" />
+ <variable name="col4_medium_x" value="430" />
+ <variable name="row1_medium_y" value="130" />
+ <variable name="row2_medium_y" value="230" />
+ <variable name="row3_medium_y" value="330" />
+ <variable name="row4_medium_y" value="430" />
+ <variable name="row5_medium_y" value="530" />
+ <variable name="row6_medium_y" value="630" />
+ <variable name="row7_medium_y" value="730" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="black" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="10" />
+ <font resource="font" color="black" />
+ <text></text>
+ <image resource="android" />
+ <condition var1="tw_busy" var2="0" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="image">
+ <image resource="android" />
+ <placement x="%col1_x%" y="10" />
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="100" y="10" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="100" y="75" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="250" y="75" />
+ <condition var1="tw_battery" op=">" var2="0" />
+ <text>Battery: %tw_battery%</text>
+ </object>
+ </template>
+
+ <template name="footer">
+ <object type="console">
+ <slideout resource="slideout" x="240" y="920" />
+ <placement x="0" y="0" w="540" h="960" />
+ <color foreground="#B0B0B0" background="black" scroll="#303030" />
+ <font resource="fixed" />
+ </object>
+ </template>
+ </templates>
+
+ <pages>
+ <page name="main">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="black" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="black" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="black" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="black" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="fileselector">
+ <placement x="5" y="%row1_y%" w="530" h="660" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="#454545" />
+ <font resource="filelist" spacing="18" color="white" />
+ <filter extn=".zip" folders="1" files="1" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="tw_filename" />
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="810" />
+ <text>Sort Ascending:</text>
+ </object>
+
+ <object type="button">
+ <placement x="200" y="800" />
+ <font resource="UItext" color="white" />
+ <text>Name</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=1</action>
+ </object>
+
+ <object type="button">
+ <placement x="280" y="800" />
+ <font resource="UItext" color="white" />
+ <text>Date</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=2</action>
+ </object>
+
+ <object type="button">
+ <placement x="360" y="800" />
+ <font resource="UItext" color="white" />
+ <text>Size</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=3</action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="860" />
+ <text>Sort Descending:</text>
+ </object>
+
+ <object type="button">
+ <placement x="200" y="850" />
+ <font resource="UItext" color="white" />
+ <text>Name</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=-1</action>
+ </object>
+
+ <object type="button">
+ <placement x="280" y="850" />
+ <font resource="UItext" color="white" />
+ <text>Date</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=-2</action>
+ </object>
+
+ <object type="button">
+ <placement x="360" y="850" />
+ <font resource="UItext" color="white" />
+ <text>Size</text>
+ <image resource="sort_button" />
+ <action function="set">tw_gui_sort_order=-3</action>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_filename" op="modified" />
+ <action function="page">flash_confirm</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="flash_confirm">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <text>WARNING: This operation may install incompatible software</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="135" />
+ <text>and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="250" />
+ <text>File to flash: %tw_filename%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="550" />
+ <font resource="font" color="black" />
+ <text>Flash now</text>
+ <image resource="main_button" />
+ <action function="flash">flash_zip</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="flash_zip">
+ <object type="template" name="header" />
+
+ <object type="console">
+ <placement x="0" y="%row1_y%" w="540" h="620" />
+ <color foreground="#B0B0B0" background="black" scroll="#303030" />
+ <font resource="fixed" />
+ </object>
+
+ <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>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">flash_done</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="flash_done">
+ <object type="template" name="header" />
+
+ <object type="console">
+ <placement x="0" y="%row1_y%" w="540" h="390" />
+ <color foreground="#B0B0B0" background="black" scroll="black" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="560" />
+ <font resource="font" color="white" />
+ <text>Main Menu</text>
+ <image resource="main_button" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Cache</text>
+ <image resource="main_button" />
+ <action function="page">wipe_cache</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Dalvik Cache</text>
+ <image resource="main_button" />
+ <action function="page">wipe_dalvik</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Factory Reset</text>
+ <image resource="main_button" />
+ <action function="page">wipe_data</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Battery Stats</text>
+ <image resource="main_button" />
+ <action function="page">wipe_battery</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="black" />
+ <text>Rotation</text>
+ <image resource="main_button" />
+ <action function="page">wipe_rotate</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="black" />
+ <text>System</text>
+ <image resource="main_button" />
+ <action function="page">wipe_system</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="black" />
+ <text>SD Card</text>
+ <image resource="main_button" />
+ <action function="page">wipe_sdcard</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="black" />
+ <text>SD Ext</text>
+ <image resource="main_button" />
+ <action function="page">wipe_sdext</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="wipe_cache">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">/cache</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_dalvik">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">dalvik</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_rotate">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">rotate</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_data">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">data</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_system">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">/system</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_sdcard">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">/sdcard</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_sdext">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">/sd-ext</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_battery">
+ <object type="template" name="header" />
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">wipe_done</action>
+ </object>
+
+ <object type="action">
+ <action function="wipe">battery</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="wipe_done">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="540" placement="4" />
+ <text>Wipe complete</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="550" />
+ <font resource="font" color="white" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </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="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Backup now</text>
+ <image resource="main_button" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="285" />
+ <font resource="font" color="white" />
+ <text>System</text>
+ <data variable="tw_backup_system" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="325" />
+ <font resource="font" color="white" />
+ <text>Data</text>
+ <data variable="tw_backup_data" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="365" />
+ <font resource="font" color="white" />
+ <text>Boot</text>
+ <data variable="tw_backup_boot" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="405" />
+ <font resource="font" color="white" />
+ <text>Recovery</text>
+ <data variable="tw_backup_recovery" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="445" />
+ <font resource="font" color="white" />
+ <text>Cache</text>
+ <data variable="tw_backup_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="485" />
+ <font resource="font" color="white" />
+ <text>%tw_sp1_name%</text>
+ <data variable="tw_backup_sp1" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="525" />
+ <font resource="font" color="white" />
+ <text>.android_secure</text>
+ <condition var1="fileexists" var2="/sdcard/.android_secure" />
+ <data variable="tw_backup_andsec" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="565" />
+ <font resource="font" color="white" />
+ <text>sd-ext</text>
+ <condition var1="fileexists" var2="/sd-ext" />
+ <data variable="tw_backup_sdext" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="625" />
+ <font resource="font" color="white" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <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">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backup_run">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="440" placement="4" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="progressbar">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource empty="progress_empty" full="progress_full" />
+ <data name="ui_progress" />
+ </object>
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">backup_done</action>
+ </object>
+
+ <object type="action">
+ <action function="nandroid">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backup_done">
+ <object type="action">
+ <condition var1="tw_operation_status" var2="0" />
+ <action function="page">backup_success</action>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_status" var2="1" />
+ <action function="page">backup_failed</action>
+ </object>
+ </page>
+
+ <page name="backup_success">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="445" placement="4" />
+ <text>Your backup was successful!</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="570" />
+ <font resource="font" color="white" />
+ <text>Main Menu</text>
+ <image resource="main_button" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backup_failed">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="445" placement="4" />
+ <text>Your backup failed.</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="475" placement="4" />
+ <text>Pull up the console for more details</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="570" />
+ <font resource="font" color="white" />
+ <text>Main Menu</text>
+ <image resource="main_button" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <text>Select packge to restore</text>
+ </object>
+
+ <object type="fileselector">
+ <placement x="5" y="140" w="530" h="780" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="#303030" />
+ <font resource="filelist" spacing="18" color="white" />
+ <filter folders="1" files="0" nav="0" />
+ <path name="tw_backups_folder" />
+ <data name="tw_restore" default="" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore" op="modified" />
+ <action function="page">restore_setrestoredata</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="restore_setrestoredata">
+ <object type="action">
+ <action function="readBackup"></action>
+ </object>
+
+ <object type="action">
+ <action function="page">restore_select</action>
+ </object>
+ </page>
+
+ <page name="restore_select">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Restore now</text>
+ <image resource="main_button" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="285" />
+ <font resource="font" color="white" />
+ <text>System</text>
+ <condition var1="tw_restore_system" op=">=" var2="0" />
+ <data variable="tw_restore_system" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="325" />
+ <font resource="font" color="white" />
+ <text>Data</text>
+ <condition var1="tw_restore_data" op=">=" var2="0" />
+ <data variable="tw_restore_data" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="365" />
+ <font resource="font" color="white" />
+ <text>Boot</text>
+ <condition var1="tw_restore_boot" op=">=" var2="0" />
+ <data variable="tw_restore_boot" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="405" />
+ <font resource="font" color="white" />
+ <text>Recovery</text>
+ <condition var1="tw_restore_recovery" op=">=" var2="0" />
+ <data variable="tw_restore_recovery" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="445" />
+ <font resource="font" color="white" />
+ <text>Cache</text>
+ <condition var1="tw_restore_cache" op=">=" var2="0" />
+ <data variable="tw_restore_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="485" />
+ <font resource="font" color="white" />
+ <text>%tw_sp1_name%</text>
+ <condition var1="tw_restore_sp1" op=">=" var2="0" />
+ <data variable="tw_restore_sp1" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="525" />
+ <font resource="font" color="white" />
+ <text>.android_secure</text>
+ <condition var1="tw_restore_andsec" op=">=" var2="0" />
+ <data variable="tw_restore_andsec" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="565" />
+ <font resource="font" color="white" />
+ <text>sd-ext</text>
+ <condition var1="tw_restore_sdext" op=">=" var2="0" />
+ <data variable="tw_restore_sdext" />
+ <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">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="restore_run">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="440" placement="4" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="progressbar">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource empty="progress_empty" full="progress_full" />
+ <data name="ui_progress" />
+ </object>
+
+ <object type="animation">
+ <placement x="%col_progressbar_x%" y="470" />
+ <resource name="progress" />
+ <speed fps="15" render="2" />
+ <loop frame="1" />
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">restore_done</action>
+ </object>
+
+ <object type="action">
+ <action function="nandroid">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="restore_done">
+ <object type="action">
+ <condition var1="tw_operation_status" var2="0" />
+ <action function="page">restore_success</action>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_operation_status" var2="1" />
+ <action function="page">restore_failed</action>
+ </object>
+ </page>
+
+ <page name="restore_success">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="440" placement="4" />
+ <text>Your restore was successful!</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="570" />
+ <font resource="font" color="white" />
+ <text>Main Menu</text>
+ <image resource="main_button" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="restore_failed">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="440" placement="4" />
+ <text>Your restore failed.</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="270" y="475" placement="4" />
+ <text>Pull up the console for more details</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="570" />
+ <font resource="font" color="white" />
+ <text>Main Menu</text>
+ <image resource="main_button" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="mount">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="!=" var2="/system" />
+ <text>Mount System</text>
+ <image resource="checkbox_false" />
+ <action function="mount">/system</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="=" var2="/system" />
+ <text>Unmount System</text>
+ <image resource="checkbox_true" />
+ <action function="umount">/system</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="160" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="!=" var2="/data" />
+ <text>Mount Data</text>
+ <image resource="checkbox_false" />
+ <action function="mount">/data</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="160" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="=" var2="/data" />
+ <text>Unmount Data</text>
+ <image resource="checkbox_true" />
+ <action function="umount">/data</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="200" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="!=" var2="/cache" />
+ <text>Mount Cache</text>
+ <image resource="checkbox_false" />
+ <action function="mount">/cache</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="200" />
+ <font resource="font" color="white" />
+ <condition var1="mounted" op="=" var2="/cache" />
+ <text>Unmount Cache</text>
+ <image resource="checkbox_true" />
+ <action function="umount">/cache</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="260" />
+ <font resource="font" color="black" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>System</text>
+ <image resource="main_button" />
+ <action function="reboot">system</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <action function="reboot">poweroff</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <action function="reboot">recovery</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <action function="reboot">bootloader</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="settings">
+ <object type="template" name="header" />
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="white" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="160" />
+ <font resource="font" color="white" />
+ <text>Reboot after flashing a zip?</text>
+ <data variable="tw_reboot_after_flash_option" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="200" />
+ <font resource="font" color="white" />
+ <text>Force MD5 check on all zips?</text>
+ <data variable="tw_force_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="240" />
+ <font resource="font" color="white" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezonemain</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="black" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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="timezonemain">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Minus (GMT 0 to -11)</text>
+ <image resource="main_button" />
+ <action function="page">timezoneminus</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Plus (GMT +1 to +12)</text>
+ <image resource="main_button" />
+ <action function="page">timezoneplus</action>
+ </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="timezoneminus">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="100" />
+ <text>Selected: %tw_time_zone_guisel%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>GMT 0 CUT</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=CUT0;GDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>GMT 0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=GMT0;BST</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>AZOREST -1</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=AZOREST1;AZOREDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>FALKST -2</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=FALKST2;FALKDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>GRNLNDST -3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=GRNLNDST3;GRNLNDDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>AST -4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=AST4;ADT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>EST -5</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=EST5;EDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>CST -6</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=CST6;CDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>MST -7</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=MST7;MDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>PST -8</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=PST8;PDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>AST -9</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=AST9;ADT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>HST -10</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=HST10;HDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="black" />
+ <text>BST -11</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=BST11;BDT</action>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_medium_y%" />
+ <font resource="font" color="white" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="580" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="720" />
+ <font resource="font" color="black" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="880" />
+ <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">timezonemain</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="timezoneplus">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="100" />
+ <text>Selected: %tw_time_zone_guisel%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>NFT +1</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=NFT-1;DFT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>USAST +2</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=USAST-2;USADT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>WET +2</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=WET-2;WET</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row1_medium_y%" />
+ <font resource="font" color="black" />
+ <text>SAUST +3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=SAUST-3;SAUDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>MEST +3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=MEST-3;MEDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>WST +4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=WST-4;WDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>PAKST +5</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=PAKST-5;PAKDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row2_medium_y%" />
+ <font resource="font" color="black" />
+ <text>TASHST +6</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=TASHST-6;TASHDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>THAIST +7</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=THAIST-7;THAIDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>TAIST +8</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=TAIST-8;TAIDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>WAUST +8</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=WAUST-8;WAUDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row3_medium_y%" />
+ <font resource="font" color="black" />
+ <text>KORST +9</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=KORST-9;KORDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="black" />
+ <text>JST +9</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=JST-9;JSTDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="black" />
+ <text>EET +10</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=EET-10;EETDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="black" />
+ <text>MET +11</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=MET-11;METDT</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="black" />
+ <text>NZST +12</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guisel=NZST-12;NZDT</action>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_medium_y%" />
+ <font resource="font" color="white" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="580" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col3_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col4_medium_x%" y="%row6_medium_y%" />
+ <font resource="font" color="black" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="720" />
+ <font resource="font" color="black" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="880" />
+ <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">timezonemain</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="advanced">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <action function="copylog"></action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <action function="page">fixperms</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="black" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</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="button">
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <placement x="250" y="%row1_y%" />
+ <font resource="font" color="black" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="84" y="130" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="180" />
+ <font resource="font" color="black" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <placement x="250" y="180" />
+ <font resource="font" color="black" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="84" y="190" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="240" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col1_x%" y="280" />
+ <font resource="font" color="black" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col2_x%" y="280" />
+ <font resource="font" color="black" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="460" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="500" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="540" />
+ <font resource="font" color="black" />
+ <text>Partition SD</text>
+ <image resource="main_button" />
+ <action function="page">partsdcardaction</action>
+ </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="partsdcardaction">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <text>Partitioning SD Card . . .</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="150" />
+ <text>This may take a couple minutes.</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="180" />
+ <text>The progress bar may not be accurate.</text>
+ </object>
+
+ <object type="action">
+ <action function="partitionsd"></action>
+ </object>
+
+ <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>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="fixperms">
+ <object type="template" name="header" />
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <text>Fixing Permissions . . .</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="150" />
+ <text>This may take several minutes.</text>
+ </object>
+
+ <object type="text" color="white">
+ <font resource="font" />
+ <placement x="%col1_x%" y="180" />
+ <text>The progress bar may not be accurate.</text>
+ </object>
+
+ <object type="action">
+ <action function="fixpermissions"></action>
+ </object>
+
+ <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>
+
+ <object type="action">
+ <condition var1="tw_operation_state" var2="1" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+ </pages>
+</recovery>
+
diff --git a/gui/basicTheme/ui.zip b/gui/basicTheme/ui.zip
new file mode 100644
index 000000000..a2fddee89
--- /dev/null
+++ b/gui/basicTheme/ui.zip
Binary files differ
diff --git a/gui/blanktimer.cpp b/gui/blanktimer.cpp
new file mode 100644
index 000000000..833305395
--- /dev/null
+++ b/gui/blanktimer.cpp
@@ -0,0 +1,169 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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/>.
+*/
+
+using namespace std;
+#include "rapidxml.hpp"
+using namespace rapidxml;
+extern "C" {
+#include "../minuitwrp/minui.h"
+}
+#include <string>
+#include <vector>
+#include <map>
+#include "resources.hpp"
+#include <pthread.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+#include <pixelflinger/pixelflinger.h>
+#include <linux/kd.h>
+#include <linux/fb.h>
+#include <sstream>
+#include "pages.hpp"
+#include "blanktimer.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+extern "C" {
+#include "../twcommon.h"
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+}
+#include "../twrp-functions.hpp"
+#include "../variables.h"
+
+blanktimer::blanktimer(void) {
+ setTime(0);
+ setConBlank(0);
+ orig_brightness = getBrightness();
+ screenoff = false;
+}
+
+bool blanktimer::IsScreenOff() {
+ return screenoff;
+}
+
+void blanktimer::setTime(int newtime) {
+ sleepTimer = newtime;
+}
+
+int blanktimer::setTimerThread(void) {
+ pthread_t thread;
+ ThreadPtr blankptr = &blanktimer::setClockTimer;
+ PThreadPtr p = *(PThreadPtr*)&blankptr;
+ pthread_create(&thread, NULL, p, this);
+ return 0;
+}
+
+void blanktimer::setConBlank(int blank) {
+ pthread_mutex_lock(&conblankmutex);
+ conblank = blank;
+ pthread_mutex_unlock(&conblankmutex);
+}
+
+void blanktimer::setTimer(void) {
+ pthread_mutex_lock(&timermutex);
+ clock_gettime(CLOCK_MONOTONIC, &btimer);
+ pthread_mutex_unlock(&timermutex);
+}
+
+timespec blanktimer::getTimer(void) {
+ return btimer;
+}
+
+int blanktimer::setClockTimer(void) {
+ timespec curTime, diff;
+ for(;;) {
+ usleep(1000000);
+ clock_gettime(CLOCK_MONOTONIC, &curTime);
+ diff = TWFunc::timespec_diff(btimer, curTime);
+ if (sleepTimer > 2 && diff.tv_sec > (sleepTimer - 2) && conblank == 0) {
+ orig_brightness = getBrightness();
+ setConBlank(1);
+ setBrightness(5);
+ }
+ if (sleepTimer && diff.tv_sec > sleepTimer && conblank < 2) {
+ setConBlank(2);
+ setBrightness(0);
+ screenoff = true;
+ TWFunc::check_and_run_script("/sbin/postscreenblank.sh", "blank");
+ PageManager::ChangeOverlay("lock");
+ }
+#ifndef TW_NO_SCREEN_BLANK
+ if (conblank == 2 && gr_fb_blank(1) >= 0) {
+ setConBlank(3);
+ }
+#endif
+ }
+ return -1; //shouldn't get here
+}
+
+int blanktimer::getBrightness(void) {
+ string results;
+ string brightness_path = EXPAND(TW_BRIGHTNESS_PATH);
+ if ((TWFunc::read_file(brightness_path, results)) != 0)
+ return -1;
+ int result = atoi(results.c_str());
+ if (result == 0) {
+ int tw_brightness;
+ DataManager::GetValue("tw_brightness", tw_brightness);
+ if (tw_brightness) {
+ result = tw_brightness;
+ } else {
+ result = 255;
+ }
+ }
+ return result;
+
+}
+
+int blanktimer::setBrightness(int brightness) {
+ string brightness_path = EXPAND(TW_BRIGHTNESS_PATH);
+ string bstring;
+ char buff[100];
+ sprintf(buff, "%d", brightness);
+ bstring = buff;
+ if ((TWFunc::write_file(brightness_path, bstring)) != 0)
+ return -1;
+ return 0;
+}
+
+void blanktimer::resetTimerAndUnblank(void) {
+ setTimer();
+ switch (conblank) {
+ case 3:
+#ifndef TW_NO_SCREEN_BLANK
+ if (gr_fb_blank(0) < 0) {
+ LOGINFO("blanktimer::resetTimerAndUnblank failed to gr_fb_blank(0)\n");
+ break;
+ }
+#endif
+ TWFunc::check_and_run_script("/sbin/postscreenunblank.sh", "unblank");
+ // No break here, we want to keep going
+ case 2:
+ gui_forceRender();
+ screenoff = false;
+ // No break here, we want to keep going
+ case 1:
+ setBrightness(orig_brightness);
+ setConBlank(0);
+ break;
+ }
+}
diff --git a/gui/blanktimer.hpp b/gui/blanktimer.hpp
new file mode 100644
index 000000000..01c1dfb0c
--- /dev/null
+++ b/gui/blanktimer.hpp
@@ -0,0 +1,60 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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 __BLANKTIMER_HEADER_HPP
+#define __BLANKTIMER_HEADER_HPP
+
+#include <pthread.h>
+#include <sys/time.h>
+
+using namespace std;
+
+class blanktimer
+{
+public:
+ blanktimer(void);
+
+ int setTimerThread(void);
+ void resetTimerAndUnblank(void);
+ void setTime(int newtime);
+ bool IsScreenOff();
+
+private:
+ typedef int (blanktimer::*ThreadPtr)(void);
+ typedef void* (*PThreadPtr)(void*);
+
+ void setConBlank(int blank);
+ void setTimer(void);
+ timespec getTimer(void);
+ int getBrightness(void);
+ int setBrightness(int brightness);
+ int setBlankTimer(void);
+ int setClockTimer(void);
+
+ pthread_mutex_t conblankmutex;
+ pthread_mutex_t timermutex;
+ int conblank;
+ timespec btimer;
+ unsigned long long sleepTimer;
+ int orig_brightness;
+ bool screenoff;
+};
+
+extern blanktimer blankTimer;
+
+#endif // __BLANKTIMER_HEADER_HPP
diff --git a/gui/button.cpp b/gui/button.cpp
new file mode 100644
index 000000000..3f9c2df1f
--- /dev/null
+++ b/gui/button.cpp
@@ -0,0 +1,290 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIButton::GUIButton(xml_node<>* node)
+ : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mButtonImg = NULL;
+ mButtonIcon = NULL;
+ mButtonLabel = NULL;
+ mAction = NULL;
+ mRendered = false;
+ hasHighlightColor = false;
+ renderHighlight = false;
+ hasFill = false;
+
+ if (!node) return;
+
+ // Three of the four can be loaded directly from the node
+ mButtonImg = new GUIImage(node);
+ mButtonLabel = new GUIText(node);
+ mAction = new GUIAction(node);
+
+ if (mButtonImg->Render() < 0)
+ {
+ delete mButtonImg;
+ mButtonImg = NULL;
+ }
+ if (mButtonLabel->Render() < 0)
+ {
+ delete mButtonLabel;
+ mButtonLabel = NULL;
+ }
+ // Load fill if it exists
+ memset(&mFillColor, 0, sizeof(COLOR));
+ child = node->first_node("fill");
+ if (child)
+ {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasFill = true;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFillColor);
+ }
+ }
+ if (!hasFill && mButtonImg == NULL) {
+ LOGERR("No image resource or fill specified for button.\n");
+ }
+
+ // The icon is a special case
+ child = node->first_node("icon");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mButtonIcon = PageManager::FindResource(attr->value());
+ }
+
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ child = node->first_node("highlight");
+ if (child) {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasHighlightColor = true;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ }
+ }
+
+ int x, y, w, h;
+ TextPlacement = TOP_LEFT;
+ if (mButtonImg) {
+ mButtonImg->GetRenderPos(x, y, w, h);
+ } else if (hasFill) {
+ LoadPlacement(node->first_node("placement"), &x, &y, &w, &h, &TextPlacement);
+ }
+ SetRenderPos(x, y, w, h);
+ return;
+}
+
+GUIButton::~GUIButton()
+{
+ if (mButtonImg) delete mButtonImg;
+ if (mButtonLabel) delete mButtonLabel;
+ if (mAction) delete mAction;
+ if (mButtonIcon) delete mButtonIcon;
+}
+
+int GUIButton::Render(void)
+{
+ if (!isConditionTrue())
+ {
+ mRendered = false;
+ return 0;
+ }
+
+ int ret = 0;
+
+ if (mButtonImg) ret = mButtonImg->Render();
+ if (ret < 0) return ret;
+ if (hasFill) {
+ gr_color(mFillColor.red, mFillColor.green, mFillColor.blue, mFillColor.alpha);
+ gr_fill(mRenderX, mRenderY, mRenderW, mRenderH);
+ }
+ if (mButtonIcon && mButtonIcon->GetResource())
+ gr_blit(mButtonIcon->GetResource(), 0, 0, mIconW, mIconH, mIconX, mIconY);
+ if (mButtonLabel) {
+ int w, h;
+ mButtonLabel->GetCurrentBounds(w, h);
+ if (w != mTextW) {
+ mTextW = w;
+ if (TextPlacement == CENTER_X_ONLY) {
+ mTextX = ((mRenderW - mRenderX) / 2);
+ } else if (mTextW > mRenderW) { // As a special case, we'll allow large text which automatically moves it to the right.
+ mTextX = mRenderW + mRenderX + 5;
+ mRenderW += mTextW + 5;
+ } else {
+ mTextX = mRenderX + ((mRenderW - mTextW) / 2);
+ }
+ mButtonLabel->SetRenderPos(mTextX, mTextY);
+ }
+ ret = mButtonLabel->Render();
+ if (ret < 0) return ret;
+ }
+ if (renderHighlight && hasHighlightColor) {
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, mHighlightColor.alpha);
+ gr_fill(mRenderX, mRenderY, mRenderW, mRenderH);
+ }
+ mRendered = true;
+ return ret;
+}
+
+int GUIButton::Update(void)
+{
+ if (!isConditionTrue()) return (mRendered ? 2 : 0);
+ if (!mRendered) return 2;
+
+ int ret = 0, ret2 = 0;
+
+ if (mButtonImg) ret = mButtonImg->Update();
+ if (ret < 0) return ret;
+
+ if (ret == 0)
+ {
+ if (mButtonLabel) {
+ ret2 = mButtonLabel->Update();
+ if (ret2 < 0) return ret2;
+ if (ret2 > ret) ret = ret2;
+ }
+ }
+ else if (ret == 1)
+ {
+ // The button re-rendered, so everyone else is a render
+ if (mButtonIcon && mButtonIcon->GetResource())
+ gr_blit(mButtonIcon->GetResource(), 0, 0, mIconW, mIconH, mIconX, mIconY);
+ if (mButtonLabel) ret = mButtonLabel->Render();
+ if (ret < 0) return ret;
+ ret = 1;
+ }
+ else
+ {
+ // Aparently, the button needs a background update
+ ret = 2;
+ }
+ return ret;
+}
+
+int GUIButton::SetRenderPos(int x, int y, int w, int h)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = w;
+ mRenderH = h;
+ }
+
+ mIconW = 0; mIconH = 0;
+ if (mButtonIcon && mButtonIcon->GetResource())
+ {
+ mIconW = gr_get_width(mButtonIcon->GetResource());
+ mIconH = gr_get_height(mButtonIcon->GetResource());
+ }
+
+ mTextH = 0;
+ mTextW = 0;
+ mIconX = mRenderX + ((mRenderW - mIconW) / 2);
+ if (mButtonLabel) mButtonLabel->GetCurrentBounds(mTextW, mTextH);
+ if (mTextW)
+ {
+ if (TextPlacement == CENTER_X_ONLY) {
+ mTextX = ((mRenderW - mRenderX) / 2);
+ } else if (mTextW > mRenderW) { // As a special case, we'll allow large text which automatically moves it to the right.
+ mTextX = mRenderW + mRenderX + 5;
+ mRenderW += mTextW + 5;
+ } else {
+ mTextX = mRenderX + ((mRenderW - mTextW) / 2);
+ }
+ }
+
+ if (mIconH == 0 || mTextH == 0 || mIconH + mTextH > mRenderH)
+ {
+ mIconY = mRenderY + (mRenderH / 2) - (mIconH / 2);
+ mTextY = mRenderY + (mRenderH / 2) - (mTextH / 2);
+ }
+ else
+ {
+ int divisor = mRenderH - (mIconH + mTextH);
+ mIconY = mRenderY + (divisor / 3);
+ mTextY = mRenderY + (divisor * 2 / 3) + mIconH;
+ }
+
+ if (mButtonLabel) mButtonLabel->SetRenderPos(mTextX, mTextY);
+ if (mAction) mAction->SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ return 0;
+}
+
+int GUIButton::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int last_state = 0;
+
+ if (!isConditionTrue()) return -1;
+ if (x < mRenderX || x - mRenderX > mRenderW || y < mRenderY || y - mRenderY > mRenderH || state == TOUCH_RELEASE) {
+ if (last_state == 1) {
+ last_state = 0;
+ if (mButtonLabel != NULL)
+ mButtonLabel->isHighlighted = false;
+ if (mButtonImg != NULL)
+ mButtonImg->isHighlighted = false;
+ renderHighlight = false;
+ mRendered = false;
+ }
+ } else {
+ if (last_state == 0) {
+ last_state = 1;
+ if (mButtonLabel != NULL)
+ mButtonLabel->isHighlighted = true;
+ if (mButtonImg != NULL)
+ mButtonImg->isHighlighted = true;
+ renderHighlight = true;
+ mRendered = false;
+ }
+ }
+ if (x < mRenderX || x - mRenderX > mRenderW || y < mRenderY || y - mRenderY > mRenderH)
+ return 0;
+ return (mAction ? mAction->NotifyTouch(state, x, y) : 1);
+}
diff --git a/gui/checkbox.cpp b/gui/checkbox.cpp
new file mode 100644
index 000000000..b6d5e6348
--- /dev/null
+++ b/gui/checkbox.cpp
@@ -0,0 +1,172 @@
+// checkbox.cpp - GUICheckbox object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUICheckbox::GUICheckbox(xml_node<>* node)
+ : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mChecked = NULL;
+ mUnchecked = NULL;
+ mLabel = NULL;
+ mRendered = false;
+
+ mLastState = 0;
+
+ if (!node)
+ return;
+
+ // The label can be loaded directly
+ mLabel = new GUIText(node);
+
+ // Read the check states
+ child = node->first_node("image");
+ if (child)
+ {
+ attr = child->first_attribute("checked");
+ if (attr)
+ mChecked = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("unchecked");
+ if (attr)
+ mUnchecked = PageManager::FindResource(attr->value());
+ }
+
+ // Get the variable data
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("variable");
+ if (attr)
+ mVarName = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mVarName, attr->value());
+ }
+
+ mCheckW = 0; mCheckH = 0;
+ if (mChecked && mChecked->GetResource())
+ {
+ mCheckW = gr_get_width(mChecked->GetResource());
+ mCheckH = gr_get_height(mChecked->GetResource());
+ }
+ else if (mUnchecked && mUnchecked->GetResource())
+ {
+ mCheckW = gr_get_width(mUnchecked->GetResource());
+ mCheckH = gr_get_height(mUnchecked->GetResource());
+ }
+
+ int x, y, w, h;
+ mLabel->GetRenderPos(x, y, w, h);
+ SetRenderPos(x, y, 0, 0);
+ return;
+}
+
+GUICheckbox::~GUICheckbox()
+{
+}
+
+int GUICheckbox::Render(void)
+{
+ if (!isConditionTrue())
+ {
+ mRendered = false;
+ return 0;
+ }
+
+ int ret = 0;
+ int lastState = 0;
+ DataManager::GetValue(mVarName, lastState);
+
+ if (lastState)
+ {
+ if (mChecked && mChecked->GetResource())
+ gr_blit(mChecked->GetResource(), 0, 0, mCheckW, mCheckH, mRenderX, mRenderY);
+ }
+ else
+ {
+ if (mUnchecked && mUnchecked->GetResource())
+ gr_blit(mUnchecked->GetResource(), 0, 0, mCheckW, mCheckH, mRenderX, mRenderY);
+ }
+ if (mLabel)
+ ret = mLabel->Render();
+ mLastState = lastState;
+ mRendered = true;
+ return ret;
+}
+
+int GUICheckbox::Update(void)
+{
+ if (!isConditionTrue()) return (mRendered ? 2 : 0);
+ if (!mRendered) return 2;
+
+ int lastState = 0;
+ DataManager::GetValue(mVarName, lastState);
+
+ if (lastState != mLastState)
+ return 2;
+ return 0;
+}
+
+int GUICheckbox::SetRenderPos(int x, int y, int w, int h)
+{
+ mRenderX = x;
+ mRenderY = y;
+
+ if (w || h)
+ return -1;
+
+ int textW, textH;
+ mLabel->GetCurrentBounds(textW, textH);
+
+ w = textW + mCheckW + 5;
+ mRenderW = w;
+ mRenderH = mCheckH;
+
+ mTextX = mRenderX + mCheckW + 5;
+ mTextY = mRenderY + ((mCheckH / 2) - (textH / 2));
+
+ mLabel->SetRenderPos(mTextX, mTextY, 0, 0);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ return 0;
+}
+
+int GUICheckbox::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ if (!isConditionTrue())
+ return -1;
+
+ if (state == TOUCH_RELEASE)
+ {
+ int lastState;
+ DataManager::GetValue(mVarName, lastState);
+ lastState = (lastState == 0) ? 1 : 0;
+ DataManager::SetValue(mVarName, lastState);
+ }
+ return 0;
+}
+
diff --git a/gui/conditional.cpp b/gui/conditional.cpp
new file mode 100644
index 000000000..5ea8d176c
--- /dev/null
+++ b/gui/conditional.cpp
@@ -0,0 +1,204 @@
+// checkbox.cpp - GUICheckbox object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+#include "../variables.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+
+Conditional::Conditional(xml_node<>* node)
+{
+ // Break out early, it's too hard to check if valid every step
+ if (!node) return;
+
+ // First, get the action
+ xml_node<>* condition = node->first_node("conditions");
+ if (condition) condition = condition->first_node("condition");
+ else condition = node->first_node("condition");
+
+ if (!condition) return;
+
+ while (condition)
+ {
+ Condition cond;
+
+ cond.mCompareOp = "=";
+
+ xml_attribute<>* attr;
+ attr = condition->first_attribute("var1");
+ if (attr) cond.mVar1 = attr->value();
+
+ attr = condition->first_attribute("op");
+ if (attr) cond.mCompareOp = attr->value();
+
+ attr = condition->first_attribute("var2");
+ if (attr) cond.mVar2 = attr->value();
+
+ mConditions.push_back(cond);
+
+ condition = condition->next_sibling("condition");
+ }
+}
+
+bool Conditional::IsConditionVariable(std::string var)
+{
+ std::vector<Condition>::iterator iter;
+ for (iter = mConditions.begin(); iter != mConditions.end(); iter++)
+ {
+ if (iter->mVar1 == var)
+ return true;
+ }
+ return false;
+}
+
+bool Conditional::isConditionTrue()
+{
+ std::vector<Condition>::iterator iter;
+ for (iter = mConditions.begin(); iter != mConditions.end(); iter++)
+ {
+ if (!isConditionTrue(&(*iter)))
+ return false;
+ }
+ return true;
+}
+
+bool Conditional::isConditionTrue(Condition* condition)
+{
+ // This is used to hold the proper value of "true" based on the '!' NOT flag
+ bool bTrue = true;
+
+ if (condition->mVar1.empty())
+ return bTrue;
+
+ if (!condition->mCompareOp.empty() && condition->mCompareOp[0] == '!')
+ bTrue = false;
+
+ if (condition->mVar2.empty() && condition->mCompareOp != "modified")
+ {
+ if (!DataManager::GetStrValue(condition->mVar1).empty())
+ return bTrue;
+
+ return !bTrue;
+ }
+
+ string var1, var2;
+ if (DataManager::GetValue(condition->mVar1, var1))
+ var1 = condition->mVar1;
+ if (DataManager::GetValue(condition->mVar2, var2))
+ var2 = condition->mVar2;
+
+ // This is a special case, we stat the file and that determines our result
+ if (var1 == "fileexists")
+ {
+ struct stat st;
+ if (stat(var2.c_str(), &st) == 0)
+ var2 = var1;
+ else
+ var2 = "FAILED";
+ }
+ if (var1 == "mounted")
+ {
+ if (isMounted(condition->mVar2))
+ var2 = var1;
+ else
+ var2 = "FAILED";
+ }
+
+ if (condition->mCompareOp.find('=') != string::npos && var1 == var2)
+ return bTrue;
+
+ if (condition->mCompareOp.find('>') != string::npos && (atof(var1.c_str()) > atof(var2.c_str())))
+ return bTrue;
+
+ if (condition->mCompareOp.find('<') != string::npos && (atof(var1.c_str()) < atof(var2.c_str())))
+ return bTrue;
+
+ if (condition->mCompareOp == "modified")
+ {
+ // This is a hack to allow areas to reset the default value
+ if (var1.empty())
+ {
+ condition->mLastVal = var1;
+ return !bTrue;
+ }
+
+ if (var1 != condition->mLastVal)
+ return bTrue;
+ }
+
+ return !bTrue;
+}
+
+bool Conditional::isConditionValid()
+{
+ return !mConditions.empty();
+}
+
+void Conditional::NotifyPageSet()
+{
+ std::vector<Condition>::iterator iter;
+ for (iter = mConditions.begin(); iter != mConditions.end(); iter++)
+ {
+ if (iter->mCompareOp == "modified")
+ {
+ string val;
+
+ // If this fails, val will not be set, which is perfect
+ if (DataManager::GetValue(iter->mVar1, val))
+ {
+ DataManager::SetValue(iter->mVar1, "");
+ DataManager::GetValue(iter->mVar1, val);
+ }
+ iter->mLastVal = val;
+ }
+ }
+}
+
+bool Conditional::isMounted(string vol)
+{
+ FILE *fp;
+ char tmpOutput[255];
+
+ if (strcmp(vol.c_str(), "EXTERNAL") == 0)
+ DataManager::GetValue(TW_EXTERNAL_MOUNT, vol);
+ else if (strcmp(vol.c_str(), "INTERNAL") == 0)
+ DataManager::GetValue(TW_INTERNAL_MOUNT, vol);
+ fp = fopen("/proc/mounts", "rt");
+ while (fgets(tmpOutput,255,fp) != NULL)
+ {
+ char* mnt = tmpOutput;
+ while (*mnt > 32) mnt++;
+ while (*mnt > 0 && *mnt <= 32) mnt++;
+ char* pos = mnt;
+ while (*pos > 32) pos++;
+ *pos = 0;
+ if (vol == mnt)
+ {
+ fclose(fp);
+ return true;
+ }
+ }
+ fclose(fp);
+ return false;
+}
diff --git a/gui/console.cpp b/gui/console.cpp
new file mode 100644
index 000000000..517a7c293
--- /dev/null
+++ b/gui/console.cpp
@@ -0,0 +1,403 @@
+// console.cpp - GUIConsole object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+
+static std::vector<std::string> gConsole;
+
+extern "C" void gui_print(const char *fmt, ...)
+{
+ char buf[512]; // We're going to limit a single request to 512 bytes
+
+ va_list ap;
+ va_start(ap, fmt);
+ vsnprintf(buf, 512, fmt, ap);
+ va_end(ap);
+
+ fputs(buf, stdout);
+
+ char *start, *next;
+
+ if (buf[0] == '\n' && strlen(buf) < 2) {
+ // This prevents the double lines bug seen in the console during zip installs
+ return;
+ }
+
+ for (start = next = buf; *next != '\0'; next++)
+ {
+ if (*next == '\n')
+ {
+ *next = '\0';
+ next++;
+
+ std::string line = start;
+ gConsole.push_back(line);
+ start = next;
+
+ // Handle the normal \n\0 case
+ if (*next == '\0')
+ return;
+ }
+ }
+ std::string line = start;
+ gConsole.push_back(line);
+ return;
+}
+
+extern "C" void gui_print_overwrite(const char *fmt, ...)
+{
+ char buf[512]; // We're going to limit a single request to 512 bytes
+
+ va_list ap;
+ va_start(ap, fmt);
+ vsnprintf(buf, 512, fmt, ap);
+ va_end(ap);
+
+ fputs(buf, stdout);
+
+ // Pop the last line, and we can continue
+ if (!gConsole.empty()) gConsole.pop_back();
+
+ char *start, *next;
+ for (start = next = buf; *next != '\0'; next++)
+ {
+ if (*next == '\n')
+ {
+ *next = '\0';
+ next++;
+
+ std::string line = start;
+ gConsole.push_back(line);
+ start = next;
+
+ // Handle the normal \n\0 case
+ if (*next == '\0')
+ return;
+ }
+ }
+ std::string line = start;
+ gConsole.push_back(line);
+ return;
+}
+
+GUIConsole::GUIConsole(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mFont = NULL;
+ mCurrentLine = -1;
+ memset(&mForegroundColor, 255, sizeof(COLOR));
+ memset(&mBackgroundColor, 0, sizeof(COLOR));
+ mBackgroundColor.alpha = 255;
+ memset(&mScrollColor, 0x08, sizeof(COLOR));
+ mScrollColor.alpha = 255;
+ mLastCount = 0;
+ mSlideout = 0;
+ mSlideoutState = hidden;
+
+ mRenderX = 0; mRenderY = 0; mRenderW = gr_fb_width(); mRenderH = gr_fb_height();
+
+ if (!node)
+ {
+ mSlideoutX = 0; mSlideoutY = 0; mSlideoutW = 0; mSlideoutH = 0;
+ mConsoleX = 0; mConsoleY = 0; mConsoleW = gr_fb_width(); mConsoleH = gr_fb_height();
+ }
+ else
+ {
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+ }
+
+ child = node->first_node("color");
+ if (child)
+ {
+ attr = child->first_attribute("foreground");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mForegroundColor);
+ }
+ attr = child->first_attribute("background");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackgroundColor);
+ }
+ attr = child->first_attribute("scroll");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mScrollColor);
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mConsoleX, &mConsoleY, &mConsoleW, &mConsoleH);
+
+ child = node->first_node("slideout");
+ if (child)
+ {
+ mSlideout = 1;
+ LoadPlacement(child, &mSlideoutX, &mSlideoutY);
+
+ attr = child->first_attribute("resource");
+ if (attr) mSlideoutImage = PageManager::FindResource(attr->value());
+
+ if (mSlideoutImage && mSlideoutImage->GetResource())
+ {
+ mSlideoutW = gr_get_width(mSlideoutImage->GetResource());
+ mSlideoutH = gr_get_height(mSlideoutImage->GetResource());
+ }
+ }
+ }
+
+ gr_getFontDetails(mFont, &mFontHeight, NULL);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ SetRenderPos(mConsoleX, mConsoleY);
+ return;
+}
+
+int GUIConsole::RenderSlideout(void)
+{
+ if (!mSlideoutImage || !mSlideoutImage->GetResource())
+ return -1;
+
+ gr_blit(mSlideoutImage->GetResource(), 0, 0, mSlideoutW, mSlideoutH, mSlideoutX, mSlideoutY);
+ return 0;
+}
+
+int GUIConsole::RenderConsole(void)
+{
+ void* fontResource = NULL;
+ if (mFont)
+ fontResource = mFont->GetResource();
+
+ // We fill the background
+ gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255);
+ gr_fill(mConsoleX, mConsoleY, mConsoleW, mConsoleH);
+
+ gr_color(mScrollColor.red, mScrollColor.green, mScrollColor.blue, mScrollColor.alpha);
+ gr_fill(mConsoleX + (mConsoleW * 9 / 10), mConsoleY, (mConsoleW / 10), mConsoleH);
+
+ // Render the lines
+ gr_color(mForegroundColor.red, mForegroundColor.green, mForegroundColor.blue, mForegroundColor.alpha);
+
+ // Don't try to continue to render without data
+ mLastCount = gConsole.size();
+ if (mLastCount == 0)
+ return (mSlideout ? RenderSlideout() : 0);
+
+ // Find the start point
+ int start;
+ int curLine = mCurrentLine; // Thread-safing (Another thread updates this value)
+ if (curLine == -1)
+ {
+ start = mLastCount - mMaxRows;
+ }
+ else
+ {
+ if (curLine > (int) mLastCount)
+ curLine = (int) mLastCount;
+ if ((int) mMaxRows > curLine)
+ curLine = (int) mMaxRows;
+ start = curLine - mMaxRows;
+ }
+
+ unsigned int line;
+ for (line = 0; line < mMaxRows; line++)
+ {
+ if ((start + (int) line) >= 0 && (start + (int) line) < (int) mLastCount)
+ gr_textExW(mConsoleX, mStartY + (line * mFontHeight), gConsole[start + line].c_str(), fontResource, mConsoleW + mConsoleX);
+ }
+ return (mSlideout ? RenderSlideout() : 0);
+}
+
+int GUIConsole::Render(void)
+{
+ if (mSlideout && mSlideoutState == hidden)
+ return RenderSlideout();
+
+ return RenderConsole();
+}
+
+int GUIConsole::Update(void)
+{
+ if (mSlideout && mSlideoutState != visible)
+ {
+ if (mSlideoutState == hidden)
+ return 0;
+
+ if (mSlideoutState == request_hide)
+ mSlideoutState = hidden;
+
+ if (mSlideoutState == request_show)
+ mSlideoutState = visible;
+
+ // Any time we activate the slider, we reset the position
+ mCurrentLine = -1;
+ return 2;
+ }
+
+ if (mCurrentLine == -1 && mLastCount != gConsole.size())
+ {
+ // We can use Render, and return for just a flip
+ Render();
+ return 2;
+ }
+ else if (mLastTouchY >= 0)
+ {
+ // They're still touching, so re-render
+ Render();
+ mLastTouchY = -1;
+ return 2;
+ }
+ return 0;
+}
+
+int GUIConsole::SetRenderPos(int x, int y, int w, int h)
+{
+ // Adjust the stub position accordingly
+ mSlideoutX += (x - mConsoleX);
+ mSlideoutY += (y - mConsoleY);
+
+ mConsoleX = x;
+ mConsoleY = y;
+ if (w || h)
+ {
+ mConsoleW = w;
+ mConsoleH = h;
+ }
+
+ // Calculate the max rows
+ mMaxRows = mConsoleH / mFontHeight;
+
+ // Adjust so we always fit to bottom
+ mStartY = mConsoleY + (mConsoleH % mFontHeight);
+ return 0;
+}
+
+// IsInRegion - Checks if the request is handled by this object
+// Return 0 if this object handles the request, 1 if not
+int GUIConsole::IsInRegion(int x, int y)
+{
+ if (mSlideout)
+ {
+ // Check if they tapped the slideout button
+ if (x >= mSlideoutX && x <= mSlideoutX + mSlideoutW && y >= mSlideoutY && y < mSlideoutY + mSlideoutH)
+ return 1;
+
+ // If we're only rendering the slideout, bail now
+ if (mSlideoutState == hidden)
+ return 0;
+ }
+
+ return (x < mConsoleX || x > mConsoleX + mConsoleW || y < mConsoleY || y > mConsoleY + mConsoleH) ? 0 : 1;
+}
+
+// NotifyTouch - Notify of a touch event
+// 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 (mSlideout && mSlideoutState == hidden)
+ {
+ if (state == TOUCH_START)
+ {
+ mSlideoutState = request_show;
+ return 1;
+ }
+ }
+ else if (mSlideout && mSlideoutState == visible)
+ {
+ // Are we sliding it back in?
+ if (state == TOUCH_START && x > mSlideoutX && x < (mSlideoutX + mSlideoutW) && y > mSlideoutY && y < (mSlideoutY + mSlideoutH))
+ {
+ mSlideoutState = request_hide;
+ return 1;
+ }
+ }
+
+ // If we don't have enough lines to scroll, throw this away.
+ if (mLastCount < mMaxRows) return 1;
+
+ // We are scrolling!!!
+ switch (state)
+ {
+ case TOUCH_START:
+ mLastTouchX = x;
+ mLastTouchY = y;
+ if ((x - mConsoleX) > ((9 * mConsoleW) / 10))
+ mSlideMultiplier = 10;
+ else
+ mSlideMultiplier = 1;
+ break;
+
+ case TOUCH_DRAG:
+ // This handles tapping
+ if (x == mLastTouchX && y == mLastTouchY) break;
+ mLastTouchX = -1;
+
+ if (y > mLastTouchY + 5)
+ {
+ mLastTouchY = y;
+ if (mCurrentLine == -1)
+ mCurrentLine = mLastCount - 1;
+ else if (mCurrentLine > mSlideMultiplier)
+ mCurrentLine -= mSlideMultiplier;
+ else
+ mCurrentLine = mMaxRows;
+
+ if (mCurrentLine < (int) mMaxRows)
+ mCurrentLine = mMaxRows;
+ }
+ else if (y < mLastTouchY - 5)
+ {
+ mLastTouchY = y;
+ if (mCurrentLine >= 0)
+ {
+ mCurrentLine += mSlideMultiplier;
+ if (mCurrentLine >= (int) mLastCount)
+ mCurrentLine = -1;
+ }
+ }
+ break;
+
+ case TOUCH_RELEASE:
+ // On a tap, we jump to the tail
+ if (mLastTouchX >= 0)
+ mCurrentLine = -1;
+
+ mLastTouchY = -1;
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
diff --git a/gui/devices/1024x600/res/fonts/Roboto-Regular-20.dat b/gui/devices/1024x600/res/fonts/Roboto-Regular-20.dat
new file mode 100755
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/1024x600/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/1024x600/res/images/back-icon.png b/gui/devices/1024x600/res/images/back-icon.png
new file mode 100644
index 000000000..1096c9090
--- /dev/null
+++ b/gui/devices/1024x600/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/background.jpg b/gui/devices/1024x600/res/images/background.jpg
new file mode 100644
index 000000000..2ac48e0aa
--- /dev/null
+++ b/gui/devices/1024x600/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/1024x600/res/images/button.png b/gui/devices/1024x600/res/images/button.png
new file mode 100644
index 000000000..6ae29aebf
--- /dev/null
+++ b/gui/devices/1024x600/res/images/button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/checkbox_checked.png b/gui/devices/1024x600/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/1024x600/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/checkbox_empty.png b/gui/devices/1024x600/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/1024x600/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/console-icon.png b/gui/devices/1024x600/res/images/console-icon.png
new file mode 100644
index 000000000..91a727d40
--- /dev/null
+++ b/gui/devices/1024x600/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/console-toggle.png b/gui/devices/1024x600/res/images/console-toggle.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/1024x600/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/curtain.jpg b/gui/devices/1024x600/res/images/curtain.jpg
new file mode 100644
index 000000000..bb66e994f
--- /dev/null
+++ b/gui/devices/1024x600/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1024x600/res/images/file.png b/gui/devices/1024x600/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/1024x600/res/images/file.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/folder.png b/gui/devices/1024x600/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/1024x600/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/home-icon.png b/gui/devices/1024x600/res/images/home-icon.png
new file mode 100644
index 000000000..e42d774b1
--- /dev/null
+++ b/gui/devices/1024x600/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate001.png b/gui/devices/1024x600/res/images/indeterminate001.png
new file mode 100755
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate002.png b/gui/devices/1024x600/res/images/indeterminate002.png
new file mode 100755
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate003.png b/gui/devices/1024x600/res/images/indeterminate003.png
new file mode 100755
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate004.png b/gui/devices/1024x600/res/images/indeterminate004.png
new file mode 100755
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate005.png b/gui/devices/1024x600/res/images/indeterminate005.png
new file mode 100755
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/indeterminate006.png b/gui/devices/1024x600/res/images/indeterminate006.png
new file mode 100755
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/1024x600/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/keyboard1.png b/gui/devices/1024x600/res/images/keyboard1.png
new file mode 100644
index 000000000..c2aa0a08d
--- /dev/null
+++ b/gui/devices/1024x600/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/keyboard2.png b/gui/devices/1024x600/res/images/keyboard2.png
new file mode 100644
index 000000000..885114530
--- /dev/null
+++ b/gui/devices/1024x600/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/keyboard3.png b/gui/devices/1024x600/res/images/keyboard3.png
new file mode 100644
index 000000000..5c99fadab
--- /dev/null
+++ b/gui/devices/1024x600/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/keyboard4.png b/gui/devices/1024x600/res/images/keyboard4.png
new file mode 100644
index 000000000..30bae1484
--- /dev/null
+++ b/gui/devices/1024x600/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/medium-button.png b/gui/devices/1024x600/res/images/medium-button.png
new file mode 100644
index 000000000..77dc54072
--- /dev/null
+++ b/gui/devices/1024x600/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/mediumwide-button.png b/gui/devices/1024x600/res/images/mediumwide-button.png
new file mode 100644
index 000000000..b2b7d4de9
--- /dev/null
+++ b/gui/devices/1024x600/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/minus-button.png b/gui/devices/1024x600/res/images/minus-button.png
new file mode 100644
index 000000000..5a49c758e
--- /dev/null
+++ b/gui/devices/1024x600/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/plus-button.png b/gui/devices/1024x600/res/images/plus-button.png
new file mode 100644
index 000000000..da1326c92
--- /dev/null
+++ b/gui/devices/1024x600/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/progress_empty.png b/gui/devices/1024x600/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/1024x600/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/progress_fill.png b/gui/devices/1024x600/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/1024x600/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/radio_empty.png b/gui/devices/1024x600/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/1024x600/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/radio_selected.png b/gui/devices/1024x600/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/1024x600/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/slider-touch.png b/gui/devices/1024x600/res/images/slider-touch.png
new file mode 100644
index 000000000..d8647b8a6
--- /dev/null
+++ b/gui/devices/1024x600/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/slider-used.png b/gui/devices/1024x600/res/images/slider-used.png
new file mode 100644
index 000000000..bf6cad924
--- /dev/null
+++ b/gui/devices/1024x600/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/slider.png b/gui/devices/1024x600/res/images/slider.png
new file mode 100644
index 000000000..4081ea540
--- /dev/null
+++ b/gui/devices/1024x600/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/sort-button.png b/gui/devices/1024x600/res/images/sort-button.png
new file mode 100644
index 000000000..13ab929de
--- /dev/null
+++ b/gui/devices/1024x600/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1024x600/res/images/unlock.png b/gui/devices/1024x600/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/1024x600/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
new file mode 100755
index 000000000..569a5bd1f
--- /dev/null
+++ b/gui/devices/1024x600/res/ui.xml
@@ -0,0 +1,3865 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="1024" height="600" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="23" />
+ <variable name="col2_x" value="269" />
+ <variable name="col3_x" value="515" />
+ <variable name="col4_x" value="761" />
+ <variable name="row1_y" value="127" />
+ <variable name="row2_y" value="388" />
+ <variable name="col_center_x" value="392" />
+ <variable name="center_x" value="512" />
+ <variable name="screen_width" value="1024" />
+ <variable name="screen_height" value="600" />
+ <variable name="col_progressbar_x" value="386" />
+ <variable name="row_progressbar_y" value="540" />
+ <variable name="col1_medium_x" value="257" />
+ <variable name="col2_medium_x" value="387" />
+ <variable name="col3_medium_x" value="517" />
+ <variable name="col4_medium_x" value="647" />
+ <variable name="row1_medium_y" value="105" />
+ <variable name="row2_medium_y" value="200" />
+ <variable name="row3_medium_y" value="245" />
+ <variable name="row4_medium_y" value="440" />
+ <variable name="row5_medium_y" value="405" />
+ <variable name="row1_text_y" value="58" />
+ <variable name="row2_text_y" value="105" />
+ <variable name="row3_text_y" value="140" />
+ <variable name="row4_text_y" value="170" />
+ <variable name="row5_text_y" value="200" />
+ <variable name="row6_text_y" value="230" />
+ <variable name="row7_text_y" value="260" />
+ <variable name="row8_text_y" value="290" />
+ <variable name="row9_text_y" value="320" />
+ <variable name="row10_text_y" value="350" />
+ <variable name="row11_text_y" value="380" />
+ <variable name="row12_text_y" value="410" />
+ <variable name="row13_text_y" value="440" />
+ <variable name="row14_text_y" value="470" />
+ <variable name="row15_text_y" value="500" />
+ <variable name="row16_text_y" value="530" />
+ <variable name="row17_text_y" value="560" />
+ <variable name="row18_text_y" value="590" />
+ <variable name="row_offsetmedium_y" value="465" />
+ <variable name="home_button_x" value="813" />
+ <variable name="home_button_y" value="5" />
+ <variable name="back_button_x" value="883" />
+ <variable name="back_button_y" value="5" />
+ <variable name="console_button_x" value="953" />
+ <variable name="console_button_y" value="5" />
+ <variable name="nandcheck_col1" value="150" />
+ <variable name="nandcheck_col2" value="450" />
+ <variable name="nandcheck_row1" value="150" />
+ <variable name="nandcheck_row2" value="195" />
+ <variable name="nandcheck_row3" value="240" />
+ <variable name="nandcheck_row4" value="285" />
+ <variable name="nandcheck_row5" value="330" />
+ <variable name="nandcheck_row6" value="375" />
+ <variable name="nandcheck_row7" value="410" />
+ <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="slider_x" value="307" />
+ <variable name="slider_y" value="470" />
+ <variable name="slider_text_y" value="520" />
+ <variable name="sort_text_x" value="270" />
+ <variable name="sort_asc_text_y" value="510" />
+ <variable name="sort_asc_button_y" value="505" />
+ <variable name="sort_desc_text_y" value="545" />
+ <variable name="sort_desc_button_y" value="542" />
+ <variable name="sort_col1_button_x" value="440" />
+ <variable name="sort_col2_button_x" value="510" />
+ <variable name="sort_col3_button_x" value="580" />
+ <variable name="col1_sdext_x" value="370" />
+ <variable name="col2_sdext_x" value="600" />
+ <variable name="row1_sdext_y" value="115" />
+ <variable name="row2_sdext_y" value="180" />
+ <variable name="row_extsize_y" value="115" />
+ <variable name="row_swapsize_y" value="180" />
+ <variable name="input_x" value="28" />
+ <variable name="input_width" value="944" />
+ <variable name="input_height" value="30" />
+ <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="25" />
+ <variable name="console_width" value="974" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <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="28" />
+ <variable name="fileselector_folder_width" value="282" />
+ <variable name="fileselector_folderonly_width" value="460" />
+ <variable name="fileselector_file_x" value="317" />
+ <variable name="fileselector_file_width" value="682" />
+ <variable name="fileselector_install_y" value="120" />
+ <variable name="fileselector_install_height" value="382" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="32" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="24" />
+ <variable name="fastscroll_recth" value="40" />
+ <variable name="zipstorage_text_y" value="88" />
+ <variable name="listbox_x" value="269" />
+ <variable name="listbox_y" value="90" />
+ <variable name="listbox_width" value="460" />
+ <variable name="listbox_tz_height" value="290" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="18" />
+ <variable name="sd_plus_x" value="280" />
+ <variable name="lock_x" value="312" />
+ <variable name="lock_y" value="184" />
+ <variable name="filemanager_select_x" value="761" />
+ <variable name="filemanager_select_y" value="495" />
+ <variable name="backup_name_text_y" value="440" />
+ <variable name="backup_name_button_y" value="240" />
+ <variable name="col_right_x" value="996" />
+ <variable name="cancel_button_y" value="220" />
+ <variable name="terminal_console_y" value="0" />
+ <variable name="terminal_console_height" value="300" />
+ <variable name="terminal_text_y" value="307" />
+ <variable name="terminal_button_y" value="298" />
+ <variable name="terminal_input_width" value="775" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="512" />
+ <variable name="button_fill_main_width" value="486" />
+ <variable name="button_fill_main_height" value="150" />
+ <variable name="button_fill_half_height" value="50" />
+ <variable name="button_fill_quarter_height" value="30" />
+ <variable name="button_full_center_x" value="256" />
+ <variable name="backup_list_x" value="23" />
+ <variable name="backup_list_y" value="105" />
+ <variable name="backup_list_width" value="486" />
+ <variable name="backup_list_height" value="360" />
+ <variable name="backup_storage_y" value="250" />
+ <variable name="backup_encrypt_y" value="310" />
+ <variable name="restore_list_y" value="140" />
+ <variable name="restore_list_height" value="320" />
+ <variable name="mount_list_height" value="400" />
+ <variable name="mount_storage_row" value="500" />
+ <variable name="wipe_list_height" value="300" />
+ <variable name="wipe_button_y" value="190" />
+ <variable name="slidervalue_x" value="256" />
+ <variable name="slidervalue_w" value="512" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="0" />
+ <variable name="slidervalue_sliderw" value="10" />
+ <variable name="slidervalue_sliderh" value="50" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="5" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="30" />
+ <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="450" y="30" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="550" y="30" />
+ <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>
+ </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="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="85" w="%console_width%" h="340" />
+ <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="200" w="%console_width%" h="265" />
+ <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="75" w="%console_width%" h="497" />
+ <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="341" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="65" width="92" />
+ <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="104:c:8" />
+ <row2 key01="138:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="l" key10="150:action" />
+ <row3 key01="102:layout2" key02="91:z" key03="91:x" key04="91:c" key05="91:v" key06="91:b" key07="91:n" key08="91:m" key09="91:," long09="!" key10="91:." long10="?" key11="103::" long11="+" />
+ <row4 key01="132:layout3" key02="92:" key03="/" long03="@" key04="404: " key05="'" long05="92:c:34" key06="-" long06="_" />
+ </layout1>
+ <layout2>
+ <keysize height="65" width="92" />
+ <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="104:c:8" />
+ <row2 key01="138:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="L" key10="150:action" />
+ <row3 key01="102:layout1" key02="91:Z" key03="91:X" key04="91:C" key05="91:V" key06="91:B" key07="91:N" key08="91:M" key09="91:," long09="!" key10="91:." long10="?" key11="103::" long11="+" />
+ <row4 key01="132:layout3" key02="92:" key03="/" long03="@" key04="404: " key05="'" long05="92:c:34" key06="-" long06="_" />
+ </layout2>
+ <layout3>
+ <keysize height="65" width="92" />
+ <row1 key01="1" key02="2" key03="3" key04="4" key05="5" key06="6" key07="7" key08="8" key09="9" key10="0" key11="104:c:8" />
+ <row2 key01="138:#" key02="$" key03="%" key04="&" key05="*" key06="-" key07="+" key08="(" key09=")" key10="150:action" />
+ <row3 key01="102:layout4" key02="91:<" key03="91:>" key04="91:=" key05="91::" key06="91:;" key07="91:," key08="91:." key09="91:!" key10="91:?" key11="103:/" />
+ <row4 key01="132:layout1" key02="92:" key03="@" key04="404: " key05="92:c:34" key06="_" />
+ </layout3>
+ <layout4>
+ <keysize height="65" width="92" />
+ <row1 key01="~" key02="`" key03="|" key04="92:" key05="92:" key06="92:" key07="92:" key08="92:" key09="92:" key10="92:" key11="104:c:8" />
+ <row2 key01="138:" key02="92:" key03="92:" key04="92:" key05="^" key06="92:" key07="92:" key08="{" key09="}" key10="150:action" />
+ <row3 key01="102:layout3" key02="91:\" key03="91:" key04="91:" key05="91:" key06="91:" key07="91:[" key08="91:]" key09="91:!" key10="91:?" />
+ <row4 key01="132:layout1" key02="92:" key03="92:" key04="404: " />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/1024x768/res/fonts/Roboto-Regular-20.dat b/gui/devices/1024x768/res/fonts/Roboto-Regular-20.dat
new file mode 100755
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/1024x768/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/1024x768/res/images/back-icon.png b/gui/devices/1024x768/res/images/back-icon.png
new file mode 100644
index 000000000..1096c9090
--- /dev/null
+++ b/gui/devices/1024x768/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/background.jpg b/gui/devices/1024x768/res/images/background.jpg
new file mode 100644
index 000000000..2ac48e0aa
--- /dev/null
+++ b/gui/devices/1024x768/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/1024x768/res/images/button.png b/gui/devices/1024x768/res/images/button.png
new file mode 100644
index 000000000..6ae29aebf
--- /dev/null
+++ b/gui/devices/1024x768/res/images/button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/checkbox_checked.png b/gui/devices/1024x768/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/1024x768/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/checkbox_empty.png b/gui/devices/1024x768/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/1024x768/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/console-icon.png b/gui/devices/1024x768/res/images/console-icon.png
new file mode 100644
index 000000000..91a727d40
--- /dev/null
+++ b/gui/devices/1024x768/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/console-toggle.png b/gui/devices/1024x768/res/images/console-toggle.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/1024x768/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/curtain.jpg b/gui/devices/1024x768/res/images/curtain.jpg
new file mode 100644
index 000000000..38cc331ba
--- /dev/null
+++ b/gui/devices/1024x768/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1024x768/res/images/file.png b/gui/devices/1024x768/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/1024x768/res/images/file.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/folder.png b/gui/devices/1024x768/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/1024x768/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/home-icon.png b/gui/devices/1024x768/res/images/home-icon.png
new file mode 100644
index 000000000..e42d774b1
--- /dev/null
+++ b/gui/devices/1024x768/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate001.png b/gui/devices/1024x768/res/images/indeterminate001.png
new file mode 100755
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate002.png b/gui/devices/1024x768/res/images/indeterminate002.png
new file mode 100755
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate003.png b/gui/devices/1024x768/res/images/indeterminate003.png
new file mode 100755
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate004.png b/gui/devices/1024x768/res/images/indeterminate004.png
new file mode 100755
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate005.png b/gui/devices/1024x768/res/images/indeterminate005.png
new file mode 100755
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/indeterminate006.png b/gui/devices/1024x768/res/images/indeterminate006.png
new file mode 100755
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/1024x768/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/keyboard1.png b/gui/devices/1024x768/res/images/keyboard1.png
new file mode 100644
index 000000000..1c262e683
--- /dev/null
+++ b/gui/devices/1024x768/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/keyboard2.png b/gui/devices/1024x768/res/images/keyboard2.png
new file mode 100644
index 000000000..140503b57
--- /dev/null
+++ b/gui/devices/1024x768/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/keyboard3.png b/gui/devices/1024x768/res/images/keyboard3.png
new file mode 100644
index 000000000..bb8f58d4c
--- /dev/null
+++ b/gui/devices/1024x768/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/keyboard4.png b/gui/devices/1024x768/res/images/keyboard4.png
new file mode 100644
index 000000000..f3b444565
--- /dev/null
+++ b/gui/devices/1024x768/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/medium-button.png b/gui/devices/1024x768/res/images/medium-button.png
new file mode 100644
index 000000000..77dc54072
--- /dev/null
+++ b/gui/devices/1024x768/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/mediumwide-button.png b/gui/devices/1024x768/res/images/mediumwide-button.png
new file mode 100644
index 000000000..b2b7d4de9
--- /dev/null
+++ b/gui/devices/1024x768/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/minus-button.png b/gui/devices/1024x768/res/images/minus-button.png
new file mode 100644
index 000000000..5a49c758e
--- /dev/null
+++ b/gui/devices/1024x768/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/plus-button.png b/gui/devices/1024x768/res/images/plus-button.png
new file mode 100644
index 000000000..da1326c92
--- /dev/null
+++ b/gui/devices/1024x768/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/progress_empty.png b/gui/devices/1024x768/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/1024x768/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/progress_fill.png b/gui/devices/1024x768/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/1024x768/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/radio_empty.png b/gui/devices/1024x768/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/1024x768/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/radio_selected.png b/gui/devices/1024x768/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/1024x768/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/slider-touch.png b/gui/devices/1024x768/res/images/slider-touch.png
new file mode 100644
index 000000000..d8647b8a6
--- /dev/null
+++ b/gui/devices/1024x768/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/slider-used.png b/gui/devices/1024x768/res/images/slider-used.png
new file mode 100644
index 000000000..bf6cad924
--- /dev/null
+++ b/gui/devices/1024x768/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/slider.png b/gui/devices/1024x768/res/images/slider.png
new file mode 100644
index 000000000..4081ea540
--- /dev/null
+++ b/gui/devices/1024x768/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/sort-button.png b/gui/devices/1024x768/res/images/sort-button.png
new file mode 100644
index 000000000..13ab929de
--- /dev/null
+++ b/gui/devices/1024x768/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1024x768/res/images/unlock.png b/gui/devices/1024x768/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/1024x768/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
new file mode 100644
index 000000000..6f8797a74
--- /dev/null
+++ b/gui/devices/1024x768/res/ui.xml
@@ -0,0 +1,3865 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="1024" height="768" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="23" />
+ <variable name="col2_x" value="269" />
+ <variable name="col3_x" value="515" />
+ <variable name="col4_x" value="761" />
+ <variable name="row1_y" value="127" />
+ <variable name="row2_y" value="388" />
+ <variable name="col_center_x" value="392" />
+ <variable name="center_x" value="512" />
+ <variable name="screen_width" value="1024" />
+ <variable name="screen_height" value="768" />
+ <variable name="col_progressbar_x" value="386" />
+ <variable name="row_progressbar_y" value="700" />
+ <variable name="col1_medium_x" value="257" />
+ <variable name="col2_medium_x" value="387" />
+ <variable name="col3_medium_x" value="517" />
+ <variable name="col4_medium_x" value="647" />
+ <variable name="row1_medium_y" value="105" />
+ <variable name="row2_medium_y" value="245" />
+ <variable name="row3_medium_y" value="245" />
+ <variable name="row4_medium_y" value="450" />
+ <variable name="row5_medium_y" value="405" />
+ <variable name="row1_text_y" value="58" />
+ <variable name="row2_text_y" value="105" />
+ <variable name="row3_text_y" value="140" />
+ <variable name="row4_text_y" value="170" />
+ <variable name="row5_text_y" value="200" />
+ <variable name="row6_text_y" value="230" />
+ <variable name="row7_text_y" value="260" />
+ <variable name="row8_text_y" value="290" />
+ <variable name="row9_text_y" value="320" />
+ <variable name="row10_text_y" value="350" />
+ <variable name="row11_text_y" value="380" />
+ <variable name="row12_text_y" value="410" />
+ <variable name="row13_text_y" value="440" />
+ <variable name="row14_text_y" value="470" />
+ <variable name="row15_text_y" value="500" />
+ <variable name="row16_text_y" value="530" />
+ <variable name="row17_text_y" value="560" />
+ <variable name="row18_text_y" value="590" />
+ <variable name="row_offsetmedium_y" value="465" />
+ <variable name="home_button_x" value="813" />
+ <variable name="home_button_y" value="5" />
+ <variable name="back_button_x" value="883" />
+ <variable name="back_button_y" value="5" />
+ <variable name="console_button_x" value="953" />
+ <variable name="console_button_y" value="5" />
+ <variable name="nandcheck_col1" value="150" />
+ <variable name="nandcheck_col2" value="450" />
+ <variable name="nandcheck_row1" value="150" />
+ <variable name="nandcheck_row2" value="200" />
+ <variable name="nandcheck_row3" value="250" />
+ <variable name="nandcheck_row4" value="300" />
+ <variable name="nandcheck_row5" value="350" />
+ <variable name="nandcheck_row6" value="400" />
+ <variable name="nandcheck_row7" value="450" />
+ <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="slider_x" value="307" />
+ <variable name="slider_y" value="600" />
+ <variable name="slider_text_y" value="650" />
+ <variable name="sort_text_x" value="270" />
+ <variable name="sort_asc_text_y" value="655" />
+ <variable name="sort_asc_button_y" value="650" />
+ <variable name="sort_desc_text_y" value="700" />
+ <variable name="sort_desc_button_y" value="695" />
+ <variable name="sort_col1_button_x" value="440" />
+ <variable name="sort_col2_button_x" value="510" />
+ <variable name="sort_col3_button_x" value="580" />
+ <variable name="col1_sdext_x" value="370" />
+ <variable name="col2_sdext_x" value="600" />
+ <variable name="row1_sdext_y" value="115" />
+ <variable name="row2_sdext_y" value="180" />
+ <variable name="row_extsize_y" value="115" />
+ <variable name="row_swapsize_y" value="180" />
+ <variable name="input_x" value="28" />
+ <variable name="input_width" value="944" />
+ <variable name="input_height" value="30" />
+ <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="25" />
+ <variable name="console_width" value="974" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <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="28" />
+ <variable name="fileselector_folder_width" value="282" />
+ <variable name="fileselector_folderonly_width" value="460" />
+ <variable name="fileselector_file_x" value="317" />
+ <variable name="fileselector_file_width" value="682" />
+ <variable name="fileselector_install_y" value="120" />
+ <variable name="fileselector_install_height" value="510" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="32" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="24" />
+ <variable name="fastscroll_recth" value="40" />
+ <variable name="zipstorage_text_y" value="88" />
+ <variable name="listbox_x" value="269" />
+ <variable name="listbox_y" value="90" />
+ <variable name="listbox_width" value="460" />
+ <variable name="listbox_tz_height" value="290" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="18" />
+ <variable name="sd_plus_x" value="280" />
+ <variable name="lock_x" value="312" />
+ <variable name="lock_y" value="184" />
+ <variable name="filemanager_select_x" value="761" />
+ <variable name="filemanager_select_y" value="620" />
+ <variable name="backup_name_text_y" value="440" />
+ <variable name="backup_name_button_y" value="240" />
+ <variable name="col_right_x" value="996" />
+ <variable name="cancel_button_y" value="240" />
+ <variable name="terminal_console_y" value="0" />
+ <variable name="terminal_console_height" value="362" />
+ <variable name="terminal_text_y" value="368" />
+ <variable name="terminal_button_y" value="358" />
+ <variable name="terminal_input_width" value="775" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="512" />
+ <variable name="button_fill_main_width" value="486" />
+ <variable name="button_fill_main_height" value="150" />
+ <variable name="button_fill_half_height" value="50" />
+ <variable name="button_fill_quarter_height" value="30" />
+ <variable name="button_full_center_x" value="256" />
+ <variable name="backup_list_x" value="23" />
+ <variable name="backup_list_y" value="105" />
+ <variable name="backup_list_width" value="486" />
+ <variable name="backup_list_height" value="450" />
+ <variable name="backup_storage_y" value="250" />
+ <variable name="backup_encrypt_y" value="310" />
+ <variable name="restore_list_y" value="140" />
+ <variable name="restore_list_height" value="400" />
+ <variable name="mount_list_height" value="500" />
+ <variable name="mount_storage_row" value="500" />
+ <variable name="wipe_list_height" value="400" />
+ <variable name="wipe_button_y" value="190" />
+ <variable name="slidervalue_x" value="256" />
+ <variable name="slidervalue_w" value="512" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="0" />
+ <variable name="slidervalue_sliderw" value="10" />
+ <variable name="slidervalue_sliderh" value="50" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="5" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="30" />
+ <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="450" y="30" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="550" y="30" />
+ <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>
+ </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="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="85" w="%console_width%" h="430" />
+ <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="200" w="%console_width%" h="380" />
+ <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="75" w="%console_width%" h="665" />
+ <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="408" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="90" width="85" />
+ <row1 key01="80:" 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="94:c:8" />
+ <row2 key01="115:layout3" key02="83:a" key03="83:s" key04="83:d" key05="83:f" key06="83:g" key07="83:h" key08="83:j" key09="83:k" key10="83:l" key11="162:action" />
+ <row3 key01="140:layout2" key02="82:z" key03="82:x" key04="82:c" key05="82:v" key06="82:b" key07="82:n" key08="82:m" key09="82:," long09="!" key10="82:." long10="?" key11="144:layout2" />
+ <row4 key01="320:" key02="385: " key03="80:/" long03=":" key04="80:-" long04="_" />
+ </layout1>
+ <layout2>
+ <keysize height="90" width="85" />
+ <row1 key01="80:" 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="94:c:8" />
+ <row2 key01="115:layout3" key02="83:A" key03="83:S" key04="83:D" key05="83:F" key06="83:G" key07="83:H" key08="83:J" key09="83:K" key10="83:L" key11="162:action" />
+ <row3 key01="140:layout1" key02="82:Z" key03="82:X" key04="82:C" key05="82:V" key06="82:B" key07="82:N" key08="82:M" key09="82:," long09="!" key10="82:." long10="?" key11="144:layout1" />
+ <row4 key01="320:" key02="385: " key03="80:/" long03=":" key04="80:-" long04="_" />
+ </layout2>
+ <layout3>
+ <keysize height="90" width="85" />
+ <row1 key01="80:" key02="1" key03="2" key04="3" key05="4" key06="5" key07="6" key08="7" key09="8" key10="9" key11="0" key12="94:c:8" />
+ <row2 key01="115:layout1" key02="83:#" key03="83:$" key04="83:%" key05="83:&" key06="83:*" key07="83:-" key08="83:+" key09="83:(" key10="83:)" key11="162:action" />
+ <row3 key01="140:layout4" key02="82:<" key03="82:>" key04="82:=" key05="82:'" key06="82:;" key07="82:," key08="82:." key09="82:!" key10="82:?" key11="144:layout4" />
+ <row4 key01="155:" key02="85:/" key03="85:@" key04="385: " key05="80:c:34" key06="_" />
+ </layout3>
+ <layout4>
+ <keysize height="90" width="85" />
+ <row1 key01="80:" key02="~" key03="`" key04="|" key05="85:" key06="85:" key07="85:" key08="85:" key09="85:" key10="85:" key11="85:" key12="94:c:8" />
+ <row2 key01="115:layout1" key02="83:" key03="83:" key04="83:" key05="83:" key06="83:^" key07="83:" key08="83:" key09="83:{" key10="83:}" key11="162:action" />
+ <row3 key01="140:layout3" key02="82:\" key03="82:" key04="82:" key05="82:" key06="82:" key07="82:[" key08="82:]" key09="82:!" key10="82:?" key11="144:layout3" />
+ <row4 key01="320:" key02="385: " />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/1080x1920/res/fonts/Roboto-Condensed-40.dat b/gui/devices/1080x1920/res/fonts/Roboto-Condensed-40.dat
new file mode 100644
index 000000000..ff23add82
--- /dev/null
+++ b/gui/devices/1080x1920/res/fonts/Roboto-Condensed-40.dat
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/back-icon.png b/gui/devices/1080x1920/res/images/back-icon.png
new file mode 100644
index 000000000..85c6a5d68
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/checkbox_checked.png b/gui/devices/1080x1920/res/images/checkbox_checked.png
new file mode 100644
index 000000000..65d0b34da
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/checkbox_empty.png b/gui/devices/1080x1920/res/images/checkbox_empty.png
new file mode 100644
index 000000000..89b4c9627
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/curtain.jpg b/gui/devices/1080x1920/res/images/curtain.jpg
new file mode 100644
index 000000000..269941d5e
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/file.png b/gui/devices/1080x1920/res/images/file.png
new file mode 100644
index 000000000..a69b61996
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/file.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/folder.png b/gui/devices/1080x1920/res/images/folder.png
new file mode 100644
index 000000000..fbea7a970
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/home-icon.png b/gui/devices/1080x1920/res/images/home-icon.png
new file mode 100644
index 000000000..d6bc73d82
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate001.png b/gui/devices/1080x1920/res/images/indeterminate001.png
new file mode 100644
index 000000000..a205e91aa
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate002.png b/gui/devices/1080x1920/res/images/indeterminate002.png
new file mode 100644
index 000000000..f777408be
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate003.png b/gui/devices/1080x1920/res/images/indeterminate003.png
new file mode 100644
index 000000000..cbb597482
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate004.png b/gui/devices/1080x1920/res/images/indeterminate004.png
new file mode 100644
index 000000000..5ff77341d
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate005.png b/gui/devices/1080x1920/res/images/indeterminate005.png
new file mode 100644
index 000000000..7cc9abb4f
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/indeterminate006.png b/gui/devices/1080x1920/res/images/indeterminate006.png
new file mode 100644
index 000000000..9eed17600
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/keyboard1.png b/gui/devices/1080x1920/res/images/keyboard1.png
new file mode 100644
index 000000000..79a8b69cb
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/keyboard2.png b/gui/devices/1080x1920/res/images/keyboard2.png
new file mode 100644
index 000000000..63a5b6a19
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/keyboard3.png b/gui/devices/1080x1920/res/images/keyboard3.png
new file mode 100644
index 000000000..a646c7557
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/keyboard4.png b/gui/devices/1080x1920/res/images/keyboard4.png
new file mode 100644
index 000000000..3b2905adb
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/medium-button.png b/gui/devices/1080x1920/res/images/medium-button.png
new file mode 100644
index 000000000..a3bf30d58
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/menu-button.png b/gui/devices/1080x1920/res/images/menu-button.png
new file mode 100644
index 000000000..36d3f0127
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/minus-button.png b/gui/devices/1080x1920/res/images/minus-button.png
new file mode 100644
index 000000000..e2edbe45f
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/plus-button.png b/gui/devices/1080x1920/res/images/plus-button.png
new file mode 100644
index 000000000..b67d9b928
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/progress_empty.png b/gui/devices/1080x1920/res/images/progress_empty.png
new file mode 100644
index 000000000..d4ea0c2fe
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/progress_fill.png b/gui/devices/1080x1920/res/images/progress_fill.png
new file mode 100644
index 000000000..836e437ae
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/radio_empty.png b/gui/devices/1080x1920/res/images/radio_empty.png
new file mode 100644
index 000000000..9c2c66bb0
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/radio_selected.png b/gui/devices/1080x1920/res/images/radio_selected.png
new file mode 100644
index 000000000..8d05b9d48
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/slideout.png b/gui/devices/1080x1920/res/images/slideout.png
new file mode 100644
index 000000000..56a9ac2aa
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/slider-touch.png b/gui/devices/1080x1920/res/images/slider-touch.png
new file mode 100644
index 000000000..b3365afee
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/slider-used.png b/gui/devices/1080x1920/res/images/slider-used.png
new file mode 100644
index 000000000..229d9109e
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/slider.png b/gui/devices/1080x1920/res/images/slider.png
new file mode 100644
index 000000000..1e034a621
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/sort-button.png b/gui/devices/1080x1920/res/images/sort-button.png
new file mode 100644
index 000000000..c6783a15c
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/top-bar.jpg b/gui/devices/1080x1920/res/images/top-bar.jpg
new file mode 100644
index 000000000..5121a031a
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/1080x1920/res/images/unlock.png b/gui/devices/1080x1920/res/images/unlock.png
new file mode 100644
index 000000000..dc3894b76
--- /dev/null
+++ b/gui/devices/1080x1920/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
new file mode 100644
index 000000000..beaf37325
--- /dev/null
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -0,0 +1,3859 @@
+<?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>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-40" />
+ <resource name="mediumfont" type="font" filename="Roboto-Condensed-40" />
+ <resource name="filelist" type="font" filename="Roboto-Condensed-40" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </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="tz_selected_y" value="240" />
+ <variable name="tz_set_y" value="1500" />
+ <variable name="tz_current_y" value="1425" />
+ <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_x" value="101" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="1839" />
+ <variable name="back_button_x" value="944" />
+ <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="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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="90" />
+ <variable name="fastscroll_linew" value="3" />
+ <variable name="fastscroll_rectw" value="60" />
+ <variable name="fastscroll_recth" value="105" />
+ <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_x" value="240" />
+ <variable name="lock_y" value="600" />
+ <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="1050" />
+ <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="1305" />
+ <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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </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="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>
+ </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="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="500" y="1841" />
+ <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" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%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:" key04="432: " key05="." key06="162:action" />
+ </layout1>
+ <layout2>
+ <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: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" />
+ </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" />
+ </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:" key02="108:" key03="108:" key04="108:" key05="108:" 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" />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/1200x1920/res/fonts/Roboto-Condensed-40.dat b/gui/devices/1200x1920/res/fonts/Roboto-Condensed-40.dat
new file mode 100644
index 000000000..ff23add82
--- /dev/null
+++ b/gui/devices/1200x1920/res/fonts/Roboto-Condensed-40.dat
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/back-icon.png b/gui/devices/1200x1920/res/images/back-icon.png
new file mode 100644
index 000000000..85c6a5d68
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/checkbox_checked.png b/gui/devices/1200x1920/res/images/checkbox_checked.png
new file mode 100644
index 000000000..65d0b34da
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/checkbox_empty.png b/gui/devices/1200x1920/res/images/checkbox_empty.png
new file mode 100644
index 000000000..89b4c9627
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/curtain.jpg b/gui/devices/1200x1920/res/images/curtain.jpg
new file mode 100644
index 000000000..d2160abe5
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/file.png b/gui/devices/1200x1920/res/images/file.png
new file mode 100644
index 000000000..a69b61996
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/file.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/folder.png b/gui/devices/1200x1920/res/images/folder.png
new file mode 100644
index 000000000..fbea7a970
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/home-icon.png b/gui/devices/1200x1920/res/images/home-icon.png
new file mode 100644
index 000000000..d6bc73d82
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate001.png b/gui/devices/1200x1920/res/images/indeterminate001.png
new file mode 100644
index 000000000..a205e91aa
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate002.png b/gui/devices/1200x1920/res/images/indeterminate002.png
new file mode 100644
index 000000000..f777408be
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate003.png b/gui/devices/1200x1920/res/images/indeterminate003.png
new file mode 100644
index 000000000..cbb597482
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate004.png b/gui/devices/1200x1920/res/images/indeterminate004.png
new file mode 100644
index 000000000..5ff77341d
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate005.png b/gui/devices/1200x1920/res/images/indeterminate005.png
new file mode 100644
index 000000000..7cc9abb4f
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/indeterminate006.png b/gui/devices/1200x1920/res/images/indeterminate006.png
new file mode 100644
index 000000000..9eed17600
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/keyboard1.png b/gui/devices/1200x1920/res/images/keyboard1.png
new file mode 100644
index 000000000..d74693352
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/keyboard2.png b/gui/devices/1200x1920/res/images/keyboard2.png
new file mode 100644
index 000000000..23b46abf6
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/keyboard3.png b/gui/devices/1200x1920/res/images/keyboard3.png
new file mode 100644
index 000000000..56ed4df72
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/keyboard4.png b/gui/devices/1200x1920/res/images/keyboard4.png
new file mode 100644
index 000000000..b40d6c238
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/medium-button.png b/gui/devices/1200x1920/res/images/medium-button.png
new file mode 100644
index 000000000..a3bf30d58
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/menu-button.png b/gui/devices/1200x1920/res/images/menu-button.png
new file mode 100644
index 000000000..7b48be309
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/minus-button.png b/gui/devices/1200x1920/res/images/minus-button.png
new file mode 100644
index 000000000..e2edbe45f
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/plus-button.png b/gui/devices/1200x1920/res/images/plus-button.png
new file mode 100644
index 000000000..b67d9b928
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/progress_empty.png b/gui/devices/1200x1920/res/images/progress_empty.png
new file mode 100644
index 000000000..d4ea0c2fe
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/progress_fill.png b/gui/devices/1200x1920/res/images/progress_fill.png
new file mode 100644
index 000000000..836e437ae
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/radio_empty.png b/gui/devices/1200x1920/res/images/radio_empty.png
new file mode 100644
index 000000000..9c2c66bb0
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/radio_selected.png b/gui/devices/1200x1920/res/images/radio_selected.png
new file mode 100644
index 000000000..8d05b9d48
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/slideout.png b/gui/devices/1200x1920/res/images/slideout.png
new file mode 100644
index 000000000..56a9ac2aa
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/slider-touch.png b/gui/devices/1200x1920/res/images/slider-touch.png
new file mode 100644
index 000000000..b3365afee
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/slider-used.png b/gui/devices/1200x1920/res/images/slider-used.png
new file mode 100644
index 000000000..229d9109e
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/slider.png b/gui/devices/1200x1920/res/images/slider.png
new file mode 100644
index 000000000..1e034a621
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/sort-button.png b/gui/devices/1200x1920/res/images/sort-button.png
new file mode 100644
index 000000000..c6783a15c
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/top-bar.jpg b/gui/devices/1200x1920/res/images/top-bar.jpg
new file mode 100644
index 000000000..5d35f2997
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/1200x1920/res/images/unlock.png b/gui/devices/1200x1920/res/images/unlock.png
new file mode 100644
index 000000000..dc3894b76
--- /dev/null
+++ b/gui/devices/1200x1920/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml
new file mode 100644
index 000000000..a83c30bb7
--- /dev/null
+++ b/gui/devices/1200x1920/res/ui.xml
@@ -0,0 +1,3862 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="1200" height="1920" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-40" />
+ <resource name="mediumfont" type="font" filename="Roboto-Condensed-40" />
+ <resource name="filelist" type="font" filename="Roboto-Condensed-40" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="624" />
+ <variable name="col_center_x" value="317" />
+ <variable name="col_center_medium_x" value="473" />
+ <variable name="center_x" value="600" />
+ <variable name="row1_y" value="255" />
+ <variable name="row2_y" value="615" />
+ <variable name="row3_y" value="975" />
+ <variable name="row4_y" value="1335" />
+
+ <!-- these two are unused? -->
+ <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="tz_selected_y" value="240" />
+ <variable name="tz_set_y" value="1500" />
+ <variable name="tz_current_y" value="1425" />
+ <variable name="col_progressbar_x" value="411" />
+ <variable name="row_progressbar_y" value="1650" />
+ <variable name="col1_medium_x" value="10" />
+ <variable name="col2_medium_x" value="318" />
+ <variable name="col3_medium_x" value="626" />
+ <variable name="col4_medium_x" value="934" />
+ <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_x" value="161" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="1839" />
+ <variable name="back_button_x" value="1064" />
+ <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="1180" />
+ <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="1200" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <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="1190" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="90" />
+ <variable name="fastscroll_linew" value="3" />
+ <variable name="fastscroll_rectw" value="60" />
+ <variable name="fastscroll_recth" value="105" />
+ <variable name="listbox_x" value="5" />
+ <variable name="listbox_width" value="1190" />
+ <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_x" value="240" />
+ <variable name="lock_y" value="600" />
+ <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="980" />
+ <variable name="terminal_text_y" value="1025" />
+ <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="1180" />
+ <variable name="button_fill_main_width" value="565" />
+ <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="1305" />
+ <variable name="wipe_button_y" value="975" />
+ <variable name="slidervalue_w" value="1180" />
+ <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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </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="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>
+ </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="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="1200" 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="540" y="1841" />
+ <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="1129" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="179" width="120" />
+ <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="180: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="180:layout2" key02="z" long02="!" key03="x" key04="c" long04="'" key05="v" long05=":" key06="b" long06=";" key07="n" long07="/" key08="m" long08="?" key09="182:c:8" />
+ <row4 key01="180:layout3" key02="120:c:47" key03="600: " key04="." key05="180:action" />
+ </layout1>
+ <layout2>
+ <keysize height="179" width="120" />
+ <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="180: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="180:layout1" key02="Z" long02="!" key03="X" key04="C" long04="'" key05="V" long05=":" key06="B" long06=";" key07="N" long07="/" key08="M" long08="?" key09="180:c:8" />
+ <row4 key01="180:layout3" key02="120:c:47" key03="600: " key04="." key05="180:action" />
+ </layout2>
+ <layout3>
+ <keysize height="179" width="120" />
+ <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="180:layout4" key02="!" key03="120:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="180:c:8" />
+ <row4 key01="180:layout1" key02="," key03="600: " key04="." key05="180:action" />
+ </layout3>
+ <layout4>
+ <keysize height="179" width="120" />
+ <row1 key01="~" key02="`" key03="|" key04="120:" key05="120:" key06="120:" key07="%" key08="120:" key09="{" key10="}" />
+ <row2 key01="120:" key02="120:" key03="120:" key04="120:" key05="120:" key06="^" key07="_" key08="=" key09="[" key10="]" />
+ <row3 key01="180:layout3" key02="120:" key03="120:" key04="120:" key05="120:" key06="\" key07="<" key08=">" key09="180:c:8" />
+ <row4 key01="180:layout1" key02="120:c:34" key03="600: " key04="." key05="180:action" />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/1280x800/res/fonts/Roboto-Regular-20.dat b/gui/devices/1280x800/res/fonts/Roboto-Regular-20.dat
new file mode 100755
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/1280x800/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/1280x800/res/images/back-icon.png b/gui/devices/1280x800/res/images/back-icon.png
new file mode 100644
index 000000000..1096c9090
--- /dev/null
+++ b/gui/devices/1280x800/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/background.jpg b/gui/devices/1280x800/res/images/background.jpg
new file mode 100644
index 000000000..d9681c62d
--- /dev/null
+++ b/gui/devices/1280x800/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/1280x800/res/images/button.png b/gui/devices/1280x800/res/images/button.png
new file mode 100644
index 000000000..6ae29aebf
--- /dev/null
+++ b/gui/devices/1280x800/res/images/button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/checkbox_checked.png b/gui/devices/1280x800/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/1280x800/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/checkbox_empty.png b/gui/devices/1280x800/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/1280x800/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/console-icon.png b/gui/devices/1280x800/res/images/console-icon.png
new file mode 100644
index 000000000..91a727d40
--- /dev/null
+++ b/gui/devices/1280x800/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/console-toggle.png b/gui/devices/1280x800/res/images/console-toggle.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/1280x800/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/curtain.jpg b/gui/devices/1280x800/res/images/curtain.jpg
new file mode 100644
index 000000000..7646e3ea1
--- /dev/null
+++ b/gui/devices/1280x800/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1280x800/res/images/file.png b/gui/devices/1280x800/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/1280x800/res/images/file.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/folder.png b/gui/devices/1280x800/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/1280x800/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/home-icon.png b/gui/devices/1280x800/res/images/home-icon.png
new file mode 100644
index 000000000..e42d774b1
--- /dev/null
+++ b/gui/devices/1280x800/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate001.png b/gui/devices/1280x800/res/images/indeterminate001.png
new file mode 100755
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate002.png b/gui/devices/1280x800/res/images/indeterminate002.png
new file mode 100755
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate003.png b/gui/devices/1280x800/res/images/indeterminate003.png
new file mode 100755
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate004.png b/gui/devices/1280x800/res/images/indeterminate004.png
new file mode 100755
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate005.png b/gui/devices/1280x800/res/images/indeterminate005.png
new file mode 100755
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/indeterminate006.png b/gui/devices/1280x800/res/images/indeterminate006.png
new file mode 100755
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/1280x800/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/keyboard1.png b/gui/devices/1280x800/res/images/keyboard1.png
new file mode 100644
index 000000000..d75550f1f
--- /dev/null
+++ b/gui/devices/1280x800/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/keyboard2.png b/gui/devices/1280x800/res/images/keyboard2.png
new file mode 100644
index 000000000..cf2eb8f1d
--- /dev/null
+++ b/gui/devices/1280x800/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/keyboard3.png b/gui/devices/1280x800/res/images/keyboard3.png
new file mode 100644
index 000000000..c8f7b0381
--- /dev/null
+++ b/gui/devices/1280x800/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/keyboard4.png b/gui/devices/1280x800/res/images/keyboard4.png
new file mode 100644
index 000000000..7dd3987e1
--- /dev/null
+++ b/gui/devices/1280x800/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/medium-button.png b/gui/devices/1280x800/res/images/medium-button.png
new file mode 100644
index 000000000..77dc54072
--- /dev/null
+++ b/gui/devices/1280x800/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/mediumwide-button.png b/gui/devices/1280x800/res/images/mediumwide-button.png
new file mode 100644
index 000000000..b2b7d4de9
--- /dev/null
+++ b/gui/devices/1280x800/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/minus-button.png b/gui/devices/1280x800/res/images/minus-button.png
new file mode 100644
index 000000000..5a49c758e
--- /dev/null
+++ b/gui/devices/1280x800/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/plus-button.png b/gui/devices/1280x800/res/images/plus-button.png
new file mode 100644
index 000000000..da1326c92
--- /dev/null
+++ b/gui/devices/1280x800/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/progress_empty.png b/gui/devices/1280x800/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/1280x800/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/progress_fill.png b/gui/devices/1280x800/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/1280x800/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/radio_empty.png b/gui/devices/1280x800/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/1280x800/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/radio_selected.png b/gui/devices/1280x800/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/1280x800/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/slider-touch.png b/gui/devices/1280x800/res/images/slider-touch.png
new file mode 100644
index 000000000..d8647b8a6
--- /dev/null
+++ b/gui/devices/1280x800/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/slider-used.png b/gui/devices/1280x800/res/images/slider-used.png
new file mode 100644
index 000000000..bf6cad924
--- /dev/null
+++ b/gui/devices/1280x800/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/slider.png b/gui/devices/1280x800/res/images/slider.png
new file mode 100644
index 000000000..4081ea540
--- /dev/null
+++ b/gui/devices/1280x800/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/sort-button.png b/gui/devices/1280x800/res/images/sort-button.png
new file mode 100644
index 000000000..13ab929de
--- /dev/null
+++ b/gui/devices/1280x800/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1280x800/res/images/unlock.png b/gui/devices/1280x800/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/1280x800/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
new file mode 100644
index 000000000..115a391eb
--- /dev/null
+++ b/gui/devices/1280x800/res/ui.xml
@@ -0,0 +1,3865 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="1280" height="800" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="151" />
+ <variable name="col2_x" value="397" />
+ <variable name="col3_x" value="643" />
+ <variable name="col4_x" value="889" />
+ <variable name="row1_y" value="127" />
+ <variable name="row2_y" value="388" />
+ <variable name="col_center_x" value="520" />
+ <variable name="center_x" value="640" />
+ <variable name="screen_width" value="1280" />
+ <variable name="screen_height" value="800" />
+ <variable name="col_progressbar_x" value="514" />
+ <variable name="row_progressbar_y" value="700" />
+ <variable name="col1_medium_x" value="385" />
+ <variable name="col2_medium_x" value="515" />
+ <variable name="col3_medium_x" value="645" />
+ <variable name="col4_medium_x" value="775" />
+ <variable name="row1_medium_y" value="105" />
+ <variable name="row2_medium_y" value="245" />
+ <variable name="row3_medium_y" value="245" />
+ <variable name="row4_medium_y" value="450" />
+ <variable name="row5_medium_y" value="405" />
+ <variable name="row1_text_y" value="58" />
+ <variable name="row2_text_y" value="105" />
+ <variable name="row3_text_y" value="140" />
+ <variable name="row4_text_y" value="170" />
+ <variable name="row5_text_y" value="200" />
+ <variable name="row6_text_y" value="230" />
+ <variable name="row7_text_y" value="260" />
+ <variable name="row8_text_y" value="290" />
+ <variable name="row9_text_y" value="320" />
+ <variable name="row10_text_y" value="350" />
+ <variable name="row11_text_y" value="380" />
+ <variable name="row12_text_y" value="410" />
+ <variable name="row13_text_y" value="440" />
+ <variable name="row14_text_y" value="470" />
+ <variable name="row15_text_y" value="500" />
+ <variable name="row16_text_y" value="530" />
+ <variable name="row17_text_y" value="560" />
+ <variable name="row18_text_y" value="590" />
+ <variable name="row_offsetmedium_y" value="465" />
+ <variable name="home_button_x" value="1069" />
+ <variable name="home_button_y" value="5" />
+ <variable name="back_button_x" value="1139" />
+ <variable name="back_button_y" value="5" />
+ <variable name="console_button_x" value="1209" />
+ <variable name="console_button_y" value="5" />
+ <variable name="nandcheck_col1" value="328" />
+ <variable name="nandcheck_col2" value="600" />
+ <variable name="nandcheck_row1" value="150" />
+ <variable name="nandcheck_row2" value="200" />
+ <variable name="nandcheck_row3" value="250" />
+ <variable name="nandcheck_row4" value="300" />
+ <variable name="nandcheck_row5" value="350" />
+ <variable name="nandcheck_row6" value="400" />
+ <variable name="nandcheck_row7" value="450" />
+ <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="slider_x" value="435" />
+ <variable name="slider_y" value="600" />
+ <variable name="slider_text_y" value="650" />
+ <variable name="sort_text_x" value="398" />
+ <variable name="sort_asc_text_y" value="655" />
+ <variable name="sort_asc_button_y" value="650" />
+ <variable name="sort_desc_text_y" value="700" />
+ <variable name="sort_desc_button_y" value="695" />
+ <variable name="sort_col1_button_x" value="568" />
+ <variable name="sort_col2_button_x" value="638" />
+ <variable name="sort_col3_button_x" value="708" />
+ <variable name="col1_sdext_x" value="508" />
+ <variable name="col2_sdext_x" value="718" />
+ <variable name="row1_sdext_y" value="115" />
+ <variable name="row2_sdext_y" value="180" />
+ <variable name="row_extsize_y" value="115" />
+ <variable name="row_swapsize_y" value="180" />
+ <variable name="input_x" value="28" />
+ <variable name="input_width" value="1200" />
+ <variable name="input_height" value="30" />
+ <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="25" />
+ <variable name="console_width" value="1230" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <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="28" />
+ <variable name="fileselector_folder_width" value="410" />
+ <variable name="fileselector_folderonly_width" value="588" />
+ <variable name="fileselector_file_x" value="445" />
+ <variable name="fileselector_file_width" value="810" />
+ <variable name="fileselector_install_y" value="130" />
+ <variable name="fileselector_install_height" value="510" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="40" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="30" />
+ <variable name="fastscroll_recth" value="50" />
+ <variable name="zipstorage_text_y" value="88" />
+ <variable name="listbox_x" value="397" />
+ <variable name="listbox_y" value="90" />
+ <variable name="listbox_width" value="588" />
+ <variable name="listbox_tz_height" value="290" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="18" />
+ <variable name="sd_plus_x" value="408" />
+ <variable name="lock_x" value="440" />
+ <variable name="lock_y" value="184" />
+ <variable name="filemanager_select_x" value="1017" />
+ <variable name="filemanager_select_y" value="620" />
+ <variable name="backup_name_text_y" value="440" />
+ <variable name="backup_name_button_y" value="240" />
+ <variable name="col_right_x" value="1252" />
+ <variable name="cancel_button_y" value="240" />
+ <variable name="terminal_console_y" value="0" />
+ <variable name="terminal_console_height" value="362" />
+ <variable name="terminal_text_y" value="368" />
+ <variable name="terminal_button_y" value="358" />
+ <variable name="terminal_input_width" value="1031" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="640" />
+ <variable name="button_fill_main_width" value="609" />
+ <variable name="button_fill_main_height" value="160" />
+ <variable name="button_fill_half_height" value="53" />
+ <variable name="button_fill_quarter_height" value="40" />
+ <variable name="button_full_center_x" value="320" />
+ <variable name="backup_list_x" value="28" />
+ <variable name="backup_list_y" value="105" />
+ <variable name="backup_list_width" value="609" />
+ <variable name="backup_list_height" value="440" />
+ <variable name="backup_storage_y" value="270" />
+ <variable name="backup_encrypt_y" value="330" />
+ <variable name="restore_list_y" value="140" />
+ <variable name="restore_list_height" value="400" />
+ <variable name="mount_list_height" value="600" />
+ <variable name="mount_storage_row" value="550" />
+ <variable name="wipe_list_height" value="420" />
+ <variable name="wipe_button_y" value="250" />
+ <variable name="slidervalue_x" value="320" />
+ <variable name="slidervalue_w" value="640" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="0" />
+ <variable name="slidervalue_sliderw" value="15" />
+ <variable name="slidervalue_sliderh" value="60" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="5" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="30" />
+ <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="450" y="30" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="550" y="30" />
+ <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>
+ </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="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="85" w="%console_width%" h="430" />
+ <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="200" w="%console_width%" h="380" />
+ <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="75" w="%console_width%" h="665" />
+ <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="438" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="91" width="106" />
+ <row1 key01="102:" 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="118:c:8" />
+ <row2 key01="142:layout3" key02="104:a" key03="104:s" key04="104:d" key05="104:f" key06="104:g" key07="104:h" key08="104:j" key09="104:k" key10="104:l" key11="202:action" />
+ <row3 key01="176:layout2" key02="103:z" key03="103:x" key04="103:c" key05="103:v" key06="103:b" key07="103:n" key08="103:m" key09="103:," long09="!" key10="103:." long10="?" key11="177:layout2" />
+ <row4 key01="190:" key02=":" long02="+" key03="104:/" long03="@" key04="480: " key05="102:'" long05="102:c:34" key06="-" long06="_" />
+ </layout1>
+ <layout2>
+ <keysize height="90" width="106" />
+ <row1 key01="102:" 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="118:c:8" />
+ <row2 key01="142:layout3" key02="104:A" key03="104:S" key04="104:D" key05="104:F" key06="104:G" key07="104:H" key08="104:J" key09="104:K" key10="104:L" key11="202:action" />
+ <row3 key01="176:layout1" key02="103:Z" key03="103:X" key04="103:C" key05="103:V" key06="103:B" key07="103:N" key08="103:M" key09="103:," long09="!" key10="103:." long10="?" key11="177:layout1" />
+ <row4 key01="190:" key02=":" long02="+" key03="104:/" long03="@" key04="480: " key05="102:'" long05="102:c:34" key06="-" long06="_" />
+ </layout2>
+ <layout3>
+ <keysize height="90" width="106" />
+ <row1 key01="102:" key02="1" key03="2" key04="3" key05="4" key06="5" key07="6" key08="7" key09="8" key10="9" key11="0" key12="118:c:8" />
+ <row2 key01="142:layout1" key02="104:#" key03="104:$" key04="104:%" key05="104:&" key06="104:*" key07="104:-" key08="104:+" key09="104:(" key10="104:)" key11="202:action" />
+ <row3 key01="176:layout4" key02="103:<" key03="103:>" key04="103:=" key05="103:'" key06="103:;" key07="103:," key08="103:." key09="103:!" key10="103:?" key11="177:layout4" />
+ <row4 key01="190:" key02="/" key03="104:@" key04="480: " key05="102:c:34" key06="_" />
+ </layout3>
+ <layout4>
+ <keysize height="91" width="106" />
+ <row1 key01="102:" key02="~" key03="`" key04="|" key05="106:" key06="106:" key07="106:" key08="106:" key09="106:" key10="106:" key11="106:" key12="118:c:8" />
+ <row2 key01="142:layout1" key02="104:" key03="104:" key04="104:" key05="104:" key06="104:^" key07="104:" key08="104:" key09="104:{" key10="104:}" key11="202:action" />
+ <row3 key01="176:layout3" key02="103:\" key03="103:" key04="103:" key05="103:" key06="103:" key07="103:[" key08="103:]" key09="103:!" key10="103:?" key11="177:layout3" />
+ <row4 key01="400:" key02="480: " />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/1920x1200/res/fonts/Roboto-Regular-30.dat b/gui/devices/1920x1200/res/fonts/Roboto-Regular-30.dat
new file mode 100644
index 000000000..9f8082ccc
--- /dev/null
+++ b/gui/devices/1920x1200/res/fonts/Roboto-Regular-30.dat
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/back-icon.png b/gui/devices/1920x1200/res/images/back-icon.png
new file mode 100644
index 000000000..94dd69951
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/background.jpg b/gui/devices/1920x1200/res/images/background.jpg
new file mode 100644
index 000000000..9e61f9e3b
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/button.png b/gui/devices/1920x1200/res/images/button.png
new file mode 100644
index 000000000..e1b49fc57
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/checkbox_checked.png b/gui/devices/1920x1200/res/images/checkbox_checked.png
new file mode 100644
index 000000000..cac9a30ee
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/checkbox_empty.png b/gui/devices/1920x1200/res/images/checkbox_empty.png
new file mode 100644
index 000000000..ee01fa852
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/console-icon.png b/gui/devices/1920x1200/res/images/console-icon.png
new file mode 100644
index 000000000..c1f4d7165
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/console-toggle.png b/gui/devices/1920x1200/res/images/console-toggle.png
new file mode 100644
index 000000000..2495165fc
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/curtain.jpg b/gui/devices/1920x1200/res/images/curtain.jpg
new file mode 100644
index 000000000..409664c6c
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/file.png b/gui/devices/1920x1200/res/images/file.png
new file mode 100644
index 000000000..c77a1f483
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/file.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/folder.png b/gui/devices/1920x1200/res/images/folder.png
new file mode 100644
index 000000000..2770f0a24
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/folder.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/home-icon.png b/gui/devices/1920x1200/res/images/home-icon.png
new file mode 100644
index 000000000..8c1dde3c5
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate001.png b/gui/devices/1920x1200/res/images/indeterminate001.png
new file mode 100755
index 000000000..ea2b5e2ab
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate002.png b/gui/devices/1920x1200/res/images/indeterminate002.png
new file mode 100755
index 000000000..f59b298ee
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate003.png b/gui/devices/1920x1200/res/images/indeterminate003.png
new file mode 100755
index 000000000..cc6d7b535
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate004.png b/gui/devices/1920x1200/res/images/indeterminate004.png
new file mode 100755
index 000000000..9483117d6
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate005.png b/gui/devices/1920x1200/res/images/indeterminate005.png
new file mode 100755
index 000000000..850de0f88
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/indeterminate006.png b/gui/devices/1920x1200/res/images/indeterminate006.png
new file mode 100755
index 000000000..e5194b39d
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/keyboard1.png b/gui/devices/1920x1200/res/images/keyboard1.png
new file mode 100644
index 000000000..8ee241671
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/keyboard2.png b/gui/devices/1920x1200/res/images/keyboard2.png
new file mode 100644
index 000000000..259bfecf5
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/keyboard3.png b/gui/devices/1920x1200/res/images/keyboard3.png
new file mode 100644
index 000000000..aaebd3084
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/keyboard4.png b/gui/devices/1920x1200/res/images/keyboard4.png
new file mode 100644
index 000000000..1fe856566
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/medium-button.png b/gui/devices/1920x1200/res/images/medium-button.png
new file mode 100644
index 000000000..b4eb49324
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/mediumwide-button.png b/gui/devices/1920x1200/res/images/mediumwide-button.png
new file mode 100644
index 000000000..3ca436eb2
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/minus-button.png b/gui/devices/1920x1200/res/images/minus-button.png
new file mode 100644
index 000000000..8dc17bfe6
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/plus-button.png b/gui/devices/1920x1200/res/images/plus-button.png
new file mode 100644
index 000000000..05b34392c
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/progress_empty.png b/gui/devices/1920x1200/res/images/progress_empty.png
new file mode 100644
index 000000000..ff02df652
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/progress_fill.png b/gui/devices/1920x1200/res/images/progress_fill.png
new file mode 100644
index 000000000..84a582885
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/radio_empty.png b/gui/devices/1920x1200/res/images/radio_empty.png
new file mode 100644
index 000000000..c77130019
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/radio_selected.png b/gui/devices/1920x1200/res/images/radio_selected.png
new file mode 100644
index 000000000..d3b22789a
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/slider-touch.png b/gui/devices/1920x1200/res/images/slider-touch.png
new file mode 100644
index 000000000..8a21a3b74
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/slider-used.png b/gui/devices/1920x1200/res/images/slider-used.png
new file mode 100644
index 000000000..4963ff5ae
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/slider.png b/gui/devices/1920x1200/res/images/slider.png
new file mode 100644
index 000000000..dfeea6eda
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/slider.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/sort-button.png b/gui/devices/1920x1200/res/images/sort-button.png
new file mode 100644
index 000000000..b1f82182f
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/images/unlock.png b/gui/devices/1920x1200/res/images/unlock.png
new file mode 100644
index 000000000..6ca95d125
--- /dev/null
+++ b/gui/devices/1920x1200/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
new file mode 100644
index 000000000..fb615c135
--- /dev/null
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -0,0 +1,3865 @@
+<?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>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-30" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </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="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="slider_x" value="630" />
+ <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="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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="60" />
+ <variable name="fastscroll_linew" value="3" />
+ <variable name="fastscroll_rectw" value="45" />
+ <variable name="fastscroll_recth" value="75" />
+ <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_x" value="660" />
+ <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="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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="5" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" 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%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="850" 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>
+ </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="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%" />
+ <layout1>
+ <keysize height="129" width="159" />
+ <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="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:" key02="720: " key03="/" long03=":" key04="-" long0="_" />
+ </layout1>
+ <layout2>
+ <keysize height="129" width="159" />
+ <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:," long09="!" key10="154:." long10="?" key11="265:layout1" />
+ <row4 key01="600:" key02="720: " key03="/" long03=":" key04="-" long0="_" />
+ </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:" key03="156:" key04="156:" key05="156:" 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>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/2560x1600/res/fonts/Roboto-Regular-40.dat b/gui/devices/2560x1600/res/fonts/Roboto-Regular-40.dat
new file mode 100644
index 000000000..637d9fe5b
--- /dev/null
+++ b/gui/devices/2560x1600/res/fonts/Roboto-Regular-40.dat
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/back-icon.png b/gui/devices/2560x1600/res/images/back-icon.png
new file mode 100644
index 000000000..effe411ec
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/background.jpg b/gui/devices/2560x1600/res/images/background.jpg
new file mode 100644
index 000000000..3b8a71ac6
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/button.png b/gui/devices/2560x1600/res/images/button.png
new file mode 100644
index 000000000..4743ba5b0
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/checkbox_checked.png b/gui/devices/2560x1600/res/images/checkbox_checked.png
new file mode 100644
index 000000000..c3ceeef0c
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/checkbox_empty.png b/gui/devices/2560x1600/res/images/checkbox_empty.png
new file mode 100644
index 000000000..87d6dd905
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/console-icon.png b/gui/devices/2560x1600/res/images/console-icon.png
new file mode 100644
index 000000000..4dd1a1415
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/console-toggle.png b/gui/devices/2560x1600/res/images/console-toggle.png
new file mode 100644
index 000000000..3bf8a1ad0
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/curtain.jpg b/gui/devices/2560x1600/res/images/curtain.jpg
new file mode 100644
index 000000000..e58811aab
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/file.png b/gui/devices/2560x1600/res/images/file.png
new file mode 100644
index 000000000..793b61d8b
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/file.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/folder.png b/gui/devices/2560x1600/res/images/folder.png
new file mode 100644
index 000000000..f3ab28fd0
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/folder.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/home-icon.png b/gui/devices/2560x1600/res/images/home-icon.png
new file mode 100644
index 000000000..692d8dda3
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate001.png b/gui/devices/2560x1600/res/images/indeterminate001.png
new file mode 100755
index 000000000..f0cb4b2f9
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate002.png b/gui/devices/2560x1600/res/images/indeterminate002.png
new file mode 100755
index 000000000..eba46eb5b
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate003.png b/gui/devices/2560x1600/res/images/indeterminate003.png
new file mode 100755
index 000000000..34ef03e60
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate004.png b/gui/devices/2560x1600/res/images/indeterminate004.png
new file mode 100755
index 000000000..de6f4d910
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate005.png b/gui/devices/2560x1600/res/images/indeterminate005.png
new file mode 100755
index 000000000..d993f2c50
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/indeterminate006.png b/gui/devices/2560x1600/res/images/indeterminate006.png
new file mode 100755
index 000000000..08ca229a7
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/keyboard1.png b/gui/devices/2560x1600/res/images/keyboard1.png
new file mode 100644
index 000000000..cef79d91c
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/keyboard2.png b/gui/devices/2560x1600/res/images/keyboard2.png
new file mode 100644
index 000000000..d86027907
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/keyboard3.png b/gui/devices/2560x1600/res/images/keyboard3.png
new file mode 100644
index 000000000..34780976d
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/keyboard4.png b/gui/devices/2560x1600/res/images/keyboard4.png
new file mode 100644
index 000000000..d491625ff
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/medium-button.png b/gui/devices/2560x1600/res/images/medium-button.png
new file mode 100644
index 000000000..ef731cddf
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/mediumwide-button.png b/gui/devices/2560x1600/res/images/mediumwide-button.png
new file mode 100644
index 000000000..94af41913
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/minus-button.png b/gui/devices/2560x1600/res/images/minus-button.png
new file mode 100644
index 000000000..8d343a7b3
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/plus-button.png b/gui/devices/2560x1600/res/images/plus-button.png
new file mode 100644
index 000000000..cc4c70af1
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/progress_empty.png b/gui/devices/2560x1600/res/images/progress_empty.png
new file mode 100644
index 000000000..8f3f02a3a
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/progress_fill.png b/gui/devices/2560x1600/res/images/progress_fill.png
new file mode 100644
index 000000000..88d82d507
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/radio_empty.png b/gui/devices/2560x1600/res/images/radio_empty.png
new file mode 100644
index 000000000..946d46d06
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/radio_selected.png b/gui/devices/2560x1600/res/images/radio_selected.png
new file mode 100644
index 000000000..d68e85570
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/slider-touch.png b/gui/devices/2560x1600/res/images/slider-touch.png
new file mode 100644
index 000000000..14c8f99ff
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/slider-used.png b/gui/devices/2560x1600/res/images/slider-used.png
new file mode 100644
index 000000000..21372da20
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/slider.png b/gui/devices/2560x1600/res/images/slider.png
new file mode 100644
index 000000000..ec2720095
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/slider.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/sort-button.png b/gui/devices/2560x1600/res/images/sort-button.png
new file mode 100644
index 000000000..d5770960d
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/images/unlock.png b/gui/devices/2560x1600/res/images/unlock.png
new file mode 100644
index 000000000..a605d056a
--- /dev/null
+++ b/gui/devices/2560x1600/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
new file mode 100644
index 000000000..9ce330a44
--- /dev/null
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -0,0 +1,3865 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="2560" height="1600" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-40" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="260" />
+ <variable name="col2_x" value="770" />
+ <variable name="col3_x" value="1310" />
+ <variable name="col4_x" value="1820" />
+ <variable name="row1_y" value="300" />
+ <variable name="row2_y" value="1000" />
+ <variable name="col_center_x" value="1040" />
+ <variable name="center_x" value="1280" />
+ <variable name="screen_width" value="1920" />
+ <variable name="screen_height" value="1200" />
+ <variable name="col_progressbar_x" value="1028" />
+ <variable name="row_progressbar_y" value="1500" />
+ <variable name="col1_medium_x" value="755" />
+ <variable name="col2_medium_x" value="1025" />
+ <variable name="col3_medium_x" value="1310" />
+ <variable name="col4_medium_x" value="1580" />
+ <variable name="row1_medium_y" value="105" />
+ <variable name="row2_medium_y" value="500" />
+ <variable name="row3_medium_y" value="245" />
+ <variable name="row4_medium_y" value="1000" />
+ <variable name="row5_medium_y" value="950" />
+ <variable name="row1_text_y" value="120" />
+ <variable name="row2_text_y" value="195" />
+ <variable name="row3_text_y" value="270" />
+ <variable name="row4_text_y" value="345" />
+ <variable name="row5_text_y" value="420" />
+ <variable name="row6_text_y" value="495" />
+ <variable name="row7_text_y" value="570" />
+ <variable name="row8_text_y" value="645" />
+ <variable name="row9_text_y" value="720" />
+ <variable name="row10_text_y" value="795" />
+ <variable name="row11_text_y" value="870" />
+ <variable name="row12_text_y" value="945" />
+ <variable name="row13_text_y" value="1020" />
+ <variable name="row14_text_y" value="1095" />
+ <variable name="row15_text_y" value="1170" />
+ <variable name="row16_text_y" value="1240" />
+ <variable name="row17_text_y" value="1310" />
+ <variable name="row18_text_y" value="1395" />
+ <variable name="row_offsetmedium_y" value="1100" />
+ <variable name="home_button_x" value="2200" />
+ <variable name="home_button_y" value="15" />
+ <variable name="back_button_x" value="2320" />
+ <variable name="back_button_y" value="15" />
+ <variable name="console_button_x" value="2440" />
+ <variable name="console_button_y" value="15" />
+ <variable name="nandcheck_col1" value="328" />
+ <variable name="nandcheck_col2" value="800" />
+ <variable name="nandcheck_row1" value="260" />
+ <variable name="nandcheck_row2" value="360" />
+ <variable name="nandcheck_row3" value="460" />
+ <variable name="nandcheck_row4" value="560" />
+ <variable name="nandcheck_row5" value="660" />
+ <variable name="nandcheck_row6" value="760" />
+ <variable name="nandcheck_row7" value="860" />
+ <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="slider_x" value="841" />
+ <variable name="slider_y" value="1335" />
+ <variable name="slider_text_y" value="1435" />
+ <variable name="sort_text_x" value="800" />
+ <variable name="sort_asc_text_y" value="1410" />
+ <variable name="sort_asc_button_y" value="1400" />
+ <variable name="sort_desc_text_y" value="1490" />
+ <variable name="sort_desc_button_y" value="1480" />
+ <variable name="sort_col1_button_x" value="1200" />
+ <variable name="sort_col2_button_x" value="1350" />
+ <variable name="sort_col3_button_x" value="1500" />
+ <variable name="col1_sdext_x" value="960" />
+ <variable name="col2_sdext_x" value="1600" />
+ <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="2460" />
+ <variable name="input_height" value="65" />
+ <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="2460" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <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="70" />
+ <variable name="fileselector_folder_width" value="910" />
+ <variable name="fileselector_folderonly_width" value="1200" />
+ <variable name="fileselector_file_x" value="1000" />
+ <variable name="fileselector_file_width" value="1500" />
+ <variable name="fileselector_install_y" value="290" />
+ <variable name="fileselector_install_height" value="1100" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="80" />
+ <variable name="fastscroll_linew" value="4" />
+ <variable name="fastscroll_rectw" value="60" />
+ <variable name="fastscroll_recth" value="100" />
+ <variable name="zipstorage_text_y" value="190" />
+ <variable name="listbox_x" value="680" />
+ <variable name="listbox_y" value="195" />
+ <variable name="listbox_width" value="1200" />
+ <variable name="listbox_tz_height" value="650" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="18" />
+ <variable name="sd_plus_x" value="408" />
+ <variable name="lock_x" value="880" />
+ <variable name="lock_y" value="300" />
+ <variable name="filemanager_select_x" value="2000" />
+ <variable name="filemanager_select_y" value="1360" />
+ <variable name="backup_name_text_y" value="440" />
+ <variable name="backup_name_button_y" value="950" />
+ <variable name="col_right_x" value="2510" />
+ <variable name="cancel_button_y" value="430" />
+ <variable name="terminal_console_y" value="0" />
+ <variable name="terminal_console_height" value="810" />
+ <variable name="terminal_text_y" value="837" />
+ <variable name="terminal_button_y" value="815" />
+ <variable name="terminal_input_width" value="2100" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="1280" />
+ <variable name="button_fill_main_width" value="1200" />
+ <variable name="button_fill_main_height" value="320" />
+ <variable name="button_fill_half_height" value="107" />
+ <variable name="button_fill_quarter_height" value="80" />
+ <variable name="button_full_center_x" value="640" />
+ <variable name="backup_list_x" value="50" />
+ <variable name="backup_list_y" value="210" />
+ <variable name="backup_list_width" value="1200" />
+ <variable name="backup_list_height" value="880" />
+ <variable name="backup_storage_y" value="540" />
+ <variable name="backup_encrypt_y" value="650" />
+ <variable name="restore_list_y" value="280" />
+ <variable name="restore_list_height" value="800" />
+ <variable name="mount_list_height" value="1200" />
+ <variable name="mount_storage_row" value="1100" />
+ <variable name="wipe_list_height" value="1100" />
+ <variable name="wipe_button_y" value="500" />
+ <variable name="slidervalue_x" value="640" />
+ <variable name="slidervalue_w" value="1280" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="4" />
+ <variable name="slidervalue_padding" value="0" />
+ <variable name="slidervalue_sliderw" value="30" />
+ <variable name="slidervalue_sliderh" value="90" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="400" y="8" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="400" y="55" />
+ <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="900" y="55" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="1100" y="55" />
+ <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>
+ </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="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="195" w="%console_width%" h="950" />
+ <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="800" />
+ <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="195" w="%console_width%" h="1335" />
+ <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="912" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="172" width="212" />
+ <row1 key01="204:" 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="236:c:8" />
+ <row2 key01="286:layout3" key02="208:a" key03="208:s" key04="208:d" key05="208:f" key06="208:g" key07="208:h" key08="208:j" key09="208:k" key10="208:l" key11="402:action" />
+ <row3 key01="354:layout2" key02="206:z" key03="206:x" key04="206:c" key05="206:v" key06="206:b" key07="206:n" key08="206:m" key09="206:," long09="!" key10="206:." long10="?" key11="352:layout2" />
+ <row4 key01="560:" key02="206:/" long02="@" key03="1030: " key04="206:'" long04="206:c:34" key05="212:-" long05="212:_" />
+ </layout1>
+ <layout2>
+ <keysize height="172" width="212" />
+ <row1 key01="204:" 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="236:c:8" />
+ <row2 key01="286:layout3" key02="208:A" key03="208:S" key04="208:D" key05="208:F" key06="208:G" key07="208:H" key08="208:J" key09="208:K" key10="208:L" key11="402:action" />
+ <row3 key01="354:layout1" key02="206:Z" key03="206:X" key04="206:C" key05="206:V" key06="206:B" key07="206:N" key08="206:M" key09="206:," long09="!" key10="206:." long10="?" key11="352:layout1" />
+ <row4 key01="560:" key02="206:/" long02="@" key03="1030: " key04="206:'" long04="206:c:34" key05="-" long05="_" />
+ </layout2>
+ <layout3>
+ <keysize height="172" width="212" />
+ <row1 key01="204:" key02="1" key03="2" key04="3" key05="4" key06="5" key07="6" key08="7" key09="8" key10="9" key11="0" key12="236:c:8" />
+ <row2 key01="286:layout1" key02="208:#" key03="208:$" key04="208:%" key05="208:&" key06="208:*" key07="208:-" key08="208:+" key09="208:(" key10="208:)" key11="402:action" />
+ <row3 key01="354:layout4" key02="206:<" key03="206:>" key04="206:=" key05="206:'" key06="206:;" key07="206:," key08="206:." key09="206:!" key10="206:?" key11="352:layout4" />
+ <row4 key01="354:" key02="206:/" key03="206:@" key04="1030: " key05="206:c:34" key06="206:_" />
+ </layout3>
+ <layout4>
+ <keysize height="172" width="212" />
+ <row1 key01="204:" key02="~" key03="`" key04="|" key05="212:" key06="212:" key07="212:" key08="212:" key09="212:" key10="212:" key11="212:" key12="236:c:8" />
+ <row2 key01="286:layout1" key02="208:" key03="208:" key04="208:" key05="208:" key06="208:^" key07="208:" key08="208:" key09="208:{" key10="208:}" key11="402:action" />
+ <row3 key01="354:layout3" key02="206:\" key03="206:" key04="206:" key05="206:" key06="206:" key07="206:[" key08="206:]" key09="206:!" key10="206:?" key11="352:layout3" />
+ <row4 key01="766:" key02="1030: " />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/320x480/res/fonts/Roboto-Condensed-14.dat b/gui/devices/320x480/res/fonts/Roboto-Condensed-14.dat
new file mode 100644
index 000000000..f7b174cb1
--- /dev/null
+++ b/gui/devices/320x480/res/fonts/Roboto-Condensed-14.dat
Binary files differ
diff --git a/gui/devices/320x480/res/fonts/Roboto-Condensed-16.dat b/gui/devices/320x480/res/fonts/Roboto-Condensed-16.dat
new file mode 100644
index 000000000..19c11470d
--- /dev/null
+++ b/gui/devices/320x480/res/fonts/Roboto-Condensed-16.dat
Binary files differ
diff --git a/gui/devices/320x480/res/images/android.png b/gui/devices/320x480/res/images/android.png
new file mode 100644
index 000000000..0ccd02cd0
--- /dev/null
+++ b/gui/devices/320x480/res/images/android.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/back-icon.png b/gui/devices/320x480/res/images/back-icon.png
new file mode 100644
index 000000000..26778d941
--- /dev/null
+++ b/gui/devices/320x480/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/checkbox_checked.png b/gui/devices/320x480/res/images/checkbox_checked.png
new file mode 100644
index 000000000..620fee88d
--- /dev/null
+++ b/gui/devices/320x480/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/checkbox_empty.png b/gui/devices/320x480/res/images/checkbox_empty.png
new file mode 100644
index 000000000..fa86e0dce
--- /dev/null
+++ b/gui/devices/320x480/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/curtain.jpg b/gui/devices/320x480/res/images/curtain.jpg
new file mode 100644
index 000000000..63c961998
--- /dev/null
+++ b/gui/devices/320x480/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/320x480/res/images/file.png b/gui/devices/320x480/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/320x480/res/images/file.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/folder.png b/gui/devices/320x480/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/320x480/res/images/folder.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-medium-button.png b/gui/devices/320x480/res/images/hdpi-medium-button.png
new file mode 100644
index 000000000..cb223b1c9
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-medium-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-menu-button.png b/gui/devices/320x480/res/images/hdpi-menu-button.png
new file mode 100644
index 000000000..1fa62cf1d
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-menu-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-minus-button.png b/gui/devices/320x480/res/images/hdpi-minus-button.png
new file mode 100644
index 000000000..025b379fa
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-minus-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-plus-button.png b/gui/devices/320x480/res/images/hdpi-plus-button.png
new file mode 100644
index 000000000..f567e1d6e
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-plus-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-small-button.png b/gui/devices/320x480/res/images/hdpi-small-button.png
new file mode 100644
index 000000000..369409811
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-small-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/hdpi-sort-button.png b/gui/devices/320x480/res/images/hdpi-sort-button.png
new file mode 100644
index 000000000..3662f2385
--- /dev/null
+++ b/gui/devices/320x480/res/images/hdpi-sort-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/home-icon.png b/gui/devices/320x480/res/images/home-icon.png
new file mode 100644
index 000000000..690bfafc5
--- /dev/null
+++ b/gui/devices/320x480/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate001.png b/gui/devices/320x480/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate002.png b/gui/devices/320x480/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate003.png b/gui/devices/320x480/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate004.png b/gui/devices/320x480/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate005.png b/gui/devices/320x480/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/indeterminate006.png b/gui/devices/320x480/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/320x480/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/keyboard1.png b/gui/devices/320x480/res/images/keyboard1.png
new file mode 100644
index 000000000..914304c93
--- /dev/null
+++ b/gui/devices/320x480/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/keyboard2.png b/gui/devices/320x480/res/images/keyboard2.png
new file mode 100644
index 000000000..4761f3a87
--- /dev/null
+++ b/gui/devices/320x480/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/keyboard3.png b/gui/devices/320x480/res/images/keyboard3.png
new file mode 100644
index 000000000..23103dc2c
--- /dev/null
+++ b/gui/devices/320x480/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/keyboard4.png b/gui/devices/320x480/res/images/keyboard4.png
new file mode 100644
index 000000000..58c7289df
--- /dev/null
+++ b/gui/devices/320x480/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/medium-button.png b/gui/devices/320x480/res/images/medium-button.png
new file mode 100644
index 000000000..eee6ccedc
--- /dev/null
+++ b/gui/devices/320x480/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/menu-button.png b/gui/devices/320x480/res/images/menu-button.png
new file mode 100644
index 000000000..731453b40
--- /dev/null
+++ b/gui/devices/320x480/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/minus-button.png b/gui/devices/320x480/res/images/minus-button.png
new file mode 100644
index 000000000..21cd77444
--- /dev/null
+++ b/gui/devices/320x480/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/plus-button.png b/gui/devices/320x480/res/images/plus-button.png
new file mode 100644
index 000000000..ce9ec4eba
--- /dev/null
+++ b/gui/devices/320x480/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/progress_empty.png b/gui/devices/320x480/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/320x480/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/progress_fill.png b/gui/devices/320x480/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/320x480/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/radio_empty.png b/gui/devices/320x480/res/images/radio_empty.png
new file mode 100644
index 000000000..d993c4a60
--- /dev/null
+++ b/gui/devices/320x480/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/radio_selected.png b/gui/devices/320x480/res/images/radio_selected.png
new file mode 100644
index 000000000..c89aac3d5
--- /dev/null
+++ b/gui/devices/320x480/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/slideout.png b/gui/devices/320x480/res/images/slideout.png
new file mode 100644
index 000000000..8974fef79
--- /dev/null
+++ b/gui/devices/320x480/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/slider-touch.png b/gui/devices/320x480/res/images/slider-touch.png
new file mode 100644
index 000000000..2f36fa7cc
--- /dev/null
+++ b/gui/devices/320x480/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/slider-used.png b/gui/devices/320x480/res/images/slider-used.png
new file mode 100644
index 000000000..94a09f3bd
--- /dev/null
+++ b/gui/devices/320x480/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/slider.png b/gui/devices/320x480/res/images/slider.png
new file mode 100644
index 000000000..5cbb27e2f
--- /dev/null
+++ b/gui/devices/320x480/res/images/slider.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/sort-button.png b/gui/devices/320x480/res/images/sort-button.png
new file mode 100644
index 000000000..579c75f34
--- /dev/null
+++ b/gui/devices/320x480/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/top-bar.jpg b/gui/devices/320x480/res/images/top-bar.jpg
new file mode 100644
index 000000000..a0d506871
--- /dev/null
+++ b/gui/devices/320x480/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/320x480/res/images/top-bar.png b/gui/devices/320x480/res/images/top-bar.png
new file mode 100644
index 000000000..887f62973
--- /dev/null
+++ b/gui/devices/320x480/res/images/top-bar.png
Binary files differ
diff --git a/gui/devices/320x480/res/images/unlock.png b/gui/devices/320x480/res/images/unlock.png
new file mode 100644
index 000000000..09e9efdb3
--- /dev/null
+++ b/gui/devices/320x480/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
new file mode 100644
index 000000000..dbee885a7
--- /dev/null
+++ b/gui/devices/320x480/res/ui.xml
@@ -0,0 +1,3846 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="320" height="480" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-16" />
+ <resource name="mediumfont" type="font" filename="Roboto-Condensed-14" />
+ <resource name="filelist" type="font" filename="Roboto-Condensed-14" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="8" />
+ <variable name="col2_x" value="162" />
+ <variable name="col_center_x" value="85" />
+ <variable name="col_center_medium_x" value="122" />
+ <variable name="center_x" value="160" />
+ <variable name="row1_y" value="84" />
+ <variable name="row2_y" value="174" />
+ <variable name="row3_y" value="270" />
+ <variable name="row4_y" value="366" />
+ <variable name="row_queue_y" value="306" />
+ <variable name="row1_header_y" value="64" />
+ <variable name="row1_text_y" value="85" />
+ <variable name="row2_text_y" value="104" />
+ <variable name="row3_text_y" value="123" />
+ <variable name="row4_text_y" value="142" />
+ <variable name="row5_text_y" value="161" />
+ <variable name="row6_text_y" value="180" />
+ <variable name="row7_text_y" value="199" />
+ <variable name="row8_text_y" value="218" />
+ <variable name="row9_text_y" value="237" />
+ <variable name="row10_text_y" value="256" />
+ <variable name="row11_text_y" value="275" />
+ <variable name="row12_text_y" value="294" />
+ <variable name="row13_text_y" value="313" />
+ <variable name="row14_text_y" value="332" />
+ <variable name="row15_text_y" value="351" />
+ <variable name="row16_text_y" value="370" />
+ <variable name="row17_text_y" value="389" />
+ <variable name="row18_text_y" value="408" />
+ <variable name="zip_status_y" value="350" />
+ <variable name="tz_selected_y" value="66" />
+ <variable name="tz_set_y" value="348" />
+ <variable name="tz_current_y" value="438" />
+ <variable name="col_progressbar_x" value="32" />
+ <variable name="row_progressbar_y" value="432" />
+ <variable name="col1_medium_x" value="7" />
+ <variable name="col2_medium_x" value="83" />
+ <variable name="col3_medium_x" value="160" />
+ <variable name="col4_medium_x" value="237" />
+ <variable name="row1_medium_y" value="78" />
+ <variable name="row2_medium_y" value="123" />
+ <variable name="row3_medium_y" value="168" />
+ <variable name="row4_medium_y" value="213" />
+ <variable name="row5_medium_y" value="258" />
+ <variable name="row6_medium_y" value="303" />
+ <variable name="row7_medium_y" value="348" />
+ <variable name="slider_x" value="39" />
+ <variable name="slider_y" value="400" />
+ <variable name="slider_text_y" value="425" />
+ <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="home_button_x" value="7" />
+ <variable name="home_button_y" value="460" />
+ <variable name="back_button_x" value="275" />
+ <variable name="back_button_y" value="460" />
+ <variable name="sort_text_x" value="8" />
+ <variable name="sort_asc_text_y" value="411" />
+ <variable name="sort_asc_button_y" value="411" />
+ <variable name="sort_desc_text_y" value="435" />
+ <variable name="sort_desc_button_y" value="435" />
+ <variable name="sort_col1_button_x" value="120" />
+ <variable name="sort_col2_button_x" value="160" />
+ <variable name="sort_col3_button_x" value="200" />
+ <variable name="input_width" value="307" />
+ <variable name="input_height" value="24" />
+ <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="console_background" value="#303030" />
+ <variable name="console_scroll" value="#303030" />
+ <variable name="console_action_height" value="192" />
+ <variable name="console_install_height" value="264" />
+ <variable name="console_installdone_height" value="180" />
+ <variable name="fileselector_x" value="3" />
+ <variable name="fileselector_width" value="313" />
+ <variable name="fileselector_install_height" value="284" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="27" />
+ <variable name="fastscroll_linew" value="1" />
+ <variable name="fastscroll_rectw" value="18" />
+ <variable name="fastscroll_recth" value="31" />
+ <variable name="listbox_x" value="3" />
+ <variable name="listbox_width" value="313" />
+ <variable name="listbox_tz_height" value="189" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="12" />
+ <variable name="sd_plus_x" value="187" />
+ <variable name="sdext_text_x" value="56" />
+ <variable name="sdext_text_y" value="83" />
+ <variable name="sdswap_button_y" value="111" />
+ <variable name="sdswap_text_x" value="56" />
+ <variable name="sdswap_text_y" value="110" />
+ <variable name="sdfilesystem_text_y" value="144" />
+ <variable name="sdfilesystem_button_y" value="168" />
+ <variable name="lock_x" value="27" />
+ <variable name="lock_y" value="120" />
+ <variable name="filemanager_select_x" value="243" />
+ <variable name="filemanager_select_y" value="414" />
+ <variable name="terminal_console_height" value="220" />
+ <variable name="terminal_text_y" value="225" />
+ <variable name="terminal_button_y" value="220" />
+ <variable name="row_dst_text_y" value="256" />
+ <variable name="row_offset_text_y" value="275" />
+ <variable name="row_offset_medium_y" value="303" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="304" />
+ <variable name="button_fill_main_width" value="150" />
+ <variable name="button_fill_main_height" value="81" />
+ <variable name="button_fill_half_height" value="40" />
+ <variable name="button_fill_quarter_height" value="24" />
+ <variable name="backup_list_height" value="193" />
+ <variable name="backup_button_row1" value="300" />
+ <variable name="backup_button_row2" value="326" />
+ <variable name="mount_list_height" value="270" />
+ <variable name="mount_storage_row" value="340" />
+ <variable name="storage_list_height" value="290" />
+ <variable name="wipe_list_height" value="330" />
+ <variable name="wipe_button_y" value="270" />
+ <variable name="slidervalue_w" value="304" />
+ <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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="65" y="3" />
+ <text>TeamWin Recovery v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <font resource="font" />
+ <placement x="65" y="21" />
+ <text>SIMULATING ACTIONS</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="65" y="39" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="165" y="39" />
+ <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="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>
+ </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="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="140" y="456" />
+ <placement x="%console_x%" y="0" w="%console_width%" h="456" />
+ <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="253" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="52" 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="52" 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: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="52" 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="52" 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>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/480x800/res/fonts/Roboto-Regular-20.dat b/gui/devices/480x800/res/fonts/Roboto-Regular-20.dat
new file mode 100644
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/480x800/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/480x800/res/images/back-icon.png b/gui/devices/480x800/res/images/back-icon.png
new file mode 100644
index 000000000..688436eb2
--- /dev/null
+++ b/gui/devices/480x800/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/checkbox_checked.png b/gui/devices/480x800/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/480x800/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/checkbox_empty.png b/gui/devices/480x800/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/480x800/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/curtain.jpg b/gui/devices/480x800/res/images/curtain.jpg
new file mode 100644
index 000000000..dfd59d96b
--- /dev/null
+++ b/gui/devices/480x800/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/480x800/res/images/file.png b/gui/devices/480x800/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/480x800/res/images/file.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/folder.png b/gui/devices/480x800/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/480x800/res/images/folder.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/home-icon.png b/gui/devices/480x800/res/images/home-icon.png
new file mode 100644
index 000000000..551952015
--- /dev/null
+++ b/gui/devices/480x800/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate001.png b/gui/devices/480x800/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate002.png b/gui/devices/480x800/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate003.png b/gui/devices/480x800/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate004.png b/gui/devices/480x800/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate005.png b/gui/devices/480x800/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/indeterminate006.png b/gui/devices/480x800/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/480x800/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/keyboard1.png b/gui/devices/480x800/res/images/keyboard1.png
new file mode 100644
index 000000000..5a691ac02
--- /dev/null
+++ b/gui/devices/480x800/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/keyboard2.png b/gui/devices/480x800/res/images/keyboard2.png
new file mode 100644
index 000000000..69b015458
--- /dev/null
+++ b/gui/devices/480x800/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/keyboard3.png b/gui/devices/480x800/res/images/keyboard3.png
new file mode 100644
index 000000000..498cef84b
--- /dev/null
+++ b/gui/devices/480x800/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/keyboard4.png b/gui/devices/480x800/res/images/keyboard4.png
new file mode 100644
index 000000000..e8f9dde0e
--- /dev/null
+++ b/gui/devices/480x800/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/medium-button.png b/gui/devices/480x800/res/images/medium-button.png
new file mode 100644
index 000000000..1d5b816ec
--- /dev/null
+++ b/gui/devices/480x800/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/menu-button.png b/gui/devices/480x800/res/images/menu-button.png
new file mode 100644
index 000000000..c8d3794e5
--- /dev/null
+++ b/gui/devices/480x800/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/minus-button.png b/gui/devices/480x800/res/images/minus-button.png
new file mode 100644
index 000000000..9c92d2f46
--- /dev/null
+++ b/gui/devices/480x800/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/plus-button.png b/gui/devices/480x800/res/images/plus-button.png
new file mode 100644
index 000000000..5d3068ed9
--- /dev/null
+++ b/gui/devices/480x800/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/progress_empty.png b/gui/devices/480x800/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/480x800/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/progress_fill.png b/gui/devices/480x800/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/480x800/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/radio_empty.png b/gui/devices/480x800/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/480x800/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/radio_selected.png b/gui/devices/480x800/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/480x800/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/slideout.png b/gui/devices/480x800/res/images/slideout.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/480x800/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/slider-touch.png b/gui/devices/480x800/res/images/slider-touch.png
new file mode 100644
index 000000000..c8c0f43c3
--- /dev/null
+++ b/gui/devices/480x800/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/slider-used.png b/gui/devices/480x800/res/images/slider-used.png
new file mode 100644
index 000000000..2f3d51969
--- /dev/null
+++ b/gui/devices/480x800/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/slider.png b/gui/devices/480x800/res/images/slider.png
new file mode 100644
index 000000000..6fcce6f5b
--- /dev/null
+++ b/gui/devices/480x800/res/images/slider.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/sort-button.png b/gui/devices/480x800/res/images/sort-button.png
new file mode 100644
index 000000000..69d511bea
--- /dev/null
+++ b/gui/devices/480x800/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/480x800/res/images/top-bar.jpg b/gui/devices/480x800/res/images/top-bar.jpg
new file mode 100644
index 000000000..d8ab933b5
--- /dev/null
+++ b/gui/devices/480x800/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/480x800/res/images/unlock.png b/gui/devices/480x800/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/480x800/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
new file mode 100644
index 000000000..bb90e70b4
--- /dev/null
+++ b/gui/devices/480x800/res/ui.xml
@@ -0,0 +1,3846 @@
+<?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>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="mediumfont" type="font" filename="Roboto-Regular-20" />
+ <resource name="filelist" type="font" filename="Roboto-Regular-20" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </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="tz_selected_y" value="110" />
+ <variable name="tz_set_y" value="580" />
+ <variable name="tz_current_y" value="730" />
+ <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_x" value="58" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="766" />
+ <variable name="back_button_x" value="413" />
+ <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="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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="40" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="27" />
+ <variable name="fastscroll_recth" value="47" />
+ <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_x" value="40" />
+ <variable name="lock_y" value="200" />
+ <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="550" />
+ <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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="%backgroundcolor%" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </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="250" 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="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>
+ </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="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="210" y="760" />
+ <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%" />
+ <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" />
+ <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>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/480x854/res/fonts/Roboto-Regular-20.dat b/gui/devices/480x854/res/fonts/Roboto-Regular-20.dat
new file mode 100644
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/480x854/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/480x854/res/fonts/Roboto-Regular-40.dat b/gui/devices/480x854/res/fonts/Roboto-Regular-40.dat
new file mode 100644
index 000000000..637d9fe5b
--- /dev/null
+++ b/gui/devices/480x854/res/fonts/Roboto-Regular-40.dat
Binary files differ
diff --git a/gui/devices/480x854/res/images/back-icon.png b/gui/devices/480x854/res/images/back-icon.png
new file mode 100644
index 000000000..688436eb2
--- /dev/null
+++ b/gui/devices/480x854/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/checkbox_checked.png b/gui/devices/480x854/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/480x854/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/checkbox_empty.png b/gui/devices/480x854/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/480x854/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/curtain.jpg b/gui/devices/480x854/res/images/curtain.jpg
new file mode 100644
index 000000000..6e60648dd
--- /dev/null
+++ b/gui/devices/480x854/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/480x854/res/images/file.png b/gui/devices/480x854/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/480x854/res/images/file.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/folder.png b/gui/devices/480x854/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/480x854/res/images/folder.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/home-icon.png b/gui/devices/480x854/res/images/home-icon.png
new file mode 100644
index 000000000..551952015
--- /dev/null
+++ b/gui/devices/480x854/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate001.png b/gui/devices/480x854/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate002.png b/gui/devices/480x854/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate003.png b/gui/devices/480x854/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate004.png b/gui/devices/480x854/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate005.png b/gui/devices/480x854/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/indeterminate006.png b/gui/devices/480x854/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/480x854/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/keyboard1.png b/gui/devices/480x854/res/images/keyboard1.png
new file mode 100644
index 000000000..5a691ac02
--- /dev/null
+++ b/gui/devices/480x854/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/keyboard2.png b/gui/devices/480x854/res/images/keyboard2.png
new file mode 100644
index 000000000..69b015458
--- /dev/null
+++ b/gui/devices/480x854/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/keyboard3.png b/gui/devices/480x854/res/images/keyboard3.png
new file mode 100644
index 000000000..498cef84b
--- /dev/null
+++ b/gui/devices/480x854/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/keyboard4.png b/gui/devices/480x854/res/images/keyboard4.png
new file mode 100644
index 000000000..e8f9dde0e
--- /dev/null
+++ b/gui/devices/480x854/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/medium-button.png b/gui/devices/480x854/res/images/medium-button.png
new file mode 100644
index 000000000..1d5b816ec
--- /dev/null
+++ b/gui/devices/480x854/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/menu-button.png b/gui/devices/480x854/res/images/menu-button.png
new file mode 100644
index 000000000..c8d3794e5
--- /dev/null
+++ b/gui/devices/480x854/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/minus-button.png b/gui/devices/480x854/res/images/minus-button.png
new file mode 100644
index 000000000..9c92d2f46
--- /dev/null
+++ b/gui/devices/480x854/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/plus-button.png b/gui/devices/480x854/res/images/plus-button.png
new file mode 100644
index 000000000..5d3068ed9
--- /dev/null
+++ b/gui/devices/480x854/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/progress_empty.png b/gui/devices/480x854/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/480x854/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/progress_fill.png b/gui/devices/480x854/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/480x854/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/radio_empty.png b/gui/devices/480x854/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/480x854/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/radio_selected.png b/gui/devices/480x854/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/480x854/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/slideout.png b/gui/devices/480x854/res/images/slideout.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/480x854/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/slider-touch.png b/gui/devices/480x854/res/images/slider-touch.png
new file mode 100644
index 000000000..c8c0f43c3
--- /dev/null
+++ b/gui/devices/480x854/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/slider-used.png b/gui/devices/480x854/res/images/slider-used.png
new file mode 100644
index 000000000..2f3d51969
--- /dev/null
+++ b/gui/devices/480x854/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/slider.png b/gui/devices/480x854/res/images/slider.png
new file mode 100644
index 000000000..6fcce6f5b
--- /dev/null
+++ b/gui/devices/480x854/res/images/slider.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/sort-button.png b/gui/devices/480x854/res/images/sort-button.png
new file mode 100644
index 000000000..69d511bea
--- /dev/null
+++ b/gui/devices/480x854/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/480x854/res/images/top-bar.jpg b/gui/devices/480x854/res/images/top-bar.jpg
new file mode 100644
index 000000000..d8ab933b5
--- /dev/null
+++ b/gui/devices/480x854/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/480x854/res/images/unlock.png b/gui/devices/480x854/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/480x854/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
new file mode 100644
index 000000000..08c3ddcfe
--- /dev/null
+++ b/gui/devices/480x854/res/ui.xml
@@ -0,0 +1,3845 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="480" height="854" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="mediumfont" type="font" filename="Roboto-Regular-20" />
+ <resource name="filelist" type="font" filename="Roboto-Regular-20" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="240" />
+ <variable name="col_center_x" value="128" />
+ <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="480" />
+ <variable name="row13_text_y" value="510" />
+ <variable name="row14_text_y" value="540" />
+ <variable name="row15_text_y" value="570" />
+ <variable name="row16_text_y" value="600" />
+ <variable name="row17_text_y" value="630" />
+ <variable name="row18_text_y" value="660" />
+ <variable name="zip_status_y" value="585" />
+ <variable name="tz_selected_y" value="110" />
+ <variable name="tz_set_y" value="580" />
+ <variable name="tz_current_y" value="730" />
+ <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_x" value="58" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="820" />
+ <variable name="back_button_x" value="413" />
+ <variable name="back_button_y" value="820" />
+ <variable name="sort_asc_text_y" value="739" />
+ <variable name="sort_asc_button_y" value="739" />
+ <variable name="sort_desc_text_y" value="779" />
+ <variable name="sort_desc_button_y" value="779" />
+ <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="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="534" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="40" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="27" />
+ <variable name="fastscroll_recth" value="47" />
+ <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="150" />
+ <variable name="sdswap_button_y" value="185" />
+ <variable name="sdswap_text_x" value="84" />
+ <variable name="sdswap_text_y" value="195" />
+ <variable name="sdfilesystem_text_y" value="240" />
+ <variable name="sdfilesystem_button_y" value="280" />
+ <variable name="lock_x" value="40" />
+ <variable name="lock_y" value="200" />
+ <variable name="filemanager_select_x" value="365" />
+ <variable name="filemanager_select_y" value="744" />
+ <variable name="backup_name_y" value="350" />
+ <variable name="terminal_console_height" value="424" />
+ <variable name="terminal_text_y" value="444" />
+ <variable name="terminal_button_y" value="434" />
+ <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="550" />
+ <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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="%backgroundcolor%" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </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="250" 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="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>
+ </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="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="210" y="814" />
+ <placement x="%console_x%" y="0" w="%console_width%" h="814" />
+ <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="504" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%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" />
+ <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>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/540x960/res/fonts/Roboto-Regular-20.dat b/gui/devices/540x960/res/fonts/Roboto-Regular-20.dat
new file mode 100644
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/540x960/res/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/540x960/res/fonts/Roboto-Regular-25.dat b/gui/devices/540x960/res/fonts/Roboto-Regular-25.dat
new file mode 100644
index 000000000..392cce97d
--- /dev/null
+++ b/gui/devices/540x960/res/fonts/Roboto-Regular-25.dat
Binary files differ
diff --git a/gui/devices/540x960/res/fonts/Roboto-Regular-40.dat b/gui/devices/540x960/res/fonts/Roboto-Regular-40.dat
new file mode 100644
index 000000000..637d9fe5b
--- /dev/null
+++ b/gui/devices/540x960/res/fonts/Roboto-Regular-40.dat
Binary files differ
diff --git a/gui/devices/540x960/res/images/.BridgeSort b/gui/devices/540x960/res/images/.BridgeSort
new file mode 100644
index 000000000..b475f87dc
--- /dev/null
+++ b/gui/devices/540x960/res/images/.BridgeSort
@@ -0,0 +1,29 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
+<dirinfo>
+<files>
+<item key='checkbox_checked.png20120416172546' />
+<item key='checkbox_empty.png20120416172604' />
+<item key='file.png20120411171839' />
+<item key='folder.png20120411173532' />
+<item key='indeterminate001.png20120412113445' />
+<item key='indeterminate002.png20120412113445' />
+<item key='indeterminate003.png20120412113445' />
+<item key='indeterminate004.png20120412113445' />
+<item key='indeterminate005.png20120412113445' />
+<item key='indeterminate006.png20120412113445' />
+<item key='qhd-medium-button.png20120417101729' />
+<item key='qhd-menu-button.png20120417101649' />
+<item key='qhd-minus-button.png20120417101827' />
+<item key='qhd-plus-button.png20120417101847' />
+<item key='qhd-small-button.png20120417101930' />
+<item key='qhd-sort-button.png20120417102006' />
+<item key='radio_empty.png20120411175722' />
+<item key='radio_selected.png20120411175739' />
+<item key='slideout.png20120416182450' />
+<item key='slider-touch.png20120412103144' />
+<item key='slider-used.png20120412103705' />
+<item key='slider.png20120412103630' />
+<item key='top-bar-01.jpg20120417101442' />
+<item key='unlock.png20120412111348' />
+</files>
+</dirinfo>
diff --git a/gui/devices/540x960/res/images/back-icon.png b/gui/devices/540x960/res/images/back-icon.png
new file mode 100644
index 000000000..f5ba872de
--- /dev/null
+++ b/gui/devices/540x960/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/checkbox_checked.png b/gui/devices/540x960/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3447349cf
--- /dev/null
+++ b/gui/devices/540x960/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/checkbox_empty.png b/gui/devices/540x960/res/images/checkbox_empty.png
new file mode 100644
index 000000000..f5f35d8d1
--- /dev/null
+++ b/gui/devices/540x960/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/curtain.jpg b/gui/devices/540x960/res/images/curtain.jpg
new file mode 100644
index 000000000..f1a6316bb
--- /dev/null
+++ b/gui/devices/540x960/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/540x960/res/images/file.png b/gui/devices/540x960/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/540x960/res/images/file.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/folder.png b/gui/devices/540x960/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/540x960/res/images/folder.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/home-icon.png b/gui/devices/540x960/res/images/home-icon.png
new file mode 100644
index 000000000..46ccf6acc
--- /dev/null
+++ b/gui/devices/540x960/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate001.png b/gui/devices/540x960/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate002.png b/gui/devices/540x960/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate003.png b/gui/devices/540x960/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate004.png b/gui/devices/540x960/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate005.png b/gui/devices/540x960/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/indeterminate006.png b/gui/devices/540x960/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/540x960/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/keyboard1.png b/gui/devices/540x960/res/images/keyboard1.png
new file mode 100644
index 000000000..9fecdcd94
--- /dev/null
+++ b/gui/devices/540x960/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/keyboard2.png b/gui/devices/540x960/res/images/keyboard2.png
new file mode 100644
index 000000000..0d1e966de
--- /dev/null
+++ b/gui/devices/540x960/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/keyboard3.png b/gui/devices/540x960/res/images/keyboard3.png
new file mode 100644
index 000000000..b9eab174f
--- /dev/null
+++ b/gui/devices/540x960/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/keyboard4.png b/gui/devices/540x960/res/images/keyboard4.png
new file mode 100644
index 000000000..909956bdd
--- /dev/null
+++ b/gui/devices/540x960/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/progress_empty.png b/gui/devices/540x960/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/540x960/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/progress_fill.png b/gui/devices/540x960/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/540x960/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-medium-button.png b/gui/devices/540x960/res/images/qhd-medium-button.png
new file mode 100644
index 000000000..b91e7fc60
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-medium-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-menu-button.png b/gui/devices/540x960/res/images/qhd-menu-button.png
new file mode 100644
index 000000000..ec2b1fd3a
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-menu-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-minus-button.png b/gui/devices/540x960/res/images/qhd-minus-button.png
new file mode 100644
index 000000000..0cbc5ce7a
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-minus-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-plus-button.png b/gui/devices/540x960/res/images/qhd-plus-button.png
new file mode 100644
index 000000000..89c8048ea
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-plus-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-small-button.png b/gui/devices/540x960/res/images/qhd-small-button.png
new file mode 100644
index 000000000..255d09d7c
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-small-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/qhd-sort-button.png b/gui/devices/540x960/res/images/qhd-sort-button.png
new file mode 100644
index 000000000..e06618e19
--- /dev/null
+++ b/gui/devices/540x960/res/images/qhd-sort-button.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/radio_empty.png b/gui/devices/540x960/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/540x960/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/radio_selected.png b/gui/devices/540x960/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/540x960/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/slideout.png b/gui/devices/540x960/res/images/slideout.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/540x960/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/slider-touch.png b/gui/devices/540x960/res/images/slider-touch.png
new file mode 100644
index 000000000..d8647b8a6
--- /dev/null
+++ b/gui/devices/540x960/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/slider-used.png b/gui/devices/540x960/res/images/slider-used.png
new file mode 100644
index 000000000..bf6cad924
--- /dev/null
+++ b/gui/devices/540x960/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/slider.png b/gui/devices/540x960/res/images/slider.png
new file mode 100644
index 000000000..4081ea540
--- /dev/null
+++ b/gui/devices/540x960/res/images/slider.png
Binary files differ
diff --git a/gui/devices/540x960/res/images/top-bar.jpg b/gui/devices/540x960/res/images/top-bar.jpg
new file mode 100644
index 000000000..fbe72302d
--- /dev/null
+++ b/gui/devices/540x960/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/540x960/res/images/unlock.png b/gui/devices/540x960/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/540x960/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
new file mode 100644
index 000000000..e03704eef
--- /dev/null
+++ b/gui/devices/540x960/res/ui.xml
@@ -0,0 +1,3846 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="540" height="960" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Regular-20" />
+ <resource name="mediumfont" type="font" filename="Roboto-Regular-20" />
+ <resource name="filelist" type="font" filename="Roboto-Regular-25" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="qhd-menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <resource name="medium_button" type="image" filename="qhd-medium-button" />
+ <resource name="sort_button" type="image" filename="qhd-sort-button" />
+ <resource name="minus_button" type="image" filename="qhd-minus-button" />
+ <resource name="plus_button" type="image" filename="qhd-plus-button" />
+ <resource name="home_icon" type="image" filename="home-icon" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="277" />
+ <variable name="col_center_x" value="143" />
+ <variable name="col_center_medium_x" value="206" />
+ <variable name="center_x" value="270" />
+ <variable name="row1_y" value="140" />
+ <variable name="row2_y" value="332" />
+ <variable name="row3_y" value="524" />
+ <variable name="row4_y" value="716" />
+ <variable name="row_queue_y" value="625" />
+ <variable name="row1_header_y" value="110" />
+ <variable name="row1_text_y" value="140" />
+ <variable name="row2_text_y" value="180" />
+ <variable name="row3_text_y" value="220" />
+ <variable name="row4_text_y" value="260" />
+ <variable name="row5_text_y" value="300" />
+ <variable name="row6_text_y" value="340" />
+ <variable name="row7_text_y" value="380" />
+ <variable name="row8_text_y" value="420" />
+ <variable name="row9_text_y" value="460" />
+ <variable name="row10_text_y" value="500" />
+ <variable name="row11_text_y" value="540" />
+ <variable name="row12_text_y" value="580" />
+ <variable name="row13_text_y" value="620" />
+ <variable name="row14_text_y" value="660" />
+ <variable name="row15_text_y" value="700" />
+ <variable name="row16_text_y" value="740" />
+ <variable name="row17_text_y" value="780" />
+ <variable name="row18_text_y" value="820" />
+ <variable name="zip_status_y" value="696" />
+ <variable name="tz_selected_y" value="110" />
+ <variable name="tz_set_y" value="720" />
+ <variable name="tz_current_y" value="895" />
+ <variable name="col_progressbar_x" value="144" />
+ <variable name="row_progressbar_y" value="850" />
+ <variable name="col1_medium_x" value="10" />
+ <variable name="col2_medium_x" value="145" />
+ <variable name="col3_medium_x" value="280" />
+ <variable name="col4_medium_x" value="415" />
+ <variable name="row1_medium_y" value="130" />
+ <variable name="row2_medium_y" value="230" />
+ <variable name="row3_medium_y" value="330" />
+ <variable name="row4_medium_y" value="430" />
+ <variable name="row5_medium_y" value="530" />
+ <variable name="row6_medium_y" value="630" />
+ <variable name="row7_medium_y" value="730" />
+ <variable name="slider_x" value="50" />
+ <variable name="slider_y" value="820" />
+ <variable name="slider_text_y" value="870" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="919" />
+ <variable name="back_button_x" value="466" />
+ <variable name="back_button_y" value="919" />
+ <variable name="sort_asc_text_y" value="830" />
+ <variable name="sort_asc_button_y" value="820" />
+ <variable name="sort_desc_text_y" value="880" />
+ <variable name="sort_desc_button_y" value="870" />
+ <variable name="sort_col1_button_x" value="180" />
+ <variable name="sort_col2_button_x" value="255" />
+ <variable name="sort_col3_button_x" value="330" />
+ <variable name="input_width" value="520" />
+ <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="540" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <variable name="console_background" value="#303030" />
+ <variable name="console_scroll" value="#303030" />
+ <variable name="console_action_height" value="380" />
+ <variable name="console_install_height" value="580" />
+ <variable name="console_installdone_height" value="380" />
+ <variable name="fileselector_x" value="5" />
+ <variable name="fileselector_width" value="530" />
+ <variable name="fileselector_install_height" value="590" />
+ <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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="45" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="30" />
+ <variable name="fastscroll_recth" value="52" />
+ <variable name="listbox_x" value="5" />
+ <variable name="listbox_width" value="530" />
+ <variable name="listbox_tz_height" value="420" />
+ <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="150" />
+ <variable name="sdswap_button_y" value="185" />
+ <variable name="sdswap_text_x" value="84" />
+ <variable name="sdswap_text_y" value="195" />
+ <variable name="sdfilesystem_text_y" value="240" />
+ <variable name="sdfilesystem_button_y" value="280" />
+ <variable name="lock_x" value="70" />
+ <variable name="lock_y" value="250" />
+ <variable name="filemanager_select_x" value="405" />
+ <variable name="filemanager_select_y" value="825" />
+ <variable name="backup_name_y" value="420" />
+ <variable name="terminal_console_height" value="530" />
+ <variable name="terminal_text_y" value="550" />
+ <variable name="terminal_button_y" value="525" />
+ <variable name="row_dst_text_y" value="540" />
+ <variable name="row_offset_text_y" value="580" />
+ <variable name="row_offset_medium_y" value="630" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="520" />
+ <variable name="button_fill_main_width" value="253" />
+ <variable name="button_fill_main_height" value="162" />
+ <variable name="button_fill_half_height" value="81" />
+ <variable name="button_fill_quarter_height" value="40" />
+ <variable name="backup_list_height" value="410" />
+ <variable name="backup_button_row1" value="600" />
+ <variable name="backup_button_row2" value="645" />
+ <variable name="mount_list_height" value="500" />
+ <variable name="mount_storage_row" value="630" />
+ <variable name="storage_list_height" value="575" />
+ <variable name="wipe_list_height" value="670" />
+ <variable name="wipe_button_y" value="475" />
+ <variable name="slidervalue_w" value="520" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="15" />
+ <variable name="slidervalue_sliderw" value="8" />
+ <variable name="slidervalue_sliderh" value="45" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </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="250" 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="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>
+ </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="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="UItext" 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="UItext" 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="UItext" 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="UItext" 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="UItext" 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="UItext" 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="240" y="920" />
+ <placement x="%console_x%" y="0" w="%console_width%" h="920" />
+ <color foreground="#A0A0A0" background="#303030" scroll="#303030" />
+ <font resource="fixed" />
+ </object>
+ </template>
+
+ <template name="keyboardtemplate">
+ <object type="keyboard">
+ <placement x="0" y="600" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="78" width="54" />
+ <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="81:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="81:l" />
+ <row3 key01="81:layout2" key02="z" key03="x" key04="c" key05="v" key06="b" key07="n" key08="m" key09="81:c:8" />
+ <row4 key01="81:layout3" key02="54:/" key03="270: " key04="54:." key05="81:a:action" />
+ </layout1>
+ <layout2>
+ <keysize height="78" width="54" />
+ <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="81:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="81:L" />
+ <row3 key01="81:layout1" key02="Z" key03="X" key04="C" key05="V" key06="B" key07="N" key08="M" key09="81:c:8" />
+ <row4 key01="81:layout3" key02="54:/" key03="270: " key04="54:." key05="81:action" />
+ </layout2>
+ <layout3>
+ <keysize height="78" width="54" />
+ <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="81:layout4" key02="!" key03="54:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="81:c:8" />
+ <row4 key01="81:layout1" key02="54:," key03="270: " key04="54:." key05="81:action" />
+ </layout3>
+ <layout4>
+ <keysize height="78" width="54" />
+ <row1 key01="~" key02="`" key03="|" key04="54:" key05="54:" key06="54:" key07="%" key08="54:" key09="{" key10="}" />
+ <row2 key01="54:" key02="54:" key03="54:" key04="54:" key05="54:" key06="^" key07="_" key08="=" key09="[" key10="]" />
+ <row3 key01="81:layout3" key02="54:" key03="54:" key04="54:" key05="54:" key06="\" key07="<" key08=">" key09="81:c:8" />
+ <row4 key01="81:layout1" key02="54:c:34" key03="270: " key04="54:." key05="81:action" />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/720x1280/res/fonts/Roboto-Condensed-30.dat b/gui/devices/720x1280/res/fonts/Roboto-Condensed-30.dat
new file mode 100644
index 000000000..621b33214
--- /dev/null
+++ b/gui/devices/720x1280/res/fonts/Roboto-Condensed-30.dat
Binary files differ
diff --git a/gui/devices/720x1280/res/images/back-icon.png b/gui/devices/720x1280/res/images/back-icon.png
new file mode 100644
index 000000000..e0c044243
--- /dev/null
+++ b/gui/devices/720x1280/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/checkbox_checked.png b/gui/devices/720x1280/res/images/checkbox_checked.png
new file mode 100644
index 000000000..2af760929
--- /dev/null
+++ b/gui/devices/720x1280/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/checkbox_empty.png b/gui/devices/720x1280/res/images/checkbox_empty.png
new file mode 100644
index 000000000..5f65c2604
--- /dev/null
+++ b/gui/devices/720x1280/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/curtain.jpg b/gui/devices/720x1280/res/images/curtain.jpg
new file mode 100644
index 000000000..a10cc02c3
--- /dev/null
+++ b/gui/devices/720x1280/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/720x1280/res/images/file.png b/gui/devices/720x1280/res/images/file.png
new file mode 100644
index 000000000..aea3ac292
--- /dev/null
+++ b/gui/devices/720x1280/res/images/file.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/folder.png b/gui/devices/720x1280/res/images/folder.png
new file mode 100644
index 000000000..56f4bc276
--- /dev/null
+++ b/gui/devices/720x1280/res/images/folder.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/home-icon.png b/gui/devices/720x1280/res/images/home-icon.png
new file mode 100644
index 000000000..d4373b786
--- /dev/null
+++ b/gui/devices/720x1280/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate001.png b/gui/devices/720x1280/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate002.png b/gui/devices/720x1280/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate003.png b/gui/devices/720x1280/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate004.png b/gui/devices/720x1280/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate005.png b/gui/devices/720x1280/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/indeterminate006.png b/gui/devices/720x1280/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/720x1280/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/keyboard1.png b/gui/devices/720x1280/res/images/keyboard1.png
new file mode 100644
index 000000000..a1af16021
--- /dev/null
+++ b/gui/devices/720x1280/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/keyboard2.png b/gui/devices/720x1280/res/images/keyboard2.png
new file mode 100644
index 000000000..5b0a4b564
--- /dev/null
+++ b/gui/devices/720x1280/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/keyboard3.png b/gui/devices/720x1280/res/images/keyboard3.png
new file mode 100644
index 000000000..38ee5af81
--- /dev/null
+++ b/gui/devices/720x1280/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/keyboard4.png b/gui/devices/720x1280/res/images/keyboard4.png
new file mode 100644
index 000000000..dc9a9761b
--- /dev/null
+++ b/gui/devices/720x1280/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/medium-button.png b/gui/devices/720x1280/res/images/medium-button.png
new file mode 100644
index 000000000..73faebbd1
--- /dev/null
+++ b/gui/devices/720x1280/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/menu-button.png b/gui/devices/720x1280/res/images/menu-button.png
new file mode 100644
index 000000000..c24f15512
--- /dev/null
+++ b/gui/devices/720x1280/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/minus-button.png b/gui/devices/720x1280/res/images/minus-button.png
new file mode 100644
index 000000000..7b5f79f14
--- /dev/null
+++ b/gui/devices/720x1280/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/plus-button.png b/gui/devices/720x1280/res/images/plus-button.png
new file mode 100644
index 000000000..b32857797
--- /dev/null
+++ b/gui/devices/720x1280/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/progress_empty.png b/gui/devices/720x1280/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/720x1280/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/progress_fill.png b/gui/devices/720x1280/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/720x1280/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/radio_empty.png b/gui/devices/720x1280/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/720x1280/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/radio_selected.png b/gui/devices/720x1280/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/720x1280/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/slideout.png b/gui/devices/720x1280/res/images/slideout.png
new file mode 100644
index 000000000..c3c65e4af
--- /dev/null
+++ b/gui/devices/720x1280/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/slider-touch.png b/gui/devices/720x1280/res/images/slider-touch.png
new file mode 100644
index 000000000..83fce0850
--- /dev/null
+++ b/gui/devices/720x1280/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/slider-used.png b/gui/devices/720x1280/res/images/slider-used.png
new file mode 100644
index 000000000..4e4a1f4d1
--- /dev/null
+++ b/gui/devices/720x1280/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/slider.png b/gui/devices/720x1280/res/images/slider.png
new file mode 100644
index 000000000..118edc68b
--- /dev/null
+++ b/gui/devices/720x1280/res/images/slider.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/sort-button.png b/gui/devices/720x1280/res/images/sort-button.png
new file mode 100644
index 000000000..125c2ce5d
--- /dev/null
+++ b/gui/devices/720x1280/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/720x1280/res/images/top-bar.jpg b/gui/devices/720x1280/res/images/top-bar.jpg
new file mode 100644
index 000000000..02c8051b2
--- /dev/null
+++ b/gui/devices/720x1280/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/720x1280/res/images/unlock.png b/gui/devices/720x1280/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/720x1280/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
new file mode 100644
index 000000000..c9a4c0a69
--- /dev/null
+++ b/gui/devices/720x1280/res/ui.xml
@@ -0,0 +1,3859 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="720" height="1280" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-30" />
+ <resource name="mediumfont" type="font" filename="Roboto-Condensed-30" />
+ <resource name="filelist" type="font" filename="Roboto-Condensed-30" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="373" />
+ <variable name="col_center_x" value="191" />
+ <variable name="col_center_medium_x" value="275" />
+ <variable name="center_x" value="360" />
+ <variable name="row1_y" value="170" />
+ <variable name="row2_y" value="410" />
+ <variable name="row3_y" value="650" />
+ <variable name="row4_y" value="890" />
+ <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="760" />
+ <variable name="row1_header_y" value="120" />
+ <variable name="row1_text_y" value="170" />
+ <variable name="row2_text_y" value="220" />
+ <variable name="row3_text_y" value="270" />
+ <variable name="row4_text_y" value="320" />
+ <variable name="row5_text_y" value="370" />
+ <variable name="row6_text_y" value="420" />
+ <variable name="row7_text_y" value="470" />
+ <variable name="row8_text_y" value="520" />
+ <variable name="row9_text_y" value="570" />
+ <variable name="row10_text_y" value="620" />
+ <variable name="row11_text_y" value="670" />
+ <variable name="row12_text_y" value="720" />
+ <variable name="row13_text_y" value="770" />
+ <variable name="row14_text_y" value="820" />
+ <variable name="row15_text_y" value="870" />
+ <variable name="row16_text_y" value="920" />
+ <variable name="row17_text_y" value="970" />
+ <variable name="row18_text_y" value="1020" />
+ <variable name="zip_status_y" value="615" />
+ <variable name="tz_selected_y" value="160" />
+ <variable name="tz_set_y" value="950" />
+ <variable name="tz_current_y" value="1180" />
+ <variable name="col_progressbar_x" value="234" />
+ <variable name="row_progressbar_y" value="1100" />
+ <variable name="col1_medium_x" value="10" />
+ <variable name="col2_medium_x" value="185" />
+ <variable name="col3_medium_x" value="365" />
+ <variable name="col4_medium_x" value="540" />
+ <variable name="row1_medium_y" value="130" />
+ <variable name="row2_medium_y" value="230" />
+ <variable name="row3_medium_y" value="330" />
+ <variable name="row4_medium_y" value="430" />
+ <variable name="row5_medium_y" value="530" />
+ <variable name="row6_medium_y" value="840" />
+ <variable name="row7_medium_y" value="730" />
+ <variable name="slider_x" value="68" />
+ <variable name="slider_y" value="1050" />
+ <variable name="slider_text_y" value="1117" />
+ <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="home_button_x" value="10" />
+ <variable name="home_button_y" value="1226" />
+ <variable name="back_button_x" value="625" />
+ <variable name="back_button_y" value="1226" />
+ <variable name="sort_text_x" value="10" />
+ <variable name="sort_asc_text_y" value="1090" />
+ <variable name="sort_asc_button_y" value="1080" />
+ <variable name="sort_desc_text_y" value="1150" />
+ <variable name="sort_desc_button_y" value="1140" />
+ <variable name="sort_col1_button_x" value="260" />
+ <variable name="sort_col2_button_x" value="360" />
+ <variable name="sort_col3_button_x" value="460" />
+ <variable name="input_width" value="700" />
+ <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="0" />
+ <variable name="console_width" value="720" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <variable name="console_background" value="#303030" />
+ <variable name="console_scroll" value="#303030" />
+ <variable name="console_action_height" value="470" />
+ <variable name="console_install_height" value="600" />
+ <variable name="console_installdone_height" value="440" />
+ <variable name="fileselector_x" value="5" />
+ <variable name="fileselector_width" value="710" />
+ <variable name="fileselector_install_height" value="780" />
+ <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="36" />
+ <variable name="fastscroll_linecolor" value="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="60" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="40" />
+ <variable name="fastscroll_recth" value="70" />
+ <variable name="listbox_x" value="5" />
+ <variable name="listbox_width" value="710" />
+ <variable name="listbox_tz_height" value="590" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="16" />
+ <variable name="sd_plus_x" value="350" />
+ <variable name="sdext_text_x" value="110" />
+ <variable name="sdext_text_y" value="180" />
+ <variable name="sdswap_button_y" value="260" />
+ <variable name="sdswap_text_x" value="110" />
+ <variable name="sdswap_text_y" value="270" />
+ <variable name="sdfilesystem_text_y" value="340" />
+ <variable name="sdfilesystem_button_y" value="380" />
+ <variable name="lock_x" value="160" />
+ <variable name="lock_y" value="400" />
+ <variable name="filemanager_select_x" value="560" />
+ <variable name="filemanager_select_y" value="1080" />
+ <variable name="backup_name_y" value="550" />
+ <variable name="terminal_console_height" value="700" />
+ <variable name="terminal_text_y" value="730" />
+ <variable name="terminal_button_y" value="700" />
+ <variable name="row_dst_text_y" value="720" />
+ <variable name="row_offset_text_y" value="770" />
+ <variable name="row_offset_medium_y" value="840" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="700" />
+ <variable name="button_fill_main_width" value="337" />
+ <variable name="button_fill_main_height" value="216" />
+ <variable name="button_fill_half_height" value="108" />
+ <variable name="button_fill_quarter_height" value="54" />
+ <variable name="backup_list_height" value="520" />
+ <variable name="backup_button_row1" value="745" />
+ <variable name="backup_button_row2" value="810" />
+ <variable name="mount_list_height" value="690" />
+ <variable name="mount_storage_row" value="820" />
+ <variable name="storage_list_height" value="775" />
+ <variable name="wipe_list_height" value="870" />
+ <variable name="wipe_button_y" value="650" />
+ <variable name="slidervalue_w" value="700" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="20" />
+ <variable name="slidervalue_sliderw" value="10" />
+ <variable name="slidervalue_sliderh" value="60" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="120" 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="120" y="45" />
+ <text>SIMULATING ACTIONS</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="120" y="76" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="270" y="76" />
+ <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="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>
+ </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="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="720" h="470" />
+ <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="325" y="1220" />
+ <placement x="%console_x%" y="0" w="%console_width%" h="1220" />
+ <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="800" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="106" width="72" />
+ <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="108:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="108:l" />
+ <row3 key01="108:layout2" key02="z" key03="x" key04="c" key05="v" key06="b" key07="n" key08="m" key09="108:c:8" />
+ <row4 key01="100:layout3" key02="130:" key03="260: " key04="65:." key05="165:a:action" />
+ </layout1>
+ <layout2>
+ <keysize height="106" width="72" />
+ <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="108:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="108:L" />
+ <row3 key01="108:layout1" key02="Z" key03="X" key04="C" key05="V" key06="B" key07="N" key08="M" key09="108:c:8" />
+ <row4 key01="100:layout3" key02="130:" key03="260: " key04="65:." key05="165:action" />
+ </layout2>
+ <layout3>
+ <keysize height="106" width="72" />
+ <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="108:layout4" key02="!" key03="72:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="108:c:8" />
+ <row4 key01="100:layout1" key02="65:" key03="65:," key04="260: " key05="65:." key06="165:action" />
+ </layout3>
+ <layout4>
+ <keysize height="106" width="72" />
+ <row1 key01="~" key02="`" key03="|" key04="72:" key05="72:" key06="72:" key07="%" key08="72:" key09="{" key10="}" />
+ <row2 key01="72:" key02="72:" key03="72:" key04="72:" key05="72:" key06="^" key07="_" key08="=" key09="[" key10="]" />
+ <row3 key01="108:layout3" key02="72:" key03="72:" key04="72:" key05="72:" key06="\" key07="<" key08=">" key09="108:c:8" />
+ <row4 key01="100:layout1" key02="65:" key03="65:c:34" key04="260: " key05="65:." key06="165:action" />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/800x1280/res/fonts/Roboto-Condensed-30.dat b/gui/devices/800x1280/res/fonts/Roboto-Condensed-30.dat
new file mode 100644
index 000000000..621b33214
--- /dev/null
+++ b/gui/devices/800x1280/res/fonts/Roboto-Condensed-30.dat
Binary files differ
diff --git a/gui/devices/800x1280/res/images/back-icon.png b/gui/devices/800x1280/res/images/back-icon.png
new file mode 100644
index 000000000..e0c044243
--- /dev/null
+++ b/gui/devices/800x1280/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/checkbox_checked.png b/gui/devices/800x1280/res/images/checkbox_checked.png
new file mode 100644
index 000000000..2af760929
--- /dev/null
+++ b/gui/devices/800x1280/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/checkbox_empty.png b/gui/devices/800x1280/res/images/checkbox_empty.png
new file mode 100644
index 000000000..5f65c2604
--- /dev/null
+++ b/gui/devices/800x1280/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/curtain.jpg b/gui/devices/800x1280/res/images/curtain.jpg
new file mode 100644
index 000000000..b21df31e8
--- /dev/null
+++ b/gui/devices/800x1280/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/800x1280/res/images/file.png b/gui/devices/800x1280/res/images/file.png
new file mode 100644
index 000000000..aea3ac292
--- /dev/null
+++ b/gui/devices/800x1280/res/images/file.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/folder.png b/gui/devices/800x1280/res/images/folder.png
new file mode 100644
index 000000000..56f4bc276
--- /dev/null
+++ b/gui/devices/800x1280/res/images/folder.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/home-icon.png b/gui/devices/800x1280/res/images/home-icon.png
new file mode 100644
index 000000000..d4373b786
--- /dev/null
+++ b/gui/devices/800x1280/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate001.png b/gui/devices/800x1280/res/images/indeterminate001.png
new file mode 100644
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate002.png b/gui/devices/800x1280/res/images/indeterminate002.png
new file mode 100644
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate003.png b/gui/devices/800x1280/res/images/indeterminate003.png
new file mode 100644
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate004.png b/gui/devices/800x1280/res/images/indeterminate004.png
new file mode 100644
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate005.png b/gui/devices/800x1280/res/images/indeterminate005.png
new file mode 100644
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/indeterminate006.png b/gui/devices/800x1280/res/images/indeterminate006.png
new file mode 100644
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/800x1280/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/keyboard1.png b/gui/devices/800x1280/res/images/keyboard1.png
new file mode 100755
index 000000000..17205c8f3
--- /dev/null
+++ b/gui/devices/800x1280/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/keyboard2.png b/gui/devices/800x1280/res/images/keyboard2.png
new file mode 100755
index 000000000..e4f5c368b
--- /dev/null
+++ b/gui/devices/800x1280/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/keyboard3.png b/gui/devices/800x1280/res/images/keyboard3.png
new file mode 100755
index 000000000..7214ff3f8
--- /dev/null
+++ b/gui/devices/800x1280/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/keyboard4.png b/gui/devices/800x1280/res/images/keyboard4.png
new file mode 100755
index 000000000..efe6dc67e
--- /dev/null
+++ b/gui/devices/800x1280/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/medium-button.png b/gui/devices/800x1280/res/images/medium-button.png
new file mode 100644
index 000000000..207faefa3
--- /dev/null
+++ b/gui/devices/800x1280/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/menu-button.png b/gui/devices/800x1280/res/images/menu-button.png
new file mode 100644
index 000000000..0642f3816
--- /dev/null
+++ b/gui/devices/800x1280/res/images/menu-button.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/minus-button.png b/gui/devices/800x1280/res/images/minus-button.png
new file mode 100644
index 000000000..7b5f79f14
--- /dev/null
+++ b/gui/devices/800x1280/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/plus-button.png b/gui/devices/800x1280/res/images/plus-button.png
new file mode 100644
index 000000000..b32857797
--- /dev/null
+++ b/gui/devices/800x1280/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/progress_empty.png b/gui/devices/800x1280/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/800x1280/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/progress_fill.png b/gui/devices/800x1280/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/800x1280/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/radio_empty.png b/gui/devices/800x1280/res/images/radio_empty.png
new file mode 100644
index 000000000..88d1c1f5e
--- /dev/null
+++ b/gui/devices/800x1280/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/radio_selected.png b/gui/devices/800x1280/res/images/radio_selected.png
new file mode 100644
index 000000000..864065dea
--- /dev/null
+++ b/gui/devices/800x1280/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/slideout.png b/gui/devices/800x1280/res/images/slideout.png
new file mode 100644
index 000000000..c3c65e4af
--- /dev/null
+++ b/gui/devices/800x1280/res/images/slideout.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/slider-touch.png b/gui/devices/800x1280/res/images/slider-touch.png
new file mode 100644
index 000000000..83fce0850
--- /dev/null
+++ b/gui/devices/800x1280/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/slider-used.png b/gui/devices/800x1280/res/images/slider-used.png
new file mode 100644
index 000000000..4e4a1f4d1
--- /dev/null
+++ b/gui/devices/800x1280/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/slider.png b/gui/devices/800x1280/res/images/slider.png
new file mode 100644
index 000000000..118edc68b
--- /dev/null
+++ b/gui/devices/800x1280/res/images/slider.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/sort-button.png b/gui/devices/800x1280/res/images/sort-button.png
new file mode 100644
index 000000000..125c2ce5d
--- /dev/null
+++ b/gui/devices/800x1280/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/800x1280/res/images/top-bar.jpg b/gui/devices/800x1280/res/images/top-bar.jpg
new file mode 100644
index 000000000..265b717b6
--- /dev/null
+++ b/gui/devices/800x1280/res/images/top-bar.jpg
Binary files differ
diff --git a/gui/devices/800x1280/res/images/unlock.png b/gui/devices/800x1280/res/images/unlock.png
new file mode 100644
index 000000000..904122120
--- /dev/null
+++ b/gui/devices/800x1280/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
new file mode 100755
index 000000000..9b7a06315
--- /dev/null
+++ b/gui/devices/800x1280/res/ui.xml
@@ -0,0 +1,3847 @@
+<?xml version="1.0"?>
+
+<recovery>
+ <details>
+ <resolution width="800" height="1280" />
+ <author>TeamWin</author>
+ <title>Backup Naowz</title>
+ <description>Default basic theme</description>
+ <preview>preview.jpg</preview>
+ </details>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-30" />
+ <resource name="mediumfont" type="font" filename="Roboto-Condensed-30" />
+ <resource name="filelist" type="font" filename="Roboto-Condensed-30" />
+ <resource name="top_bar" type="image" filename="top-bar.jpg" />
+ <resource name="main_button" type="image" filename="menu-button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <resource name="slideout" type="image" filename="slideout" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </resources>
+
+ <variables>
+ <variable name="col1_x" value="10" />
+ <variable name="col2_x" value="415" />
+ <variable name="col_center_x" value="213" />
+ <variable name="col_center_medium_x" value="306" />
+ <variable name="center_x" value="400" />
+ <variable name="row1_y" value="185" />
+ <variable name="row2_y" value="425" />
+ <variable name="row3_y" value="665" />
+ <variable name="row4_y" value="905" />
+ <variable name="row_queue_y" value="710" />
+ <variable name="row1_header_y" value="131" />
+ <variable name="row1_text_y" value="170" />
+ <variable name="row2_text_y" value="220" />
+ <variable name="row3_text_y" value="270" />
+ <variable name="row4_text_y" value="320" />
+ <variable name="row5_text_y" value="370" />
+ <variable name="row6_text_y" value="420" />
+ <variable name="row7_text_y" value="470" />
+ <variable name="row8_text_y" value="520" />
+ <variable name="row9_text_y" value="570" />
+ <variable name="row10_text_y" value="620" />
+ <variable name="row11_text_y" value="670" />
+ <variable name="row12_text_y" value="720" />
+ <variable name="row13_text_y" value="770" />
+ <variable name="row14_text_y" value="820" />
+ <variable name="row15_text_y" value="870" />
+ <variable name="row16_text_y" value="920" />
+ <variable name="row17_text_y" value="970" />
+ <variable name="row18_text_y" value="1020" />
+ <variable name="zip_status_y" value="640" />
+ <variable name="tz_selected_y" value="160" />
+ <variable name="tz_set_y" value="955" />
+ <variable name="tz_current_y" value="1185" />
+ <variable name="col_progressbar_x" value="264" />
+ <variable name="row_progressbar_y" value="1100" />
+ <variable name="col1_medium_x" value="10" />
+ <variable name="col2_medium_x" value="208" />
+ <variable name="col3_medium_x" value="406" />
+ <variable name="col4_medium_x" value="604" />
+ <variable name="row1_medium_y" value="130" />
+ <variable name="row2_medium_y" value="230" />
+ <variable name="row3_medium_y" value="330" />
+ <variable name="row4_medium_y" value="430" />
+ <variable name="row5_medium_y" value="530" />
+ <variable name="row6_medium_y" value="840" />
+ <variable name="row7_medium_y" value="730" />
+ <variable name="slider_x" value="98" />
+ <variable name="slider_y" value="1030" />
+ <variable name="slider_text_y" value="1096" />
+ <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="home_button_x" value="50" />
+ <variable name="home_button_y" value="1226" />
+ <variable name="back_button_x" value="666" />
+ <variable name="back_button_y" value="1226" />
+ <variable name="sort_text_x" value="85" />
+ <variable name="sort_asc_text_y" value="1090" />
+ <variable name="sort_asc_button_y" value="1080" />
+ <variable name="sort_desc_text_y" value="1150" />
+ <variable name="sort_desc_button_y" value="1140" />
+ <variable name="sort_col1_button_x" value="330" />
+ <variable name="sort_col2_button_x" value="430" />
+ <variable name="sort_col3_button_x" value="530" />
+ <variable name="input_width" value="750" />
+ <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="0" />
+ <variable name="console_width" value="800" />
+ <variable name="console_foreground" value="#A0A0A0" />
+ <variable name="console_background" value="#303030" />
+ <variable name="console_scroll" value="#303030" />
+ <variable name="console_action_height" value="470" />
+ <variable name="console_install_height" value="600" />
+ <variable name="console_installdone_height" value="440" />
+ <variable name="fileselector_x" value="5" />
+ <variable name="fileselector_width" value="790" />
+ <variable name="fileselector_install_height" value="750" />
+ <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="36"/>
+ <variable name="fastscroll_linecolor" value="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="60" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="40" />
+ <variable name="fastscroll_recth" value="70" />
+ <variable name="listbox_x" value="5" />
+ <variable name="listbox_width" value="790" />
+ <variable name="listbox_tz_height" value="580" />
+ <variable name="listbox_background" value="#303030" />
+ <variable name="listbox_spacing" value="16" />
+ <variable name="sd_plus_x" value="350" />
+ <variable name="sdext_text_x" value="115" />
+ <variable name="sdext_text_y" value="190" />
+ <variable name="sdswap_button_y" value="260" />
+ <variable name="sdswap_text_x" value="115" />
+ <variable name="sdswap_text_y" value="265" />
+ <variable name="sdfilesystem_text_y" value="340" />
+ <variable name="sdfilesystem_button_y" value="380" />
+ <variable name="lock_x" value="200" />
+ <variable name="lock_y" value="400" />
+ <variable name="filemanager_select_x" value="320" />
+ <variable name="filemanager_select_y" value="950" />
+ <variable name="backup_name_y" value="550" />
+ <variable name="terminal_console_height" value="600" />
+ <variable name="terminal_text_y" value="650" />
+ <variable name="terminal_button_y" value="620" />
+ <variable name="row_dst_text_y" value="720" />
+ <variable name="row_offset_text_y" value="800" />
+ <variable name="row_offset_medium_y" value="840" />
+ <variable name="button_fill_color" value="#303030" />
+ <variable name="button_fill_full_width" value="780" />
+ <variable name="button_fill_main_width" value="375" />
+ <variable name="button_fill_main_height" value="240" />
+ <variable name="button_fill_half_height" value="120" />
+ <variable name="button_fill_quarter_height" value="54" />
+ <variable name="backup_list_height" value="520" />
+ <variable name="backup_button_row1" value="745" />
+ <variable name="backup_button_row2" value="810" />
+ <variable name="mount_list_height" value="690" />
+ <variable name="mount_storage_row" value="830" />
+ <variable name="storage_list_height" value="775" />
+ <variable name="wipe_list_height" value="870" />
+ <variable name="wipe_button_y" value="650" />
+ <variable name="slidervalue_w" value="780" />
+ <variable name="slidervalue_line_clr" value="#FFFFFF" />
+ <variable name="slidervalue_slider_clr" value="#33B5E5" />
+ <variable name="slidervalue_lineh" value="2" />
+ <variable name="slidervalue_padding" value="20" />
+ <variable name="slidervalue_sliderw" value="10" />
+ <variable name="slidervalue_sliderh" value="60" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="top_bar" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="120" 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="120" y="45" />
+ <text>SIMULATING ACTIONS</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="120" y="76" />
+ <text>%tw_time%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="270" y="76" />
+ <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="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>
+ </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="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="action_page_console">
+ <object type="console">
+ <placement x="0" y="%row3_text_y%" w="800" 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="slideout" x="355" y="1220" />
+ <placement x="%console_x%" y="0" w="%console_width%" h="1220" />
+ <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="740" />
+ <layout resource1="keyboard1" resource2="keyboard2" resource3="keyboard3" resource4="keyboard4" />
+ <highlight color="%highlight_color%" />
+ <layout1>
+ <keysize height="115" width="80" />
+ <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="117:a" key02="s" key03="d" key04="f" key05="g" key06="h" key07="j" key08="k" key09="123:l" />
+ <row3 key01="117:layout2" key02="z" key03="x" key04="c" key05="v" key06="b" key07="n" key08="m" key09="123:c:8" />
+ <row4 key01="117:layout3" key02="80:" key03="400: " key04="80:." key05="123:a:action" />
+ </layout1>
+ <layout2>
+ <keysize height="116" width="80" />
+ <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="117:A" key02="S" key03="D" key04="F" key05="G" key06="H" key07="J" key08="K" key09="123:L" />
+ <row3 key01="117:layout1" key02="Z" key03="X" key04="C" key05="V" key06="B" key07="N" key08="M" key09="123:c:8" />
+ <row4 key01="117:layout3" key02="80:," key03="400: " key04="80:." key05="123:action" />
+ </layout2>
+ <layout3>
+ <keysize height="115" width="80" />
+ <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="117:layout4" key02="!" key03="80:c:34" key04="'" key05=":" key06=";" key07="/" key08="?" key09="123:c:8" />
+ <row4 key01="117:layout1" key02="80:," key03="400: " key04="80:." key05="123:action" />
+ </layout3>
+ <layout4>
+ <keysize height="116" width="80" />
+ <row1 key01="~" key02="`" key03="|" key04="80:" key05="80:" key06="80:" key07="80:" key08="80:" key09="{" key10="}" />
+ <row2 key01="80:" key02="80:" key03="80:" key04="80:" key05="80:" key06="^" key07="_" key08="=" key09="[" key10="]" />
+ <row3 key01="117:layout3" key02="80:" key03="80:" key04="80:" key05="80:" key06="\" key07="<" key08=">" key09="123:c:8" />
+ <row4 key01="117:layout1" key02="80:" key03="400: " key04="80:" key05="123:action" />
+ </layout4>
+ </object>
+ </template>
+ </templates>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row3_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>This operation may install incompatible</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>software and render your device unusable.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="mediumfont" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col1_x%" y="%row10_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Inject TWRP after install.</text>
+ <data variable="tw_inject_after_zip" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <placement x="%slider_x%" y="%slider_y%" placement="5" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col1_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="main_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row_queue_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Zip Queue</text>
+ <image resource="main_button" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="mediumfont" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe cache/dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=main2</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%zip_status_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row15_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col_center_medium_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>Most of the time this is</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row6_text_y%" placement="5" />
+ <text>the only wipe that you need.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Wipe Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Format Data will wipe all of your apps,</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>backups, pictures, videos, media, and</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" placement="5" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row2%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable compression.</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="slider_y" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">backup_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <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 a Backup Name</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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>
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row2_text_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Restoring: %tw_restore_name%</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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 &quot;%tw_restore_name%&quot;</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row16_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%storage_list_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%mount_storage_row%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col1_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col2_x%" y="row4_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</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="usb_mount">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text>from your computer before unmounting!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="reboot">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification.</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting.</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation during backup.</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 verification of backup files.</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time.</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate actions for theme testing.</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions.</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <placement x="%col_center_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row1_header_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_offset_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>None</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offset_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%tz_set_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="col1_x" y="%row4_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <action function="page">htcdumlock</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_injecttwrp" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Re-Inject TWRP</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdext_text_x%" y="%sdext_text_y%" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%sd_plus_x%" y="%sdswap_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%sdswap_text_x%" y="%sdswap_text_y%" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%sdfilesystem_text_y%" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col2_x%" y="%sdfilesystem_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="main_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row12_text_y%" />
+ <text>You will lose all files on your SD card!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row13_text_y%" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col2_x%" y="%row4_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_x%" y="%row1_y%" w="%fileselector_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="filelist" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select</text>
+ <image resource="medium_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </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%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row3_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/800x480/res/fonts/Roboto-Condensed-16.dat b/gui/devices/800x480/res/fonts/Roboto-Condensed-16.dat
new file mode 100644
index 000000000..19c11470d
--- /dev/null
+++ b/gui/devices/800x480/res/fonts/Roboto-Condensed-16.dat
Binary files differ
diff --git a/gui/devices/800x480/res/images/back-icon.png b/gui/devices/800x480/res/images/back-icon.png
new file mode 100644
index 000000000..1096c9090
--- /dev/null
+++ b/gui/devices/800x480/res/images/back-icon.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/background.jpg b/gui/devices/800x480/res/images/background.jpg
new file mode 100644
index 000000000..af8253145
--- /dev/null
+++ b/gui/devices/800x480/res/images/background.jpg
Binary files differ
diff --git a/gui/devices/800x480/res/images/button.png b/gui/devices/800x480/res/images/button.png
new file mode 100644
index 000000000..49b878498
--- /dev/null
+++ b/gui/devices/800x480/res/images/button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/checkbox_checked.png b/gui/devices/800x480/res/images/checkbox_checked.png
new file mode 100644
index 000000000..3759b7fd9
--- /dev/null
+++ b/gui/devices/800x480/res/images/checkbox_checked.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/checkbox_empty.png b/gui/devices/800x480/res/images/checkbox_empty.png
new file mode 100644
index 000000000..43a640427
--- /dev/null
+++ b/gui/devices/800x480/res/images/checkbox_empty.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/console-icon.png b/gui/devices/800x480/res/images/console-icon.png
new file mode 100644
index 000000000..91a727d40
--- /dev/null
+++ b/gui/devices/800x480/res/images/console-icon.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/console-toggle.png b/gui/devices/800x480/res/images/console-toggle.png
new file mode 100644
index 000000000..963b9fdba
--- /dev/null
+++ b/gui/devices/800x480/res/images/console-toggle.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/curtain.jpg b/gui/devices/800x480/res/images/curtain.jpg
new file mode 100644
index 000000000..1f03eb5e5
--- /dev/null
+++ b/gui/devices/800x480/res/images/curtain.jpg
Binary files differ
diff --git a/gui/devices/800x480/res/images/file.png b/gui/devices/800x480/res/images/file.png
new file mode 100644
index 000000000..8556bc7fa
--- /dev/null
+++ b/gui/devices/800x480/res/images/file.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/folder.png b/gui/devices/800x480/res/images/folder.png
new file mode 100644
index 000000000..a3a5f69df
--- /dev/null
+++ b/gui/devices/800x480/res/images/folder.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/home-icon.png b/gui/devices/800x480/res/images/home-icon.png
new file mode 100644
index 000000000..e42d774b1
--- /dev/null
+++ b/gui/devices/800x480/res/images/home-icon.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate001.png b/gui/devices/800x480/res/images/indeterminate001.png
new file mode 100755
index 000000000..e6fa1c574
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate001.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate002.png b/gui/devices/800x480/res/images/indeterminate002.png
new file mode 100755
index 000000000..e1fceaba1
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate002.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate003.png b/gui/devices/800x480/res/images/indeterminate003.png
new file mode 100755
index 000000000..670286743
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate003.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate004.png b/gui/devices/800x480/res/images/indeterminate004.png
new file mode 100755
index 000000000..ff65e0930
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate004.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate005.png b/gui/devices/800x480/res/images/indeterminate005.png
new file mode 100755
index 000000000..e61e2cc15
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate005.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/indeterminate006.png b/gui/devices/800x480/res/images/indeterminate006.png
new file mode 100755
index 000000000..c9c21ba9c
--- /dev/null
+++ b/gui/devices/800x480/res/images/indeterminate006.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/keyboard1.png b/gui/devices/800x480/res/images/keyboard1.png
new file mode 100644
index 000000000..1ccb64bb4
--- /dev/null
+++ b/gui/devices/800x480/res/images/keyboard1.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/keyboard2.png b/gui/devices/800x480/res/images/keyboard2.png
new file mode 100644
index 000000000..f19eaccab
--- /dev/null
+++ b/gui/devices/800x480/res/images/keyboard2.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/keyboard3.png b/gui/devices/800x480/res/images/keyboard3.png
new file mode 100644
index 000000000..022086064
--- /dev/null
+++ b/gui/devices/800x480/res/images/keyboard3.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/keyboard4.png b/gui/devices/800x480/res/images/keyboard4.png
new file mode 100644
index 000000000..7fc0ea50f
--- /dev/null
+++ b/gui/devices/800x480/res/images/keyboard4.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/medium-button.png b/gui/devices/800x480/res/images/medium-button.png
new file mode 100644
index 000000000..77dc54072
--- /dev/null
+++ b/gui/devices/800x480/res/images/medium-button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/mediumwide-button.png b/gui/devices/800x480/res/images/mediumwide-button.png
new file mode 100644
index 000000000..b2b7d4de9
--- /dev/null
+++ b/gui/devices/800x480/res/images/mediumwide-button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/minus-button.png b/gui/devices/800x480/res/images/minus-button.png
new file mode 100644
index 000000000..5a49c758e
--- /dev/null
+++ b/gui/devices/800x480/res/images/minus-button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/plus-button.png b/gui/devices/800x480/res/images/plus-button.png
new file mode 100644
index 000000000..da1326c92
--- /dev/null
+++ b/gui/devices/800x480/res/images/plus-button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/progress_empty.png b/gui/devices/800x480/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/800x480/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/progress_fill.png b/gui/devices/800x480/res/images/progress_fill.png
new file mode 100644
index 000000000..669c6efa9
--- /dev/null
+++ b/gui/devices/800x480/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/radio_empty.png b/gui/devices/800x480/res/images/radio_empty.png
new file mode 100644
index 000000000..d118aaf8b
--- /dev/null
+++ b/gui/devices/800x480/res/images/radio_empty.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/radio_selected.png b/gui/devices/800x480/res/images/radio_selected.png
new file mode 100644
index 000000000..5a8a0fd55
--- /dev/null
+++ b/gui/devices/800x480/res/images/radio_selected.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/slider-touch.png b/gui/devices/800x480/res/images/slider-touch.png
new file mode 100644
index 000000000..dee19eec2
--- /dev/null
+++ b/gui/devices/800x480/res/images/slider-touch.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/slider-used.png b/gui/devices/800x480/res/images/slider-used.png
new file mode 100644
index 000000000..754395a21
--- /dev/null
+++ b/gui/devices/800x480/res/images/slider-used.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/slider.png b/gui/devices/800x480/res/images/slider.png
new file mode 100644
index 000000000..b0cc079eb
--- /dev/null
+++ b/gui/devices/800x480/res/images/slider.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/sort-button.png b/gui/devices/800x480/res/images/sort-button.png
new file mode 100644
index 000000000..13ab929de
--- /dev/null
+++ b/gui/devices/800x480/res/images/sort-button.png
Binary files differ
diff --git a/gui/devices/800x480/res/images/unlock.png b/gui/devices/800x480/res/images/unlock.png
new file mode 100644
index 000000000..914c60d20
--- /dev/null
+++ b/gui/devices/800x480/res/images/unlock.png
Binary files differ
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
new file mode 100755
index 000000000..9c391b33e
--- /dev/null
+++ b/gui/devices/800x480/res/ui.xml
@@ -0,0 +1,3873 @@
+<?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>
+
+ <resources>
+ <resource name="font" type="font" filename="Roboto-Condensed-16" />
+ <resource name="base" type="image" filename="background.jpg" />
+ <resource name="main_button" type="image" filename="button" />
+ <resource name="file_icon" type="image" filename="file" />
+ <resource name="folder_icon" type="image" filename="folder" />
+ <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" />
+ <resource name="checkbox_true" type="image" filename="checkbox_checked" />
+ <resource name="radio_false" type="image" filename="radio_empty" />
+ <resource name="radio_true" type="image" filename="radio_selected" />
+ <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" />
+ <resource name="back_icon" type="image" filename="back-icon" />
+ <resource name="console_button" type="image" filename="console-toggle" />
+ <resource name="slider" type="image" filename="slider" />
+ <resource name="slider-used" type="image" filename="slider-used" />
+ <resource name="slider-touch" type="image" filename="slider-touch" />
+ <resource name="unlock-icon" type="image" filename="unlock" />
+ <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" />
+ </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="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="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="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="#808080" />
+ <variable name="fastscroll_rectcolor" value="#808080" />
+ <variable name="fastscroll_w" value="25" />
+ <variable name="fastscroll_linew" value="2" />
+ <variable name="fastscroll_rectw" value="19" />
+ <variable name="fastscroll_recth" value="31" />
+ <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_x" value="250" />
+ <variable name="lock_y" value="90" />
+ <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="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" />
+ </variables>
+
+ <templates>
+ <template name="header">
+ <background color="#000000FF" />
+
+ <object type="image">
+ <image resource="base" />
+ <placement x="0" y="0" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" y="2" />
+ <text>Team Win Recovery Project v%tw_version%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="250" 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="450" y="37" />
+ <text>%tw_time%</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>
+ </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="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%" />
+ <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" />
+ <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>
+
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Backup</text>
+ <image resource="main_button" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore</text>
+ <image resource="main_button" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe</text>
+ <image resource="main_button" />
+ <action function="page">wipe</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount</text>
+ <image resource="main_button" />
+ <action function="page">mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Settings</text>
+ <image resource="main_button" />
+ <action function="page">settings</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced</text>
+ <image resource="main_button" />
+ <action function="page">advanced</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot</text>
+ <image resource="main_button" />
+ <action function="page">reboot</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="install">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Zip to Install</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%button_full_center_x%" y="%zipstorage_text_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_zip_location" default="/sdcard" />
+ <data name="select" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_zip_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Folder:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_zip_location%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>File to flash:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <text>%tw_file%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_zip_queue_count" op="!=" var2="10"></condition>
+ <placement x="%col2_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Add More Zips</text>
+ <image resource="mediumwide_button" />
+ <action function="page">install</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row5_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Clear Queue</text>
+ <image resource="mediumwide_button" />
+ <actions>
+ <action function="queueclear"></action>
+ <action function="page">install</action>
+ </actions>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="flash">flash_zip</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Flash</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col1_x%" y="%row16_text_y%" />
+ <text>Flashing file %tw_zip_index% of %tw_zip_queue_count%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row17_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Wipe Cache/Dalvik</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Home</text>
+ <image resource="main_button" />
+ <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="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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>%tw_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>%tw_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>%tw_text4%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">action_page</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>%tw_slider_text%</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_has_cancel" var2="1" />
+ <placement x="%col4_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_action_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_complete_text1%</text>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Failed</text>
+ </object>
+
+ <object type="text" color="%text_success_color%">
+ <condition var1="tw_operation_status" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Successful</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="0" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Back</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_clear_destination=%tw_back%</action>
+ <action function="page">clear_vars</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_reboot" var2="1" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reboot System</text>
+ <image resource="main_button" />
+ <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>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Reboot Menu</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_system" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>System</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=reboot</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_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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_poweroff" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Power Off</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_recovery" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Recovery</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_reboot_bootloader" var2="1" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Bootloader</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_download_mode" var2="1" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Download</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Storage:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_storage_path" />
+ <listtype name="storage" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>OK</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Mount Menu</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%mount_list_height%" />
+ <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%" />
+ <text>Select Partitions to Mount:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <listtype name="mount" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <conditions>
+ <condition var1="tw_is_encrypted" var2="1" />
+ <condition var1="tw_is_decrypted" var2="0" />
+ </conditions>
+ <placement x="%col3_x%" y="row1_y" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Decrypt Data</text>
+ <image resource="main_button" />
+ <action function="page">decrypt</action>
+ </object>
+
+ <object type="button">
+ <condition var1="tw_has_usb_storage" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Mount USB Storage</text>
+ <image resource="main_button" />
+ <action function="page">usb_mount</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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="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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <text>USB Storage Mounted -- Be sure to safely remove your device from your computer before unmounting!</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%col1_x%" y="%row2_text_y%" />
+ <font resource="font" />
+ <text></text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Unmount</text>
+ <image resource="main_button" />
+ <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="wipe">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Factory Reset: Wipes Data, Cache, and Dalvik</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="0" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>.android_secure</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_data_media" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>(not including internal storage)</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <condition var1="tw_has_sdext_partition" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>SD-EXT</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Advanced Wipe</text>
+ <image resource="main_button" />
+ <action function="page">advancedwipe</action>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_has_internal" var2="1" />
+ <condition var1="tw_has_data_media" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%wipe_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Format Data</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">formatdata</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row12_text_y%" placement="5" />
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Factory Reset</text>
+ </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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" />
+ <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%" />
+ <text>Select Partitions to Wipe:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_wipe_list" />
+ <listtype name="wipe" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Wipe</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>videos, media, and removes encryption on internal storage.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5" />
+ <text>This cannot be undone. Press back to cancel.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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</function>
+ </object>
+ </page>
+
+ <page name="backup">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Back Up Device</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_width%" h="%backup_list_height%" />
+ <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%" />
+ <text>Select Partitions to Back Up:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_backup_list" />
+ <listtype name="backup" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%col_right_x%" y="%row2_text_y%" placement="1" />
+ <text>Backup Name: %tw_backup_name%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Refresh Sizes</text>
+ <image resource="main_button" />
+ <action function="refreshsizes"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Backup Name</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable Compression (Requires more time)</text>
+ <data variable="tw_use_compression" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row7%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <actions>
+ <action function="set">tw_operation_state=0</action>
+ <action function="page">backup_run</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Back Up</text>
+ </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"></function>
+ </object>
+
+ <object type="action">
+ <action function="page">backupname2</function>
+ </object>
+ </page>
+
+ <page name="backupname2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Append Date</text>
+ <image resource="main_button" />
+ <action function="appenddatetobackupname"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel / Clear</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <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" />
+ <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="template" name="footer" />
+ </page>
+
+ <page name="restore">
+ <object type="template" name="header" />
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col2_x%" y="%zipstorage_text_y%" w="%fileselector_folderonly_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <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">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Select Package to Restore:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Package to Restore: %tw_restore_name%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Package Date: %tw_restore_file_date%</text>
+ </object>
+
+ <object type="partitionlist">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%backup_list_x%" y="%restore_list_y%" w="%backup_list_width%" h="%restore_list_height%" />
+ <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%" />
+ <text>Select Partitions to Restore:</text>
+ <icon selected="checkbox_true" unselected="checkbox_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <data name="tw_restore_list" selectedlist="tw_restore_selected" />
+ <listtype name="restore" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col3_x%" y="%nandcheck_row6%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Backup</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete Backup</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_restore_name%&quot;</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">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">restore_run</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Restore</text>
+ </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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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 &quot;%tw_restore_name%&quot; &quot;%tw_backup_rename%&quot;</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" color="%text_fail_color%">
+ <condition var1="tw_fileexists" var2="1" />
+ <placement x="%center_x%" y="%row5_text_y%" placement="5" />
+ <font resource="font" />
+ <text>A backup with that name already exists!</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>%tw_operation% %tw_partition%</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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Zip file signature verification?</text>
+ <data variable="tw_signed_zip_verify" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use rm -rf instead of formatting?</text>
+ <data variable="tw_rm_rf" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Skip MD5 generation on backups</text>
+ <data variable="tw_skip_md5_generate" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row5_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Enable MD5 checking of backup files</text>
+ <data variable="tw_skip_md5_check" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row6_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Use Military Time</text>
+ <data variable="tw_military_time" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row7_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate most actions for theme testing</text>
+ <data variable="tw_simulate_actions" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <condition var1="tw_simulate_actions" var2="1" />
+ <placement x="%col1_x%" y="%row8_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Simulate failure for actions</text>
+ <data variable="tw_simulate_fail" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Time Zone</text>
+ <image resource="main_button" />
+ <action function="page">timezone</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Screen</text>
+ <image resource="main_button" />
+ <action function="page">screen</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%slider_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Defaults</text>
+ <image resource="main_button" />
+ <action function="restoredefaultsettings"></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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Select Time Zone</text>
+ </object>
+
+ <object type="listbox">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%listbox_x%" y="%listbox_y%" w="%listbox_width%" h="%listbox_tz_height%" />
+ <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%" />
+ <text>Select Time Zone:</text>
+ <icon selected="radio_true" unselected="radio_false" />
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <background color="%listbox_background%" />
+ <font resource="font" spacing="%listbox_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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</listitem>
+ <listitem name="(UTC -7) Mountain Time">MST7;MDT</listitem>
+ <listitem name="(UTC -6) Central Time">CST6;CDT</listitem>
+ <listitem name="(UTC -5) Eastern Time">EST5;EDT</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</listitem>
+ <listitem name="(UTC +1) Berlin, Brussels, Paris">NFT-1;DFT</listitem>
+ <listitem name="(UTC +2) Athens, Istanbul, South Africa">WET-2;WET</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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Do you use daylight savings time (DST)?</text>
+ <data variable="tw_time_zone_guidst" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>Offset (usually 0): %tw_time_zone_guioffset%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>0</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=0</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>15</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=15</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>30</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=30</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_medium_x%" y="%row_offsetmedium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>45</text>
+ <image resource="medium_button" />
+ <action function="set">tw_time_zone_guioffset=45</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Set Time Zone</text>
+ <image resource="main_button" />
+ <action function="setguitimezone"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <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="%slidervalue_x%" y="%row3_text_y%" />
+ <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">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <condition var1="tw_no_screen_timeout" op="!=" var2="1" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <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%" />
+ <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%" />
+ <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%" />
+ <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="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</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="advanced">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Advanced</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Log to SD</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Fix Permissions</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=advanced</action>
+ <action function="set">tw_action=fixpermissions</action>
+ <action function="set">tw_text1=Fix Permissions?</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">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Terminal Command</text>
+ <image resource="main_button" />
+ <action function="page">terminalfolder</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>ADB Sideload</text>
+ <image resource="main_button" />
+ <action function="page">sideload</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_allow_partition_sdcard" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Partition SD Card</text>
+ <image resource="main_button" />
+ <action function="page">partsdcard</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>File Manager</text>
+ <image resource="main_button" />
+ <action function="page">filemanagerlist</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reload Theme</text>
+ <image resource="main_button" />
+ <action function="reload"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>HTC Dumlock</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Partition SD Card</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_sdext_size-128</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row1_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_sdext_size+128</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_extsize_y%" placement="5" />
+ <text>EXT Size: %tw_sdext_size%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="minus_button" />
+ <action function="addsubtract">tw_swap_size-32</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_sdext_x%" y="%row2_sdext_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text></text>
+ <image resource="plus_button" />
+ <action function="addsubtract">tw_swap_size+32</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row_swapsize_y%" placement="5" />
+ <text>Swap Size: %tw_swap_size%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row8_text_y%" placement="5" />
+ <text>File system: %tw_sdpart_file_system%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT3</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext3</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_sdext_disable_ext4" var2="0" />
+ <placement x="%col3_medium_x%" y="%row4_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>EXT4</text>
+ <image resource="medium_button" />
+ <action function="set">tw_sdpart_file_system=ext4</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row13_text_y%" placement="5" />
+ <text>This action cannot be undone!</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm Partition</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>HTC Dumlock</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Restore Original Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col2_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Reflash Recovery->Boot</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_show_dumlock" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Install HTC Dumlock</text>
+ <image resource="main_button" />
+ <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="%lock_x%" y="%lock_y%" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="overlay"></action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Unlock</text>
+ </object>
+ </page>
+
+
+ <page name="filemanagerlist">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>File Manager: Select a File or Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_folder_x%" y="%fileselector_install_y%" w="%fileselector_folder_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>Folders:</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <filter folders="1" files="0" />
+ <path name="tw_file_location1" default="/sdcard" />
+ <data name="select" />
+ <selection name="tw_selection1" />
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%fileselector_file_x%" y="%fileselector_install_y%" w="%fileselector_file_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location1%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_type% Selected:</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Copy Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_filemanager_command=cd &quot;%tw_file_location1%&quot; && cd .. && cp -R</action>
+ <action function="set">tw_fm_text1=Copying</action>
+ <action function="page">choosedestinationfolder</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Move</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod 755</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col4_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>chmod</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="0" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename File</text>
+ <image resource="main_button" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_fm_isfolder" var2="1" />
+ <placement x="%col4_x%" y="%row1_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Rename Folder</text>
+ <image resource="main_button" />
+ <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 &quot;%tw_file_location1%&quot; && 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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Destination Folder & Press Select</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_file_location2%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <icon folder="folder_icon" file="file_icon" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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=&quot;%tw_file_location1%/%tw_filemanager_rename%&quot;</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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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_text_y%" placement="5" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>%tw_fm_text1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>%tw_filename1%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>%tw_fm_text2%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5"/>
+ <text>%tw_fm_text3%</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row10_text_y%" placement="5"/>
+ <text>Press back button to cancel.</text>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <action function="page">filemanageracction</action>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Confirm</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <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% &quot;%tw_filename1%&quot;</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_include_text3" var2="1" />
+ <actions>
+ <action function="cmd">%tw_filemanager_command% &quot;%tw_filename1%&quot; &quot;%tw_fm_text3%&quot;</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <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" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <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="trydecrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Browse to Starting Folder</text>
+ </object>
+
+ <object type="fileselector">
+ <highlight color="%fileselector_highlight_color%" />
+ <placement x="%col2_x%" y="%fileselector_install_y%" w="%fileselector_folderonly_width%" h="%fileselector_install_height%" />
+ <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%" />
+ <text>%tw_terminal_location%</text>
+ <separator color="%fileselector_separatorcolor%" height="%fileselector_separatorheight%" />
+ <sort name="tw_gui_sort_order" />
+ <icon folder="folder_icon" file="file_icon" />
+ <background color="%fileselector_background%" />
+ <font resource="font" spacing="%fileselector_spacing%" color="%text_color%" highlightcolor="%fileselector_highlight_font_color%" />
+ <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">
+ <highlight color="%highlight_color%" />
+ <placement x="%filemanager_select_x%" y="%filemanager_select_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Select Folder</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="terminalcommand">
+ <background color="#000000FF" />
+
+ <object type="console">
+ <placement x="%console_x%" y="%terminal_console_y%" w="%console_width%" h="%terminal_console_height%" />
+ <color foreground="%console_foreground%" background="%console_background%" scroll="%console_scroll%" />
+ <font resource="fixed" />
+ </object>
+
+ <object type="text" color="%text_color%">
+ <placement x="%input_x%" y="%terminal_text_y%" placement="0" />
+ <font resource="font" />
+ <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" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_terminal_command%</text>
+ <data name="tw_terminal_command" />
+ <restrict minlen="1" />
+ <action function="terminalcommand">%tw_terminal_command%</action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <condition var1="tw_terminal_state" var2="1" />
+ <placement x="%filemanager_select_x%" y="%terminal_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>KILL</text>
+ <image resource="medium_button" />
+ <action function="killterminal"></action>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%home_button_x%" y="%terminal_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="%terminal_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="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" color="%text_color%">
+ <font resource="font" />
+ <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%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Dalvik Cache.</text>
+ <data variable="tw_wipe_dalvik" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="checkbox">
+ <placement x="%col1_x%" y="%row4_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <text>Wipe Cache.</text>
+ <data variable="tw_wipe_cache" />
+ <image checked="checkbox_true" unchecked="checkbox_false" />
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Start Sideload</text>
+ </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" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5"/>
+ <text>Install SuperSU?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5"/>
+ <text>Your device does not appear to be rooted.</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row3_text_y%" placement="5"/>
+ <text>Install SuperSU now? This will root your device.</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_medium_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Do Not Install</text>
+ <image resource="main_button" />
+ <action function="set">tw_page_done=1</action>
+ </object>
+
+ <object type="slider">
+ <placement x="%slider_x%" y="%slider_y%" />
+ <resource base="slider" used="slider-used" touch="slider-touch" />
+ <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>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%slider_text_y%" placement="4" />
+ <text>Swipe to Install</text>
+ </object>
+ </page>
+ </pages>
+</recovery>
diff --git a/gui/devices/common/res/images/progress_empty.png b/gui/devices/common/res/images/progress_empty.png
new file mode 100644
index 000000000..b85371014
--- /dev/null
+++ b/gui/devices/common/res/images/progress_empty.png
Binary files differ
diff --git a/gui/devices/common/res/images/progress_fill.png b/gui/devices/common/res/images/progress_fill.png
new file mode 100644
index 000000000..6731dae4a
--- /dev/null
+++ b/gui/devices/common/res/images/progress_fill.png
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-10.dat b/gui/devices/resources/fonts/Roboto-Condensed-10.dat
new file mode 100644
index 000000000..02e869b78
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-10.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-12.dat b/gui/devices/resources/fonts/Roboto-Condensed-12.dat
new file mode 100644
index 000000000..b48c4f213
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-12.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-14.dat b/gui/devices/resources/fonts/Roboto-Condensed-14.dat
new file mode 100644
index 000000000..f7b174cb1
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-14.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-16.dat b/gui/devices/resources/fonts/Roboto-Condensed-16.dat
new file mode 100644
index 000000000..19c11470d
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-16.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-20.dat b/gui/devices/resources/fonts/Roboto-Condensed-20.dat
new file mode 100644
index 000000000..531d5fdaf
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-20.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-25.dat b/gui/devices/resources/fonts/Roboto-Condensed-25.dat
new file mode 100644
index 000000000..7cee713e7
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-25.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-30.dat b/gui/devices/resources/fonts/Roboto-Condensed-30.dat
new file mode 100644
index 000000000..621b33214
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-30.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-40.dat b/gui/devices/resources/fonts/Roboto-Condensed-40.dat
new file mode 100644
index 000000000..ff23add82
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-40.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-50.dat b/gui/devices/resources/fonts/Roboto-Condensed-50.dat
new file mode 100644
index 000000000..ae9c0f64d
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-50.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Condensed-60.dat b/gui/devices/resources/fonts/Roboto-Condensed-60.dat
new file mode 100644
index 000000000..22f9accd1
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Condensed-60.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-10.dat b/gui/devices/resources/fonts/Roboto-Regular-10.dat
new file mode 100644
index 000000000..b1faa7d1c
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-10.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-12.dat b/gui/devices/resources/fonts/Roboto-Regular-12.dat
new file mode 100644
index 000000000..1c9f058c3
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-12.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-14.dat b/gui/devices/resources/fonts/Roboto-Regular-14.dat
new file mode 100644
index 000000000..5a6fff8b9
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-14.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-16.dat b/gui/devices/resources/fonts/Roboto-Regular-16.dat
new file mode 100644
index 000000000..9f6d90005
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-16.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-20.dat b/gui/devices/resources/fonts/Roboto-Regular-20.dat
new file mode 100644
index 000000000..6588b41e7
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-20.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-25.dat b/gui/devices/resources/fonts/Roboto-Regular-25.dat
new file mode 100644
index 000000000..392cce97d
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-25.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-30.dat b/gui/devices/resources/fonts/Roboto-Regular-30.dat
new file mode 100644
index 000000000..9f8082ccc
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-30.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-40.dat b/gui/devices/resources/fonts/Roboto-Regular-40.dat
new file mode 100644
index 000000000..637d9fe5b
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-40.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-50.dat b/gui/devices/resources/fonts/Roboto-Regular-50.dat
new file mode 100644
index 000000000..aecce38f0
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-50.dat
Binary files differ
diff --git a/gui/devices/resources/fonts/Roboto-Regular-60.dat b/gui/devices/resources/fonts/Roboto-Regular-60.dat
new file mode 100644
index 000000000..5840beda2
--- /dev/null
+++ b/gui/devices/resources/fonts/Roboto-Regular-60.dat
Binary files differ
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp
new file mode 100644
index 000000000..0f8d903a3
--- /dev/null
+++ b/gui/fileselector.cpp
@@ -0,0 +1,1020 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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 <linux/input.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <dirent.h>
+#include <ctype.h>
+
+#include <algorithm>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+#include "../twrp-functions.hpp"
+
+#define TW_FILESELECTOR_UP_A_LEVEL "(Up A Level)"
+
+#define SCROLLING_SPEED_DECREMENT 6
+#define SCROLLING_FLOOR 10
+#define SCROLLING_MULTIPLIER 6
+
+int GUIFileSelector::mSortOrder = 0;
+
+GUIFileSelector::GUIFileSelector(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+ int header_separator_color_specified = 0, header_separator_height_specified = 0, header_text_color_specified = 0, header_background_color_specified = 0;
+
+ mStart = mLineSpacing = startY = mFontHeight = mSeparatorH = scrollingY = scrollingSpeed = 0;
+ mIconWidth = mIconHeight = mFolderIconHeight = mFileIconHeight = mFolderIconWidth = mFileIconWidth = mHeaderIconHeight = mHeaderIconWidth = 0;
+ mHeaderSeparatorH = mLineHeight = mHeaderIsStatic = mHeaderH = actualLineHeight = 0;
+ mFolderIcon = mFileIcon = mBackground = mFont = mHeaderIcon = NULL;
+ mBackgroundX = mBackgroundY = mBackgroundW = mBackgroundH = 0;
+ mShowFolders = mShowFiles = mShowNavFolders = 1;
+ mFastScrollW = mFastScrollLineW = mFastScrollRectW = mFastScrollRectH = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ mUpdate = 0;
+ touchDebounce = 6;
+ mPathVar = "cwd";
+ ConvertStrToColor("black", &mBackgroundColor);
+ ConvertStrToColor("black", &mHeaderBackgroundColor);
+ ConvertStrToColor("black", &mSeparatorColor);
+ ConvertStrToColor("black", &mHeaderSeparatorColor);
+ ConvertStrToColor("white", &mFontColor);
+ ConvertStrToColor("white", &mHeaderFontColor);
+ ConvertStrToColor("white", &mFastScrollLineColor);
+ ConvertStrToColor("white", &mFastScrollRectColor);
+ hasHighlightColor = false;
+ hasFontHighlightColor = false;
+ isHighlighted = false;
+ updateFileList = false;
+ startSelection = -1;
+
+ // Load header text
+ child = node->first_node("header");
+ if (child)
+ {
+ attr = child->first_attribute("icon");
+ if (attr)
+ mHeaderIcon = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("background");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ header_background_color_specified = -1;
+ }
+ attr = child->first_attribute("textcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderFontColor);
+ header_text_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ header_separator_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorheight");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mHeaderSeparatorH = atoi(parsevalue.c_str());
+ header_separator_height_specified = -1;
+ }
+ }
+ child = node->first_node("text");
+ if (child) mHeaderText = child->value();
+
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ child = node->first_node("highlight");
+ if (child) {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasHighlightColor = true;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ }
+ }
+
+ // Simple way to check for static state
+ mLastValue = gui_parse_text(mHeaderText);
+ if (mLastValue != mHeaderText)
+ mHeaderIsStatic = 0;
+ else
+ mHeaderIsStatic = -1;
+
+ child = node->first_node("icon");
+ if (child)
+ {
+ attr = child->first_attribute("folder");
+ if (attr)
+ mFolderIcon = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("file");
+ if (attr)
+ mFileIcon = PageManager::FindResource(attr->value());
+ }
+ child = node->first_node("background");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mBackground = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackgroundColor);
+ if (!header_background_color_specified)
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+
+ // Load the font, and possibly override the color
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontColor);
+ if (!header_text_color_specified)
+ ConvertStrToColor(color, &mHeaderFontColor);
+ }
+
+ attr = child->first_attribute("spacing");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mLineSpacing = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("highlightcolor");
+ memset(&mFontHighlightColor, 0, sizeof(COLOR));
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontHighlightColor);
+ hasFontHighlightColor = true;
+ }
+ }
+
+ // Load the separator if it exists
+ child = node->first_node("separator");
+ if (child)
+ {
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mSeparatorColor);
+ if (!header_separator_color_specified)
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ }
+
+ attr = child->first_attribute("height");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mSeparatorH = atoi(parsevalue.c_str());
+ if (!header_separator_height_specified)
+ mHeaderSeparatorH = mSeparatorH;
+ }
+ }
+
+ child = node->first_node("filter");
+ if (child)
+ {
+ attr = child->first_attribute("extn");
+ if (attr)
+ mExtn = attr->value();
+ attr = child->first_attribute("folders");
+ if (attr)
+ mShowFolders = atoi(attr->value());
+ attr = child->first_attribute("files");
+ if (attr)
+ mShowFiles = atoi(attr->value());
+ attr = child->first_attribute("nav");
+ if (attr)
+ mShowNavFolders = atoi(attr->value());
+ }
+
+ // Handle the path variable
+ child = node->first_node("path");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mPathVar = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mPathVar, attr->value());
+ }
+
+ // Handle the result variable
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mVariable = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mVariable, attr->value());
+ }
+
+ // Handle the sort variable
+ child = node->first_node("sort");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mSortVariable = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mSortVariable, attr->value());
+
+ DataManager::GetValue(mSortVariable, mSortOrder);
+ }
+
+ // Handle the selection variable
+ child = node->first_node("selection");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mSelection = attr->value();
+ else
+ mSelection = "0";
+ } else
+ mSelection = "0";
+
+ // Fast scroll colors
+ child = node->first_node("fastscroll");
+ if (child)
+ {
+ attr = child->first_attribute("linecolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollLineColor);
+
+ attr = child->first_attribute("rectcolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollRectColor);
+
+ attr = child->first_attribute("w");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("linew");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollLineW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("rectw");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("recth");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectH = atoi(parsevalue.c_str());
+ }
+ }
+
+ // Retrieve the line height
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, &mFontHeight, NULL);
+ mLineHeight = mFontHeight;
+ mHeaderH = mFontHeight;
+
+ if (mFolderIcon && mFolderIcon->GetResource())
+ {
+ mFolderIconWidth = gr_get_width(mFolderIcon->GetResource());
+ mFolderIconHeight = gr_get_height(mFolderIcon->GetResource());
+ if (mFolderIconHeight > (int)mLineHeight)
+ mLineHeight = mFolderIconHeight;
+ mIconWidth = mFolderIconWidth;
+ }
+
+ if (mFileIcon && mFileIcon->GetResource())
+ {
+ mFileIconWidth = gr_get_width(mFileIcon->GetResource());
+ mFileIconHeight = gr_get_height(mFileIcon->GetResource());
+ if (mFileIconHeight > (int)mLineHeight)
+ mLineHeight = mFileIconHeight;
+ if (mFileIconWidth > mIconWidth)
+ mIconWidth = mFileIconWidth;
+ }
+
+ if (mHeaderIcon && mHeaderIcon->GetResource())
+ {
+ mHeaderIconWidth = gr_get_width(mHeaderIcon->GetResource());
+ mHeaderIconHeight = gr_get_height(mHeaderIcon->GetResource());
+ if (mHeaderIconHeight > mHeaderH)
+ mHeaderH = mHeaderIconHeight;
+ if (mHeaderIconWidth > mIconWidth)
+ mIconWidth = mHeaderIconWidth;
+ }
+
+ mHeaderH += mLineSpacing + mHeaderSeparatorH;
+ actualLineHeight = mLineHeight + mLineSpacing + mSeparatorH;
+ if (mHeaderH < actualLineHeight)
+ mHeaderH = actualLineHeight;
+
+ if (actualLineHeight / 3 > 6)
+ touchDebounce = actualLineHeight / 3;
+
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundW = gr_get_width(mBackground->GetResource());
+ mBackgroundH = gr_get_height(mBackground->GetResource());
+ }
+
+ // Fetch the file/folder list
+ std::string value;
+ DataManager::GetValue(mPathVar, value);
+ GetFileList(value);
+}
+
+GUIFileSelector::~GUIFileSelector()
+{
+}
+
+int GUIFileSelector::Render(void)
+{
+ // First step, fill background
+ gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY + mHeaderH, mRenderW, mRenderH - mHeaderH);
+
+ // Next, render the background resource (if it exists)
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundX = mRenderX + ((mRenderW - mBackgroundW) / 2);
+ mBackgroundY = mRenderY + ((mRenderH - mBackgroundH) / 2);
+ gr_blit(mBackground->GetResource(), 0, 0, mBackgroundW, mBackgroundH, mBackgroundX, mBackgroundY);
+ }
+
+ // Update the file list if needed
+ if (updateFileList) {
+ string value;
+ DataManager::GetValue(mPathVar, value);
+ if (GetFileList(value) == 0)
+ updateFileList = false;
+ else
+ return 0;
+ }
+
+ // This tells us how many lines we can actually render
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ int line;
+
+ int folderSize = mShowFolders ? mFolderList.size() : 0;
+ int fileSize = mShowFiles ? mFileList.size() : 0;
+
+ int listW = mRenderW;
+
+ if (folderSize + fileSize < lines) {
+ lines = folderSize + fileSize;
+ scrollingY = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ } else {
+ listW -= mFastScrollW; // space for fast scroll
+ lines++;
+ if (lines < folderSize + fileSize)
+ lines++;
+ }
+
+ void* fontResource = NULL;
+ if (mFont) fontResource = mFont->GetResource();
+
+ int yPos = mRenderY + mHeaderH + scrollingY;
+ int fontOffsetY = (int)((actualLineHeight - mFontHeight) / 2);
+ int currentIconHeight = 0, currentIconWidth = 0;
+ int currentIconOffsetY = 0, currentIconOffsetX = 0;
+ int folderIconOffsetY = (int)((actualLineHeight - mFolderIconHeight) / 2), fileIconOffsetY = (int)((actualLineHeight - mFileIconHeight) / 2);
+ int folderIconOffsetX = (mIconWidth - mFolderIconWidth) / 2, fileIconOffsetX = (mIconWidth - mFileIconWidth) / 2;
+ int actualSelection = mStart;
+
+ if (isHighlighted) {
+ int selectY = scrollingY;
+
+ // Locate the correct line for highlighting
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+ if (hasHighlightColor) {
+ // Highlight the area
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, 255);
+ int HighlightHeight = actualLineHeight;
+ if (mRenderY + mHeaderH + selectY + actualLineHeight > mRenderH + mRenderY) {
+ HighlightHeight = actualLineHeight - (mRenderY + mHeaderH + selectY + actualLineHeight - mRenderH - mRenderY);
+ }
+ gr_fill(mRenderX, mRenderY + mHeaderH + selectY, mRenderW, HighlightHeight);
+ }
+ }
+
+ for (line = 0; line < lines; line++)
+ {
+ Resource* icon;
+ std::string label;
+
+ if (isHighlighted && hasFontHighlightColor && line + mStart == actualSelection) {
+ // Use the highlight color for the font
+ gr_color(mFontHighlightColor.red, mFontHighlightColor.green, mFontHighlightColor.blue, 255);
+ } else {
+ // Set the color for the font
+ gr_color(mFontColor.red, mFontColor.green, mFontColor.blue, 255);
+ }
+
+ if (line + mStart < folderSize)
+ {
+ icon = mFolderIcon;
+ label = mFolderList.at(line + mStart).fileName;
+ currentIconHeight = mFolderIconHeight;
+ currentIconWidth = mFolderIconWidth;
+ currentIconOffsetY = folderIconOffsetY;
+ currentIconOffsetX = folderIconOffsetX;
+ }
+ else if (line + mStart < folderSize + fileSize)
+ {
+ icon = mFileIcon;
+ label = mFileList.at((line + mStart) - folderSize).fileName;
+ currentIconHeight = mFileIconHeight;
+ currentIconWidth = mFileIconWidth;
+ currentIconOffsetY = fileIconOffsetY;
+ currentIconOffsetX = fileIconOffsetX;
+ } else {
+ continue;
+ }
+
+ if (icon && icon->GetResource())
+ {
+ int rect_y = 0, image_y = (yPos + currentIconOffsetY);
+ if (image_y + currentIconHeight > mRenderY + mRenderH)
+ rect_y = mRenderY + mRenderH - image_y;
+ else
+ rect_y = currentIconHeight;
+ gr_blit(icon->GetResource(), 0, 0, currentIconWidth, rect_y, mRenderX + currentIconOffsetX, image_y);
+ }
+ gr_textExWH(mRenderX + mIconWidth + 5, yPos + fontOffsetY, label.c_str(), fontResource, mRenderX + listW, mRenderY + mRenderH);
+
+ // Add the separator
+ if (yPos + actualLineHeight < mRenderH + mRenderY) {
+ gr_color(mSeparatorColor.red, mSeparatorColor.green, mSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + actualLineHeight - mSeparatorH, listW, mSeparatorH);
+ }
+
+ // Move the yPos
+ yPos += actualLineHeight;
+ }
+
+ // Render the Header (last so that it overwrites the top most row for per pixel scrolling)
+ // First step, fill background
+ gr_color(mHeaderBackgroundColor.red, mHeaderBackgroundColor.green, mHeaderBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY, mRenderW, mHeaderH);
+
+ // Now, we need the header (icon + text)
+ yPos = mRenderY;
+ {
+ Resource* headerIcon;
+ int mIconOffsetX = 0;
+
+ // render the icon if it exists
+ headerIcon = mHeaderIcon;
+ if (headerIcon && headerIcon->GetResource())
+ {
+ gr_blit(headerIcon->GetResource(), 0, 0, mHeaderIconWidth, mHeaderIconHeight, mRenderX + ((mHeaderIconWidth - mIconWidth) / 2), (yPos + (int)((mHeaderH - mHeaderIconHeight) / 2)));
+ mIconOffsetX = mIconWidth;
+ }
+
+ // render the text
+ gr_color(mHeaderFontColor.red, mHeaderFontColor.green, mHeaderFontColor.blue, 255);
+ gr_textExWH(mRenderX + mIconOffsetX + 5, yPos + (int)((mHeaderH - mFontHeight) / 2), mLastValue.c_str(), fontResource, mRenderX + mRenderW, mRenderY + mRenderH);
+
+ // Add the separator
+ gr_color(mHeaderSeparatorColor.red, mHeaderSeparatorColor.green, mHeaderSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + mHeaderH - mHeaderSeparatorH, mRenderW, mHeaderSeparatorH);
+ }
+
+ // render fast scroll
+ lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ if(mFastScrollW > 0 && folderSize + fileSize > lines)
+ {
+ int startX = listW + mRenderX;
+ int fWidth = mRenderW - listW;
+ int fHeight = mRenderH - mHeaderH;
+
+ // line
+ gr_color(mFastScrollLineColor.red, mFastScrollLineColor.green, mFastScrollLineColor.blue, 255);
+ gr_fill(startX + fWidth/2, mRenderY + mHeaderH, mFastScrollLineW, mRenderH - mHeaderH);
+
+ // rect
+ int pct = ((mStart*actualLineHeight - scrollingY)*100)/((folderSize + fileSize)*actualLineHeight-lines*actualLineHeight);
+ mFastScrollRectX = startX + (fWidth - mFastScrollRectW)/2;
+ mFastScrollRectY = mRenderY+mHeaderH + ((fHeight - mFastScrollRectH)*pct)/100;
+
+ gr_color(mFastScrollRectColor.red, mFastScrollRectColor.green, mFastScrollRectColor.blue, 255);
+ gr_fill(mFastScrollRectX, mFastScrollRectY, mFastScrollRectW, mFastScrollRectH);
+ }
+
+ // If a change came in during the render then we need to do another redraw so leave mUpdate alone if updateFileList is true.
+ if (!updateFileList) {
+ mUpdate = 0;
+ }
+ return 0;
+}
+
+int GUIFileSelector::Update(void)
+{
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mUpdate = 1;
+ }
+ }
+
+ if (mUpdate)
+ {
+ mUpdate = 0;
+ if (Render() == 0)
+ return 2;
+ }
+
+ // Handle kinetic scrolling
+ if (scrollingSpeed == 0) {
+ // Do nothing
+ } else if (scrollingSpeed > 0) {
+ if (scrollingSpeed < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY += ((int) (actualLineHeight * 2.5));
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0) {
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ } else if (scrollingSpeed < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ } else if (scrollingSpeed < 0) {
+ int totalSize = (mShowFolders ? mFolderList.size() : 0) + (mShowFiles ? mFileList.size() : 0);
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ if (abs(scrollingSpeed) < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY -= ((int) (actualLineHeight * 2.5));
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ } else if (scrollingSpeed * -1 < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+
+ return 0;
+}
+
+int GUIFileSelector::GetSelection(int x, int y)
+{
+ // We only care about y position
+ if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH)
+ return -1;
+
+ return (y - mRenderY - mHeaderH);
+}
+
+int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int lastY = 0, last2Y = 0;
+ int selection = 0;
+
+ switch (state)
+ {
+ case TOUCH_START:
+ if (scrollingSpeed != 0)
+ startSelection = -1;
+ else
+ startSelection = GetSelection(x,y);
+ isHighlighted = (startSelection > -1);
+ if (isHighlighted)
+ mUpdate = 1;
+ startY = lastY = last2Y = y;
+ scrollingSpeed = 0;
+ break;
+ case TOUCH_DRAG:
+ // Check if we dragged out of the selection window
+ if (GetSelection(x, y) == -1) {
+ last2Y = lastY = 0;
+ if (isHighlighted) {
+ isHighlighted = false;
+ mUpdate = 1;
+ }
+ break;
+ }
+
+ // Fast scroll
+ if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW)
+ {
+ int pct = ((y-mRenderY-mHeaderH)*100)/(mRenderH-mHeaderH);
+ int totalSize = (mShowFolders ? mFolderList.size() : 0) + (mShowFiles ? mFileList.size() : 0);
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ float l = float((totalSize-lines)*pct)/100;
+ if(l + lines >= totalSize)
+ {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ else
+ {
+ mStart = l;
+ scrollingY = -(l - int(l))*actualLineHeight;
+ }
+
+ startSelection = -1;
+ mUpdate = 1;
+ scrollingSpeed = 0;
+ isHighlighted = false;
+ break;
+ }
+
+ // Provide some debounce on initial touches
+ if (startSelection != -1 && abs(y - startY) < touchDebounce) {
+ isHighlighted = true;
+ mUpdate = 1;
+ break;
+ }
+
+ isHighlighted = false;
+ last2Y = lastY;
+ lastY = y;
+ startSelection = -1;
+
+ // Handle scrolling
+ scrollingY += y - startY;
+ startY = y;
+ while(mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0)
+ scrollingY = 0;
+ {
+ int totalSize = (mShowFolders ? mFolderList.size() : 0) + (mShowFiles ? mFileList.size() : 0);
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ } else
+ scrollingY = 0;
+ }
+ mUpdate = 1;
+ break;
+
+ case TOUCH_RELEASE:
+ isHighlighted = false;
+ if (startSelection >= 0)
+ {
+ // We've selected an item!
+ std::string str;
+
+ int folderSize = mShowFolders ? mFolderList.size() : 0;
+ int fileSize = mShowFiles ? mFileList.size() : 0;
+ int selectY = scrollingY, actualSelection = mStart;
+
+ // Move the selection to the proper place in the array
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+ startSelection = actualSelection;
+
+ if (startSelection < folderSize + fileSize)
+ {
+ if (startSelection < folderSize)
+ {
+ std::string oldcwd;
+ std::string cwd;
+
+ str = mFolderList.at(startSelection).fileName;
+ if (mSelection != "0")
+ DataManager::SetValue(mSelection, str);
+ DataManager::GetValue(mPathVar, cwd);
+
+ oldcwd = cwd;
+ // Ignore requests to do nothing
+ if (str == ".") return 0;
+ if (str == TW_FILESELECTOR_UP_A_LEVEL)
+ {
+ if (cwd != "/")
+ {
+ size_t found;
+ found = cwd.find_last_of('/');
+ cwd = cwd.substr(0,found);
+
+ if (cwd.length() < 2) cwd = "/";
+ }
+ }
+ else
+ {
+ // Add a slash if we're not the root folder
+ if (cwd != "/") cwd += "/";
+ cwd += str;
+ }
+
+ if (mShowNavFolders == 0 && mShowFiles == 0)
+ {
+ // This is a "folder" selection
+ DataManager::SetValue(mVariable, cwd);
+ }
+ else
+ {
+ DataManager::SetValue(mPathVar, cwd);
+ mStart = 0;
+ scrollingY = 0;
+ mUpdate = 1;
+ }
+ }
+ else if (!mVariable.empty())
+ {
+ str = mFileList.at(startSelection - folderSize).fileName;
+ if (mSelection != "0")
+ DataManager::SetValue(mSelection, str);
+
+ std::string cwd;
+ DataManager::GetValue(mPathVar, cwd);
+ if (cwd != "/") cwd += "/";
+ DataManager::SetValue(mVariable, cwd + str);
+ }
+ }
+ } else {
+ // This is for kinetic scrolling
+ scrollingSpeed = lastY - last2Y;
+ if (abs(scrollingSpeed) > SCROLLING_FLOOR)
+ scrollingSpeed *= SCROLLING_MULTIPLIER;
+ else
+ scrollingSpeed = 0;
+ }
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
+
+int GUIFileSelector::NotifyVarChange(std::string varName, std::string value)
+{
+ if (varName.empty()) {
+ // Always clear the data variable so we know to use it
+ DataManager::SetValue(mVariable, "");
+ }
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mStart = 0;
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+ if (varName == mPathVar || varName == mSortVariable)
+ {
+ if (varName == mSortVariable) {
+ DataManager::GetValue(mSortVariable, mSortOrder);
+ }
+ updateFileList = true;
+ mStart = 0;
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ return 0;
+ }
+ return 0;
+}
+
+int GUIFileSelector::SetRenderPos(int x, int y, int w /* = 0 */, int h /* = 0 */)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = w;
+ mRenderH = h;
+ }
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ mUpdate = 1;
+ return 0;
+}
+
+bool GUIFileSelector::fileSort(FileData d1, FileData d2)
+{
+ if (d1.fileName == ".")
+ return -1;
+ if (d2.fileName == ".")
+ return 0;
+ if (d1.fileName == TW_FILESELECTOR_UP_A_LEVEL)
+ return -1;
+ if (d2.fileName == TW_FILESELECTOR_UP_A_LEVEL)
+ return 0;
+
+ switch (mSortOrder) {
+ case 3: // by size largest first
+ if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
+ return d1.fileSize < d2.fileSize;
+ case -3: // by size smallest first
+ if (d1.fileSize == d2.fileSize || d1.fileType == DT_DIR) // some directories report a different size than others - but this is not the size of the files inside the directory, so we just sort by name on directories
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
+ return d1.fileSize > d2.fileSize;
+ case 2: // by last modified date newest first
+ if (d1.lastModified == d2.lastModified)
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
+ return d1.lastModified < d2.lastModified;
+ case -2: // by date oldest first
+ if (d1.lastModified == d2.lastModified)
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
+ return d1.lastModified > d2.lastModified;
+ case -1: // by name descending
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) > 0);
+ default: // should be a 1 - sort by name ascending
+ return (strcasecmp(d1.fileName.c_str(), d2.fileName.c_str()) < 0);
+ }
+}
+
+int GUIFileSelector::GetFileList(const std::string folder)
+{
+ DIR* d;
+ struct dirent* de;
+ struct stat st;
+
+ // Clear all data
+ mFolderList.clear();
+ mFileList.clear();
+
+ d = opendir(folder.c_str());
+ if (d == NULL)
+ {
+ LOGINFO("Unable to open '%s'\n", folder.c_str());
+ if (folder != "/" && (mShowNavFolders != 0 || mShowFiles != 0)) {
+ size_t found;
+ found = folder.find_last_of('/');
+ if (found != string::npos) {
+ string new_folder = folder.substr(0, found);
+
+ if (new_folder.length() < 2)
+ new_folder = "/";
+ DataManager::SetValue(mPathVar, new_folder);
+ }
+ }
+ return -1;
+ }
+
+ while ((de = readdir(d)) != NULL)
+ {
+ FileData data;
+
+ data.fileName = de->d_name;
+ if (data.fileName == ".")
+ continue;
+ if (data.fileName == ".." && folder == "/")
+ continue;
+ if (data.fileName == "..") {
+ data.fileName = TW_FILESELECTOR_UP_A_LEVEL;
+ data.fileType = DT_DIR;
+ } else {
+ data.fileType = de->d_type;
+ }
+
+ std::string path = folder + "/" + data.fileName;
+ stat(path.c_str(), &st);
+ data.protection = st.st_mode;
+ data.userId = st.st_uid;
+ data.groupId = st.st_gid;
+ data.fileSize = st.st_size;
+ data.lastAccess = st.st_atime;
+ data.lastModified = st.st_mtime;
+ data.lastStatChange = st.st_ctime;
+
+ if (data.fileType == DT_UNKNOWN) {
+ data.fileType = TWFunc::Get_D_Type_From_Stat(path);
+ }
+ if (data.fileType == DT_DIR)
+ {
+ if (mShowNavFolders || (data.fileName != "." && data.fileName != TW_FILESELECTOR_UP_A_LEVEL))
+ mFolderList.push_back(data);
+ }
+ else if (data.fileType == DT_REG || data.fileType == DT_LNK || data.fileType == DT_BLK)
+ {
+ if (mExtn.empty() || (data.fileName.length() > mExtn.length() && data.fileName.substr(data.fileName.length() - mExtn.length()) == mExtn))
+ {
+ mFileList.push_back(data);
+ }
+ }
+ }
+ closedir(d);
+
+ std::sort(mFolderList.begin(), mFolderList.end(), fileSort);
+ std::sort(mFileList.begin(), mFileList.end(), fileSort);
+
+ return 0;
+}
+
+void GUIFileSelector::SetPageFocus(int inFocus)
+{
+ if (inFocus)
+ {
+ updateFileList = true;
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+}
diff --git a/gui/fill.cpp b/gui/fill.cpp
new file mode 100644
index 000000000..ad1f4e075
--- /dev/null
+++ b/gui/fill.cpp
@@ -0,0 +1,57 @@
+// fill.cpp - GUIFill object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIFill::GUIFill(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ if (!node)
+ return;
+
+ attr = node->first_attribute("color");
+ if (!attr) {
+ LOGERR("No color specified for fill\n");
+ return;
+ }
+
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mColor);
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
+
+ return;
+}
+
+int GUIFill::Render(void)
+{
+ gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha);
+ gr_fill(mRenderX, mRenderY, mRenderW, mRenderH);
+ return 0;
+}
+
diff --git a/gui/gui.cpp b/gui/gui.cpp
new file mode 100644
index 000000000..e9efc1db9
--- /dev/null
+++ b/gui/gui.cpp
@@ -0,0 +1,763 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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 <linux/input.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/mount.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+extern "C"
+{
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+#include <pixelflinger/pixelflinger.h>
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+#include "../variables.h"
+#include "../partitions.hpp"
+#include "../twrp-functions.hpp"
+#ifndef TW_NO_SCREEN_TIMEOUT
+#include "blanktimer.hpp"
+#endif
+
+const static int CURTAIN_FADE = 32;
+
+using namespace rapidxml;
+
+// Global values
+static gr_surface gCurtain = NULL;
+static int gGuiInitialized = 0;
+static int gGuiConsoleRunning = 0;
+static int gGuiConsoleTerminate = 0;
+static int gForceRender = 0;
+pthread_mutex_t gForceRendermutex;
+static int gNoAnimation = 1;
+static int gGuiInputRunning = 0;
+#ifndef TW_NO_SCREEN_TIMEOUT
+blanktimer blankTimer;
+#endif
+
+// Needed by pages.cpp too
+int gGuiRunning = 0;
+
+static int gRecorder = -1;
+
+extern "C" void gr_write_frame_to_file(int fd);
+
+void flip(void)
+{
+ if (gRecorder != -1)
+ {
+ timespec time;
+ clock_gettime(CLOCK_MONOTONIC, &time);
+ write(gRecorder, &time, sizeof(timespec));
+ gr_write_frame_to_file(gRecorder);
+ }
+ gr_flip();
+}
+
+void rapidxml::parse_error_handler(const char *what, void *where)
+{
+ fprintf(stderr, "Parser error: %s\n", what);
+ fprintf(stderr, " Start of string: %s\n",(char *) where);
+ LOGERR("Error parsing XML file.\n");
+ //abort();
+}
+
+static void curtainSet()
+{
+ gr_color(0, 0, 0, 255);
+ gr_fill(0, 0, gr_fb_width(), gr_fb_height());
+ gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain), gr_get_height(gCurtain), 0, 0);
+ gr_flip();
+}
+
+static void curtainRaise(gr_surface surface)
+{
+ int sy = 0;
+ int h = gr_get_height(gCurtain) - 1;
+ int w = gr_get_width(gCurtain);
+ int fy = 1;
+
+ int msw = gr_get_width(surface);
+ int msh = gr_get_height(surface);
+ int CURTAIN_RATE = msh / 30;
+
+ if (gNoAnimation == 0)
+ {
+ for (; h > 0; h -= CURTAIN_RATE, sy += CURTAIN_RATE, fy += CURTAIN_RATE)
+ {
+ gr_blit(surface, 0, 0, msw, msh, 0, 0);
+ gr_blit(gCurtain, 0, sy, w, h, 0, 0);
+ gr_flip();
+ }
+ }
+ gr_blit(surface, 0, 0, msw, msh, 0, 0);
+ flip();
+}
+
+void curtainClose()
+{
+#if 0
+ int w = gr_get_width(gCurtain);
+ int h = 1;
+ int sy = gr_get_height(gCurtain) - 1;
+ int fbh = gr_fb_height();
+ int CURTAIN_RATE = fbh / 30;
+
+ if (gNoAnimation == 0)
+ {
+ for (; h < fbh; h += CURTAIN_RATE, sy -= CURTAIN_RATE)
+ {
+ gr_blit(gCurtain, 0, sy, w, h, 0, 0);
+ gr_flip();
+ }
+ gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain),
+ gr_get_height(gCurtain), 0, 0);
+ gr_flip();
+
+ if (gRecorder != -1)
+ close(gRecorder);
+
+ int fade;
+ for (fade = 16; fade < 255; fade += CURTAIN_FADE)
+ {
+ gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain),
+ gr_get_height(gCurtain), 0, 0);
+ gr_color(0, 0, 0, fade);
+ gr_fill(0, 0, gr_fb_width(), gr_fb_height());
+ gr_flip();
+ }
+ gr_color(0, 0, 0, 255);
+ gr_fill(0, 0, gr_fb_width(), gr_fb_height());
+ gr_flip();
+ }
+#else
+ gr_blit(gCurtain, 0, 0, gr_get_width(gCurtain), gr_get_height(gCurtain), 0, 0);
+ gr_flip();
+#endif
+}
+
+static void * input_thread(void *cookie)
+{
+
+ int drag = 0;
+ static int touch_and_hold = 0, dontwait = 0;
+ static int touch_repeat = 0, key_repeat = 0;
+ static int x = 0, y = 0;
+ static int lshift = 0, rshift = 0;
+ static struct timeval touchStart;
+ HardwareKeyboard kb;
+ string seconds;
+
+#ifndef TW_NO_SCREEN_TIMEOUT
+ //start screen timeout threads
+ blankTimer.setTimerThread();
+ DataManager::GetValue("tw_screen_timeout_secs", seconds);
+ blankTimer.setTime(atoi(seconds.c_str()));
+#else
+ LOGINFO("Skipping screen timeout threads: TW_NO_SCREEN_TIMEOUT is set\n");
+#endif
+
+ for (;;)
+ {
+ // wait for the next event
+ struct input_event ev;
+ int state = 0, ret = 0;
+
+ ret = ev_get(&ev, dontwait);
+
+ if (ret < 0)
+ {
+ struct timeval curTime;
+ gettimeofday(&curTime, NULL);
+ long mtime, seconds, useconds;
+
+ seconds = curTime.tv_sec - touchStart.tv_sec;
+ useconds = curTime.tv_usec - touchStart.tv_usec;
+
+ mtime = ((seconds) * 1000 + useconds / 1000.0) + 0.5;
+ if (touch_and_hold && mtime > 500)
+ {
+ touch_and_hold = 0;
+ touch_repeat = 1;
+ gettimeofday(&touchStart, NULL);
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_HOLD: %d,%d\n", x, y);
+#endif
+ PageManager::NotifyTouch(TOUCH_HOLD, x, y);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ else if (touch_repeat && mtime > 100)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_REPEAT: %d,%d\n", x, y);
+#endif
+ gettimeofday(&touchStart, NULL);
+ PageManager::NotifyTouch(TOUCH_REPEAT, x, y);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ else if (key_repeat == 1 && mtime > 500)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("KEY_HOLD: %d,%d\n", x, y);
+#endif
+ gettimeofday(&touchStart, NULL);
+ key_repeat = 2;
+ kb.KeyRepeat();
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+
+ }
+ else if (key_repeat == 2 && mtime > 100)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("KEY_REPEAT: %d,%d\n", x, y);
+#endif
+ gettimeofday(&touchStart, NULL);
+ kb.KeyRepeat();
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ }
+ else if (ev.type == EV_ABS)
+ {
+
+ x = ev.value >> 16;
+ y = ev.value & 0xFFFF;
+
+ if (ev.code == 0)
+ {
+ if (state == 0)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_RELEASE: %d,%d\n", x, y);
+#endif
+ PageManager::NotifyTouch(TOUCH_RELEASE, x, y);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ touch_and_hold = 0;
+ touch_repeat = 0;
+ if (!key_repeat)
+ dontwait = 0;
+ }
+ state = 0;
+ drag = 0;
+ }
+ else
+ {
+ if (!drag)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_START: %d,%d\n", x, y);
+#endif
+ if (PageManager::NotifyTouch(TOUCH_START, x, y) > 0)
+ state = 1;
+ drag = 1;
+ touch_and_hold = 1;
+ dontwait = 1;
+ key_repeat = 0;
+ gettimeofday(&touchStart, NULL);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ else
+ {
+ if (state == 0)
+ {
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_DRAG: %d,%d\n", x, y);
+#endif
+ if (PageManager::NotifyTouch(TOUCH_DRAG, x, y) > 0)
+ state = 1;
+ key_repeat = 0;
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ }
+ }
+ }
+ else if (ev.type == EV_KEY)
+ {
+ // Handle key-press here
+#ifdef _EVENT_LOGGING
+ LOGERR("TOUCH_KEY: %d\n", ev.code);
+#endif
+ if (ev.value != 0)
+ {
+ // This is a key press
+ if (kb.KeyDown(ev.code))
+ {
+ key_repeat = 1;
+ touch_and_hold = 0;
+ touch_repeat = 0;
+ dontwait = 1;
+ gettimeofday(&touchStart, NULL);
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ else
+ {
+ key_repeat = 0;
+ touch_and_hold = 0;
+ touch_repeat = 0;
+ dontwait = 0;
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ }
+ else
+ {
+ // This is a key release
+ kb.KeyUp(ev.code);
+ key_repeat = 0;
+ touch_and_hold = 0;
+ touch_repeat = 0;
+ dontwait = 0;
+#ifndef TW_NO_SCREEN_TIMEOUT
+ blankTimer.resetTimerAndUnblank();
+#endif
+ }
+ }
+ }
+ return NULL;
+}
+
+// This special function will return immediately the first time, but then
+// always returns 1/30th of a second (or immediately if called later) from
+// the last time it was called
+static void loopTimer(void)
+{
+ static timespec lastCall;
+ static int initialized = 0;
+
+ if (!initialized)
+ {
+ clock_gettime(CLOCK_MONOTONIC, &lastCall);
+ initialized = 1;
+ return;
+ }
+
+ do
+ {
+ timespec curTime;
+ clock_gettime(CLOCK_MONOTONIC, &curTime);
+
+ timespec diff = TWFunc::timespec_diff(lastCall, curTime);
+
+ // This is really 30 times per second
+ if (diff.tv_sec || diff.tv_nsec > 33333333)
+ {
+ lastCall = curTime;
+ return;
+ }
+
+ // We need to sleep some period time microseconds
+ unsigned int sleepTime = 33333 -(diff.tv_nsec / 1000);
+ usleep(sleepTime);
+ } while (1);
+}
+
+static int runPages(void)
+{
+ // Raise the curtain
+ if (gCurtain != NULL)
+ {
+ gr_surface surface;
+
+ PageManager::Render();
+ gr_get_surface(&surface);
+ curtainRaise(surface);
+ gr_free_surface(surface);
+ }
+
+ gGuiRunning = 1;
+
+ DataManager::SetValue("tw_loaded", 1);
+
+ for (;;)
+ {
+ loopTimer();
+
+ if (!gForceRender)
+ {
+ int ret;
+
+ ret = PageManager::Update();
+ if (ret > 1)
+ PageManager::Render();
+
+ if (ret > 0)
+ flip();
+ }
+ else
+ {
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 0;
+ pthread_mutex_unlock(&gForceRendermutex);
+ PageManager::Render();
+ flip();
+ }
+
+ if (DataManager::GetIntValue("tw_gui_done") != 0)
+ break;
+ }
+
+ gGuiRunning = 0;
+ return 0;
+}
+
+static int runPage(const char *page_name)
+{
+ gui_changePage(page_name);
+
+ // Raise the curtain
+ if (gCurtain != NULL)
+ {
+ gr_surface surface;
+
+ PageManager::Render();
+ gr_get_surface(&surface);
+ curtainRaise(surface);
+ gr_free_surface(surface);
+ }
+
+ gGuiRunning = 1;
+
+ DataManager::SetValue("tw_loaded", 1);
+
+ for (;;)
+ {
+ loopTimer();
+
+ if (!gForceRender)
+ {
+ int ret;
+
+ ret = PageManager::Update();
+ if (ret > 1)
+ PageManager::Render();
+
+ if (ret > 0)
+ flip();
+ }
+ else
+ {
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 0;
+ pthread_mutex_unlock(&gForceRendermutex);
+ PageManager::Render();
+ flip();
+ }
+ if (DataManager::GetIntValue("tw_page_done") != 0)
+ {
+ gui_changePage("main");
+ break;
+ }
+ }
+
+ gGuiRunning = 0;
+ return 0;
+}
+
+int gui_forceRender(void)
+{
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 1;
+ pthread_mutex_unlock(&gForceRendermutex);
+ return 0;
+}
+
+int gui_changePage(std::string newPage)
+{
+ LOGINFO("Set page: '%s'\n", newPage.c_str());
+ PageManager::ChangePage(newPage);
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 1;
+ pthread_mutex_unlock(&gForceRendermutex);
+ return 0;
+}
+
+int gui_changeOverlay(std::string overlay)
+{
+ PageManager::ChangeOverlay(overlay);
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 1;
+ pthread_mutex_unlock(&gForceRendermutex);
+ return 0;
+}
+
+int gui_changePackage(std::string newPackage)
+{
+ PageManager::SelectPackage(newPackage);
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 1;
+ pthread_mutex_unlock(&gForceRendermutex);
+ return 0;
+}
+
+std::string gui_parse_text(string inText)
+{
+ // Copied from std::string GUIText::parseText(void)
+ // This function parses text for DataManager values encompassed by %value% in the XML
+ static int counter = 0;
+ std::string str = inText;
+ size_t pos = 0;
+ size_t next = 0, end = 0;
+
+ while (1)
+ {
+ next = str.find('%', pos);
+ if (next == std::string::npos)
+ return str;
+
+ end = str.find('%', next + 1);
+ if (end == std::string::npos)
+ return str;
+
+ // We have a block of data
+ std::string var = str.substr(next + 1,(end - next) - 1);
+ str.erase(next,(end - next) + 1);
+
+ if (next + 1 == end)
+ str.insert(next, 1, '%');
+ else
+ {
+ std::string value;
+ if (DataManager::GetValue(var, value) == 0)
+ str.insert(next, value);
+ }
+
+ pos = next + 1;
+ }
+}
+
+extern "C" int gui_init(void)
+{
+ int fd;
+
+ gr_init();
+
+ if (res_create_surface("/res/images/curtain.jpg", &gCurtain))
+ {
+ printf
+ ("Unable to locate '/res/images/curtain.jpg'\nDid you set a DEVICE_RESOLUTION in your config files?\n");
+ return -1;
+ }
+
+ curtainSet();
+
+ ev_init();
+ return 0;
+}
+
+extern "C" int gui_loadResources(void)
+{
+ // unlink("/sdcard/video.last");
+ // rename("/sdcard/video.bin", "/sdcard/video.last");
+ // gRecorder = open("/sdcard/video.bin", O_CREAT | O_WRONLY);
+
+ int check = 0;
+ DataManager::GetValue(TW_IS_ENCRYPTED, check);
+ if (check)
+ {
+ if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "decrypt"))
+ {
+ LOGERR("Failed to load base packages.\n");
+ goto error;
+ }
+ else
+ check = 1;
+ }
+
+ if (check == 0 && PageManager::LoadPackage("TWRP", "/script/ui.xml", "main"))
+ {
+ std::string theme_path;
+
+ theme_path = DataManager::GetSettingsStoragePath();
+ if (!PartitionManager.Mount_Settings_Storage(false))
+ {
+ int retry_count = 5;
+ while (retry_count > 0 && !PartitionManager.Mount_Settings_Storage(false))
+ {
+ usleep(500000);
+ retry_count--;
+ }
+
+ if (!PartitionManager.Mount_Settings_Storage(false))
+ {
+ LOGERR("Unable to mount %s during GUI startup.\n",
+ theme_path.c_str());
+ check = 1;
+ }
+ }
+
+ theme_path += "/TWRP/theme/ui.zip";
+ if (check || PageManager::LoadPackage("TWRP", theme_path, "main"))
+ {
+ if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "main"))
+ {
+ LOGERR("Failed to load base packages.\n");
+ goto error;
+ }
+ }
+ }
+
+ // Set the default package
+ PageManager::SelectPackage("TWRP");
+
+ gGuiInitialized = 1;
+ return 0;
+
+error:
+ LOGERR("An internal error has occurred.\n");
+ gGuiInitialized = 0;
+ return -1;
+}
+
+extern "C" int gui_start(void)
+{
+ if (!gGuiInitialized)
+ return -1;
+
+ gGuiConsoleTerminate = 1;
+
+ while (gGuiConsoleRunning)
+ loopTimer();
+
+ // Set the default package
+ PageManager::SelectPackage("TWRP");
+
+ if (!gGuiInputRunning)
+ {
+ // Start by spinning off an input handler.
+ pthread_t t;
+ pthread_create(&t, NULL, input_thread, NULL);
+ gGuiInputRunning = 1;
+ }
+
+ return runPages();
+}
+
+extern "C" int gui_startPage(const char *page_name)
+{
+ if (!gGuiInitialized)
+ return -1;
+
+ gGuiConsoleTerminate = 1;
+
+ while (gGuiConsoleRunning)
+ loopTimer();
+
+ // Set the default package
+ PageManager::SelectPackage("TWRP");
+
+ if (!gGuiInputRunning)
+ {
+ // Start by spinning off an input handler.
+ pthread_t t;
+ pthread_create(&t, NULL, input_thread, NULL);
+ gGuiInputRunning = 1;
+ }
+
+ DataManager::SetValue("tw_page_done", 0);
+ return runPage(page_name);
+}
+
+static void * console_thread(void *cookie)
+{
+ PageManager::SwitchToConsole();
+
+ while (!gGuiConsoleTerminate)
+ {
+ loopTimer();
+
+ if (!gForceRender)
+ {
+ int ret;
+
+ ret = PageManager::Update();
+ if (ret > 1)
+ PageManager::Render();
+
+ if (ret > 0)
+ flip();
+
+ if (ret < 0)
+ LOGERR("An update request has failed.\n");
+ }
+ else
+ {
+ pthread_mutex_lock(&gForceRendermutex);
+ gForceRender = 0;
+ pthread_mutex_unlock(&gForceRendermutex);
+ PageManager::Render();
+ flip();
+ }
+ }
+ gGuiConsoleRunning = 0;
+ return NULL;
+}
+
+extern "C" int gui_console_only(void)
+{
+ if (!gGuiInitialized)
+ return -1;
+
+ gGuiConsoleTerminate = 0;
+ gGuiConsoleRunning = 1;
+
+ // Start by spinning off an input handler.
+ pthread_t t;
+ pthread_create(&t, NULL, console_thread, NULL);
+
+ return 0;
+}
diff --git a/gui/gui.h b/gui/gui.h
new file mode 100644
index 000000000..fc3c0c47a
--- /dev/null
+++ b/gui/gui.h
@@ -0,0 +1,31 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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 _GUI_HEADER
+#define _GUI_HEADER
+
+int gui_console_only();
+int gui_init();
+int gui_loadResources();
+int gui_start();
+int gui_startPage(const char* page_name);
+void gui_print(const char *fmt, ...);
+void gui_print_overwrite(const char *fmt, ...);
+
+#endif // _GUI_HEADER
+
diff --git a/gui/hardwarekeyboard.cpp b/gui/hardwarekeyboard.cpp
new file mode 100644
index 000000000..a5a9987ae
--- /dev/null
+++ b/gui/hardwarekeyboard.cpp
@@ -0,0 +1,62 @@
+// hardwarekeyboard.cpp - HardwareKeyboard object
+// Shell file used for most devices. A custom hardwarekeyboard.cpp is needed for devices with a hardware keyboard.
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+HardwareKeyboard::HardwareKeyboard(void)
+{
+
+}
+
+HardwareKeyboard::~HardwareKeyboard()
+{
+
+}
+
+int HardwareKeyboard::KeyDown(int key_code)
+{
+#ifdef _EVENT_LOGGING
+ LOGERR("HardwareKeyboard::KeyDown %i\n", key_code);
+#endif
+ PageManager::NotifyKey(key_code);
+ return 0; // 0 = no key repeat anything else turns on key repeat
+}
+
+int HardwareKeyboard::KeyUp(int key_code)
+{
+#ifdef _EVENT_LOGGING
+ LOGERR("HardwareKeyboard::KeyUp %i\n", key_code);
+#endif
+ return 0;
+}
+
+int HardwareKeyboard::KeyRepeat(void)
+{
+#ifdef _EVENT_LOGGING
+ LOGERR("HardwareKeyboard::KeyRepeat\n");
+#endif
+ return 0;
+}
diff --git a/gui/image.cpp b/gui/image.cpp
new file mode 100644
index 000000000..31d9418d3
--- /dev/null
+++ b/gui/image.cpp
@@ -0,0 +1,105 @@
+// image.cpp - GUIImage object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIImage::GUIImage(xml_node<>* node) : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mImage = NULL;
+ mHighlightImage = NULL;
+ isHighlighted = false;
+
+ if (!node)
+ return;
+
+ child = node->first_node("image");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mImage = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("highlightresource");
+ if (attr)
+ mHighlightImage = PageManager::FindResource(attr->value());
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, NULL, NULL, &mPlacement);
+
+ if (mImage && mImage->GetResource())
+ {
+ mRenderW = gr_get_width(mImage->GetResource());
+ mRenderH = gr_get_height(mImage->GetResource());
+
+ // Adjust for placement
+ if (mPlacement != TOP_LEFT && mPlacement != BOTTOM_LEFT)
+ {
+ if (mPlacement == CENTER)
+ mRenderX -= (mRenderW / 2);
+ else
+ mRenderX -= mRenderW;
+ }
+ if (mPlacement != TOP_LEFT && mPlacement != TOP_RIGHT)
+ {
+ if (mPlacement == CENTER)
+ mRenderY -= (mRenderH / 2);
+ else
+ mRenderY -= mRenderH;
+ }
+ SetPlacement(TOP_LEFT);
+ }
+
+ return;
+}
+
+int GUIImage::Render(void)
+{
+ if (!isConditionTrue())
+ return 0;
+
+ if (isHighlighted && mHighlightImage && mHighlightImage->GetResource()) {
+ gr_blit(mHighlightImage->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+ return 0;
+ }
+ else if (!mImage || !mImage->GetResource())
+ return -1;
+
+ gr_blit(mImage->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+ return 0;
+}
+
+int GUIImage::SetRenderPos(int x, int y, int w, int h)
+{
+ if (w || h)
+ return -1;
+
+ mRenderX = x;
+ mRenderY = y;
+ return 0;
+}
+
diff --git a/gui/input.cpp b/gui/input.cpp
new file mode 100644
index 000000000..4fd1d0ecf
--- /dev/null
+++ b/gui/input.cpp
@@ -0,0 +1,757 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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/>.
+*/
+
+// input.cpp - GUIInput object
+
+#include <linux/input.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+
+GUIInput::GUIInput(xml_node<>* node)
+ : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mInputText = NULL;
+ mAction = NULL;
+ mBackground = NULL;
+ mCursor = NULL;
+ mFont = NULL;
+ mRendered = false;
+ HasMask = false;
+ DrawCursor = false;
+ isLocalChange = true;
+ HasAllowed = false;
+ HasDisabled = false;
+ skipChars = scrollingX = mFontHeight = mFontY = lastX = 0;
+ mBackgroundX = mBackgroundY = mBackgroundW = mBackgroundH = MinLen = MaxLen = 0;
+ mCursorLocation = -1; // -1 is always the end of the string
+ CursorWidth = 3;
+ ConvertStrToColor("black", &mBackgroundColor);
+ ConvertStrToColor("white", &mCursorColor);
+
+ if (!node)
+ return;
+
+ // Load text directly from the node
+ mInputText = new GUIText(node);
+ // Load action directly from the node
+ mAction = new GUIAction(node);
+
+ if (mInputText->Render() < 0)
+ {
+ delete mInputText;
+ mInputText = NULL;
+ }
+
+ // Load the background
+ child = node->first_node("background");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mBackground = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackgroundColor);
+ }
+ }
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundW = gr_get_width(mBackground->GetResource());
+ mBackgroundH = gr_get_height(mBackground->GetResource());
+ }
+
+ // Load the cursor color
+ child = node->first_node("cursor");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mCursor = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mCursorColor);
+ }
+ attr = child->first_attribute("hasfocus");
+ if (attr)
+ {
+ std::string color = attr->value();
+ SetInputFocus(atoi(color.c_str()));
+ }
+ attr = child->first_attribute("width");
+ if (attr)
+ {
+ std::string cwidth = gui_parse_text(attr->value());
+ CursorWidth = atoi(cwidth.c_str());
+ }
+ }
+ DrawCursor = HasInputFocus;
+
+ // Load the font, and possibly override the color
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr) {
+ mFont = PageManager::FindResource(attr->value());
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, &mFontHeight, NULL);
+ }
+ }
+
+ child = node->first_node("text");
+ if (child) mText = child->value();
+ mLastValue = gui_parse_text(mText);
+
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mVariable = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mVariable, attr->value());
+ attr = child->first_attribute("mask");
+ if (attr) {
+ mMask = attr->value();
+ HasMask = true;
+ }
+ attr = child->first_attribute("maskvariable");
+ if (attr)
+ mMaskVariable = attr->value();
+ else
+ mMaskVariable = mVariable;
+ }
+
+ // Load input restrictions
+ child = node->first_node("restrict");
+ if (child)
+ {
+ attr = child->first_attribute("minlen");
+ if (attr) {
+ std::string attrib = attr->value();
+ MinLen = atoi(attrib.c_str());
+ }
+ attr = child->first_attribute("maxlen");
+ if (attr) {
+ std::string attrib = attr->value();
+ MaxLen = atoi(attrib.c_str());
+ }
+ attr = child->first_attribute("allow");
+ if (attr) {
+ HasAllowed = true;
+ AllowedList = attr->value();
+ }
+ attr = child->first_attribute("disable");
+ if (attr) {
+ HasDisabled = true;
+ DisabledList = attr->value();
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+
+ if (mInputText && mFontHeight && mFontHeight < (unsigned)mRenderH) {
+ mFontY = ((mRenderH - mFontHeight) / 2) + mRenderY;
+ mInputText->SetRenderPos(mRenderX, mFontY);
+ } else
+ mFontY = mRenderY;
+
+ if (mInputText)
+ mInputText->SetMaxWidth(mRenderW);
+
+ isLocalChange = false;
+ HandleTextLocation(-3);
+}
+
+GUIInput::~GUIInput()
+{
+ if (mInputText) delete mInputText;
+ if (mBackground) delete mBackground;
+ if (mCursor) delete mCursor;
+ if (mFont) delete mFont;
+ if (mAction) delete mAction;
+}
+
+int GUIInput::HandleTextLocation(int x)
+{
+ int textWidth;
+ string displayValue, originalValue, insertChar;
+ void* fontResource = NULL;
+
+ if (mFont)
+ fontResource = mFont->GetResource();
+
+ DataManager::GetValue(mVariable, originalValue);
+ displayValue = originalValue;
+ if (HasMask) {
+ int index, string_size = displayValue.size();
+ string maskedValue;
+ for (index=0; index<string_size; index++)
+ maskedValue += mMask;
+ displayValue = maskedValue;
+ }
+ textWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ if (textWidth <= mRenderW) {
+ lastX = x;
+ scrollingX = 0;
+ skipChars = 0;
+ mInputText->SkipCharCount(skipChars);
+ mRendered = false;
+ return 0;
+ }
+
+ if (skipChars && skipChars < displayValue.size())
+ displayValue.erase(0, skipChars);
+
+ textWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ mRendered = false;
+
+ int deltaX, deltaText, newWidth;
+
+ if (x < -1000) {
+ // No change in scrolling
+ if (x == -1003)
+ mCursorLocation = -1;
+
+ if (mCursorLocation == -1) {
+ displayValue = originalValue;
+ skipChars = 0;
+ textWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ while (textWidth > mRenderW) {
+ displayValue.erase(0, 1);
+ skipChars++;
+ textWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ }
+ scrollingX = mRenderW - textWidth;
+ mInputText->SkipCharCount(skipChars);
+ } else if (x == -1001) {
+ // Added a new character
+ int adjust_scrollingX = 0;
+ string cursorLocate;
+
+ cursorLocate = displayValue;
+ cursorLocate.resize(mCursorLocation);
+ textWidth = gr_measureEx(cursorLocate.c_str(), fontResource);
+ while (textWidth > mRenderW) {
+ skipChars++;
+ mCursorLocation--;
+ cursorLocate.erase(0, 1);
+ textWidth = gr_measureEx(cursorLocate.c_str(), fontResource);
+ adjust_scrollingX = -1;
+ }
+ if (adjust_scrollingX) {
+ scrollingX = mRenderW - textWidth;
+ if (scrollingX < 0)
+ scrollingX = 0;
+ }
+ mInputText->SkipCharCount(skipChars);
+ } else if (x == -1002) {
+ // Deleted a character
+ while (-1) {
+ if (skipChars == 0) {
+ scrollingX = 0;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ }
+ insertChar = originalValue.substr(skipChars - 1, 1);
+ displayValue.insert(0, insertChar);
+ newWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ deltaText = newWidth - textWidth;
+ if (newWidth > mRenderW) {
+ scrollingX = mRenderW - textWidth;
+ if (scrollingX < 0)
+ scrollingX = 0;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ } else {
+ textWidth = newWidth;
+ skipChars--;
+ mCursorLocation++;
+ }
+ }
+ } else
+ LOGINFO("GUIInput::HandleTextLocation -> We really shouldn't ever get here...\n");
+ } else if (x > lastX) {
+ // Dragging to right, scrolling left
+ while (-1) {
+ deltaX = x - lastX + scrollingX;
+ if (skipChars == 0 || deltaX == 0) {
+ scrollingX = 0;
+ lastX = x;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ }
+ insertChar = originalValue.substr(skipChars - 1, 1);
+ displayValue.insert(0, insertChar);
+ newWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ deltaText = newWidth - textWidth;
+ if (deltaText < deltaX) {
+ lastX += deltaText;
+ textWidth = newWidth;
+ skipChars--;
+ } else {
+ scrollingX = deltaX;
+ lastX = x;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ }
+ }
+ } else if (x < lastX) {
+ // Dragging to left, scrolling right
+ if (textWidth <= mRenderW) {
+ lastX = x;
+ scrollingX = mRenderW - textWidth;
+ return 0;
+ }
+ if (scrollingX) {
+ deltaX = lastX - x;
+ if (scrollingX > deltaX) {
+ scrollingX -= deltaX;
+ lastX = x;
+ return 0;
+ } else {
+ lastX -= deltaX;
+ scrollingX = 0;
+ }
+ }
+ while (-1) {
+ deltaX = lastX - x;
+ displayValue.erase(0, 1);
+ skipChars++;
+ newWidth = gr_measureEx(displayValue.c_str(), fontResource);
+ deltaText = textWidth - newWidth;
+ if (newWidth <= mRenderW) {
+ scrollingX = mRenderW - newWidth;
+ lastX = x;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ }
+ if (deltaText < deltaX) {
+ lastX -= deltaText;
+ textWidth = newWidth;
+ } else {
+ scrollingX = deltaText - deltaX;
+ lastX = x;
+ mInputText->SkipCharCount(skipChars);
+ return 0;
+ }
+ }
+ }
+ return 0;
+}
+
+int GUIInput::Render(void)
+{
+ if (!isConditionTrue())
+ {
+ mRendered = false;
+ return 0;
+ }
+
+ void* fontResource = NULL;
+ if (mFont) fontResource = mFont->GetResource();
+
+ // First step, fill background
+ gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY, mRenderW, mRenderH);
+
+ // Next, render the background resource (if it exists)
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundX = mRenderX + ((mRenderW - mBackgroundW) / 2);
+ mBackgroundY = mRenderY + ((mRenderH - mBackgroundH) / 2);
+ gr_blit(mBackground->GetResource(), 0, 0, mBackgroundW, mBackgroundH, mBackgroundX, mBackgroundY);
+ }
+
+ int ret = 0;
+
+ // Render the text
+ mInputText->SetRenderPos(mRenderX + scrollingX, mFontY);
+ mInputText->SetMaxWidth(mRenderW - scrollingX);
+ if (mInputText) ret = mInputText->Render();
+ if (ret < 0) return ret;
+
+ if (HasInputFocus && DrawCursor) {
+ // Render the cursor
+ string displayValue;
+ int cursorX;
+ DataManager::GetValue(mVariable, displayValue);
+ if (HasMask) {
+ int index, string_size = displayValue.size();
+ string maskedValue;
+ for (index=0; index<string_size; index++)
+ maskedValue += mMask;
+ displayValue = maskedValue;
+ }
+ if (displayValue.size() == 0) {
+ skipChars = 0;
+ mCursorLocation = -1;
+ cursorX = mRenderX;
+ } else {
+ if (skipChars && skipChars < displayValue.size()) {
+ displayValue.erase(0, skipChars);
+ }
+ if (mCursorLocation == 0) {
+ // Cursor is at the beginning
+ cursorX = mRenderX;
+ } else if (mCursorLocation > 0) {
+ // Cursor is in the middle
+ if (displayValue.size() > (unsigned)mCursorLocation) {
+ string cursorDisplay;
+
+ cursorDisplay = displayValue;
+ cursorDisplay.resize(mCursorLocation);
+ cursorX = gr_measureEx(cursorDisplay.c_str(), fontResource) + mRenderX;
+ } else {
+ // Cursor location is after the end of the text - reset to -1
+ mCursorLocation = -1;
+ cursorX = gr_measureEx(displayValue.c_str(), fontResource) + mRenderX;
+ }
+ } else {
+ // Cursor is at the end (-1)
+ cursorX = gr_measureEx(displayValue.c_str(), fontResource) + mRenderX;
+ }
+ }
+ cursorX += scrollingX;
+ // Make sure that the cursor doesn't go past the boundaries of the box
+ if (cursorX + (int)CursorWidth > mRenderX + mRenderW)
+ cursorX = mRenderX + mRenderW - CursorWidth;
+
+ // Set the color for the cursor
+ gr_color(mCursorColor.red, mCursorColor.green, mCursorColor.blue, 255);
+ gr_fill(cursorX, mFontY, CursorWidth, mFontHeight);
+ }
+
+ mRendered = true;
+ return ret;
+}
+
+int GUIInput::Update(void)
+{
+ if (!isConditionTrue()) return (mRendered ? 2 : 0);
+ if (!mRendered) return 2;
+
+ int ret = 0;
+
+ if (mInputText) ret = mInputText->Update();
+ if (ret < 0) return ret;
+
+ return ret;
+}
+
+int GUIInput::GetSelection(int x, int y)
+{
+ if (x < mRenderX || x - mRenderX > mRenderW || y < mRenderY || y - mRenderY > mRenderH) return -1;
+ return (x - mRenderX);
+}
+
+int GUIInput::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int startSelection = -1;
+ int textWidth;
+ string displayValue, originalValue;
+ void* fontResource = NULL;
+
+ if (mFont) fontResource = mFont->GetResource();
+
+ if (!isConditionTrue())
+ return -1;
+
+ if (!HasInputFocus) {
+ if (state != TOUCH_RELEASE)
+ return 0; // Only change focus if touch releases within the input box
+ if (GetSelection(x, y) >= 0) {
+ // When changing focus, we don't scroll or change the cursor location
+ PageManager::SetKeyBoardFocus(0);
+ PageManager::NotifyKeyboard(0);
+ SetInputFocus(1);
+ DrawCursor = true;
+ mRendered = false;
+ }
+ } else {
+ switch (state) {
+ case TOUCH_HOLD:
+ case TOUCH_REPEAT:
+ break;
+ case TOUCH_START:
+ startSelection = GetSelection(x,y);
+ lastX = x;
+ DrawCursor = false;
+ mRendered = false;
+ break;
+
+ case TOUCH_DRAG:
+ // Check if we dragged out of the selection window
+ if (GetSelection(x, y) == -1) {
+ lastX = 0;
+ break;
+ }
+
+ DrawCursor = false;
+
+ // Provide some debounce on initial touches
+ if (startSelection != -1 && abs(x - lastX) < 6) {
+ break;
+ }
+
+ startSelection = -1;
+ if (lastX != x)
+ HandleTextLocation(x);
+ break;
+
+ case TOUCH_RELEASE:
+ // We've moved the cursor location
+ int relativeX = x - mRenderX;
+
+ mRendered = false;
+ DrawCursor = true;
+ DataManager::GetValue(mVariable, displayValue);
+ if (HasMask) {
+ int index, string_size = displayValue.size();
+ string maskedValue;
+ for (index=0; index<string_size; index++)
+ maskedValue += mMask;
+ displayValue = maskedValue;
+ }
+ if (displayValue.size() == 0) {
+ skipChars = 0;
+ mCursorLocation = -1;
+ return 0;
+ } else if (skipChars && skipChars < displayValue.size()) {
+ displayValue.erase(0, skipChars);
+ }
+
+ string cursorString;
+ int cursorX = 0;
+ unsigned index = 0;
+
+ for(index=0; index<displayValue.size(); index++)
+ {
+ cursorString = displayValue.substr(0, index);
+ cursorX = gr_measureEx(cursorString.c_str(), fontResource) + mRenderX;
+ if (cursorX > x) {
+ if (index > 0)
+ mCursorLocation = index - 1;
+ else
+ mCursorLocation = index;
+ return 0;
+ }
+ }
+ mCursorLocation = -1;
+ break;
+ }
+ }
+ return 0;
+}
+
+int GUIInput::NotifyVarChange(std::string varName, std::string value)
+{
+ if (varName == mVariable && !isLocalChange) {
+ HandleTextLocation(-1003);
+ return 0;
+ }
+ return 0;
+}
+
+int GUIInput::NotifyKeyboard(int key)
+{
+ string variableValue;
+
+ if (HasInputFocus) {
+ if (key == KEYBOARD_BACKSPACE) {
+ //Backspace
+ DataManager::GetValue(mVariable, variableValue);
+ if (variableValue.size() > 0 && (mCursorLocation + skipChars != 0 || mCursorLocation == -1)) {
+ if (mCursorLocation == -1) {
+ variableValue.resize(variableValue.size() - 1);
+ } else {
+ variableValue.erase(mCursorLocation + skipChars - 1, 1);
+ if (mCursorLocation > 0)
+ mCursorLocation--;
+ else if (skipChars > 0)
+ skipChars--;
+ }
+ isLocalChange = true;
+ DataManager::SetValue(mVariable, variableValue);
+ isLocalChange = false;
+
+ if (HasMask) {
+ int index, string_size = variableValue.size();
+ string maskedValue;
+ for (index=0; index<string_size; index++)
+ maskedValue += mMask;
+ DataManager::SetValue(mMaskVariable, maskedValue);
+ }
+ HandleTextLocation(-1002);
+ }
+ } else if (key == KEYBOARD_SWIPE_LEFT) {
+ // Delete all
+ isLocalChange = true;
+ if (mCursorLocation == -1) {
+ DataManager::SetValue (mVariable, "");
+ if (HasMask)
+ DataManager::SetValue(mMaskVariable, "");
+ mCursorLocation = -1;
+ } else {
+ DataManager::GetValue(mVariable, variableValue);
+ variableValue.erase(0, mCursorLocation + skipChars);
+ DataManager::SetValue(mVariable, variableValue);
+ if (HasMask) {
+ DataManager::GetValue(mMaskVariable, variableValue);
+ variableValue.erase(0, mCursorLocation + skipChars);
+ DataManager::SetValue(mMaskVariable, variableValue);
+ }
+ mCursorLocation = 0;
+ }
+ skipChars = 0;
+ scrollingX = 0;
+ mInputText->SkipCharCount(skipChars);
+ isLocalChange = false;
+ mRendered = false;
+ return 0;
+ } else if (key == KEYBOARD_ARROW_LEFT) {
+ if (mCursorLocation == 0 && skipChars == 0)
+ return 0; // we're already at the beginning
+ if (mCursorLocation == -1) {
+ DataManager::GetValue(mVariable, variableValue);
+ if (variableValue.size() == 0)
+ return 0;
+ mCursorLocation = variableValue.size() - skipChars - 1;
+ } else if (mCursorLocation == 0) {
+ skipChars--;
+ HandleTextLocation(-1002);
+ } else {
+ mCursorLocation--;
+ HandleTextLocation(-1002);
+ }
+ mRendered = false;
+ return 0;
+ } else if (key == KEYBOARD_ARROW_RIGHT) {
+ if (mCursorLocation == -1)
+ return 0; // we're already at the end
+ mCursorLocation++;
+ DataManager::GetValue(mVariable, variableValue);
+ if (variableValue.size() <= mCursorLocation + skipChars)
+ mCursorLocation = -1;
+ HandleTextLocation(-1001);
+ mRendered = false;
+ return 0;
+ } else if (key == KEYBOARD_HOME || key == KEYBOARD_ARROW_UP) {
+ DataManager::GetValue(mVariable, variableValue);
+ if (variableValue.size() == 0)
+ return 0;
+ mCursorLocation = 0;
+ skipChars = 0;
+ mRendered = false;
+ HandleTextLocation(-1002);
+ return 0;
+ } else if (key == KEYBOARD_END || key == KEYBOARD_ARROW_DOWN) {
+ mCursorLocation = -1;
+ mRendered = false;
+ HandleTextLocation(-1003);
+ return 0;
+ } else if (key < KEYBOARD_SPECIAL_KEYS && key > 0) {
+ // Regular key
+ if (HasAllowed && AllowedList.find((char)key) == string::npos) {
+ return 0;
+ }
+ if (HasDisabled && DisabledList.find((char)key) != string::npos) {
+ return 0;
+ }
+ DataManager::GetValue(mVariable, variableValue);
+ if (MaxLen != 0 && variableValue.size() >= MaxLen) {
+ return 0;
+ }
+ if (mCursorLocation == -1) {
+ variableValue += key;
+ } else {
+ const char newchar = (char)key;
+ const char* a = &newchar;
+ string newstring = a;
+ newstring.resize(1);
+ variableValue.insert(mCursorLocation + skipChars, newstring);
+ mCursorLocation++;
+ }
+ isLocalChange = true;
+ DataManager::SetValue(mVariable, variableValue);
+ HandleTextLocation(-1001);
+ isLocalChange = false;
+
+ if (HasMask) {
+ int index, string_size = variableValue.size();
+ string maskedValue;
+ for (index=0; index<string_size; index++)
+ maskedValue += mMask;
+ DataManager::SetValue(mMaskVariable, maskedValue);
+ }
+ } else if (key == KEYBOARD_ACTION) {
+ // Action
+ DataManager::GetValue(mVariable, variableValue);
+ if (mAction) {
+ unsigned inputLen = variableValue.length();
+ if (inputLen < MinLen)
+ return 0;
+ else if (MaxLen != 0 && inputLen > MaxLen)
+ return 0;
+ else
+ return (mAction ? mAction->NotifyTouch(TOUCH_RELEASE, mRenderX, mRenderY) : 1);
+ }
+ }
+ return 0;
+ } else {
+ if (key == 0) {
+ // Somewhat ugly hack-ish way to tell the box to redraw after losing focus to remove the cursor
+ mRendered = false;
+ return 1;
+ }
+ }
+ return 1;
+}
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
new file mode 100644
index 000000000..95cdbf1c8
--- /dev/null
+++ b/gui/keyboard.cpp
@@ -0,0 +1,519 @@
+/*
+ Copyright 2012 bigbiff/Dees_Troy 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>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIKeyboard::GUIKeyboard(xml_node<>* node)
+ : Conditional(node)
+{
+ int layoutindex, rowindex, keyindex, Xindex, Yindex, keyHeight = 0, keyWidth = 0;
+ rowY = colX = -1;
+ highlightRenderCount = hasHighlight = 0;
+ char resource[10], layout[8], row[5], key[6], longpress[7];
+ xml_attribute<>* attr;
+ xml_node<>* child;
+ xml_node<>* keylayout;
+ xml_node<>* keyrow;
+
+ for (layoutindex=0; layoutindex<MAX_KEYBOARD_LAYOUTS; layoutindex++)
+ keyboardImg[layoutindex] = NULL;
+
+ mRendered = false;
+ currentLayout = 1;
+ mAction = NULL;
+ KeyboardHeight = KeyboardWidth = cursorLocation = 0;
+
+ if (!node) return;
+
+ // Load the action
+ child = node->first_node("action");
+ if (child)
+ {
+ mAction = new GUIAction(node);
+ }
+
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ child = node->first_node("highlight");
+ if (child) {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasHighlight = 1;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ }
+ }
+
+ // Load the images for the different layouts
+ child = node->first_node("layout");
+ if (child)
+ {
+ layoutindex = 1;
+ strcpy(resource, "resource1");
+ attr = child->first_attribute(resource);
+ while (attr && layoutindex < (MAX_KEYBOARD_LAYOUTS + 1)) {
+ keyboardImg[layoutindex - 1] = PageManager::FindResource(attr->value());
+
+ layoutindex++;
+ resource[8] = (char)(layoutindex + 48);
+ attr = child->first_attribute(resource);
+ }
+ }
+
+ // Check the first image to get height and width
+ if (keyboardImg[0] && keyboardImg[0]->GetResource())
+ {
+ KeyboardWidth = gr_get_width(keyboardImg[0]->GetResource());
+ KeyboardHeight = gr_get_height(keyboardImg[0]->GetResource());
+ }
+
+ // Load all of the layout maps
+ layoutindex = 1;
+ strcpy(layout, "layout1");
+ keylayout = node->first_node(layout);
+ while (keylayout)
+ {
+ if (layoutindex > MAX_KEYBOARD_LAYOUTS) {
+ LOGERR("Too many layouts defined in keyboard.\n");
+ return;
+ }
+
+ child = keylayout->first_node("keysize");
+ if (child) {
+ attr = child->first_attribute("height");
+ if (attr)
+ keyHeight = atoi(attr->value());
+ else
+ keyHeight = 0;
+ attr = child->first_attribute("width");
+ if (attr)
+ keyWidth = atoi(attr->value());
+ else
+ keyWidth = 0;
+ }
+
+ rowindex = 1;
+ Yindex = 0;
+ strcpy(row, "row1");
+ keyrow = keylayout->first_node(row);
+ while (keyrow)
+ {
+ if (rowindex > MAX_KEYBOARD_ROWS) {
+ LOGERR("Too many rows defined in keyboard.\n");
+ return;
+ }
+
+ Yindex += keyHeight;
+ row_heights[layoutindex - 1][rowindex - 1] = Yindex;
+
+ keyindex = 1;
+ Xindex = 0;
+ strcpy(key, "key01");
+ attr = keyrow->first_attribute(key);
+
+ while (attr) {
+ string stratt;
+ char keyinfo[255];
+
+ if (keyindex > MAX_KEYBOARD_KEYS) {
+ LOGERR("Too many keys defined in a keyboard row.\n");
+ return;
+ }
+
+ stratt = attr->value();
+ if (strlen(stratt.c_str()) >= 255) {
+ LOGERR("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
+ return;
+ }
+
+ strcpy(keyinfo, stratt.c_str());
+
+ if (strlen(keyinfo) == 0) {
+ LOGERR("No key info on layout%i, row%i, key%dd.\n", layoutindex, rowindex, keyindex);
+ return;
+ }
+
+ if (strlen(keyinfo) == 1) {
+ // This is a single key, simple definition
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = keyinfo[0];
+ Xindex += keyWidth;
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].end_x = Xindex - 1;
+ } else {
+ // This key has extra data
+ char* ptr;
+ char* offset;
+ char* keyitem;
+ char foratoi[10];
+
+ ptr = keyinfo;
+ offset = keyinfo;
+ while (*ptr > 32 && *ptr != ':')
+ ptr++;
+ if (*ptr != 0)
+ *ptr = 0;
+
+ strcpy(foratoi, offset);
+ Xindex += atoi(foratoi);
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].end_x = Xindex - 1;
+
+ ptr++;
+ if (*ptr == 0) {
+ // This is an empty area
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = 0;
+ } else if (strlen(ptr) == 1) {
+ // This is the character that this key uses
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = *ptr;
+ } else if (*ptr == 'c') {
+ // This is an ASCII character code
+ keyitem = ptr + 2;
+ strcpy(foratoi, keyitem);
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = atoi(foratoi);
+ } else if (*ptr == 'l') {
+ // This is a different layout
+ keyitem = ptr + 6;
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = KEYBOARD_LAYOUT;
+ strcpy(foratoi, keyitem);
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].layout = atoi(foratoi);
+ } else if (*ptr == 'a') {
+ // This is an action
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].key = KEYBOARD_ACTION;
+ } else
+ LOGERR("Invalid key info on layout%i, row%i, key%02i.\n", layoutindex, rowindex, keyindex);
+ }
+
+ // PROCESS LONG PRESS INFO IF EXISTS
+ sprintf(longpress, "long%02i", keyindex);
+ attr = keyrow->first_attribute(longpress);
+ if (attr) {
+ stratt = attr->value();
+ if (strlen(stratt.c_str()) >= 255) {
+ LOGERR("Key info on layout%i, row%i, key%dd is too long.\n", layoutindex, rowindex, keyindex);
+ return;
+ }
+
+ strcpy(keyinfo, stratt.c_str());
+
+ if (strlen(keyinfo) == 0) {
+ LOGERR("No long press info on layout%i, row%i, long%dd.\n", layoutindex, rowindex, keyindex);
+ return;
+ }
+
+ if (strlen(keyinfo) == 1) {
+ // This is a single key, simple definition
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = keyinfo[0];
+ } else {
+ // This key has extra data
+ char* ptr;
+ char* offset;
+ char* keyitem;
+ char foratoi[10];
+
+ ptr = keyinfo;
+ offset = keyinfo;
+ while (*ptr > 32 && *ptr != ':')
+ ptr++;
+ if (*ptr != 0)
+ *ptr = 0;
+
+ strcpy(foratoi, offset);
+ Xindex += atoi(foratoi);
+
+ ptr++;
+ if (*ptr == 0) {
+ // This is an empty area
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = 0;
+ } else if (strlen(ptr) == 1) {
+ // This is the character that this key uses
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = *ptr;
+ } else if (*ptr == 'c') {
+ // This is an ASCII character code
+ keyitem = ptr + 2;
+ strcpy(foratoi, keyitem);
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = atoi(foratoi);
+ } else if (*ptr == 'l') {
+ // This is a different layout
+ keyitem = ptr + 6;
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = KEYBOARD_LAYOUT;
+ strcpy(foratoi, keyitem);
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].layout = atoi(foratoi);
+ } else if (*ptr == 'a') {
+ // This is an action
+ keyboard_keys[layoutindex - 1][rowindex - 1][keyindex - 1].longpresskey = KEYBOARD_ACTION;
+ } else
+ LOGERR("Invalid long press key info on layout%i, row%i, long%02i.\n", layoutindex, rowindex, keyindex);
+ }
+ }
+ keyindex++;
+ sprintf(key, "key%02i", keyindex);
+ attr = keyrow->first_attribute(key);
+ }
+ rowindex++;
+ row[3] = (char)(rowindex + 48);
+ keyrow = keylayout->first_node(row);
+ }
+ layoutindex++;
+ layout[6] = (char)(layoutindex + 48);
+ keylayout = node->first_node(layout);
+ }
+
+ int x, y, w, h;
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &x, &y, &w, &h);
+ SetActionPos(x, y, KeyboardWidth, KeyboardHeight);
+ SetRenderPos(x, y, w, h);
+ return;
+}
+
+GUIKeyboard::~GUIKeyboard()
+{
+ int layoutindex;
+
+ for (layoutindex=0; layoutindex<MAX_KEYBOARD_LAYOUTS; layoutindex++)
+ if (keyboardImg[layoutindex]) delete keyboardImg[layoutindex];
+}
+
+int GUIKeyboard::Render(void)
+{
+ if (!isConditionTrue())
+ {
+ mRendered = false;
+ return 0;
+ }
+
+ int ret = 0;
+
+ if (keyboardImg[currentLayout - 1] && keyboardImg[currentLayout - 1]->GetResource())
+ gr_blit(keyboardImg[currentLayout - 1]->GetResource(), 0, 0, KeyboardWidth, KeyboardHeight, mRenderX, mRenderY);
+
+ if (hasHighlight && highlightRenderCount != 0) {
+ int boxheight, boxwidth, x;
+ if (rowY == 0)
+ boxheight = row_heights[currentLayout - 1][rowY];
+ else
+ boxheight = row_heights[currentLayout - 1][rowY] - row_heights[currentLayout - 1][rowY - 1];
+ if (colX == 0) {
+ x = mRenderX;
+ boxwidth = keyboard_keys[currentLayout - 1][rowY][colX].end_x;
+ } else {
+ x = mRenderX + keyboard_keys[currentLayout - 1][rowY][colX - 1].end_x;
+ boxwidth = keyboard_keys[currentLayout - 1][rowY][colX].end_x - keyboard_keys[currentLayout - 1][rowY][colX - 1].end_x;
+ }
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, mHighlightColor.alpha);
+ gr_fill(x, mRenderY + row_heights[currentLayout - 1][rowY - 1], boxwidth, boxheight);
+ if (highlightRenderCount > 0)
+ highlightRenderCount--;
+ } else
+ mRendered = true;
+
+ return ret;
+}
+
+int GUIKeyboard::Update(void)
+{
+ if (!isConditionTrue()) return (mRendered ? 2 : 0);
+ if (!mRendered) return 2;
+
+ return 0;
+}
+
+int GUIKeyboard::SetRenderPos(int x, int y, int w, int h)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = KeyboardWidth;
+ mRenderH = KeyboardHeight;
+ }
+
+ if (mAction) mAction->SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ return 0;
+}
+
+int GUIKeyboard::GetSelection(int x, int y)
+{
+ if (x < mRenderX || x - mRenderX > (int)KeyboardWidth || y < mRenderY || y - mRenderY > (int)KeyboardHeight) return -1;
+ return 0;
+}
+
+int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int startSelection = -1, was_held = 0, startX = 0;
+ static unsigned char initial_key = 0;
+ unsigned int indexy, indexx, rely, relx, rowIndex = 0;
+
+ rely = y - mRenderY;
+ relx = x - mRenderX;
+
+ if (!isConditionTrue()) return -1;
+
+ switch (state)
+ {
+ case TOUCH_START:
+ if (GetSelection(x, y) == 0) {
+ startSelection = -1;
+ was_held = 0;
+ startX = x;
+ // Find the correct row
+ for (indexy=0; indexy<MAX_KEYBOARD_ROWS; indexy++) {
+ if (row_heights[currentLayout - 1][indexy] > rely) {
+ rowIndex = indexy;
+ rowY = indexy;
+ indexy = MAX_KEYBOARD_ROWS;
+ }
+ }
+
+ // Find the correct key (column)
+ for (indexx=0; indexx<MAX_KEYBOARD_KEYS; indexx++) {
+ if (keyboard_keys[currentLayout - 1][rowIndex][indexx].end_x > relx) {
+ // This is the key that was pressed!
+ initial_key = keyboard_keys[currentLayout - 1][rowIndex][indexx].key;
+ colX = indexx;
+ indexx = MAX_KEYBOARD_KEYS;
+ }
+ }
+ if (initial_key != 0)
+ highlightRenderCount = -1;
+ else
+ highlightRenderCount = 0;
+ mRendered = false;
+ } else {
+ if (highlightRenderCount != 0)
+ mRendered = false;
+ highlightRenderCount = 0;
+ startSelection = 0;
+ }
+ break;
+ case TOUCH_DRAG:
+ break;
+ case TOUCH_RELEASE:
+ if (x < startX - (KeyboardWidth * 0.5)) {
+ if (highlightRenderCount != 0) {
+ highlightRenderCount = 0;
+ mRendered = false;
+ }
+ PageManager::NotifyKeyboard(KEYBOARD_SWIPE_LEFT);
+ return 0;
+ } else if (x > startX + (KeyboardWidth * 0.5)) {
+ if (highlightRenderCount != 0) {
+ highlightRenderCount = 0;
+ mRendered = false;
+ }
+ PageManager::NotifyKeyboard(KEYBOARD_SWIPE_RIGHT);
+ return 0;
+ }
+
+ case TOUCH_HOLD:
+ case TOUCH_REPEAT:
+
+ if (startSelection == 0 || GetSelection(x, y) == -1) {
+ if (highlightRenderCount != 0) {
+ highlightRenderCount = 0;
+ mRendered = false;
+ }
+ return 0;
+ } else if (highlightRenderCount != 0) {
+ if (state == TOUCH_RELEASE)
+ highlightRenderCount = 2;
+ else
+ highlightRenderCount = -1;
+ mRendered = false;
+ }
+
+ // Find the correct row
+ for (indexy=0; indexy<MAX_KEYBOARD_ROWS; indexy++) {
+ if (row_heights[currentLayout - 1][indexy] > rely) {
+ rowIndex = indexy;
+ indexy = MAX_KEYBOARD_ROWS;
+ }
+ }
+
+ // Find the correct key (column)
+ for (indexx=0; indexx<MAX_KEYBOARD_KEYS; indexx++) {
+ if (keyboard_keys[currentLayout - 1][rowIndex][indexx].end_x > relx) {
+ // This is the key that was pressed!
+ if (keyboard_keys[currentLayout - 1][rowIndex][indexx].key != initial_key) {
+ // We dragged off of the starting key
+ startSelection = 0;
+ break;
+ } else if (state == TOUCH_RELEASE && was_held == 0) {
+ if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key > 0) {
+ // Regular key
+ PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
+ } else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key == KEYBOARD_LAYOUT) {
+ // Switch layouts
+ currentLayout = keyboard_keys[currentLayout - 1][rowIndex][indexx].layout;
+ mRendered = false;
+ } else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key == KEYBOARD_ACTION) {
+ // Action
+ highlightRenderCount = 0;
+ if (mAction) {
+ // Keyboard has its own action defined
+ return (mAction ? mAction->NotifyTouch(state, x, y) : 1);
+ } else {
+ // Send action notification
+ PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
+ }
+ }
+ } else if (state == TOUCH_HOLD) {
+ was_held = 1;
+ if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key == KEYBOARD_BACKSPACE) {
+ // Repeat backspace
+ PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
+ } else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey > 0) {
+ // Long Press Key
+ PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey);
+ }
+ } else if (state == TOUCH_REPEAT) {
+ was_held = 1;
+ if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key == KEYBOARD_BACKSPACE) {
+ // Repeat backspace
+ PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
+ }
+ }
+ indexx = MAX_KEYBOARD_KEYS;
+ }
+ }
+ break;
+ }
+
+ return 0;
+}
diff --git a/gui/listbox.cpp b/gui/listbox.cpp
new file mode 100644
index 000000000..a4976f4e1
--- /dev/null
+++ b/gui/listbox.cpp
@@ -0,0 +1,813 @@
+/*
+ Copyright 2013 bigbiff/Dees_Troy 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 <linux/input.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <dirent.h>
+#include <ctype.h>
+
+#include <algorithm>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+#include "../twrp-functions.hpp"
+
+#define SCROLLING_SPEED_DECREMENT 6
+#define SCROLLING_FLOOR 10
+#define SCROLLING_MULTIPLIER 6
+
+GUIListBox::GUIListBox(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+ int header_separator_color_specified = 0, header_separator_height_specified = 0, header_text_color_specified = 0, header_background_color_specified = 0;
+
+ mStart = mLineSpacing = startY = mFontHeight = mSeparatorH = scrollingY = scrollingSpeed = 0;
+ mIconWidth = mIconHeight = mSelectedIconHeight = mSelectedIconWidth = mUnselectedIconHeight = mUnselectedIconWidth = mHeaderIconHeight = mHeaderIconWidth = 0;
+ mHeaderSeparatorH = mLineHeight = mHeaderIsStatic = mHeaderH = actualLineHeight = 0;
+ mIconSelected = mIconUnselected = mBackground = mFont = mHeaderIcon = NULL;
+ mBackgroundX = mBackgroundY = mBackgroundW = mBackgroundH = 0;
+ mFastScrollW = mFastScrollLineW = mFastScrollRectW = mFastScrollRectH = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ mUpdate = 0;
+ touchDebounce = 6;
+ ConvertStrToColor("black", &mBackgroundColor);
+ ConvertStrToColor("black", &mHeaderBackgroundColor);
+ ConvertStrToColor("black", &mSeparatorColor);
+ ConvertStrToColor("black", &mHeaderSeparatorColor);
+ ConvertStrToColor("white", &mFontColor);
+ ConvertStrToColor("white", &mHeaderFontColor);
+ ConvertStrToColor("white", &mFastScrollLineColor);
+ ConvertStrToColor("white", &mFastScrollRectColor);
+ hasHighlightColor = false;
+ hasFontHighlightColor = false;
+ isHighlighted = false;
+ startSelection = -1;
+
+ // Load header text
+ child = node->first_node("header");
+ if (child)
+ {
+ attr = child->first_attribute("icon");
+ if (attr)
+ mHeaderIcon = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("background");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ header_background_color_specified = -1;
+ }
+ attr = child->first_attribute("textcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderFontColor);
+ header_text_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ header_separator_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorheight");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mHeaderSeparatorH = atoi(parsevalue.c_str());
+ header_separator_height_specified = -1;
+ }
+ }
+ child = node->first_node("text");
+ if (child) mHeaderText = child->value();
+
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ child = node->first_node("highlight");
+ if (child) {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasHighlightColor = true;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ }
+ }
+
+ // Simple way to check for static state
+ mLastValue = gui_parse_text(mHeaderText);
+ if (mLastValue != mHeaderText)
+ mHeaderIsStatic = 0;
+ else
+ mHeaderIsStatic = -1;
+
+ child = node->first_node("icon");
+ if (child)
+ {
+ attr = child->first_attribute("selected");
+ if (attr)
+ mIconSelected = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("unselected");
+ if (attr)
+ mIconUnselected = PageManager::FindResource(attr->value());
+ }
+ child = node->first_node("background");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mBackground = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackgroundColor);
+ if (!header_background_color_specified)
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+
+ // Load the font, and possibly override the color
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontColor);
+ if (!header_text_color_specified)
+ ConvertStrToColor(color, &mHeaderFontColor);
+ }
+
+ attr = child->first_attribute("spacing");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mLineSpacing = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("highlightcolor");
+ memset(&mFontHighlightColor, 0, sizeof(COLOR));
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontHighlightColor);
+ hasFontHighlightColor = true;
+ }
+ }
+
+ // Load the separator if it exists
+ child = node->first_node("separator");
+ if (child)
+ {
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mSeparatorColor);
+ if (!header_separator_color_specified)
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ }
+
+ attr = child->first_attribute("height");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mSeparatorH = atoi(parsevalue.c_str());
+ if (!header_separator_height_specified)
+ mHeaderSeparatorH = mSeparatorH;
+ }
+ }
+
+ // Handle the result variable
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mVariable = attr->value();
+ attr = child->first_attribute("default");
+ if (attr)
+ DataManager::SetValue(mVariable, attr->value());
+ }
+
+ // Fast scroll colors
+ child = node->first_node("fastscroll");
+ if (child)
+ {
+ attr = child->first_attribute("linecolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollLineColor);
+
+ attr = child->first_attribute("rectcolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollRectColor);
+
+ attr = child->first_attribute("w");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("linew");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollLineW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("rectw");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("recth");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectH = atoi(parsevalue.c_str());
+ }
+ }
+
+ // Retrieve the line height
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, &mFontHeight, NULL);
+ mLineHeight = mFontHeight;
+ mHeaderH = mFontHeight;
+
+ if (mIconSelected && mIconSelected->GetResource())
+ {
+ mSelectedIconWidth = gr_get_width(mIconSelected->GetResource());
+ mSelectedIconHeight = gr_get_height(mIconSelected->GetResource());
+ if (mSelectedIconHeight > (int)mLineHeight)
+ mLineHeight = mSelectedIconHeight;
+ mIconWidth = mSelectedIconWidth;
+ }
+
+ if (mIconUnselected && mIconUnselected->GetResource())
+ {
+ mUnselectedIconWidth = gr_get_width(mIconUnselected->GetResource());
+ mUnselectedIconHeight = gr_get_height(mIconUnselected->GetResource());
+ if (mUnselectedIconHeight > (int)mLineHeight)
+ mLineHeight = mUnselectedIconHeight;
+ if (mUnselectedIconWidth > mIconWidth)
+ mIconWidth = mUnselectedIconWidth;
+ }
+
+ if (mHeaderIcon && mHeaderIcon->GetResource())
+ {
+ mHeaderIconWidth = gr_get_width(mHeaderIcon->GetResource());
+ mHeaderIconHeight = gr_get_height(mHeaderIcon->GetResource());
+ if (mHeaderIconHeight > mHeaderH)
+ mHeaderH = mHeaderIconHeight;
+ if (mHeaderIconWidth > mIconWidth)
+ mIconWidth = mHeaderIconWidth;
+ }
+
+ mHeaderH += mLineSpacing + mHeaderSeparatorH;
+ actualLineHeight = mLineHeight + mLineSpacing + mSeparatorH;
+ if (mHeaderH < actualLineHeight)
+ mHeaderH = actualLineHeight;
+
+ if (actualLineHeight / 3 > 6)
+ touchDebounce = actualLineHeight / 3;
+
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundW = gr_get_width(mBackground->GetResource());
+ mBackgroundH = gr_get_height(mBackground->GetResource());
+ }
+
+ // Get the currently selected value for the list
+ DataManager::GetValue(mVariable, currentValue);
+
+ // Get the data for the list
+ child = node->first_node("listitem");
+ if (!child) return;
+
+ while (child)
+ {
+ ListData data;
+
+ attr = child->first_attribute("name");
+ if (!attr) return;
+ data.displayName = attr->value();
+
+ data.variableValue = child->value();
+ if (child->value() == currentValue) {
+ data.selected = 1;
+ } else {
+ data.selected = 0;
+ }
+
+ mList.push_back(data);
+
+ child = child->next_sibling("listitem");
+ }
+}
+
+GUIListBox::~GUIListBox()
+{
+}
+
+int GUIListBox::Render(void)
+{
+ // First step, fill background
+ gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY + mHeaderH, mRenderW, mRenderH - mHeaderH);
+
+ // Next, render the background resource (if it exists)
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundX = mRenderX + ((mRenderW - mBackgroundW) / 2);
+ mBackgroundY = mRenderY + ((mRenderH - mBackgroundH) / 2);
+ gr_blit(mBackground->GetResource(), 0, 0, mBackgroundW, mBackgroundH, mBackgroundX, mBackgroundY);
+ }
+
+ // This tells us how many lines we can actually render
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ int line;
+
+ int listSize = mList.size();
+ int listW = mRenderW;
+
+ if (listSize < lines) {
+ lines = listSize;
+ scrollingY = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ } else {
+ listW -= mFastScrollW; // space for fast scroll
+ lines++;
+ if (lines < listSize)
+ lines++;
+ }
+
+ void* fontResource = NULL;
+ if (mFont) fontResource = mFont->GetResource();
+
+ int yPos = mRenderY + mHeaderH + scrollingY;
+ int fontOffsetY = (int)((actualLineHeight - mFontHeight) / 2);
+ int currentIconHeight = 0, currentIconWidth = 0;
+ int currentIconOffsetY = 0, currentIconOffsetX = 0;
+ int UnselectedIconOffsetY = (int)((actualLineHeight - mUnselectedIconHeight) / 2), SelectedIconOffsetY = (int)((actualLineHeight - mSelectedIconHeight) / 2);
+ int UnselectedIconOffsetX = (mIconWidth - mUnselectedIconWidth) / 2, SelectedIconOffsetX = (mIconWidth - mSelectedIconWidth) / 2;
+ int actualSelection = mStart;
+
+ if (isHighlighted) {
+ int selectY = scrollingY;
+
+ // Locate the correct line for highlighting
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+ if (hasHighlightColor) {
+ // Highlight the area
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, 255);
+ int HighlightHeight = actualLineHeight;
+ if (mRenderY + mHeaderH + selectY + actualLineHeight > mRenderH + mRenderY) {
+ HighlightHeight = actualLineHeight - (mRenderY + mHeaderH + selectY + actualLineHeight - mRenderH - mRenderY);
+ }
+ gr_fill(mRenderX, mRenderY + mHeaderH + selectY, mRenderW, HighlightHeight);
+ }
+ }
+
+ for (line = 0; line < lines; line++)
+ {
+ Resource* icon;
+ std::string label;
+
+ if (line + mStart >= listSize)
+ continue;
+
+ label = mList.at(line + mStart).displayName;
+ if (isHighlighted && hasFontHighlightColor && line + mStart == actualSelection) {
+ // Use the highlight color for the font
+ gr_color(mFontHighlightColor.red, mFontHighlightColor.green, mFontHighlightColor.blue, 255);
+ } else {
+ // Set the color for the font
+ gr_color(mFontColor.red, mFontColor.green, mFontColor.blue, 255);
+ }
+
+ if (mList.at(line + mStart).selected != 0)
+ {
+ icon = mIconSelected;
+ currentIconHeight = mSelectedIconHeight;
+ currentIconWidth = mSelectedIconWidth;
+ currentIconOffsetY = SelectedIconOffsetY;
+ currentIconOffsetX = SelectedIconOffsetX;
+ }
+ else
+ {
+ icon = mIconUnselected;
+ currentIconHeight = mSelectedIconHeight;
+ currentIconWidth = mSelectedIconWidth;
+ currentIconOffsetY = SelectedIconOffsetY;
+ currentIconOffsetX = SelectedIconOffsetX;
+ }
+
+ if (icon && icon->GetResource())
+ {
+ int rect_y = 0, image_y = (yPos + currentIconOffsetY);
+ if (image_y + currentIconHeight > mRenderY + mRenderH)
+ rect_y = mRenderY + mRenderH - image_y;
+ else
+ rect_y = currentIconHeight;
+ gr_blit(icon->GetResource(), 0, 0, currentIconWidth, rect_y, mRenderX + currentIconOffsetX, image_y);
+ }
+ gr_textExWH(mRenderX + mIconWidth + 5, yPos + fontOffsetY, label.c_str(), fontResource, mRenderX + listW, mRenderY + mRenderH);
+
+ // Add the separator
+ if (yPos + actualLineHeight < mRenderH + mRenderY) {
+ gr_color(mSeparatorColor.red, mSeparatorColor.green, mSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + actualLineHeight - mSeparatorH, listW, mSeparatorH);
+ }
+
+ // Move the yPos
+ yPos += actualLineHeight;
+ }
+
+ // Render the Header (last so that it overwrites the top most row for per pixel scrolling)
+ // First step, fill background
+ gr_color(mHeaderBackgroundColor.red, mHeaderBackgroundColor.green, mHeaderBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY, mRenderW, mHeaderH);
+
+ // Now, we need the header (icon + text)
+ yPos = mRenderY;
+ {
+ Resource* headerIcon;
+ int mIconOffsetX = 0;
+
+ // render the icon if it exists
+ headerIcon = mHeaderIcon;
+ if (headerIcon && headerIcon->GetResource())
+ {
+ gr_blit(headerIcon->GetResource(), 0, 0, mHeaderIconWidth, mHeaderIconHeight, mRenderX + ((mHeaderIconWidth - mIconWidth) / 2), (yPos + (int)((mHeaderH - mHeaderIconHeight) / 2)));
+ mIconOffsetX = mIconWidth;
+ }
+
+ // render the text
+ gr_color(mHeaderFontColor.red, mHeaderFontColor.green, mHeaderFontColor.blue, 255);
+ gr_textExWH(mRenderX + mIconOffsetX + 5, yPos + (int)((mHeaderH - mFontHeight) / 2), mLastValue.c_str(), fontResource, mRenderX + mRenderW, mRenderY + mRenderH);
+
+ // Add the separator
+ gr_color(mHeaderSeparatorColor.red, mHeaderSeparatorColor.green, mHeaderSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + mHeaderH - mHeaderSeparatorH, mRenderW, mHeaderSeparatorH);
+ }
+
+ // render fast scroll
+ lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ if(mFastScrollW > 0 && listSize > lines)
+ {
+ int startX = listW + mRenderX;
+ int fWidth = mRenderW - listW;
+ int fHeight = mRenderH - mHeaderH;
+
+ // line
+ gr_color(mFastScrollLineColor.red, mFastScrollLineColor.green, mFastScrollLineColor.blue, 255);
+ gr_fill(startX + fWidth/2, mRenderY + mHeaderH, mFastScrollLineW, mRenderH - mHeaderH);
+
+ // rect
+ int pct = ((mStart*actualLineHeight - scrollingY)*100)/((listSize)*actualLineHeight-lines*actualLineHeight);
+ mFastScrollRectX = startX + (fWidth - mFastScrollRectW)/2;
+ mFastScrollRectY = mRenderY+mHeaderH + ((fHeight - mFastScrollRectH)*pct)/100;
+
+ gr_color(mFastScrollRectColor.red, mFastScrollRectColor.green, mFastScrollRectColor.blue, 255);
+ gr_fill(mFastScrollRectX, mFastScrollRectY, mFastScrollRectW, mFastScrollRectH);
+ }
+
+ mUpdate = 0;
+ return 0;
+}
+
+int GUIListBox::Update(void)
+{
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mUpdate = 1;
+ }
+ }
+
+ if (mUpdate)
+ {
+ mUpdate = 0;
+ if (Render() == 0)
+ return 2;
+ }
+
+ // Handle kinetic scrolling
+ if (scrollingSpeed == 0) {
+ // Do nothing
+ } else if (scrollingSpeed > 0) {
+ if (scrollingSpeed < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY += ((int) (actualLineHeight * 2.5));
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0) {
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ } else if (scrollingSpeed < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ } else if (scrollingSpeed < 0) {
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ if (abs(scrollingSpeed) < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY -= ((int) (actualLineHeight * 2.5));
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ } else if (scrollingSpeed * -1 < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+
+ return 0;
+}
+
+int GUIListBox::GetSelection(int x, int y)
+{
+ // We only care about y position
+ if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH) return -1;
+ return (y - mRenderY - mHeaderH);
+}
+
+int GUIListBox::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int lastY = 0, last2Y = 0;
+ int selection = 0;
+
+ switch (state)
+ {
+ case TOUCH_START:
+ if (scrollingSpeed != 0)
+ startSelection = -1;
+ else
+ startSelection = GetSelection(x,y);
+ isHighlighted = (startSelection > -1);
+ if (isHighlighted)
+ mUpdate = 1;
+ startY = lastY = last2Y = y;
+ scrollingSpeed = 0;
+ break;
+
+ case TOUCH_DRAG:
+ // Check if we dragged out of the selection window
+ if (GetSelection(x, y) == -1) {
+ last2Y = lastY = 0;
+ if (isHighlighted) {
+ isHighlighted = false;
+ mUpdate = 1;
+ }
+ break;
+ }
+
+ // Fast scroll
+ if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW)
+ {
+ int pct = ((y-mRenderY-mHeaderH)*100)/(mRenderH-mHeaderH);
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ float l = float((totalSize-lines)*pct)/100;
+ if(l + lines >= totalSize)
+ {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ else
+ {
+ mStart = l;
+ scrollingY = -(l - int(l))*actualLineHeight;
+ }
+
+ startSelection = -1;
+ mUpdate = 1;
+ scrollingSpeed = 0;
+ isHighlighted = false;
+ break;
+ }
+
+ // Provide some debounce on initial touches
+ if (startSelection != -1 && abs(y - startY) < touchDebounce) {
+ isHighlighted = true;
+ mUpdate = 1;
+ break;
+ }
+
+ isHighlighted = false;
+ last2Y = lastY;
+ lastY = y;
+ startSelection = -1;
+
+ // Handle scrolling
+ scrollingY += y - startY;
+ startY = y;
+ while(mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0)
+ scrollingY = 0;
+ {
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ } else
+ scrollingY = 0;
+ }
+ mUpdate = 1;
+ break;
+
+ case TOUCH_RELEASE:
+ isHighlighted = false;
+ if (startSelection >= 0)
+ {
+ // We've selected an item!
+ std::string str;
+
+ int listSize = mList.size();
+ int selectY = scrollingY, actualSelection = mStart;
+
+ // Move the selection to the proper place in the array
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+
+ if (actualSelection < listSize && !mVariable.empty())
+ {
+ int i;
+ for (i=0; i<listSize; i++)
+ mList.at(i).selected = 0;
+
+ str = mList.at(actualSelection).variableValue;
+ mList.at(actualSelection).selected = 1;
+ DataManager::SetValue(mVariable, str);
+ mUpdate = 1;
+ }
+ } else {
+ // This is for kinetic scrolling
+ scrollingSpeed = lastY - last2Y;
+ if (abs(scrollingSpeed) > SCROLLING_FLOOR)
+ scrollingSpeed *= SCROLLING_MULTIPLIER;
+ else
+ scrollingSpeed = 0;
+ }
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
+
+int GUIListBox::NotifyVarChange(std::string varName, std::string value)
+{
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mStart = 0;
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+ if (varName == mVariable)
+ {
+ int i, listSize = mList.size(), selected_index = 0;
+
+ currentValue = value;
+
+ for (i=0; i<listSize; i++) {
+ if (mList.at(i).variableValue == currentValue) {
+ mList.at(i).selected = 1;
+ selected_index = i;
+ } else
+ mList.at(i).selected = 0;
+ }
+
+ int lines = mRenderH / (mLineHeight + mLineSpacing);
+ int line;
+
+ if (selected_index > mStart + lines - 1)
+ mStart = selected_index;
+ if (mStart > listSize - lines) {
+ mStart = listSize - lines;
+ } else if (selected_index < mStart) {
+ mStart = selected_index;
+ }
+
+ mUpdate = 1;
+ return 0;
+ }
+ return 0;
+}
+
+int GUIListBox::SetRenderPos(int x, int y, int w /* = 0 */, int h /* = 0 */)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = w;
+ mRenderH = h;
+ }
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ mUpdate = 1;
+ return 0;
+}
+
+void GUIListBox::SetPageFocus(int inFocus)
+{
+ if (inFocus)
+ {
+ DataManager::GetValue(mVariable, currentValue);
+ NotifyVarChange(mVariable, currentValue);
+ mUpdate = 1;
+ }
+}
diff --git a/gui/objects.hpp b/gui/objects.hpp
new file mode 100644
index 000000000..e7bb2a0ee
--- /dev/null
+++ b/gui/objects.hpp
@@ -0,0 +1,983 @@
+/*
+ Copyright 2013 bigbiff/Dees_Troy 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/>.
+*/
+
+// objects.hpp - Base classes for object manager of GUI
+
+#ifndef _OBJECTS_HEADER
+#define _OBJECTS_HEADER
+
+#include "rapidxml.hpp"
+#include <vector>
+#include <string>
+#include <map>
+
+extern "C" {
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+}
+
+using namespace rapidxml;
+
+#include "../data.hpp"
+#include "resources.hpp"
+#include "pages.hpp"
+#include "../partitions.hpp"
+
+class RenderObject
+{
+public:
+ enum Placement {
+ TOP_LEFT = 0,
+ TOP_RIGHT = 1,
+ BOTTOM_LEFT = 2,
+ BOTTOM_RIGHT = 3,
+ CENTER = 4,
+ CENTER_X_ONLY = 5,
+ };
+
+public:
+ RenderObject() { mRenderX = 0; mRenderY = 0; mRenderW = 0; mRenderH = 0; mPlacement = TOP_LEFT; }
+ virtual ~RenderObject() {}
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void) = 0;
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void) { return 0; }
+
+ // GetRenderPos - Returns the current position of the object
+ virtual int GetRenderPos(int& x, int& y, int& w, int& h) { x = mRenderX; y = mRenderY; w = mRenderW; h = mRenderH; return 0; }
+
+ // SetRenderPos - Update the position of the object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0) { mRenderX = x; mRenderY = y; if (w || h) { mRenderW = w; mRenderH = h; } return 0; }
+
+ // GetPlacement - Returns the current placement
+ virtual int GetPlacement(Placement& placement) { placement = mPlacement; return 0; }
+
+ // SetPlacement - Update the current placement
+ virtual int SetPlacement(Placement placement) { mPlacement = placement; return 0; }
+
+ // SetPageFocus - Notify when a page gains or loses focus
+ virtual void SetPageFocus(int inFocus) { return; }
+
+protected:
+ int mRenderX, mRenderY, mRenderW, mRenderH;
+ Placement mPlacement;
+};
+
+class ActionObject
+{
+public:
+ ActionObject() { mActionX = 0; mActionY = 0; mActionW = 0; mActionH = 0; }
+ virtual ~ActionObject() {}
+
+public:
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y) { return 0; }
+
+ // NotifyKey - Notify of a key press
+ // Return 0 on success (and consume key), >0 to pass key to next handler, and <0 on error
+ virtual int NotifyKey(int key) { return 1; }
+
+ // GetRenderPos - Returns the current position of the object
+ virtual int GetActionPos(int& x, int& y, int& w, int& h) { x = mActionX; y = mActionY; w = mActionW; h = mActionH; return 0; }
+
+ // SetRenderPos - Update the position of the object
+ // Return 0 on success, <0 on error
+ virtual int SetActionPos(int x, int y, int w = 0, int h = 0);
+
+ // IsInRegion - Checks if the request is handled by this object
+ // Return 0 if this object handles the request, 1 if not
+ virtual int IsInRegion(int x, int y) { return ((x < mActionX || x > mActionX + mActionW || y < mActionY || y > mActionY + mActionH) ? 0 : 1); }
+
+ // NotifyVarChange - Notify of a variable change
+ // Returns 0 on success, <0 on error
+ virtual int NotifyVarChange(std::string varName, std::string value) { return 0; }
+
+protected:
+ int mActionX, mActionY, mActionW, mActionH;
+};
+
+class Conditional
+{
+public:
+ Conditional(xml_node<>* node);
+
+public:
+ bool IsConditionVariable(std::string var);
+ bool isConditionTrue();
+ bool isConditionValid();
+ void NotifyPageSet();
+
+protected:
+ class Condition
+ {
+ public:
+ std::string mVar1;
+ std::string mVar2;
+ std::string mCompareOp;
+ std::string mLastVal;
+ };
+
+ std::vector<Condition> mConditions;
+
+protected:
+ bool isMounted(std::string vol);
+ bool isConditionTrue(Condition* condition);
+};
+
+class InputObject
+{
+public:
+ InputObject() { HasInputFocus = 0; }
+ virtual ~InputObject() {}
+
+public:
+ // NotifyKeyboard - Notify of keyboard input
+ // Return 0 on success (and consume key), >0 to pass key to next handler, and <0 on error
+ virtual int NotifyKeyboard(int key) { return 1; }
+
+ virtual int SetInputFocus(int focus) { HasInputFocus = focus; return 1; }
+
+protected:
+ int HasInputFocus;
+};
+
+// Derived Objects
+// GUIText - Used for static text
+class GUIText : public RenderObject, public ActionObject, public Conditional
+{
+public:
+ // w and h may be ignored, in which case, no bounding box is applied
+ GUIText(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // Retrieve the size of the current string (dynamic strings may change per call)
+ virtual int GetCurrentBounds(int& w, int& h);
+
+ // Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // Set maximum width in pixels
+ virtual int SetMaxWidth(unsigned width);
+
+ // Set number of characters to skip (for scrolling)
+ virtual int SkipCharCount(unsigned skip);
+
+public:
+ bool isHighlighted;
+
+protected:
+ std::string mText;
+ std::string mLastValue;
+ COLOR mColor;
+ COLOR mHighlightColor;
+ Resource* mFont;
+ int mIsStatic;
+ int mVarChanged;
+ int mFontHeight;
+ unsigned maxWidth;
+ unsigned charSkip;
+ bool hasHighlightColor;
+
+protected:
+ std::string parseText(void);
+};
+
+// GUIImage - Used for static image
+class GUIImage : public RenderObject, public Conditional
+{
+public:
+ GUIImage(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // SetRenderPos - Update the position of the object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+public:
+ bool isHighlighted;
+
+protected:
+ Resource* mImage;
+ Resource* mHighlightImage;
+};
+
+// GUIFill - Used for fill colors
+class GUIFill : public RenderObject
+{
+public:
+ GUIFill(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+protected:
+ COLOR mColor;
+};
+
+// GUIAction - Used for standard actions
+class GUIAction : public ActionObject, public Conditional
+{
+public:
+ GUIAction(xml_node<>* node);
+
+public:
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+ virtual int NotifyKey(int key);
+ virtual int NotifyVarChange(std::string varName, std::string value);
+ virtual int doActions();
+
+protected:
+ class Action
+ {
+ public:
+ std::string mFunction;
+ std::string mArg;
+ };
+
+ std::vector<Action> mActions;
+ int mKey;
+
+protected:
+ int getKeyByName(std::string key);
+ virtual int doAction(Action action, int isThreaded = 0);
+ static void* thread_start(void *cookie);
+ void simulate_progress_bar(void);
+ int flash_zip(std::string filename, std::string pageName, const int simulate, int* wipe_cache);
+ void operation_start(const string operation_name);
+ void operation_end(const int operation_status, const int simulate);
+ static void* command_thread(void *cookie);
+};
+
+class GUIConsole : public RenderObject, public ActionObject
+{
+public:
+ GUIConsole(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // SetRenderPos - Update the position of the object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // IsInRegion - Checks if the request is handled by this object
+ // Return 0 if this object handles the request, 1 if not
+ virtual int IsInRegion(int x, int y);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error (Return error to allow other handlers)
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+protected:
+ enum SlideoutState
+ {
+ hidden = 0,
+ visible,
+ request_hide,
+ request_show
+ };
+
+ Resource* mFont;
+ Resource* mSlideoutImage;
+ COLOR mForegroundColor;
+ COLOR mBackgroundColor;
+ COLOR mScrollColor;
+ unsigned int mFontHeight;
+ int mCurrentLine;
+ unsigned int mLastCount;
+ unsigned int mMaxRows;
+ int mStartY;
+ int mSlideoutX, mSlideoutY, mSlideoutW, mSlideoutH;
+ int mSlideinX, mSlideinY, mSlideinW, mSlideinH;
+ int mConsoleX, mConsoleY, mConsoleW, mConsoleH;
+ int mLastTouchX, mLastTouchY;
+ int mSlideMultiplier;
+ int mSlideout;
+ SlideoutState mSlideoutState;
+
+protected:
+ virtual int RenderSlideout(void);
+ virtual int RenderConsole(void);
+};
+
+class GUIButton : public RenderObject, public ActionObject, public Conditional
+{
+public:
+ GUIButton(xml_node<>* node);
+ virtual ~GUIButton();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+protected:
+ GUIImage* mButtonImg;
+ Resource* mButtonIcon;
+ GUIText* mButtonLabel;
+ GUIAction* mAction;
+ int mTextX, mTextY, mTextW, mTextH;
+ int mIconX, mIconY, mIconW, mIconH;
+ bool mRendered;
+ bool hasHighlightColor;
+ bool renderHighlight;
+ bool hasFill;
+ COLOR mFillColor;
+ COLOR mHighlightColor;
+ Placement TextPlacement;
+};
+
+class GUICheckbox: public RenderObject, public ActionObject, public Conditional
+{
+public:
+ GUICheckbox(xml_node<>* node);
+ virtual ~GUICheckbox();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+protected:
+ Resource* mChecked;
+ Resource* mUnchecked;
+ GUIText* mLabel;
+ int mTextX, mTextY;
+ int mCheckX, mCheckY, mCheckW, mCheckH;
+ int mLastState;
+ bool mRendered;
+ std::string mVarName;
+};
+
+class GUIFileSelector : public RenderObject, public ActionObject
+{
+public:
+ GUIFileSelector(xml_node<>* node);
+ virtual ~GUIFileSelector();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+ // NotifyVarChange - Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // SetPageFocus - Notify when a page gains or loses focus
+ virtual void SetPageFocus(int inFocus);
+
+protected:
+ struct FileData {
+ std::string fileName;
+ unsigned char fileType; // Uses d_type format from struct dirent
+ mode_t protection; // Uses mode_t format from stat
+ uid_t userId;
+ gid_t groupId;
+ off_t fileSize;
+ time_t lastAccess; // Uses time_t format from stat
+ time_t lastModified; // Uses time_t format from stat
+ time_t lastStatChange; // Uses time_t format from stat
+ };
+
+protected:
+ virtual int GetSelection(int x, int y);
+
+ virtual int GetFileList(const std::string folder);
+ static bool fileSort(FileData d1, FileData d2);
+
+protected:
+ std::vector<FileData> mFolderList;
+ std::vector<FileData> mFileList;
+ std::string mPathVar;
+ std::string mExtn;
+ std::string mVariable;
+ std::string mSortVariable;
+ std::string mSelection;
+ std::string mHeaderText;
+ std::string mLastValue;
+ int actualLineHeight;
+ int mStart;
+ int mLineSpacing;
+ int mSeparatorH;
+ int mHeaderSeparatorH;
+ int mShowFolders, mShowFiles, mShowNavFolders;
+ int mUpdate;
+ int mBackgroundX, mBackgroundY, mBackgroundW, mBackgroundH;
+ int mHeaderH;
+ int mFastScrollW;
+ int mFastScrollLineW;
+ int mFastScrollRectW;
+ int mFastScrollRectH;
+ int mFastScrollRectX;
+ int mFastScrollRectY;
+ static int mSortOrder;
+ int startY;
+ int scrollingSpeed;
+ int scrollingY;
+ int mHeaderIsStatic;
+ int touchDebounce;
+ unsigned mFontHeight;
+ unsigned mLineHeight;
+ int mIconWidth, mIconHeight, mFolderIconHeight, mFileIconHeight, mFolderIconWidth, mFileIconWidth, mHeaderIconHeight, mHeaderIconWidth;
+ Resource* mHeaderIcon;
+ Resource* mFolderIcon;
+ Resource* mFileIcon;
+ Resource* mBackground;
+ Resource* mFont;
+ COLOR mBackgroundColor;
+ COLOR mFontColor;
+ COLOR mHeaderBackgroundColor;
+ COLOR mHeaderFontColor;
+ COLOR mSeparatorColor;
+ COLOR mHeaderSeparatorColor;
+ COLOR mFastScrollLineColor;
+ COLOR mFastScrollRectColor;
+ bool hasHighlightColor;
+ bool hasFontHighlightColor;
+ bool isHighlighted;
+ COLOR mHighlightColor;
+ COLOR mFontHighlightColor;
+ int startSelection;
+ bool updateFileList;
+};
+
+class GUIListBox : public RenderObject, public ActionObject
+{
+public:
+ GUIListBox(xml_node<>* node);
+ virtual ~GUIListBox();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+ // NotifyVarChange - Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // SetPageFocus - Notify when a page gains or loses focus
+ virtual void SetPageFocus(int inFocus);
+
+protected:
+ struct ListData {
+ std::string displayName;
+ std::string variableValue;
+ unsigned int selected;
+ };
+
+protected:
+ virtual int GetSelection(int x, int y);
+
+protected:
+ std::vector<ListData> mList;
+ std::string mVariable;
+ std::string mSelection;
+ std::string currentValue;
+ std::string mHeaderText;
+ std::string mLastValue;
+ int actualLineHeight;
+ int mStart;
+ int startY;
+ int mSeparatorH, mHeaderSeparatorH;
+ int mLineSpacing;
+ int mUpdate;
+ int mBackgroundX, mBackgroundY, mBackgroundW, mBackgroundH, mHeaderH;
+ int mFastScrollW;
+ int mFastScrollLineW;
+ int mFastScrollRectW;
+ int mFastScrollRectH;
+ int mFastScrollRectX;
+ int mFastScrollRectY;
+ int mIconWidth, mIconHeight, mSelectedIconWidth, mSelectedIconHeight, mUnselectedIconWidth, mUnselectedIconHeight, mHeaderIconHeight, mHeaderIconWidth;
+ int scrollingSpeed;
+ int scrollingY;
+ static int mSortOrder;
+ unsigned mFontHeight;
+ unsigned mLineHeight;
+ Resource* mHeaderIcon;
+ Resource* mIconSelected;
+ Resource* mIconUnselected;
+ Resource* mBackground;
+ Resource* mFont;
+ COLOR mBackgroundColor;
+ COLOR mFontColor;
+ COLOR mHeaderBackgroundColor;
+ COLOR mHeaderFontColor;
+ COLOR mSeparatorColor;
+ COLOR mHeaderSeparatorColor;
+ COLOR mFastScrollLineColor;
+ COLOR mFastScrollRectColor;
+ bool hasHighlightColor;
+ bool hasFontHighlightColor;
+ bool isHighlighted;
+ COLOR mHighlightColor;
+ COLOR mFontHighlightColor;
+ int mHeaderIsStatic;
+ int startSelection;
+ int touchDebounce;
+};
+
+class GUIPartitionList : public RenderObject, public ActionObject
+{
+public:
+ GUIPartitionList(xml_node<>* node);
+ virtual ~GUIPartitionList();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+ // NotifyVarChange - Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // SetPageFocus - Notify when a page gains or loses focus
+ virtual void SetPageFocus(int inFocus);
+
+protected:
+ virtual int GetSelection(int x, int y);
+ virtual void MatchList(void);
+
+protected:
+ std::vector<PartitionList> mList;
+ std::string ListType;
+ std::string mVariable;
+ std::string selectedList;
+ std::string currentValue;
+ std::string mHeaderText;
+ std::string mLastValue;
+ int actualLineHeight;
+ int mStart;
+ int startY;
+ int mSeparatorH, mHeaderSeparatorH;
+ int mLineSpacing;
+ int mUpdate;
+ int mBackgroundX, mBackgroundY, mBackgroundW, mBackgroundH, mHeaderH;
+ int mFastScrollW;
+ int mFastScrollLineW;
+ int mFastScrollRectW;
+ int mFastScrollRectH;
+ int mFastScrollRectX;
+ int mFastScrollRectY;
+ int mIconWidth, mIconHeight, mSelectedIconWidth, mSelectedIconHeight, mUnselectedIconWidth, mUnselectedIconHeight, mHeaderIconHeight, mHeaderIconWidth;
+ int scrollingSpeed;
+ int scrollingY;
+ static int mSortOrder;
+ unsigned mFontHeight;
+ unsigned mLineHeight;
+ Resource* mHeaderIcon;
+ Resource* mIconSelected;
+ Resource* mIconUnselected;
+ Resource* mBackground;
+ Resource* mFont;
+ COLOR mBackgroundColor;
+ COLOR mFontColor;
+ COLOR mHeaderBackgroundColor;
+ COLOR mHeaderFontColor;
+ COLOR mSeparatorColor;
+ COLOR mHeaderSeparatorColor;
+ COLOR mFastScrollLineColor;
+ COLOR mFastScrollRectColor;
+ bool hasHighlightColor;
+ bool hasFontHighlightColor;
+ bool isHighlighted;
+ COLOR mHighlightColor;
+ COLOR mFontHighlightColor;
+ int mHeaderIsStatic;
+ int startSelection;
+ int touchDebounce;
+ bool updateList;
+};
+
+// GUIAnimation - Used for animations
+class GUIAnimation : public RenderObject
+{
+public:
+ GUIAnimation(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+protected:
+ AnimationResource* mAnimation;
+ int mFrame;
+ int mFPS;
+ int mLoop;
+ int mRender;
+ int mUpdateCount;
+};
+
+class GUIProgressBar : public RenderObject, public ActionObject
+{
+public:
+ GUIProgressBar(xml_node<>* node);
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // NotifyVarChange - Notify of a variable change
+ // Returns 0 on success, <0 on error
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+protected:
+ Resource* mEmptyBar;
+ Resource* mFullBar;
+ std::string mMinValVar;
+ std::string mMaxValVar;
+ std::string mCurValVar;
+ float mSlide;
+ float mSlideInc;
+ int mSlideFrames;
+ int mLastPos;
+
+protected:
+ virtual int RenderInternal(void); // Does the actual render
+};
+
+class GUISlider : public RenderObject, public ActionObject
+{
+public:
+ GUISlider(xml_node<>* node);
+ virtual ~GUISlider();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+protected:
+ GUIAction* sAction;
+ Resource* sSlider;
+ Resource* sSliderUsed;
+ Resource* sTouch;
+ int sTouchW, sTouchH;
+ int sCurTouchX;
+ int sUpdate;
+};
+
+#define MAX_KEYBOARD_LAYOUTS 5
+#define MAX_KEYBOARD_ROWS 9
+#define MAX_KEYBOARD_KEYS 20
+#define KEYBOARD_ACTION 253
+#define KEYBOARD_LAYOUT 254
+#define KEYBOARD_SWIPE_LEFT 252
+#define KEYBOARD_SWIPE_RIGHT 251
+#define KEYBOARD_ARROW_LEFT 250
+#define KEYBOARD_ARROW_RIGHT 249
+#define KEYBOARD_HOME 248
+#define KEYBOARD_END 247
+#define KEYBOARD_ARROW_UP 246
+#define KEYBOARD_ARROW_DOWN 245
+#define KEYBOARD_SPECIAL_KEYS 245
+#define KEYBOARD_BACKSPACE 8
+
+class GUIKeyboard : public RenderObject, public ActionObject, public Conditional
+{
+public:
+ GUIKeyboard(xml_node<>* node);
+ virtual ~GUIKeyboard();
+
+public:
+ virtual int Render(void);
+ virtual int Update(void);
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+protected:
+ virtual int GetSelection(int x, int y);
+
+protected:
+ struct keyboard_key_class
+ {
+ unsigned char key;
+ unsigned char longpresskey;
+ unsigned int end_x;
+ unsigned int layout;
+ };
+
+ Resource* keyboardImg[MAX_KEYBOARD_LAYOUTS];
+ struct keyboard_key_class keyboard_keys[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS][MAX_KEYBOARD_KEYS];
+ bool mRendered;
+ std::string mVariable;
+ unsigned int cursorLocation;
+ unsigned int currentLayout;
+ unsigned int row_heights[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS];
+ unsigned int KeyboardWidth, KeyboardHeight;
+ int rowY, colX, highlightRenderCount, hasHighlight;
+ GUIAction* mAction;
+ COLOR mHighlightColor;
+};
+
+// GUIInput - Used for keyboard input
+class GUIInput : public RenderObject, public ActionObject, public Conditional, public InputObject
+{
+public:
+ // w and h may be ignored, in which case, no bounding box is applied
+ GUIInput(xml_node<>* node);
+ virtual ~GUIInput();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+ virtual int NotifyKeyboard(int key);
+
+protected:
+ virtual int GetSelection(int x, int y);
+
+ // Handles displaying the text properly when chars are added, deleted, or for scrolling
+ virtual int HandleTextLocation(int x);
+
+protected:
+ GUIText* mInputText;
+ GUIAction* mAction;
+ Resource* mBackground;
+ Resource* mCursor;
+ Resource* mFont;
+ std::string mText;
+ std::string mLastValue;
+ std::string mVariable;
+ std::string mMask;
+ std::string mMaskVariable;
+ COLOR mBackgroundColor;
+ COLOR mCursorColor;
+ int scrollingX;
+ int lastX;
+ int mCursorLocation;
+ int mBackgroundX, mBackgroundY, mBackgroundW, mBackgroundH;
+ int mFontY;
+ unsigned skipChars;
+ unsigned mFontHeight;
+ unsigned CursorWidth;
+ bool mRendered;
+ bool HasMask;
+ bool DrawCursor;
+ bool isLocalChange;
+ bool HasAllowed;
+ bool HasDisabled;
+ std::string AllowedList;
+ std::string DisabledList;
+ unsigned MinLen;
+ unsigned MaxLen;
+};
+
+class HardwareKeyboard
+{
+public:
+ HardwareKeyboard(void);
+ virtual ~HardwareKeyboard();
+
+public:
+ virtual int KeyDown(int key_code);
+ virtual int KeyUp(int key_code);
+ virtual int KeyRepeat(void);
+};
+
+class GUISliderValue: public RenderObject, public ActionObject, public Conditional
+{
+public:
+ GUISliderValue(xml_node<>* node);
+ virtual ~GUISliderValue();
+
+public:
+ // Render - Render the full object to the GL surface
+ // Return 0 on success, <0 on error
+ virtual int Render(void);
+
+ // Update - Update any UI component animations (called <= 30 FPS)
+ // Return 0 if nothing to update, 1 on success and contiue, >1 if full render required, and <0 on error
+ virtual int Update(void);
+
+ // SetPos - Update the position of the render object
+ // Return 0 on success, <0 on error
+ virtual int SetRenderPos(int x, int y, int w = 0, int h = 0);
+
+ // NotifyTouch - Notify of a touch event
+ // Return 0 on success, >0 to ignore remainder of touch, and <0 on error
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+
+ // Notify of a variable change
+ virtual int NotifyVarChange(std::string varName, std::string value);
+
+ // SetPageFocus - Notify when a page gains or loses focus
+ virtual void SetPageFocus(int inFocus);
+
+protected:
+ int measureText(const std::string& str);
+ int valueFromPct(float pct);
+ float pctFromValue(int value);
+ void loadValue(bool force = false);
+
+ std::string mVariable;
+ int mMax;
+ int mMin;
+ int mValue;
+ char *mValueStr;
+ float mValuePct;
+ std::string mMaxStr;
+ std::string mMinStr;
+ Resource *mFont;
+ GUIText* mLabel;
+ int mLabelW;
+ COLOR mTextColor;
+ COLOR mLineColor;
+ COLOR mSliderColor;
+ bool mShowRange;
+ bool mShowCurr;
+ int mLineX;
+ int mLineY;
+ int mLineH;
+ int mLinePadding;
+ int mPadding;
+ int mSliderY;
+ int mSliderW;
+ int mSliderH;
+ bool mRendered;
+ int mFontHeight;
+ GUIAction *mAction;
+ bool mChangeOnDrag;
+ int lineW;
+};
+
+// Helper APIs
+bool LoadPlacement(xml_node<>* node, int* x, int* y, int* w = NULL, int* h = NULL, RenderObject::Placement* placement = NULL);
+
+#endif // _OBJECTS_HEADER
+
diff --git a/gui/pages.cpp b/gui/pages.cpp
new file mode 100644
index 000000000..d02dd216d
--- /dev/null
+++ b/gui/pages.cpp
@@ -0,0 +1,965 @@
+/*
+ Copyright 2013 bigbiff/Dees_Troy 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.cpp - Source to manage GUI base objects
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#ifndef TW_NO_SCREEN_TIMEOUT
+#include "blanktimer.hpp"
+#endif
+
+extern int gGuiRunning;
+#ifndef TW_NO_SCREEN_TIMEOUT
+extern blanktimer blankTimer;
+#endif
+
+std::map<std::string, PageSet*> PageManager::mPageSets;
+PageSet* PageManager::mCurrentSet;
+PageSet* PageManager::mBaseSet = NULL;
+
+// Helper routine to convert a string to a color declaration
+int ConvertStrToColor(std::string str, COLOR* color)
+{
+ // Set the default, solid black
+ memset(color, 0, sizeof(COLOR));
+ color->alpha = 255;
+
+ // Translate variables
+ DataManager::GetValue(str, str);
+
+ // Look for some defaults
+ if (str == "black") return 0;
+ else if (str == "white") { color->red = color->green = color->blue = 255; return 0; }
+ else if (str == "red") { color->red = 255; return 0; }
+ else if (str == "green") { color->green = 255; return 0; }
+ else if (str == "blue") { color->blue = 255; return 0; }
+
+ // At this point, we require an RGB(A) color
+ if (str[0] != '#')
+ return -1;
+
+ str.erase(0, 1);
+
+ int result;
+ if (str.size() >= 8) {
+ // We have alpha channel
+ string alpha = str.substr(6, 2);
+ result = strtol(alpha.c_str(), NULL, 16);
+ color->alpha = result & 0x000000FF;
+ str.resize(6);
+ result = strtol(str.c_str(), NULL, 16);
+ color->red = (result >> 16) & 0x000000FF;
+ color->green = (result >> 8) & 0x000000FF;
+ color->blue = result & 0x000000FF;
+ } else {
+ result = strtol(str.c_str(), NULL, 16);
+ color->red = (result >> 16) & 0x000000FF;
+ color->green = (result >> 8) & 0x000000FF;
+ color->blue = result & 0x000000FF;
+ }
+ return 0;
+}
+
+// Helper APIs
+bool LoadPlacement(xml_node<>* node, int* x, int* y, int* w /* = NULL */, int* h /* = NULL */, RenderObject::Placement* placement /* = NULL */)
+{
+ if (!node)
+ return false;
+
+ std::string value;
+ if (node->first_attribute("x"))
+ {
+ value = node->first_attribute("x")->value();
+ DataManager::GetValue(value, value);
+ *x = atol(value.c_str());
+ }
+
+ if (node->first_attribute("y"))
+ {
+ value = node->first_attribute("y")->value();
+ DataManager::GetValue(value, value);
+ *y = atol(value.c_str());
+ }
+
+ if (w && node->first_attribute("w"))
+ {
+ value = node->first_attribute("w")->value();
+ DataManager::GetValue(value, value);
+ *w = atol(value.c_str());
+ }
+
+ if (h && node->first_attribute("h"))
+ {
+ value = node->first_attribute("h")->value();
+ DataManager::GetValue(value, value);
+ *h = atol(value.c_str());
+ }
+
+ if (placement && node->first_attribute("placement"))
+ {
+ value = node->first_attribute("placement")->value();
+ DataManager::GetValue(value, value);
+ *placement = (RenderObject::Placement) atol(value.c_str());
+ }
+
+ return true;
+}
+
+int ActionObject::SetActionPos(int x, int y, int w, int h)
+{
+ if (x < 0 || y < 0)
+ return -1;
+
+ mActionX = x;
+ mActionY = y;
+ if (w || h)
+ {
+ mActionW = w;
+ mActionH = h;
+ }
+ return 0;
+}
+
+Page::Page(xml_node<>* page, xml_node<>* templates /* = NULL */)
+{
+ mTouchStart = NULL;
+
+ // We can memset the whole structure, because the alpha channel is ignored
+ memset(&mBackground, 0, sizeof(COLOR));
+
+ // With NULL, we make a console-only display
+ if (!page)
+ {
+ mName = "console";
+
+ GUIConsole* element = new GUIConsole(NULL);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ return;
+ }
+
+ if (page->first_attribute("name"))
+ mName = page->first_attribute("name")->value();
+ else
+ {
+ LOGERR("No page name attribute found!\n");
+ return;
+ }
+
+ LOGINFO("Loading page %s\n", mName.c_str());
+
+ // This is a recursive routine for template handling
+ ProcessNode(page, templates);
+
+ return;
+}
+
+bool Page::ProcessNode(xml_node<>* page, xml_node<>* templates /* = NULL */, int depth /* = 0 */)
+{
+ if (depth == 10)
+ {
+ LOGERR("Page processing depth has exceeded 10. Failing out. This is likely a recursive template.\n");
+ return false;
+ }
+
+ // Let's retrieve the background value, if any
+ xml_node<>* bg = page->first_node("background");
+ if (bg)
+ {
+ xml_attribute<>* attr = bg->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackground);
+ }
+ }
+
+ xml_node<>* child;
+ child = page->first_node("object");
+ while (child)
+ {
+ if (!child->first_attribute("type"))
+ break;
+
+ std::string type = child->first_attribute("type")->value();
+
+ if (type == "text")
+ {
+ GUIText* element = new GUIText(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "image")
+ {
+ GUIImage* element = new GUIImage(child);
+ mRenders.push_back(element);
+ }
+ else if (type == "fill")
+ {
+ GUIFill* element = new GUIFill(child);
+ mRenders.push_back(element);
+ }
+ else if (type == "action")
+ {
+ GUIAction* element = new GUIAction(child);
+ mActions.push_back(element);
+ }
+ else if (type == "console")
+ {
+ GUIConsole* element = new GUIConsole(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "button")
+ {
+ GUIButton* element = new GUIButton(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "checkbox")
+ {
+ GUICheckbox* element = new GUICheckbox(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "fileselector")
+ {
+ GUIFileSelector* element = new GUIFileSelector(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "animation")
+ {
+ GUIAnimation* element = new GUIAnimation(child);
+ mRenders.push_back(element);
+ }
+ else if (type == "progressbar")
+ {
+ GUIProgressBar* element = new GUIProgressBar(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "slider")
+ {
+ GUISlider* element = new GUISlider(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "slidervalue")
+ {
+ GUISliderValue *element = new GUISliderValue(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "listbox")
+ {
+ GUIListBox* element = new GUIListBox(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "keyboard")
+ {
+ GUIKeyboard* element = new GUIKeyboard(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "input")
+ {
+ GUIInput* element = new GUIInput(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ mInputs.push_back(element);
+ }
+ else if (type == "partitionlist")
+ {
+ GUIPartitionList* element = new GUIPartitionList(child);
+ mRenders.push_back(element);
+ mActions.push_back(element);
+ }
+ else if (type == "template")
+ {
+ if (!templates || !child->first_attribute("name"))
+ {
+ LOGERR("Invalid template request.\n");
+ }
+ else
+ {
+ std::string name = child->first_attribute("name")->value();
+
+ // We need to find the correct template
+ xml_node<>* node;
+ node = templates->first_node("template");
+
+ while (node)
+ {
+ if (!node->first_attribute("name"))
+ continue;
+
+ if (name == node->first_attribute("name")->value())
+ {
+ if (!ProcessNode(node, templates, depth + 1))
+ return false;
+ else
+ break;
+ }
+ node = node->next_sibling("template");
+ }
+ }
+ }
+ else
+ {
+ LOGERR("Unknown object type.\n");
+ }
+ child = child->next_sibling("object");
+ }
+ return true;
+}
+
+int Page::Render(void)
+{
+ // Render background
+ gr_color(mBackground.red, mBackground.green, mBackground.blue, mBackground.alpha);
+ gr_fill(0, 0, gr_fb_width(), gr_fb_height());
+
+ // Render remaining objects
+ std::vector<RenderObject*>::iterator iter;
+ for (iter = mRenders.begin(); iter != mRenders.end(); iter++)
+ {
+ if ((*iter)->Render())
+ LOGERR("A render request has failed.\n");
+ }
+ return 0;
+}
+
+int Page::Update(void)
+{
+ int retCode = 0;
+
+ std::vector<RenderObject*>::iterator iter;
+ for (iter = mRenders.begin(); iter != mRenders.end(); iter++)
+ {
+ int ret = (*iter)->Update();
+ if (ret < 0)
+ LOGERR("An update request has failed.\n");
+ else if (ret > retCode)
+ retCode = ret;
+ }
+
+ return retCode;
+}
+
+int Page::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ // By default, return 1 to ignore further touches if nobody is listening
+ int ret = 1;
+
+ // Don't try to handle a lack of handlers
+ if (mActions.size() == 0)
+ return ret;
+
+ // We record mTouchStart so we can pass all the touch stream to the same handler
+ if (state == TOUCH_START)
+ {
+ std::vector<ActionObject*>::reverse_iterator iter;
+ // We work backwards, from top-most element to bottom-most element
+ for (iter = mActions.rbegin(); iter != mActions.rend(); iter++)
+ {
+ if ((*iter)->IsInRegion(x, y))
+ {
+ mTouchStart = (*iter);
+ ret = mTouchStart->NotifyTouch(state, x, y);
+ if (ret >= 0)
+ break;
+ mTouchStart = NULL;
+ }
+ }
+ }
+ else if (state == TOUCH_RELEASE && mTouchStart != NULL)
+ {
+ ret = mTouchStart->NotifyTouch(state, x, y);
+ mTouchStart = NULL;
+ }
+ else if ((state == TOUCH_DRAG || state == TOUCH_HOLD || state == TOUCH_REPEAT) && mTouchStart != NULL)
+ {
+ ret = mTouchStart->NotifyTouch(state, x, y);
+ }
+ return ret;
+}
+
+int Page::NotifyKey(int key)
+{
+ std::vector<ActionObject*>::reverse_iterator iter;
+
+ // Don't try to handle a lack of handlers
+ if (mActions.size() == 0)
+ return 1;
+
+ // We work backwards, from top-most element to bottom-most element
+ for (iter = mActions.rbegin(); iter != mActions.rend(); iter++)
+ {
+ int ret = (*iter)->NotifyKey(key);
+ if (ret == 0)
+ return 0;
+ else if (ret < 0)
+ LOGERR("An action handler has returned an error");
+ }
+ return 1;
+}
+
+int Page::NotifyKeyboard(int key)
+{
+ std::vector<InputObject*>::reverse_iterator iter;
+
+ // Don't try to handle a lack of handlers
+ if (mInputs.size() == 0)
+ return 1;
+
+ // We work backwards, from top-most element to bottom-most element
+ for (iter = mInputs.rbegin(); iter != mInputs.rend(); iter++)
+ {
+ int ret = (*iter)->NotifyKeyboard(key);
+ if (ret == 0)
+ return 0;
+ else if (ret < 0)
+ LOGERR("A keyboard handler has returned an error");
+ }
+ return 1;
+}
+
+int Page::SetKeyBoardFocus(int inFocus)
+{
+ std::vector<InputObject*>::reverse_iterator iter;
+
+ // Don't try to handle a lack of handlers
+ if (mInputs.size() == 0)
+ return 1;
+
+ // We work backwards, from top-most element to bottom-most element
+ for (iter = mInputs.rbegin(); iter != mInputs.rend(); iter++)
+ {
+ int ret = (*iter)->SetInputFocus(inFocus);
+ if (ret == 0)
+ return 0;
+ else if (ret < 0)
+ LOGERR("An input focus handler has returned an error");
+ }
+ return 1;
+}
+
+void Page::SetPageFocus(int inFocus)
+{
+ // Render remaining objects
+ std::vector<RenderObject*>::iterator iter;
+ for (iter = mRenders.begin(); iter != mRenders.end(); iter++)
+ (*iter)->SetPageFocus(inFocus);
+
+ return;
+}
+
+int Page::NotifyVarChange(std::string varName, std::string value)
+{
+ std::vector<ActionObject*>::iterator iter;
+
+ // Don't try to handle a lack of handlers
+ if (mActions.size() == 0)
+ return 1;
+
+ for (iter = mActions.begin(); iter != mActions.end(); ++iter)
+ {
+ if ((*iter)->NotifyVarChange(varName, value))
+ LOGERR("An action handler errored on NotifyVarChange.\n");
+ }
+ return 0;
+}
+
+PageSet::PageSet(char* xmlFile)
+{
+ mResources = NULL;
+ mCurrentPage = NULL;
+ mOverlayPage = NULL;
+
+ mXmlFile = xmlFile;
+ if (xmlFile)
+ mDoc.parse<0>(mXmlFile);
+ else
+ mCurrentPage = new Page(NULL);
+}
+
+PageSet::~PageSet()
+{
+ delete mResources;
+ free(mXmlFile);
+}
+
+int PageSet::Load(ZipArchive* package)
+{
+ xml_node<>* parent;
+ xml_node<>* child;
+ xml_node<>* templates;
+
+ parent = mDoc.first_node("recovery");
+ if (!parent)
+ parent = mDoc.first_node("install");
+
+ // Now, let's parse the XML
+ LOGINFO("Loading resources...\n");
+ child = parent->first_node("resources");
+ if (child)
+ mResources = new ResourceManager(child, package);
+
+ LOGINFO("Loading variables...\n");
+ child = parent->first_node("variables");
+ if (child)
+ LoadVariables(child);
+
+ LOGINFO("Loading pages...\n");
+ // This may be NULL if no templates are present
+ templates = parent->first_node("templates");
+
+ child = parent->first_node("pages");
+ if (!child)
+ return -1;
+
+ return LoadPages(child, templates);
+}
+
+int PageSet::SetPage(std::string page)
+{
+ Page* tmp = FindPage(page);
+ if (tmp)
+ {
+ if (mCurrentPage) mCurrentPage->SetPageFocus(0);
+ mCurrentPage = tmp;
+ mCurrentPage->SetPageFocus(1);
+ mCurrentPage->NotifyVarChange("", "");
+ return 0;
+ }
+ else
+ {
+ LOGERR("Unable to locate page (%s)\n", page.c_str());
+ }
+ return -1;
+}
+
+int PageSet::SetOverlay(Page* page)
+{
+ if (mOverlayPage) mOverlayPage->SetPageFocus(0);
+ mOverlayPage = page;
+ if (mOverlayPage)
+ {
+ mOverlayPage->SetPageFocus(1);
+ mOverlayPage->NotifyVarChange("", "");
+ }
+ return 0;
+}
+
+Resource* PageSet::FindResource(std::string name)
+{
+ return mResources ? mResources->FindResource(name) : NULL;
+}
+
+Page* PageSet::FindPage(std::string name)
+{
+ std::vector<Page*>::iterator iter;
+
+ for (iter = mPages.begin(); iter != mPages.end(); iter++)
+ {
+ if (name == (*iter)->GetName())
+ return (*iter);
+ }
+ return NULL;
+}
+
+int PageSet::LoadVariables(xml_node<>* vars)
+{
+ xml_node<>* child;
+
+ child = vars->first_node("variable");
+ while (child)
+ {
+ if (!child->first_attribute("name"))
+ break;
+ if (!child->first_attribute("value"))
+ break;
+
+ DataManager::SetValue(child->first_attribute("name")->value(), child->first_attribute("value")->value());
+ child = child->next_sibling("variable");
+ }
+ return 0;
+}
+
+int PageSet::LoadPages(xml_node<>* pages, xml_node<>* templates /* = NULL */)
+{
+ xml_node<>* child;
+
+ if (!pages)
+ return -1;
+
+ child = pages->first_node("page");
+ while (child != NULL)
+ {
+ Page* page = new Page(child, templates);
+ if (page->GetName().empty())
+ {
+ LOGERR("Unable to process load page\n");
+ delete page;
+ }
+ else
+ {
+ mPages.push_back(page);
+ }
+ child = child->next_sibling("page");
+ }
+ if (mPages.size() > 0)
+ return 0;
+ return -1;
+}
+
+int PageSet::IsCurrentPage(Page* page)
+{
+ return ((mCurrentPage && mCurrentPage == page) ? 1 : 0);
+}
+
+int PageSet::Render(void)
+{
+ int ret;
+
+ ret = (mCurrentPage ? mCurrentPage->Render() : -1);
+ if (ret < 0)
+ return ret;
+ ret = (mOverlayPage ? mOverlayPage->Render() : -1);
+ return ret;
+}
+
+int PageSet::Update(void)
+{
+ int ret;
+
+ ret = (mCurrentPage ? mCurrentPage->Update() : -1);
+ if (ret < 0 || ret > 1)
+ return ret;
+ ret = (mOverlayPage ? mOverlayPage->Update() : -1);
+ return ret;
+}
+
+int PageSet::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ if (mOverlayPage)
+ return (mOverlayPage->NotifyTouch(state, x, y));
+
+ return (mCurrentPage ? mCurrentPage->NotifyTouch(state, x, y) : -1);
+}
+
+int PageSet::NotifyKey(int key)
+{
+ if (mOverlayPage)
+ return (mOverlayPage->NotifyKey(key));
+
+ return (mCurrentPage ? mCurrentPage->NotifyKey(key) : -1);
+}
+
+int PageSet::NotifyKeyboard(int key)
+{
+ if (mOverlayPage)
+ return (mOverlayPage->NotifyKeyboard(key));
+
+ return (mCurrentPage ? mCurrentPage->NotifyKeyboard(key) : -1);
+}
+
+int PageSet::SetKeyBoardFocus(int inFocus)
+{
+ if (mOverlayPage)
+ return (mOverlayPage->SetKeyBoardFocus(inFocus));
+
+ return (mCurrentPage ? mCurrentPage->SetKeyBoardFocus(inFocus) : -1);
+}
+
+int PageSet::NotifyVarChange(std::string varName, std::string value)
+{
+ if (mOverlayPage)
+ mOverlayPage->NotifyVarChange(varName, value);
+
+ return (mCurrentPage ? mCurrentPage->NotifyVarChange(varName, value) : -1);
+}
+
+int PageManager::LoadPackage(std::string name, std::string package, std::string startpage)
+{
+ int fd;
+ ZipArchive zip, *pZip = NULL;
+ long len;
+ char* xmlFile = NULL;
+ PageSet* pageSet = NULL;
+ int ret;
+
+ // Open the XML file
+ LOGINFO("Loading package: %s (%s)\n", name.c_str(), package.c_str());
+ if (mzOpenZipArchive(package.c_str(), &zip))
+ {
+ // We can try to load the XML directly...
+ struct stat st;
+ if(stat(package.c_str(),&st) != 0)
+ return -1;
+
+ len = st.st_size;
+ xmlFile = (char*) malloc(len + 1);
+ if (!xmlFile)
+ return -1;
+
+ fd = open(package.c_str(), O_RDONLY);
+ if (fd == -1)
+ goto error;
+
+ read(fd, xmlFile, len);
+ close(fd);
+ }
+ else
+ {
+ pZip = &zip;
+ const ZipEntry* ui_xml = mzFindZipEntry(&zip, "ui.xml");
+ if (ui_xml == NULL)
+ {
+ LOGERR("Unable to locate ui.xml in zip file\n");
+ goto error;
+ }
+
+ // Allocate the buffer for the file
+ len = mzGetZipEntryUncompLen(ui_xml);
+ xmlFile = (char*) malloc(len + 1);
+ if (!xmlFile)
+ goto error;
+
+ if (!mzExtractZipEntryToBuffer(&zip, ui_xml, (unsigned char*) xmlFile))
+ {
+ LOGERR("Unable to extract ui.xml\n");
+ goto error;
+ }
+ }
+
+ // NULL-terminate the string
+ xmlFile[len] = 0x00;
+
+ // Before loading, mCurrentSet must be the loading package so we can find resources
+ pageSet = mCurrentSet;
+ mCurrentSet = new PageSet(xmlFile);
+
+ ret = mCurrentSet->Load(pZip);
+ if (ret == 0)
+ {
+ mCurrentSet->SetPage(startpage);
+ mPageSets.insert(std::pair<std::string, PageSet*>(name, mCurrentSet));
+ }
+ else
+ {
+ LOGERR("Package %s failed to load.\n", name.c_str());
+ }
+
+ // The first successful package we loaded is the base
+ if (mBaseSet == NULL)
+ mBaseSet = mCurrentSet;
+
+ mCurrentSet = pageSet;
+
+ if (pZip)
+ mzCloseZipArchive(pZip);
+ return ret;
+
+error:
+ LOGERR("An internal error has occurred.\n");
+ if (pZip)
+ mzCloseZipArchive(pZip);
+ if (xmlFile)
+ free(xmlFile);
+ return -1;
+}
+
+PageSet* PageManager::FindPackage(std::string name)
+{
+ std::map<std::string, PageSet*>::iterator iter;
+
+ iter = mPageSets.find(name);
+ if (iter != mPageSets.end())
+ return (*iter).second;
+
+ LOGERR("Unable to locate package %s\n", name.c_str());
+ return NULL;
+}
+
+PageSet* PageManager::SelectPackage(std::string name)
+{
+ LOGINFO("Switching packages (%s)\n", name.c_str());
+ PageSet* tmp;
+
+ tmp = FindPackage(name);
+ if (tmp)
+ mCurrentSet = tmp;
+ else
+ LOGERR("Unable to find package.\n");
+
+ return mCurrentSet;
+}
+
+int PageManager::ReloadPackage(std::string name, std::string package)
+{
+ std::map<std::string, PageSet*>::iterator iter;
+
+ iter = mPageSets.find(name);
+ if (iter == mPageSets.end())
+ return -1;
+
+ PageSet* set = (*iter).second;
+ mPageSets.erase(iter);
+
+ if (LoadPackage(name, package, "main") != 0)
+ {
+ LOGERR("Failed to load package.\n");
+ mPageSets.insert(std::pair<std::string, PageSet*>(name, set));
+ return -1;
+ }
+ if (mCurrentSet == set)
+ SelectPackage(name);
+ delete set;
+ return 0;
+}
+
+void PageManager::ReleasePackage(std::string name)
+{
+ std::map<std::string, PageSet*>::iterator iter;
+
+ iter = mPageSets.find(name);
+ if (iter == mPageSets.end())
+ return;
+
+ PageSet* set = (*iter).second;
+ mPageSets.erase(iter);
+ delete set;
+ return;
+}
+
+int PageManager::ChangePage(std::string name)
+{
+ DataManager::SetValue("tw_operation_state", 0);
+ int ret = (mCurrentSet ? mCurrentSet->SetPage(name) : -1);
+ return ret;
+}
+
+int PageManager::ChangeOverlay(std::string name)
+{
+ if (name.empty())
+ return mCurrentSet->SetOverlay(NULL);
+ else
+ {
+ Page* page = mBaseSet ? mBaseSet->FindPage(name) : NULL;
+ return mCurrentSet->SetOverlay(page);
+ }
+}
+
+Resource* PageManager::FindResource(std::string name)
+{
+ return (mCurrentSet ? mCurrentSet->FindResource(name) : NULL);
+}
+
+Resource* PageManager::FindResource(std::string package, std::string name)
+{
+ PageSet* tmp;
+
+ tmp = FindPackage(name);
+ return (tmp ? tmp->FindResource(name) : NULL);
+}
+
+int PageManager::SwitchToConsole(void)
+{
+ PageSet* console = new PageSet(NULL);
+
+ mCurrentSet = console;
+ return 0;
+}
+
+int PageManager::IsCurrentPage(Page* page)
+{
+ return (mCurrentSet ? mCurrentSet->IsCurrentPage(page) : 0);
+}
+
+int PageManager::Render(void)
+{
+ return (mCurrentSet ? mCurrentSet->Render() : -1);
+}
+
+int PageManager::Update(void)
+{
+#ifndef TW_NO_SCREEN_TIMEOUT
+ if(blankTimer.IsScreenOff())
+ return 0;
+#endif
+ return (mCurrentSet ? mCurrentSet->Update() : -1);
+}
+
+int PageManager::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ return (mCurrentSet ? mCurrentSet->NotifyTouch(state, x, y) : -1);
+}
+
+int PageManager::NotifyKey(int key)
+{
+ return (mCurrentSet ? mCurrentSet->NotifyKey(key) : -1);
+}
+
+int PageManager::NotifyKeyboard(int key)
+{
+ return (mCurrentSet ? mCurrentSet->NotifyKeyboard(key) : -1);
+}
+
+int PageManager::SetKeyBoardFocus(int inFocus)
+{
+ return (mCurrentSet ? mCurrentSet->SetKeyBoardFocus(inFocus) : -1);
+}
+
+int PageManager::NotifyVarChange(std::string varName, std::string value)
+{
+ return (mCurrentSet ? mCurrentSet->NotifyVarChange(varName, value) : -1);
+}
+
+extern "C" void gui_notifyVarChange(const char *name, const char* value)
+{
+ if (!gGuiRunning)
+ return;
+
+ PageManager::NotifyVarChange(name, value);
+}
diff --git a/gui/pages.h b/gui/pages.h
new file mode 100644
index 000000000..d407162a2
--- /dev/null
+++ b/gui/pages.h
@@ -0,0 +1,7 @@
+#ifndef _PAGES_HEADER
+#define _PAGES_HEADER
+
+void gui_notifyVarChange(const char *name, const char* value);
+
+#endif // _PAGES_HEADER
+
diff --git a/gui/pages.hpp b/gui/pages.hpp
new file mode 100644
index 000000000..a37cdb9f2
--- /dev/null
+++ b/gui/pages.hpp
@@ -0,0 +1,142 @@
+// pages.hpp - Base classes for page manager of GUI
+
+#ifndef _PAGES_HEADER_HPP
+#define _PAGES_HEADER_HPP
+
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+
+typedef struct {
+ unsigned char red;
+ unsigned char green;
+ unsigned char blue;
+ unsigned char alpha;
+} COLOR;
+
+// Utility Functions
+int ConvertStrToColor(std::string str, COLOR* color);
+int gui_forceRender(void);
+int gui_changePage(std::string newPage);
+int gui_changeOverlay(std::string newPage);
+std::string gui_parse_text(string inText);
+
+class Resource;
+class ResourceManager;
+class RenderObject;
+class ActionObject;
+class InputObject;
+
+class Page
+{
+public:
+ virtual ~Page() {}
+
+public:
+ Page(xml_node<>* page, xml_node<>* templates = NULL);
+ std::string GetName(void) { return mName; }
+
+public:
+ virtual int Render(void);
+ virtual int Update(void);
+ virtual int NotifyTouch(TOUCH_STATE state, int x, int y);
+ virtual int NotifyKey(int key);
+ virtual int NotifyKeyboard(int key);
+ virtual int SetKeyBoardFocus(int inFocus);
+ virtual int NotifyVarChange(std::string varName, std::string value);
+ virtual void SetPageFocus(int inFocus);
+
+protected:
+ std::string mName;
+ std::vector<RenderObject*> mRenders;
+ std::vector<ActionObject*> mActions;
+ std::vector<InputObject*> mInputs;
+
+ ActionObject* mTouchStart;
+ COLOR mBackground;
+
+protected:
+ bool ProcessNode(xml_node<>* page, xml_node<>* templates = NULL, int depth = 0);
+};
+
+class PageSet
+{
+public:
+ PageSet(char* xmlFile);
+ virtual ~PageSet();
+
+public:
+ int Load(ZipArchive* package);
+
+ Page* FindPage(std::string name);
+ int SetPage(std::string page);
+ int SetOverlay(Page* page);
+ Resource* FindResource(std::string name);
+
+ // Helper routine for identifing if we're the current page
+ int IsCurrentPage(Page* page);
+
+ // These are routing routines
+ int Render(void);
+ int Update(void);
+ int NotifyTouch(TOUCH_STATE state, int x, int y);
+ int NotifyKey(int key);
+ int NotifyKeyboard(int key);
+ int SetKeyBoardFocus(int inFocus);
+ int NotifyVarChange(std::string varName, std::string value);
+
+protected:
+ int LoadPages(xml_node<>* pages, xml_node<>* templates = NULL);
+ int LoadVariables(xml_node<>* vars);
+
+protected:
+ char* mXmlFile;
+ xml_document<> mDoc;
+ ResourceManager* mResources;
+ std::vector<Page*> mPages;
+ Page* mCurrentPage;
+ Page* mOverlayPage; // This is a special case, used for "locking" the screen
+};
+
+class PageManager
+{
+public:
+ // Used by GUI
+ static int LoadPackage(std::string name, std::string package, std::string startpage);
+ static PageSet* SelectPackage(std::string name);
+ static int ReloadPackage(std::string name, std::string package);
+ static void ReleasePackage(std::string name);
+
+ // Used for actions and pages
+ static int ChangePage(std::string name);
+ static int ChangeOverlay(std::string name);
+ static Resource* FindResource(std::string name);
+ static Resource* FindResource(std::string package, std::string name);
+
+ // Used for console-only mode - Can be reverted via ChangePage
+ static int SwitchToConsole(void);
+
+ // Helper to identify if a particular page is the active page
+ static int IsCurrentPage(Page* page);
+
+ // These are routing routines
+ static int Render(void);
+ static int Update(void);
+ static int NotifyTouch(TOUCH_STATE state, int x, int y);
+ static int NotifyKey(int key);
+ static int NotifyKeyboard(int key);
+ static int SetKeyBoardFocus(int inFocus);
+ static int NotifyVarChange(std::string varName, std::string value);
+
+protected:
+ static PageSet* FindPackage(std::string name);
+
+protected:
+ static std::map<std::string, PageSet*> mPageSets;
+ static PageSet* mCurrentSet;
+ static PageSet* mBaseSet;
+};
+
+#endif // _PAGES_HEADER_HPP
diff --git a/gui/partitionlist.cpp b/gui/partitionlist.cpp
new file mode 100644
index 000000000..abe0a38ad
--- /dev/null
+++ b/gui/partitionlist.cpp
@@ -0,0 +1,924 @@
+/*
+ Copyright 2013 bigbiff/Dees_Troy 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 <linux/input.h>
+#include <pthread.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <dirent.h>
+#include <ctype.h>
+
+#include <algorithm>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+#include "../data.hpp"
+#include "../twrp-functions.hpp"
+#include "../partitions.hpp"
+
+#define SCROLLING_SPEED_DECREMENT 6
+#define SCROLLING_FLOOR 10
+#define SCROLLING_MULTIPLIER 6
+
+GUIPartitionList::GUIPartitionList(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+ int header_separator_color_specified = 0, header_separator_height_specified = 0, header_text_color_specified = 0, header_background_color_specified = 0;
+
+ mStart = mLineSpacing = startY = mFontHeight = mSeparatorH = scrollingY = scrollingSpeed = 0;
+ mIconWidth = mIconHeight = mSelectedIconHeight = mSelectedIconWidth = mUnselectedIconHeight = mUnselectedIconWidth = mHeaderIconHeight = mHeaderIconWidth = 0;
+ mHeaderSeparatorH = mLineHeight = mHeaderIsStatic = mHeaderH = actualLineHeight = 0;
+ mIconSelected = mIconUnselected = mBackground = mFont = mHeaderIcon = NULL;
+ mBackgroundX = mBackgroundY = mBackgroundW = mBackgroundH = 0;
+ mFastScrollW = mFastScrollLineW = mFastScrollRectW = mFastScrollRectH = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ mUpdate = 0;
+ touchDebounce = 6;
+ ConvertStrToColor("black", &mBackgroundColor);
+ ConvertStrToColor("black", &mHeaderBackgroundColor);
+ ConvertStrToColor("black", &mSeparatorColor);
+ ConvertStrToColor("black", &mHeaderSeparatorColor);
+ ConvertStrToColor("white", &mFontColor);
+ ConvertStrToColor("white", &mHeaderFontColor);
+ ConvertStrToColor("white", &mFastScrollLineColor);
+ ConvertStrToColor("white", &mFastScrollRectColor);
+ hasHighlightColor = false;
+ hasFontHighlightColor = false;
+ isHighlighted = false;
+ updateList = false;
+ startSelection = -1;
+
+ // Load header text
+ child = node->first_node("header");
+ if (child)
+ {
+ attr = child->first_attribute("icon");
+ if (attr)
+ mHeaderIcon = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("background");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ header_background_color_specified = -1;
+ }
+ attr = child->first_attribute("textcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderFontColor);
+ header_text_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ header_separator_color_specified = -1;
+ }
+ attr = child->first_attribute("separatorheight");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mHeaderSeparatorH = atoi(parsevalue.c_str());
+ header_separator_height_specified = -1;
+ }
+ }
+ child = node->first_node("text");
+ if (child) mHeaderText = child->value();
+
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ child = node->first_node("highlight");
+ if (child) {
+ attr = child->first_attribute("color");
+ if (attr) {
+ hasHighlightColor = true;
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ }
+ }
+
+ // Simple way to check for static state
+ mLastValue = gui_parse_text(mHeaderText);
+ if (mLastValue != mHeaderText)
+ mHeaderIsStatic = 0;
+ else
+ mHeaderIsStatic = -1;
+
+ child = node->first_node("icon");
+ if (child)
+ {
+ attr = child->first_attribute("selected");
+ if (attr)
+ mIconSelected = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("unselected");
+ if (attr)
+ mIconUnselected = PageManager::FindResource(attr->value());
+ }
+ child = node->first_node("background");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mBackground = PageManager::FindResource(attr->value());
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mBackgroundColor);
+ if (!header_background_color_specified)
+ ConvertStrToColor(color, &mHeaderBackgroundColor);
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+
+ // Load the font, and possibly override the color
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontColor);
+ if (!header_text_color_specified)
+ ConvertStrToColor(color, &mHeaderFontColor);
+ }
+
+ attr = child->first_attribute("spacing");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mLineSpacing = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("highlightcolor");
+ memset(&mFontHighlightColor, 0, sizeof(COLOR));
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mFontHighlightColor);
+ hasFontHighlightColor = true;
+ }
+ }
+
+ // Load the separator if it exists
+ child = node->first_node("separator");
+ if (child)
+ {
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mSeparatorColor);
+ if (!header_separator_color_specified)
+ ConvertStrToColor(color, &mHeaderSeparatorColor);
+ }
+
+ attr = child->first_attribute("height");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mSeparatorH = atoi(parsevalue.c_str());
+ if (!header_separator_height_specified)
+ mHeaderSeparatorH = mSeparatorH;
+ }
+ }
+
+ // Handle the result variable
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("name");
+ if (attr)
+ mVariable = attr->value();
+ attr = child->first_attribute("selectedlist");
+ if (attr)
+ selectedList = attr->value();
+ }
+
+ // Fast scroll colors
+ child = node->first_node("fastscroll");
+ if (child)
+ {
+ attr = child->first_attribute("linecolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollLineColor);
+
+ attr = child->first_attribute("rectcolor");
+ if(attr)
+ ConvertStrToColor(attr->value(), &mFastScrollRectColor);
+
+ attr = child->first_attribute("w");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("linew");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollLineW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("rectw");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("recth");
+ if (attr) {
+ string parsevalue = gui_parse_text(attr->value());
+ mFastScrollRectH = atoi(parsevalue.c_str());
+ }
+ }
+
+ // Retrieve the line height
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, &mFontHeight, NULL);
+ mLineHeight = mFontHeight;
+ mHeaderH = mFontHeight;
+
+ if (mIconSelected && mIconSelected->GetResource())
+ {
+ mSelectedIconWidth = gr_get_width(mIconSelected->GetResource());
+ mSelectedIconHeight = gr_get_height(mIconSelected->GetResource());
+ if (mSelectedIconHeight > (int)mLineHeight)
+ mLineHeight = mSelectedIconHeight;
+ mIconWidth = mSelectedIconWidth;
+ }
+
+ if (mIconUnselected && mIconUnselected->GetResource())
+ {
+ mUnselectedIconWidth = gr_get_width(mIconUnselected->GetResource());
+ mUnselectedIconHeight = gr_get_height(mIconUnselected->GetResource());
+ if (mUnselectedIconHeight > (int)mLineHeight)
+ mLineHeight = mUnselectedIconHeight;
+ if (mUnselectedIconWidth > mIconWidth)
+ mIconWidth = mUnselectedIconWidth;
+ }
+
+ if (mHeaderIcon && mHeaderIcon->GetResource())
+ {
+ mHeaderIconWidth = gr_get_width(mHeaderIcon->GetResource());
+ mHeaderIconHeight = gr_get_height(mHeaderIcon->GetResource());
+ if (mHeaderIconHeight > mHeaderH)
+ mHeaderH = mHeaderIconHeight;
+ if (mHeaderIconWidth > mIconWidth)
+ mIconWidth = mHeaderIconWidth;
+ }
+
+ mHeaderH += mLineSpacing + mHeaderSeparatorH;
+ actualLineHeight = mLineHeight + mLineSpacing + mSeparatorH;
+ if (mHeaderH < actualLineHeight)
+ mHeaderH = actualLineHeight;
+
+ if (actualLineHeight / 3 > 6)
+ touchDebounce = actualLineHeight / 3;
+
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundW = gr_get_width(mBackground->GetResource());
+ mBackgroundH = gr_get_height(mBackground->GetResource());
+ }
+
+ child = node->first_node("listtype");
+ if (child) {
+ attr = child->first_attribute("name");
+ if (attr) {
+ ListType = attr->value();
+ PartitionManager.Get_Partition_List(ListType, &mList);
+ } else {
+ mList.clear();
+ LOGERR("No partition listtype name specified for partitionlist GUI element\n");
+ return;
+ }
+ } else {
+ mList.clear();
+ LOGERR("No partition listtype specified for partitionlist GUI element\n");
+ return;
+ }
+}
+
+GUIPartitionList::~GUIPartitionList()
+{
+}
+
+int GUIPartitionList::Render(void)
+{
+ // First step, fill background
+ gr_color(mBackgroundColor.red, mBackgroundColor.green, mBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY + mHeaderH, mRenderW, mRenderH - mHeaderH);
+
+ // Next, render the background resource (if it exists)
+ if (mBackground && mBackground->GetResource())
+ {
+ mBackgroundX = mRenderX + ((mRenderW - mBackgroundW) / 2);
+ mBackgroundY = mRenderY + ((mRenderH - mBackgroundH) / 2);
+ gr_blit(mBackground->GetResource(), 0, 0, mBackgroundW, mBackgroundH, mBackgroundX, mBackgroundY);
+ }
+
+ // This tells us how many lines we can actually render
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ int line;
+
+ if (updateList) {
+ mList.clear();
+ PartitionManager.Get_Partition_List(ListType, &mList);
+ updateList = false;
+ if (ListType == "backup")
+ MatchList();
+ }
+
+ int listSize = mList.size();
+ int listW = mRenderW;
+
+ if (listSize < lines) {
+ lines = listSize;
+ scrollingY = 0;
+ mFastScrollRectX = mFastScrollRectY = -1;
+ } else {
+ lines++;
+ if (lines < listSize)
+ lines++;
+ if (listSize >= lines)
+ listW -= mFastScrollW; // space for fast scrollbar
+ else
+ mFastScrollRectX = mFastScrollRectY = -1; // no fast scrollbar
+ }
+
+ void* fontResource = NULL;
+ if (mFont) fontResource = mFont->GetResource();
+
+ int yPos = mRenderY + mHeaderH + scrollingY;
+ int fontOffsetY = (int)((actualLineHeight - mFontHeight) / 2);
+ int currentIconHeight = 0, currentIconWidth = 0;
+ int currentIconOffsetY = 0, currentIconOffsetX = 0;
+ int UnselectedIconOffsetY = (int)((actualLineHeight - mUnselectedIconHeight) / 2), SelectedIconOffsetY = (int)((actualLineHeight - mSelectedIconHeight) / 2);
+ int UnselectedIconOffsetX = (mIconWidth - mUnselectedIconWidth) / 2, SelectedIconOffsetX = (mIconWidth - mSelectedIconWidth) / 2;
+ int actualSelection = mStart;
+
+ if (isHighlighted) {
+ int selectY = scrollingY;
+
+ // Locate the correct line for highlighting
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+ if (hasHighlightColor) {
+ // Highlight the area
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, 255);
+ int HighlightHeight = actualLineHeight;
+ if (mRenderY + mHeaderH + selectY + actualLineHeight > mRenderH + mRenderY) {
+ HighlightHeight = actualLineHeight - (mRenderY + mHeaderH + selectY + actualLineHeight - mRenderH - mRenderY);
+ }
+ gr_fill(mRenderX, mRenderY + mHeaderH + selectY, mRenderW, HighlightHeight);
+ }
+ }
+
+ for (line = 0; line < lines; line++)
+ {
+ Resource* icon;
+ std::string label;
+
+ if (line + mStart >= listSize)
+ continue;
+
+ label = mList.at(line + mStart).Display_Name;
+ if (isHighlighted && hasFontHighlightColor && line + mStart == actualSelection) {
+ // Use the highlight color for the font
+ gr_color(mFontHighlightColor.red, mFontHighlightColor.green, mFontHighlightColor.blue, 255);
+ } else {
+ // Set the color for the font
+ gr_color(mFontColor.red, mFontColor.green, mFontColor.blue, 255);
+ }
+
+ if (mList.at(line + mStart).selected != 0)
+ {
+ icon = mIconSelected;
+ currentIconHeight = mSelectedIconHeight;
+ currentIconWidth = mSelectedIconWidth;
+ currentIconOffsetY = SelectedIconOffsetY;
+ currentIconOffsetX = SelectedIconOffsetX;
+ }
+ else
+ {
+ icon = mIconUnselected;
+ currentIconHeight = mSelectedIconHeight;
+ currentIconWidth = mSelectedIconWidth;
+ currentIconOffsetY = SelectedIconOffsetY;
+ currentIconOffsetX = SelectedIconOffsetX;
+ }
+
+ if (icon && icon->GetResource())
+ {
+ int rect_y = 0, image_y = (yPos + currentIconOffsetY);
+ if (image_y + currentIconHeight > mRenderY + mRenderH)
+ rect_y = mRenderY + mRenderH - image_y;
+ else
+ rect_y = currentIconHeight;
+ gr_blit(icon->GetResource(), 0, 0, currentIconWidth, rect_y, mRenderX + currentIconOffsetX, image_y);
+ }
+ gr_textExWH(mRenderX + mIconWidth + 5, yPos + fontOffsetY, label.c_str(), fontResource, mRenderX + listW, mRenderY + mRenderH);
+
+ // Add the separator
+ if (yPos + actualLineHeight < mRenderH + mRenderY) {
+ gr_color(mSeparatorColor.red, mSeparatorColor.green, mSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + actualLineHeight - mSeparatorH, listW, mSeparatorH);
+ }
+
+ // Move the yPos
+ yPos += actualLineHeight;
+ }
+
+ // Render the Header (last so that it overwrites the top most row for per pixel scrolling)
+ // First step, fill background
+ gr_color(mHeaderBackgroundColor.red, mHeaderBackgroundColor.green, mHeaderBackgroundColor.blue, 255);
+ gr_fill(mRenderX, mRenderY, mRenderW, mHeaderH);
+
+ // Now, we need the header (icon + text)
+ yPos = mRenderY;
+ {
+ Resource* headerIcon;
+ int mIconOffsetX = 0;
+
+ // render the icon if it exists
+ headerIcon = mHeaderIcon;
+ if (headerIcon && headerIcon->GetResource())
+ {
+ gr_blit(headerIcon->GetResource(), 0, 0, mHeaderIconWidth, mHeaderIconHeight, mRenderX + ((mHeaderIconWidth - mIconWidth) / 2), (yPos + (int)((mHeaderH - mHeaderIconHeight) / 2)));
+ mIconOffsetX = mIconWidth;
+ }
+
+ // render the text
+ gr_color(mHeaderFontColor.red, mHeaderFontColor.green, mHeaderFontColor.blue, 255);
+ gr_textExWH(mRenderX + mIconOffsetX + 5, yPos + (int)((mHeaderH - mFontHeight) / 2), mLastValue.c_str(), fontResource, mRenderX + mRenderW, mRenderY + mRenderH);
+
+ // Add the separator
+ gr_color(mHeaderSeparatorColor.red, mHeaderSeparatorColor.green, mHeaderSeparatorColor.blue, 255);
+ gr_fill(mRenderX, yPos + mHeaderH - mHeaderSeparatorH, mRenderW, mHeaderSeparatorH);
+ }
+
+ // render fast scroll
+ lines = (mRenderH - mHeaderH) / (actualLineHeight);
+ if(mFastScrollW > 0 && listSize > lines)
+ {
+ int startX = listW + mRenderX;
+ int fWidth = mRenderW - listW;
+ int fHeight = mRenderH - mHeaderH;
+
+ // line
+ gr_color(mFastScrollLineColor.red, mFastScrollLineColor.green, mFastScrollLineColor.blue, 255);
+ gr_fill(startX + fWidth/2, mRenderY + mHeaderH, mFastScrollLineW, mRenderH - mHeaderH);
+
+ // rect
+ int pct = ((mStart*actualLineHeight - scrollingY)*100)/((listSize)*actualLineHeight-lines*actualLineHeight);
+ mFastScrollRectX = startX + (fWidth - mFastScrollRectW)/2;
+ mFastScrollRectY = mRenderY+mHeaderH + ((fHeight - mFastScrollRectH)*pct)/100;
+
+ gr_color(mFastScrollRectColor.red, mFastScrollRectColor.green, mFastScrollRectColor.blue, 255);
+ gr_fill(mFastScrollRectX, mFastScrollRectY, mFastScrollRectW, mFastScrollRectH);
+ }
+
+ mUpdate = 0;
+ return 0;
+}
+
+int GUIPartitionList::Update(void)
+{
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mUpdate = 1;
+ }
+ }
+
+ // Check for changes in mount points if the list type is mount and update the list and render if needed
+ if (ListType == "mount") {
+ int listSize = mList.size();
+ for (int i = 0; i < listSize; i++) {
+ if (PartitionManager.Is_Mounted_By_Path(mList.at(i).Mount_Point) && !mList.at(i).selected) {
+ mList.at(i).selected = 1;
+ mUpdate = 1;
+ } else if (!PartitionManager.Is_Mounted_By_Path(mList.at(i).Mount_Point) && mList.at(i).selected) {
+ mList.at(i).selected = 0;
+ mUpdate = 1;
+ }
+ }
+ }
+
+ if (mUpdate)
+ {
+ mUpdate = 0;
+ if (Render() == 0)
+ return 2;
+ }
+
+ // Handle kinetic scrolling
+ if (scrollingSpeed == 0) {
+ // Do nothing
+ } else if (scrollingSpeed > 0) {
+ if (scrollingSpeed < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY += ((int) (actualLineHeight * 2.5));
+ scrollingSpeed -= SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0) {
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ } else if (scrollingSpeed < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ } else if (scrollingSpeed < 0) {
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ if (abs(scrollingSpeed) < ((int) (actualLineHeight * 2.5))) {
+ scrollingY += scrollingSpeed;
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ } else {
+ scrollingY -= ((int) (actualLineHeight * 2.5));
+ scrollingSpeed += SCROLLING_SPEED_DECREMENT;
+ }
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ } else if (scrollingSpeed * -1 < SCROLLING_FLOOR)
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+
+ return 0;
+}
+
+int GUIPartitionList::GetSelection(int x, int y)
+{
+ // We only care about y position
+ if (y < mRenderY || y - mRenderY <= mHeaderH || y - mRenderY > mRenderH) return -1;
+ return (y - mRenderY - mHeaderH);
+}
+
+int GUIPartitionList::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static int lastY = 0, last2Y = 0;
+ int selection = 0;
+
+ switch (state)
+ {
+ case TOUCH_START:
+ if (scrollingSpeed != 0)
+ startSelection = -1;
+ else
+ startSelection = GetSelection(x,y);
+ isHighlighted = (startSelection > -1);
+ if (isHighlighted)
+ mUpdate = 1;
+ startY = lastY = last2Y = y;
+ scrollingSpeed = 0;
+ break;
+
+ case TOUCH_DRAG:
+ // Check if we dragged out of the selection window
+ if (GetSelection(x, y) == -1) {
+ last2Y = lastY = 0;
+ if (isHighlighted) {
+ isHighlighted = false;
+ mUpdate = 1;
+ }
+ break;
+ }
+
+ // Fast scroll
+ if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW)
+ {
+ int pct = ((y-mRenderY-mHeaderH)*100)/(mRenderH-mHeaderH);
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ float l = float((totalSize-lines)*pct)/100;
+ if(l + lines >= totalSize)
+ {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ else
+ {
+ mStart = l;
+ scrollingY = -(l - int(l))*actualLineHeight;
+ }
+
+ startSelection = -1;
+ mUpdate = 1;
+ scrollingSpeed = 0;
+ isHighlighted = false;
+ break;
+ }
+
+ // Provide some debounce on initial touches
+ if (startSelection != -1 && abs(y - startY) < touchDebounce) {
+ isHighlighted = true;
+ mUpdate = 1;
+ break;
+ }
+
+ isHighlighted = false;
+ last2Y = lastY;
+ lastY = y;
+ startSelection = -1;
+
+ // Handle scrolling
+ scrollingY += y - startY;
+ startY = y;
+ while(mStart && scrollingY > 0) {
+ mStart--;
+ scrollingY -= actualLineHeight;
+ }
+ if (mStart == 0 && scrollingY > 0)
+ scrollingY = 0;
+ {
+ int totalSize = mList.size();
+ int lines = (mRenderH - mHeaderH) / (actualLineHeight);
+
+ if (totalSize > lines) {
+ int bottom_offset = ((int)(mRenderH) - mHeaderH) - (lines * actualLineHeight);
+
+ bottom_offset -= actualLineHeight;
+
+ while (mStart + lines + (bottom_offset ? 1 : 0) < totalSize && abs(scrollingY) > actualLineHeight) {
+ mStart++;
+ scrollingY += actualLineHeight;
+ }
+ if (bottom_offset != 0 && mStart + lines + 1 >= totalSize && scrollingY <= bottom_offset) {
+ mStart = totalSize - lines - 1;
+ scrollingY = bottom_offset;
+ } else if (mStart + lines >= totalSize && scrollingY < 0) {
+ mStart = totalSize - lines;
+ scrollingY = 0;
+ }
+ } else
+ scrollingY = 0;
+ }
+ mUpdate = 1;
+ break;
+
+ case TOUCH_RELEASE:
+ isHighlighted = false;
+ if (startSelection >= 0)
+ {
+ // We've selected an item!
+ int listSize = mList.size();
+ int selectY = scrollingY, actualSelection = mStart;
+
+ // Move the selection to the proper place in the array
+ while (selectY + actualLineHeight < startSelection) {
+ selectY += actualLineHeight;
+ actualSelection++;
+ }
+
+ if (actualSelection < listSize && ListType == "mount") {
+ if (!mList.at(actualSelection).selected) {
+ if (PartitionManager.Mount_By_Path(mList.at(actualSelection).Mount_Point, true)) {
+ mList.at(actualSelection).selected = 1;
+ mUpdate = 1;
+ }
+ } else {
+ if (PartitionManager.UnMount_By_Path(mList.at(actualSelection).Mount_Point, true)) {
+ mList.at(actualSelection).selected = 0;
+ mUpdate = 1;
+ }
+ }
+ } else if (actualSelection < listSize && !mVariable.empty()) {
+ if (ListType == "storage") {
+ int i;
+ std::string str = mList.at(actualSelection).Mount_Point;
+ bool update_size = false;
+ TWPartition* Part = PartitionManager.Find_Partition_By_Path(str);
+ if (Part == NULL) {
+ LOGERR("Unable to locate partition for '%s'\n", str.c_str());
+ return 0;
+ }
+ if (!Part->Is_Mounted() && Part->Removable)
+ update_size = true;
+ if (!Part->Mount(true)) {
+ // Do Nothing
+ } else if (update_size && !Part->Update_Size(true)) {
+ // Do Nothing
+ } else {
+ for (i=0; i<listSize; i++)
+ mList.at(i).selected = 0;
+
+ if (update_size) {
+ char free_space[255];
+ sprintf(free_space, "%llu", Part->Free / 1024 / 1024);
+ mList.at(actualSelection).Display_Name = Part->Storage_Name + " (";
+ mList.at(actualSelection).Display_Name += free_space;
+ mList.at(actualSelection).Display_Name += "MB)";
+ }
+ mList.at(actualSelection).selected = 1;
+ mUpdate = 1;
+
+ DataManager::SetValue(mVariable, str);
+ }
+ } else {
+ if (mList.at(actualSelection).selected)
+ mList.at(actualSelection).selected = 0;
+ else
+ mList.at(actualSelection).selected = 1;
+
+ int i;
+ string variablelist;
+ for (i=0; i<listSize; i++) {
+ if (mList.at(i).selected) {
+ variablelist += mList.at(i).Mount_Point + ";";
+ }
+ }
+
+ mUpdate = 1;
+ if (selectedList.empty())
+ DataManager::SetValue(mVariable, variablelist);
+ else
+ DataManager::SetValue(selectedList, variablelist);
+ }
+ }
+ } else {
+ // This is for kinetic scrolling
+ scrollingSpeed = lastY - last2Y;
+ if (abs(scrollingSpeed) > SCROLLING_FLOOR)
+ scrollingSpeed *= SCROLLING_MULTIPLIER;
+ else
+ scrollingSpeed = 0;
+ }
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
+
+int GUIPartitionList::NotifyVarChange(std::string varName, std::string value)
+{
+ if (!mHeaderIsStatic) {
+ std::string newValue = gui_parse_text(mHeaderText);
+ if (mLastValue != newValue) {
+ mLastValue = newValue;
+ mStart = 0;
+ scrollingY = 0;
+ scrollingSpeed = 0;
+ mUpdate = 1;
+ }
+ }
+ if (varName == mVariable && !mUpdate)
+ {
+ if (ListType == "storage") {
+ int i, listSize = mList.size(), selected_index = 0;
+
+ currentValue = value;
+
+ for (i=0; i<listSize; i++) {
+ if (mList.at(i).Mount_Point == currentValue) {
+ mList.at(i).selected = 1;
+ selected_index = i;
+ } else
+ mList.at(i).selected = 0;
+ }
+
+ int lines = mRenderH / (mLineHeight + mLineSpacing);
+ int line;
+
+ if (selected_index > mStart + lines - 1) {
+ mStart = selected_index;
+ } else if (selected_index < mStart) {
+ mStart = selected_index;
+ }
+ } else if (ListType == "backup") {
+ MatchList();
+ } else if (ListType == "restore") {
+ updateList = true;
+ }
+
+ mUpdate = 1;
+ return 0;
+ }
+ return 0;
+}
+
+int GUIPartitionList::SetRenderPos(int x, int y, int w /* = 0 */, int h /* = 0 */)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = w;
+ mRenderH = h;
+ }
+ SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
+ mUpdate = 1;
+ return 0;
+}
+
+void GUIPartitionList::SetPageFocus(int inFocus)
+{
+ if (inFocus) {
+ if (ListType == "storage") {
+ int i, listSize = mList.size(), selected_index = 0;
+
+ DataManager::GetValue(mVariable, currentValue);
+
+ for (i=0; i<listSize; i++) {
+ if (mList.at(i).Mount_Point == currentValue) {
+ mList.at(i).selected = 1;
+ selected_index = i;
+ } else
+ mList.at(i).selected = 0;
+ }
+
+ int lines = mRenderH / (mLineHeight + mLineSpacing);
+ int line;
+
+ if (selected_index > mStart + lines - 1) {
+ mStart = selected_index;
+ } else if (selected_index < mStart) {
+ mStart = selected_index;
+ }
+ }
+ updateList = true;
+ mUpdate = 1;
+ }
+}
+
+void GUIPartitionList::MatchList(void) {
+ int i, listSize = mList.size();
+ string variablelist, searchvalue;
+ size_t pos;
+
+ DataManager::GetValue(mVariable, variablelist);
+
+ for (i=0; i<listSize; i++) {
+ searchvalue = mList.at(i).Mount_Point + ";";
+ pos = variablelist.find(searchvalue);
+ if (pos != string::npos) {
+ mList.at(i).selected = 1;
+ } else {
+ mList.at(i).selected = 0;
+ }
+ }
+}
diff --git a/gui/progressbar.cpp b/gui/progressbar.cpp
new file mode 100644
index 000000000..d53fdc19f
--- /dev/null
+++ b/gui/progressbar.cpp
@@ -0,0 +1,226 @@
+// progressbar.cpp - GUIProgressBar object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIProgressBar::GUIProgressBar(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mEmptyBar = NULL;
+ mFullBar = NULL;
+ mLastPos = 0;
+ mSlide = 0.0;
+ mSlideInc = 0.0;
+
+ if (!node)
+ {
+ LOGERR("GUIProgressBar created without XML node\n");
+ return;
+ }
+
+ child = node->first_node("resource");
+ if (child)
+ {
+ attr = child->first_attribute("empty");
+ if (attr)
+ mEmptyBar = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("full");
+ if (attr)
+ mFullBar = PageManager::FindResource(attr->value());
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY);
+
+ // Load the data
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("min");
+ if (attr) mMinValVar = attr->value();
+
+ attr = child->first_attribute("max");
+ if (attr) mMaxValVar = attr->value();
+
+ attr = child->first_attribute("name");
+ if (attr) mCurValVar = attr->value();
+ }
+
+ if (mEmptyBar && mEmptyBar->GetResource())
+ {
+ mRenderW = gr_get_width(mEmptyBar->GetResource());
+ mRenderH = gr_get_height(mEmptyBar->GetResource());
+ }
+
+ return;
+}
+
+int GUIProgressBar::Render(void)
+{
+ // This handles making sure timing updates occur
+ Update();
+ return RenderInternal();
+}
+
+int GUIProgressBar::RenderInternal(void)
+{
+ if (!mEmptyBar || !mEmptyBar->GetResource())
+ return -1;
+
+ if (!mFullBar || !mFullBar->GetResource())
+ return -1;
+
+ gr_blit(mEmptyBar->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+ gr_blit(mFullBar->GetResource(), 0, 0, mLastPos, mRenderH, mRenderX, mRenderY);
+ return 0;
+}
+
+int GUIProgressBar::Update(void)
+{
+ std::string str;
+ int min, max, cur, pos;
+
+ if (mMinValVar.empty())
+ min = 0;
+ else
+ {
+ str.clear();
+ if (atoi(mMinValVar.c_str()) != 0)
+ str = mMinValVar;
+ else
+ DataManager::GetValue(mMinValVar, str);
+ min = atoi(str.c_str());
+ }
+
+ if (mMaxValVar.empty())
+ max = 100;
+ else
+ {
+ str.clear();
+ if (atoi(mMaxValVar.c_str()) != 0)
+ str = mMaxValVar;
+ else
+ DataManager::GetValue(mMaxValVar, str);
+ max = atoi(str.c_str());
+ }
+
+ str.clear();
+ DataManager::GetValue(mCurValVar, str);
+ cur = atoi(str.c_str());
+
+ // Do slide, if needed
+ if (mSlideFrames)
+ {
+ mSlide += mSlideInc;
+ mSlideFrames--;
+ if (cur != (int) mSlide)
+ {
+ cur = (int) mSlide;
+ DataManager::SetValue(mCurValVar, cur);
+ }
+ }
+
+ // Normalize to 0
+ max -= min;
+ cur -= min;
+ min = 0;
+
+ if (cur < min) cur = min;
+ if (cur > max) cur = max;
+
+ if (max == 0) pos = 0;
+ else pos = (cur * mRenderW) / max;
+
+ if (pos == mLastPos)
+ return 0;
+
+ mLastPos = pos;
+
+ if (RenderInternal() != 0)
+ return -1;
+ return 2;
+}
+
+int GUIProgressBar::NotifyVarChange(std::string varName, std::string value)
+{
+ static int nextPush = 0;
+
+ if (varName.empty())
+ {
+ nextPush = 0;
+ mLastPos = 0;
+ mSlide = 0.0;
+ mSlideInc = 0.0;
+ return 0;
+ }
+
+ if (varName == "ui_progress_portion" || varName == "ui_progress_frames")
+ {
+ std::string str;
+ int cur;
+
+ if (mSlideFrames)
+ {
+ mSlide += (mSlideInc * mSlideFrames);
+ cur = (int) mSlide;
+ DataManager::SetValue(mCurValVar, cur);
+ mSlideFrames = 0;
+ }
+
+ if (nextPush)
+ {
+ mSlide += nextPush;
+ cur = (int) mSlide;
+ DataManager::SetValue(mCurValVar, cur);
+ nextPush = 0;
+ }
+
+ if (varName == "ui_progress_portion") mSlide = atof(value.c_str());
+ else
+ {
+ mSlideFrames = atol(value.c_str());
+ if (mSlideFrames == 0)
+ {
+ // We're just holding this progress until the next push
+ nextPush = mSlide;
+ }
+ }
+
+ if (mSlide > 0 && mSlideFrames > 0)
+ {
+ // Get the current position
+ str.clear();
+ DataManager::GetValue(mCurValVar, str);
+ cur = atoi(str.c_str());
+
+ mSlideInc = (float) mSlide / (float) mSlideFrames;
+ mSlide = cur;
+ }
+ }
+ return 0;
+}
diff --git a/gui/rapidxml.hpp b/gui/rapidxml.hpp
new file mode 100644
index 000000000..c0a7be44e
--- /dev/null
+++ b/gui/rapidxml.hpp
@@ -0,0 +1,2616 @@
+#ifndef RAPIDXML_HPP_INCLUDED
+#define RAPIDXML_HPP_INCLUDED
+
+#define RAPIDXML_NO_EXCEPTIONS
+
+// Copyright (C) 2006, 2009 Marcin Kalicinski
+// Version 1.13
+// Revision $DateTime: 2009/05/13 01:46:17 $
+//! \file rapidxml.hpp This file contains rapidxml parser and DOM implementation
+
+// If standard library is disabled, user must provide implementations of required functions and typedefs
+#if !defined(RAPIDXML_NO_STDLIB)
+ #include <cstdlib> // For std::size_t
+ #include <cassert> // For assert
+ #include <new> // For placement new
+#endif
+
+// On MSVC, disable "conditional expression is constant" warning (level 4).
+// This warning is almost impossible to avoid with certain types of templated code
+#ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable:4127) // Conditional expression is constant
+#endif
+
+///////////////////////////////////////////////////////////////////////////
+// RAPIDXML_PARSE_ERROR
+
+#if defined(RAPIDXML_NO_EXCEPTIONS)
+
+#define RAPIDXML_PARSE_ERROR(what, where) { parse_error_handler(what, where); assert(0); }
+
+namespace rapidxml
+{
+ //! When exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS,
+ //! this function is called to notify user about the error.
+ //! It must be defined by the user.
+ //! <br><br>
+ //! This function cannot return. If it does, the results are undefined.
+ //! <br><br>
+ //! A very simple definition might look like that:
+ //! <pre>
+ //! void %rapidxml::%parse_error_handler(const char *what, void *where)
+ //! {
+ //! std::cout << "Parse error: " << what << "\n";
+ //! std::abort();
+ //! }
+ //! </pre>
+ //! \param what Human readable description of the error.
+ //! \param where Pointer to character data where error was detected.
+ void parse_error_handler(const char *what, void *where);
+}
+
+#else
+
+#include <exception> // For std::exception
+
+#define RAPIDXML_PARSE_ERROR(what, where) throw parse_error(what, where)
+
+namespace rapidxml
+{
+
+ //! Parse error exception.
+ //! This exception is thrown by the parser when an error occurs.
+ //! Use what() function to get human-readable error message.
+ //! Use where() function to get a pointer to position within source text where error was detected.
+ //! <br><br>
+ //! If throwing exceptions by the parser is undesirable,
+ //! it can be disabled by defining RAPIDXML_NO_EXCEPTIONS macro before rapidxml.hpp is included.
+ //! This will cause the parser to call rapidxml::parse_error_handler() function instead of throwing an exception.
+ //! This function must be defined by the user.
+ //! <br><br>
+ //! This class derives from <code>std::exception</code> class.
+ class parse_error: public std::exception
+ {
+
+ public:
+
+ //! Constructs parse error
+ parse_error(const char *what, void *where)
+ : m_what(what)
+ , m_where(where)
+ {
+ }
+
+ //! Gets human readable description of error.
+ //! \return Pointer to null terminated description of the error.
+ virtual const char *what() const throw()
+ {
+ return m_what;
+ }
+
+ //! Gets pointer to character data where error happened.
+ //! Ch should be the same as char type of xml_document that produced the error.
+ //! \return Pointer to location within the parsed string where error occured.
+ template<class Ch>
+ Ch *where() const
+ {
+ return reinterpret_cast<Ch *>(m_where);
+ }
+
+ private:
+
+ const char *m_what;
+ void *m_where;
+
+ };
+}
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////
+// Pool sizes
+
+#ifndef RAPIDXML_STATIC_POOL_SIZE
+ // Size of static memory block of memory_pool.
+ // Define RAPIDXML_STATIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value.
+ // No dynamic memory allocations are performed by memory_pool until static memory is exhausted.
+ #define RAPIDXML_STATIC_POOL_SIZE (64 * 1024)
+#endif
+
+#ifndef RAPIDXML_DYNAMIC_POOL_SIZE
+ // Size of dynamic memory block of memory_pool.
+ // Define RAPIDXML_DYNAMIC_POOL_SIZE before including rapidxml.hpp if you want to override the default value.
+ // After the static block is exhausted, dynamic blocks with approximately this size are allocated by memory_pool.
+ #define RAPIDXML_DYNAMIC_POOL_SIZE (64 * 1024)
+#endif
+
+#ifndef RAPIDXML_ALIGNMENT
+ // Memory allocation alignment.
+ // Define RAPIDXML_ALIGNMENT before including rapidxml.hpp if you want to override the default value, which is the size of pointer.
+ // All memory allocations for nodes, attributes and strings will be aligned to this value.
+ // This must be a power of 2 and at least 1, otherwise memory_pool will not work.
+ #define RAPIDXML_ALIGNMENT sizeof(void *)
+#endif
+
+namespace rapidxml
+{
+ // Forward declarations
+ template<class Ch> class xml_node;
+ template<class Ch> class xml_attribute;
+ template<class Ch> class xml_document;
+
+ //! Enumeration listing all node types produced by the parser.
+ //! Use xml_node::type() function to query node type.
+ enum node_type
+ {
+ node_document, //!< A document node. Name and value are empty.
+ node_element, //!< An element node. Name contains element name. Value contains text of first data node.
+ node_data, //!< A data node. Name is empty. Value contains data text.
+ node_cdata, //!< A CDATA node. Name is empty. Value contains data text.
+ node_comment, //!< A comment node. Name is empty. Value contains comment text.
+ node_declaration, //!< A declaration node. Name and value are empty. Declaration parameters (version, encoding and standalone) are in node attributes.
+ node_doctype, //!< A DOCTYPE node. Name is empty. Value contains DOCTYPE text.
+ node_pi //!< A PI node. Name contains target. Value contains instructions.
+ };
+
+ ///////////////////////////////////////////////////////////////////////
+ // Parsing flags
+
+ //! Parse flag instructing the parser to not create data nodes.
+ //! Text of first data node will still be placed in value of parent element, unless rapidxml::parse_no_element_values flag is also specified.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_no_data_nodes = 0x1;
+
+ //! Parse flag instructing the parser to not use text of first data node as a value of parent element.
+ //! Can be combined with other flags by use of | operator.
+ //! Note that child data nodes of element node take precendence over its value when printing.
+ //! That is, if element has one or more child data nodes <em>and</em> a value, the value will be ignored.
+ //! Use rapidxml::parse_no_data_nodes flag to prevent creation of data nodes if you want to manipulate data using values of elements.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_no_element_values = 0x2;
+
+ //! Parse flag instructing the parser to not place zero terminators after strings in the source text.
+ //! By default zero terminators are placed, modifying source text.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_no_string_terminators = 0x4;
+
+ //! Parse flag instructing the parser to not translate entities in the source text.
+ //! By default entities are translated, modifying source text.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_no_entity_translation = 0x8;
+
+ //! Parse flag instructing the parser to disable UTF-8 handling and assume plain 8 bit characters.
+ //! By default, UTF-8 handling is enabled.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_no_utf8 = 0x10;
+
+ //! Parse flag instructing the parser to create XML declaration node.
+ //! By default, declaration node is not created.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_declaration_node = 0x20;
+
+ //! Parse flag instructing the parser to create comments nodes.
+ //! By default, comment nodes are not created.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_comment_nodes = 0x40;
+
+ //! Parse flag instructing the parser to create DOCTYPE node.
+ //! By default, doctype node is not created.
+ //! Although W3C specification allows at most one DOCTYPE node, RapidXml will silently accept documents with more than one.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_doctype_node = 0x80;
+
+ //! Parse flag instructing the parser to create PI nodes.
+ //! By default, PI nodes are not created.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_pi_nodes = 0x100;
+
+ //! Parse flag instructing the parser to validate closing tag names.
+ //! If not set, name inside closing tag is irrelevant to the parser.
+ //! By default, closing tags are not validated.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_validate_closing_tags = 0x200;
+
+ //! Parse flag instructing the parser to trim all leading and trailing whitespace of data nodes.
+ //! By default, whitespace is not trimmed.
+ //! This flag does not cause the parser to modify source text.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_trim_whitespace = 0x400;
+
+ //! Parse flag instructing the parser to condense all whitespace runs of data nodes to a single space character.
+ //! Trimming of leading and trailing whitespace of data is controlled by rapidxml::parse_trim_whitespace flag.
+ //! By default, whitespace is not normalized.
+ //! If this flag is specified, source text will be modified.
+ //! Can be combined with other flags by use of | operator.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_normalize_whitespace = 0x800;
+
+ // Compound flags
+
+ //! Parse flags which represent default behaviour of the parser.
+ //! This is always equal to 0, so that all other flags can be simply ored together.
+ //! Normally there is no need to inconveniently disable flags by anding with their negated (~) values.
+ //! This also means that meaning of each flag is a <i>negation</i> of the default setting.
+ //! For example, if flag name is rapidxml::parse_no_utf8, it means that utf-8 is <i>enabled</i> by default,
+ //! and using the flag will disable it.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_default = 0;
+
+ //! A combination of parse flags that forbids any modifications of the source text.
+ //! This also results in faster parsing. However, note that the following will occur:
+ //! <ul>
+ //! <li>names and values of nodes will not be zero terminated, you have to use xml_base::name_size() and xml_base::value_size() functions to determine where name and value ends</li>
+ //! <li>entities will not be translated</li>
+ //! <li>whitespace will not be normalized</li>
+ //! </ul>
+ //! See xml_document::parse() function.
+ const int parse_non_destructive = parse_no_string_terminators | parse_no_entity_translation;
+
+ //! A combination of parse flags resulting in fastest possible parsing, without sacrificing important data.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_fastest = parse_non_destructive | parse_no_data_nodes;
+
+ //! A combination of parse flags resulting in largest amount of data being extracted.
+ //! This usually results in slowest parsing.
+ //! <br><br>
+ //! See xml_document::parse() function.
+ const int parse_full = parse_declaration_node | parse_comment_nodes | parse_doctype_node | parse_pi_nodes | parse_validate_closing_tags;
+
+ ///////////////////////////////////////////////////////////////////////
+ // Internals
+
+ //! \cond internal
+ namespace internal
+ {
+
+ // Struct that contains lookup tables for the parser
+ // It must be a template to allow correct linking (because it has static data members, which are defined in a header file).
+ template<int Dummy>
+ struct lookup_tables
+ {
+ static const unsigned char lookup_whitespace[256]; // Whitespace table
+ static const unsigned char lookup_node_name[256]; // Node name table
+ static const unsigned char lookup_text[256]; // Text table
+ static const unsigned char lookup_text_pure_no_ws[256]; // Text table
+ static const unsigned char lookup_text_pure_with_ws[256]; // Text table
+ static const unsigned char lookup_attribute_name[256]; // Attribute name table
+ static const unsigned char lookup_attribute_data_1[256]; // Attribute data table with single quote
+ static const unsigned char lookup_attribute_data_1_pure[256]; // Attribute data table with single quote
+ static const unsigned char lookup_attribute_data_2[256]; // Attribute data table with double quotes
+ static const unsigned char lookup_attribute_data_2_pure[256]; // Attribute data table with double quotes
+ static const unsigned char lookup_digits[256]; // Digits
+ static const unsigned char lookup_upcase[256]; // To uppercase conversion table for ASCII characters
+ };
+
+ // Find length of the string
+ template<class Ch>
+ inline std::size_t measure(const Ch *p)
+ {
+ const Ch *tmp = p;
+ while (*tmp)
+ ++tmp;
+ return tmp - p;
+ }
+
+ // Compare strings for equality
+ template<class Ch>
+ inline bool compare(const Ch *p1, std::size_t size1, const Ch *p2, std::size_t size2, bool case_sensitive)
+ {
+ if (size1 != size2)
+ return false;
+ if (case_sensitive)
+ {
+ for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
+ if (*p1 != *p2)
+ return false;
+ }
+ else
+ {
+ for (const Ch *end = p1 + size1; p1 < end; ++p1, ++p2)
+ if (lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p1)] != lookup_tables<0>::lookup_upcase[static_cast<unsigned char>(*p2)])
+ return false;
+ }
+ return true;
+ }
+ }
+ //! \endcond
+
+ ///////////////////////////////////////////////////////////////////////
+ // Memory pool
+
+ //! This class is used by the parser to create new nodes and attributes, without overheads of dynamic memory allocation.
+ //! In most cases, you will not need to use this class directly.
+ //! However, if you need to create nodes manually or modify names/values of nodes,
+ //! you are encouraged to use memory_pool of relevant xml_document to allocate the memory.
+ //! Not only is this faster than allocating them by using <code>new</code> operator,
+ //! but also their lifetime will be tied to the lifetime of document,
+ //! possibly simplyfing memory management.
+ //! <br><br>
+ //! Call allocate_node() or allocate_attribute() functions to obtain new nodes or attributes from the pool.
+ //! You can also call allocate_string() function to allocate strings.
+ //! Such strings can then be used as names or values of nodes without worrying about their lifetime.
+ //! Note that there is no <code>free()</code> function -- all allocations are freed at once when clear() function is called,
+ //! or when the pool is destroyed.
+ //! <br><br>
+ //! It is also possible to create a standalone memory_pool, and use it
+ //! to allocate nodes, whose lifetime will not be tied to any document.
+ //! <br><br>
+ //! Pool maintains <code>RAPIDXML_STATIC_POOL_SIZE</code> bytes of statically allocated memory.
+ //! Until static memory is exhausted, no dynamic memory allocations are done.
+ //! When static memory is exhausted, pool allocates additional blocks of memory of size <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> each,
+ //! by using global <code>new[]</code> and <code>delete[]</code> operators.
+ //! This behaviour can be changed by setting custom allocation routines.
+ //! Use set_allocator() function to set them.
+ //! <br><br>
+ //! Allocations for nodes, attributes and strings are aligned at <code>RAPIDXML_ALIGNMENT</code> bytes.
+ //! This value defaults to the size of pointer on target architecture.
+ //! <br><br>
+ //! To obtain absolutely top performance from the parser,
+ //! it is important that all nodes are allocated from a single, contiguous block of memory.
+ //! Otherwise, cache misses when jumping between two (or more) disjoint blocks of memory can slow down parsing quite considerably.
+ //! If required, you can tweak <code>RAPIDXML_STATIC_POOL_SIZE</code>, <code>RAPIDXML_DYNAMIC_POOL_SIZE</code> and <code>RAPIDXML_ALIGNMENT</code>
+ //! to obtain best wasted memory to performance compromise.
+ //! To do it, define their values before rapidxml.hpp file is included.
+ //! \param Ch Character type of created nodes.
+ template<class Ch = char>
+ class memory_pool
+ {
+
+ public:
+
+ //! \cond internal
+ typedef void *(alloc_func)(std::size_t); // Type of user-defined function used to allocate memory
+ typedef void (free_func)(void *); // Type of user-defined function used to free memory
+ //! \endcond
+
+ //! Constructs empty pool with default allocator functions.
+ memory_pool()
+ : m_alloc_func(0)
+ , m_free_func(0)
+ {
+ init();
+ }
+
+ //! Destroys pool and frees all the memory.
+ //! This causes memory occupied by nodes allocated by the pool to be freed.
+ //! Nodes allocated from the pool are no longer valid.
+ ~memory_pool()
+ {
+ clear();
+ }
+
+ //! Allocates a new node from the pool, and optionally assigns name and value to it.
+ //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
+ //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
+ //! will call rapidxml::parse_error_handler() function.
+ //! \param type Type of node to create.
+ //! \param name Name to assign to the node, or 0 to assign no name.
+ //! \param value Value to assign to the node, or 0 to assign no value.
+ //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string.
+ //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string.
+ //! \return Pointer to allocated node. This pointer will never be NULL.
+ xml_node<Ch> *allocate_node(node_type type,
+ const Ch *name = 0, const Ch *value = 0,
+ std::size_t name_size = 0, std::size_t value_size = 0)
+ {
+ void *memory = allocate_aligned(sizeof(xml_node<Ch>));
+ xml_node<Ch> *node = new(memory) xml_node<Ch>(type);
+ if (name)
+ {
+ if (name_size > 0)
+ node->name(name, name_size);
+ else
+ node->name(name);
+ }
+ if (value)
+ {
+ if (value_size > 0)
+ node->value(value, value_size);
+ else
+ node->value(value);
+ }
+ return node;
+ }
+
+ //! Allocates a new attribute from the pool, and optionally assigns name and value to it.
+ //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
+ //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
+ //! will call rapidxml::parse_error_handler() function.
+ //! \param name Name to assign to the attribute, or 0 to assign no name.
+ //! \param value Value to assign to the attribute, or 0 to assign no value.
+ //! \param name_size Size of name to assign, or 0 to automatically calculate size from name string.
+ //! \param value_size Size of value to assign, or 0 to automatically calculate size from value string.
+ //! \return Pointer to allocated attribute. This pointer will never be NULL.
+ xml_attribute<Ch> *allocate_attribute(const Ch *name = 0, const Ch *value = 0,
+ std::size_t name_size = 0, std::size_t value_size = 0)
+ {
+ void *memory = allocate_aligned(sizeof(xml_attribute<Ch>));
+ xml_attribute<Ch> *attribute = new(memory) xml_attribute<Ch>;
+ if (name)
+ {
+ if (name_size > 0)
+ attribute->name(name, name_size);
+ else
+ attribute->name(name);
+ }
+ if (value)
+ {
+ if (value_size > 0)
+ attribute->value(value, value_size);
+ else
+ attribute->value(value);
+ }
+ return attribute;
+ }
+
+ //! Allocates a char array of given size from the pool, and optionally copies a given string to it.
+ //! If the allocation request cannot be accomodated, this function will throw <code>std::bad_alloc</code>.
+ //! If exceptions are disabled by defining RAPIDXML_NO_EXCEPTIONS, this function
+ //! will call rapidxml::parse_error_handler() function.
+ //! \param source String to initialize the allocated memory with, or 0 to not initialize it.
+ //! \param size Number of characters to allocate, or zero to calculate it automatically from source string length; if size is 0, source string must be specified and null terminated.
+ //! \return Pointer to allocated char array. This pointer will never be NULL.
+ Ch *allocate_string(const Ch *source = 0, std::size_t size = 0)
+ {
+ assert(source || size); // Either source or size (or both) must be specified
+ if (size == 0)
+ size = internal::measure(source) + 1;
+ Ch *result = static_cast<Ch *>(allocate_aligned(size * sizeof(Ch)));
+ if (source)
+ for (std::size_t i = 0; i < size; ++i)
+ result[i] = source[i];
+ return result;
+ }
+
+ //! Clones an xml_node and its hierarchy of child nodes and attributes.
+ //! Nodes and attributes are allocated from this memory pool.
+ //! Names and values are not cloned, they are shared between the clone and the source.
+ //! Result node can be optionally specified as a second parameter,
+ //! in which case its contents will be replaced with cloned source node.
+ //! This is useful when you want to clone entire document.
+ //! \param source Node to clone.
+ //! \param result Node to put results in, or 0 to automatically allocate result node
+ //! \return Pointer to cloned node. This pointer will never be NULL.
+ xml_node<Ch> *clone_node(const xml_node<Ch> *source, xml_node<Ch> *result = 0)
+ {
+ // Prepare result node
+ if (result)
+ {
+ result->remove_all_attributes();
+ result->remove_all_nodes();
+ result->type(source->type());
+ }
+ else
+ result = allocate_node(source->type());
+
+ // Clone name and value
+ result->name(source->name(), source->name_size());
+ result->value(source->value(), source->value_size());
+
+ // Clone child nodes and attributes
+ for (xml_node<Ch> *child = source->first_node(); child; child = child->next_sibling())
+ result->append_node(clone_node(child));
+ for (xml_attribute<Ch> *attr = source->first_attribute(); attr; attr = attr->next_attribute())
+ result->append_attribute(allocate_attribute(attr->name(), attr->value(), attr->name_size(), attr->value_size()));
+
+ return result;
+ }
+
+ //! Clears the pool.
+ //! This causes memory occupied by nodes allocated by the pool to be freed.
+ //! Any nodes or strings allocated from the pool will no longer be valid.
+ void clear()
+ {
+ while (m_begin != m_static_memory)
+ {
+ char *previous_begin = reinterpret_cast<header *>(align(m_begin))->previous_begin;
+ if (m_free_func)
+ m_free_func(m_begin);
+ else
+ delete[] m_begin;
+ m_begin = previous_begin;
+ }
+ init();
+ }
+
+ //! Sets or resets the user-defined memory allocation functions for the pool.
+ //! This can only be called when no memory is allocated from the pool yet, otherwise results are undefined.
+ //! Allocation function must not return invalid pointer on failure. It should either throw,
+ //! stop the program, or use <code>longjmp()</code> function to pass control to other place of program.
+ //! If it returns invalid pointer, results are undefined.
+ //! <br><br>
+ //! User defined allocation functions must have the following forms:
+ //! <br><code>
+ //! <br>void *allocate(std::size_t size);
+ //! <br>void free(void *pointer);
+ //! </code><br>
+ //! \param af Allocation function, or 0 to restore default function
+ //! \param ff Free function, or 0 to restore default function
+ void set_allocator(alloc_func *af, free_func *ff)
+ {
+ assert(m_begin == m_static_memory && m_ptr == align(m_begin)); // Verify that no memory is allocated yet
+ m_alloc_func = af;
+ m_free_func = ff;
+ }
+
+ private:
+
+ struct header
+ {
+ char *previous_begin;
+ };
+
+ void init()
+ {
+ m_begin = m_static_memory;
+ m_ptr = align(m_begin);
+ m_end = m_static_memory + sizeof(m_static_memory);
+ }
+
+ char *align(char *ptr)
+ {
+ std::size_t alignment = ((RAPIDXML_ALIGNMENT - (std::size_t(ptr) & (RAPIDXML_ALIGNMENT - 1))) & (RAPIDXML_ALIGNMENT - 1));
+ return ptr + alignment;
+ }
+
+ char *allocate_raw(std::size_t size)
+ {
+ // Allocate
+ void *memory;
+ if (m_alloc_func) // Allocate memory using either user-specified allocation function or global operator new[]
+ {
+ memory = m_alloc_func(size);
+ assert(memory); // Allocator is not allowed to return 0, on failure it must either throw, stop the program or use longjmp
+ }
+ else
+ {
+ memory = new char[size];
+#ifdef RAPIDXML_NO_EXCEPTIONS
+ if (!memory) // If exceptions are disabled, verify memory allocation, because new will not be able to throw bad_alloc
+ RAPIDXML_PARSE_ERROR("out of memory", 0);
+#endif
+ }
+ return static_cast<char *>(memory);
+ }
+
+ void *allocate_aligned(std::size_t size)
+ {
+ // Calculate aligned pointer
+ char *result = align(m_ptr);
+
+ // If not enough memory left in current pool, allocate a new pool
+ if (result + size > m_end)
+ {
+ // Calculate required pool size (may be bigger than RAPIDXML_DYNAMIC_POOL_SIZE)
+ std::size_t pool_size = RAPIDXML_DYNAMIC_POOL_SIZE;
+ if (pool_size < size)
+ pool_size = size;
+
+ // Allocate
+ std::size_t alloc_size = sizeof(header) + (2 * RAPIDXML_ALIGNMENT - 2) + pool_size; // 2 alignments required in worst case: one for header, one for actual allocation
+ char *raw_memory = allocate_raw(alloc_size);
+
+ // Setup new pool in allocated memory
+ char *pool = align(raw_memory);
+ header *new_header = reinterpret_cast<header *>(pool);
+ new_header->previous_begin = m_begin;
+ m_begin = raw_memory;
+ m_ptr = pool + sizeof(header);
+ m_end = raw_memory + alloc_size;
+
+ // Calculate aligned pointer again using new pool
+ result = align(m_ptr);
+ }
+
+ // Update pool and return aligned pointer
+ m_ptr = result + size;
+ return result;
+ }
+
+ char *m_begin; // Start of raw memory making up current pool
+ char *m_ptr; // First free byte in current pool
+ char *m_end; // One past last available byte in current pool
+ char m_static_memory[RAPIDXML_STATIC_POOL_SIZE]; // Static raw memory
+ alloc_func *m_alloc_func; // Allocator function, or 0 if default is to be used
+ free_func *m_free_func; // Free function, or 0 if default is to be used
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ // XML base
+
+ //! Base class for xml_node and xml_attribute implementing common functions:
+ //! name(), name_size(), value(), value_size() and parent().
+ //! \param Ch Character type to use
+ template<class Ch = char>
+ class xml_base
+ {
+
+ public:
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Construction & destruction
+
+ // Construct a base with empty name, value and parent
+ xml_base()
+ : m_name(0)
+ , m_value(0)
+ , m_parent(0)
+ {
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Node data access
+
+ //! Gets name of the node.
+ //! Interpretation of name depends on type of node.
+ //! Note that name will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse.
+ //! <br><br>
+ //! Use name_size() function to determine length of the name.
+ //! \return Name of node, or empty string if node has no name.
+ Ch *name() const
+ {
+ return m_name ? m_name : nullstr();
+ }
+
+ //! Gets size of node name, not including terminator character.
+ //! This function works correctly irrespective of whether name is or is not zero terminated.
+ //! \return Size of node name, in characters.
+ std::size_t name_size() const
+ {
+ return m_name ? m_name_size : 0;
+ }
+
+ //! Gets value of node.
+ //! Interpretation of value depends on type of node.
+ //! Note that value will not be zero-terminated if rapidxml::parse_no_string_terminators option was selected during parse.
+ //! <br><br>
+ //! Use value_size() function to determine length of the value.
+ //! \return Value of node, or empty string if node has no value.
+ Ch *value() const
+ {
+ return m_value ? m_value : nullstr();
+ }
+
+ //! Gets size of node value, not including terminator character.
+ //! This function works correctly irrespective of whether value is or is not zero terminated.
+ //! \return Size of node value, in characters.
+ std::size_t value_size() const
+ {
+ return m_value ? m_value_size : 0;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Node modification
+
+ //! Sets name of node to a non zero-terminated string.
+ //! See \ref ownership_of_strings.
+ //! <br><br>
+ //! Note that node does not own its name or value, it only stores a pointer to it.
+ //! It will not delete or otherwise free the pointer on destruction.
+ //! It is reponsibility of the user to properly manage lifetime of the string.
+ //! The easiest way to achieve it is to use memory_pool of the document to allocate the string -
+ //! on destruction of the document the string will be automatically freed.
+ //! <br><br>
+ //! Size of name must be specified separately, because name does not have to be zero terminated.
+ //! Use name(const Ch *) function to have the length automatically calculated (string must be zero terminated).
+ //! \param name Name of node to set. Does not have to be zero terminated.
+ //! \param size Size of name, in characters. This does not include zero terminator, if one is present.
+ void name(const Ch *name, std::size_t size)
+ {
+ m_name = const_cast<Ch *>(name);
+ m_name_size = size;
+ }
+
+ //! Sets name of node to a zero-terminated string.
+ //! See also \ref ownership_of_strings and xml_node::name(const Ch *, std::size_t).
+ //! \param name Name of node to set. Must be zero terminated.
+ void name(const Ch *name)
+ {
+ this->name(name, internal::measure(name));
+ }
+
+ //! Sets value of node to a non zero-terminated string.
+ //! See \ref ownership_of_strings.
+ //! <br><br>
+ //! Note that node does not own its name or value, it only stores a pointer to it.
+ //! It will not delete or otherwise free the pointer on destruction.
+ //! It is reponsibility of the user to properly manage lifetime of the string.
+ //! The easiest way to achieve it is to use memory_pool of the document to allocate the string -
+ //! on destruction of the document the string will be automatically freed.
+ //! <br><br>
+ //! Size of value must be specified separately, because it does not have to be zero terminated.
+ //! Use value(const Ch *) function to have the length automatically calculated (string must be zero terminated).
+ //! <br><br>
+ //! If an element has a child node of type node_data, it will take precedence over element value when printing.
+ //! If you want to manipulate data of elements using values, use parser flag rapidxml::parse_no_data_nodes to prevent creation of data nodes by the parser.
+ //! \param value value of node to set. Does not have to be zero terminated.
+ //! \param size Size of value, in characters. This does not include zero terminator, if one is present.
+ void value(const Ch *value, std::size_t size)
+ {
+ m_value = const_cast<Ch *>(value);
+ m_value_size = size;
+ }
+
+ //! Sets value of node to a zero-terminated string.
+ //! See also \ref ownership_of_strings and xml_node::value(const Ch *, std::size_t).
+ //! \param value Vame of node to set. Must be zero terminated.
+ void value(const Ch *value)
+ {
+ this->value(value, internal::measure(value));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Related nodes access
+
+ //! Gets node parent.
+ //! \return Pointer to parent node, or 0 if there is no parent.
+ xml_node<Ch> *parent() const
+ {
+ return m_parent;
+ }
+
+ protected:
+
+ // Return empty string
+ static Ch *nullstr()
+ {
+ static Ch zero = Ch('\0');
+ return &zero;
+ }
+
+ Ch *m_name; // Name of node, or 0 if no name
+ Ch *m_value; // Value of node, or 0 if no value
+ std::size_t m_name_size; // Length of node name, or undefined of no name
+ std::size_t m_value_size; // Length of node value, or undefined if no value
+ xml_node<Ch> *m_parent; // Pointer to parent node, or 0 if none
+
+ };
+
+ //! Class representing attribute node of XML document.
+ //! Each attribute has name and value strings, which are available through name() and value() functions (inherited from xml_base).
+ //! Note that after parse, both name and value of attribute will point to interior of source text used for parsing.
+ //! Thus, this text must persist in memory for the lifetime of attribute.
+ //! \param Ch Character type to use.
+ template<class Ch = char>
+ class xml_attribute: public xml_base<Ch>
+ {
+
+ friend class xml_node<Ch>;
+
+ public:
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Construction & destruction
+
+ //! Constructs an empty attribute with the specified type.
+ //! Consider using memory_pool of appropriate xml_document if allocating attributes manually.
+ xml_attribute()
+ {
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Related nodes access
+
+ //! Gets document of which attribute is a child.
+ //! \return Pointer to document that contains this attribute, or 0 if there is no parent document.
+ xml_document<Ch> *document() const
+ {
+ if (xml_node<Ch> *node = this->parent())
+ {
+ while (node->parent())
+ node = node->parent();
+ return node->type() == node_document ? static_cast<xml_document<Ch> *>(node) : 0;
+ }
+ else
+ return 0;
+ }
+
+ //! Gets previous attribute, optionally matching attribute name.
+ //! \param name Name of attribute to find, or 0 to return previous attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found attribute, or 0 if not found.
+ xml_attribute<Ch> *previous_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_attribute<Ch> *attribute = m_prev_attribute; attribute; attribute = attribute->m_prev_attribute)
+ if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
+ return attribute;
+ return 0;
+ }
+ else
+ return this->m_parent ? m_prev_attribute : 0;
+ }
+
+ //! Gets next attribute, optionally matching attribute name.
+ //! \param name Name of attribute to find, or 0 to return next attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found attribute, or 0 if not found.
+ xml_attribute<Ch> *next_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_attribute<Ch> *attribute = m_next_attribute; attribute; attribute = attribute->m_next_attribute)
+ if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
+ return attribute;
+ return 0;
+ }
+ else
+ return this->m_parent ? m_next_attribute : 0;
+ }
+
+ private:
+
+ xml_attribute<Ch> *m_prev_attribute; // Pointer to previous sibling of attribute, or 0 if none; only valid if parent is non-zero
+ xml_attribute<Ch> *m_next_attribute; // Pointer to next sibling of attribute, or 0 if none; only valid if parent is non-zero
+
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ // XML node
+
+ //! Class representing a node of XML document.
+ //! Each node may have associated name and value strings, which are available through name() and value() functions.
+ //! Interpretation of name and value depends on type of the node.
+ //! Type of node can be determined by using type() function.
+ //! <br><br>
+ //! Note that after parse, both name and value of node, if any, will point interior of source text used for parsing.
+ //! Thus, this text must persist in the memory for the lifetime of node.
+ //! \param Ch Character type to use.
+ template<class Ch = char>
+ class xml_node: public xml_base<Ch>
+ {
+
+ public:
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Construction & destruction
+
+ //! Constructs an empty node with the specified type.
+ //! Consider using memory_pool of appropriate document to allocate nodes manually.
+ //! \param type Type of node to construct.
+ xml_node(node_type type)
+ : m_type(type)
+ , m_first_node(0)
+ , m_first_attribute(0)
+ {
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Node data access
+
+ //! Gets type of node.
+ //! \return Type of node.
+ node_type type() const
+ {
+ return m_type;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Related nodes access
+
+ //! Gets document of which node is a child.
+ //! \return Pointer to document that contains this node, or 0 if there is no parent document.
+ xml_document<Ch> *document() const
+ {
+ xml_node<Ch> *node = const_cast<xml_node<Ch> *>(this);
+ while (node->parent())
+ node = node->parent();
+ return node->type() == node_document ? static_cast<xml_document<Ch> *>(node) : 0;
+ }
+
+ //! Gets first child node, optionally matching node name.
+ //! \param name Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found child, or 0 if not found.
+ xml_node<Ch> *first_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_node<Ch> *child = m_first_node; child; child = child->next_sibling())
+ if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive))
+ return child;
+ return 0;
+ }
+ else
+ return m_first_node;
+ }
+
+ //! Gets last child node, optionally matching node name.
+ //! Behaviour is undefined if node has no children.
+ //! Use first_node() to test if node has children.
+ //! \param name Name of child to find, or 0 to return last child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found child, or 0 if not found.
+ xml_node<Ch> *last_node(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ assert(m_first_node); // Cannot query for last child if node has no children
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_node<Ch> *child = m_last_node; child; child = child->previous_sibling())
+ if (internal::compare(child->name(), child->name_size(), name, name_size, case_sensitive))
+ return child;
+ return 0;
+ }
+ else
+ return m_last_node;
+ }
+
+ //! Gets previous sibling node, optionally matching node name.
+ //! Behaviour is undefined if node has no parent.
+ //! Use parent() to test if node has a parent.
+ //! \param name Name of sibling to find, or 0 to return previous sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found sibling, or 0 if not found.
+ xml_node<Ch> *previous_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ assert(this->m_parent); // Cannot query for siblings if node has no parent
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_node<Ch> *sibling = m_prev_sibling; sibling; sibling = sibling->m_prev_sibling)
+ if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive))
+ return sibling;
+ return 0;
+ }
+ else
+ return m_prev_sibling;
+ }
+
+ //! Gets next sibling node, optionally matching node name.
+ //! Behaviour is undefined if node has no parent.
+ //! Use parent() to test if node has a parent.
+ //! \param name Name of sibling to find, or 0 to return next sibling regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found sibling, or 0 if not found.
+ xml_node<Ch> *next_sibling(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ assert(this->m_parent); // Cannot query for siblings if node has no parent
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_node<Ch> *sibling = m_next_sibling; sibling; sibling = sibling->m_next_sibling)
+ if (internal::compare(sibling->name(), sibling->name_size(), name, name_size, case_sensitive))
+ return sibling;
+ return 0;
+ }
+ else
+ return m_next_sibling;
+ }
+
+ //! Gets first attribute of node, optionally matching attribute name.
+ //! \param name Name of attribute to find, or 0 to return first attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found attribute, or 0 if not found.
+ xml_attribute<Ch> *first_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_attribute<Ch> *attribute = m_first_attribute; attribute; attribute = attribute->m_next_attribute)
+ if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
+ return attribute;
+ return 0;
+ }
+ else
+ return m_first_attribute;
+ }
+
+ //! Gets last attribute of node, optionally matching attribute name.
+ //! \param name Name of attribute to find, or 0 to return last attribute regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero
+ //! \param name_size Size of name, in characters, or 0 to have size calculated automatically from string
+ //! \param case_sensitive Should name comparison be case-sensitive; non case-sensitive comparison works properly only for ASCII characters
+ //! \return Pointer to found attribute, or 0 if not found.
+ xml_attribute<Ch> *last_attribute(const Ch *name = 0, std::size_t name_size = 0, bool case_sensitive = true) const
+ {
+ if (name)
+ {
+ if (name_size == 0)
+ name_size = internal::measure(name);
+ for (xml_attribute<Ch> *attribute = m_last_attribute; attribute; attribute = attribute->m_prev_attribute)
+ if (internal::compare(attribute->name(), attribute->name_size(), name, name_size, case_sensitive))
+ return attribute;
+ return 0;
+ }
+ else
+ return m_first_attribute ? m_last_attribute : 0;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Node modification
+
+ //! Sets type of node.
+ //! \param type Type of node to set.
+ void type(node_type type)
+ {
+ m_type = type;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Node manipulation
+
+ //! Prepends a new child node.
+ //! The prepended child becomes the first child, and all existing children are moved one position back.
+ //! \param child Node to prepend.
+ void prepend_node(xml_node<Ch> *child)
+ {
+ assert(child && !child->parent() && child->type() != node_document);
+ if (first_node())
+ {
+ child->m_next_sibling = m_first_node;
+ m_first_node->m_prev_sibling = child;
+ }
+ else
+ {
+ child->m_next_sibling = 0;
+ m_last_node = child;
+ }
+ m_first_node = child;
+ child->m_parent = this;
+ child->m_prev_sibling = 0;
+ }
+
+ //! Appends a new child node.
+ //! The appended child becomes the last child.
+ //! \param child Node to append.
+ void append_node(xml_node<Ch> *child)
+ {
+ assert(child && !child->parent() && child->type() != node_document);
+ if (first_node())
+ {
+ child->m_prev_sibling = m_last_node;
+ m_last_node->m_next_sibling = child;
+ }
+ else
+ {
+ child->m_prev_sibling = 0;
+ m_first_node = child;
+ }
+ m_last_node = child;
+ child->m_parent = this;
+ child->m_next_sibling = 0;
+ }
+
+ //! Inserts a new child node at specified place inside the node.
+ //! All children after and including the specified node are moved one position back.
+ //! \param where Place where to insert the child, or 0 to insert at the back.
+ //! \param child Node to insert.
+ void insert_node(xml_node<Ch> *where, xml_node<Ch> *child)
+ {
+ assert(!where || where->parent() == this);
+ assert(child && !child->parent() && child->type() != node_document);
+ if (where == m_first_node)
+ prepend_node(child);
+ else if (where == 0)
+ append_node(child);
+ else
+ {
+ child->m_prev_sibling = where->m_prev_sibling;
+ child->m_next_sibling = where;
+ where->m_prev_sibling->m_next_sibling = child;
+ where->m_prev_sibling = child;
+ child->m_parent = this;
+ }
+ }
+
+ //! Removes first child node.
+ //! If node has no children, behaviour is undefined.
+ //! Use first_node() to test if node has children.
+ void remove_first_node()
+ {
+ assert(first_node());
+ xml_node<Ch> *child = m_first_node;
+ m_first_node = child->m_next_sibling;
+ if (child->m_next_sibling)
+ child->m_next_sibling->m_prev_sibling = 0;
+ else
+ m_last_node = 0;
+ child->m_parent = 0;
+ }
+
+ //! Removes last child of the node.
+ //! If node has no children, behaviour is undefined.
+ //! Use first_node() to test if node has children.
+ void remove_last_node()
+ {
+ assert(first_node());
+ xml_node<Ch> *child = m_last_node;
+ if (child->m_prev_sibling)
+ {
+ m_last_node = child->m_prev_sibling;
+ child->m_prev_sibling->m_next_sibling = 0;
+ }
+ else
+ m_first_node = 0;
+ child->m_parent = 0;
+ }
+
+ //! Removes specified child from the node
+ // \param where Pointer to child to be removed.
+ void remove_node(xml_node<Ch> *where)
+ {
+ assert(where && where->parent() == this);
+ assert(first_node());
+ if (where == m_first_node)
+ remove_first_node();
+ else if (where == m_last_node)
+ remove_last_node();
+ else
+ {
+ where->m_prev_sibling->m_next_sibling = where->m_next_sibling;
+ where->m_next_sibling->m_prev_sibling = where->m_prev_sibling;
+ where->m_parent = 0;
+ }
+ }
+
+ //! Removes all child nodes (but not attributes).
+ void remove_all_nodes()
+ {
+ for (xml_node<Ch> *node = first_node(); node; node = node->m_next_sibling)
+ node->m_parent = 0;
+ m_first_node = 0;
+ }
+
+ //! Prepends a new attribute to the node.
+ //! \param attribute Attribute to prepend.
+ void prepend_attribute(xml_attribute<Ch> *attribute)
+ {
+ assert(attribute && !attribute->parent());
+ if (first_attribute())
+ {
+ attribute->m_next_attribute = m_first_attribute;
+ m_first_attribute->m_prev_attribute = attribute;
+ }
+ else
+ {
+ attribute->m_next_attribute = 0;
+ m_last_attribute = attribute;
+ }
+ m_first_attribute = attribute;
+ attribute->m_parent = this;
+ attribute->m_prev_attribute = 0;
+ }
+
+ //! Appends a new attribute to the node.
+ //! \param attribute Attribute to append.
+ void append_attribute(xml_attribute<Ch> *attribute)
+ {
+ assert(attribute && !attribute->parent());
+ if (first_attribute())
+ {
+ attribute->m_prev_attribute = m_last_attribute;
+ m_last_attribute->m_next_attribute = attribute;
+ }
+ else
+ {
+ attribute->m_prev_attribute = 0;
+ m_first_attribute = attribute;
+ }
+ m_last_attribute = attribute;
+ attribute->m_parent = this;
+ attribute->m_next_attribute = 0;
+ }
+
+ //! Inserts a new attribute at specified place inside the node.
+ //! All attributes after and including the specified attribute are moved one position back.
+ //! \param where Place where to insert the attribute, or 0 to insert at the back.
+ //! \param attribute Attribute to insert.
+ void insert_attribute(xml_attribute<Ch> *where, xml_attribute<Ch> *attribute)
+ {
+ assert(!where || where->parent() == this);
+ assert(attribute && !attribute->parent());
+ if (where == m_first_attribute)
+ prepend_attribute(attribute);
+ else if (where == 0)
+ append_attribute(attribute);
+ else
+ {
+ attribute->m_prev_attribute = where->m_prev_attribute;
+ attribute->m_next_attribute = where;
+ where->m_prev_attribute->m_next_attribute = attribute;
+ where->m_prev_attribute = attribute;
+ attribute->m_parent = this;
+ }
+ }
+
+ //! Removes first attribute of the node.
+ //! If node has no attributes, behaviour is undefined.
+ //! Use first_attribute() to test if node has attributes.
+ void remove_first_attribute()
+ {
+ assert(first_attribute());
+ xml_attribute<Ch> *attribute = m_first_attribute;
+ if (attribute->m_next_attribute)
+ {
+ attribute->m_next_attribute->m_prev_attribute = 0;
+ }
+ else
+ m_last_attribute = 0;
+ attribute->m_parent = 0;
+ m_first_attribute = attribute->m_next_attribute;
+ }
+
+ //! Removes last attribute of the node.
+ //! If node has no attributes, behaviour is undefined.
+ //! Use first_attribute() to test if node has attributes.
+ void remove_last_attribute()
+ {
+ assert(first_attribute());
+ xml_attribute<Ch> *attribute = m_last_attribute;
+ if (attribute->m_prev_attribute)
+ {
+ attribute->m_prev_attribute->m_next_attribute = 0;
+ m_last_attribute = attribute->m_prev_attribute;
+ }
+ else
+ m_first_attribute = 0;
+ attribute->m_parent = 0;
+ }
+
+ //! Removes specified attribute from node.
+ //! \param where Pointer to attribute to be removed.
+ void remove_attribute(xml_attribute<Ch> *where)
+ {
+ assert(first_attribute() && where->parent() == this);
+ if (where == m_first_attribute)
+ remove_first_attribute();
+ else if (where == m_last_attribute)
+ remove_last_attribute();
+ else
+ {
+ where->m_prev_attribute->m_next_attribute = where->m_next_attribute;
+ where->m_next_attribute->m_prev_attribute = where->m_prev_attribute;
+ where->m_parent = 0;
+ }
+ }
+
+ //! Removes all attributes of node.
+ void remove_all_attributes()
+ {
+ for (xml_attribute<Ch> *attribute = first_attribute(); attribute; attribute = attribute->m_next_attribute)
+ attribute->m_parent = 0;
+ m_first_attribute = 0;
+ }
+
+ private:
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Restrictions
+
+ // No copying
+ xml_node(const xml_node &);
+ void operator =(const xml_node &);
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Data members
+
+ // Note that some of the pointers below have UNDEFINED values if certain other pointers are 0.
+ // This is required for maximum performance, as it allows the parser to omit initialization of
+ // unneded/redundant values.
+ //
+ // The rules are as follows:
+ // 1. first_node and first_attribute contain valid pointers, or 0 if node has no children/attributes respectively
+ // 2. last_node and last_attribute are valid only if node has at least one child/attribute respectively, otherwise they contain garbage
+ // 3. prev_sibling and next_sibling are valid only if node has a parent, otherwise they contain garbage
+
+ node_type m_type; // Type of node; always valid
+ xml_node<Ch> *m_first_node; // Pointer to first child node, or 0 if none; always valid
+ xml_node<Ch> *m_last_node; // Pointer to last child node, or 0 if none; this value is only valid if m_first_node is non-zero
+ xml_attribute<Ch> *m_first_attribute; // Pointer to first attribute of node, or 0 if none; always valid
+ xml_attribute<Ch> *m_last_attribute; // Pointer to last attribute of node, or 0 if none; this value is only valid if m_first_attribute is non-zero
+ xml_node<Ch> *m_prev_sibling; // Pointer to previous sibling of node, or 0 if none; this value is only valid if m_parent is non-zero
+ xml_node<Ch> *m_next_sibling; // Pointer to next sibling of node, or 0 if none; this value is only valid if m_parent is non-zero
+
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
+ // XML document
+
+ //! This class represents root of the DOM hierarchy.
+ //! It is also an xml_node and a memory_pool through public inheritance.
+ //! Use parse() function to build a DOM tree from a zero-terminated XML text string.
+ //! parse() function allocates memory for nodes and attributes by using functions of xml_document,
+ //! which are inherited from memory_pool.
+ //! To access root node of the document, use the document itself, as if it was an xml_node.
+ //! \param Ch Character type to use.
+ template<class Ch = char>
+ class xml_document: public xml_node<Ch>, public memory_pool<Ch>
+ {
+
+ public:
+
+ //! Constructs empty XML document
+ xml_document()
+ : xml_node<Ch>(node_document)
+ {
+ }
+
+ //! Parses zero-terminated XML string according to given flags.
+ //! Passed string will be modified by the parser, unless rapidxml::parse_non_destructive flag is used.
+ //! The string must persist for the lifetime of the document.
+ //! In case of error, rapidxml::parse_error exception will be thrown.
+ //! <br><br>
+ //! If you want to parse contents of a file, you must first load the file into the memory, and pass pointer to its beginning.
+ //! Make sure that data is zero-terminated.
+ //! <br><br>
+ //! Document can be parsed into multiple times.
+ //! Each new call to parse removes previous nodes and attributes (if any), but does not clear memory pool.
+ //! \param text XML data to parse; pointer is non-const to denote fact that this data may be modified by the parser.
+ template<int Flags>
+ void parse(Ch *text)
+ {
+ assert(text);
+
+ // Remove current contents
+ this->remove_all_nodes();
+ this->remove_all_attributes();
+
+ // Parse BOM, if any
+ parse_bom<Flags>(text);
+
+ // Parse children
+ while (1)
+ {
+ // Skip whitespace before node
+ skip<whitespace_pred, Flags>(text);
+ if (*text == 0)
+ break;
+
+ // Parse and append new child
+ if (*text == Ch('<'))
+ {
+ ++text; // Skip '<'
+ if (xml_node<Ch> *node = parse_node<Flags>(text))
+ this->append_node(node);
+ }
+ else
+ RAPIDXML_PARSE_ERROR("expected <", text);
+ }
+
+ }
+
+ //! Clears the document by deleting all nodes and clearing the memory pool.
+ //! All nodes owned by document pool are destroyed.
+ void clear()
+ {
+ this->remove_all_nodes();
+ this->remove_all_attributes();
+ memory_pool<Ch>::clear();
+ }
+
+ private:
+
+ ///////////////////////////////////////////////////////////////////////
+ // Internal character utility functions
+
+ // Detect whitespace character
+ struct whitespace_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_whitespace[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect node name character
+ struct node_name_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_node_name[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect attribute name character
+ struct attribute_name_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_attribute_name[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect text character (PCDATA)
+ struct text_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_text[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect text character (PCDATA) that does not require processing
+ struct text_pure_no_ws_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_text_pure_no_ws[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect text character (PCDATA) that does not require processing
+ struct text_pure_with_ws_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ return internal::lookup_tables<0>::lookup_text_pure_with_ws[static_cast<unsigned char>(ch)];
+ }
+ };
+
+ // Detect attribute value character
+ template<Ch Quote>
+ struct attribute_value_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ if (Quote == Ch('\''))
+ return internal::lookup_tables<0>::lookup_attribute_data_1[static_cast<unsigned char>(ch)];
+ if (Quote == Ch('\"'))
+ return internal::lookup_tables<0>::lookup_attribute_data_2[static_cast<unsigned char>(ch)];
+ return 0; // Should never be executed, to avoid warnings on Comeau
+ }
+ };
+
+ // Detect attribute value character
+ template<Ch Quote>
+ struct attribute_value_pure_pred
+ {
+ static unsigned char test(Ch ch)
+ {
+ if (Quote == Ch('\''))
+ return internal::lookup_tables<0>::lookup_attribute_data_1_pure[static_cast<unsigned char>(ch)];
+ if (Quote == Ch('\"'))
+ return internal::lookup_tables<0>::lookup_attribute_data_2_pure[static_cast<unsigned char>(ch)];
+ return 0; // Should never be executed, to avoid warnings on Comeau
+ }
+ };
+
+ // Insert coded character, using UTF8 or 8-bit ASCII
+ template<int Flags>
+ static void insert_coded_character(Ch *&text, unsigned long code)
+ {
+ if (Flags & parse_no_utf8)
+ {
+ // Insert 8-bit ASCII character
+ // Todo: possibly verify that code is less than 256 and use replacement char otherwise?
+ text[0] = static_cast<unsigned char>(code);
+ text += 1;
+ }
+ else
+ {
+ // Insert UTF8 sequence
+ if (code < 0x80) // 1 byte sequence
+ {
+ text[0] = static_cast<unsigned char>(code);
+ text += 1;
+ }
+ else if (code < 0x800) // 2 byte sequence
+ {
+ text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[0] = static_cast<unsigned char>(code | 0xC0);
+ text += 2;
+ }
+ else if (code < 0x10000) // 3 byte sequence
+ {
+ text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[0] = static_cast<unsigned char>(code | 0xE0);
+ text += 3;
+ }
+ else if (code < 0x110000) // 4 byte sequence
+ {
+ text[3] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[2] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[1] = static_cast<unsigned char>((code | 0x80) & 0xBF); code >>= 6;
+ text[0] = static_cast<unsigned char>(code | 0xF0);
+ text += 4;
+ }
+ else // Invalid, only codes up to 0x10FFFF are allowed in Unicode
+ {
+ RAPIDXML_PARSE_ERROR("invalid numeric character entity", text);
+ }
+ }
+ }
+
+ // Skip characters until predicate evaluates to true
+ template<class StopPred, int Flags>
+ static void skip(Ch *&text)
+ {
+ Ch *tmp = text;
+ while (StopPred::test(*tmp))
+ ++tmp;
+ text = tmp;
+ }
+
+ // Skip characters until predicate evaluates to true while doing the following:
+ // - replacing XML character entity references with proper characters (&apos; &amp; &quot; &lt; &gt; &#...;)
+ // - condensing whitespace sequences to single space character
+ template<class StopPred, class StopPredPure, int Flags>
+ static Ch *skip_and_expand_character_refs(Ch *&text)
+ {
+ // If entity translation, whitespace condense and whitespace trimming is disabled, use plain skip
+ if (Flags & parse_no_entity_translation &&
+ !(Flags & parse_normalize_whitespace) &&
+ !(Flags & parse_trim_whitespace))
+ {
+ skip<StopPred, Flags>(text);
+ return text;
+ }
+
+ // Use simple skip until first modification is detected
+ skip<StopPredPure, Flags>(text);
+
+ // Use translation skip
+ Ch *src = text;
+ Ch *dest = src;
+ while (StopPred::test(*src))
+ {
+ // If entity translation is enabled
+ if (!(Flags & parse_no_entity_translation))
+ {
+ // Test if replacement is needed
+ if (src[0] == Ch('&'))
+ {
+ switch (src[1])
+ {
+
+ // &amp; &apos;
+ case Ch('a'):
+ if (src[2] == Ch('m') && src[3] == Ch('p') && src[4] == Ch(';'))
+ {
+ *dest = Ch('&');
+ ++dest;
+ src += 5;
+ continue;
+ }
+ if (src[2] == Ch('p') && src[3] == Ch('o') && src[4] == Ch('s') && src[5] == Ch(';'))
+ {
+ *dest = Ch('\'');
+ ++dest;
+ src += 6;
+ continue;
+ }
+ break;
+
+ // &quot;
+ case Ch('q'):
+ if (src[2] == Ch('u') && src[3] == Ch('o') && src[4] == Ch('t') && src[5] == Ch(';'))
+ {
+ *dest = Ch('"');
+ ++dest;
+ src += 6;
+ continue;
+ }
+ break;
+
+ // &gt;
+ case Ch('g'):
+ if (src[2] == Ch('t') && src[3] == Ch(';'))
+ {
+ *dest = Ch('>');
+ ++dest;
+ src += 4;
+ continue;
+ }
+ break;
+
+ // &lt;
+ case Ch('l'):
+ if (src[2] == Ch('t') && src[3] == Ch(';'))
+ {
+ *dest = Ch('<');
+ ++dest;
+ src += 4;
+ continue;
+ }
+ break;
+
+ // &#...; - assumes ASCII
+ case Ch('#'):
+ if (src[2] == Ch('x'))
+ {
+ unsigned long code = 0;
+ src += 3; // Skip &#x
+ while (1)
+ {
+ unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast<unsigned char>(*src)];
+ if (digit == 0xFF)
+ break;
+ code = code * 16 + digit;
+ ++src;
+ }
+ insert_coded_character<Flags>(dest, code); // Put character in output
+ }
+ else
+ {
+ unsigned long code = 0;
+ src += 2; // Skip &#
+ while (1)
+ {
+ unsigned char digit = internal::lookup_tables<0>::lookup_digits[static_cast<unsigned char>(*src)];
+ if (digit == 0xFF)
+ break;
+ code = code * 10 + digit;
+ ++src;
+ }
+ insert_coded_character<Flags>(dest, code); // Put character in output
+ }
+ if (*src == Ch(';'))
+ ++src;
+ else
+ RAPIDXML_PARSE_ERROR("expected ;", src);
+ continue;
+
+ // Something else
+ default:
+ // Ignore, just copy '&' verbatim
+ break;
+
+ }
+ }
+ }
+
+ // If whitespace condensing is enabled
+ if (Flags & parse_normalize_whitespace)
+ {
+ // Test if condensing is needed
+ if (whitespace_pred::test(*src))
+ {
+ *dest = Ch(' '); ++dest; // Put single space in dest
+ ++src; // Skip first whitespace char
+ // Skip remaining whitespace chars
+ while (whitespace_pred::test(*src))
+ ++src;
+ continue;
+ }
+ }
+
+ // No replacement, only copy character
+ *dest++ = *src++;
+
+ }
+
+ // Return new end
+ text = src;
+ return dest;
+
+ }
+
+ ///////////////////////////////////////////////////////////////////////
+ // Internal parsing functions
+
+ // Parse BOM, if any
+ template<int Flags>
+ void parse_bom(Ch *&text)
+ {
+ // UTF-8?
+ if (static_cast<unsigned char>(text[0]) == 0xEF &&
+ static_cast<unsigned char>(text[1]) == 0xBB &&
+ static_cast<unsigned char>(text[2]) == 0xBF)
+ {
+ text += 3; // Skup utf-8 bom
+ }
+ }
+
+ // Parse XML declaration (<?xml...)
+ template<int Flags>
+ xml_node<Ch> *parse_xml_declaration(Ch *&text)
+ {
+ // If parsing of declaration is disabled
+ if (!(Flags & parse_declaration_node))
+ {
+ // Skip until end of declaration
+ while (text[0] != Ch('?') || text[1] != Ch('>'))
+ {
+ if (!text[0]) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+ text += 2; // Skip '?>'
+ return 0;
+ }
+
+ // Create declaration
+ xml_node<Ch> *declaration = this->allocate_node(node_declaration);
+
+ // Skip whitespace before attributes or ?>
+ skip<whitespace_pred, Flags>(text);
+
+ // Parse declaration attributes
+ parse_node_attributes<Flags>(text, declaration);
+
+ // Skip ?>
+ if (text[0] != Ch('?') || text[1] != Ch('>'))
+ RAPIDXML_PARSE_ERROR("expected ?>", text);
+ text += 2;
+
+ return declaration;
+ }
+
+ // Parse XML comment (<!--...)
+ template<int Flags>
+ xml_node<Ch> *parse_comment(Ch *&text)
+ {
+ // If parsing of comments is disabled
+ if (!(Flags & parse_comment_nodes))
+ {
+ // Skip until end of comment
+ while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
+ {
+ if (!text[0]) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+ text += 3; // Skip '-->'
+ return 0; // Do not produce comment node
+ }
+
+ // Remember value start
+ Ch *value = text;
+
+ // Skip until end of comment
+ while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
+ {
+ if (!text[0]) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+
+ // Create comment node
+ xml_node<Ch> *comment = this->allocate_node(node_comment);
+ comment->value(value, text - value);
+
+ // Place zero terminator after comment value
+ if (!(Flags & parse_no_string_terminators))
+ *text = Ch('\0');
+
+ text += 3; // Skip '-->'
+ return comment;
+ }
+
+ // Parse DOCTYPE
+ template<int Flags>
+ xml_node<Ch> *parse_doctype(Ch *&text)
+ {
+ // Remember value start
+ Ch *value = text;
+
+ // Skip to >
+ while (*text != Ch('>'))
+ {
+ // Determine character type
+ switch (*text)
+ {
+
+ // If '[' encountered, scan for matching ending ']' using naive algorithm with depth
+ // This works for all W3C test files except for 2 most wicked
+ case Ch('['):
+ {
+ ++text; // Skip '['
+ int depth = 1;
+ while (depth > 0)
+ {
+ switch (*text)
+ {
+ case Ch('['): ++depth; break;
+ case Ch(']'): --depth; break;
+ case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text); return 0;
+ }
+ ++text;
+ }
+ break;
+ }
+
+ // Error on end of text
+ case Ch('\0'):
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+
+ // Other character, skip it
+ default:
+ ++text;
+
+ }
+ }
+
+ // If DOCTYPE nodes enabled
+ if (Flags & parse_doctype_node)
+ {
+ // Create a new doctype node
+ xml_node<Ch> *doctype = this->allocate_node(node_doctype);
+ doctype->value(value, text - value);
+
+ // Place zero terminator after value
+ if (!(Flags & parse_no_string_terminators))
+ *text = Ch('\0');
+
+ text += 1; // skip '>'
+ return doctype;
+ }
+ else
+ {
+ text += 1; // skip '>'
+ return 0;
+ }
+
+ }
+
+ // Parse PI
+ template<int Flags>
+ xml_node<Ch> *parse_pi(Ch *&text)
+ {
+ // If creation of PI nodes is enabled
+ if (Flags & parse_pi_nodes)
+ {
+ // Create pi node
+ xml_node<Ch> *pi = this->allocate_node(node_pi);
+
+ // Extract PI target name
+ Ch *name = text;
+ skip<node_name_pred, Flags>(text);
+ if (text == name)
+ RAPIDXML_PARSE_ERROR("expected PI target", text);
+ pi->name(name, text - name);
+
+ // Skip whitespace between pi target and pi
+ skip<whitespace_pred, Flags>(text);
+
+ // Remember start of pi
+ Ch *value = text;
+
+ // Skip to '?>'
+ while (text[0] != Ch('?') || text[1] != Ch('>'))
+ {
+ if (*text == Ch('\0')) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+
+ // Set pi value (verbatim, no entity expansion or whitespace normalization)
+ pi->value(value, text - value);
+
+ // Place zero terminator after name and value
+ if (!(Flags & parse_no_string_terminators))
+ {
+ pi->name()[pi->name_size()] = Ch('\0');
+ pi->value()[pi->value_size()] = Ch('\0');
+ }
+
+ text += 2; // Skip '?>'
+ return pi;
+ }
+ else
+ {
+ // Skip to '?>'
+ while (text[0] != Ch('?') || text[1] != Ch('>'))
+ {
+ if (*text == Ch('\0')) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+ text += 2; // Skip '?>'
+ return 0;
+ }
+ }
+
+ // Parse and append data
+ // Return character that ends data.
+ // This is necessary because this character might have been overwritten by a terminating 0
+ template<int Flags>
+ Ch parse_and_append_data(xml_node<Ch> *node, Ch *&text, Ch *contents_start)
+ {
+ // Backup to contents start if whitespace trimming is disabled
+ if (!(Flags & parse_trim_whitespace))
+ text = contents_start;
+
+ // Skip until end of data
+ Ch *value = text, *end;
+ if (Flags & parse_normalize_whitespace)
+ end = skip_and_expand_character_refs<text_pred, text_pure_with_ws_pred, Flags>(text);
+ else
+ end = skip_and_expand_character_refs<text_pred, text_pure_no_ws_pred, Flags>(text);
+
+ // Trim trailing whitespace if flag is set; leading was already trimmed by whitespace skip after >
+ if (Flags & parse_trim_whitespace)
+ {
+ if (Flags & parse_normalize_whitespace)
+ {
+ // Whitespace is already condensed to single space characters by skipping function, so just trim 1 char off the end
+ if (*(end - 1) == Ch(' '))
+ --end;
+ }
+ else
+ {
+ // Backup until non-whitespace character is found
+ while (whitespace_pred::test(*(end - 1)))
+ --end;
+ }
+ }
+
+ // If characters are still left between end and value (this test is only necessary if normalization is enabled)
+ // Create new data node
+ if (!(Flags & parse_no_data_nodes))
+ {
+ xml_node<Ch> *data = this->allocate_node(node_data);
+ data->value(value, end - value);
+ node->append_node(data);
+ }
+
+ // Add data to parent node if no data exists yet
+ if (!(Flags & parse_no_element_values))
+ if (*node->value() == Ch('\0'))
+ node->value(value, end - value);
+
+ // Place zero terminator after value
+ if (!(Flags & parse_no_string_terminators))
+ {
+ Ch ch = *text;
+ *end = Ch('\0');
+ return ch; // Return character that ends data; this is required because zero terminator overwritten it
+ }
+
+ // Return character that ends data
+ return *text;
+ }
+
+ // Parse CDATA
+ template<int Flags>
+ xml_node<Ch> *parse_cdata(Ch *&text)
+ {
+ // If CDATA is disabled
+ if (Flags & parse_no_data_nodes)
+ {
+ // Skip until end of cdata
+ while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
+ {
+ if (!text[0]) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+ text += 3; // Skip ]]>
+ return 0; // Do not produce CDATA node
+ }
+
+ // Skip until end of cdata
+ Ch *value = text;
+ while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
+ {
+ if (!text[0]) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+
+ // Create new cdata node
+ xml_node<Ch> *cdata = this->allocate_node(node_cdata);
+ cdata->value(value, text - value);
+
+ // Place zero terminator after value
+ if (!(Flags & parse_no_string_terminators))
+ *text = Ch('\0');
+
+ text += 3; // Skip ]]>
+ return cdata;
+ }
+
+ // Parse element node
+ template<int Flags>
+ xml_node<Ch> *parse_element(Ch *&text)
+ {
+ // Create element node
+ xml_node<Ch> *element = this->allocate_node(node_element);
+
+ // Extract element name
+ Ch *name = text;
+ skip<node_name_pred, Flags>(text);
+ if (text == name)
+ RAPIDXML_PARSE_ERROR("expected element name", text);
+ element->name(name, text - name);
+
+ // Skip whitespace between element name and attributes or >
+ skip<whitespace_pred, Flags>(text);
+
+ // Parse attributes, if any
+ parse_node_attributes<Flags>(text, element);
+
+ // Determine ending type
+ if (*text == Ch('>'))
+ {
+ ++text;
+ parse_node_contents<Flags>(text, element);
+ }
+ else if (*text == Ch('/'))
+ {
+ ++text;
+ if (*text != Ch('>'))
+ RAPIDXML_PARSE_ERROR("expected >", text);
+ ++text;
+ }
+ else
+ RAPIDXML_PARSE_ERROR("expected >", text);
+
+ // Place zero terminator after name
+ if (!(Flags & parse_no_string_terminators))
+ element->name()[element->name_size()] = Ch('\0');
+
+ // Return parsed element
+ return element;
+ }
+
+ // Determine node type, and parse it
+ template<int Flags>
+ xml_node<Ch> *parse_node(Ch *&text)
+ {
+ // Parse proper node type
+ switch (text[0])
+ {
+
+ // <...
+ default:
+ // Parse and append element node
+ return parse_element<Flags>(text);
+
+ // <?...
+ case Ch('?'):
+ ++text; // Skip ?
+ if ((text[0] == Ch('x') || text[0] == Ch('X')) &&
+ (text[1] == Ch('m') || text[1] == Ch('M')) &&
+ (text[2] == Ch('l') || text[2] == Ch('L')) &&
+ whitespace_pred::test(text[3]))
+ {
+ // '<?xml ' - xml declaration
+ text += 4; // Skip 'xml '
+ return parse_xml_declaration<Flags>(text);
+ }
+ else
+ {
+ // Parse PI
+ return parse_pi<Flags>(text);
+ }
+
+ // <!...
+ case Ch('!'):
+
+ // Parse proper subset of <! node
+ switch (text[1])
+ {
+
+ // <!-
+ case Ch('-'):
+ if (text[2] == Ch('-'))
+ {
+ // '<!--' - xml comment
+ text += 3; // Skip '!--'
+ return parse_comment<Flags>(text);
+ }
+ break;
+
+ // <![
+ case Ch('['):
+ if (text[2] == Ch('C') && text[3] == Ch('D') && text[4] == Ch('A') &&
+ text[5] == Ch('T') && text[6] == Ch('A') && text[7] == Ch('['))
+ {
+ // '<![CDATA[' - cdata
+ text += 8; // Skip '![CDATA['
+ return parse_cdata<Flags>(text);
+ }
+ break;
+
+ // <!D
+ case Ch('D'):
+ if (text[2] == Ch('O') && text[3] == Ch('C') && text[4] == Ch('T') &&
+ text[5] == Ch('Y') && text[6] == Ch('P') && text[7] == Ch('E') &&
+ whitespace_pred::test(text[8]))
+ {
+ // '<!DOCTYPE ' - doctype
+ text += 9; // skip '!DOCTYPE '
+ return parse_doctype<Flags>(text);
+ }
+
+ } // switch
+
+ // Attempt to skip other, unrecognized node types starting with <!
+ ++text; // Skip !
+ while (*text != Ch('>'))
+ {
+ if (*text == 0) {
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
+ ++text;
+ }
+ ++text; // Skip '>'
+ return 0; // No node recognized
+
+ }
+ }
+
+ // Parse contents of the node - children, data etc.
+ template<int Flags>
+ void parse_node_contents(Ch *&text, xml_node<Ch> *node)
+ {
+ // For all children and text
+ while (1)
+ {
+ // Skip whitespace between > and node contents
+ Ch *contents_start = text; // Store start of node contents before whitespace is skipped
+ skip<whitespace_pred, Flags>(text);
+ Ch next_char = *text;
+
+ // After data nodes, instead of continuing the loop, control jumps here.
+ // This is because zero termination inside parse_and_append_data() function
+ // would wreak havoc with the above code.
+ // Also, skipping whitespace after data nodes is unnecessary.
+ after_data_node:
+
+ // Determine what comes next: node closing, child node, data node, or 0?
+ switch (next_char)
+ {
+
+ // Node closing or child node
+ case Ch('<'):
+ if (text[1] == Ch('/'))
+ {
+ // Node closing
+ text += 2; // Skip '</'
+ if (Flags & parse_validate_closing_tags)
+ {
+ // Skip and validate closing tag name
+ Ch *closing_name = text;
+ skip<node_name_pred, Flags>(text);
+ if (!internal::compare(node->name(), node->name_size(), closing_name, text - closing_name, true))
+ RAPIDXML_PARSE_ERROR("invalid closing tag name", text);
+ }
+ else
+ {
+ // No validation, just skip name
+ skip<node_name_pred, Flags>(text);
+ }
+ // Skip remaining whitespace after node name
+ skip<whitespace_pred, Flags>(text);
+ if (*text != Ch('>'))
+ RAPIDXML_PARSE_ERROR("expected >", text);
+ ++text; // Skip '>'
+ return; // Node closed, finished parsing contents
+ }
+ else
+ {
+ // Child node
+ ++text; // Skip '<'
+ if (xml_node<Ch> *child = parse_node<Flags>(text))
+ node->append_node(child);
+ }
+ break;
+
+ // End of data - error
+ case Ch('\0'):
+ RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return;
+
+ // Data node
+ default:
+ next_char = parse_and_append_data<Flags>(node, text, contents_start);
+ goto after_data_node; // Bypass regular processing after data nodes
+
+ }
+ }
+ }
+
+ // Parse XML attributes of the node
+ template<int Flags>
+ void parse_node_attributes(Ch *&text, xml_node<Ch> *node)
+ {
+ // For all attributes
+ while (attribute_name_pred::test(*text))
+ {
+ // Extract attribute name
+ Ch *name = text;
+ ++text; // Skip first character of attribute name
+ skip<attribute_name_pred, Flags>(text);
+ if (text == name)
+ RAPIDXML_PARSE_ERROR("expected attribute name", name);
+
+ // Create new attribute
+ xml_attribute<Ch> *attribute = this->allocate_attribute();
+ attribute->name(name, text - name);
+ node->append_attribute(attribute);
+
+ // Skip whitespace after attribute name
+ skip<whitespace_pred, Flags>(text);
+
+ // Skip =
+ if (*text != Ch('='))
+ RAPIDXML_PARSE_ERROR("expected =", text);
+ ++text;
+
+ // Add terminating zero after name
+ if (!(Flags & parse_no_string_terminators))
+ attribute->name()[attribute->name_size()] = 0;
+
+ // Skip whitespace after =
+ skip<whitespace_pred, Flags>(text);
+
+ // Skip quote and remember if it was ' or "
+ Ch quote = *text;
+ if (quote != Ch('\'') && quote != Ch('"'))
+ RAPIDXML_PARSE_ERROR("expected ' or \"", text);
+ ++text;
+
+ // Extract attribute value and expand char refs in it
+ Ch *value = text, *end;
+ const int AttFlags = Flags & ~parse_normalize_whitespace; // No whitespace normalization in attributes
+ if (quote == Ch('\''))
+ end = skip_and_expand_character_refs<attribute_value_pred<Ch('\'')>, attribute_value_pure_pred<Ch('\'')>, AttFlags>(text);
+ else
+ end = skip_and_expand_character_refs<attribute_value_pred<Ch('"')>, attribute_value_pure_pred<Ch('"')>, AttFlags>(text);
+
+ // Set attribute value
+ attribute->value(value, end - value);
+
+ // Make sure that end quote is present
+ if (*text != quote)
+ RAPIDXML_PARSE_ERROR("expected ' or \"", text);
+ ++text; // Skip quote
+
+ // Add terminating zero after value
+ if (!(Flags & parse_no_string_terminators))
+ attribute->value()[attribute->value_size()] = 0;
+
+ // Skip whitespace after attribute value
+ skip<whitespace_pred, Flags>(text);
+ }
+ }
+
+ };
+
+ //! \cond internal
+ namespace internal
+ {
+
+ // Whitespace (space \n \r \t)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_whitespace[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, // 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 2
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 4
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 5
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 6
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 7
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 8
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 9
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // A
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // B
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // C
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // D
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // E
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 // F
+ };
+
+ // Node name (anything but space \n \r \t / > ? \0)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_node_name[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Text (i.e. PCDATA) (anything but < \0)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_text[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Text (i.e. PCDATA) that does not require processing when ws normalization is disabled
+ // (anything but < \0 &)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_text_pure_no_ws[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Text (i.e. PCDATA) that does not require processing when ws normalizationis is enabled
+ // (anything but < \0 & space \n \r \t)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_text_pure_with_ws[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Attribute name (anything but space \n \r \t / < > = ? ! \0)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_attribute_name[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Attribute data with single quote (anything but ' \0)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_attribute_data_1[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Attribute data with single quote that does not require processing (anything but ' \0 &)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_attribute_data_1_pure[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Attribute data with double quote (anything but " \0)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_attribute_data_2[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Attribute data with double quote that does not require processing (anything but " \0 &)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_attribute_data_2_pure[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 1
+ 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 4
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 5
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 6
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 7
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 8
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 9
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // A
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // B
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // C
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // D
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // E
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // F
+ };
+
+ // Digits (dec and hex, 255 denotes end of numeric character reference)
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_digits[256] =
+ {
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 0
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 1
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 2
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,255,255,255,255,255,255, // 3
+ 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 4
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 5
+ 255, 10, 11, 12, 13, 14, 15,255,255,255,255,255,255,255,255,255, // 6
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 7
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 8
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // 9
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // A
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // B
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // C
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // D
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, // E
+ 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 // F
+ };
+
+ // Upper case conversion
+ template<int Dummy>
+ const unsigned char lookup_tables<Dummy>::lookup_upcase[256] =
+ {
+ // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A B C D E F
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, // 0
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, // 1
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, // 2
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, // 3
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 4
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, // 5
+ 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, // 6
+ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123,124,125,126,127, // 7
+ 128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, // 8
+ 144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159, // 9
+ 160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175, // A
+ 176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, // B
+ 192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, // C
+ 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, // D
+ 224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, // E
+ 240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255 // F
+ };
+ }
+ //! \endcond
+
+}
+
+// Undefine internal macros
+#undef RAPIDXML_PARSE_ERROR
+
+// On MSVC, restore warnings state
+#ifdef _MSC_VER
+ #pragma warning(pop)
+#endif
+
+#endif
diff --git a/gui/remaining.txt b/gui/remaining.txt
new file mode 100644
index 000000000..298ee90ad
--- /dev/null
+++ b/gui/remaining.txt
@@ -0,0 +1,4 @@
+* Confirmation of action
+* Multi-String Variables
+* String Box
+
diff --git a/gui/resources.cpp b/gui/resources.cpp
new file mode 100644
index 000000000..6babc575c
--- /dev/null
+++ b/gui/resources.cpp
@@ -0,0 +1,277 @@
+// resource.cpp - Source to manage GUI resources
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+#define TMP_RESOURCE_NAME "/tmp/extract.bin"
+
+Resource::Resource(xml_node<>* node, ZipArchive* pZip)
+{
+ if (node && node->first_attribute("name"))
+ mName = node->first_attribute("name")->value();
+}
+
+int Resource::ExtractResource(ZipArchive* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile)
+{
+ if (!pZip)
+ return -1;
+
+ std::string src = folderName + "/" + fileName + fileExtn;
+
+ const ZipEntry* binary = mzFindZipEntry(pZip, src.c_str());
+ if (binary == NULL) {
+ return -1;
+ }
+
+ unlink(destFile.c_str());
+ int fd = creat(destFile.c_str(), 0666);
+ if (fd < 0)
+ return -1;
+
+ int ret = 0;
+ if (!mzExtractZipEntryToFile(pZip, binary, fd))
+ ret = -1;
+
+ close(fd);
+ return ret;
+}
+
+FontResource::FontResource(xml_node<>* node, ZipArchive* pZip)
+ : Resource(node, pZip)
+{
+ std::string file;
+
+ mFont = NULL;
+ if (!node)
+ return;
+
+ if (node->first_attribute("filename"))
+ file = node->first_attribute("filename")->value();
+
+ if (ExtractResource(pZip, "fonts", file, ".dat", TMP_RESOURCE_NAME) == 0)
+ {
+ mFont = gr_loadFont(TMP_RESOURCE_NAME);
+ unlink(TMP_RESOURCE_NAME);
+ }
+ else
+ {
+ mFont = gr_loadFont(file.c_str());
+ }
+}
+
+FontResource::~FontResource()
+{
+}
+
+ImageResource::ImageResource(xml_node<>* node, ZipArchive* pZip)
+ : Resource(node, pZip)
+{
+ std::string file;
+
+ mSurface = NULL;
+ if (!node)
+ return;
+
+ if (node->first_attribute("filename"))
+ file = node->first_attribute("filename")->value();
+
+ if (ExtractResource(pZip, "images", file, ".png", TMP_RESOURCE_NAME) == 0)
+ {
+ res_create_surface(TMP_RESOURCE_NAME, &mSurface);
+ unlink(TMP_RESOURCE_NAME);
+ }
+ else if (ExtractResource(pZip, "images", file, "", TMP_RESOURCE_NAME) == 0)
+ {
+ // JPG includes the .jpg extension in the filename so extension should be blank
+ res_create_surface(TMP_RESOURCE_NAME, &mSurface);
+ unlink(TMP_RESOURCE_NAME);
+ }
+ else
+ res_create_surface(file.c_str(), &mSurface);
+}
+
+ImageResource::~ImageResource()
+{
+ if (mSurface)
+ res_free_surface(mSurface);
+}
+
+AnimationResource::AnimationResource(xml_node<>* node, ZipArchive* pZip)
+ : Resource(node, pZip)
+{
+ std::string file;
+ int fileNum = 1;
+
+ if (!node)
+ return;
+
+ if (node->first_attribute("filename"))
+ file = node->first_attribute("filename")->value();
+
+ for (;;)
+ {
+ std::ostringstream fileName;
+ fileName << file << std::setfill ('0') << std::setw (3) << fileNum;
+
+ gr_surface surface;
+ if (pZip)
+ {
+ if (ExtractResource(pZip, "images", fileName.str(), ".png", TMP_RESOURCE_NAME) != 0)
+ break;
+
+ if (res_create_surface(TMP_RESOURCE_NAME, &surface))
+ break;
+
+ unlink(TMP_RESOURCE_NAME);
+ }
+ else
+ {
+ if (res_create_surface(fileName.str().c_str(), &surface))
+ break;
+ }
+ mSurfaces.push_back(surface);
+ fileNum++;
+ }
+}
+
+AnimationResource::~AnimationResource()
+{
+ std::vector<gr_surface>::iterator it;
+
+ for (it = mSurfaces.begin(); it != mSurfaces.end(); ++it)
+ res_free_surface(*it);
+
+ mSurfaces.clear();
+}
+
+Resource* ResourceManager::FindResource(std::string name)
+{
+ std::vector<Resource*>::iterator iter;
+
+ for (iter = mResources.begin(); iter != mResources.end(); iter++)
+ {
+ if (name == (*iter)->GetName())
+ return (*iter);
+ }
+ return NULL;
+}
+
+ResourceManager::ResourceManager(xml_node<>* resList, ZipArchive* pZip)
+{
+ xml_node<>* child;
+
+ if (!resList)
+ return;
+
+ child = resList->first_node("resource");
+ while (child != NULL)
+ {
+ xml_attribute<>* attr = child->first_attribute("type");
+ if (!attr)
+ break;
+
+ std::string type = attr->value();
+
+ if (type == "font")
+ {
+ FontResource* res = new FontResource(child, pZip);
+ if (res == NULL || res->GetResource() == NULL)
+ {
+ xml_attribute<>* attr_name = child->first_attribute("name");
+
+ if (!attr_name) {
+ std::string res_name = attr_name->value();
+ LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+ } else
+ LOGERR("Resource type (%s) failed to load\n", type.c_str());
+
+ delete res;
+ }
+ else
+ {
+ mResources.push_back((Resource*) res);
+ }
+ }
+ else if (type == "image")
+ {
+ ImageResource* res = new ImageResource(child, pZip);
+ if (res == NULL || res->GetResource() == NULL)
+ {
+ xml_attribute<>* attr_name = child->first_attribute("name");
+
+ if (!attr_name) {
+ std::string res_name = attr_name->value();
+ LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+ } else
+ LOGERR("Resource type (%s) failed to load\n", type.c_str());
+
+ delete res;
+ }
+ else
+ {
+ mResources.push_back((Resource*) res);
+ }
+ }
+ else if (type == "animation")
+ {
+ AnimationResource* res = new AnimationResource(child, pZip);
+ if (res == NULL || res->GetResource() == NULL)
+ {
+ xml_attribute<>* attr_name = child->first_attribute("name");
+
+ if (!attr_name) {
+ std::string res_name = attr_name->value();
+ LOGERR("Resource (%s)-(%s) failed to load\n", type.c_str(), res_name.c_str());
+ } else
+ LOGERR("Resource type (%s) failed to load\n", type.c_str());
+
+ delete res;
+ }
+ else
+ {
+ mResources.push_back((Resource*) res);
+ }
+ }
+ else
+ {
+ LOGERR("Resource type (%s) not supported.\n", type.c_str());
+ }
+
+ child = child->next_sibling("resource");
+ }
+}
+
+ResourceManager::~ResourceManager()
+{
+ std::vector<Resource*>::iterator iter;
+
+ for (iter = mResources.begin(); iter != mResources.end(); iter++)
+ delete *iter;
+
+ mResources.clear();
+}
diff --git a/gui/resources.hpp b/gui/resources.hpp
new file mode 100644
index 000000000..339e03ade
--- /dev/null
+++ b/gui/resources.hpp
@@ -0,0 +1,92 @@
+// resources.hpp - Base classes for resource management of GUI
+
+#ifndef _RESOURCE_HEADER
+#define _RESOURCE_HEADER
+
+#ifdef HAVE_SELINUX
+#include "../minzip/Zip.h"
+#else
+#include "../minzipold/Zip.h"
+#endif
+
+// Base Objects
+class Resource
+{
+public:
+ Resource(xml_node<>* node, ZipArchive* pZip);
+ virtual ~Resource() {}
+
+public:
+ virtual void* GetResource(void) = 0;
+ std::string GetName(void) { return mName; }
+
+private:
+ std::string mName;
+
+protected:
+ static int ExtractResource(ZipArchive* pZip, std::string folderName, std::string fileName, std::string fileExtn, std::string destFile);
+};
+
+typedef enum {
+ TOUCH_START = 0,
+ TOUCH_DRAG = 1,
+ TOUCH_RELEASE = 2,
+ TOUCH_HOLD = 3,
+ TOUCH_REPEAT = 4
+} TOUCH_STATE;
+
+class FontResource : public Resource
+{
+public:
+ FontResource(xml_node<>* node, ZipArchive* pZip);
+ virtual ~FontResource();
+
+public:
+ virtual void* GetResource(void) { return mFont; }
+
+protected:
+ void* mFont;
+};
+
+class ImageResource : public Resource
+{
+public:
+ ImageResource(xml_node<>* node, ZipArchive* pZip);
+ virtual ~ImageResource();
+
+public:
+ virtual void* GetResource(void) { return mSurface; }
+
+protected:
+ gr_surface mSurface;
+};
+
+class AnimationResource : public Resource
+{
+public:
+ AnimationResource(xml_node<>* node, ZipArchive* pZip);
+ virtual ~AnimationResource();
+
+public:
+ virtual void* GetResource(void) { return mSurfaces.at(0); }
+ virtual void* GetResource(int entry) { return mSurfaces.at(entry); }
+ virtual int GetResourceCount(void) { return mSurfaces.size(); }
+
+protected:
+ std::vector<gr_surface> mSurfaces;
+};
+
+class ResourceManager
+{
+public:
+ ResourceManager(xml_node<>* resList, ZipArchive* pZip);
+ virtual ~ResourceManager();
+
+public:
+ Resource* FindResource(std::string name);
+
+private:
+ std::vector<Resource*> mResources;
+};
+
+#endif // _RESOURCE_HEADER
diff --git a/gui/slider.cpp b/gui/slider.cpp
new file mode 100644
index 000000000..b46d156f6
--- /dev/null
+++ b/gui/slider.cpp
@@ -0,0 +1,170 @@
+// slider.cpp - GUISlider object
+// Pulled & ported from https://raw.github.com/agrabren/RecoverWin/master/gui/slider.cpp
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUISlider::GUISlider(xml_node<>* node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ sAction = NULL;
+ sSlider = NULL;
+ sSliderUsed = NULL;
+ sTouch = NULL;
+ sTouchW = 20;
+
+ if (!node)
+ {
+ LOGERR("GUISlider created without XML node\n");
+ return;
+ }
+
+ child = node->first_node("resource");
+ if (child)
+ {
+ attr = child->first_attribute("base");
+ if (attr)
+ sSlider = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("used");
+ if (attr)
+ sSliderUsed = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("touch");
+ if (attr)
+ sTouch = PageManager::FindResource(attr->value());
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY);
+
+ if (sSlider && sSlider->GetResource())
+ {
+ mRenderW = gr_get_width(sSlider->GetResource());
+ mRenderH = gr_get_height(sSlider->GetResource());
+ }
+ if (sTouch && sTouch->GetResource())
+ {
+ sTouchW = gr_get_width(sTouch->GetResource()); // Width of the "touch image" that follows the touch (arrow)
+ sTouchH = gr_get_height(sTouch->GetResource()); // Height of the "touch image" that follows the touch (arrow)
+ }
+
+ //LOGINFO("mRenderW: %i mTouchW: %i\n", mRenderW, mTouchW);
+ mActionX = mRenderX;
+ mActionY = mRenderY;
+ mActionW = mRenderW;
+ mActionH = mRenderH;
+
+ sAction = new GUIAction(node);
+
+ sCurTouchX = mRenderX;
+ sUpdate = 1;
+}
+
+GUISlider::~GUISlider()
+{
+ delete sAction;
+}
+
+int GUISlider::Render(void)
+{
+ if (!sSlider || !sSlider->GetResource())
+ return -1;
+
+ // Draw the slider
+ gr_blit(sSlider->GetResource(), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
+
+ // Draw the used
+ if (sSliderUsed && sSliderUsed->GetResource() && sCurTouchX > mRenderX)
+ gr_blit(sSliderUsed->GetResource(), 0, 0, sCurTouchX - mRenderX, mRenderH, mRenderX, mRenderY);
+
+ // Draw the touch icon
+ if (sTouch && sTouch->GetResource())
+ gr_blit(sTouch->GetResource(), 0, 0, sTouchW, sTouchH, sCurTouchX, (mRenderY + ((mRenderH - sTouchH) / 2)));
+
+ sUpdate = 0;
+ return 0;
+}
+
+int GUISlider::Update(void)
+{
+ if (sUpdate)
+ return 2;
+ return 0;
+}
+
+int GUISlider::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ static bool dragging = false;
+
+ switch (state)
+ {
+ case TOUCH_START:
+ if (x >= mRenderX && x <= mRenderX + sTouchW &&
+ y >= mRenderY && y <= mRenderY + mRenderH)
+ {
+ sCurTouchX = x - (sTouchW / 2);
+ if (sCurTouchX < mRenderX)
+ sCurTouchX = mRenderX;
+ dragging = true;
+ }
+ break;
+
+ case TOUCH_DRAG:
+ if (!dragging)
+ return 0;
+ if (y < mRenderY - sTouchH || y > mRenderY + (sTouchH * 2))
+ {
+ sCurTouchX = mRenderX;
+ dragging = false;
+ sUpdate = 1;
+ break;
+ }
+ sCurTouchX = x - (sTouchW / 2);
+ if (sCurTouchX < mRenderX)
+ sCurTouchX = mRenderX;
+ if (sCurTouchX > mRenderX + mRenderW - sTouchW)
+ sCurTouchX = mRenderX + mRenderW - sTouchW;
+ sUpdate = 1;
+ break;
+
+ case TOUCH_RELEASE:
+ if (!dragging)
+ return 0;
+
+ if (sCurTouchX >= mRenderX + mRenderW - sTouchW)
+ sAction->doActions();
+
+ sCurTouchX = mRenderX;
+ dragging = false;
+ sUpdate = 1;
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
diff --git a/gui/slidervalue.cpp b/gui/slidervalue.cpp
new file mode 100644
index 000000000..d369aceb9
--- /dev/null
+++ b/gui/slidervalue.cpp
@@ -0,0 +1,418 @@
+// slidervalue.cpp - GUISliderValue object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUISliderValue::GUISliderValue(xml_node<>* node) : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mMin = 0;
+ mMax = 100;
+ mValue = 0;
+ mLineH = 2;
+ mLinePadding = 10;
+ mSliderW = 5;
+ mSliderH = 30;
+ mLineX = 0;
+ mLineY = 0;
+ mValueStr = NULL;
+ mAction = NULL;
+ mShowCurr = true;
+ mShowRange = false;
+ mChangeOnDrag = false;
+ mRendered = false;
+
+ mLabel = NULL;
+ ConvertStrToColor("white", &mTextColor);
+ ConvertStrToColor("white", &mLineColor);
+ ConvertStrToColor("blue", &mSliderColor);
+
+ if (!node)
+ {
+ LOGERR("GUISliderValue created without XML node\n");
+ return;
+ }
+
+ mLabel = new GUIText(node);
+ if(mLabel->Render() < 0)
+ {
+ delete mLabel;
+ mLabel = NULL;
+ }
+
+ mAction = new GUIAction(node);
+
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mTextColor);
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW);
+
+ child = node->first_node("colors");
+ if (child)
+ {
+ attr = child->first_attribute("line");
+ if (attr)
+ ConvertStrToColor(attr->value(), &mLineColor);
+
+ attr = child->first_attribute("slider");
+ if (attr)
+ ConvertStrToColor(attr->value(), &mSliderColor);
+ }
+
+ child = node->first_node("data");
+ if (child)
+ {
+ attr = child->first_attribute("variable");
+ if (attr)
+ mVariable = attr->value();
+
+ attr = child->first_attribute("min");
+ if (attr)
+ {
+ mMinStr = gui_parse_text(attr->value());
+ mMin = atoi(mMinStr.c_str());
+ }
+
+ attr = child->first_attribute("max");
+ if (attr)
+ {
+ mMaxStr = gui_parse_text(attr->value());
+ mMax = atoi(mMaxStr.c_str());
+ }
+
+ if (mMin > mMax)
+ mMin = mMax;
+
+ attr = child->first_attribute("default");
+ if (attr)
+ {
+ string parsevalue = gui_parse_text(attr->value());
+ int def = atoi(parsevalue.c_str());
+
+ if (def < mMin) def = mMin;
+ else if (def > mMax) def = mMax;
+ DataManager::SetValue(mVariable, def);
+ }
+
+ attr = child->first_attribute("showrange");
+ if (attr)
+ mShowRange = atoi(attr->value());
+
+ attr = child->first_attribute("showcurr");
+ if (attr)
+ mShowCurr = atoi(attr->value());
+
+ attr = child->first_attribute("changeondrag");
+ if (attr)
+ mChangeOnDrag = atoi(attr->value());
+ }
+
+ child = node->first_node("dimensions");
+ if (child)
+ {
+ attr = child->first_attribute("lineh");
+ if (attr)
+ {
+ string parsevalue = gui_parse_text(attr->value());
+ mLineH = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("linepadding");
+ if (attr)
+ {
+ string parsevalue = gui_parse_text(attr->value());
+ mPadding = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("sliderw");
+ if (attr)
+ {
+ string parsevalue = gui_parse_text(attr->value());
+ mSliderW = atoi(parsevalue.c_str());
+ }
+
+ attr = child->first_attribute("sliderh");
+ if (attr)
+ {
+ string parsevalue = gui_parse_text(attr->value());
+ mSliderH = atoi(parsevalue.c_str());
+ }
+ }
+
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, (unsigned*) &mFontHeight, NULL);
+
+ if(mShowCurr)
+ {
+ int maxLen = std::max(strlen(mMinStr.c_str()), strlen(mMaxStr.c_str()));
+ mValueStr = new char[maxLen+1];
+ }
+
+ loadValue(true);
+
+ mLinePadding = mPadding;
+ if (mShowRange)
+ {
+ int textW = std::max(measureText(mMaxStr), measureText(mMinStr));
+ mLinePadding += textW;
+ }
+
+ SetRenderPos(mRenderX, mRenderY, mRenderW);
+}
+
+GUISliderValue::~GUISliderValue()
+{
+ delete mLabel;
+ delete mAction;
+ delete[] mValueStr;
+}
+
+void GUISliderValue::loadValue(bool force)
+{
+ if(!mVariable.empty())
+ {
+ int value = DataManager::GetIntValue(mVariable);
+ if(mValue == value && !force)
+ return;
+
+ mValue = value;
+ }
+
+ mValue = std::max(mValue, mMin);
+ mValue = std::min(mValue, mMax);
+ mValuePct = pctFromValue(mValue);
+ mRendered = false;
+}
+
+int GUISliderValue::SetRenderPos(int x, int y, int w, int h)
+{
+ mRenderX = x;
+ mRenderY = y;
+ if (w || h)
+ {
+ mRenderW = w;
+ mRenderH = h;
+ }
+
+ mRenderH = mSliderH;
+ if(mShowCurr)
+ mRenderH += mFontHeight;
+
+ if (mLabel)
+ {
+ int lw, lh;
+ mLabel->GetCurrentBounds(lw, lh);
+ int textX = mRenderX + (mRenderW/2 - lw/2);
+
+ mLabel->SetRenderPos(textX, mRenderY);
+
+ y += lh;
+ mRenderH += lh;
+ }
+
+ mSliderY = y;
+ mLineY = (y + mSliderH/2) - (mLineH/2);
+
+ mLineX = mRenderX + mLinePadding;
+
+ mActionX = mRenderX;
+ mActionY = mRenderY;
+ mActionW = mRenderW;
+ mActionH = mRenderH;
+ lineW = mRenderW - (mLinePadding * 2);
+
+ return 0;
+}
+
+int GUISliderValue::measureText(const std::string& str)
+{
+ void* fontResource = NULL;
+ if (mFont) fontResource = mFont->GetResource();
+
+ return gr_measureEx(str.c_str(), fontResource);
+}
+
+int GUISliderValue::Render(void)
+{
+ if (!isConditionTrue())
+ {
+ mRendered = false;
+ return 0;
+ }
+
+ if(mLabel)
+ {
+ int w, h;
+ mLabel->GetCurrentBounds(w, h);
+ if (w != mLabelW) {
+ mLabelW = w;
+ int textX = mRenderX + (mRenderW/2 - mLabelW/2);
+ mLabel->SetRenderPos(textX, mRenderY);
+ }
+ int res = mLabel->Render();
+ if(res < 0)
+ return res;
+ }
+
+ // line
+ gr_color(mLineColor.red, mLineColor.green, mLineColor.blue, mLineColor.alpha);
+ gr_fill(mLineX, mLineY, lineW, mLineH);
+
+ // slider
+ uint32_t sliderX = (mValuePct*lineW)/100 + mLineX;
+ sliderX -= mSliderW/2;
+
+ gr_color(mSliderColor.red, mSliderColor.green, mSliderColor.blue, mSliderColor.alpha);
+ gr_fill(sliderX, mSliderY, mSliderW, mSliderH);
+
+ void *fontResource = NULL;
+ if(mFont) fontResource = mFont->GetResource();
+ gr_color(mTextColor.red, mTextColor.green, mTextColor.blue, mTextColor.alpha);
+ if(mShowRange)
+ {
+ int rangeY = (mLineY - mLineH/2) - mFontHeight/2;
+ gr_textEx(mRenderX + mPadding/2, rangeY, mMinStr.c_str(), fontResource);
+ gr_textEx(mLineX + lineW + mPadding/2, rangeY, mMaxStr.c_str(), fontResource);
+ }
+
+ if(mValueStr && mShowCurr)
+ {
+ sprintf(mValueStr, "%d", mValue);
+ int textW = measureText(mValueStr);
+ gr_textEx(mRenderX + (mRenderW/2 - textW/2), mSliderY+mSliderH, mValueStr, fontResource);
+ }
+
+ mRendered = true;
+ return 0;
+}
+
+int GUISliderValue::Update(void)
+{
+ if (!isConditionTrue()) return mRendered ? 2 : 0;
+ if (!mRendered) return 2;
+
+ if(mLabel)
+ return mLabel->Update();
+ return 0;
+}
+
+int GUISliderValue::valueFromPct(float pct)
+{
+ int range = abs(mMax - mMin);
+ return mMin + (pct * range) / 100;
+}
+
+float GUISliderValue::pctFromValue(int value)
+{
+ return float((value - mMin) * 100) / abs(mMax - mMin);
+}
+
+int GUISliderValue::NotifyTouch(TOUCH_STATE state, int x, int y)
+{
+ if (!isConditionTrue()) return -1;
+
+ static bool dragging = false;
+ switch (state)
+ {
+ case TOUCH_START:
+ if (x >= mRenderX && x <= mRenderX + mRenderW &&
+ y >= mRenderY && y <= mRenderY + mRenderH)
+ {
+ dragging = true;
+ }
+ // no break
+ case TOUCH_DRAG:
+ {
+ if (!dragging) return 0;
+
+ x = std::max(mLineX, x);
+ x = std::min(mLineX + lineW, x);
+
+ mValuePct = float(((x - mLineX) * 100) / lineW);
+ int newVal = valueFromPct(mValuePct);
+ if (newVal != mValue) {
+ mRendered = false;
+ mValue = newVal;
+ if (mChangeOnDrag) {
+ if (!mVariable.empty())
+ DataManager::SetValue(mVariable, mValue);
+ if (mAction)
+ mAction->doActions();
+ }
+ }
+ break;
+ }
+ case TOUCH_RELEASE:
+ {
+ if (!dragging) return 0;
+ dragging = false;
+
+ if (!mVariable.empty())
+ DataManager::SetValue(mVariable, mValue);
+ if (mAction)
+ mAction->doActions();
+ break;
+ }
+ case TOUCH_REPEAT:
+ case TOUCH_HOLD:
+ break;
+ }
+ return 0;
+}
+
+int GUISliderValue::NotifyVarChange(std::string varName, std::string value)
+{
+ if (mLabel)
+ mLabel->NotifyVarChange(varName, value);
+ if (varName == mVariable) {
+ int newVal = atoi(value.c_str());
+ if(newVal != mValue) {
+ mValue = newVal;
+ mValuePct = pctFromValue(mValue);
+ mRendered = false;
+ }
+ }
+ return 0;
+}
+
+void GUISliderValue::SetPageFocus(int inFocus)
+{
+ if (inFocus)
+ loadValue();
+}
diff --git a/gui/text.cpp b/gui/text.cpp
new file mode 100644
index 000000000..7eb6c18b4
--- /dev/null
+++ b/gui/text.cpp
@@ -0,0 +1,243 @@
+// text.cpp - GUIText object
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <sys/reboot.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <time.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <string>
+
+extern "C" {
+#include "../twcommon.h"
+#include "../minuitwrp/minui.h"
+}
+
+#include "rapidxml.hpp"
+#include "objects.hpp"
+
+GUIText::GUIText(xml_node<>* node)
+ : Conditional(node)
+{
+ xml_attribute<>* attr;
+ xml_node<>* child;
+
+ mFont = NULL;
+ mIsStatic = 1;
+ mVarChanged = 0;
+ mFontHeight = 0;
+ maxWidth = 0;
+ charSkip = 0;
+ isHighlighted = false;
+ hasHighlightColor = false;
+
+ if (!node)
+ return;
+
+ // Initialize color to solid black
+ memset(&mColor, 0, sizeof(COLOR));
+ mColor.alpha = 255;
+ memset(&mHighlightColor, 0, sizeof(COLOR));
+ mHighlightColor.alpha = 255;
+
+ attr = node->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mColor);
+ }
+ attr = node->first_attribute("highlightcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ hasHighlightColor = true;
+ }
+
+ // Load the font, and possibly override the color
+ child = node->first_node("font");
+ if (child)
+ {
+ attr = child->first_attribute("resource");
+ if (attr)
+ mFont = PageManager::FindResource(attr->value());
+
+ attr = child->first_attribute("color");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mColor);
+ }
+
+ attr = child->first_attribute("highlightcolor");
+ if (attr)
+ {
+ std::string color = attr->value();
+ ConvertStrToColor(color, &mHighlightColor);
+ hasHighlightColor = true;
+ }
+ }
+
+ // Load the placement
+ LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH, &mPlacement);
+
+ child = node->first_node("text");
+ if (child) mText = child->value();
+
+ // Simple way to check for static state
+ mLastValue = parseText();
+ if (mLastValue != mText) mIsStatic = 0;
+
+ gr_getFontDetails(mFont ? mFont->GetResource() : NULL, (unsigned*) &mFontHeight, NULL);
+ return;
+}
+
+int GUIText::Render(void)
+{
+ if (!isConditionTrue())
+ return 0;
+
+ void* fontResource = NULL;
+ string displayValue;
+
+ if (mFont)
+ fontResource = mFont->GetResource();
+
+ mLastValue = parseText();
+ displayValue = mLastValue;
+
+ if (charSkip)
+ displayValue.erase(0, charSkip);
+
+ mVarChanged = 0;
+
+ int x = mRenderX, y = mRenderY;
+ int width = gr_measureEx(displayValue.c_str(), fontResource);
+
+ if (mPlacement != TOP_LEFT && mPlacement != BOTTOM_LEFT)
+ {
+ if (mPlacement == CENTER || mPlacement == CENTER_X_ONLY)
+ x -= (width / 2);
+ else
+ x -= width;
+ }
+ if (mPlacement != TOP_LEFT && mPlacement != TOP_RIGHT)
+ {
+ if (mPlacement == CENTER)
+ y -= (mFontHeight / 2);
+ else if (mPlacement == BOTTOM_LEFT || mPlacement == BOTTOM_RIGHT)
+ y -= mFontHeight;
+ }
+
+ if (hasHighlightColor && isHighlighted)
+ gr_color(mHighlightColor.red, mHighlightColor.green, mHighlightColor.blue, mHighlightColor.alpha);
+ else
+ gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha);
+
+ if (maxWidth)
+ gr_textExW(x, y, displayValue.c_str(), fontResource, maxWidth + x);
+ else
+ gr_textEx(x, y, displayValue.c_str(), fontResource);
+ return 0;
+}
+
+int GUIText::Update(void)
+{
+ if (!isConditionTrue())
+ return 0;
+
+ static int updateCounter = 3;
+
+ // This hack just makes sure we update at least once a minute for things like clock and battery
+ if (updateCounter) updateCounter--;
+ else
+ {
+ mVarChanged = 1;
+ updateCounter = 3;
+ }
+
+ if (mIsStatic || !mVarChanged)
+ return 0;
+
+ std::string newValue = parseText();
+ if (mLastValue == newValue)
+ return 0;
+ else
+ mLastValue = newValue;
+ return 2;
+}
+
+int GUIText::GetCurrentBounds(int& w, int& h)
+{
+ void* fontResource = NULL;
+
+ if (mFont)
+ fontResource = mFont->GetResource();
+
+ h = mFontHeight;
+ mLastValue = parseText();
+ w = gr_measureEx(mLastValue.c_str(), fontResource);
+ return 0;
+}
+
+std::string GUIText::parseText(void)
+{
+ static int counter = 0;
+ std::string str = mText;
+ size_t pos = 0;
+ size_t next = 0, end = 0;
+
+ while (1)
+ {
+ next = str.find('%', pos);
+ if (next == std::string::npos) return str;
+ end = str.find('%', next + 1);
+ if (end == std::string::npos) return str;
+
+ // We have a block of data
+ std::string var = str.substr(next + 1, (end - next) - 1);
+ str.erase(next, (end - next) + 1);
+
+ if (next + 1 == end)
+ {
+ str.insert(next, 1, '%');
+ }
+ else
+ {
+ std::string value;
+ if (DataManager::GetValue(var, value) == 0)
+ str.insert(next, value);
+ }
+
+ pos = next + 1;
+ }
+}
+
+int GUIText::NotifyVarChange(std::string varName, std::string value)
+{
+ mVarChanged = 1;
+ return 0;
+}
+
+int GUIText::SetMaxWidth(unsigned width)
+{
+ maxWidth = width;
+ mVarChanged = 1;
+ return 0;
+}
+
+int GUIText::SkipCharCount(unsigned skip)
+{
+ charSkip = skip;
+ mVarChanged = 1;
+ return 0;
+}
diff --git a/gui/twrp b/gui/twrp
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/gui/twrp