Commit Graph

1809 Commits

Author SHA1 Message Date
Tao Bao ef911716b0 Merge "res: Embed FPS into icon_installing.png."
am: 29b0fbe160

* commit '29b0fbe160f815a142fa0d056c1ce10186cea516':
  res: Embed FPS into icon_installing.png.
2015-12-18 22:30:28 +00:00
Tao Bao 29b0fbe160 Merge "res: Embed FPS into icon_installing.png." 2015-12-18 22:20:20 +00:00
Tao Bao b723f4f38f res: Embed FPS into icon_installing.png.
We allow vendor-specific icon installing image but have defined private
animation_fps that can't be overridden. This CL changes the image
generator to optionally embed FPS (otherwise use the default value of
20) into the generated image.

For wear devices, they are using individual images instead of the
interlaced one. Change the animation_fps from private to protected so
that it can be customized.

Bug: 26009230
Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e
2015-12-16 11:35:52 -08:00
Tao Bao 125a6349b9 Merge "updater: Use O_SYNC and fsync() for package_extract_file()."
am: 4e72d1a81e

* commit '4e72d1a81e2194caf101dc8633858efaa9bdb39b':
  updater: Use O_SYNC and fsync() for package_extract_file().
2015-12-15 18:23:53 +00:00
Tao Bao 4e72d1a81e Merge "updater: Use O_SYNC and fsync() for package_extract_file()." 2015-12-15 17:55:05 +00:00
Tao Bao d3cac34430 updater: Use O_SYNC and fsync() for package_extract_file().
We are already using O_SYNC and fsync() for the recursive case
(package_extract_dir()). Make it consistent for the single-file case.

Bug: 20625549
Change-Id: I487736fe5a0647dd4a2428845e76bf642e0f0dff
2015-12-14 17:13:34 -08:00
Tao Bao 1a76924301 Merge "update_verifier: Track the API change for isSlotBootable()."
am: e062645efa

* commit 'e062645efa77ce3ab9ab802daee9e36b58e67bc4':
  update_verifier: Track the API change for isSlotBootable().
2015-12-10 21:00:17 -08:00
Tao Bao e062645efa Merge "update_verifier: Track the API change for isSlotBootable()." 2015-12-11 04:53:48 +00:00
Tao Bao 8fa5f006c1 Merge "uncrypt: Suppress the compiler warnings on LP64."
am: ca18526760

* commit 'ca185267607fff06b4d70c7bdbb23152f64d4582':
  uncrypt: Suppress the compiler warnings on LP64.
2015-12-10 16:50:03 -08:00
Tao Bao ca18526760 Merge "uncrypt: Suppress the compiler warnings on LP64." 2015-12-11 00:43:18 +00:00
Tianjie Xu 3e67970c2c Merge "updater: Output msg when recovery is called"
am: 32f6298742

* commit '32f6298742d5072c4b0d9f1cd09e0d0ae44cb972':
  updater: Output msg when recovery is called
2015-12-10 16:32:26 -08:00
Tianjie Xu 32f6298742 Merge "updater: Output msg when recovery is called" 2015-12-11 00:23:45 +00:00
Tianjie Xu 3b010bc393 updater: Output msg when recovery is called
Output messages in log when recovery is attempted or succeeded during
incremental OTA update.

Change-Id: I4033df7ae3aaecbc61921d5337eda26f79164fda
(cherry picked from commit b686ba2114)
2015-12-10 16:20:48 -08:00
Tao Bao 612161ef1c update_verifier: Track the API change for isSlotBootable().
[1] added a new API isSlotMarkedSuccessful() to actually query if a
given slot has been marked as successful.

[1]: commit 72c88c915d957bf2eba73950e7f0407b220d1ef4

Change-Id: I9155c9b9233882a295a9a6e607a844d9125e4c56
2015-12-09 14:41:40 -08:00
Tao Bao b8df5fb90e uncrypt: Suppress the compiler warnings on LP64.
We have the following warnings when compiling uncrypt on LP64 (e.g.
aosp_angler-userdebug).

bootable/recovery/uncrypt/uncrypt.cpp:77:53: warning: format specifies type 'long long' but the argument has type 'off64_t' (aka 'long') [-Wformat]
        ALOGE("error seeking to offset %lld: %s\n", offset, strerror(errno));
                                       ~~~~         ^~~~~~
                                       %ld
bootable/recovery/uncrypt/uncrypt.cpp:84:54: warning: format specifies type 'long long' but the argument has type 'unsigned long' [-Wformat]
            ALOGE("error writing offset %lld: %s\n", (offset + written), strerror(errno));
                                        ~~~~         ^~~~~~~~~~~~~~~~~~
                                        %lu
bootable/recovery/uncrypt/uncrypt.cpp:246:16: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'off_t' (aka 'long') [-Wsign-compare]
    while (pos < sb.st_size) {
           ~~~ ^ ~~~~~~~~~~

According to POSIX spec [1], we have:
  off_t and blksize_t shall be signed integer types;
  size_t shall be an unsigned integer type;
  blksize_t and size_t are no greater than the width of type long.

And on Android, we always have a 64-bit st_size from stat(2)
(//bionic/libc/include/sys/stat.h).

Fix the type and add necessary casts to suppress the warnings.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html

Change-Id: I5d64d5b7919c541441176c364752de047f9ecb20
2015-12-09 10:45:39 -08:00
Tao Bao 50b7cfa5d7 Merge changes If00669a7,Ia5504ed2
am: ddde4676b6

* commit 'ddde4676b6c0e175699115a67e44f09a665439b5':
  update_verifier: Log to logd instead of kernel log.
  Add update_verifier for A/B OTA update.
2015-12-08 19:33:10 +00:00
Tao Bao 26edcd8f5a Merge "updater: Replace strtok() with android::base::Split()."
am: d0acbb56ed

* commit 'd0acbb56ed9c002ccd8021b3e09567647b499e58':
  updater: Replace strtok() with android::base::Split().
2015-12-08 11:26:02 -08:00
Tao Bao ddde4676b6 Merge changes If00669a7,Ia5504ed2
* changes:
  update_verifier: Log to logd instead of kernel log.
  Add update_verifier for A/B OTA update.
2015-12-08 19:25:26 +00:00
Tao Bao 740e01e2bd update_verifier: Log to logd instead of kernel log.
logd already gets started before we call update_verifier.

Bug: 26039641
Change-Id: If00669a77bf9a6e5534e33f4e50b42eabba2667a
(cherry picked from commit 45eac58ef1)
2015-12-08 11:24:35 -08:00
Tao Bao 7197ee0e39 Add update_verifier for A/B OTA update.
update_verifier checks the integrity of the updated system and vendor
partitions on the first boot post an A/B OTA update. It marks the
current slot as having booted successfully if it passes the verification.

This CL doesn't perform any actual verification work which will be
addressed in follow-up CLs.

Bug: 26039641
Change-Id: Ia5504ed25b799b48b5886c2fc68073a360127f42
(cherry picked from commit 1171d3a12b)
2015-12-08 11:24:11 -08:00
Tao Bao d0acbb56ed Merge "updater: Replace strtok() with android::base::Split()." 2015-12-08 19:18:29 +00:00
Tao Bao 8162eca526 update_verifier: Log to logd instead of kernel log.
am: 45eac58ef1

* commit '45eac58ef188679f6df2d80efc0391c6d7904cd8':
  update_verifier: Log to logd instead of kernel log.
2015-12-07 17:53:41 -08:00
Tao Bao 45eac58ef1 update_verifier: Log to logd instead of kernel log.
logd already gets started before we call update_verifier.

Bug: 26039641
Change-Id: If00669a77bf9a6e5534e33f4e50b42eabba2667a
2015-12-07 17:23:49 -08:00
Tao Bao 6bc2155d22 Add update_verifier for A/B OTA update.
am: 1171d3a12b

* commit '1171d3a12b13ca3f1d4301985cf068076e55ae26':
  Add update_verifier for A/B OTA update.
2015-12-08 00:22:07 +00:00
Tao Bao 1171d3a12b Add update_verifier for A/B OTA update.
update_verifier checks the integrity of the updated system and vendor
partitions on the first boot post an A/B OTA update. It marks the
current slot as having booted successfully if it passes the verification.

This CL doesn't perform any actual verification work which will be
addressed in follow-up CLs.

Bug: 26039641
Change-Id: Ia5504ed25b799b48b5886c2fc68073a360127f42
2015-12-07 10:25:02 -08:00
Tao Bao baad2d454d updater: Replace strtok() with android::base::Split().
Change-Id: I36346fa199a3261da1ae1bc310b3557fe1716d96
2015-12-06 16:56:27 -08:00
Elliott Hughes ff4c2c07e8 Merge "Track rename from base/ to android-base/."
am: 06ca938ce2

* commit '06ca938ce22681455bf75f0b6282b776814df30e':
  Track rename from base/ to android-base/.
2015-12-04 23:43:39 +00:00
Elliott Hughes 06ca938ce2 Merge "Track rename from base/ to android-base/." 2015-12-04 23:33:59 +00:00
Elliott Hughes 4b166f0e69 Track rename from base/ to android-base/.
Change-Id: I354a8c424d340a9abe21fd716a4ee0d3b177d86f
2015-12-04 15:30:20 -08:00
Tao Bao 0eded2ae7f Merge "Remove the building rules for applypatch_static."
am: fc23a50cef

* commit 'fc23a50cef6347651b2d25facd53cf6d50cfae67':
  Remove the building rules for applypatch_static.
2015-12-02 23:09:11 +00:00
Tao Bao fc23a50cef Merge "Remove the building rules for applypatch_static." 2015-12-02 22:54:52 +00:00
Tao Bao f2448d0cd5 Remove the building rules for applypatch_static.
The CL in [1] has stopped building and packaging the obsolete
applypatch_static tool.

[1]: commit a04fca31bf1fadcdf982090c942ccbe4d9b95c71

Bug: 24621915
Change-Id: I5e98951ad7ea5c2a7b351af732fd6722763f59bd
2015-12-02 14:05:38 -08:00
Elliott Hughes cca6ca0953 Merge "Track name change from adb_main to adb_server_main."
am: ee5c87eea7

* commit 'ee5c87eea737e47ab38e19625a32ac2fc0057ddd':
  Track name change from adb_main to adb_server_main.
2015-11-20 21:14:27 +00:00
Elliott Hughes ee5c87eea7 Merge "Track name change from adb_main to adb_server_main." 2015-11-20 21:06:51 +00:00
Elliott Hughes 9f4fdb3def Track name change from adb_main to adb_server_main.
Change-Id: I835805348a9817c81639ad8471e3b49cae93c107
2015-11-20 13:03:24 -08:00
David Zeuthen 8f9a1575aa Add slot_suffix field to struct bootloader_message.
am: 846c094fee

* commit '846c094fee9e50ed2b2e63dee17f5bafb2b9d1ce':
  Add slot_suffix field to struct bootloader_message.
2015-11-19 23:00:30 +00:00
Qiwen Zhao a550e6b412 Merge commit '8f90389966fabf532b24741d49245215279533e1' into mnc-dr2-dev-plus-aosp 2015-11-19 14:56:59 -08:00
Qiwen Zhao 312f7c71f4 Merge commit '32ac97675bade3681203c46d001f76b11a359fd5' into mnc-dr2-dev-plus-aosp 2015-11-19 14:56:45 -08:00
Qiwen Zhao 681b3c9fd0 Merge commit 'f47259b18492c921445d9e437a9f9ed11c52fac6' into mnc-dr2-dev-plus-aosp 2015-11-19 14:56:28 -08:00
Qiwen Zhao 06ec3bab56 Merge commit '3b199267d6d4c279cbef3286a74e16bf92dd8d8a' into mnc-dr2-dev-plus-aosp 2015-11-19 14:56:14 -08:00
Qiwen Zhao 8b254cfc3c Merge commit '27604fcbee0010b800bfc16b5bf7a48c365c2cf3' into mnc-dr2-dev-plus-aosp 2015-11-19 14:56:00 -08:00
Tao Bao f4848f63ad DO NOT MERGE recovery: Switch applypatch/ and updater/ to cpp.
am: 818fa781d1  -s ours

* commit '818fa781d1dbe35c0c5bfff3ebff1b45a2a676f0':
  DO NOT MERGE recovery: Switch applypatch/ and updater/ to cpp.
2015-11-19 22:53:47 +00:00
Sami Tolvanen 81faa274d0 Add error and range checks to parse_range
am: 806f72f9e6  -s ours

* commit '806f72f9e6ec0d15b550b79b0baa92a93fc646e3':
  Add error and range checks to parse_range
2015-11-19 22:47:41 +00:00
Dan Albert 34a265cbac Stop using libstdc++.
am: 56deefba73  -s ours

* commit '56deefba73fb318ba0498da49adc64de960a6e29':
  Stop using libstdc++.
2015-11-19 22:42:24 +00:00
Tao Bao 29cc06e50c recovery: Switch to clang
am: 7101b2e285  -s ours

* commit '7101b2e2854985727b7ef65e5b5057e0ecf2d034':
  recovery: Switch to clang
2015-11-19 21:59:07 +00:00
David Zeuthen 846c094fee Add slot_suffix field to struct bootloader_message.
This is needed by fs_mgr for certain A/B implementations.

Change-Id: I7bb404d61198eb7a962c2b693911f5156745daae
2015-11-16 14:28:40 -08:00
Tao Bao 8f90389966 recovery: Allow "Mount /system" for system_root_image.
When system images contain the root directory, there is no entry of
"/system" in the fstab. Change it to look for "/" instead if
ro.build.system_root_image is true. We actually mount the partition
to /system_root instead, and create a symlink to /system_root/system
for /system. This allows "adb shell" to work properly.

Bug: 22855115
Change-Id: I91864444950dc3229fda3cc133ddbadeb8817fb8
(cherry picked from commit abb8f7785e)
2015-11-16 14:28:40 -08:00
Tao Bao 32ac97675b applypatch: Fix the checking in WriteToPartition().
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: I9d0236eaf97df9db9704acf53690d0ef85188e45
(cherry picked from commit 1ce7a2a63d)
2015-11-16 14:28:40 -08:00
Tao Bao f47259b184 applypatch: Support flash mode.
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: I345eaaee269f6443527f45a9be7e4ee47f6b2b39
(cherry picked from commit 68c5a67967)
2015-11-16 14:28:40 -08:00
Tao Bao 3b199267d6 updater: libapplypatch needs libbase now.
Change-Id: Ibe3173edd6274b61bd9ca5ec394d7f6b4a403639
(cherry picked from commit 1b1ea17d55)
2015-11-16 14:28:40 -08:00