Commit graph

42833 commits

Author SHA1 Message Date
Christopher Ferris
a2f38f1bde Fix up the definition of Elf::GetInfo.
The function should have returned a bool, so now it does.
Also use a different lighter weight function for validating the elf
in one place that didn't need to keep the max size value.

Test: Unit tests pass.
Change-Id: Ibde674e608091ba04abf22fad2fdc4dbdb2c6e73
2018-10-12 11:29:06 -07:00
Treehugger Robot
c53a0e9158 Merge "liblp: Add a gtest for sparse image creation." 2018-10-12 15:18:47 +00:00
Minchan Kim
d37dd4a6f0 Merge "export dumpstatez into stable_properties" 2018-10-12 07:23:23 +00:00
Josh Gao
58d5906be3 Merge "Revert "adb: don't close sockets before hitting EOF."" 2018-10-12 06:38:55 +00:00
Josh Gao
faf1328a64 Revert "adb: don't close sockets before hitting EOF."
This reverts commit ffc11d3cf3.

Reason for revert: DeviceIdleFreqCheckTest failing

Bug: http://b/117630047
Change-Id: Ia51a4a30e785bc5b2526695de3f442aac298198f
2018-10-12 05:08:45 +00:00
Treehugger Robot
11cbf7d711 Merge "adb: add reboot-fastboot command" 2018-10-12 03:38:05 +00:00
David Anderson
f89838887f liblp: Add a gtest for sparse image creation.
Note that this moves SparseBuilder into images.h, and splits
ReadLogicalPartitionGeometry into componenet methods for better
testability.

Bug: 116802789
Test: liblp_test gtest
Change-Id: Ib41a46b633c71623c136a10fcc8017e4de20884c
2018-10-11 17:49:50 -07:00
Tom Cherry
4c67290da6 Merge "init: add [[nodiscard]] to Result" 2018-10-11 20:34:04 +00:00
Mark Salyzyn
d8e94bd3f2 adb: add reboot-fastboot command
Alias reboot-fastboot to reboot fastboot

Test: manual
Bug: 117604012
Change-Id: I5f7842e420fbc0b1d9ae8e1231887fb8644b29e9
2018-10-11 13:21:16 -07:00
Tom Cherry
d987264625 init: add [[nodiscard]] to Result
It's better to either check these results or explicitly ignore them.
Only a few callers weren't already doing this, so it's relatively
trivial to enforce.

Test: build
Change-Id: I44cdc342e46128f66cac914aaa0b9b4559cacd8c
2018-10-11 10:39:33 -07:00
Pirama Arumuga Nainar
a2ccce870c Merge changes from topic "windows-libcxx"
* changes:
  Do not enable -Wold-style-cast for Windows
  Add sys/types.h in utf8.h
  Adapt to switch to libc++ for Windows
2018-10-11 17:00:53 +00:00
Treehugger Robot
8ef3fe14bb Merge "fs_mgr: deprecate check for ro.build.system_root_image" 2018-10-11 14:56:49 +00:00
Minchan Kim
b7f6c5a1cd export dumpstatez into stable_properties
Vendor might want to pause/resume some operations while a bugreport is captured
so that we need to export dumpstatez into stable_properties.h for vendor to get
property event when dumpstatez launch.

Test: confirmed manually with "adb bugreport"
Bug: 117536084
Change-Id: Ib743c5e59ca20cc44470110c814d85e4cbb90c0c
Signed-off-by: Minchan Kim <minchan@google.com>
2018-10-11 18:02:58 +09:00
Idries Hamadi
86554e949b Merge "Reverted aapt dependency to be a dependency on libandroidfw" 2018-10-11 06:15:04 +00:00
Treehugger Robot
3f50316ea1 Merge "Suppress implicit-fallthrough warning." 2018-10-11 01:01:13 +00:00
Rajeev Kumar
d936e628a3 Merge "Read memory stats from /proc/pid/stat file." 2018-10-10 23:24:05 +00:00
Rajeev Kumar
4dbc24d393 Read memory stats from /proc/pid/stat file.
(cherry pick from commit 0301683e49)
Bug: 117333340
Test: Manual testing using alloc-stress tool
Merged-In: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd
Change-Id: Ie555933aafa6a6b7aa1dbf5518ebe804376e0afd
2018-10-10 22:23:25 +00:00
Treehugger Robot
a605668edd Merge "Do not calculate CRC for sparse images during fastboot flash" 2018-10-10 22:22:30 +00:00
Treehugger Robot
cd72cbb5d8 Merge "set_active command should update current slot information." 2018-10-10 22:13:15 +00:00
Mark Salyzyn
d556c41a48 fs_mgr: deprecate check for ro.build.system_root_image
If there is a "/" in the fstab, can only be there on system as root.

This drops the troubling and annoying log message:

    [libfs_mgr]Could not find verity device for mount point: /: No such device or address

Test: manual
Bug: 109821005
Change-Id: I6bbfc0af63e1526e52a1c6365241dbc1d5ee7c6a
2018-10-10 14:42:29 -07:00
Chih-Hung Hsieh
e6e2b3cda4 Suppress implicit-fallthrough warning.
Bug: 112564944
Test: make checkbuild
Change-Id: I2bcfd08ec62f6d5953a9e25dbeaa42ffefda6d1c
2018-10-10 14:39:02 -07:00
Treehugger Robot
ce2a8e5b9e Merge changes I5e3f6677,I94665a41
* changes:
  fs_mgr: overlayfs create scratch using a Dynamic Logical Partition
  fs_mgr.h cleanup
2018-10-10 21:12:34 +00:00
Hridya Valsaraju
aec0de5d96 Do not calculate CRC for sparse images during fastboot flash
Bug: 78793464
Test: fastboot flashall

Sparse images with CRC are not supported by the Android build
system and hence the calculated CRC is unused.

Change-Id: Ia48b2f7e29f2adea26d185c5a8f2337c4cbe6dcb
2018-10-10 13:18:35 -07:00
Mark Salyzyn
69ebd440fe fs_mgr: overlayfs create scratch using a Dynamic Logical Partition
The default is a valid /mnt/scratch/overlay/ or /cache/overlay/
directory, with .../<mount_point>/upper and .../<mount_point>/work,
associated with each system partition <mount_point>.  Add support
for Dynamically Resized Partitions to create /mnt/scratch.

Test: manual
Bug: 109821005
Change-Id: I5e3f66778ea9e937c839e25541fedb6fbf34ab50
2018-10-10 12:26:51 -07:00
Mark Salyzyn
b5ca72811c fs_mgr.h cleanup
Drop struct from specifications, fix style.

Test: compile
Change-Id: I94665a41d514501d2f4cd6888361316e08813431
2018-10-10 12:26:49 -07:00
Hridya Valsaraju
20bdf899b2 set_active command should update current slot information.
Boot control HAL implementations will return the current boot
slot as the active slot. If a set_active command is issued on another
slot, it should be considered as the new active slot and subsequent
flashes should flash the same.

Test: fastboot set_active "b", fastboot getvar current-slot
Bug: 78793464
Change-Id: Ida3817670de8e74a7d7ae2a905e7ac1756c6bdf1
2018-10-10 12:25:11 -07:00
Josh Gao
2185d8ceef Merge "adb: don't close sockets before hitting EOF." 2018-10-10 18:13:01 +00:00
Treehugger Robot
042f2da1f3 Merge "fs_mgr: overlayfs deal with verity detection issues" 2018-10-10 16:51:57 +00:00
Mark Salyzyn
54e47908c3 fs_mgr: overlayfs deal with verity detection issues
Stop checking verity on each entry in the fstab, collect the verity
list whole and use in the loop.  Open code verity detection for
"system" for cases where device table is incompletely specified, does
not specify a "/" or a "/system" entry.

Test: manual, /system on system-as-root overlays correctly.
Bug: 109821005
Change-Id: I7bc5fbef6577bb0823cb5deb26c370219e4e597b
2018-10-10 07:26:50 -07:00
Christopher Ferris
8ddded2f96 Merge "Fix handling of globals for new linker." 2018-10-10 01:25:31 +00:00
Treehugger Robot
a1bb191541 Merge "Handle retry count correctly" 2018-10-10 00:44:49 +00:00
Treehugger Robot
9810709d91 Merge "Check validity of partition for getvar:partition-type" 2018-10-09 23:21:54 +00:00
Treehugger Robot
b2263b4a07 Merge "Return partition size in hex format." 2018-10-09 21:38:48 +00:00
Treehugger Robot
ed6f596de2 Merge "init: increase thermal shutdown timeout to 3s" 2018-10-09 21:18:22 +00:00
Hridya Valsaraju
4165e00d67 Check validity of partition for getvar:partition-type
Test: fastboot getvar partition-type:product_services_a
Bug: 79480454

Change-Id: I4020b0c94daf8fb86c29104aecc1eb8f44f89999
2018-10-09 13:32:04 -07:00
Treehugger Robot
e2015afd78 Merge "fs_mgr: fix incorrect parameter type" 2018-10-09 19:58:08 +00:00
Wei Wang
b5de088262 init: increase thermal shutdown timeout to 3s
1) increase thermal shutdown timeout to 3s for process to save work
2) respect property "ro.build.shutdown_timeout" in thermal shutdown if
   it is set less than default time - "3s"

Bug: 112432890
Test: Build
Change-Id: Idc2b24dd44c1fab8f9b047fd2468de2ee45ff783
2018-10-09 12:53:30 -07:00
Hridya Valsaraju
2a377da2f6 Return partition size in hex format.
This is required to pass fuzzy_fastboot conformance tests.
Also, allow for zero sized partitions in fuzzy_fastboot.

Test: ./fuzzy_fastboot --gtest_filter=Conformance.Slots
Bug: 117220134

Change-Id: Ifb12994a7796b081215084cb68b37674210aaa12
2018-10-09 12:16:50 -07:00
bohu
39ed7afe2b fs_mgr: fix incorrect parameter type
BUG: 117426573
Change-Id: Iffbdd3763dd19aa527bf805918a566477d122cfc
2018-10-09 10:49:44 -07:00
Christopher Ferris
1f34c0e7a4 Fix handling of globals for new linker.
The new linker base map is read-only, but the global handling code
for jit and dex information assumed the base map was a read-execute
one. Relax that requirement to search read-only maps.

Adjust the unit tests for this case.

Bug: 117293117
Test: Passes unit tests.
Test: Passes art cfi tests with and without llvm linker.
Change-Id: I31a765d51847d0b8d778ace9cbaa29f42073f4d9
2018-10-08 19:47:33 -07:00
Elliott Hughes
e8ab57765b Merge "Move system/core/ off NO_ERROR." 2018-10-09 00:29:35 +00:00
Treehugger Robot
f7d154e10f Merge "Check maximum allowed download size for download command." 2018-10-08 23:35:10 +00:00
Tom Cherry
93e029853c Merge "Assert that ParseInt/ParseUint are only used with signed/unsigned numbers respectively" 2018-10-08 22:56:45 +00:00
Hridya Valsaraju
aae84e813c Check maximum allowed download size for download command.
Bug: 117272937
Test: fastboot flashall
Change-Id: Ied34a89129813a7f9fce6d4f48d8b65967558731
2018-10-08 14:07:56 -07:00
Paul Lawrence
b920cb44aa Handle retry count correctly
Test: vdc startCheckpoint 2 then reboot 3 times checking state

Change-Id: I4eeda7f73d82a7c8b2469571fa558df2fac47354
2018-10-08 14:06:06 -07:00
Treehugger Robot
c35c609961 Merge "fs_mgr: fs_mgr_update_verity_state cleanup" 2018-10-08 20:40:15 +00:00
Treehugger Robot
32f5ff0dae Merge changes Id6c00c76,Ibc74a12f
* changes:
  Check return status of ReadFileToString() in GetDeviceLockStatus()
  Validate partition name when searching for physical partitions.
2018-10-08 20:33:46 +00:00
Treehugger Robot
ca2d62e1e7 Merge "android_filesystem_config add AID for iorapd" 2018-10-08 20:12:59 +00:00
Treehugger Robot
3614b39bb9 Merge "adb: identical symlink, do not update" 2018-10-08 19:52:20 +00:00
Hridya Valsaraju
bb12c5e45b Check return status of ReadFileToString() in GetDeviceLockStatus()
Return lock status of true if unable to read kernel command line.

Test: fastboot getvar unlocked
Bug: 117275849
Change-Id: Id6c00c769bcdcdf87fcc9e88902713a8eff3e320
2018-10-08 19:21:12 +00:00