| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Test: make
Change-Id: Ic77c4669574b6129e06aa6051804f419bcc8196c
|
|
|
|
|
|
|
|
|
| |
https://code.google.com/p/android/issues/detail?id=230602
On the second attempt, open the file with O_RDONLY,
which causing a write failure。
Change-Id: If89165b8c7619fe25722073a46b3cc7c61530a71
Signed-off-by: katao <ustckato@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
We should always use unique_fd or unique_file to hold the FD or FILE*
pointer when opening via ota_(f)open functions.
This CL avoids accidentally closing raw FDs or FILE* pointers that are
managed by unique_fd/unique_file.
Test: recovery_component_test passes.
Change-Id: If58eb8b5c5da507563f85efd5d56276472a1c957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using the below sequence prior to the CL in [1].
unique_fd fd(ota_open(...));
ota_close(fd);
fd.reset(ota_open(...));
fd.reset() may unintentionally close the newly opened FD if it
has the same value as the early ota_open. The CL in [1] changed to
"ota_close(fd.release())" to avoid the issue. This CL adds a new
overloaded function ota_close(unique_fd&) to handle the release
automatically.
Similarly add ota_fclose(std::unique_ptr<FILE>&).
[1] commit 48cf770471ef53fbf0a1837196220862a0bdb18d.
Bug: 33034669
Test: recovery_component_test passes.
Change-Id: Ief91edc590e95a7426e33364b28754173efb1056
|
|
|
|
|
|
|
|
|
|
|
| |
We use android::base::unique_fd() to avoid leaking FD. We also want to
call close (or ota_close) to explicitly check the close result. When
combining the two together, we need to release the unique_fd to avoid
closing the same FD twice.
Bug: 33034669
Test: Trigger applypatch with install-recovery.sh.
Change-Id: I1a4f5d5fba7a23ef98d8bd7b7b07e87ae6f705c5
|
|
|
|
|
|
|
|
|
| |
Add unique_fd that calls ota_close() instead of the default closer.
Test: recovery_component_test passes.
Test: Apply a package that calls apply_patch().
Change-Id: I0c19921731757934f76cf7d5215916673a8f2777
|
|
|
|
|
|
|
|
|
| |
We don't need three vectors to sort the (size, SHA-1) pairs.
Test: recovery_component_test passes.
Test: Apply a package that calls apply_patch_check() to patch EMMC
partitions.
Change-Id: I4a6620630a6711f490822cf30f1e7fe5cea6ce49
|
|
|
|
|
|
| |
Test: Unit tests and install-recovery.sh pass on angler and dragon.
Change-Id: I328e6554edca667cf850f5584ebf1ac211e3d4d1
|
|
|
|
|
|
|
|
|
|
|
| |
Applypatch_check should be skipped if no sha is specified. As the
comments said: "It's okay to specify no sha1s; the check will pass if
the LoadFileContents is successful. Useful for reading partitions,
where the filename encodes the sha1s."
Test: The update package applied on angler successfully.
Bug: 32243751
Change-Id: Ib8f3dadf19f745c2dbd350d60da46ab12d75bc87
|
|
|
|
|
|
|
|
|
|
|
| |
Changing the field of 'Value' in edify to std::string from char*.
Meanwhile cleaning up the users of 'Value' and switching them to
cpp style.
Test: compontent tests passed.
Bug: 31713288
Change-Id: Iec5a7d601b1e4ca40935bf1c70d325dafecec235
|
|
|
|
|
|
|
|
|
|
| |
We might end up in an infinite loop if read(2) reached EOF unexpectedly.
The problematic code in uncrypt mentioned in the bug has been fixed
by switching to libbase ReadFully(). So I grepped through the recovery
code and fixed some other occurences of the issue.
Bug: 31073201
Change-Id: Ib867029158ba23363b8f85d61c25058a635c5a6b
|
|
|
|
|
| |
Bug: http://b/29250988
Change-Id: Ia97ba9082a165c37f74d6e1c3f71a367adc59945
|
|
|
|
|
| |
Bug: 28220065
Change-Id: Ida199c66692a1638be6990d583d2ed42583fb592
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If two libraries both use LOCAL_WHOLE_STATIC_LIBRARIES and include a same
library, there would be linking errors when generating a shared library
(or executable) that depends on the two libraries both.
Also clean up Android.mk files.
Remove the "LOCAL_MODULE_TAGS := eng" line for the updater module. The
module will then default to "optional" which won't be built until needed.
Change-Id: I3ec227109b8aa744b7568e7f82f575aae3fe0e6f
|
|
|
|
|
|
| |
Bug: 26570379
Change-Id: I76109d09276d6e3ed3a32b6fedafb2582f545c0c
(cherry picked from commit d940887dde23597dc358b16d96ca48dd7480fee6)
|
|
|
|
|
| |
Bug: 26906416
Change-Id: Ib53b445cd415a1ed5e95733fbc4073f9ef4dbc43
|
|
|
|
|
|
| |
Bug: 25951086
Change-Id: I31c74c735eb7a975b7f41fe2b2eff042e5699c0c
(cherry-picked from commit f1fc48c6e62cfee42d25ad12f443e22d50c15d0b)
|
|
|
|
|
| |
Bug: 26906416
Change-Id: I163df5a8f3abda3ba5d4ed81dfc8567054eceb27
|
|
|
|
|
| |
Bug: 18790686
Change-Id: I7d2136fb39b2266f5ae5be24819c617b08a6c21e
|
|
|
|
| |
Change-Id: I354a8c424d340a9abe21fd716a4ee0d3b177d86f
|
|
|
|
|
|
|
| |
So we can remove a few free()s. And also replace a few pointers with
references.
Change-Id: I4b6332216704f4f9ea4a044b8d4bb7aa42a7ef26
|
|
|
|
|
|
|
|
| |
WriteToPartition() should consider a target name as valid if it contains
multiple colons. But only the first two fields will be used.
Bug: 22725128
Change-Id: Ie9404375e24045c115595eec6ce5b6423da8fc3e
|
|
|
|
|
|
|
|
|
|
| |
We may carry a full copy of recovery image in the /system, and use
/system/bin/install-recovery.sh to install the recovery. This CL adds
support to flash the recovery partition with the given image.
Bug: 22641135
Change-Id: I7a275b62fdd1bf41f97f6aab62d0200f7dae5aa1
(cherry picked from commit 68c5a6796737bb583a8bdfa4c9cd9c7f12ef4276)
|
|
|
|
|
|
|
| |
We have android::base::Split() for the work.
Change-Id: I0fb562feb203c9b15e2f431d8e84355fd682376a
(cherry picked from commit 0a47ce27de454e272a883a0c452fad627fd7f419)
|
|
Mostly trivial changes to make cpp compiler happy.
Change-Id: I69bd1d96fcccf506007f6144faf37e11cfba1270
|