diff options
-rw-r--r-- | minui/events.cpp | 2 | ||||
-rw-r--r-- | minui/minui.h | 6 | ||||
-rw-r--r-- | otafault/ota_io.cpp | 2 | ||||
-rw-r--r-- | recovery-refresh.cpp | 2 | ||||
-rw-r--r-- | recovery.cpp | 2 | ||||
-rw-r--r-- | res-hdpi/images/erasing_text.png | bin | 20528 -> 50373 bytes | |||
-rw-r--r-- | res-hdpi/images/error_text.png | bin | 11684 -> 35720 bytes | |||
-rw-r--r-- | res-hdpi/images/installing_security_text.png | bin | 0 -> 111582 bytes | |||
-rw-r--r-- | res-hdpi/images/installing_text.png | bin | 40946 -> 102734 bytes | |||
-rw-r--r-- | res-hdpi/images/no_command_text.png | bin | 25013 -> 61665 bytes | |||
-rw-r--r-- | res-mdpi/images/erasing_text.png | bin | 12208 -> 29558 bytes | |||
-rw-r--r-- | res-mdpi/images/error_text.png | bin | 7202 -> 20926 bytes | |||
-rw-r--r-- | res-mdpi/images/installing_security_text.png | bin | 0 -> 69709 bytes | |||
-rw-r--r-- | res-mdpi/images/installing_text.png | bin | 24575 -> 61548 bytes | |||
-rw-r--r-- | res-mdpi/images/no_command_text.png | bin | 14168 -> 34232 bytes | |||
-rw-r--r-- | res-xhdpi/images/erasing_text.png | bin | 29674 -> 72595 bytes | |||
-rw-r--r-- | res-xhdpi/images/error_text.png | bin | 16599 -> 51739 bytes | |||
-rw-r--r-- | res-xhdpi/images/installing_security_text.png | bin | 0 -> 195507 bytes | |||
-rw-r--r-- | res-xhdpi/images/installing_text.png | bin | 63220 -> 174877 bytes | |||
-rw-r--r-- | res-xhdpi/images/no_command_text.png | bin | 37222 -> 85999 bytes | |||
-rw-r--r-- | res-xxhdpi/images/erasing_text.png | bin | 52598 -> 119060 bytes | |||
-rw-r--r-- | res-xxhdpi/images/error_text.png | bin | 27839 -> 84432 bytes | |||
-rw-r--r-- | res-xxhdpi/images/installing_security_text.png | bin | 0 -> 447442 bytes | |||
-rw-r--r-- | res-xxhdpi/images/installing_text.png | bin | 133331 -> 416541 bytes | |||
-rw-r--r-- | res-xxhdpi/images/no_command_text.png | bin | 63887 -> 243828 bytes | |||
-rw-r--r-- | res-xxxhdpi/images/erasing_text.png | bin | 85500 -> 264753 bytes | |||
-rw-r--r-- | res-xxxhdpi/images/error_text.png | bin | 40216 -> 178491 bytes | |||
-rw-r--r-- | res-xxxhdpi/images/installing_security_text.png | bin | 0 -> 611664 bytes | |||
-rw-r--r-- | res-xxxhdpi/images/installing_text.png | bin | 184958 -> 569291 bytes | |||
-rw-r--r-- | res-xxxhdpi/images/no_command_text.png | bin | 109746 -> 333053 bytes | |||
-rw-r--r-- | tests/component/verifier_test.cpp | 67 | ||||
-rw-r--r-- | tests/testdata/otasigned_v1.zip (renamed from tests/testdata/otasigned.zip) | bin | 4009 -> 4009 bytes | |||
-rw-r--r-- | tests/testdata/otasigned_v2.zip (renamed from tests/testdata/otasigned_f4.zip) | bin | 5195 -> 5195 bytes | |||
-rw-r--r-- | tests/testdata/otasigned_v3.zip (renamed from tests/testdata/otasigned_sha256.zip) | bin | 5326 -> 5326 bytes | |||
-rw-r--r-- | tests/testdata/otasigned_v4.zip (renamed from tests/testdata/otasigned_f4_sha256.zip) | bin | 5319 -> 5319 bytes | |||
-rw-r--r-- | tests/testdata/otasigned_v5.zip (renamed from tests/testdata/otasigned_ecdsa_sha256.zip) | bin | 3085 -> 3085 bytes | |||
-rw-r--r-- | tests/testdata/testkey_v1.pk8 (renamed from tests/testdata/testkey.pk8) | bin | 1217 -> 1217 bytes | |||
-rw-r--r-- | tests/testdata/testkey_v1.txt (renamed from tests/testdata/test_key_e3.txt) | 0 | ||||
-rw-r--r-- | tests/testdata/testkey_v1.x509.pem (renamed from tests/testdata/testkey.x509.pem) | 0 | ||||
-rw-r--r-- | tests/testdata/testkey_v2.pk8 (renamed from tests/testdata/test_f4.pk8) | bin | 1217 -> 1217 bytes | |||
-rw-r--r-- | tests/testdata/testkey_v2.txt (renamed from tests/testdata/test_key_f4.txt) | 0 | ||||
-rw-r--r-- | tests/testdata/testkey_v2.x509.pem (renamed from tests/testdata/test_f4.x509.pem) | 0 | ||||
l--------- | tests/testdata/testkey_v3.pk8 | 1 | ||||
-rw-r--r-- | tests/testdata/testkey_v3.txt | 1 | ||||
-rw-r--r-- | tests/testdata/testkey_v3.x509.pem (renamed from tests/testdata/testkey_sha256.x509.pem) | 0 | ||||
l--------- | tests/testdata/testkey_v4.pk8 | 1 | ||||
-rw-r--r-- | tests/testdata/testkey_v4.txt | 1 | ||||
-rw-r--r-- | tests/testdata/testkey_v4.x509.pem (renamed from tests/testdata/test_f4_sha256.x509.pem) | 0 | ||||
-rw-r--r-- | tests/testdata/testkey_v5.pk8 (renamed from tests/testdata/testkey_ecdsa.pk8) | bin | 138 -> 138 bytes | |||
-rw-r--r-- | tests/testdata/testkey_v5.txt (renamed from tests/testdata/test_key_ec.txt) | 0 | ||||
-rw-r--r-- | tests/testdata/testkey_v5.x509.pem (renamed from tests/testdata/testkey_ecdsa.x509.pem) | 0 | ||||
-rw-r--r-- | tools/recovery_l10n/README.md | 33 | ||||
-rw-r--r-- | tools/recovery_l10n/res/values/strings.xml | 1 | ||||
-rw-r--r-- | tools/recovery_l10n/src/com/android/recovery_l10n/Main.java | 1 |
54 files changed, 72 insertions, 48 deletions
diff --git a/minui/events.cpp b/minui/events.cpp index a6b9671ed..e6e7bd28c 100644 --- a/minui/events.cpp +++ b/minui/events.cpp @@ -204,7 +204,7 @@ int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data) { return 0; } -void ev_iterate_available_keys(std::function<void(int)> f) { +void ev_iterate_available_keys(const std::function<void(int)>& f) { // Use unsigned long to match ioctl's parameter type. unsigned long ev_bits[BITS_TO_LONGS(EV_MAX)]; // NOLINT unsigned long key_bits[BITS_TO_LONGS(KEY_MAX)]; // NOLINT diff --git a/minui/minui.h b/minui/minui.h index e3bc00548..d572205f3 100644 --- a/minui/minui.h +++ b/minui/minui.h @@ -67,7 +67,7 @@ typedef int (*ev_set_key_callback)(int code, int value, void* data); int ev_init(ev_callback input_cb, void* data); void ev_exit(); int ev_add_fd(int fd, ev_callback cb, void* data); -void ev_iterate_available_keys(std::function<void(int)> f); +void ev_iterate_available_keys(const std::function<void(int)>& f); int ev_sync_key_state(ev_set_key_callback set_key_cb, void* data); // 'timeout' has the same semantics as poll(2). @@ -111,8 +111,8 @@ int res_create_alpha_surface(const char* name, GRSurface** pSurface); // given locale. The image is expected to be a composite of multiple // translations of the same text, with special added rows that encode // the subimages' size and intended locale in the pixel data. See -// development/tools/recovery_l10n for an app that will generate these -// specialized images from Android resources. +// bootable/recovery/tools/recovery_l10n for an app that will generate +// these specialized images from Android resources. int res_create_localized_alpha_surface(const char* name, const char* locale, GRSurface** pSurface); diff --git a/otafault/ota_io.cpp b/otafault/ota_io.cpp index dd805e56e..cb37d515a 100644 --- a/otafault/ota_io.cpp +++ b/otafault/ota_io.cpp @@ -31,7 +31,7 @@ static std::string write_fault_file_name = ""; static std::string fsync_fault_file_name = ""; bool have_eio_error = false; -static bool get_hit_file(const char* cached_path, std::string ffn) { +static bool get_hit_file(const char* cached_path, const std::string& ffn) { return should_hit_cache() ? !strncmp(cached_path, OTAIO_CACHE_FNAME, strlen(cached_path)) : !strncmp(cached_path, ffn.c_str(), strlen(cached_path)); diff --git a/recovery-refresh.cpp b/recovery-refresh.cpp index 333367eba..b75c91538 100644 --- a/recovery-refresh.cpp +++ b/recovery-refresh.cpp @@ -76,7 +76,7 @@ static ssize_t logrotate( } std::string name(filename); - size_t dot = name.find_last_of("."); + size_t dot = name.find_last_of('.'); std::string sub = name.substr(0, dot); if (!strstr(LAST_KMSG_FILE, sub.c_str()) && diff --git a/recovery.cpp b/recovery.cpp index b4dc41bfa..28dd212ba 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -1274,7 +1274,7 @@ static ssize_t logrotate( } std::string name(filename); - size_t dot = name.find_last_of("."); + size_t dot = name.find_last_of('.'); std::string sub = name.substr(0, dot); if (!strstr(LAST_KMSG_FILE, sub.c_str()) && diff --git a/res-hdpi/images/erasing_text.png b/res-hdpi/images/erasing_text.png Binary files differindex 774244c84..2186c1950 100644 --- a/res-hdpi/images/erasing_text.png +++ b/res-hdpi/images/erasing_text.png diff --git a/res-hdpi/images/error_text.png b/res-hdpi/images/error_text.png Binary files differindex 64a57ec4e..9700f459f 100644 --- a/res-hdpi/images/error_text.png +++ b/res-hdpi/images/error_text.png diff --git a/res-hdpi/images/installing_security_text.png b/res-hdpi/images/installing_security_text.png Binary files differnew file mode 100644 index 000000000..0f605952c --- /dev/null +++ b/res-hdpi/images/installing_security_text.png diff --git a/res-hdpi/images/installing_text.png b/res-hdpi/images/installing_text.png Binary files differindex 33b54f1bf..ec8b875a5 100644 --- a/res-hdpi/images/installing_text.png +++ b/res-hdpi/images/installing_text.png diff --git a/res-hdpi/images/no_command_text.png b/res-hdpi/images/no_command_text.png Binary files differindex 9927ecb6d..3eddcbbed 100644 --- a/res-hdpi/images/no_command_text.png +++ b/res-hdpi/images/no_command_text.png diff --git a/res-mdpi/images/erasing_text.png b/res-mdpi/images/erasing_text.png Binary files differindex fd86c3f6e..b0dd3c6d3 100644 --- a/res-mdpi/images/erasing_text.png +++ b/res-mdpi/images/erasing_text.png diff --git a/res-mdpi/images/error_text.png b/res-mdpi/images/error_text.png Binary files differindex f1b44c9b3..6a47a5956 100644 --- a/res-mdpi/images/error_text.png +++ b/res-mdpi/images/error_text.png diff --git a/res-mdpi/images/installing_security_text.png b/res-mdpi/images/installing_security_text.png Binary files differnew file mode 100644 index 000000000..149939862 --- /dev/null +++ b/res-mdpi/images/installing_security_text.png diff --git a/res-mdpi/images/installing_text.png b/res-mdpi/images/installing_text.png Binary files differindex 064b2a317..01e9bfefb 100644 --- a/res-mdpi/images/installing_text.png +++ b/res-mdpi/images/installing_text.png diff --git a/res-mdpi/images/no_command_text.png b/res-mdpi/images/no_command_text.png Binary files differindex 1f29b8951..d340df518 100644 --- a/res-mdpi/images/no_command_text.png +++ b/res-mdpi/images/no_command_text.png diff --git a/res-xhdpi/images/erasing_text.png b/res-xhdpi/images/erasing_text.png Binary files differindex f88e0e6a8..2f8b46918 100644 --- a/res-xhdpi/images/erasing_text.png +++ b/res-xhdpi/images/erasing_text.png diff --git a/res-xhdpi/images/error_text.png b/res-xhdpi/images/error_text.png Binary files differindex c3a4cc6f8..ad18851c5 100644 --- a/res-xhdpi/images/error_text.png +++ b/res-xhdpi/images/error_text.png diff --git a/res-xhdpi/images/installing_security_text.png b/res-xhdpi/images/installing_security_text.png Binary files differnew file mode 100644 index 000000000..acc6a7c2b --- /dev/null +++ b/res-xhdpi/images/installing_security_text.png diff --git a/res-xhdpi/images/installing_text.png b/res-xhdpi/images/installing_text.png Binary files differindex a4dacd0f6..32897d0f0 100644 --- a/res-xhdpi/images/installing_text.png +++ b/res-xhdpi/images/installing_text.png diff --git a/res-xhdpi/images/no_command_text.png b/res-xhdpi/images/no_command_text.png Binary files differindex eb34e94b3..eb43c59c5 100644 --- a/res-xhdpi/images/no_command_text.png +++ b/res-xhdpi/images/no_command_text.png diff --git a/res-xxhdpi/images/erasing_text.png b/res-xxhdpi/images/erasing_text.png Binary files differindex c87fd52b4..8ff2b2fcf 100644 --- a/res-xxhdpi/images/erasing_text.png +++ b/res-xxhdpi/images/erasing_text.png diff --git a/res-xxhdpi/images/error_text.png b/res-xxhdpi/images/error_text.png Binary files differindex 486e951df..658d4ea56 100644 --- a/res-xxhdpi/images/error_text.png +++ b/res-xxhdpi/images/error_text.png diff --git a/res-xxhdpi/images/installing_security_text.png b/res-xxhdpi/images/installing_security_text.png Binary files differnew file mode 100644 index 000000000..23fcaa441 --- /dev/null +++ b/res-xxhdpi/images/installing_security_text.png diff --git a/res-xxhdpi/images/installing_text.png b/res-xxhdpi/images/installing_text.png Binary files differindex ef6e8f3f0..fd8e58464 100644 --- a/res-xxhdpi/images/installing_text.png +++ b/res-xxhdpi/images/installing_text.png diff --git a/res-xxhdpi/images/no_command_text.png b/res-xxhdpi/images/no_command_text.png Binary files differindex cc98bb18a..23932d6b7 100644 --- a/res-xxhdpi/images/no_command_text.png +++ b/res-xxhdpi/images/no_command_text.png diff --git a/res-xxxhdpi/images/erasing_text.png b/res-xxxhdpi/images/erasing_text.png Binary files differindex 612e7a390..031529371 100644 --- a/res-xxxhdpi/images/erasing_text.png +++ b/res-xxxhdpi/images/erasing_text.png diff --git a/res-xxxhdpi/images/error_text.png b/res-xxxhdpi/images/error_text.png Binary files differindex 50d2fadb5..dba127f02 100644 --- a/res-xxxhdpi/images/error_text.png +++ b/res-xxxhdpi/images/error_text.png diff --git a/res-xxxhdpi/images/installing_security_text.png b/res-xxxhdpi/images/installing_security_text.png Binary files differnew file mode 100644 index 000000000..6cdbef48e --- /dev/null +++ b/res-xxxhdpi/images/installing_security_text.png diff --git a/res-xxxhdpi/images/installing_text.png b/res-xxxhdpi/images/installing_text.png Binary files differindex 9bd093bf4..32511a9c5 100644 --- a/res-xxxhdpi/images/installing_text.png +++ b/res-xxxhdpi/images/installing_text.png diff --git a/res-xxxhdpi/images/no_command_text.png b/res-xxxhdpi/images/no_command_text.png Binary files differindex 6354e6a99..b6cdd7718 100644 --- a/res-xxxhdpi/images/no_command_text.png +++ b/res-xxxhdpi/images/no_command_text.png diff --git a/tests/component/verifier_test.cpp b/tests/component/verifier_test.cpp index b5d70327e..2a78173d8 100644 --- a/tests/component/verifier_test.cpp +++ b/tests/component/verifier_test.cpp @@ -99,30 +99,14 @@ class VerifierTest : public testing::TestWithParam<std::vector<std::string>> { android::base::StringPrintf("%s%s%s%s", DATA_PATH, NATIVE_TEST_PATH, TESTDATA_PATH, args[0].c_str()); if (sysMapFile(package.c_str(), &memmap) != 0) { - FAIL() << "Failed to mmap " << package << ": " << strerror(errno) - << "\n"; + FAIL() << "Failed to mmap " << package << ": " << strerror(errno) << "\n"; } for (auto it = ++(args.cbegin()); it != args.cend(); ++it) { - if (it->substr(it->length() - 3, it->length()) == "256") { - if (certs.empty()) { - FAIL() << "May only specify -sha256 after key type\n"; - } - certs.back().hash_len = SHA256_DIGEST_LENGTH; - } else { - std::string public_key_file = android::base::StringPrintf( - "%s%s%stest_key_%s.txt", DATA_PATH, NATIVE_TEST_PATH, - TESTDATA_PATH, it->c_str()); - ASSERT_TRUE(load_keys(public_key_file.c_str(), certs)); - certs.back().hash_len = SHA_DIGEST_LENGTH; - } - } - if (certs.empty()) { std::string public_key_file = android::base::StringPrintf( - "%s%s%stest_key_e3.txt", DATA_PATH, NATIVE_TEST_PATH, - TESTDATA_PATH); + "%s%s%stestkey_%s.txt", DATA_PATH, NATIVE_TEST_PATH, + TESTDATA_PATH, it->c_str()); ASSERT_TRUE(load_keys(public_key_file.c_str(), certs)); - certs.back().hash_len = SHA_DIGEST_LENGTH; } } @@ -147,37 +131,38 @@ TEST_P(VerifierFailureTest, VerifyFailure) { INSTANTIATE_TEST_CASE_P(SingleKeySuccess, VerifierSuccessTest, ::testing::Values( - std::vector<std::string>({"otasigned.zip", "e3"}), - std::vector<std::string>({"otasigned_f4.zip", "f4"}), - std::vector<std::string>({"otasigned_sha256.zip", "e3", "sha256"}), - std::vector<std::string>({"otasigned_f4_sha256.zip", "f4", "sha256"}), - std::vector<std::string>({"otasigned_ecdsa_sha256.zip", "ec", "sha256"}))); + std::vector<std::string>({"otasigned_v1.zip", "v1"}), + std::vector<std::string>({"otasigned_v2.zip", "v2"}), + std::vector<std::string>({"otasigned_v3.zip", "v3"}), + std::vector<std::string>({"otasigned_v4.zip", "v4"}), + std::vector<std::string>({"otasigned_v5.zip", "v5"}))); INSTANTIATE_TEST_CASE_P(MultiKeySuccess, VerifierSuccessTest, ::testing::Values( - std::vector<std::string>({"otasigned.zip", "f4", "e3"}), - std::vector<std::string>({"otasigned_f4.zip", "ec", "f4"}), - std::vector<std::string>({"otasigned_sha256.zip", "ec", "e3", "e3", "sha256"}), - std::vector<std::string>({"otasigned_f4_sha256.zip", "ec", "sha256", "e3", "f4", "sha256"}), - std::vector<std::string>({"otasigned_ecdsa_sha256.zip", "f4", "sha256", "e3", "ec", "sha256"}))); + std::vector<std::string>({"otasigned_v1.zip", "v1", "v2"}), + std::vector<std::string>({"otasigned_v2.zip", "v5", "v2"}), + std::vector<std::string>({"otasigned_v3.zip", "v5", "v1", "v3"}), + std::vector<std::string>({"otasigned_v4.zip", "v5", "v1", "v4"}), + std::vector<std::string>({"otasigned_v5.zip", "v4", "v1", "v5"}))); INSTANTIATE_TEST_CASE_P(WrongKey, VerifierFailureTest, ::testing::Values( - std::vector<std::string>({"otasigned.zip", "f4"}), - std::vector<std::string>({"otasigned_f4.zip", "e3"}), - std::vector<std::string>({"otasigned_ecdsa_sha256.zip", "e3", "sha256"}))); + std::vector<std::string>({"otasigned_v1.zip", "v2"}), + std::vector<std::string>({"otasigned_v2.zip", "v1"}), + std::vector<std::string>({"otasigned_v3.zip", "v5"}), + std::vector<std::string>({"otasigned_v4.zip", "v5"}), + std::vector<std::string>({"otasigned_v5.zip", "v3"}))); INSTANTIATE_TEST_CASE_P(WrongHash, VerifierFailureTest, ::testing::Values( - std::vector<std::string>({"otasigned.zip", "e3", "sha256"}), - std::vector<std::string>({"otasigned_f4.zip", "f4", "sha256"}), - std::vector<std::string>({"otasigned_sha256.zip"}), - std::vector<std::string>({"otasigned_f4_sha256.zip", "f4"}), - std::vector<std::string>({"otasigned_ecdsa_sha256.zip"}))); + std::vector<std::string>({"otasigned_v1.zip", "v3"}), + std::vector<std::string>({"otasigned_v2.zip", "v4"}), + std::vector<std::string>({"otasigned_v3.zip", "v1"}), + std::vector<std::string>({"otasigned_v4.zip", "v2"}))); INSTANTIATE_TEST_CASE_P(BadPackage, VerifierFailureTest, ::testing::Values( - std::vector<std::string>({"random.zip"}), - std::vector<std::string>({"fake-eocd.zip"}), - std::vector<std::string>({"alter-metadata.zip"}), - std::vector<std::string>({"alter-footer.zip"}))); + std::vector<std::string>({"random.zip", "v1"}), + std::vector<std::string>({"fake-eocd.zip", "v1"}), + std::vector<std::string>({"alter-metadata.zip", "v1"}), + std::vector<std::string>({"alter-footer.zip", "v1"}))); diff --git a/tests/testdata/otasigned.zip b/tests/testdata/otasigned_v1.zip Binary files differindex a6bc53e41..a6bc53e41 100644 --- a/tests/testdata/otasigned.zip +++ b/tests/testdata/otasigned_v1.zip diff --git a/tests/testdata/otasigned_f4.zip b/tests/testdata/otasigned_v2.zip Binary files differindex dd1e4dd40..dd1e4dd40 100644 --- a/tests/testdata/otasigned_f4.zip +++ b/tests/testdata/otasigned_v2.zip diff --git a/tests/testdata/otasigned_sha256.zip b/tests/testdata/otasigned_v3.zip Binary files differindex 0ed4409b3..0ed4409b3 100644 --- a/tests/testdata/otasigned_sha256.zip +++ b/tests/testdata/otasigned_v3.zip diff --git a/tests/testdata/otasigned_f4_sha256.zip b/tests/testdata/otasigned_v4.zip Binary files differindex 3af408c40..3af408c40 100644 --- a/tests/testdata/otasigned_f4_sha256.zip +++ b/tests/testdata/otasigned_v4.zip diff --git a/tests/testdata/otasigned_ecdsa_sha256.zip b/tests/testdata/otasigned_v5.zip Binary files differindex 999fcdd0f..999fcdd0f 100644 --- a/tests/testdata/otasigned_ecdsa_sha256.zip +++ b/tests/testdata/otasigned_v5.zip diff --git a/tests/testdata/testkey.pk8 b/tests/testdata/testkey_v1.pk8 Binary files differindex 586c1bd5c..586c1bd5c 100644 --- a/tests/testdata/testkey.pk8 +++ b/tests/testdata/testkey_v1.pk8 diff --git a/tests/testdata/test_key_e3.txt b/tests/testdata/testkey_v1.txt index 53f5297bd..53f5297bd 100644 --- a/tests/testdata/test_key_e3.txt +++ b/tests/testdata/testkey_v1.txt diff --git a/tests/testdata/testkey.x509.pem b/tests/testdata/testkey_v1.x509.pem index e242d83e2..e242d83e2 100644 --- a/tests/testdata/testkey.x509.pem +++ b/tests/testdata/testkey_v1.x509.pem diff --git a/tests/testdata/test_f4.pk8 b/tests/testdata/testkey_v2.pk8 Binary files differindex 3052613c5..3052613c5 100644 --- a/tests/testdata/test_f4.pk8 +++ b/tests/testdata/testkey_v2.pk8 diff --git a/tests/testdata/test_key_f4.txt b/tests/testdata/testkey_v2.txt index 54ddbbad1..54ddbbad1 100644 --- a/tests/testdata/test_key_f4.txt +++ b/tests/testdata/testkey_v2.txt diff --git a/tests/testdata/test_f4.x509.pem b/tests/testdata/testkey_v2.x509.pem index 814abcf99..814abcf99 100644 --- a/tests/testdata/test_f4.x509.pem +++ b/tests/testdata/testkey_v2.x509.pem diff --git a/tests/testdata/testkey_v3.pk8 b/tests/testdata/testkey_v3.pk8 new file mode 120000 index 000000000..18ecf9815 --- /dev/null +++ b/tests/testdata/testkey_v3.pk8 @@ -0,0 +1 @@ +testkey_v1.pk8
\ No newline at end of file diff --git a/tests/testdata/testkey_v3.txt b/tests/testdata/testkey_v3.txt new file mode 100644 index 000000000..3208571a5 --- /dev/null +++ b/tests/testdata/testkey_v3.txt @@ -0,0 +1 @@ +v3 {64,0xc926ad21,{1795090719,2141396315,950055447,2581568430,4268923165,1920809988,546586521,3498997798,1776797858,3740060814,1805317999,1429410244,129622599,1422441418,1783893377,1222374759,2563319927,323993566,28517732,609753416,1826472888,215237850,4261642700,4049082591,3228462402,774857746,154822455,2497198897,2758199418,3019015328,2794777644,87251430,2534927978,120774784,571297800,3695899472,2479925187,3811625450,3401832990,2394869647,3267246207,950095497,555058928,414729973,1136544882,3044590084,465547824,4058146728,2731796054,1689838846,3890756939,1048029507,895090649,247140249,178744550,3547885223,3165179243,109881576,3944604415,1044303212,3772373029,2985150306,3737520932,3599964420},{3437017481,3784475129,2800224972,3086222688,251333580,2131931323,512774938,325948880,2657486437,2102694287,3820568226,792812816,1026422502,2053275343,2800889200,3113586810,165549746,4273519969,4065247892,1902789247,772932719,3941848426,3652744109,216871947,3164400649,1942378755,3996765851,1055777370,964047799,629391717,2232744317,3910558992,191868569,2758883837,3682816752,2997714732,2702529250,3570700455,3776873832,3924067546,3555689545,2758825434,1323144535,61311905,1997411085,376844204,213777604,4077323584,9135381,1625809335,2804742137,2952293945,1117190829,4237312782,1825108855,3013147971,1111251351,2568837572,1684324211,2520978805,367251975,810756730,2353784344,1175080310}} diff --git a/tests/testdata/testkey_sha256.x509.pem b/tests/testdata/testkey_v3.x509.pem index 002ce8968..002ce8968 100644 --- a/tests/testdata/testkey_sha256.x509.pem +++ b/tests/testdata/testkey_v3.x509.pem diff --git a/tests/testdata/testkey_v4.pk8 b/tests/testdata/testkey_v4.pk8 new file mode 120000 index 000000000..683b9a3f1 --- /dev/null +++ b/tests/testdata/testkey_v4.pk8 @@ -0,0 +1 @@ +testkey_v2.pk8
\ No newline at end of file diff --git a/tests/testdata/testkey_v4.txt b/tests/testdata/testkey_v4.txt new file mode 100644 index 000000000..532cbd51a --- /dev/null +++ b/tests/testdata/testkey_v4.txt @@ -0,0 +1 @@ +v4 {64,0xc9bd1f21,{293133087,3210546773,865313125,250921607,3158780490,943703457,1242806226,2986289859,2942743769,2457906415,2719374299,1783459420,149579627,3081531591,3440738617,2788543742,2758457512,1146764939,3699497403,2446203424,1744968926,1159130537,2370028300,3978231572,3392699980,1487782451,1180150567,2841334302,3753960204,961373345,3333628321,748825784,2978557276,1566596926,1613056060,2600292737,1847226629,50398611,1890374404,2878700735,2286201787,1401186359,619285059,731930817,2340993166,1156490245,2992241729,151498140,318782170,3480838990,2100383433,4223552555,3628927011,4247846280,1759029513,4215632601,2719154626,3490334597,1751299340,3487864726,3668753795,4217506054,3748782284,3150295088},{1772626313,445326068,3477676155,1758201194,2986784722,491035581,3922936562,702212696,2979856666,3324974564,2488428922,3056318590,1626954946,664714029,398585816,3964097931,3356701905,2298377729,2040082097,3025491477,539143308,3348777868,2995302452,3602465520,212480763,2691021393,1307177300,704008044,2031136606,1054106474,3838318865,2441343869,1477566916,700949900,2534790355,3353533667,336163563,4106790558,2701448228,1571536379,1103842411,3623110423,1635278839,1577828979,910322800,715583630,138128831,1017877531,2289162787,447994798,1897243165,4121561445,4150719842,2131821093,2262395396,3305771534,980753571,3256525190,3128121808,1072869975,3507939515,4229109952,118381341,2209831334}} diff --git a/tests/testdata/test_f4_sha256.x509.pem b/tests/testdata/testkey_v4.x509.pem index 9d5376b45..9d5376b45 100644 --- a/tests/testdata/test_f4_sha256.x509.pem +++ b/tests/testdata/testkey_v4.x509.pem diff --git a/tests/testdata/testkey_ecdsa.pk8 b/tests/testdata/testkey_v5.pk8 Binary files differindex 9a521c8cf..9a521c8cf 100644 --- a/tests/testdata/testkey_ecdsa.pk8 +++ b/tests/testdata/testkey_v5.pk8 diff --git a/tests/testdata/test_key_ec.txt b/tests/testdata/testkey_v5.txt index 72b4395d9..72b4395d9 100644 --- a/tests/testdata/test_key_ec.txt +++ b/tests/testdata/testkey_v5.txt diff --git a/tests/testdata/testkey_ecdsa.x509.pem b/tests/testdata/testkey_v5.x509.pem index b12283645..b12283645 100644 --- a/tests/testdata/testkey_ecdsa.x509.pem +++ b/tests/testdata/testkey_v5.x509.pem diff --git a/tools/recovery_l10n/README.md b/tools/recovery_l10n/README.md new file mode 100644 index 000000000..1554f6618 --- /dev/null +++ b/tools/recovery_l10n/README.md @@ -0,0 +1,33 @@ +# Steps to regenerate background text images under res-*dpi/images/ + +1. Build the recovery_l10n app: + + cd bootable/recovery && mma -j32 + +2. Install the app on the device (or emulator) with the intended dpi. + + * For example, we can use Nexus 5 to generate the text images under + res-xxhdpi. + * When using the emulator, make sure the NDK version matches the current + repository. Otherwise, the app may not work properly. + + adb install $PATH_TO_APP + +3. Run the app, select the string to translate and press the 'go' button. + +4. After the app goes through the strings for all locales, pull the output png + file from the device. + + adb root && adb pull /data/data/com.android.recovery_l10n/files/text-out.png + +5. Compress the output file put it under the corresponding directory. + + * "pngcrush -c 0 ..." converts "text-out.png" into a 1-channel image, + which is accepted by Recovery. This also compresses the image file by + ~60%. + * zopflipng could further compress the png files by ~10%, more details + in https://github.com/google/zopfli/blob/master/README.zopflipng + * If you're using other png compression tools, make sure the final text + image works by running graphic tests under the recovery mode. + + pngcrush -c 0 text-out.png $OUTPUT_PNG diff --git a/tools/recovery_l10n/res/values/strings.xml b/tools/recovery_l10n/res/values/strings.xml index f6193ab17..48d18daca 100644 --- a/tools/recovery_l10n/res/values/strings.xml +++ b/tools/recovery_l10n/res/values/strings.xml @@ -9,6 +9,7 @@ <item>erasing</item> <item>no_command</item> <item>error</item> + <item>installing_security</item> </string-array> <!-- Displayed on the screen beneath the animated android while the diff --git a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java index 3f2bebe60..a974fa37a 100644 --- a/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java +++ b/tools/recovery_l10n/src/com/android/recovery_l10n/Main.java @@ -139,6 +139,7 @@ public class Main extends Activity { case 1: mStringId = R.string.recovery_erasing; break; case 2: mStringId = R.string.recovery_no_command; break; case 3: mStringId = R.string.recovery_error; break; + case 4: mStringId = R.string.recovery_installing_security; break; } } @Override public void onNothingSelected(AdapterView parent) { } |