diff options
author | Steven Laver <lavers@google.com> | 2020-06-08 13:48:41 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-06-08 13:48:41 +0000 |
commit | 704c593cd17de6a62a67b90da931ff85f80cd04a (patch) | |
tree | 642d52ecfb99410913c50b2c0007c6fb5d41eb97 | |
parent | 74820d3741ecfa429245bb7acb59959b92312bda (diff) | |
parent | e10aa6028be72504c8db7cd9cad53cb810dbc56b (diff) |
Merge "Merge RP1A.200605.001" into r-keystone-qcom-dev
-rw-r--r-- | adb/tools/check_ms_os_desc.cpp | 2 | ||||
-rw-r--r-- | libsparse/sparse.cpp | 12 | ||||
-rw-r--r-- | libstats/pull/stats_pull_atom_callback.cpp | 6 | ||||
-rw-r--r-- | rootdir/init.rc | 2 |
4 files changed, 19 insertions, 3 deletions
diff --git a/adb/tools/check_ms_os_desc.cpp b/adb/tools/check_ms_os_desc.cpp index 8743ff725..8e858094a 100644 --- a/adb/tools/check_ms_os_desc.cpp +++ b/adb/tools/check_ms_os_desc.cpp @@ -131,8 +131,6 @@ static void check_ms_os_desc_v1(libusb_device_handle* device_handle, const std:: errx(1, "failed to retrieve MS OS v1 compat descriptor: %s", libusb_error_name(rc)); } - memcpy(&hdr, data.data(), data.size()); - struct __attribute__((packed)) ms_os_desc_v1_function { uint8_t bFirstInterfaceNumber; uint8_t reserved1; diff --git a/libsparse/sparse.cpp b/libsparse/sparse.cpp index 24c6379cd..8622b4c39 100644 --- a/libsparse/sparse.cpp +++ b/libsparse/sparse.cpp @@ -136,11 +136,23 @@ static int write_all_blocks(struct sparse_file* s, struct output_file* out) { return 0; } +/* + * This is a workaround for 32-bit Windows: Limit the block size to 64 MB before + * fastboot executable binary for windows 64-bit is released (b/156057250). + */ +#define MAX_BACKED_BLOCK_SIZE ((unsigned int) (64UL << 20)) + int sparse_file_write(struct sparse_file* s, int fd, bool gz, bool sparse, bool crc) { + struct backed_block* bb; int ret; int chunks; struct output_file* out; + for (bb = backed_block_iter_new(s->backed_block_list); bb; bb = backed_block_iter_next(bb)) { + ret = backed_block_split(s->backed_block_list, bb, MAX_BACKED_BLOCK_SIZE); + if (ret) return ret; + } + chunks = sparse_count_chunks(s); out = output_file_open_fd(fd, s->block_size, s->len, gz, sparse, chunks, crc); diff --git a/libstats/pull/stats_pull_atom_callback.cpp b/libstats/pull/stats_pull_atom_callback.cpp index 0b9dd5292..478cae760 100644 --- a/libstats/pull/stats_pull_atom_callback.cpp +++ b/libstats/pull/stats_pull_atom_callback.cpp @@ -131,7 +131,11 @@ class StatsPullAtomCallbackInternal : public BnPullAtomCallback { parcels.push_back(std::move(p)); } - resultReceiver->pullFinished(atomTag, success, parcels); + Status status = resultReceiver->pullFinished(atomTag, success, parcels); + if (!status.isOk()) { + std::vector<StatsEventParcel> emptyParcels; + resultReceiver->pullFinished(atomTag, /*success=*/false, emptyParcels); + } for (int i = 0; i < statsEventList.data.size(); i++) { AStatsEvent_release(statsEventList.data[i]); } diff --git a/rootdir/init.rc b/rootdir/init.rc index e95d005be..89323cc8a 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -530,6 +530,8 @@ on post-fs mkdir /metadata/apex 0700 root system mkdir /metadata/apex/sessions 0700 root system + + mkdir /metadata/staged-install 0770 root system on late-fs # Ensure that tracefs has the correct permissions. # This does not work correctly if it is called in post-fs. |