Loading fastboot/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ cc_binary { ], header_libs: [ "avb_headers", "libsnapshot_headers", ] } Loading fastboot/device/flashing.cpp +29 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <ext4_utils/ext4_utils.h> #include <fs_mgr_overlayfs.h> #include <fstab/fstab.h> #include <libavb/libavb.h> #include <liblp/builder.h> #include <liblp/liblp.h> #include <libsnapshot/snapshot.h> Loading Loading @@ -122,6 +123,27 @@ int FlashBlockDevice(int fd, std::vector<char>& downloaded_data) { } } static void CopyAVBFooter(std::vector<char>* data, const uint64_t block_device_size) { if (data->size() < AVB_FOOTER_SIZE) { return; } std::string footer; uint64_t footer_offset = data->size() - AVB_FOOTER_SIZE; for (int idx = 0; idx < AVB_FOOTER_MAGIC_LEN; idx++) { footer.push_back(data->at(footer_offset + idx)); } if (0 != footer.compare(AVB_FOOTER_MAGIC)) { return; } // copy AVB footer from end of data to end of block device uint64_t original_data_size = data->size(); data->resize(block_device_size, 0); for (int idx = 0; idx < AVB_FOOTER_SIZE; idx++) { data->at(block_device_size - 1 - idx) = data->at(original_data_size - 1 - idx); } } int Flash(FastbootDevice* device, const std::string& partition_name) { PartitionHandle handle; if (!OpenPartition(device, partition_name, &handle)) { Loading @@ -131,8 +153,14 @@ int Flash(FastbootDevice* device, const std::string& partition_name) { std::vector<char> data = std::move(device->download_data()); if (data.size() == 0) { return -EINVAL; } else if (data.size() > get_block_device_size(handle.fd())) { } uint64_t block_device_size = get_block_device_size(handle.fd()); if (data.size() > block_device_size) { return -EOVERFLOW; } else if (data.size() < block_device_size && (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b")) { CopyAVBFooter(&data, block_device_size); } WipeOverlayfsForPartition(device, partition_name); return FlashBlockDevice(handle.fd(), data); Loading libbacktrace/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ cc_library_headers { "//apex_available:platform", "//apex_available:anyapex", ], min_sdk_version: "apex_inherit", } cc_defaults { Loading libprocinfo/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,12 @@ cc_library { enabled: false, }, }, apex_available: [ "//apex_available:platform", "com.android.art.debug", "com.android.art.release", ], } // Tests Loading libunwindstack/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,12 @@ cc_library { exclude_shared_libs: ["libdexfile_support"], }, }, apex_available: [ "//apex_available:platform", "com.android.art.debug", "com.android.art.release", ], } // Static library without DEX support to avoid dependencies on the ART APEX. Loading Loading
fastboot/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,7 @@ cc_binary { ], header_libs: [ "avb_headers", "libsnapshot_headers", ] } Loading
fastboot/device/flashing.cpp +29 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ #include <ext4_utils/ext4_utils.h> #include <fs_mgr_overlayfs.h> #include <fstab/fstab.h> #include <libavb/libavb.h> #include <liblp/builder.h> #include <liblp/liblp.h> #include <libsnapshot/snapshot.h> Loading Loading @@ -122,6 +123,27 @@ int FlashBlockDevice(int fd, std::vector<char>& downloaded_data) { } } static void CopyAVBFooter(std::vector<char>* data, const uint64_t block_device_size) { if (data->size() < AVB_FOOTER_SIZE) { return; } std::string footer; uint64_t footer_offset = data->size() - AVB_FOOTER_SIZE; for (int idx = 0; idx < AVB_FOOTER_MAGIC_LEN; idx++) { footer.push_back(data->at(footer_offset + idx)); } if (0 != footer.compare(AVB_FOOTER_MAGIC)) { return; } // copy AVB footer from end of data to end of block device uint64_t original_data_size = data->size(); data->resize(block_device_size, 0); for (int idx = 0; idx < AVB_FOOTER_SIZE; idx++) { data->at(block_device_size - 1 - idx) = data->at(original_data_size - 1 - idx); } } int Flash(FastbootDevice* device, const std::string& partition_name) { PartitionHandle handle; if (!OpenPartition(device, partition_name, &handle)) { Loading @@ -131,8 +153,14 @@ int Flash(FastbootDevice* device, const std::string& partition_name) { std::vector<char> data = std::move(device->download_data()); if (data.size() == 0) { return -EINVAL; } else if (data.size() > get_block_device_size(handle.fd())) { } uint64_t block_device_size = get_block_device_size(handle.fd()); if (data.size() > block_device_size) { return -EOVERFLOW; } else if (data.size() < block_device_size && (partition_name == "boot" || partition_name == "boot_a" || partition_name == "boot_b")) { CopyAVBFooter(&data, block_device_size); } WipeOverlayfsForPartition(device, partition_name); return FlashBlockDevice(handle.fd(), data); Loading
libbacktrace/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ cc_library_headers { "//apex_available:platform", "//apex_available:anyapex", ], min_sdk_version: "apex_inherit", } cc_defaults { Loading
libprocinfo/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,12 @@ cc_library { enabled: false, }, }, apex_available: [ "//apex_available:platform", "com.android.art.debug", "com.android.art.release", ], } // Tests Loading
libunwindstack/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,12 @@ cc_library { exclude_shared_libs: ["libdexfile_support"], }, }, apex_available: [ "//apex_available:platform", "com.android.art.debug", "com.android.art.release", ], } // Static library without DEX support to avoid dependencies on the ART APEX. Loading