Commit graph

916 commits

Author SHA1 Message Date
Matt Sarett
1f814d7630 resolve merge conflicts of 86a28d0 to klp-modular-dev am: a5bc59620f
am: 36acff7d7e

* commit '36acff7d7e88549bbeab6a08488ab48596d7fbc5':
  DO NOT MERGE Use updated libpng API

Change-Id: I7f01d932235ef69640ed4859d0e62344b3b774de
2016-05-19 23:06:06 +00:00
Matt Sarett
36acff7d7e resolve merge conflicts of 86a28d0 to klp-modular-dev
am: a5bc59620f

* commit 'a5bc59620fd43c99621eb98ac84cbeea867d0c93':
  DO NOT MERGE Use updated libpng API

Change-Id: I3d8d27b08fd1fd89c6b8d9c39b883a45aecb83ce
2016-05-19 23:03:35 +00:00
Matt Sarett
a5bc59620f resolve merge conflicts of 86a28d0 to klp-modular-dev
Change-Id: Ic0b085e008155da3718dab8fd5a36be6d4059aee
2016-05-19 15:47:25 -04:00
Matt Sarett
86a28d0aaf DO NOT MERGE Use updated libpng API
am: 839b4e592a

* commit '839b4e592a7c81bdebe08fae4eef6e909c89acd6':
  DO NOT MERGE Use updated libpng API

Change-Id: I7bbece70a4129554d953fd22c71527b2ca11262e
2016-05-19 19:26:12 +00:00
Matt Sarett
839b4e592a DO NOT MERGE Use updated libpng API
BUG:23265085
Change-Id: Ibc521fae11dad22283d8469329326ef79525b414
2016-05-17 20:28:54 +00:00
Yabin Cui
877dcba47a Fix integer overflows in recovery procedure. am: 1273956e69
am: 5978a71d29

* commit '5978a71d2954c7df02cbd0c51582ce4063346f77':
  Fix integer overflows in recovery procedure.
2016-02-23 06:35:46 +00:00
Yabin Cui
5978a71d29 Fix integer overflows in recovery procedure.
am: 1273956e69

* commit '1273956e69a7d1d5b636f269050b446e0ced3f9b':
  Fix integer overflows in recovery procedure.
2016-02-23 06:33:20 +00:00
Yabin Cui
1273956e69 Fix integer overflows in recovery procedure.
Bug: 26960931
Change-Id: Ieae45caccfb4728fcf514f0d920976585d8e6caf
(cherry picked from commit 4f2df162c6)
2016-02-22 17:42:02 -08:00
Narayan Kamath
0e804d542a am d396b9db: am 710b6bb9: am ec4b58ad: (-s ours) am ec63d564: Track usage of Vector / SortedVector from libutils DO NOT MERGE
* commit 'd396b9dbd99924f7c8687227b22220a87c85d9c7':
  Track usage of Vector / SortedVector from libutils DO NOT MERGE
2015-09-16 22:33:14 +00:00
Narayan Kamath
d396b9dbd9 am 710b6bb9: am ec4b58ad: (-s ours) am ec63d564: Track usage of Vector / SortedVector from libutils DO NOT MERGE
* commit '710b6bb9d7d36ce16453850efc3112016a77e9ff':
  Track usage of Vector / SortedVector from libutils DO NOT MERGE
2015-09-12 06:30:01 +00:00
Narayan Kamath
710b6bb9d7 am ec4b58ad: (-s ours) am ec63d564: Track usage of Vector / SortedVector from libutils DO NOT MERGE
* commit 'ec4b58ad8a21b511bf6b136792bb924eb6e9e299':
  Track usage of Vector / SortedVector from libutils DO NOT MERGE
2015-09-10 20:55:33 +00:00
Narayan Kamath
ec4b58ad8a am ec63d564: Track usage of Vector / SortedVector from libutils DO NOT MERGE
* commit 'ec63d564a86ad5b30f75aa307b4bd271f6a96a56':
  Track usage of Vector / SortedVector from libutils DO NOT MERGE
2015-09-10 18:26:12 +00:00
Narayan Kamath
ec63d564a8 Track usage of Vector / SortedVector from libutils DO NOT MERGE
bug: 22953624
Change-Id: Ifcc17e39433ac91ca41da5d336fb3006dfbb65a8
2015-09-09 10:42:10 +00:00
Andres Morales
c94fa0b01b DO NOT MERGE Revert "Erase PST partition if its marked to be erased."
This now gets done at the framework level. Doing it here breaks the signature on the partition.

This reverts commit ee19387905.

Bug: 19967123
Change-Id: I447b926b733ca145f11a916d9569ce39889db627
2015-04-01 22:43:35 +00:00
Tao Bao
18f371d814 updater: Check the return value from ApplyImagePatch / ApplyBSDiffPatch
Return NULL to abort the update process. Note that returning ""
won't stop the script.

Change-Id: Ifd108c1356f7c92a905c8776247a8842c6445319
2015-03-11 09:53:56 -07:00
Jesse Zhao
71c4542931 am f66bf339: am 3e91f691: Bump up max_map_count value.
* commit 'f66bf33956eebba26bedc7f098dedc8a2c1cf942':
  Bump up max_map_count value.
2015-02-26 23:34:49 +00:00
Jesse Zhao
f66bf33956 am 3e91f691: Bump up max_map_count value.
* commit '3e91f691a6bf6b154ea98982b073e84e86328baf':
  Bump up max_map_count value.
2015-02-26 23:20:35 +00:00
Jesse Zhao
3e91f691a6 Bump up max_map_count value.
Change-Id: Id3e2c0795b817db9a85bc84cba2aa05d20179d39
Bug: 18503789
(cherry picked from commit 5bf74b238b)
2015-02-25 22:47:26 +00:00
Jesse Zhao
5bf74b238b Bump up max_map_count value.
Change-Id: Id3e2c0795b817db9a85bc84cba2aa05d20179d39
Bug: 18503789
2015-01-08 16:02:46 -08:00
Sungmin Choi
a72512cd05 Add O_CREAT option for open
Factory reset fails if there is no file, for example, RECOVERY_COMMAND_FILE_TMP.
So create file as adding O_CREAT option if it does not exist.

error log:
--------- beginning of crash
12-10 02:35:17.190  3059  3059 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x30 in tid 3059 (uncrypt)
12-10 02:35:17.296   766  1528 W NativeCrashListener: Couldn't find ProcessRecord for pid 3059
12-10 02:35:17.296   191   191 I DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-10 02:35:17.296   191   191 E DEBUG   : AM write failure (32 / Broken pipe)
12-10 02:35:17.296   191   191 I DEBUG   : Build fingerprint: 'Android/aosp_hammerhead/hammerhead:5.1/LMP/hopemini12052127:userdebug/test-keys'
12-10 02:35:17.296   191   191 I DEBUG   : Revision: '10'
12-10 02:35:17.297   191   191 I DEBUG   : ABI: 'arm'
12-10 02:35:17.297   191   191 I DEBUG   : pid: 3059, tid: 3059, name: uncrypt  >>> /system/bin/uncrypt <<<
12-10 02:35:17.297   191   191 I DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30
12-10 02:35:17.302   191   191 I DEBUG   :     r0 00000001  r1 be94b690  r2 fffffe90  r3 b6fdbf7c
12-10 02:35:17.302   191   191 I DEBUG   :     r4 00000000  r5 00000000  r6 b6fd8ca4  r7 be94b67c
12-10 02:35:17.302   191   191 I DEBUG   :     r8 00000000  r9 ffffffff  sl b6ff582b  fp be94b68d
12-10 02:35:17.302   191   191 I DEBUG   :     ip b6fcfd08  sp be94b648  lr b6f98fe5  pc b6f98fe4  cpsr 20070030
12-10 02:35:17.303   191   191 I DEBUG   :
12-10 02:35:17.303   191   191 I DEBUG   : backtrace:
12-10 02:35:17.303   191   191 I DEBUG   :     #00 pc 00032fe4  /system/lib/libc.so (fputs+29)
12-10 02:35:17.303   191   191 I DEBUG   :     #01 pc 000016a1  /system/bin/uncrypt
12-10 02:35:17.303   191   191 I DEBUG   :     #02 pc 0000114b  /system/bin/uncrypt
12-10 02:35:17.303   191   191 I DEBUG   :     #03 pc 00012df5  /system/lib/libc.so (__libc_init+44)
12-10 02:35:17.303   191   191 I DEBUG   :     #04 pc 000013cc  /system/bin/uncrypt
12-10 02:35:17.325   191   191 I DEBUG   :
12-10 02:35:17.325   191   191 I DEBUG   : Tombstone written to: /data/tombstones/tombstone_00

Bug: 18709330
Change-Id: Ib5dccdd366e829049938a188ea5f98d9e4e282db
2014-12-10 21:50:46 -08:00
Patrick Tjin
f59b994264 Add basic navigation controls to log viewer.
Bug: 18642766

Change-Id: I95a6c8edf83513d421a041e79c15111b5c991dde
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-12-10 05:18:05 +00:00
Patrick Tjin
cd055ee72a Save kernel logs to /cache/recovery
Bug: 18642766

Change-Id: I6c8b7d8f9ffb688d3afdfe0d47c4142e711e421d
Signed-off-by: Patrick Tjin <pattjin@google.com>
2014-12-10 05:17:14 +00:00
Michael Runge
37ad1f1273 Merge "Force write to disk while doing uncrypt" into lmp-mr1-dev 2014-12-09 23:58:56 +00:00
Michael Runge
5b9c4ce5a1 am b278c252: Add support for tune2fs file operations
* commit 'b278c252e148798346f85fc92eeea6afeb33fbf0':
  Add support for tune2fs file operations
2014-11-24 02:37:03 +00:00
Michael Runge
4b54239173 Force write to disk while doing uncrypt
This should reduce errors if the device reboots before the blocks
are commited to disk.

Bug: 18481902

Change-Id: I13cda1c78955e4c83522fbcf87ddb16cc9f97683
2014-11-21 16:27:28 -08:00
Michael Runge
b278c252e1 Add support for tune2fs file operations
This allows tune2fs to be executed from within OTA scripts,
allowing for file system modifications without formatting the
partition

Bug: 18430740
Change-Id: I0c2e05b5ef4a81ecea043e9b7b99b545d18fe5e6
2014-11-21 13:02:03 -08:00
Heather Lee Wilson
de27d4cbb7 am e5879c36: Byte swap to support BGRA in recovery mode
* commit 'e5879c3639789d61803605c12371a4f291e0b3cc':
  Byte swap to support BGRA in recovery mode
2014-11-14 20:26:51 +00:00
Heather Lee Wilson
e5879c3639 Byte swap to support BGRA in recovery mode
Fixes color palate of recovery mode when double buffer enabled.

Bug: 18169447
Change-Id: Ia50b0fb9afd8001dfd740c09ce109fa421e691f7
2014-11-14 12:00:18 -08:00
Michael Runge
2020564f21 am be81e51c: Use more aggressive sync writing to applypatch.
* commit 'be81e51c171a0cf9b9b5045ee949282b7f36d779':
  Use more aggressive sync writing to applypatch.
2014-10-29 20:23:58 +00:00
Michael Runge
be81e51c17 Use more aggressive sync writing to applypatch.
We have seen cases where the boot partition is patched, but upon
recovery the partition appears to be corrupted.  Open up all
patched files/partitions with O_SYNC, and do not ignore the
errors from fsync/close operations.

Bug: 18170529
Change-Id: I392ad0a321d937c4ad02eaeea9170be384a4744b
2014-10-29 13:00:21 -07:00
Michael Runge
e908a45420 am 042c3cd0: Force sync files written by minzip.
* commit '042c3cd04ec3ef416019fa382cd5b1a942bd79e1':
  Force sync files written by minzip.
2014-10-29 18:51:51 +00:00
Michael Runge
042c3cd04e Force sync files written by minzip.
Some files appear to be missing their sync to disk.

Bug: 18145574
Change-Id: Ic858624a4dd65bbfc54d30f3a13c607078270345
2014-10-28 19:49:57 -07:00
Michael Runge
fe8563f4f2 am 5ddf4293: Log mount/unmount errors to UI
* commit '5ddf4293df45a051c7900eeb62fb5ec4950b6cb6':
  Log mount/unmount errors to UI
2014-10-24 23:17:43 +00:00
Michael Runge
5ddf4293df Log mount/unmount errors to UI
Bug: 18092022
Change-Id: I6c42038ebeb1cfc1e7ca0d3e12310fdce1b990b0
2014-10-24 14:14:41 -07:00
Nick Kralevich
915d661ccc am 68802416: unconditionally apply SELinux labels to symlinks
* commit '688024169df70336cc128ea8cc929174c53a501e':
  unconditionally apply SELinux labels to symlinks
2014-10-24 17:43:15 +00:00
Nick Kralevich
688024169d unconditionally apply SELinux labels to symlinks
At the end of the OTA script, we walk through /system, updating
all the permissions on the filesystem, including the UID, GID,
standard UNIX permissions, capabilities, and SELinux labels.

In the case of a symbolic link, however, we want to skip most of
those operations. The UID, GID, UNIX permissions, and capabilities
don't meaningfully apply to symbolic links.

However, that's not true with SELinux labels. The SELinux label on
a symbolic link is important. We need to make sure the label on the
symbolic link is always updated, even if none of the other attributes
are updated.

This change unconditionally updates the SELinux label on the symbolic
link itself. lsetfilecon() is used, so that the link itself is updated,
not what it's pointing to.

In addition, drop the ENOTSUP special case. SELinux has been a
requirement since Android 4.4. Running without filesystem extended
attributes is no longer supported, and we shouldn't even try to handle
non-SELinux updates anymore. (Note: this could be problematic if
these scripts are ever used to produce OTA images for 4.2 devices)

Bug: 18079773
Change-Id: I87f99a1c88fe02bb2914f1884cac23ce1b385f91
2014-10-23 20:46:33 -07:00
Michael Runge
da500cecf5 am 168f7778: Allow passing of mount args to mountFn
* commit '168f77787700f0e9f66675beef33c593a777e64e':
  Allow passing of mount args to mountFn
2014-10-23 21:56:52 +00:00
Brian Carlstrom
4da9cdeab9 am 473967d8: Merge "Log to UI any metadata setting errors" into lmp-dev
* commit '473967d87ff9fc7a541c16ebdc56364c285d2862':
  Log to UI any metadata setting errors
2014-10-23 21:56:52 +00:00
Michael Runge
168f777877 Allow passing of mount args to mountFn
Bug: 18079773
Bug: 18092222

Change-Id: Ifc3f3e123de729dfbb2f49414b3207afa96268d5
2014-10-23 18:13:26 +00:00
Brian Carlstrom
473967d87f Merge "Log to UI any metadata setting errors" into lmp-dev 2014-10-23 17:18:13 +00:00
Michael Runge
d4a63426ef Log to UI any metadata setting errors
Bug: 18079773
Change-Id: Ic6fddbcbcb6ddb9e1cbd1698df98387c0033ae15
2014-10-23 10:06:33 -07:00
Nick Kralevich
d0602fbb88 am 9b2db80d: Merge "Make /cache/recovery/last_log available in recovery" into lmp-dev
* commit '9b2db80d407752fd524e799e4c7051162e63f91c':
  Make /cache/recovery/last_log available in recovery
2014-10-23 16:34:39 +00:00
Michael Runge
3b5c6dca0a am 2f0ef730: Treat already-renamed files as having no problems.
* commit '2f0ef73029fc51c6404121f338b034c8b516652c':
  Treat already-renamed files as having no problems.
2014-10-23 16:34:38 +00:00
Nick Kralevich
9b2db80d40 Merge "Make /cache/recovery/last_log available in recovery" into lmp-dev 2014-10-23 15:37:10 +00:00
Nick Kralevich
a9ad0324d1 Make /cache/recovery/last_log available in recovery
Create a new recovery UI option to allow the user to view
/cache/recovery/last_log for their device. This gives enhanced
debugging information which may be necessary when a failed
OTA occurs.

Bug: 18094012
Change-Id: Ic3228de96e9bfc2a0141c7aab4ce392a38140cf3
2014-10-22 21:43:08 -07:00
Michael Runge
2f0ef73029 Treat already-renamed files as having no problems.
This should help with reentrant OTAs.

Bug: 18079773

Change-Id: I102fd738e3b450483ecd4471384c12e89fc586e2
2014-10-23 00:04:36 +00:00
JP Abgrall
9eb8c8bdbe init.rc: Inidicate that booting is complete wrt firwmare requests
ueventd will wait for /dev/.booting to go away before giving up
on loading firmware.
The issue was introduced in Ifdd5dd1e95d7e064dde5c80b70198882d949a710
which forgot to update recovery's init.rc

Bug: 17993625
Change-Id: I91205fe6eea50aaef9b401d650ec8d6843a92a57
2014-10-20 20:02:57 -07:00
Doug Zongker
d83e4f1589 support for version 2 of block image diffs
In version 2 of block image diffs, we support a new command to load
data from the image and store it in the "stash table" and then
subsequently use entries in the stash table to fill in missing bits of
source data we're not allowed to read when doing move/bsdiff/imgdiff
commands.

This leads to smaller update packages because we can break cycles in
the ordering of how pieces are updated by storing data away and using
it later, rather than not using the data as input to the patch system
at all.  This comes at the cost of the RAM or scratch disk needed to
store the data.

The implementation is backwards compatible; it can still handle the
existing version 1 of the transfer file format.

Change-Id: I4559bfd76d5403859637aeac832f3a5e9e13b63a
2014-09-25 16:38:14 -07:00
Jeff Sharkey
a6e13ae01b Include reason when wiping data.
This will help us track down who requested a data wipe.

Bug: 17412160
Change-Id: I1c439fbd29f96b9851810baca9101f683a0f18d8
2014-09-24 11:46:17 -07:00
Doug Zongker
574443d895 create block map for all update packages on /data
Always create the block map for packages on /data; don't only look at
the encryptable/encrypted flags.

Bug: 17395453
Change-Id: Iaa7643a32898328277841e324305b9419a9e071c
2014-09-05 08:22:12 -07:00