Loading adb/client/commandline.cpp +22 −1 Original line number Diff line number Diff line Loading @@ -1005,7 +1005,8 @@ static int ppp(int argc, const char** argv) { #endif /* !defined(_WIN32) */ } static bool wait_for_device(const char* service) { static bool wait_for_device(const char* service, std::optional<std::chrono::milliseconds> timeout = std::nullopt) { std::vector<std::string> components = android::base::Split(service, "-"); if (components.size() < 3 || components.size() > 4) { fprintf(stderr, "adb: couldn't parse 'wait-for' command: %s\n", service); Loading Loading @@ -1043,6 +1044,13 @@ static bool wait_for_device(const char* service) { } std::string cmd = format_host_command(android::base::Join(components, "-").c_str()); if (timeout) { std::thread([timeout]() { std::this_thread::sleep_for(*timeout); fprintf(stderr, "timeout expired while waiting for device\n"); _exit(1); }).detach(); } return adb_command(cmd); } Loading Loading @@ -1084,8 +1092,21 @@ static bool adb_root(const char* command) { } // Wait for the device to go away. TransportType previous_type; const char* previous_serial; TransportId previous_id; adb_get_transport(&previous_type, &previous_serial, &previous_id); adb_set_transport(kTransportAny, nullptr, transport_id); wait_for_device("wait-for-disconnect"); // Wait for the device to come back. // If we were using a specific transport ID, there's nothing we can wait for. if (previous_id == 0) { adb_set_transport(previous_type, previous_serial, 0); wait_for_device("wait-for-device", 3000ms); } return true; } Loading bootstat/bootstat.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,8 @@ const std::map<std::string, int32_t> kBootReasonMap = { {"kernel_panic,dsps", 166}, {"kernel_panic,wcnss", 167}, {"kernel_panic,_sde_encoder_phys_cmd_handle_ppdone_timeout", 168}, {"recovery,quiescent", 169}, {"reboot,quiescent", 170}, }; // Converts a string value representing the reason the system booted to an Loading fs_mgr/libfiemap_writer/fiemap_writer.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -501,11 +501,12 @@ static bool ReadFibmap(int file_fd, const std::string& file_path, } if (!extents->empty() && block == last_block + 1) { extents->back().fe_length++; extents->back().fe_length += s.st_blksize; } else { extents->push_back(fiemap_extent{.fe_logical = block_number, .fe_physical = block, .fe_length = 1, extents->push_back( fiemap_extent{.fe_logical = block_number, .fe_physical = static_cast<uint64_t>(block) * s.st_blksize, .fe_length = static_cast<uint64_t>(s.st_blksize), .fe_flags = 0}); } last_block = block; Loading libasyncio/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ cc_library { name: "libasyncio", defaults: ["libasyncio_defaults"], vendor_available: true, double_loadable: true, recovery_available: true, host_supported: true, srcs: [ Loading libmemtrack/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ cc_library_shared { vndk: { enabled: true, }, double_loadable: true, srcs: ["memtrack.cpp"], export_include_dirs: ["include"], local_include_dirs: ["include"], Loading Loading
adb/client/commandline.cpp +22 −1 Original line number Diff line number Diff line Loading @@ -1005,7 +1005,8 @@ static int ppp(int argc, const char** argv) { #endif /* !defined(_WIN32) */ } static bool wait_for_device(const char* service) { static bool wait_for_device(const char* service, std::optional<std::chrono::milliseconds> timeout = std::nullopt) { std::vector<std::string> components = android::base::Split(service, "-"); if (components.size() < 3 || components.size() > 4) { fprintf(stderr, "adb: couldn't parse 'wait-for' command: %s\n", service); Loading Loading @@ -1043,6 +1044,13 @@ static bool wait_for_device(const char* service) { } std::string cmd = format_host_command(android::base::Join(components, "-").c_str()); if (timeout) { std::thread([timeout]() { std::this_thread::sleep_for(*timeout); fprintf(stderr, "timeout expired while waiting for device\n"); _exit(1); }).detach(); } return adb_command(cmd); } Loading Loading @@ -1084,8 +1092,21 @@ static bool adb_root(const char* command) { } // Wait for the device to go away. TransportType previous_type; const char* previous_serial; TransportId previous_id; adb_get_transport(&previous_type, &previous_serial, &previous_id); adb_set_transport(kTransportAny, nullptr, transport_id); wait_for_device("wait-for-disconnect"); // Wait for the device to come back. // If we were using a specific transport ID, there's nothing we can wait for. if (previous_id == 0) { adb_set_transport(previous_type, previous_serial, 0); wait_for_device("wait-for-device", 3000ms); } return true; } Loading
bootstat/bootstat.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -293,6 +293,8 @@ const std::map<std::string, int32_t> kBootReasonMap = { {"kernel_panic,dsps", 166}, {"kernel_panic,wcnss", 167}, {"kernel_panic,_sde_encoder_phys_cmd_handle_ppdone_timeout", 168}, {"recovery,quiescent", 169}, {"reboot,quiescent", 170}, }; // Converts a string value representing the reason the system booted to an Loading
fs_mgr/libfiemap_writer/fiemap_writer.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -501,11 +501,12 @@ static bool ReadFibmap(int file_fd, const std::string& file_path, } if (!extents->empty() && block == last_block + 1) { extents->back().fe_length++; extents->back().fe_length += s.st_blksize; } else { extents->push_back(fiemap_extent{.fe_logical = block_number, .fe_physical = block, .fe_length = 1, extents->push_back( fiemap_extent{.fe_logical = block_number, .fe_physical = static_cast<uint64_t>(block) * s.st_blksize, .fe_length = static_cast<uint64_t>(s.st_blksize), .fe_flags = 0}); } last_block = block; Loading
libasyncio/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ cc_library { name: "libasyncio", defaults: ["libasyncio_defaults"], vendor_available: true, double_loadable: true, recovery_available: true, host_supported: true, srcs: [ Loading
libmemtrack/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ cc_library_shared { vndk: { enabled: true, }, double_loadable: true, srcs: ["memtrack.cpp"], export_include_dirs: ["include"], local_include_dirs: ["include"], Loading