From e510810c71b5d4eb4d779c0db2d131d2b1b556af Mon Sep 17 00:00:00 2001 From: CEnnis91 Date: Sat, 14 Jan 2012 23:26:56 -0500 Subject: [PATCH 01/23] Hide "mount USB storage" option from mount menu when the board has a virtual sdcard Change-Id: I4e59768e9f34f0fb33d88ad382feaa2515d70bc4 --- Android.mk | 2 +- extendedcommands.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Android.mk b/Android.mk index c63081f..3d7ec26 100644 --- a/Android.mk +++ b/Android.mk @@ -40,7 +40,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_USES_VIRTUAL_SDCARD $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ diff --git a/extendedcommands.c b/extendedcommands.c index 729778c..4750a05 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -669,6 +669,7 @@ void show_partition_menu() static char* confirm_format = "Confirm format?"; static char* confirm = "Yes - Format"; char confirm_string[255]; + int ptr = 0; for (;;) { @@ -690,8 +691,11 @@ void show_partition_menu() options[mountable_volumes+i] = e->txt; } +#ifndef BOARD_USES_VIRTUAL_SDCARD options[mountable_volumes+formatable_volumes] = "mount USB storage"; - options[mountable_volumes+formatable_volumes + 1] = NULL; + ptr = 1; +#endif + options[mountable_volumes+formatable_volumes + ptr] = NULL; int chosen_item = get_menu_selection(headers, &options, 0, 0); if (chosen_item == GO_BACK) From 059db9bfb6ba2104aded621c8d309298cc89fa82 Mon Sep 17 00:00:00 2001 From: Mike Kasick Date: Thu, 26 Jan 2012 16:05:56 -0500 Subject: [PATCH 02/23] Always run adbd as root in recovery. At present, invoking "adb shell" while in recovery results in: - exec '/system/bin/sh' failed: No such file or directory (2) - "adb shell" should invoke /sbin/sh, but cannot as /sbin and /sbin/recovery lack other-user execute permission. Invoking "adb root" to restart adbd as root _does_ work, however this behavior may not be intuitive to users who encounter the above error. The solution implemented here is to always run adbd as root in recovery, so it has permission to run /sbin/sh. Furthemore, user shells in recovery are not particularly useful and "su" doesn't exist, thus "adb root" is likely to be invoked anyways. Change-Id: Iaaa25090e85d970e9a076fef068f5fae8202ab0b --- etc/init.rc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/init.rc b/etc/init.rc index 0c76fb7..832b864 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -36,16 +36,18 @@ service adbd /sbin/adbd recovery disabled # Always start adbd on userdebug and eng builds +# In recovery, always run adbd as root. on property:ro.debuggable=1 write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18D1 write /sys/class/android_usb/android0/idProduct D001 write /sys/class/android_usb/android0/functions adb - write /sys/class/android_usb/android0/enable 1 + #write /sys/class/android_usb/android0/enable 1 write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer write /sys/class/android_usb/android0/iProduct $ro.product.model write /sys/class/android_usb/android0/iSerial $ro.serialno - start adbd + #start adbd + setprop service.adb.root 1 # Restart adbd so it can run as root on property:service.adb.root=1 From 4c8e2482a6feb63f3449e57205df84b9749fa88c Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 14:47:34 -0800 Subject: [PATCH 03/23] Who approves this stuff... use get_volume_for_path('/sdcard') and check for null... Revert "Hide "mount USB storage" option from mount menu when the board has a virtual sdcard" This reverts commit e510810c71b5d4eb4d779c0db2d131d2b1b556af. --- Android.mk | 2 +- extendedcommands.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Android.mk b/Android.mk index 3d7ec26..c63081f 100644 --- a/Android.mk +++ b/Android.mk @@ -40,7 +40,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_USES_VIRTUAL_SDCARD +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ diff --git a/extendedcommands.c b/extendedcommands.c index 4750a05..729778c 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -669,7 +669,6 @@ void show_partition_menu() static char* confirm_format = "Confirm format?"; static char* confirm = "Yes - Format"; char confirm_string[255]; - int ptr = 0; for (;;) { @@ -691,11 +690,8 @@ void show_partition_menu() options[mountable_volumes+i] = e->txt; } -#ifndef BOARD_USES_VIRTUAL_SDCARD options[mountable_volumes+formatable_volumes] = "mount USB storage"; - ptr = 1; -#endif - options[mountable_volumes+formatable_volumes + ptr] = NULL; + options[mountable_volumes+formatable_volumes + 1] = NULL; int chosen_item = get_menu_selection(headers, &options, 0, 0); if (chosen_item == GO_BACK) From 5a44ceb692c3d5e68007f46b68847d3d885831fa Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 14:56:56 -0800 Subject: [PATCH 04/23] remove hacky board define around usb storage mounting on /data/media devices. Change-Id: I2d382762271a2cfc6d83454160ed127b7457c88c --- extendedcommands.c | 86 +++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/extendedcommands.c b/extendedcommands.c index 729778c..af67c3e 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -635,7 +635,7 @@ void show_partition_menu() string options[255]; if(!device_volumes) - return; + return; mountable_volumes = 0; formatable_volumes = 0; @@ -644,25 +644,24 @@ void show_partition_menu() format_menue = malloc(num_volumes * sizeof(FormatMenuEntry)); for (i = 0; i < num_volumes; ++i) { - Volume* v = &device_volumes[i]; - if(strcmp("ramdisk", v->fs_type) != 0 && strcmp("mtd", v->fs_type) != 0 && strcmp("emmc", v->fs_type) != 0 && strcmp("bml", v->fs_type) != 0) - { - sprintf(&mount_menue[mountable_volumes].mount, "mount %s", v->mount_point); - sprintf(&mount_menue[mountable_volumes].unmount, "unmount %s", v->mount_point); - mount_menue[mountable_volumes].v = &device_volumes[i]; - ++mountable_volumes; - if (is_safe_to_format(v->mount_point)) { - sprintf(&format_menue[formatable_volumes].txt, "format %s", v->mount_point); - format_menue[formatable_volumes].v = &device_volumes[i]; - ++formatable_volumes; - } - } - else if (strcmp("ramdisk", v->fs_type) != 0 && strcmp("mtd", v->fs_type) == 0 && is_safe_to_format(v->mount_point)) - { - sprintf(&format_menue[formatable_volumes].txt, "format %s", v->mount_point); - format_menue[formatable_volumes].v = &device_volumes[i]; - ++formatable_volumes; - } + Volume* v = &device_volumes[i]; + if(strcmp("ramdisk", v->fs_type) != 0 && strcmp("mtd", v->fs_type) != 0 && strcmp("emmc", v->fs_type) != 0 && strcmp("bml", v->fs_type) != 0) { + sprintf(&mount_menue[mountable_volumes].mount, "mount %s", v->mount_point); + sprintf(&mount_menue[mountable_volumes].unmount, "unmount %s", v->mount_point); + mount_menue[mountable_volumes].v = &device_volumes[i]; + ++mountable_volumes; + if (is_safe_to_format(v->mount_point)) { + sprintf(&format_menue[formatable_volumes].txt, "format %s", v->mount_point); + format_menue[formatable_volumes].v = &device_volumes[i]; + ++formatable_volumes; + } + } + else if (strcmp("ramdisk", v->fs_type) != 0 && strcmp("mtd", v->fs_type) == 0 && is_safe_to_format(v->mount_point)) + { + sprintf(&format_menue[formatable_volumes].txt, "format %s", v->mount_point); + format_menue[formatable_volumes].v = &device_volumes[i]; + ++formatable_volumes; + } } @@ -672,37 +671,39 @@ void show_partition_menu() for (;;) { + for (i = 0; i < mountable_volumes; i++) + { + MountMenuEntry* e = &mount_menue[i]; + Volume* v = e->v; + if(is_path_mounted(v->mount_point)) + options[i] = e->unmount; + else + options[i] = e->mount; + } - for (i = 0; i < mountable_volumes; i++) - { - MountMenuEntry* e = &mount_menue[i]; - Volume* v = e->v; - if(is_path_mounted(v->mount_point)) - options[i] = e->unmount; - else - options[i] = e->mount; - } + for (i = 0; i < formatable_volumes; i++) + { + FormatMenuEntry* e = &format_menue[i]; - for (i = 0; i < formatable_volumes; i++) - { - FormatMenuEntry* e = &format_menue[i]; + options[mountable_volumes+i] = e->txt; + } - options[mountable_volumes+i] = e->txt; - } - - options[mountable_volumes+formatable_volumes] = "mount USB storage"; - options[mountable_volumes+formatable_volumes + 1] = NULL; + if (is_data_media()) { + options[mountable_volumes + formatable_volumes] = "mount USB storage"; + options[mountable_volumes + formatable_volumes + 1] = NULL; + } + else { + options[mountable_volumes + formatable_volumes] = NULL; + } int chosen_item = get_menu_selection(headers, &options, 0, 0); if (chosen_item == GO_BACK) break; - if (chosen_item == (mountable_volumes+formatable_volumes)) - { + if (chosen_item == (mountable_volumes+formatable_volumes)) { show_mount_usb_storage_menu(); } - else if (chosen_item < mountable_volumes) - { - MountMenuEntry* e = &mount_menue[chosen_item]; + else if (chosen_item < mountable_volumes) { + MountMenuEntry* e = &mount_menue[chosen_item]; Volume* v = e->v; if (is_path_mounted(v->mount_point)) @@ -736,7 +737,6 @@ void show_partition_menu() free(mount_menue); free(format_menue); - } void show_nandroid_advanced_restore_menu(const char* path) From de338e56b37a1e83af000b5710bb3cb4b34d6315 Mon Sep 17 00:00:00 2001 From: CEnnis91 Date: Sat, 14 Jan 2012 23:15:17 -0500 Subject: [PATCH 05/23] Big Font Mod and Roboto Fonts (XHDPI, HDPI, and MDPI) - lets xhdpi devices (Galaxy Nexus, Xoom, etc) have a bigger font size (15x24) - port Google's Roboto font into recovery for both XHDPI, HDPI, and MDPI font size, make them optional (LDPI is too small!) (credits to gweedo767 for big font) Change-Id: I621dbc7c8ac30a8f16039ce64720512e3e63881a --- Android.mk | 2 +- minui/Android.mk | 16 +++ minui/graphics.c | 23 +++- minui/roboto_10x18.h | 197 ++++++++++++++++++++++++++++++ minui/roboto_15x24.h | 281 +++++++++++++++++++++++++++++++++++++++++++ ui.c | 15 ++- 6 files changed, 530 insertions(+), 4 deletions(-) create mode 100644 minui/roboto_10x18.h create mode 100644 minui/roboto_15x24.h diff --git a/Android.mk b/Android.mk index c63081f..1f97ed0 100644 --- a/Android.mk +++ b/Android.mk @@ -40,7 +40,7 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_MDPI_RECOVERY BOARD_HDPI_RECOVERY BOARD_XHDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_USE_CUSTOM_FONT $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ diff --git a/minui/Android.mk b/minui/Android.mk index 7096354..68cbe29 100644 --- a/minui/Android.mk +++ b/minui/Android.mk @@ -21,4 +21,20 @@ ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888") LOCAL_CFLAGS += -DRECOVERY_BGRA endif +ifeq ($(BOARD_XHDPI_RECOVERY),true) + LOCAL_CFLAGS += -DBOARD_XHDPI_RECOVERY +endif +ifeq ($(BOARD_HDPI_RECOVERY),true) + LOCAL_CFLAGS += -DBOARD_HDPI_RECOVERY +endif +ifeq ($(BOARD_MDPI_RECOVERY),true) + LOCAL_CFLAGS += -DBOARD_MDPI_RECOVERY +endif +ifeq ($(BOARD_LDPI_RECOVERY),true) + LOCAL_CFLAGS += -DBOARD_LDPI_RECOVERY +endif +ifeq ($(BOARD_USE_CUSTOM_FONT),true) + LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_FONT +endif + include $(BUILD_STATIC_LIBRARY) diff --git a/minui/graphics.c b/minui/graphics.c index de1cfdf..d3473db 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -30,7 +30,28 @@ #include -#include "font_10x18.h" +#if defined(BOARD_XHDPI_RECOVERY) + #ifdef BOARD_USE_CUSTOM_FONT + #include "roboto_15x24.h" + #else + #include "font_10x18.h" // only use the big font if we want custom + #endif +#elif defined(BOARD_HDPI_RECOVERY) + #ifdef BOARD_USE_CUSTOM_FONT + #include "roboto_10x18.h" + #else + #include "font_10x18.h" + #endif +#elif defined(BOARD_LDPI_RECOVERY) + #include "font_7x16.h" +#else + #ifdef BOARD_USE_CUSTOM_FONT + #include "roboto_10x18.h" + #else + #include "font_10x18.h" + #endif +#endif + #include "minui.h" #if defined(RECOVERY_BGRA) diff --git a/minui/roboto_10x18.h b/minui/roboto_10x18.h new file mode 100644 index 0000000..3119c81 --- /dev/null +++ b/minui/roboto_10x18.h @@ -0,0 +1,197 @@ +struct { + unsigned width; + unsigned height; + unsigned cwidth; + unsigned cheight; + unsigned char rundata[]; +} font = { + .width = 960, + .height = 18, + .cwidth = 10, + .cheight = 18, + .rundata = { +0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f, +0x3b,0x81,0x29,0x81,0x06,0x81,0x3f,0x81,0x7f,0x7f,0x7f,0x37,0x83,0x05,0x81, +0x0a,0x83,0x7f,0x7f,0x2f,0x81,0x0e,0x81,0x29,0x82,0x07,0x81,0x01,0x82,0x07, +0x81,0x02,0x81,0x05,0x83,0x05,0x82,0x0a,0x82,0x09,0x82,0x09,0x81,0x08,0x81, +0x3e,0x81,0x05,0x84,0x06,0x84,0x06,0x83,0x06,0x84,0x09,0x82,0x05,0x85,0x06, +0x84,0x04,0x87,0x04,0x84,0x07,0x84,0x39,0x83,0x06,0x84,0x07,0x81,0x06,0x86, +0x06,0x84,0x04,0x86,0x04,0x87,0x04,0x87,0x04,0x84,0x04,0x82,0x04,0x82,0x03, +0x86,0x08,0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x07,0x82,0x05,0x82,0x02,0x82, +0x05,0x81,0x04,0x84,0x04,0x86,0x06,0x84,0x04,0x86,0x06,0x84,0x04,0x88,0x02, +0x82,0x05,0x81,0x01,0x82,0x06,0x81,0x01,0x81,0x07,0x81,0x02,0x81,0x05,0x82, +0x02,0x82,0x04,0x82,0x02,0x87,0x06,0x81,0x07,0x82,0x0b,0x81,0x08,0x81,0x12, +0x82,0x10,0x82,0x18,0x82,0x10,0x83,0x0d,0x82,0x0b,0x82,0x08,0x82,0x06,0x82, +0x09,0x83,0x4c,0x82,0x48,0x81,0x07,0x82,0x07,0x81,0x28,0x82,0x07,0x81,0x01, +0x82,0x07,0x81,0x02,0x81,0x04,0x82,0x01,0x82,0x03,0x81,0x02,0x81,0x08,0x81, +0x02,0x81,0x08,0x82,0x08,0x82,0x08,0x82,0x3c,0x82,0x04,0x82,0x02,0x82,0x04, +0x85,0x05,0x82,0x01,0x82,0x04,0x82,0x02,0x82,0x07,0x83,0x05,0x85,0x05,0x82, +0x02,0x81,0x09,0x82,0x03,0x82,0x02,0x82,0x05,0x82,0x02,0x82,0x37,0x82,0x01, +0x82,0x04,0x81,0x03,0x82,0x06,0x82,0x05,0x82,0x03,0x82,0x04,0x83,0x01,0x82, +0x03,0x82,0x03,0x82,0x03,0x82,0x09,0x82,0x08,0x82,0x02,0x82,0x03,0x82,0x04, +0x82,0x05,0x82,0x0a,0x82,0x03,0x82,0x03,0x82,0x03,0x82,0x07,0x82,0x05,0x82, +0x02,0x82,0x05,0x81,0x03,0x82,0x02,0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x02, +0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x06,0x82,0x05,0x82,0x05,0x81, +0x02,0x81,0x05,0x82,0x01,0x81,0x07,0x81,0x02,0x82,0x04,0x81,0x03,0x82,0x04, +0x82,0x07,0x82,0x06,0x81,0x08,0x81,0x0b,0x81,0x07,0x82,0x13,0x81,0x10,0x82, +0x18,0x82,0x0f,0x84,0x0d,0x82,0x1d,0x82,0x0a,0x82,0x4c,0x82,0x47,0x82,0x07, +0x82,0x07,0x82,0x27,0x82,0x07,0x81,0x01,0x82,0x06,0x81,0x02,0x81,0x04,0x82, +0x03,0x82,0x02,0x81,0x02,0x81,0x02,0x81,0x04,0x82,0x02,0x82,0x08,0x81,0x08, +0x81,0x0a,0x81,0x12,0x82,0x28,0x81,0x05,0x81,0x04,0x81,0x07,0x82,0x04,0x82, +0x03,0x82,0x03,0x81,0x04,0x81,0x07,0x83,0x05,0x81,0x08,0x82,0x0c,0x82,0x04, +0x81,0x04,0x82,0x04,0x81,0x04,0x81,0x36,0x82,0x03,0x81,0x03,0x81,0x05,0x82, +0x04,0x83,0x05,0x82,0x04,0x81,0x03,0x83,0x03,0x82,0x02,0x82,0x04,0x82,0x02, +0x82,0x09,0x82,0x07,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x05,0x82,0x0a,0x82, +0x03,0x82,0x02,0x82,0x04,0x82,0x07,0x83,0x03,0x83,0x02,0x83,0x04,0x81,0x02, +0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x81, +0x03,0x82,0x04,0x81,0x06,0x82,0x05,0x82,0x05,0x81,0x02,0x81,0x05,0x82,0x01, +0x82,0x02,0x81,0x02,0x82,0x03,0x82,0x02,0x82,0x04,0x81,0x03,0x82,0x08,0x81, +0x07,0x81,0x08,0x81,0x0b,0x81,0x07,0x83,0x13,0x81,0x0f,0x82,0x18,0x82,0x0e, +0x82,0x10,0x82,0x1d,0x82,0x0a,0x82,0x4c,0x82,0x47,0x81,0x08,0x82,0x08,0x81, +0x27,0x82,0x07,0x81,0x01,0x81,0x05,0x88,0x02,0x82,0x07,0x81,0x02,0x81,0x01, +0x82,0x05,0x81,0x02,0x81,0x08,0x81,0x08,0x82,0x0a,0x82,0x07,0x81,0x09,0x82, +0x27,0x82,0x04,0x82,0x04,0x82,0x06,0x82,0x0a,0x81,0x08,0x81,0x06,0x81,0x01, +0x82,0x05,0x81,0x08,0x82,0x0c,0x81,0x05,0x81,0x04,0x82,0x04,0x81,0x04,0x81, +0x05,0x82,0x08,0x82,0x2a,0x81,0x03,0x81,0x02,0x81,0x03,0x81,0x04,0x81,0x01, +0x82,0x04,0x82,0x04,0x81,0x03,0x82,0x04,0x82,0x02,0x82,0x05,0x81,0x02,0x82, +0x09,0x82,0x07,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x05,0x82,0x0a,0x82,0x03, +0x82,0x02,0x81,0x05,0x82,0x07,0x83,0x03,0x83,0x02,0x84,0x03,0x81,0x02,0x82, +0x05,0x81,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02, +0x82,0x0b,0x82,0x05,0x82,0x05,0x81,0x02,0x82,0x04,0x81,0x03,0x81,0x02,0x82, +0x01,0x82,0x04,0x81,0x01,0x82,0x05,0x82,0x01,0x82,0x08,0x82,0x07,0x81,0x08, +0x82,0x0a,0x81,0x06,0x82,0x01,0x81,0x1a,0x85,0x04,0x82,0x01,0x83,0x06,0x84, +0x06,0x83,0x01,0x82,0x04,0x84,0x06,0x82,0x07,0x85,0x04,0x82,0x01,0x83,0x06, +0x83,0x08,0x82,0x06,0x82,0x02,0x82,0x06,0x82,0x05,0x81,0x01,0x82,0x01,0x82, +0x03,0x82,0x01,0x84,0x05,0x84,0x04,0x82,0x01,0x83,0x06,0x83,0x01,0x82,0x03, +0x82,0x01,0x84,0x04,0x84,0x04,0x86,0x04,0x82,0x04,0x82,0x02,0x82,0x04,0x81, +0x02,0x82,0x06,0x81,0x02,0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x03,0x86,0x07, +0x81,0x08,0x82,0x08,0x81,0x27,0x82,0x11,0x81,0x02,0x81,0x05,0x82,0x06,0x84, +0x01,0x81,0x06,0x83,0x12,0x82,0x0a,0x82,0x05,0x81,0x01,0x81,0x01,0x81,0x07, +0x82,0x27,0x81,0x05,0x82,0x04,0x82,0x06,0x82,0x09,0x82,0x07,0x82,0x05,0x82, +0x01,0x82,0x04,0x85,0x05,0x81,0x01,0x83,0x08,0x82,0x06,0x81,0x02,0x82,0x05, +0x81,0x04,0x81,0x05,0x82,0x08,0x82,0x0a,0x83,0x04,0x86,0x04,0x82,0x0c,0x82, +0x02,0x81,0x02,0x81,0x01,0x81,0x02,0x81,0x04,0x81,0x01,0x82,0x04,0x82,0x03, +0x82,0x03,0x82,0x08,0x82,0x05,0x81,0x02,0x82,0x09,0x82,0x07,0x81,0x09,0x82, +0x04,0x82,0x05,0x82,0x0a,0x82,0x03,0x82,0x01,0x82,0x05,0x82,0x07,0x84,0x02, +0x83,0x02,0x82,0x01,0x81,0x03,0x81,0x02,0x82,0x05,0x81,0x02,0x82,0x04,0x82, +0x02,0x81,0x06,0x81,0x02,0x82,0x03,0x82,0x04,0x82,0x0a,0x82,0x05,0x82,0x05, +0x81,0x03,0x81,0x03,0x82,0x03,0x81,0x01,0x81,0x01,0x81,0x01,0x81,0x05,0x83, +0x07,0x84,0x07,0x82,0x08,0x81,0x09,0x81,0x0a,0x81,0x06,0x81,0x02,0x81,0x19, +0x82,0x02,0x83,0x03,0x83,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x83, +0x03,0x82,0x02,0x82,0x04,0x85,0x04,0x83,0x01,0x83,0x03,0x83,0x02,0x82,0x06, +0x82,0x08,0x82,0x06,0x82,0x02,0x81,0x07,0x82,0x05,0x82,0x01,0x82,0x01,0x82, +0x02,0x83,0x03,0x82,0x03,0x82,0x02,0x82,0x03,0x83,0x02,0x82,0x04,0x82,0x02, +0x83,0x03,0x83,0x03,0x81,0x03,0x82,0x02,0x82,0x04,0x82,0x07,0x82,0x04,0x82, +0x03,0x81,0x03,0x82,0x02,0x82,0x02,0x82,0x02,0x81,0x03,0x82,0x02,0x81,0x05, +0x81,0x04,0x82,0x07,0x81,0x08,0x81,0x08,0x82,0x08,0x81,0x27,0x82,0x11,0x81, +0x02,0x81,0x06,0x83,0x08,0x81,0x07,0x82,0x13,0x82,0x0a,0x82,0x05,0x85,0x04, +0x88,0x23,0x82,0x05,0x82,0x04,0x82,0x06,0x82,0x08,0x82,0x06,0x83,0x06,0x81, +0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x07,0x81,0x08,0x83,0x06, +0x82,0x02,0x82,0x19,0x83,0x11,0x83,0x09,0x82,0x03,0x81,0x01,0x81,0x02,0x81, +0x02,0x81,0x03,0x82,0x02,0x81,0x04,0x86,0x04,0x82,0x08,0x82,0x05,0x81,0x02, +0x86,0x05,0x86,0x03,0x81,0x09,0x88,0x05,0x82,0x0a,0x82,0x03,0x84,0x06,0x82, +0x07,0x82,0x01,0x81,0x01,0x81,0x01,0x82,0x02,0x82,0x01,0x82,0x02,0x81,0x02, +0x82,0x05,0x81,0x02,0x82,0x03,0x82,0x03,0x81,0x06,0x81,0x02,0x86,0x06,0x83, +0x08,0x82,0x05,0x82,0x05,0x81,0x03,0x82,0x02,0x81,0x04,0x81,0x01,0x81,0x01, +0x81,0x01,0x81,0x06,0x82,0x08,0x82,0x08,0x81,0x09,0x81,0x09,0x82,0x09,0x81, +0x06,0x81,0x02,0x82,0x1d,0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x04,0x81,0x03, +0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x04,0x82,0x06,0x82,0x03,0x82,0x03,0x82, +0x04,0x82,0x05,0x82,0x08,0x82,0x06,0x82,0x01,0x81,0x08,0x82,0x05,0x82,0x01, +0x82,0x01,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82, +0x02,0x82,0x04,0x82,0x03,0x82,0x08,0x81,0x09,0x82,0x07,0x82,0x04,0x82,0x03, +0x82,0x02,0x81,0x04,0x81,0x02,0x82,0x02,0x81,0x04,0x81,0x01,0x82,0x05,0x82, +0x02,0x82,0x07,0x82,0x08,0x81,0x08,0x82,0x08,0x81,0x07,0x83,0x03,0x81,0x19, +0x82,0x11,0x81,0x02,0x81,0x08,0x82,0x07,0x81,0x01,0x82,0x03,0x82,0x01,0x81, +0x02,0x82,0x0e,0x81,0x0c,0x81,0x06,0x82,0x06,0x88,0x0d,0x86,0x10,0x81,0x06, +0x82,0x04,0x82,0x06,0x82,0x07,0x82,0x09,0x82,0x04,0x82,0x02,0x82,0x09,0x82, +0x03,0x81,0x04,0x82,0x05,0x82,0x06,0x82,0x03,0x81,0x06,0x85,0x18,0x82,0x15, +0x83,0x06,0x82,0x04,0x81,0x01,0x81,0x02,0x81,0x02,0x81,0x03,0x81,0x03,0x82, +0x03,0x82,0x04,0x82,0x02,0x82,0x08,0x82,0x05,0x81,0x02,0x82,0x09,0x82,0x07, +0x81,0x03,0x84,0x02,0x82,0x04,0x82,0x05,0x82,0x0a,0x82,0x03,0x82,0x01,0x82, +0x05,0x82,0x07,0x82,0x01,0x81,0x01,0x81,0x01,0x82,0x02,0x82,0x02,0x82,0x01, +0x81,0x02,0x82,0x05,0x81,0x02,0x86,0x04,0x81,0x06,0x81,0x02,0x82,0x03,0x82, +0x07,0x82,0x07,0x82,0x05,0x82,0x05,0x81,0x03,0x82,0x02,0x81,0x04,0x83,0x01, +0x83,0x05,0x83,0x08,0x82,0x07,0x82,0x09,0x81,0x0a,0x81,0x09,0x81,0x25,0x85, +0x03,0x82,0x04,0x82,0x02,0x82,0x08,0x82,0x04,0x82,0x02,0x88,0x04,0x82,0x06, +0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x05,0x82,0x08,0x82,0x06,0x84,0x08,0x82, +0x05,0x82,0x01,0x82,0x01,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02, +0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x03,0x82,0x08,0x83,0x07,0x82,0x07,0x82, +0x04,0x82,0x04,0x81,0x02,0x81,0x04,0x81,0x02,0x82,0x02,0x81,0x05,0x82,0x06, +0x82,0x02,0x82,0x06,0x82,0x07,0x82,0x09,0x82,0x09,0x82,0x04,0x82,0x01,0x82, +0x01,0x82,0x2a,0x87,0x08,0x82,0x05,0x81,0x01,0x81,0x02,0x81,0x02,0x81,0x02, +0x82,0x01,0x82,0x0e,0x81,0x0c,0x81,0x05,0x82,0x01,0x82,0x07,0x82,0x26,0x81, +0x06,0x82,0x04,0x82,0x06,0x82,0x06,0x82,0x0b,0x82,0x03,0x87,0x08,0x82,0x03, +0x81,0x04,0x82,0x05,0x82,0x06,0x81,0x04,0x82,0x09,0x81,0x18,0x82,0x08,0x86, +0x08,0x82,0x06,0x82,0x04,0x81,0x01,0x81,0x02,0x81,0x02,0x81,0x03,0x86,0x03, +0x82,0x04,0x82,0x02,0x82,0x08,0x82,0x05,0x81,0x02,0x82,0x09,0x82,0x07,0x82, +0x04,0x82,0x02,0x82,0x04,0x82,0x05,0x82,0x0a,0x82,0x03,0x82,0x02,0x82,0x04, +0x82,0x07,0x82,0x01,0x83,0x01,0x82,0x02,0x82,0x03,0x81,0x01,0x81,0x02,0x82, +0x05,0x81,0x02,0x82,0x08,0x82,0x04,0x82,0x02,0x82,0x04,0x81,0x08,0x82,0x06, +0x82,0x05,0x82,0x05,0x81,0x04,0x81,0x01,0x82,0x05,0x82,0x02,0x82,0x05,0x81, +0x01,0x82,0x07,0x82,0x06,0x82,0x0a,0x81,0x0a,0x81,0x09,0x81,0x24,0x82,0x02, +0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x08,0x82,0x04,0x82,0x02,0x82,0x0a,0x82, +0x06,0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x05,0x82,0x08,0x82,0x06,0x84,0x08, +0x82,0x05,0x82,0x01,0x82,0x01,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82, +0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x03,0x82,0x0b,0x83,0x04,0x82,0x07, +0x82,0x04,0x82,0x04,0x81,0x01,0x82,0x04,0x81,0x01,0x81,0x01,0x81,0x01,0x82, +0x05,0x82,0x07,0x81,0x02,0x82,0x06,0x81,0x0a,0x81,0x08,0x82,0x08,0x81,0x06, +0x81,0x03,0x83,0x2c,0x81,0x02,0x81,0x05,0x81,0x04,0x82,0x04,0x81,0x02,0x81, +0x02,0x81,0x01,0x82,0x03,0x83,0x0f,0x82,0x0a,0x82,0x11,0x82,0x25,0x82,0x07, +0x81,0x04,0x81,0x07,0x82,0x05,0x82,0x07,0x81,0x04,0x82,0x03,0x87,0x03,0x81, +0x04,0x82,0x03,0x81,0x04,0x82,0x05,0x81,0x07,0x81,0x04,0x82,0x08,0x82,0x19, +0x84,0x10,0x83,0x0e,0x81,0x01,0x81,0x02,0x81,0x01,0x82,0x02,0x82,0x04,0x81, +0x03,0x82,0x04,0x82,0x02,0x83,0x03,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x09, +0x82,0x07,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x05,0x82,0x05,0x81,0x04,0x82, +0x03,0x82,0x03,0x81,0x04,0x82,0x07,0x82,0x02,0x81,0x02,0x82,0x02,0x82,0x03, +0x83,0x02,0x82,0x04,0x82,0x02,0x82,0x08,0x82,0x04,0x82,0x02,0x82,0x04,0x82, +0x02,0x81,0x05,0x81,0x06,0x82,0x05,0x83,0x03,0x82,0x04,0x83,0x06,0x82,0x02, +0x82,0x04,0x82,0x02,0x81,0x07,0x82,0x06,0x81,0x0b,0x81,0x0a,0x82,0x08,0x81, +0x23,0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x04,0x81,0x03,0x82,0x04, +0x82,0x02,0x82,0x0a,0x82,0x06,0x82,0x03,0x82,0x03,0x82,0x04,0x82,0x05,0x82, +0x08,0x82,0x06,0x82,0x01,0x82,0x07,0x82,0x05,0x82,0x01,0x82,0x01,0x82,0x02, +0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x04,0x82, +0x03,0x82,0x0d,0x81,0x04,0x82,0x07,0x82,0x03,0x83,0x04,0x83,0x06,0x82,0x02, +0x82,0x05,0x81,0x01,0x82,0x06,0x84,0x06,0x81,0x0b,0x81,0x08,0x82,0x08,0x81, +0x27,0x82,0x10,0x81,0x02,0x81,0x05,0x82,0x02,0x83,0x04,0x81,0x02,0x81,0x02, +0x81,0x02,0x81,0x04,0x82,0x0f,0x82,0x0a,0x82,0x11,0x82,0x07,0x82,0x12,0x82, +0x08,0x81,0x08,0x82,0x02,0x82,0x07,0x82,0x05,0x81,0x08,0x82,0x03,0x81,0x08, +0x82,0x04,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x06,0x81,0x07,0x82,0x02,0x82, +0x08,0x82,0x06,0x82,0x08,0x82,0x0b,0x82,0x0e,0x82,0x0a,0x82,0x04,0x81,0x01, +0x83,0x01,0x82,0x03,0x81,0x05,0x82,0x02,0x82,0x04,0x82,0x03,0x83,0x01,0x82, +0x03,0x82,0x03,0x82,0x03,0x82,0x09,0x82,0x08,0x82,0x03,0x82,0x02,0x82,0x04, +0x82,0x05,0x82,0x05,0x82,0x02,0x82,0x04,0x82,0x03,0x82,0x03,0x82,0x07,0x82, +0x05,0x82,0x02,0x82,0x04,0x82,0x03,0x82,0x02,0x82,0x03,0x82,0x09,0x82,0x02, +0x82,0x03,0x82,0x04,0x82,0x02,0x82,0x03,0x82,0x06,0x82,0x06,0x82,0x03,0x82, +0x05,0x82,0x06,0x82,0x02,0x81,0x04,0x82,0x03,0x82,0x06,0x82,0x05,0x82,0x0b, +0x81,0x0b,0x81,0x08,0x81,0x23,0x82,0x02,0x83,0x03,0x83,0x02,0x82,0x04,0x82, +0x02,0x82,0x04,0x82,0x02,0x83,0x03,0x82,0x03,0x82,0x04,0x82,0x06,0x83,0x01, +0x83,0x03,0x82,0x04,0x82,0x05,0x82,0x08,0x82,0x06,0x82,0x02,0x82,0x06,0x82, +0x05,0x82,0x01,0x82,0x01,0x82,0x02,0x82,0x04,0x82,0x03,0x82,0x02,0x82,0x03, +0x83,0x02,0x82,0x04,0x82,0x02,0x83,0x03,0x82,0x08,0x82,0x02,0x82,0x04,0x82, +0x03,0x81,0x03,0x83,0x01,0x84,0x05,0x82,0x06,0x82,0x02,0x82,0x04,0x82,0x02, +0x81,0x07,0x83,0x05,0x82,0x0b,0x81,0x08,0x82,0x08,0x81,0x27,0x82,0x10,0x81, +0x02,0x81,0x06,0x85,0x09,0x82,0x04,0x84,0x01,0x82,0x0f,0x81,0x0a,0x81,0x1b, +0x82,0x12,0x82,0x08,0x81,0x09,0x84,0x08,0x82,0x04,0x87,0x04,0x84,0x09,0x82, +0x05,0x84,0x06,0x84,0x07,0x81,0x08,0x84,0x06,0x84,0x07,0x82,0x08,0x82,0x27, +0x82,0x04,0x82,0x09,0x81,0x06,0x81,0x02,0x87,0x05,0x84,0x04,0x86,0x04,0x87, +0x04,0x82,0x09,0x85,0x03,0x82,0x04,0x82,0x03,0x86,0x04,0x84,0x05,0x82,0x04, +0x82,0x02,0x87,0x02,0x82,0x05,0x82,0x02,0x82,0x05,0x81,0x04,0x84,0x04,0x82, +0x0a,0x86,0x02,0x82,0x04,0x82,0x03,0x85,0x07,0x82,0x07,0x85,0x06,0x82,0x06, +0x82,0x02,0x81,0x04,0x82,0x04,0x82,0x05,0x82,0x05,0x87,0x06,0x81,0x0b,0x82, +0x07,0x81,0x23,0x84,0x01,0x82,0x03,0x82,0x01,0x83,0x06,0x84,0x06,0x83,0x01, +0x82,0x04,0x85,0x05,0x82,0x07,0x83,0x01,0x82,0x03,0x82,0x04,0x82,0x03,0x86, +0x06,0x82,0x06,0x82,0x03,0x81,0x04,0x86,0x03,0x82,0x01,0x82,0x01,0x82,0x02, +0x82,0x04,0x82,0x04,0x84,0x04,0x82,0x01,0x83,0x06,0x83,0x01,0x82,0x03,0x82, +0x09,0x84,0x06,0x84,0x05,0x84,0x01,0x82,0x05,0x82,0x06,0x81,0x03,0x82,0x03, +0x82,0x03,0x82,0x07,0x82,0x05,0x86,0x07,0x81,0x08,0x82,0x08,0x81,0x45,0x81, +0x27,0x81,0x0a,0x81,0x1c,0x81,0x1b,0x82,0x78,0x81,0x2e,0x82,0x7f,0x30,0x82, +0x5e,0x81,0x0c,0x81,0x07,0x81,0x0f,0x88,0x4d,0x82,0x1a,0x82,0x37,0x82,0x0e, +0x82,0x4b,0x82,0x13,0x82,0x07,0x82,0x07,0x82,0x45,0x81,0x28,0x81,0x08,0x81, +0x1c,0x81,0x1c,0x81,0x78,0x81,0x30,0x84,0x7f,0x7f,0x0e,0x83,0x0a,0x81,0x05, +0x83,0x64,0x82,0x1a,0x82,0x37,0x82,0x0e,0x82,0x4b,0x82,0x14,0x81,0x07,0x82, +0x07,0x81,0x70,0x81,0x06,0x81,0x7f,0x7f,0x7f,0x7f,0x6e,0x85,0x1a,0x82,0x38, +0x82,0x0e,0x82,0x4a,0x82,0x16,0x81,0x0e,0x81,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f, +0x7f,0x62, +0x00, + } +}; diff --git a/minui/roboto_15x24.h b/minui/roboto_15x24.h new file mode 100644 index 0000000..7271d74 --- /dev/null +++ b/minui/roboto_15x24.h @@ -0,0 +1,281 @@ +struct { + unsigned width; + unsigned height; + unsigned cwidth; + unsigned cheight; + unsigned char rundata[]; +} font = { + .width = 1440, + .height = 24, + .cwidth = 15, + .cheight = 24, + .rundata = { +0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x6e,0x81,0x3e,0x81, +0x07,0x81,0x7f,0x7f,0x7f,0x7f,0x7f,0x76,0x84,0x17,0x84,0x7f,0x7f,0x7f,0x7f, +0x4c,0x81,0x3d,0x82,0x07,0x82,0x5f,0x81,0x7f,0x7f,0x7f,0x7f,0x7f,0x15,0x84, +0x07,0x82,0x0e,0x84,0x45,0x82,0x24,0x82,0x1a,0x83,0x16,0x82,0x10,0x82,0x0e, +0x82,0x0a,0x82,0x0d,0x84,0x7f,0x62,0x82,0x0b,0x82,0x0b,0x82,0x3b,0x82,0x0c, +0x82,0x02,0x82,0x0a,0x82,0x03,0x81,0x0a,0x84,0x08,0x83,0x0e,0x84,0x0b,0x82, +0x10,0x82,0x09,0x82,0x5e,0x81,0x09,0x84,0x0b,0x84,0x0b,0x84,0x0b,0x84,0x0e, +0x83,0x08,0x88,0x09,0x84,0x07,0x8a,0x08,0x84,0x0b,0x84,0x56,0x84,0x1c,0x82, +0x08,0x87,0x0b,0x85,0x07,0x87,0x09,0x89,0x06,0x8a,0x07,0x85,0x06,0x82,0x08, +0x82,0x06,0x86,0x0f,0x82,0x06,0x82,0x07,0x82,0x04,0x82,0x0a,0x83,0x09,0x82, +0x03,0x82,0x08,0x82,0x06,0x85,0x07,0x87,0x0b,0x85,0x07,0x87,0x0c,0x84,0x06, +0x8d,0x03,0x82,0x07,0x82,0x02,0x83,0x08,0x83,0x01,0x82,0x0a,0x82,0x02,0x82, +0x08,0x82,0x03,0x82,0x08,0x82,0x04,0x8b,0x09,0x82,0x09,0x82,0x10,0x82,0x0d, +0x81,0x1d,0x82,0x18,0x82,0x24,0x82,0x19,0x84,0x16,0x82,0x10,0x82,0x0e,0x82, +0x0a,0x82,0x0d,0x84,0x7f,0x61,0x82,0x0c,0x82,0x0c,0x82,0x3a,0x82,0x0c,0x82, +0x02,0x82,0x0a,0x82,0x03,0x81,0x08,0x87,0x06,0x82,0x01,0x82,0x0c,0x86,0x0a, +0x82,0x0f,0x82,0x0b,0x82,0x5c,0x82,0x08,0x87,0x07,0x86,0x0a,0x87,0x08,0x87, +0x0c,0x83,0x08,0x88,0x07,0x87,0x06,0x8a,0x07,0x87,0x07,0x87,0x54,0x87,0x08, +0x86,0x0c,0x82,0x08,0x89,0x07,0x88,0x06,0x89,0x07,0x89,0x06,0x8a,0x05,0x88, +0x05,0x82,0x08,0x82,0x06,0x86,0x0f,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x0a, +0x83,0x08,0x83,0x03,0x83,0x07,0x82,0x04,0x88,0x06,0x89,0x07,0x88,0x06,0x89, +0x08,0x88,0x04,0x8d,0x03,0x82,0x07,0x82,0x03,0x82,0x08,0x82,0x02,0x82,0x04, +0x81,0x05,0x82,0x03,0x82,0x06,0x82,0x04,0x82,0x07,0x83,0x04,0x8b,0x09,0x82, +0x0a,0x82,0x0f,0x82,0x0c,0x83,0x1d,0x82,0x17,0x82,0x24,0x82,0x18,0x83,0x18, +0x82,0x2c,0x82,0x0f,0x82,0x7f,0x60,0x83,0x0c,0x82,0x0d,0x82,0x39,0x82,0x0c, +0x82,0x02,0x82,0x0a,0x82,0x02,0x82,0x07,0x83,0x03,0x83,0x04,0x82,0x03,0x81, +0x04,0x81,0x06,0x83,0x03,0x82,0x09,0x82,0x0f,0x82,0x0b,0x82,0x5c,0x82,0x07, +0x82,0x04,0x82,0x0a,0x83,0x09,0x82,0x04,0x83,0x06,0x82,0x04,0x83,0x0a,0x84, +0x08,0x82,0x0d,0x82,0x13,0x82,0x06,0x82,0x04,0x83,0x06,0x82,0x04,0x82,0x52, +0x82,0x04,0x82,0x07,0x82,0x05,0x82,0x09,0x84,0x07,0x82,0x05,0x83,0x06,0x82, +0x05,0x82,0x05,0x82,0x05,0x83,0x06,0x82,0x0d,0x82,0x0d,0x82,0x05,0x82,0x04, +0x82,0x08,0x82,0x08,0x82,0x11,0x82,0x06,0x82,0x05,0x82,0x06,0x82,0x0a,0x83, +0x08,0x83,0x03,0x83,0x07,0x82,0x04,0x82,0x05,0x82,0x05,0x82,0x06,0x82,0x06, +0x82,0x05,0x82,0x05,0x82,0x05,0x83,0x06,0x83,0x04,0x83,0x08,0x83,0x08,0x82, +0x07,0x82,0x03,0x82,0x08,0x82,0x02,0x82,0x03,0x83,0x04,0x82,0x03,0x83,0x04, +0x83,0x05,0x82,0x06,0x82,0x0d,0x82,0x0a,0x82,0x0a,0x82,0x0f,0x82,0x0c,0x83, +0x1e,0x81,0x17,0x82,0x24,0x82,0x18,0x82,0x19,0x82,0x2c,0x82,0x0f,0x82,0x74, +0x82,0x69,0x82,0x0d,0x82,0x0d,0x82,0x39,0x82,0x0c,0x82,0x02,0x82,0x0a,0x82, +0x02,0x82,0x07,0x82,0x05,0x82,0x04,0x82,0x03,0x82,0x02,0x82,0x06,0x82,0x04, +0x82,0x09,0x82,0x0e,0x82,0x0d,0x82,0x1c,0x82,0x3c,0x82,0x08,0x82,0x05,0x82, +0x09,0x83,0x09,0x82,0x05,0x82,0x05,0x83,0x05,0x82,0x09,0x85,0x07,0x82,0x0d, +0x82,0x13,0x82,0x07,0x82,0x05,0x82,0x05,0x82,0x05,0x83,0x51,0x82,0x04,0x82, +0x06,0x82,0x07,0x82,0x08,0x84,0x07,0x82,0x06,0x82,0x05,0x82,0x07,0x82,0x04, +0x82,0x06,0x83,0x05,0x82,0x0d,0x82,0x0c,0x82,0x07,0x82,0x03,0x82,0x08,0x82, +0x08,0x82,0x11,0x82,0x06,0x82,0x04,0x83,0x06,0x82,0x0a,0x84,0x06,0x84,0x03, +0x84,0x06,0x82,0x03,0x82,0x07,0x82,0x04,0x82,0x07,0x82,0x04,0x82,0x07,0x82, +0x04,0x82,0x06,0x82,0x06,0x82,0x06,0x82,0x08,0x83,0x08,0x82,0x07,0x82,0x03, +0x83,0x06,0x83,0x02,0x82,0x03,0x83,0x03,0x82,0x05,0x82,0x04,0x82,0x06,0x82, +0x05,0x83,0x0c,0x83,0x0a,0x82,0x0b,0x82,0x0e,0x82,0x0c,0x81,0x01,0x82,0x35, +0x82,0x24,0x82,0x18,0x82,0x19,0x82,0x2c,0x82,0x0f,0x82,0x74,0x82,0x69,0x82, +0x0d,0x82,0x0d,0x83,0x38,0x82,0x0c,0x82,0x02,0x81,0x0b,0x81,0x03,0x82,0x07, +0x82,0x05,0x82,0x04,0x82,0x03,0x82,0x02,0x81,0x07,0x82,0x04,0x82,0x09,0x82, +0x0e,0x82,0x0d,0x82,0x0d,0x82,0x0d,0x82,0x3c,0x82,0x07,0x82,0x06,0x82,0x09, +0x83,0x08,0x83,0x05,0x82,0x0d,0x82,0x09,0x85,0x07,0x82,0x0d,0x82,0x12,0x83, +0x07,0x82,0x05,0x82,0x05,0x82,0x06,0x82,0x57,0x83,0x04,0x82,0x09,0x81,0x08, +0x84,0x07,0x82,0x06,0x82,0x05,0x82,0x07,0x82,0x04,0x82,0x07,0x82,0x05,0x82, +0x0d,0x82,0x0c,0x82,0x07,0x82,0x03,0x82,0x08,0x82,0x08,0x82,0x11,0x82,0x06, +0x82,0x03,0x83,0x07,0x82,0x0a,0x84,0x06,0x84,0x03,0x85,0x05,0x82,0x03,0x82, +0x07,0x82,0x04,0x82,0x07,0x82,0x04,0x82,0x07,0x82,0x04,0x82,0x06,0x83,0x05, +0x82,0x06,0x82,0x08,0x83,0x08,0x82,0x07,0x82,0x04,0x82,0x06,0x82,0x03,0x82, +0x03,0x83,0x03,0x82,0x05,0x83,0x02,0x83,0x07,0x82,0x04,0x82,0x0d,0x82,0x0b, +0x82,0x0b,0x82,0x0e,0x82,0x0b,0x82,0x01,0x82,0x29,0x84,0x08,0x82,0x01,0x84, +0x0a,0x86,0x0a,0x83,0x02,0x82,0x08,0x84,0x0a,0x86,0x0a,0x83,0x02,0x82,0x06, +0x82,0x01,0x84,0x09,0x84,0x0e,0x82,0x0a,0x82,0x04,0x83,0x08,0x82,0x07,0x81, +0x02,0x83,0x03,0x83,0x05,0x81,0x02,0x84,0x0b,0x84,0x09,0x81,0x02,0x84,0x0a, +0x83,0x02,0x82,0x08,0x81,0x02,0x84,0x08,0x84,0x08,0x88,0x07,0x82,0x06,0x82, +0x05,0x82,0x06,0x82,0x03,0x82,0x03,0x82,0x05,0x82,0x04,0x82,0x05,0x82,0x04, +0x83,0x05,0x83,0x06,0x89,0x09,0x82,0x0d,0x82,0x0d,0x83,0x38,0x82,0x0c,0x82, +0x02,0x81,0x08,0x8b,0x05,0x82,0x0b,0x82,0x03,0x81,0x02,0x82,0x07,0x83,0x02, +0x82,0x0a,0x81,0x0f,0x82,0x0d,0x82,0x0d,0x82,0x0d,0x82,0x3c,0x82,0x07,0x82, +0x06,0x82,0x09,0x83,0x10,0x82,0x0d,0x82,0x08,0x82,0x01,0x83,0x07,0x82,0x0d, +0x82,0x12,0x82,0x08,0x82,0x05,0x82,0x05,0x82,0x06,0x82,0x08,0x82,0x0d,0x82, +0x13,0x81,0x06,0x89,0x06,0x81,0x14,0x82,0x05,0x81,0x04,0x84,0x02,0x82,0x06, +0x82,0x02,0x82,0x06,0x82,0x06,0x82,0x04,0x82,0x0e,0x82,0x07,0x82,0x05,0x82, +0x0d,0x82,0x0b,0x82,0x0d,0x82,0x08,0x82,0x08,0x82,0x11,0x82,0x06,0x82,0x03, +0x82,0x08,0x82,0x0a,0x82,0x01,0x82,0x05,0x84,0x03,0x82,0x01,0x82,0x05,0x82, +0x02,0x82,0x09,0x82,0x03,0x82,0x07,0x82,0x03,0x82,0x09,0x82,0x03,0x82,0x06, +0x83,0x05,0x82,0x10,0x83,0x08,0x82,0x07,0x82,0x04,0x82,0x06,0x82,0x03,0x82, +0x03,0x81,0x01,0x82,0x02,0x82,0x06,0x82,0x02,0x82,0x08,0x82,0x03,0x83,0x0c, +0x82,0x0c,0x82,0x0b,0x82,0x0e,0x82,0x0b,0x82,0x02,0x81,0x28,0x87,0x06,0x88, +0x08,0x88,0x08,0x88,0x07,0x86,0x09,0x86,0x09,0x88,0x06,0x88,0x08,0x84,0x0e, +0x82,0x0a,0x82,0x03,0x83,0x09,0x82,0x07,0x87,0x01,0x85,0x04,0x88,0x09,0x87, +0x07,0x81,0x01,0x86,0x08,0x88,0x08,0x87,0x06,0x87,0x07,0x88,0x07,0x82,0x06, +0x82,0x05,0x82,0x05,0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x04,0x83,0x03,0x83, +0x05,0x82,0x05,0x82,0x07,0x89,0x09,0x82,0x0d,0x82,0x0d,0x83,0x38,0x82,0x1b, +0x82,0x03,0x81,0x08,0x83,0x0b,0x85,0x01,0x82,0x09,0x85,0x1a,0x83,0x0d,0x83, +0x09,0x81,0x02,0x82,0x01,0x81,0x0b,0x82,0x3b,0x82,0x08,0x82,0x06,0x82,0x09, +0x83,0x0f,0x82,0x0d,0x82,0x09,0x82,0x01,0x83,0x07,0x87,0x07,0x83,0x01,0x84, +0x0c,0x82,0x09,0x83,0x03,0x82,0x06,0x82,0x06,0x82,0x08,0x82,0x0d,0x82,0x11, +0x83,0x06,0x89,0x06,0x83,0x12,0x82,0x05,0x81,0x03,0x82,0x02,0x82,0x02,0x81, +0x06,0x82,0x02,0x82,0x06,0x82,0x05,0x82,0x05,0x82,0x0e,0x82,0x07,0x83,0x04, +0x82,0x0d,0x82,0x0b,0x82,0x0d,0x82,0x08,0x82,0x08,0x82,0x11,0x82,0x06,0x82, +0x02,0x82,0x09,0x82,0x0a,0x82,0x01,0x82,0x04,0x82,0x01,0x82,0x03,0x82,0x02, +0x82,0x04,0x82,0x02,0x82,0x09,0x82,0x03,0x82,0x07,0x82,0x03,0x82,0x09,0x82, +0x03,0x82,0x06,0x82,0x06,0x83,0x0f,0x83,0x08,0x82,0x07,0x82,0x05,0x82,0x04, +0x82,0x05,0x81,0x02,0x82,0x01,0x82,0x02,0x82,0x07,0x84,0x0a,0x82,0x02,0x82, +0x0c,0x83,0x0c,0x82,0x0c,0x82,0x0d,0x82,0x0a,0x82,0x03,0x82,0x26,0x82,0x04, +0x82,0x06,0x83,0x03,0x83,0x07,0x82,0x05,0x82,0x06,0x82,0x04,0x83,0x06,0x82, +0x04,0x82,0x0a,0x82,0x0a,0x83,0x03,0x83,0x06,0x82,0x04,0x83,0x09,0x82,0x0e, +0x82,0x0a,0x82,0x03,0x82,0x0a,0x82,0x07,0x82,0x03,0x84,0x02,0x82,0x04,0x82, +0x04,0x83,0x07,0x82,0x04,0x83,0x06,0x82,0x04,0x83,0x06,0x82,0x04,0x83,0x08, +0x83,0x0a,0x82,0x04,0x82,0x08,0x82,0x0b,0x82,0x06,0x82,0x05,0x82,0x05,0x82, +0x04,0x82,0x03,0x83,0x03,0x82,0x06,0x82,0x03,0x82,0x06,0x82,0x05,0x82,0x0d, +0x82,0x0a,0x82,0x0d,0x82,0x0d,0x83,0x38,0x82,0x1b,0x82,0x02,0x82,0x09,0x85, +0x0e,0x81,0x0b,0x83,0x1b,0x82,0x0f,0x82,0x09,0x87,0x0b,0x82,0x3b,0x82,0x08, +0x82,0x06,0x82,0x09,0x83,0x0e,0x83,0x09,0x85,0x09,0x82,0x02,0x83,0x07,0x88, +0x06,0x89,0x0b,0x82,0x0a,0x86,0x07,0x82,0x06,0x82,0x27,0x85,0x17,0x84,0x0f, +0x82,0x05,0x82,0x03,0x81,0x03,0x82,0x02,0x81,0x06,0x82,0x02,0x82,0x06,0x88, +0x06,0x82,0x0e,0x82,0x07,0x83,0x04,0x88,0x07,0x88,0x05,0x82,0x0d,0x8c,0x08, +0x82,0x11,0x82,0x06,0x85,0x0a,0x82,0x0a,0x82,0x01,0x82,0x04,0x82,0x01,0x82, +0x03,0x82,0x02,0x82,0x04,0x82,0x02,0x82,0x09,0x82,0x03,0x82,0x06,0x82,0x04, +0x82,0x09,0x82,0x03,0x82,0x04,0x83,0x08,0x85,0x0c,0x83,0x08,0x82,0x07,0x82, +0x05,0x82,0x04,0x82,0x05,0x82,0x01,0x82,0x01,0x82,0x02,0x81,0x08,0x84,0x0a, +0x86,0x0c,0x82,0x0d,0x82,0x0c,0x82,0x0d,0x82,0x0a,0x82,0x03,0x82,0x26,0x82, +0x04,0x83,0x05,0x82,0x05,0x82,0x06,0x83,0x05,0x82,0x05,0x83,0x05,0x82,0x05, +0x83,0x04,0x82,0x0a,0x82,0x0a,0x82,0x05,0x82,0x06,0x82,0x05,0x82,0x09,0x82, +0x0e,0x82,0x0a,0x82,0x02,0x82,0x0b,0x82,0x07,0x82,0x03,0x83,0x03,0x83,0x03, +0x82,0x05,0x82,0x06,0x83,0x05,0x82,0x06,0x82,0x05,0x82,0x05,0x83,0x05,0x82, +0x08,0x82,0x0b,0x82,0x04,0x82,0x08,0x82,0x0b,0x82,0x06,0x82,0x06,0x82,0x04, +0x82,0x04,0x82,0x02,0x84,0x03,0x82,0x07,0x82,0x01,0x82,0x07,0x83,0x03,0x83, +0x0c,0x83,0x0a,0x82,0x0d,0x82,0x0e,0x82,0x0a,0x82,0x2c,0x82,0x1b,0x82,0x02, +0x82,0x0b,0x85,0x0b,0x82,0x09,0x85,0x1b,0x82,0x0f,0x82,0x0b,0x83,0x09,0x8b, +0x36,0x81,0x09,0x82,0x06,0x82,0x09,0x83,0x0e,0x82,0x0a,0x86,0x07,0x82,0x03, +0x83,0x07,0x82,0x04,0x83,0x05,0x84,0x03,0x83,0x09,0x82,0x0b,0x87,0x07,0x82, +0x04,0x83,0x25,0x85,0x1b,0x85,0x0b,0x82,0x06,0x82,0x02,0x82,0x03,0x82,0x02, +0x81,0x05,0x82,0x04,0x82,0x05,0x8a,0x04,0x82,0x0e,0x82,0x07,0x83,0x04,0x88, +0x07,0x88,0x05,0x82,0x04,0x86,0x03,0x8c,0x08,0x82,0x11,0x82,0x06,0x86,0x09, +0x82,0x0a,0x82,0x02,0x82,0x02,0x82,0x02,0x82,0x03,0x82,0x03,0x82,0x03,0x82, +0x02,0x82,0x09,0x82,0x03,0x8a,0x04,0x82,0x09,0x82,0x03,0x89,0x0a,0x85,0x0a, +0x83,0x08,0x82,0x07,0x82,0x05,0x82,0x04,0x82,0x05,0x82,0x01,0x82,0x02,0x81, +0x01,0x82,0x09,0x82,0x0c,0x84,0x0c,0x82,0x0e,0x82,0x0d,0x82,0x0c,0x82,0x3d, +0x83,0x05,0x82,0x05,0x82,0x06,0x82,0x0d,0x82,0x06,0x82,0x05,0x82,0x06,0x82, +0x09,0x82,0x09,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x09,0x82,0x0e,0x82,0x0a, +0x82,0x01,0x83,0x0b,0x82,0x07,0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x05,0x82, +0x06,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x05,0x82,0x06,0x82,0x08,0x82,0x0b, +0x82,0x0e,0x82,0x0b,0x82,0x06,0x82,0x06,0x82,0x03,0x82,0x06,0x82,0x01,0x82, +0x01,0x81,0x03,0x82,0x07,0x82,0x01,0x82,0x08,0x82,0x03,0x82,0x0c,0x83,0x09, +0x83,0x0e,0x82,0x0e,0x83,0x07,0x86,0x04,0x82,0x24,0x82,0x1b,0x81,0x03,0x82, +0x0d,0x84,0x0a,0x81,0x02,0x84,0x03,0x83,0x01,0x83,0x03,0x82,0x15,0x82,0x0f, +0x82,0x0b,0x84,0x08,0x8b,0x15,0x86,0x1a,0x82,0x09,0x82,0x06,0x82,0x09,0x83, +0x0d,0x82,0x0f,0x83,0x06,0x82,0x03,0x83,0x0e,0x82,0x05,0x83,0x05,0x82,0x09, +0x82,0x0a,0x82,0x04,0x83,0x06,0x89,0x24,0x83,0x21,0x84,0x08,0x82,0x07,0x81, +0x03,0x82,0x03,0x81,0x03,0x81,0x05,0x82,0x04,0x82,0x05,0x82,0x06,0x83,0x03, +0x82,0x0e,0x82,0x07,0x83,0x04,0x82,0x0d,0x82,0x0b,0x82,0x04,0x86,0x03,0x82, +0x08,0x82,0x08,0x82,0x11,0x82,0x06,0x82,0x02,0x82,0x09,0x82,0x0a,0x82,0x02, +0x82,0x02,0x82,0x02,0x82,0x03,0x82,0x03,0x83,0x02,0x82,0x02,0x82,0x09,0x82, +0x03,0x88,0x06,0x82,0x09,0x82,0x03,0x82,0x05,0x83,0x0c,0x84,0x08,0x83,0x08, +0x82,0x07,0x82,0x06,0x82,0x02,0x82,0x06,0x82,0x01,0x81,0x03,0x84,0x08,0x84, +0x0b,0x83,0x0c,0x83,0x0e,0x82,0x0d,0x82,0x0c,0x82,0x39,0x87,0x05,0x82,0x05, +0x82,0x06,0x82,0x0d,0x82,0x06,0x82,0x05,0x8a,0x09,0x82,0x09,0x82,0x06,0x82, +0x06,0x82,0x05,0x82,0x09,0x82,0x0e,0x82,0x0a,0x85,0x0c,0x82,0x07,0x82,0x04, +0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x06,0x82,0x06,0x82,0x06,0x82,0x05,0x82, +0x05,0x82,0x06,0x82,0x08,0x82,0x0b,0x85,0x0b,0x82,0x0b,0x82,0x06,0x82,0x06, +0x82,0x03,0x82,0x06,0x82,0x01,0x82,0x01,0x82,0x02,0x82,0x08,0x83,0x09,0x82, +0x03,0x82,0x0c,0x82,0x0a,0x82,0x0f,0x82,0x0f,0x83,0x06,0x82,0x02,0x83,0x02, +0x82,0x25,0x82,0x18,0x8b,0x0d,0x82,0x09,0x82,0x01,0x82,0x02,0x82,0x02,0x82, +0x03,0x83,0x02,0x82,0x15,0x82,0x0f,0x82,0x0a,0x82,0x01,0x82,0x0c,0x82,0x3a, +0x82,0x09,0x82,0x06,0x82,0x09,0x83,0x0c,0x82,0x11,0x82,0x05,0x82,0x04,0x83, +0x0e,0x82,0x05,0x83,0x05,0x82,0x09,0x82,0x09,0x82,0x06,0x82,0x08,0x83,0x02, +0x82,0x24,0x83,0x0c,0x89,0x0d,0x83,0x08,0x82,0x07,0x81,0x03,0x82,0x03,0x81, +0x03,0x81,0x04,0x89,0x05,0x82,0x07,0x82,0x03,0x82,0x0e,0x82,0x07,0x82,0x05, +0x82,0x0d,0x82,0x0b,0x82,0x08,0x82,0x03,0x82,0x08,0x82,0x08,0x82,0x11,0x82, +0x06,0x82,0x03,0x82,0x08,0x82,0x0a,0x82,0x03,0x81,0x02,0x81,0x03,0x82,0x03, +0x82,0x04,0x82,0x02,0x82,0x02,0x82,0x09,0x82,0x03,0x82,0x0c,0x82,0x09,0x82, +0x03,0x82,0x06,0x82,0x0e,0x82,0x08,0x83,0x08,0x82,0x07,0x82,0x06,0x82,0x02, +0x82,0x06,0x84,0x03,0x84,0x07,0x86,0x0b,0x82,0x0c,0x82,0x0f,0x82,0x0d,0x82, +0x0c,0x82,0x37,0x89,0x05,0x82,0x05,0x82,0x06,0x82,0x0d,0x82,0x06,0x82,0x05, +0x8a,0x09,0x82,0x09,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x09,0x82,0x0e,0x82, +0x0a,0x85,0x0c,0x82,0x07,0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x06, +0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x05,0x82,0x06,0x82,0x08,0x82,0x0d,0x85, +0x09,0x82,0x0b,0x82,0x06,0x82,0x07,0x82,0x02,0x81,0x07,0x82,0x01,0x81,0x02, +0x82,0x01,0x82,0x09,0x83,0x0a,0x82,0x01,0x83,0x0b,0x82,0x0c,0x82,0x0e,0x82, +0x0e,0x82,0x07,0x82,0x04,0x86,0x3f,0x8b,0x05,0x82,0x06,0x82,0x08,0x82,0x02, +0x81,0x04,0x81,0x02,0x82,0x04,0x85,0x16,0x82,0x0f,0x82,0x0e,0x81,0x0c,0x82, +0x39,0x82,0x0a,0x82,0x06,0x82,0x09,0x83,0x0b,0x83,0x11,0x82,0x05,0x8b,0x0c, +0x82,0x06,0x82,0x05,0x82,0x08,0x83,0x09,0x82,0x06,0x82,0x0d,0x82,0x25,0x85, +0x09,0x89,0x0a,0x85,0x09,0x82,0x07,0x81,0x03,0x82,0x03,0x81,0x02,0x82,0x04, +0x8a,0x04,0x82,0x07,0x82,0x03,0x83,0x07,0x82,0x04,0x82,0x07,0x82,0x05,0x82, +0x0d,0x82,0x0b,0x83,0x07,0x82,0x03,0x82,0x08,0x82,0x08,0x82,0x11,0x82,0x06, +0x82,0x03,0x83,0x07,0x82,0x0a,0x82,0x03,0x84,0x03,0x82,0x03,0x82,0x05,0x82, +0x01,0x82,0x02,0x83,0x07,0x83,0x03,0x82,0x0c,0x83,0x07,0x83,0x03,0x82,0x06, +0x83,0x04,0x82,0x07,0x82,0x08,0x83,0x08,0x82,0x07,0x82,0x06,0x82,0x01,0x83, +0x07,0x83,0x03,0x84,0x07,0x82,0x02,0x82,0x0b,0x82,0x0b,0x82,0x10,0x82,0x0e, +0x82,0x0b,0x82,0x36,0x83,0x04,0x83,0x05,0x82,0x05,0x82,0x06,0x82,0x0d,0x82, +0x06,0x82,0x05,0x82,0x11,0x82,0x09,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x09, +0x82,0x0e,0x82,0x0a,0x82,0x02,0x82,0x0b,0x82,0x07,0x82,0x04,0x82,0x04,0x82, +0x03,0x82,0x05,0x82,0x06,0x82,0x06,0x82,0x06,0x82,0x05,0x82,0x05,0x82,0x06, +0x82,0x08,0x82,0x10,0x83,0x08,0x82,0x0b,0x82,0x06,0x82,0x07,0x82,0x01,0x82, +0x08,0x83,0x03,0x81,0x01,0x82,0x08,0x85,0x09,0x82,0x01,0x82,0x0b,0x83,0x0d, +0x82,0x0d,0x82,0x0e,0x82,0x0f,0x82,0x43,0x82,0x02,0x82,0x08,0x83,0x05,0x82, +0x08,0x81,0x03,0x81,0x04,0x81,0x02,0x82,0x05,0x84,0x16,0x82,0x0f,0x82,0x1b, +0x82,0x39,0x82,0x0a,0x83,0x05,0x82,0x09,0x83,0x0a,0x83,0x0a,0x82,0x06,0x82, +0x0b,0x83,0x07,0x82,0x05,0x82,0x06,0x82,0x05,0x82,0x08,0x82,0x0a,0x82,0x06, +0x82,0x0c,0x83,0x27,0x85,0x18,0x84,0x15,0x82,0x02,0x82,0x02,0x82,0x02,0x81, +0x05,0x82,0x06,0x82,0x04,0x82,0x07,0x82,0x04,0x82,0x07,0x82,0x04,0x82,0x06, +0x83,0x05,0x82,0x0d,0x82,0x0c,0x82,0x07,0x82,0x03,0x82,0x08,0x82,0x08,0x82, +0x0a,0x82,0x05,0x82,0x06,0x82,0x04,0x83,0x06,0x82,0x0a,0x82,0x03,0x84,0x03, +0x82,0x03,0x82,0x05,0x85,0x03,0x82,0x07,0x82,0x04,0x82,0x0d,0x82,0x05,0x81, +0x01,0x82,0x04,0x82,0x06,0x83,0x04,0x83,0x06,0x82,0x08,0x83,0x08,0x82,0x07, +0x82,0x07,0x84,0x08,0x83,0x04,0x82,0x07,0x82,0x04,0x82,0x0a,0x82,0x0a,0x83, +0x10,0x82,0x0e,0x82,0x0b,0x82,0x36,0x82,0x05,0x83,0x05,0x82,0x05,0x82,0x06, +0x83,0x05,0x82,0x05,0x82,0x06,0x82,0x05,0x83,0x10,0x82,0x09,0x83,0x05,0x82, +0x06,0x82,0x05,0x82,0x09,0x82,0x0e,0x82,0x0a,0x82,0x02,0x83,0x0a,0x82,0x07, +0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x06,0x83,0x05,0x82,0x06,0x82, +0x05,0x82,0x05,0x82,0x06,0x82,0x08,0x82,0x0a,0x82,0x05,0x82,0x08,0x82,0x0b, +0x82,0x06,0x82,0x08,0x81,0x01,0x82,0x08,0x83,0x03,0x84,0x08,0x82,0x01,0x82, +0x09,0x82,0x01,0x82,0x0b,0x82,0x0e,0x82,0x0d,0x82,0x0d,0x83,0x54,0x82,0x02, +0x82,0x09,0x82,0x04,0x83,0x07,0x82,0x03,0x81,0x04,0x81,0x02,0x82,0x06,0x82, +0x18,0x82,0x0d,0x82,0x1c,0x82,0x39,0x81,0x0c,0x82,0x04,0x83,0x09,0x83,0x09, +0x83,0x0c,0x82,0x05,0x82,0x0b,0x83,0x07,0x82,0x04,0x83,0x06,0x83,0x04,0x82, +0x08,0x82,0x0a,0x83,0x05,0x82,0x0c,0x82,0x2b,0x83,0x15,0x84,0x18,0x81,0x03, +0x83,0x01,0x83,0x05,0x82,0x07,0x83,0x03,0x82,0x06,0x83,0x04,0x83,0x05,0x82, +0x05,0x82,0x06,0x82,0x06,0x82,0x0d,0x82,0x0c,0x83,0x06,0x82,0x03,0x82,0x08, +0x82,0x08,0x82,0x0a,0x82,0x05,0x82,0x06,0x82,0x05,0x83,0x05,0x82,0x0a,0x82, +0x04,0x82,0x04,0x82,0x03,0x82,0x06,0x84,0x03,0x83,0x05,0x83,0x04,0x82,0x0d, +0x83,0x05,0x83,0x04,0x82,0x06,0x83,0x05,0x82,0x06,0x82,0x08,0x83,0x08,0x83, +0x05,0x83,0x07,0x84,0x08,0x82,0x05,0x82,0x06,0x83,0x04,0x83,0x09,0x82,0x0a, +0x82,0x11,0x82,0x0e,0x82,0x0b,0x82,0x36,0x82,0x05,0x83,0x05,0x83,0x04,0x82, +0x07,0x82,0x05,0x82,0x06,0x82,0x04,0x83,0x06,0x82,0x10,0x82,0x0a,0x82,0x04, +0x83,0x06,0x82,0x05,0x82,0x09,0x82,0x0e,0x82,0x0a,0x82,0x03,0x82,0x0a,0x82, +0x07,0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x07,0x82,0x04,0x83,0x06, +0x82,0x05,0x82,0x06,0x82,0x04,0x83,0x08,0x82,0x0a,0x83,0x04,0x82,0x08,0x82, +0x03,0x82,0x06,0x83,0x04,0x83,0x08,0x83,0x09,0x82,0x04,0x83,0x08,0x82,0x03, +0x82,0x09,0x83,0x0b,0x82,0x0f,0x82,0x0d,0x82,0x0d,0x83,0x38,0x82,0x1a,0x81, +0x03,0x82,0x09,0x88,0x08,0x81,0x04,0x82,0x02,0x82,0x03,0x83,0x02,0x85,0x17, +0x82,0x0d,0x82,0x29,0x82,0x1d,0x82,0x0c,0x82,0x0c,0x83,0x02,0x83,0x0a,0x83, +0x09,0x89,0x06,0x84,0x01,0x83,0x0c,0x83,0x07,0x84,0x01,0x83,0x08,0x83,0x01, +0x83,0x09,0x82,0x0b,0x84,0x01,0x83,0x07,0x82,0x02,0x84,0x09,0x82,0x0d,0x82, +0x13,0x81,0x15,0x82,0x10,0x82,0x08,0x81,0x0f,0x82,0x08,0x82,0x03,0x8a,0x06, +0x83,0x02,0x84,0x05,0x89,0x07,0x89,0x06,0x82,0x0d,0x84,0x02,0x84,0x03,0x82, +0x08,0x82,0x06,0x86,0x09,0x83,0x01,0x83,0x07,0x82,0x06,0x83,0x04,0x8a,0x02, +0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x07,0x83,0x04,0x89,0x05,0x82,0x0e,0x8a, +0x04,0x82,0x07,0x82,0x05,0x84,0x02,0x83,0x09,0x83,0x09,0x84,0x01,0x84,0x08, +0x83,0x09,0x82,0x05,0x82,0x06,0x82,0x06,0x82,0x09,0x82,0x09,0x8b,0x09,0x82, +0x0f,0x82,0x0a,0x82,0x37,0x89,0x05,0x88,0x08,0x88,0x07,0x89,0x06,0x84,0x02, +0x82,0x0a,0x82,0x0a,0x89,0x06,0x82,0x05,0x82,0x06,0x88,0x0b,0x82,0x0a,0x82, +0x04,0x82,0x06,0x88,0x04,0x82,0x04,0x82,0x04,0x82,0x03,0x82,0x05,0x82,0x07, +0x84,0x01,0x83,0x07,0x84,0x01,0x83,0x07,0x83,0x02,0x84,0x08,0x82,0x0b,0x83, +0x02,0x83,0x08,0x87,0x06,0x8a,0x08,0x83,0x09,0x82,0x05,0x82,0x07,0x83,0x03, +0x83,0x08,0x83,0x0a,0x89,0x09,0x82,0x0d,0x82,0x0d,0x83,0x38,0x82,0x1a,0x81, +0x03,0x82,0x0a,0x86,0x0f,0x84,0x05,0x86,0x01,0x83,0x16,0x82,0x0d,0x82,0x29, +0x82,0x1d,0x82,0x0c,0x82,0x0d,0x86,0x0b,0x83,0x09,0x89,0x07,0x86,0x0d,0x83, +0x08,0x86,0x0a,0x85,0x0a,0x82,0x0c,0x86,0x08,0x86,0x0b,0x82,0x0d,0x82,0x3b, +0x82,0x09,0x81,0x0e,0x82,0x08,0x82,0x03,0x89,0x08,0x86,0x07,0x88,0x08,0x89, +0x06,0x82,0x0e,0x87,0x05,0x82,0x08,0x82,0x06,0x86,0x0a,0x85,0x08,0x82,0x07, +0x82,0x04,0x8a,0x02,0x82,0x0a,0x82,0x03,0x82,0x07,0x83,0x05,0x86,0x07,0x82, +0x0f,0x86,0x01,0x83,0x03,0x82,0x07,0x82,0x07,0x86,0x0a,0x83,0x0a,0x87,0x0a, +0x82,0x09,0x82,0x06,0x81,0x05,0x83,0x06,0x83,0x08,0x82,0x09,0x8b,0x09,0x82, +0x0f,0x82,0x0a,0x82,0x37,0x85,0x02,0x82,0x05,0x81,0x01,0x85,0x0b,0x85,0x09, +0x85,0x01,0x82,0x08,0x86,0x0a,0x82,0x0b,0x85,0x01,0x82,0x06,0x82,0x05,0x82, +0x06,0x88,0x0b,0x82,0x0a,0x82,0x04,0x83,0x05,0x88,0x04,0x82,0x04,0x82,0x04, +0x82,0x03,0x82,0x05,0x82,0x09,0x85,0x08,0x87,0x09,0x85,0x01,0x82,0x08,0x82, +0x0c,0x86,0x0a,0x84,0x09,0x86,0x01,0x82,0x09,0x82,0x0a,0x81,0x05,0x82,0x07, +0x82,0x05,0x82,0x08,0x83,0x0a,0x89,0x09,0x82,0x0d,0x82,0x0d,0x82,0x68,0x81, +0x3b,0x82,0x0b,0x82,0x2a,0x82,0x2a,0x82,0x7f,0x35,0x82,0x46,0x83,0x7f,0x7f, +0x08,0x82,0x7f,0x10,0x82,0x10,0x82,0x09,0x82,0x18,0x8a,0x76,0x82,0x28,0x82, +0x54,0x82,0x14,0x82,0x71,0x82,0x1d,0x82,0x0d,0x82,0x0d,0x82,0x68,0x81,0x3b, +0x82,0x0b,0x82,0x2a,0x82,0x2a,0x82,0x7f,0x35,0x82,0x48,0x86,0x7f,0x7f,0x7f, +0x15,0x84,0x0e,0x82,0x07,0x84,0x18,0x8a,0x76,0x82,0x28,0x82,0x54,0x82,0x14, +0x82,0x71,0x82,0x1d,0x83,0x0c,0x82,0x0d,0x82,0x7f,0x26,0x82,0x09,0x82,0x2b, +0x81,0x7f,0x62,0x81,0x7f,0x7f,0x7f,0x64,0x84,0x17,0x84,0x7f,0x12,0x82,0x04, +0x82,0x28,0x83,0x54,0x82,0x14,0x82,0x70,0x83,0x1e,0x83,0x0b,0x82,0x0c,0x82, +0x7f,0x28,0x82,0x07,0x82,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x27,0x88,0x26, +0x84,0x55,0x82,0x14,0x82,0x6e,0x84,0x21,0x81,0x0b,0x82,0x0c,0x81,0x7f,0x2a, +0x81,0x07,0x81,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x2a,0x84,0x28,0x83,0x7f, +0x5d,0x83,0x64, +0x00, + } +}; diff --git a/ui.c b/ui.c index 1df42ad..b616639 100644 --- a/ui.c +++ b/ui.c @@ -47,12 +47,23 @@ static int gShowBackButton = 0; #define MENU_MAX_COLS 64 #define MENU_MAX_ROWS 250 -#ifndef BOARD_LDPI_RECOVERY +#if defined(BOARD_XHDPI_RECOVERY) + #ifdef BOARD_USE_CUSTOM_FONT // only use big font if we want custom + #define CHAR_WIDTH 15 + #define CHAR_HEIGHT 24 + #else + #define CHAR_WIDTH 10 + #define CHAR_HEIGHT 18 + #endif +#elif defined(BOARD_HDPI_RECOVERY) #define CHAR_WIDTH 10 #define CHAR_HEIGHT 18 -#else +#elif defined(BOARD_LDPI_RECOVERY) #define CHAR_WIDTH 7 #define CHAR_HEIGHT 16 +#else + #define CHAR_WIDTH 10 + #define CHAR_HEIGHT 18 #endif #define UI_WAIT_KEY_TIMEOUT_SEC 3600 From 4f78176329ed3061a5eb723313209978e4af1bd7 Mon Sep 17 00:00:00 2001 From: CEnnis91 Date: Sat, 14 Jan 2012 23:51:58 -0500 Subject: [PATCH 06/23] Misc tweaks / bug fixes - readd "power off" to the main menu - fix bug where stdout overflows into menu text - remove +++++Go Back+++++ from main menu as there is nothing to go back to (detects menu depth) Change-Id: Icb84ac86e55712412d07add0ab76955d7902f07c --- default_recovery_keys.c | 10 +++++++--- default_recovery_ui.c | 1 + recovery.c | 10 +++++++--- recovery_ui.h | 3 +++ ui.c | 20 ++++++++++++++------ 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/default_recovery_keys.c b/default_recovery_keys.c index 4ba8701..fd0ef74 100644 --- a/default_recovery_keys.c +++ b/default_recovery_keys.c @@ -36,8 +36,9 @@ int device_handle_key(int key_code, int visible) { if (ui_get_showing_back_button()) { return SELECT_ITEM; } - if (!get_allow_toggle_display()) + if (!get_allow_toggle_display() && ui_menu_level > 0) { return GO_BACK; + } break; case KEY_LEFTBRACE: case KEY_ENTER: @@ -53,10 +54,13 @@ int device_handle_key(int key_code, int visible) { if (ui_get_showing_back_button()) { return SELECT_ITEM; } - if (!get_allow_toggle_display()) + if (!get_allow_toggle_display() && ui_menu_level > 0) { return GO_BACK; + } case KEY_BACK: - return GO_BACK; + if (ui_menu_level > 0) { + return GO_BACK; + } } } diff --git a/default_recovery_ui.c b/default_recovery_ui.c index be8b7e8..f161d04 100644 --- a/default_recovery_ui.c +++ b/default_recovery_ui.c @@ -29,6 +29,7 @@ char* MENU_ITEMS[] = { "reboot system now", "backup and restore", "mounts and storage", "advanced", + "power off", NULL }; void device_ui_init(UIParameters* ui_parameters) { diff --git a/recovery.c b/recovery.c index 383790e..fe28d34 100644 --- a/recovery.c +++ b/recovery.c @@ -434,7 +434,8 @@ get_menu_selection(char** headers, char** items, int menu_only, // throw away keys pressed previously, so user doesn't // accidentally trigger menu items. ui_clear_key_queue(); - + + ++ui_menu_level; int item_count = ui_start_menu(headers, items, initial_selection); int selected = initial_selection; int chosen_item = -1; @@ -475,7 +476,8 @@ get_menu_selection(char** headers, char** items, int menu_only, case SELECT_ITEM: chosen_item = selected; if (ui_get_showing_back_button()) { - if (chosen_item == item_count) { + if (chosen_item == item_count-1) { + --ui_menu_level; chosen_item = GO_BACK; } } @@ -483,6 +485,7 @@ get_menu_selection(char** headers, char** items, int menu_only, case NO_ACTION: break; case GO_BACK: + --ui_menu_level; chosen_item = GO_BACK; break; } @@ -693,7 +696,8 @@ prompt_and_wait() { for (;;) { finish_recovery(NULL); ui_reset_progress(); - + + ui_menu_level = -1; allow_display_toggle = 1; int chosen_item = get_menu_selection(headers, MENU_ITEMS, 0, 0); allow_display_toggle = 0; diff --git a/recovery_ui.h b/recovery_ui.h index ec5f4fa..44e9e06 100644 --- a/recovery_ui.h +++ b/recovery_ui.h @@ -90,6 +90,9 @@ extern char* MENU_HEADERS[]; // Text of menu items. extern char* MENU_ITEMS[]; +// Loosely track the depth of the current menu +int ui_menu_level; + int get_menu_selection(char** headers, char** items, int menu_only, int initial_selection); diff --git a/ui.c b/ui.c index b616639..c048948 100644 --- a/ui.c +++ b/ui.c @@ -237,6 +237,7 @@ static void draw_screen_locked(void) int i = 0; int j = 0; + int offset = 0; // offset of separating bar under menus int row = 0; // current row that we are drawing on if (show_menu) { gr_color(MENU_TEXT_COLOR); @@ -266,8 +267,12 @@ static void draw_screen_locked(void) } row++; } - gr_fill(0, row*CHAR_HEIGHT+CHAR_HEIGHT/2-1, - gr_fb_width(), row*CHAR_HEIGHT+CHAR_HEIGHT/2+1); + + if (menu_items <= MAX_ROWS) + offset = 1; + + gr_fill(0, (row-offset)*CHAR_HEIGHT+CHAR_HEIGHT/2-1, + gr_fb_width(), (row-offset)*CHAR_HEIGHT+CHAR_HEIGHT/2+1); } gr_color(NORMAL_TEXT_COLOR); @@ -652,10 +657,13 @@ int ui_start_menu(char** headers, char** items, int initial_selection) { menu[i][text_cols-1] = '\0'; } - if (gShowBackButton) { + if (gShowBackButton && ui_menu_level > 0) { strcpy(menu[i], " - +++++Go Back+++++"); ++i; } + + strcpy(menu[i], " "); + ++i; menu_items = i - menu_top; show_menu = 1; @@ -663,7 +671,7 @@ int ui_start_menu(char** headers, char** items, int initial_selection) { update_screen_locked(); } pthread_mutex_unlock(&gUpdateMutex); - if (gShowBackButton) { + if (gShowBackButton && ui_menu_level > 0) { return menu_items - 1; } return menu_items; @@ -676,8 +684,8 @@ int ui_menu_select(int sel) { old_sel = menu_sel; menu_sel = sel; - if (menu_sel < 0) menu_sel = menu_items + menu_sel; - if (menu_sel >= menu_items) menu_sel = menu_sel - menu_items; + if (menu_sel < 0) menu_sel = menu_items-1 + menu_sel; + if (menu_sel >= menu_items-1) menu_sel = menu_sel - menu_items+1; if (menu_sel < menu_show_start && menu_show_start > 0) { From cd3705e4aba68274f7033a32bfc0d9b1010a4513 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 15:09:08 -0800 Subject: [PATCH 07/23] remove power off. not useful in the main menu. Change-Id: I8923d1e878994c3516798118961b4cdaa82ddc88 --- default_recovery_ui.c | 1 - 1 file changed, 1 deletion(-) diff --git a/default_recovery_ui.c b/default_recovery_ui.c index f161d04..be8b7e8 100644 --- a/default_recovery_ui.c +++ b/default_recovery_ui.c @@ -29,7 +29,6 @@ char* MENU_ITEMS[] = { "reboot system now", "backup and restore", "mounts and storage", "advanced", - "power off", NULL }; void device_ui_init(UIParameters* ui_parameters) { From aa3c3d429bbbe12ee30ade7edd683d6e4884cb45 Mon Sep 17 00:00:00 2001 From: Pawit Pornkitprasan Date: Tue, 6 Dec 2011 16:19:32 +0700 Subject: [PATCH 08/23] Respect volume length when formatting ext4 when restoring This is needed for device encryption to work properly (there must be space for a 16 KB footer at the end of the partition, which is usually specified by the length option). And yes, the old signature of make_ext4fs was wrong, but worked anyway because the related header was not included and the compiler let it pass an as implicit delcaration. Change-Id: Ied7ec70bebc120cc2917771f59eeaeb7ea76bf8d --- extendedcommands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extendedcommands.c b/extendedcommands.c index af67c3e..43d449a 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -25,6 +25,7 @@ #include "cutils/properties.h" #include "firmware.h" #include "install.h" +#include "make_ext4fs.h" #include "minui/minui.h" #include "minzip/DirUtil.h" #include "roots.h" @@ -507,8 +508,13 @@ int format_device(const char *device, const char *path, const char *fs_type) { } if (strcmp(fs_type, "ext4") == 0) { + int length = 0; + if (strcmp(v->fs_type, "ext4") == 0) { + // Our desired filesystem matches the one in fstab, respect v->length + length = v->length; + } reset_ext4fs_info(); - int result = make_ext4fs(device, NULL, NULL, 0, 0, 0); + int result = make_ext4fs(device, length); if (result != 0) { LOGE("format_volume: make_extf4fs failed on %s\n", device); return -1; From 5617056cb8f2dea16bac03053b8c9b802773408c Mon Sep 17 00:00:00 2001 From: Danesh Mondegarian Date: Tue, 11 Oct 2011 16:52:23 -0400 Subject: [PATCH 09/23] Recovery : Show menu if in non user initiated mode and error occurred When using rom manager and applying a zip, if one encounters an error in recovery, they're left on a screen with no visible controls (Forcing to hard reset phone). Change-Id: Ia9b2f396fc95c7972a5a5580e1a50adf4af26060 --- recovery.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recovery.c b/recovery.c index fe28d34..3fe7ae2 100644 --- a/recovery.c +++ b/recovery.c @@ -903,7 +903,10 @@ main(int argc, char **argv) { } } - if (status != INSTALL_SUCCESS && !is_user_initiated_recovery) ui_set_background(BACKGROUND_ICON_ERROR); + if (status != INSTALL_SUCCESS && !is_user_initiated_recovery) { + ui_set_show_text(1); + ui_set_background(BACKGROUND_ICON_ERROR); + } if (status != INSTALL_SUCCESS || ui_text_visible()) { prompt_and_wait(); } From b20a4812ba28f55b3a5052c9d619e3f0a365392f Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 15:29:08 -0800 Subject: [PATCH 10/23] reversed the logic Change-Id: I62c104ee0c9218f929c10eda31f4bf5828b0de22 --- extendedcommands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extendedcommands.c b/extendedcommands.c index 43d449a..8bd447a 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -694,7 +694,7 @@ void show_partition_menu() options[mountable_volumes+i] = e->txt; } - if (is_data_media()) { + if (!is_data_media()) { options[mountable_volumes + formatable_volumes] = "mount USB storage"; options[mountable_volumes + formatable_volumes + 1] = NULL; } From 18e3f62ad27c28b66f7eba52430af547f917b61e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 16:49:33 -0800 Subject: [PATCH 11/23] Fix up the mess around fonts and defines. Change-Id: I3df3dae482ac6f8e9ddcbe2946dba43428bf46b1 --- Android.mk | 11 ++++++++++- minui/Android.mk | 16 ++-------------- minui/events.c | 3 ++- minui/graphics.c | 22 +++------------------- ui.c | 20 ++------------------ 5 files changed, 19 insertions(+), 53 deletions(-) diff --git a/Android.mk b/Android.mk index 1f97ed0..670ba0c 100644 --- a/Android.mk +++ b/Android.mk @@ -40,7 +40,16 @@ LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" RECOVERY_API_VERSION := 2 LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_MDPI_RECOVERY BOARD_HDPI_RECOVERY BOARD_XHDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_USE_CUSTOM_FONT +ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),) + BOARD_RECOVERY_CHAR_WIDTH := $(shell echo $(BOARD_USE_CUSTOM_RECOVERY_FONT) | cut -d _ -f 2 | cut -d . -f 1 | cut -d x -f 1) + BOARD_RECOVERY_CHAR_HEIGHT := $(shell echo $(BOARD_USE_CUSTOM_RECOVERY_FONT) | cut -d _ -f 2 | cut -d . -f 1 | cut -d x -f 2) +else + BOARD_RECOVERY_CHAR_WIDTH := 10 + BOARD_RECOVERY_CHAR_HEIGHT := 18 +endif +LOCAL_CFLAGS += -DBOARD_RECOVERY_CHAR_WIDTH=$(BOARD_RECOVERY_CHAR_WIDTH) -DBOARD_RECOVERY_CHAR_HEIGHT=$(BOARD_RECOVERY_CHAR_HEIGHT) + +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ diff --git a/minui/Android.mk b/minui/Android.mk index 68cbe29..4d8ae62 100644 --- a/minui/Android.mk +++ b/minui/Android.mk @@ -21,20 +21,8 @@ ifeq ($(TARGET_RECOVERY_PIXEL_FORMAT),"BGRA_8888") LOCAL_CFLAGS += -DRECOVERY_BGRA endif -ifeq ($(BOARD_XHDPI_RECOVERY),true) - LOCAL_CFLAGS += -DBOARD_XHDPI_RECOVERY -endif -ifeq ($(BOARD_HDPI_RECOVERY),true) - LOCAL_CFLAGS += -DBOARD_HDPI_RECOVERY -endif -ifeq ($(BOARD_MDPI_RECOVERY),true) - LOCAL_CFLAGS += -DBOARD_MDPI_RECOVERY -endif -ifeq ($(BOARD_LDPI_RECOVERY),true) - LOCAL_CFLAGS += -DBOARD_LDPI_RECOVERY -endif -ifeq ($(BOARD_USE_CUSTOM_FONT),true) - LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_FONT +ifneq ($(BOARD_USE_CUSTOM_RECOVERY_FONT),) + LOCAL_CFLAGS += -DBOARD_USE_CUSTOM_RECOVERY_FONT=$(BOARD_USE_CUSTOM_RECOVERY_FONT) endif include $(BUILD_STATIC_LIBRARY) diff --git a/minui/events.c b/minui/events.c index 2918afa..a619df6 100644 --- a/minui/events.c +++ b/minui/events.c @@ -23,6 +23,7 @@ #include #include "minui.h" +#include "cutils/log.h" #define MAX_DEVICES 16 #define MAX_MISC_FDS 16 @@ -69,7 +70,7 @@ int ev_init(ev_callback input_cb, void *data) /* TODO: add ability to specify event masks. For now, just assume * that only EV_KEY and EV_REL event types are ever needed. */ - if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_REL, ev_bits)) { + if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_REL, ev_bits) && !test_bit(EV_ABS, ev_bits)) { close(fd); continue; } diff --git a/minui/graphics.c b/minui/graphics.c index d3473db..3183cd1 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -30,26 +30,10 @@ #include -#if defined(BOARD_XHDPI_RECOVERY) - #ifdef BOARD_USE_CUSTOM_FONT - #include "roboto_15x24.h" - #else - #include "font_10x18.h" // only use the big font if we want custom - #endif -#elif defined(BOARD_HDPI_RECOVERY) - #ifdef BOARD_USE_CUSTOM_FONT - #include "roboto_10x18.h" - #else - #include "font_10x18.h" - #endif -#elif defined(BOARD_LDPI_RECOVERY) - #include "font_7x16.h" +#ifdef BOARD_USE_CUSTOM_RECOVERY_FONT +#include BOARD_USE_CUSTOM_RECOVERY_FONT #else - #ifdef BOARD_USE_CUSTOM_FONT - #include "roboto_10x18.h" - #else - #include "font_10x18.h" - #endif +#include "font_10x18.h" #endif #include "minui.h" diff --git a/ui.c b/ui.c index c048948..6db4ef7 100644 --- a/ui.c +++ b/ui.c @@ -47,24 +47,8 @@ static int gShowBackButton = 0; #define MENU_MAX_COLS 64 #define MENU_MAX_ROWS 250 -#if defined(BOARD_XHDPI_RECOVERY) - #ifdef BOARD_USE_CUSTOM_FONT // only use big font if we want custom - #define CHAR_WIDTH 15 - #define CHAR_HEIGHT 24 - #else - #define CHAR_WIDTH 10 - #define CHAR_HEIGHT 18 - #endif -#elif defined(BOARD_HDPI_RECOVERY) - #define CHAR_WIDTH 10 - #define CHAR_HEIGHT 18 -#elif defined(BOARD_LDPI_RECOVERY) - #define CHAR_WIDTH 7 - #define CHAR_HEIGHT 16 -#else - #define CHAR_WIDTH 10 - #define CHAR_HEIGHT 18 -#endif +#define CHAR_WIDTH BOARD_RECOVERY_CHAR_WIDTH +#define CHAR_HEIGHT BOARD_RECOVERY_CHAR_HEIGHT #define UI_WAIT_KEY_TIMEOUT_SEC 3600 From ccc1fdb386129602c309ccca109ed12bc4f035e5 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 16:49:58 -0800 Subject: [PATCH 12/23] derp Change-Id: I5ffece3af80c0c328c61975d46f4de4cb22f2282 --- minui/events.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/minui/events.c b/minui/events.c index a619df6..2918afa 100644 --- a/minui/events.c +++ b/minui/events.c @@ -23,7 +23,6 @@ #include #include "minui.h" -#include "cutils/log.h" #define MAX_DEVICES 16 #define MAX_MISC_FDS 16 @@ -70,7 +69,7 @@ int ev_init(ev_callback input_cb, void *data) /* TODO: add ability to specify event masks. For now, just assume * that only EV_KEY and EV_REL event types are ever needed. */ - if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_REL, ev_bits) && !test_bit(EV_ABS, ev_bits)) { + if (!test_bit(EV_KEY, ev_bits) && !test_bit(EV_REL, ev_bits)) { close(fd); continue; } From 3cdfd138fa7008182c713de8ac3dc86685f9e46e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 26 Jan 2012 22:56:00 -0800 Subject: [PATCH 13/23] Various fixes to fix rendering of text. There will always be 3 lines of log shown. The menu can have long items in it now, rather than being truncated. The log text will be bottom aligned. Change-Id: I09289e053c8ab673814318da55302efaab0404de derp Change-Id: I3fc31f5ea311c73c0ec999aa77d3fa0d01238001 --- ui.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/ui.c b/ui.c index 6db4ef7..363019a 100644 --- a/ui.c +++ b/ui.c @@ -33,6 +33,8 @@ #include "minui/minui.h" #include "recovery_ui.h" +#include "touch.h" + extern int __system(const char *command); #ifdef BOARD_HAS_NO_SELECT_BUTTON @@ -47,6 +49,8 @@ static int gShowBackButton = 0; #define MENU_MAX_COLS 64 #define MENU_MAX_ROWS 250 +#define MIN_LOG_ROWS 3 + #define CHAR_WIDTH BOARD_RECOVERY_CHAR_WIDTH #define CHAR_HEIGHT BOARD_RECOVERY_CHAR_HEIGHT @@ -106,6 +110,7 @@ static char menu[MENU_MAX_ROWS][MENU_MAX_COLS]; static int show_menu = 0; static int menu_top = 0, menu_items = 0, menu_sel = 0; static int menu_show_start = 0; // this is line which menu display is starting at +static int max_menu_rows; // Key event input queue static pthread_mutex_t key_queue_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -219,6 +224,7 @@ static void draw_screen_locked(void) gr_color(0, 0, 0, 160); gr_fill(0, 0, gr_fb_width(), gr_fb_height()); + int total_rows = gr_fb_height() / CHAR_HEIGHT; int i = 0; int j = 0; int offset = 0; // offset of separating bar under menus @@ -250,6 +256,8 @@ static void draw_screen_locked(void) draw_text_line(i - menu_show_start, menu[i]); } row++; + if (row == max_menu_rows) + break; } if (menu_items <= MAX_ROWS) @@ -260,8 +268,17 @@ static void draw_screen_locked(void) } gr_color(NORMAL_TEXT_COLOR); - for (; row < text_rows; ++row) { - draw_text_line(row, text[(row+text_top) % text_rows]); + int cur_row = text_row; + int available_rows = total_rows - row - 1; + int start_row = row + 1; + if (available_rows < MAX_ROWS) + cur_row = (cur_row + (MAX_ROWS - available_rows)) % MAX_ROWS; + else + start_row = total_rows - MAX_ROWS; + + int r; + for (r = 0; r < (available_rows < MAX_ROWS ? available_rows : MAX_ROWS); r++) { + draw_text_line(start_row + r, text[(cur_row + r) % MAX_ROWS]); } } } @@ -351,6 +368,9 @@ static int input_callback(int fd, short revents, void *data) if (ret) return -1; + if (touch_handle_input(ev)) + return 0; + if (ev.type == EV_SYN) { return 0; } else if (ev.type == EV_REL) { @@ -425,9 +445,11 @@ void ui_init(void) ui_has_initialized = 1; gr_init(); ev_init(input_callback, NULL); + touch_init(gr_fb_width(), gr_fb_height(), key_pressed, key_queue, &key_queue_len, &key_queue_mutex, &key_queue_cond); text_col = text_row = 0; text_rows = gr_fb_height() / CHAR_HEIGHT; + max_menu_rows = text_rows - MIN_LOG_ROWS; if (text_rows > MAX_ROWS) text_rows = MAX_ROWS; text_top = 1; @@ -637,8 +659,8 @@ int ui_start_menu(char** headers, char** items, int initial_selection) { for (; i < MENU_MAX_ROWS; ++i) { if (items[i-menu_top] == NULL) break; strcpy(menu[i], MENU_ITEM_HEADER); - strncpy(menu[i] + MENU_ITEM_HEADER_LENGTH, items[i-menu_top], text_cols-1 - MENU_ITEM_HEADER_LENGTH); - menu[i][text_cols-1] = '\0'; + strncpy(menu[i] + MENU_ITEM_HEADER_LENGTH, items[i-menu_top], MENU_MAX_COLS - 1 - MENU_ITEM_HEADER_LENGTH); + menu[i][MENU_MAX_COLS-1] = '\0'; } if (gShowBackButton && ui_menu_level > 0) { @@ -676,8 +698,8 @@ int ui_menu_select(int sel) { menu_show_start = menu_sel; } - if (menu_sel - menu_show_start + menu_top >= text_rows) { - menu_show_start = menu_sel + menu_top - text_rows + 1; + if (menu_sel - menu_show_start + menu_top >= max_menu_rows) { + menu_show_start = menu_sel + menu_top - max_menu_rows + 1; } sel = menu_sel; From 67e73e1559ccd314e9cadde619b39705ec421698 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 27 Jan 2012 02:46:19 -0800 Subject: [PATCH 14/23] fix build Change-Id: Iac099f5a275b9633ed30d9e4a84acb99a57c4434 --- ui.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui.c b/ui.c index 363019a..3a82ab1 100644 --- a/ui.c +++ b/ui.c @@ -33,8 +33,6 @@ #include "minui/minui.h" #include "recovery_ui.h" -#include "touch.h" - extern int __system(const char *command); #ifdef BOARD_HAS_NO_SELECT_BUTTON From 638103922f5424553109b0b417d6b304d3db4a4a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 27 Jan 2012 02:58:40 -0800 Subject: [PATCH 15/23] more derpage Change-Id: I878386195a408d2a98137816515f5eaaa52ccf79 --- ui.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ui.c b/ui.c index 3a82ab1..a3cce50 100644 --- a/ui.c +++ b/ui.c @@ -366,9 +366,6 @@ static int input_callback(int fd, short revents, void *data) if (ret) return -1; - if (touch_handle_input(ev)) - return 0; - if (ev.type == EV_SYN) { return 0; } else if (ev.type == EV_REL) { @@ -443,7 +440,6 @@ void ui_init(void) ui_has_initialized = 1; gr_init(); ev_init(input_callback, NULL); - touch_init(gr_fb_width(), gr_fb_height(), key_pressed, key_queue, &key_queue_len, &key_queue_mutex, &key_queue_cond); text_col = text_row = 0; text_rows = gr_fb_height() / CHAR_HEIGHT; From e2a66586a329b20cea32fedc94d1ccdd7484073b Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Sun, 29 Jan 2012 14:02:39 -0800 Subject: [PATCH 16/23] fix up key value parsing Change-Id: I05e821cd1215c44be780694644e568676fd67565 --- roots.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roots.c b/roots.c index 9a43bb4..ea97c7a 100644 --- a/roots.c +++ b/roots.c @@ -65,11 +65,11 @@ static int parse_options(char* options, Volume* volume) { volume->length = strtoll(option+7, NULL, 10); } else if (strncmp(option, "fstype2=", 8) == 0) { volume->fs_type2 = volume->fs_type; - volume->fs_type = strdup(option); + volume->fs_type = strdup(option + 8); } else if (strncmp(option, "fs_options=", 11) == 0) { - volume->fs_options = strdup(option); + volume->fs_options = strdup(option + 11); } else if (strncmp(option, "fs_options2=", 12) == 0) { - volume->fs_options2 = strdup(option); + volume->fs_options2 = strdup(option + 12); } else { LOGE("bad option \"%s\"\n", option); return -1; From a465962667a4567e57e35f5193eb4fbd2b98e938 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 30 Jan 2012 00:49:43 -0800 Subject: [PATCH 17/23] use source built e2fsprogs! thanks cvpcs! Change-Id: Id3067d4da53643ae1af0b9f15445262afda7b197 --- Android.mk | 9 ++----- extendedcommands.c | 2 -- mmcutils/Android.mk | 4 --- mmcutils/mmcutils.c | 5 ---- utilities/Android.mk | 58 +++++++++++++++++++------------------------- 5 files changed, 27 insertions(+), 51 deletions(-) diff --git a/Android.mk b/Android.mk index 670ba0c..be4c668 100644 --- a/Android.mk +++ b/Android.mk @@ -49,7 +49,7 @@ else endif LOCAL_CFLAGS += -DBOARD_RECOVERY_CHAR_WIDTH=$(BOARD_RECOVERY_CHAR_WIDTH) -DBOARD_RECOVERY_CHAR_HEIGHT=$(BOARD_RECOVERY_CHAR_HEIGHT) -BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT +BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES BOARD_RECOVERY_HANDLES_MOUNT BOARD_TOUCH_RECOVERY $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ $(if $($(board_define)), \ @@ -109,12 +109,7 @@ ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_SYMLINKS) # Now let's do recovery symlinks BUSYBOX_LINKS := $(shell cat external/busybox/busybox-minimal.links) -ifndef BOARD_HAS_SMALL_RECOVERY -exclude := tune2fs -ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) -exclude += mke2fs -endif -endif +exclude := tune2fs mke2fs RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS)))) $(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox $(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) diff --git a/extendedcommands.c b/extendedcommands.c index 8bd447a..845626a 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -912,12 +912,10 @@ void show_advanced_menu() "Report Error", "Key Test", "Show log", -#ifndef BOARD_HAS_SMALL_RECOVERY "Partition SD Card", "Fix Permissions", #ifdef BOARD_HAS_SDCARD_INTERNAL "Partition Internal SD Card", -#endif #endif NULL }; diff --git a/mmcutils/Android.mk b/mmcutils/Android.mk index 0046dc9..f1fe294 100644 --- a/mmcutils/Android.mk +++ b/mmcutils/Android.mk @@ -4,10 +4,6 @@ ifeq ($(TARGET_ARCH),arm) LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) -LOCAL_CFLAGS += -DBOARD_HAS_LARGE_FILESYSTEM -endif - LOCAL_SRC_FILES := \ mmcutils.c diff --git a/mmcutils/mmcutils.c b/mmcutils/mmcutils.c index 492dadc..f9c7b70 100644 --- a/mmcutils/mmcutils.c +++ b/mmcutils/mmcutils.c @@ -340,13 +340,8 @@ run_exec_process ( char **argv) { int format_ext3_device (const char *device) { -#ifdef BOARD_HAS_LARGE_FILESYSTEM char *const mke2fs[] = {MKE2FS_BIN, "-j", "-q", device, NULL}; char *const tune2fs[] = {TUNE2FS_BIN, "-C", "1", device, NULL}; -#else - char *const mke2fs[] = {MKE2FS_BIN, "-j", device, NULL}; - char *const tune2fs[] = {TUNE2FS_BIN, "-j", "-C", "1", device, NULL}; -#endif // Run mke2fs if(run_exec_process(mke2fs)) { printf("failure while running mke2fs\n"); diff --git a/utilities/Android.mk b/utilities/Android.mk index dc7630f..2a6ca9a 100755 --- a/utilities/Android.mk +++ b/utilities/Android.mk @@ -1,8 +1,5 @@ LOCAL_PATH := $(call my-dir) -ifndef BOARD_HAS_SMALL_RECOVERY - - include $(CLEAR_VARS) LOCAL_MODULE := fix_permissions LOCAL_MODULE_TAGS := optional @@ -27,38 +24,33 @@ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) -endif +# include $(CLEAR_VARS) +# LOCAL_MODULE := e2fsck +# LOCAL_MODULE_TAGS := optional +# LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +# LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +# LOCAL_SRC_FILES := $(LOCAL_MODULE) +# include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := e2fsck -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin -LOCAL_SRC_FILES := $(LOCAL_MODULE) -include $(BUILD_PREBUILT) +# include $(CLEAR_VARS) +# LOCAL_MODULE := tune2fs +# LOCAL_MODULE_TAGS := optional +# LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +# LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +# LOCAL_SRC_FILES := $(LOCAL_MODULE) +# include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := tune2fs -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin -LOCAL_SRC_FILES := $(LOCAL_MODULE) -include $(BUILD_PREBUILT) - -ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) -include $(CLEAR_VARS) -LOCAL_MODULE := mke2fs -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin -ifeq ($(BOARD_MKE2FS),) -LOCAL_SRC_FILES := $(LOCAL_MODULE) -else -LOCAL_SRC_FILES := ../../../$(BOARD_MKE2FS) -endif -include $(BUILD_PREBUILT) -endif +# include $(CLEAR_VARS) +# LOCAL_MODULE := mke2fs +# LOCAL_MODULE_TAGS := optional +# LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES +# LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +# ifeq ($(BOARD_MKE2FS),) +# LOCAL_SRC_FILES := $(LOCAL_MODULE) +# else +# LOCAL_SRC_FILES := ../../../$(BOARD_MKE2FS) +# endif +# include $(BUILD_PREBUILT) BOARD_RECOVERY_RFS_CHECK := $(shell grep rfs $(TARGET_DEVICE_DIR)/recovery.fstab) ifneq ($(BOARD_RECOVERY_RFS_CHECK),) From 1c50ff29e69c4df6c6459e12942d62237e028b34 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 31 Jan 2012 20:02:38 -0800 Subject: [PATCH 18/23] Fix ui menu bug for long menus. Change-Id: If009dee6b7597daeec62dd65baa7ad35e1adec5d Conflicts: ui.c --- ui.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui.c b/ui.c index a3cce50..a56d8c0 100644 --- a/ui.c +++ b/ui.c @@ -238,8 +238,8 @@ static void draw_screen_locked(void) row++; } - if (menu_items - menu_show_start + menu_top >= MAX_ROWS) - j = MAX_ROWS - menu_top; + if (menu_items - menu_show_start + menu_top >= max_menu_rows) + j = max_menu_rows - menu_top; else j = menu_items - menu_show_start; @@ -254,13 +254,13 @@ static void draw_screen_locked(void) draw_text_line(i - menu_show_start, menu[i]); } row++; - if (row == max_menu_rows) + if (row >= max_menu_rows) break; } - if (menu_items <= MAX_ROWS) + if (menu_items <= max_menu_rows) offset = 1; - + gr_fill(0, (row-offset)*CHAR_HEIGHT+CHAR_HEIGHT/2-1, gr_fb_width(), (row-offset)*CHAR_HEIGHT+CHAR_HEIGHT/2+1); } @@ -444,6 +444,8 @@ void ui_init(void) text_col = text_row = 0; text_rows = gr_fb_height() / CHAR_HEIGHT; max_menu_rows = text_rows - MIN_LOG_ROWS; + if (max_menu_rows > MENU_MAX_ROWS) + max_menu_rows = MENU_MAX_ROWS; if (text_rows > MAX_ROWS) text_rows = MAX_ROWS; text_top = 1; From d87b8df56d33c24e46c411580e25aeab078528b7 Mon Sep 17 00:00:00 2001 From: Robert Burns Date: Mon, 13 Feb 2012 15:28:38 -0500 Subject: [PATCH 19/23] Remove random offset message during installation Change-Id: I2281a571e37ba9fac2b99806ce9c63e591b4d39f --- updater/install.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/updater/install.c b/updater/install.c index eef6ff1..c9d21f2 100644 --- a/updater/install.c +++ b/updater/install.c @@ -478,8 +478,6 @@ Value* RetouchBinariesFn(const char* name, State* state, fclose(f_random); } random_base = (random_base + random_bits) % 1024; - fprintf(ui->cmd_pipe, "ui_print Random offset: 0x%x\n", random_base); - fprintf(ui->cmd_pipe, "ui_print\n"); // make sure we never randomize to zero; this let's us look at a file // and know for sure whether it has been processed; important in the From 21b8a1230002fc9b2d673086838aed97a41cf7c5 Mon Sep 17 00:00:00 2001 From: IEF Date: Wed, 7 Mar 2012 16:50:26 +0100 Subject: [PATCH 20/23] Always call set_bootloader_message(), not just for MTD-devices. set_bootloader_message has a built-in check for MTD/eMMC via fstab. --- recovery.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/recovery.c b/recovery.c index 3fe7ae2..07fea5a 100644 --- a/recovery.c +++ b/recovery.c @@ -220,9 +220,7 @@ get_args(int *argc, char ***argv) { strlcat(boot.recovery, (*argv)[i], sizeof(boot.recovery)); strlcat(boot.recovery, "\n", sizeof(boot.recovery)); } - if (device_flash_type() == MTD) { - set_bootloader_message(&boot); - } + set_bootloader_message(&boot); } void @@ -284,12 +282,10 @@ finish_recovery(const char *send_intent) { copy_log_file(LAST_LOG_FILE, false); chmod(LAST_LOG_FILE, 0640); - if (device_flash_type() == MTD) { - // Reset to mormal system boot so recovery won't cycle indefinitely. - struct bootloader_message boot; - memset(&boot, 0, sizeof(boot)); - set_bootloader_message(&boot); - } + // Reset to normal system boot so recovery won't cycle indefinitely. + struct bootloader_message boot; + memset(&boot, 0, sizeof(boot)); + set_bootloader_message(&boot); // Remove the command file, so recovery won't repeat indefinitely. if (ensure_path_mounted(COMMAND_FILE) != 0 || From 08bedb21d87dede99f1e89a4869609389bb7cee7 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 10 Apr 2012 13:23:33 -0700 Subject: [PATCH 21/23] remove copyright, switch to AOSP license Change-Id: I53485386d68726f5c0596ac842e6a480d4463b74 --- edifyscripting.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/edifyscripting.c b/edifyscripting.c index e66df2b..4413114 100644 --- a/edifyscripting.c +++ b/edifyscripting.c @@ -1,6 +1,18 @@ -// Copyright ClockworkMod, LLC. Reference and porting purposes only. Usage of the extendedcommand API -// is restricted to those granted explicit permission, or by use of the ROM Manager Recovery API. -// https://github.com/koush/TestRomManager +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ #include #include #include From 9a7615326e8f18288614dacee454ef7ca02645ce Mon Sep 17 00:00:00 2001 From: eaut Date: Sat, 5 May 2012 16:39:40 +0200 Subject: [PATCH 22/23] use TARGET_RECOVERY_FSTAB location if defined If TARGET_RECOVERY_FSTAB is defined use this location to find recovery.fstab Change-Id: Ic4cd26f5be064586359f39ff82d7f9b09ce57f53 --- utilities/Android.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utilities/Android.mk b/utilities/Android.mk index 2a6ca9a..0b0ef7c 100755 --- a/utilities/Android.mk +++ b/utilities/Android.mk @@ -52,7 +52,12 @@ include $(BUILD_PREBUILT) # endif # include $(BUILD_PREBUILT) -BOARD_RECOVERY_RFS_CHECK := $(shell grep rfs $(TARGET_DEVICE_DIR)/recovery.fstab) +ifneq ($(TARGET_RECOVERY_FSTAB),) + BOARD_RECOVERY_RFS_CHECK := $(shell grep rfs $(TARGET_RECOVERY_FSTAB)) +else + BOARD_RECOVERY_RFS_CHECK := $(shell grep rfs $(TARGET_DEVICE_DIR)/recovery.fstab) +endif + ifneq ($(BOARD_RECOVERY_RFS_CHECK),) include $(CLEAR_VARS) LOCAL_MODULE := fat.format From 8ba9a6335becb20598187a3523dc94aab0456284 Mon Sep 17 00:00:00 2001 From: Evan McClain Date: Fri, 18 May 2012 01:28:26 -0400 Subject: [PATCH 23/23] Fix build on gcc 4.6. Several programs were not linked against libcrecovery which has the __system function. Change-Id: I12b33a9157ab74825129896d0f2177fa83638464 Signed-off-by: Evan McClain --- bmlutils/Android.mk | 3 +++ bmlutils/bmlutils.c | 3 ++- flashutils/Android.mk | 6 +++--- updater/Android.mk | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bmlutils/Android.mk b/bmlutils/Android.mk index 6d9ab83..de687f8 100644 --- a/bmlutils/Android.mk +++ b/bmlutils/Android.mk @@ -10,6 +10,9 @@ $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ ) \ ) +LOCAL_STATIC_LIBRARIES := libcrecovery +LOCAL_C_INCLUDES := bootable/recovery/libcrecovery + LOCAL_SRC_FILES := bmlutils.c LOCAL_MODULE := libbmlutils LOCAL_MODULE_TAGS := eng diff --git a/bmlutils/bmlutils.c b/bmlutils/bmlutils.c index a7b09b4..609ab86 100644 --- a/bmlutils/bmlutils.c +++ b/bmlutils/bmlutils.c @@ -20,7 +20,8 @@ #include #include -extern int __system(const char *command); +#include + #define BML_UNLOCK_ALL 0x8A29 ///< unlock all partition RO -> RW #ifndef BOARD_BML_BOOT diff --git a/flashutils/Android.mk b/flashutils/Android.mk index 615265a..0476f1b 100644 --- a/flashutils/Android.mk +++ b/flashutils/Android.mk @@ -24,7 +24,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := flash_image.c LOCAL_MODULE := flash_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) @@ -32,7 +32,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := dump_image.c LOCAL_MODULE := dump_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) @@ -40,7 +40,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := erase_image.c LOCAL_MODULE := erase_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) diff --git a/updater/Android.mk b/updater/Android.mk index 86c4bb7..d859c7b 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -30,7 +30,7 @@ LOCAL_STATIC_LIBRARIES += libflashutils libmtdutils libmmcutils libbmlutils LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libedify libmtdutils libminzip libz LOCAL_STATIC_LIBRARIES += libmincrypt libbz -LOCAL_STATIC_LIBRARIES += libminelf +LOCAL_STATIC_LIBRARIES += libminelf libcrecovery LOCAL_STATIC_LIBRARIES += libcutils libstdc++ libc LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. @@ -73,4 +73,4 @@ LOCAL_MODULE := updater LOCAL_FORCE_STATIC_EXECUTABLE := true -include $(BUILD_EXECUTABLE) \ No newline at end of file +include $(BUILD_EXECUTABLE)