Loading fastboot/fastboot.cpp +14 −17 Original line number Diff line number Diff line Loading @@ -2199,7 +2199,7 @@ int FastBootTool::Main(int argc, char* argv[]) { } } } std::unique_ptr<Task> reboot_task = nullptr; std::vector<std::unique_ptr<Task>> tasks; std::vector<std::string> args(argv, argv + argc); while (!args.empty()) { std::string command = next_arg(&args); Loading Loading @@ -2253,17 +2253,17 @@ int FastBootTool::Main(int argc, char* argv[]) { } else if (command == FB_CMD_REBOOT) { if (args.size() == 1) { std::string reboot_target = next_arg(&args); reboot_task = std::make_unique<RebootTask>(fp.get(), reboot_target); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), reboot_target)); } else if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } if (!args.empty()) syntax_error("junk after reboot command"); } else if (command == FB_CMD_REBOOT_BOOTLOADER) { reboot_task = std::make_unique<RebootTask>(fp.get(), "bootloader"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "bootloader")); } else if (command == FB_CMD_REBOOT_RECOVERY) { reboot_task = std::make_unique<RebootTask>(fp.get(), "recovery"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "recovery")); } else if (command == FB_CMD_REBOOT_FASTBOOT) { reboot_task = std::make_unique<RebootTask>(fp.get(), "fastboot"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "fastboot")); } else if (command == FB_CMD_CONTINUE) { fb->Continue(); } else if (command == FB_CMD_BOOT) { Loading Loading @@ -2305,12 +2305,11 @@ int FastBootTool::Main(int argc, char* argv[]) { fprintf(stderr, "Warning: slot set to 'all'. Secondary slots will not be flashed.\n"); fp->skip_secondary = true; do_flashall(fp.get()); } else { do_flashall(fp.get()); } do_flashall(fp.get()); if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } } else if (command == "update") { bool slot_all = (fp->slot_override == "all"); Loading @@ -2324,7 +2323,7 @@ int FastBootTool::Main(int argc, char* argv[]) { } do_update(filename.c_str(), fp.get()); if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } } else if (command == FB_CMD_SET_ACTIVE) { std::string slot = verify_slot(next_arg(&args), false); Loading Loading @@ -2358,8 +2357,7 @@ int FastBootTool::Main(int argc, char* argv[]) { fb->CreatePartition(partition, size); } else if (command == FB_CMD_DELETE_PARTITION) { std::string partition = next_arg(&args); auto delete_task = std::make_unique<DeleteTask>(fp.get(), partition); fb->DeletePartition(partition); tasks.emplace_back(std::make_unique<DeleteTask>(fp.get(), partition)); } else if (command == FB_CMD_RESIZE_PARTITION) { std::string partition = next_arg(&args); std::string size = next_arg(&args); Loading Loading @@ -2407,15 +2405,14 @@ int FastBootTool::Main(int argc, char* argv[]) { } std::vector<std::string> partitions = {"userdata", "cache", "metadata"}; for (const auto& partition : partitions) { std::unique_ptr<WipeTask> wipe_task = std::make_unique<WipeTask>(fp.get(), partition); wipe_task->Run(); tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition)); } } if (fp->wants_set_active) { fb->SetActive(next_active); } if (reboot_task) { reboot_task->Run(); for (auto& task : tasks) { task->Run(); } fprintf(stderr, "Finished. Total time: %.3fs\n", (now() - start)); Loading fs_mgr/libsnapshot/Android.bp +21 −7 Original line number Diff line number Diff line Loading @@ -252,13 +252,6 @@ cc_defaults { header_libs: [ "libstorage_literals_headers", ], test_suites: [ "vts", "device-tests" ], test_options: { min_shipping_api_level: 29, }, auto_gen_config: true, require_root: true, compile_multilib: "first", Loading @@ -267,6 +260,13 @@ cc_defaults { cc_test { name: "vts_libsnapshot_test", defaults: ["libsnapshot_test_defaults", "libsnapshot_hal_deps"], test_suites: [ "vts", "device-tests" ], test_options: { min_shipping_api_level: 30, }, } cc_test { Loading @@ -275,6 +275,13 @@ cc_test { cppflags: [ "-DLIBSNAPSHOT_TEST_VAB_LEGACY", ], test_suites: [ "device-tests" ], test_options: { // Legacy VAB launched in Android R. min_shipping_api_level: 30, }, } cc_test { Loading @@ -283,6 +290,13 @@ cc_test { cppflags: [ "-DLIBSNAPSHOT_TEST_VABC_LEGACY", ], test_suites: [ "device-tests" ], test_options: { // Legacy VABC launched in Android S. min_shipping_api_level: 31, }, } cc_test { Loading init/test_upgrade_mte/mte_upgrade_test.rc +2 −0 Original line number Diff line number Diff line Loading @@ -16,9 +16,11 @@ service mte_upgrade_test_helper /system/bin/mte_upgrade_test_helper ${sys.mte_cr class late_start disabled seclabel u:r:su:s0 user root service mte_upgrade_test_helper_overridden /system/bin/mte_upgrade_test_helper ${sys.mte_crash_test_uuid} class late_start disabled seclabel u:r:su:s0 user root setenv BIONIC_MEMTAG_UPGRADE_SECS 0 libmodprobe/libmodprobe.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -562,7 +562,7 @@ std::vector<std::string> Modprobe::ListModules(const std::string& pattern) { // Attempt to match both the canonical module name and the module filename. if (!fnmatch(pattern.c_str(), module.c_str(), 0)) { rv.emplace_back(module); } else if (!fnmatch(pattern.c_str(), basename(deps[0].c_str()), 0)) { } else if (!fnmatch(pattern.c_str(), android::base::Basename(deps[0]).c_str(), 0)) { rv.emplace_back(deps[0]); } } Loading libprocessgroup/include/processgroup/processgroup.h +5 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ int killProcessGroup(uid_t uid, int initialPid, int signal, int* max_processes = // that it only returns 0 in the case that the cgroup exists and it contains no processes. int killProcessGroupOnce(uid_t uid, int initialPid, int signal, int* max_processes = nullptr); // Sends the provided signal to all members of a process group, but does not wait for processes to // exit, or for the cgroup to be removed. Callers should also ensure that killProcessGroup is called // later to ensure the cgroup is fully removed, otherwise system resources may leak. int sendSignalToProcessGroup(uid_t uid, int initialPid, int signal); int createProcessGroup(uid_t uid, int initialPid, bool memControl = false); // Set various properties of a process group. For these functions to work, the process group must Loading Loading
fastboot/fastboot.cpp +14 −17 Original line number Diff line number Diff line Loading @@ -2199,7 +2199,7 @@ int FastBootTool::Main(int argc, char* argv[]) { } } } std::unique_ptr<Task> reboot_task = nullptr; std::vector<std::unique_ptr<Task>> tasks; std::vector<std::string> args(argv, argv + argc); while (!args.empty()) { std::string command = next_arg(&args); Loading Loading @@ -2253,17 +2253,17 @@ int FastBootTool::Main(int argc, char* argv[]) { } else if (command == FB_CMD_REBOOT) { if (args.size() == 1) { std::string reboot_target = next_arg(&args); reboot_task = std::make_unique<RebootTask>(fp.get(), reboot_target); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), reboot_target)); } else if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } if (!args.empty()) syntax_error("junk after reboot command"); } else if (command == FB_CMD_REBOOT_BOOTLOADER) { reboot_task = std::make_unique<RebootTask>(fp.get(), "bootloader"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "bootloader")); } else if (command == FB_CMD_REBOOT_RECOVERY) { reboot_task = std::make_unique<RebootTask>(fp.get(), "recovery"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "recovery")); } else if (command == FB_CMD_REBOOT_FASTBOOT) { reboot_task = std::make_unique<RebootTask>(fp.get(), "fastboot"); tasks.emplace_back(std::make_unique<RebootTask>(fp.get(), "fastboot")); } else if (command == FB_CMD_CONTINUE) { fb->Continue(); } else if (command == FB_CMD_BOOT) { Loading Loading @@ -2305,12 +2305,11 @@ int FastBootTool::Main(int argc, char* argv[]) { fprintf(stderr, "Warning: slot set to 'all'. Secondary slots will not be flashed.\n"); fp->skip_secondary = true; do_flashall(fp.get()); } else { do_flashall(fp.get()); } do_flashall(fp.get()); if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } } else if (command == "update") { bool slot_all = (fp->slot_override == "all"); Loading @@ -2324,7 +2323,7 @@ int FastBootTool::Main(int argc, char* argv[]) { } do_update(filename.c_str(), fp.get()); if (!fp->skip_reboot) { reboot_task = std::make_unique<RebootTask>(fp.get()); tasks.emplace_back(std::make_unique<RebootTask>(fp.get())); } } else if (command == FB_CMD_SET_ACTIVE) { std::string slot = verify_slot(next_arg(&args), false); Loading Loading @@ -2358,8 +2357,7 @@ int FastBootTool::Main(int argc, char* argv[]) { fb->CreatePartition(partition, size); } else if (command == FB_CMD_DELETE_PARTITION) { std::string partition = next_arg(&args); auto delete_task = std::make_unique<DeleteTask>(fp.get(), partition); fb->DeletePartition(partition); tasks.emplace_back(std::make_unique<DeleteTask>(fp.get(), partition)); } else if (command == FB_CMD_RESIZE_PARTITION) { std::string partition = next_arg(&args); std::string size = next_arg(&args); Loading Loading @@ -2407,15 +2405,14 @@ int FastBootTool::Main(int argc, char* argv[]) { } std::vector<std::string> partitions = {"userdata", "cache", "metadata"}; for (const auto& partition : partitions) { std::unique_ptr<WipeTask> wipe_task = std::make_unique<WipeTask>(fp.get(), partition); wipe_task->Run(); tasks.emplace_back(std::make_unique<WipeTask>(fp.get(), partition)); } } if (fp->wants_set_active) { fb->SetActive(next_active); } if (reboot_task) { reboot_task->Run(); for (auto& task : tasks) { task->Run(); } fprintf(stderr, "Finished. Total time: %.3fs\n", (now() - start)); Loading
fs_mgr/libsnapshot/Android.bp +21 −7 Original line number Diff line number Diff line Loading @@ -252,13 +252,6 @@ cc_defaults { header_libs: [ "libstorage_literals_headers", ], test_suites: [ "vts", "device-tests" ], test_options: { min_shipping_api_level: 29, }, auto_gen_config: true, require_root: true, compile_multilib: "first", Loading @@ -267,6 +260,13 @@ cc_defaults { cc_test { name: "vts_libsnapshot_test", defaults: ["libsnapshot_test_defaults", "libsnapshot_hal_deps"], test_suites: [ "vts", "device-tests" ], test_options: { min_shipping_api_level: 30, }, } cc_test { Loading @@ -275,6 +275,13 @@ cc_test { cppflags: [ "-DLIBSNAPSHOT_TEST_VAB_LEGACY", ], test_suites: [ "device-tests" ], test_options: { // Legacy VAB launched in Android R. min_shipping_api_level: 30, }, } cc_test { Loading @@ -283,6 +290,13 @@ cc_test { cppflags: [ "-DLIBSNAPSHOT_TEST_VABC_LEGACY", ], test_suites: [ "device-tests" ], test_options: { // Legacy VABC launched in Android S. min_shipping_api_level: 31, }, } cc_test { Loading
init/test_upgrade_mte/mte_upgrade_test.rc +2 −0 Original line number Diff line number Diff line Loading @@ -16,9 +16,11 @@ service mte_upgrade_test_helper /system/bin/mte_upgrade_test_helper ${sys.mte_cr class late_start disabled seclabel u:r:su:s0 user root service mte_upgrade_test_helper_overridden /system/bin/mte_upgrade_test_helper ${sys.mte_crash_test_uuid} class late_start disabled seclabel u:r:su:s0 user root setenv BIONIC_MEMTAG_UPGRADE_SECS 0
libmodprobe/libmodprobe.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -562,7 +562,7 @@ std::vector<std::string> Modprobe::ListModules(const std::string& pattern) { // Attempt to match both the canonical module name and the module filename. if (!fnmatch(pattern.c_str(), module.c_str(), 0)) { rv.emplace_back(module); } else if (!fnmatch(pattern.c_str(), basename(deps[0].c_str()), 0)) { } else if (!fnmatch(pattern.c_str(), android::base::Basename(deps[0]).c_str(), 0)) { rv.emplace_back(deps[0]); } } Loading
libprocessgroup/include/processgroup/processgroup.h +5 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ int killProcessGroup(uid_t uid, int initialPid, int signal, int* max_processes = // that it only returns 0 in the case that the cgroup exists and it contains no processes. int killProcessGroupOnce(uid_t uid, int initialPid, int signal, int* max_processes = nullptr); // Sends the provided signal to all members of a process group, but does not wait for processes to // exit, or for the cgroup to be removed. Callers should also ensure that killProcessGroup is called // later to ensure the cgroup is fully removed, otherwise system resources may leak. int sendSignalToProcessGroup(uid_t uid, int initialPid, int signal); int createProcessGroup(uid_t uid, int initialPid, bool memControl = false); // Set various properties of a process group. For these functions to work, the process group must Loading