Commit graph

42958 commits

Author SHA1 Message Date
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
Evgenii Stepanov
30917f77ba Export HWASAN_OPTIONS when SANITIZE_TARGET:=hwaddress
Bug: 112438058
Test: adb shell env | grep HWASAN_OPTIONS
Change-Id: I6ea4ef03269a7413b97cc62ea5b76597137bd980
2018-10-09 15:33:59 -07: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
Hridya Valsaraju
99f3772cb2 Validate partition name when searching for physical partitions.
Bug: 117274137
Test: fastboot getvar has-slot:../by-name/system
Change-Id: Ibc74a12f836a30bdf1fd7f6b2a1e941de2430c70
2018-10-08 11:59:07 -07:00
Treehugger Robot
380d3192cc Merge "llkd: Do not check ueventd by default for stack" 2018-10-08 18:46:26 +00:00
Treehugger Robot
e4046c7886 Merge "Allow erase, set_active and download commands only on unlocked devices." 2018-10-08 18:38:59 +00:00
Mark Salyzyn
be29673f30 fs_mgr: fs_mgr_update_verity_state cleanup
Test: compile
Bug: 109821005
Change-Id: Ia2e7074dd4cfb86619da65a4acb1d06b47154070
2018-10-08 11:38:21 -07:00
Elliott Hughes
643268f325 Move system/core/ off NO_ERROR.
It causes trouble for Windows, and OK already exists.

Bug: N/A
Test: builds
Change-Id: Ida22fd658b0ebb259c710ba39049b07c9e495d9c
2018-10-08 11:15:52 -07:00
Josh Gao
f3186de123 Merge changes Ia4244757,Ibcdf69d9
* changes:
  adbd: clean up jdwp service a bit.
  Revert "Revert "adb: detect some spin loops and abort.""
2018-10-08 17:45:23 +00:00
Mark Salyzyn
376e3cbb50 adb: identical symlink, do not update
Inefficient to always update the symlinks to overlayfs, can
also lead to

    failed to copy 'xxx' to 'yyy': remote symlink failed: File exists

on older variants of overlayfs that do not effectively mark them
deleted.

Test: manual
Bug: 109821005
Change-Id: If1286d76f45ce14087cdb515fe8d2fed198fd9d8
2018-10-08 10:37:10 -07:00
Mark Salyzyn
2cfc8d9b78 llkd: Do not check ueventd by default for stack
ueventd is now blocked by sepolicy, so skip checking it to
prevent an avc warning.

Test: manual
Bug: 33808187
Change-Id: I7b7a53604b83ee18a47db38d7a8260ab4226d531
2018-10-08 10:32:51 -07:00
Hridya Valsaraju
d1e623160c Allow erase, set_active and download commands only on unlocked devices.
Bug: 117276890
Bug: 117277405
Bug: 117278071
Test: make

Change-Id: Ic5e3a3ce9e2199578c2788b3b14aac7a8860a270
2018-10-08 10:27:48 -07:00
Treehugger Robot
4aa42b46c9 Merge "Allow Conformance tests to verify userspace fastboot." 2018-10-08 16:34:26 +00:00
Mark Salyzyn
b127c35adc Merge changes Ie03f3895,Id4d9ee61
* changes:
  fs_mgr: add fs_mgr_access() as no-errno access(,F_OK) wrapper
  fs_mgr: candidate list check mount_point
2018-10-08 14:26:45 +00:00
Mark Salyzyn
6cc230f587 Merge changes I49c9f064,I946e8564
* changes:
  llkd: Add cma_alloc stack symbol checking
  llkd: Add __get_user_page stack symbol checking
2018-10-08 14:22:18 +00:00
Treehugger Robot
e06850afdb Merge "Support fastboot variable battery-soc-ok" 2018-10-07 17:53:45 +00:00
Treehugger Robot
6b39f9d475 Merge "Use only signed/unsigned numbers with ParseInt/ParseUint respectively" 2018-10-07 17:34:10 +00:00
Josh Gao
15dcc62c72 adbd: clean up jdwp service a bit.
Change-Id: Ia42447576b047dfa9ddc0b73b87adc8114e3f20f
Test: ./test_device.py
2018-10-05 17:23:44 -07:00
Josh Gao
39c1f4bca5 Revert "Revert "adb: detect some spin loops and abort.""
This reverts commit 04b9ca8c31.

The original incarnation of this patch was falsely triggering when our
poll would block with no activity happening for an extended amount of
time. When the poll returned, we would immediately flag that as a spin
loop. Solve this by tracking the last time we looped, to detect this.

While we're at it, switch from CLOCK_MONOTONIC to CLOCK_BOOTTIME, for
the same reason.

Change-Id: Ibcdf69d93f7b6012142cafd72066f39494c1f84b
Test: ./test_device.py
2018-10-05 17:23:44 -07:00
Igor Murashkin
4578129f86 android_filesystem_config add AID for iorapd
Add new AID for new binder native service (iorapd).

Bug: 72170747
Change-Id: I81facb3f22e1162dc49329b970532287833fcecd
2018-10-05 16:26:28 -07:00
Hridya Valsaraju
a534a5a973 Support fastboot variable battery-soc-ok
Bug: 79480454
Test: fastboot getvar battery-soc-ok

Change-Id: Icfd70a71f1598e437316d4b8f895fd851516febb
Merged-In: Icfd70a71f1598e437316d4b8f895fd851516febb
(cherry picked from commit 9a1203b7ac)
2018-10-05 16:16:49 -07:00
Hridya Valsaraju
bdc1429454 Allow Conformance tests to verify userspace fastboot.
Bug: 117220134
Test: ./fuzzy_fastboot --gtest_filter=Conformance.*

Change-Id: Iab04fdff71e7e90a56d53d24cf14e94c81131009
2018-10-05 15:56:12 -07:00
Mark Salyzyn
aace48642f fs_mgr: add fs_mgr_access() as no-errno access(,F_OK) wrapper
Simplification of code paths.

Test: compile
Bug: 74595769
Bug: 63736262
Change-Id: Ie03f3895bc4b520fc23854ab662d99497c31bc66
2018-10-05 15:23:53 -07:00
Mark Salyzyn
ea928bbc1f fs_mgr: candidate list check mount_point
if we specify mount_point /vendor, candidate list should not add
/system as a candidate.  eg: adb disable-verity /vendor.

Test: manual
Bug: 109821005
Change-Id: Id4d9ee617262cf1b68a790c9c43476d0f907353a
2018-10-05 15:23:53 -07:00
Tom Cherry
bc64e50bd7 Assert that ParseInt/ParseUint are only used with signed/unsigned numbers respectively
Test: build fails when the signedness is mismatched
Test: build succeeds otherwise
Change-Id: Idd6b146cc167d4607eafc81dbad6c2a79b167094
2018-10-05 14:30:39 -07:00
Tom Cherry
e0bc5a9aa2 Use only signed/unsigned numbers with ParseInt/ParseUint respectively
Test: build
Change-Id: I4d950d4aa8d24c90d1fc9b1cbea0f324aeed56a3
2018-10-05 14:30:39 -07:00
Tom Cherry
64990d5b45 Merge "init: move InitKernelLogging() to first stage init" 2018-10-05 20:41:23 +00:00
Chih-hung Hsieh
3356ca3040 Merge "Add noexcept to move constructors and assignment operators." 2018-10-05 20:05:12 +00:00