Commit Graph

9577 Commits

Author SHA1 Message Date
xiaolu 38c3aa78ca openrecoveryscript: really append ORS command to ORS script file.
for example, in "/cache/recovery/command" :
--wipe_data
--update-package=/sdcard/1.zip

Change-Id: I70c92a868372dca48024e303a0778f9409ab0dc9
2015-12-22 12:19:12 -06:00
Matt Mower 047723c5aa selinux: Only union sepolicy in SDKs 21,22
Manual union is not needed in Android 6.0+.

Change-Id: I7e321fb90b4333da349cc8ad8d2d78d990258b65
2015-12-22 11:59:27 -06:00
Matt Mower 666d151d6e twrpTar: Remove redundant -g CFLAG
Change-Id: Ifefd159b1bc25cd0f54220ae1bd7407c08ca9cfb
2015-12-22 11:53:10 -06:00
Matt Mower 1777cdc93c Remove unnecessary quoting from twres path
The C flag defines already use -DVAR=\"..\", so stripping these extra quotes
should not affect those defines.

The makefile does not need the quoting at all.

Makefile example output...
before: mkdir -p (omitted)/recovery/root"/twres/"
after:  mkdir -p (omitted)/recovery/root/twres/

Change-Id: I8f557662eb18b5ea40b63bc055d12be4440251e6
2015-12-22 11:46:04 -06:00
Ethan Yonker ceb1e8a5fc Fix CLANG error in cryptfs.c
Change-Id: If5af8f634bc016160aebaf7d4e6cda6c5650a077
2015-12-22 11:41:40 -06:00
Matt Mower 72cf09d617 mtp: Address clang compilation errors
* Move default value of debug_enabled to declaration
* Set more-correct fake values for MtpProperty sets

Change-Id: Ife3c15ac6c908848c16a609e8e505336e53c19d8
2015-12-22 11:37:30 -06:00
Matt Mower 582949125c f2fs: Update make rules for CM compatibility
* Make sure fsck.f2fs and mkfs.f2fs are built for CM12.1/13.0
* Add CM13.0 rule for relinking mkfs.f2fs
* Minor cleanup of nested if/else in prebuilts

Note on CM SDKs: 3=cm-12.1, 4=cm-13.0
I'm not yet sure whether it is possible that the CMSDK increments
within the same branch of CM.

Change-Id: I7b521159a8b5d0e0ea639f5e0fdd885100612df0
2015-12-22 11:25:34 -06:00
Ethan Yonker ab7955d874 Improve string resource lookup in twmsg
Change-Id: Iaac7d3df0bd12a4d817d4ad273254662865b775a
2015-12-21 10:18:03 -06:00
Ethan Yonker 9ce9591cfb twmsg: fix notfound detection
Change-Id: Ie95fdfaed7011994ac11202d070edeb95032b805
2015-12-20 22:50:23 -06:00
Ethan Yonker 56db1c4e7f Fix gui_msg %s to {1} call
Change-Id: I39f032e0cad5d482d11e0e8d1c4c7c3e7ec6d041
2015-12-20 22:49:00 -06:00
that d62d886d9c twmsg: fix build error (isdigit not declared)
Change-Id: I3101d15e5d94241cf8e583d1e06e09f3bc8b31f7
2015-12-20 20:40:15 +01:00
The Android Automerger c6df03643a merge in nyc-release history after reset to master 2015-12-20 00:00:23 -08:00
that 58a413380c dosfstools: restore buildability with Android 4.4
Bionic in Android 4.4 don't have setmntent

Change-Id: I8f9f03c084bd9c853b566fd94f6208566330cdc8
2015-12-19 16:45:33 +02:00
Ethan Yonker d18a821e00 Use ioctl to get block device size
AMLogic based device uses paths like /dev/block/recovery and the
stock init binary either deletes or does not create mmcblk0p12
which breaks TWRP because TWRP cannot match up the path / name.
The ioctl method is probably more reliable anyway and certainly
should be faster.

Change-Id: I73f981dcec637cdf5b189bdefa00ea15b924b500
2015-12-19 08:38:12 -06:00
Ethan Yonker 74db157b94 Multiple Language Support
This is similar to https://gerrit.omnirom.org/#/c/14014

A lot of the features built in the older patch set have been split
out into separate patches, most of which have already been merged.
The remaining functionality here should all be directly related to
language selection and loading. We always load English as a base
before loading other languages over the top of the base. The idea
is that if another language is missing a translation, then we will
still display the English.

Maybe still to do: read the /cache/recovery/last_locale file and
load a language based on that. For me, this file contains just:
en_US
We probably won't bother with region specific translations so we
would have to look at either trimming off the _US or using some
other method like perhaps a symlink or a combination of the two.

Thanks to _that for twmsg.cpp class

Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
2015-12-19 08:31:01 -06:00
z31s1g 28f0a92bb2 gui: stock theme rework
Tries to combine the current theme with a touch of material.
Page structure is untouched for the most part.
Layout grid is changed to achieve a "less random" placement of
objects on a page.

Change-Id: Icaf796be410431b17d5be6ccc1134d40912bef0b
2015-12-19 08:28:11 -06:00
Tao Bao 2538b952b8 Merge "res: Embed FPS into icon_installing.png." am: 29b0fbe160
am: ef911716b0

* commit 'ef911716b04a773bcba1e693638cfd9cbb9e4ddc':
  res: Embed FPS into icon_installing.png.
2015-12-18 22:32:36 +00:00
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
Tianjie Xu 30bf476559 updater: Add a function to check first block
Add and register a function to check if the device has been remounted
since last update during incremental OTA. This function reads block 0
and executes before partition recovery for version >= 4.

Bug: 21124327
Change-Id: I8b915b9f1d4736b3609daa9d16bd123225be357f
2015-12-18 13:35:35 -08: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
The Android Automerger 242da42acc merge in nyc-release history after reset to master 2015-12-16 00:00:25 -08:00
Tao Bao afd85ecad2 Merge "updater: Use O_SYNC and fsync() for package_extract_file()." am: 4e72d1a81e
am: 125a6349b9

* commit '125a6349b9b390bd531690099939aaaf8a7513a8':
  updater: Use O_SYNC and fsync() for package_extract_file().
2015-12-15 18:32:33 +00: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
The Android Automerger b22ad34aa7 merge in nyc-release history after reset to master 2015-12-13 00:00:38 -08:00
Tao Bao 3af5e554af Merge "update_verifier: Track the API change for isSlotBootable()." am: e062645efa
am: 1a76924301

* commit '1a7692430123ec4af3acc01c4d08f738efc12513':
  update_verifier: Track the API change for isSlotBootable().
2015-12-10 21:02:56 -08:00
Tao Bao 5ac61d7a9e Merge "uncrypt: Suppress the compiler warnings on LP64." am: ca18526760
am: 8fa5f006c1

* commit '8fa5f006c190c1f4a9e48cfbf4112ca15459cbb1':
  uncrypt: Suppress the compiler warnings on LP64.
2015-12-10 21:02:52 -08:00
Tianjie Xu 9c4fbbcde7 Merge "updater: Output msg when recovery is called" am: 32f6298742
am: 3e67970c2c

* commit '3e67970c2cbbed221f8c33fafa6b2f44a50cacb3':
  updater: Output msg when recovery is called
2015-12-10 21:02:47 -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
Tianjie Xu 72c87cc88f Merge "updater: Output msg when recovery is called" 2015-12-11 00:12:30 +00:00
Tianjie Xu b686ba2114 updater: Output msg when recovery is called
Output messages in log when recovery is attempted or succeeded during
incremental OTA update.

Change-Id: I4033df7ae3aaecbc61921d5337eda26f79164fda
2015-12-10 11:12:29 -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
The Android Automerger de09a8854a merge in nyc-release history after reset to master 2015-12-09 00:00:16 -08:00
Ethan Yonker dc3bc46a82 Rename libexfat target to prevent conflicts
Change-Id: I5d2774c273a90c1f02c074f3c947c13b265972b3
2015-12-08 15:13:35 -06:00
Tao Bao 78837c285a Merge changes If00669a7,Ia5504ed2 am: ddde4676b6
am: 50b7cfa5d7

* commit '50b7cfa5d7d9bdd1607c6c4276c63efa9e51e341':
  update_verifier: Log to logd instead of kernel log.
  Add update_verifier for A/B OTA update.
2015-12-08 19:36:55 +00: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 8594fabc36 Merge "updater: Replace strtok() with android::base::Split()." am: d0acbb56ed
am: 26edcd8f5a

* commit '26edcd8f5a60ad80e98d8d289aa0130ba199c2a4':
  updater: Replace strtok() with android::base::Split().
2015-12-08 11:29:34 -08:00
Tao Bao 8ff5c46ce8 update_verifier: Log to logd instead of kernel log. am: 45eac58ef1
am: 8162eca526

* commit '8162eca52659307879d086feb195f24d3d58e749':
  update_verifier: Log to logd instead of kernel log.
2015-12-08 11:29:31 -08:00
Tao Bao 93a0dd2019 Add update_verifier for A/B OTA update. am: 1171d3a12b
am: 6bc2155d22

* commit '6bc2155d22d059d4d744e2dcf018190faa33aad3':
  Add update_verifier for A/B OTA update.
2015-12-08 11:29:26 -08: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