Commit graph

47840 commits

Author SHA1 Message Date
Tom Cherry
c3d485fa1a Merge "init.rc: move rlimit setting earlier"
am: acf19e8031

Change-Id: I4b1f4702e77b5adaa5d027bb1e432b1065cbddbb
2019-06-07 09:06:50 -07:00
Tom Cherry
12998ea26a Merge "logd: don't drop user/groups/capabilities/priority in drop_privs()"
am: b7a25ef1ec

Change-Id: Ib8396451f2ee1f35b2183da449d83ea60aeda931
2019-06-07 09:06:27 -07:00
Tom Cherry
acf19e8031 Merge "init.rc: move rlimit setting earlier" 2019-06-07 15:59:40 +00:00
Tom Cherry
be641e0d22 Merge "toolbox: add setprop, start, and stop"
am: d949bf8df3

Change-Id: I1923484d932853318de3a2798e1081e7300aa5a1
2019-06-07 08:59:35 -07:00
Tom Cherry
b7a25ef1ec Merge "logd: don't drop user/groups/capabilities/priority in drop_privs()" 2019-06-07 15:56:04 +00:00
Tom Cherry
0b2a011cc4 logd: don't drop user/groups/capabilities/priority in drop_privs()
On Android, unlike POSIX, groups and capabilities are able to be set
per thread.  This is useless however, since threads are not a security
boundary.  This change drops the logic to set groups and capabilities
per thread and instead leaves all threads running with the initial
user and groups.

This does still drop some capabilities if they're unneeded due to
features being disabled.

This also moves the setpriority() call from code into the init script.

Test: logd runs with the expected user/groups and with the expected
      capabilities and priority without any errors

Change-Id: Ibb0e529ea1574a2b8ec391a2678504ca9fbe19be
2019-06-07 15:52:27 +00:00
Tom Cherry
d949bf8df3 Merge "toolbox: add setprop, start, and stop" 2019-06-07 15:47:45 +00:00
Bo Hu
b00b6876d9 Merge "fs_mgr: Don't report 'Skip mounting partitions'"
am: f17902b392

Change-Id: I8d23728e4443dc0bc45dc08f532446bb3bee4874
2019-06-07 08:25:49 -07:00
Bo Hu
f17902b392 Merge "fs_mgr: Don't report 'Skip mounting partitions'" 2019-06-07 13:07:54 +00:00
Jiyong Park
e6d2cca4f5 Merge "Add expected<void,E>"
am: bb1b83e325

Change-Id: I2b46259be44dec6ec66f910956b14e6ff187e4f2
2019-06-07 00:24:42 -07:00
Treehugger Robot
bb1b83e325 Merge "Add expected<void,E>" 2019-06-07 07:17:47 +00:00
Haibo Huang
a6c903cabb Merge "Fix format string for new google benchmark"
am: a850fb2d1e

Change-Id: I63e9a8ae52ab45f389b474c3c28b95b50c7fdea0
2019-06-06 21:42:44 -07:00
Haibo Huang
a850fb2d1e Merge "Fix format string for new google benchmark" 2019-06-07 04:31:15 +00:00
Haibo Huang
9d47360c7e Fix format string for new google benchmark
Exempt-From-Owner-Approval: Fix build..
Test: build
Change-Id: I5b7dc76a6e8a9ee42cb9200b95db3ef5f335692a
2019-06-07 04:31:00 +00:00
Martin Stjernholm
419a3fa241 Merge "Update TODOs for ICU library links."
am: b78de85272

Change-Id: I7c262dfbc07cabd592a8c7a08c6057de37fb3d63
2019-06-06 19:25:20 -07:00
Treehugger Robot
b78de85272 Merge "Update TODOs for ICU library links." 2019-06-07 02:12:04 +00:00
Jiyong Park
7f89951f46 Merge "Move result.h from init to libbase"
am: 2ba59c5b81

Change-Id: Ib1cc44fd1e74cb04ccef73ef1c3bca0925845236
2019-06-06 16:37:17 -07:00
Treehugger Robot
2ba59c5b81 Merge "Move result.h from init to libbase" 2019-06-06 23:27:29 +00:00
Jiyong Park
b2a85c4333 Add expected<void,E>
Result<void> could be used instead of Result<Success>.

Bug: 132145659
Test: libbase_test
Change-Id: I7f079a94d06c5ecb8b0303ced981f0995253dc40
2019-06-07 08:10:32 +09:00
Tom Cherry
65a1ee83a8 toolbox: add setprop, start, and stop
Move these from toybox as they're Android specific and more easily
maintained here.

A few changes during the conversion:
* Report error in setprop if value is not a UTF8 string; this would
  previously fail only after attempting to set the property
* Inform users to check dmesg for further failure messages for all
  three programs
* Only start/stop zygote_secondary if the device is not single arch

Bug: 117321744
Bug: 133901248
Test: setprop works, start and stop work on single and multi-arch.

Change-Id: Id2194cf2b65221bde38aff91f0e86b33edb37f42
2019-06-06 11:20:29 -07:00
Tom Cherry
fdeca99c4b init.rc: move rlimit setting earlier
There is no reason that rlimits cannot be set earlier than they are,
and apexd-bootstrap may want to set the priority service option, which
would require that these rlimits have been set, so we move these to
the beginning of early-init.

Bug: 134668377
Test: apexd-bootstrap can set the priorty service option
Change-Id: I8040190cd4dc5e141784496ae65cfab80d9cad53
2019-06-06 18:18:14 +00:00
Martin Stjernholm
0d28abc5b1 Update TODOs for ICU library links.
Test: Presubmit boot test
Bug: 120786417
Bug: 134659294
Change-Id: I362e0e67c5adfd510dda12bed52629af92bfcc3d
2019-06-06 14:11:04 +01:00
Jiyong Park
8fd64c8af1 Move result.h from init to libbase
The Result, Error, ErrnoError are quite generic. Moving them from init
to libbase so that they can be used from other places.

Bug: 132145659
Test: libbase_test
Change-Id: Id774a587f74380fadd7a0fc88c0aa892c3d9a489
2019-06-06 08:58:55 +09:00
Tom Cherry
f1b222b113 Merge "base: fix out of date documentation with PropertySet()"
am: 44cabca1ef

Change-Id: Iec0fb7ff53c7e22a9d4d74e85222fddc7bd61375
2019-06-05 14:36:22 -07:00
Treehugger Robot
44cabca1ef Merge "base: fix out of date documentation with PropertySet()" 2019-06-05 21:24:23 +00:00
Tao Bao
a04d17174d Merge "adb: Allow adb rescue getprop."
am: 8eea2cae86

Change-Id: Icb506c882384107aa2e10166c9de434c1f544c78
2019-06-05 14:05:48 -07:00
Mark Salyzyn
ed22bc9bda Merge "fs_mgr: overlayfs: test: spelling mistake"
am: 291b5caa46

Change-Id: Idc939f9e41b96d9952a91eb76a6f19f8212a750d
2019-06-05 13:58:41 -07:00
Tao Bao
8eea2cae86 Merge "adb: Allow adb rescue getprop." 2019-06-05 20:43:55 +00:00
Mark Salyzyn
291b5caa46 Merge "fs_mgr: overlayfs: test: spelling mistake" 2019-06-05 20:29:53 +00:00
bohu
42b28b09b0 fs_mgr: Don't report 'Skip mounting partitions'
when the skip mount partition is not in the fstab

BUG: 133854834
Change-Id: I51de91f34525560c008fbe8648fa2cd6f56dcf8e
2019-06-05 18:24:50 +00:00
Mark Salyzyn
bc79fea7a1 fs_mgr: overlayfs: test: spelling mistake
Test: adb-remount-test.sh
Bug: 132070014
Change-Id: I7bc68c15f53f94d1c14e2da91157ade362bc72f8
2019-06-05 11:12:05 -07:00
Tom Cherry
ef2469e547 base: fix out of date documentation with PropertySet()
As of Android-P, __system_property_set() is synchronous and only will
return '0' if the property was successfully set.

Test: n/a
Change-Id: Icbc0a6d8be1ae683565f378c534ea8e5c5f25357
2019-06-05 10:31:33 -07:00
Christopher Ferris
46f6d348b1 Merge "Display offsets for dex frames."
am: 659f61e0f2

Change-Id: Ia01d48ecb5d22a5c4d779e9340571c52f930f0b7
2019-06-04 18:09:55 -07:00
Josh Gao
961b03661a Merge changes I2d005e17,If2eec162,Icfd642e6
am: 2683d0a2ca

Change-Id: Ib087d841618d328969ca2fa13990265b2d849d5d
2019-06-04 18:08:32 -07:00
Josh Gao
91aa2ef730 Merge "adbd: provide MS OS descriptors for WinUSB."
am: a891ffddd3

Change-Id: If4bc397c96120d1f9ce13b2327bc68e12ab5ebf5
2019-06-04 18:02:34 -07:00
Christopher Ferris
659f61e0f2 Merge "Display offsets for dex frames." 2019-06-04 22:28:56 +00:00
Tao Bao
599eee1f37 adb: Allow adb rescue getprop.
Which will dump all the allowed properties, similar to `adb shell
getprop`.

Bug: 134027350
Test: Run the command under rescue mode.
Change-Id: Id668224098006d71ee192c8c2bea5d791d2423c1
2019-06-04 14:59:58 -07:00
Josh Gao
2683d0a2ca Merge changes I2d005e17,If2eec162,Icfd642e6
* changes:
  adb: daemon: Assign valid fd to usb_handle ep0 file descriptor
  adbd: respond to device-to-host control transfers.
  adbd: read, print, and ignore USB control transfers.
2019-06-04 19:22:08 +00:00
Josh Gao
a891ffddd3 Merge "adbd: provide MS OS descriptors for WinUSB." 2019-06-04 19:22:00 +00:00
Christopher Ferris
a4bdb984f9 Display offsets for dex frames.
When adding a dex frame, no offset is ever printed even if the dex data
is coming from a non-zero offset map. Fixed so an offset is printed
in this case.

Previous the line looked like this:

  #17 pc 0000000000500d7a  /product/app/GoogleCamera/GoogleCamera.apk (com.google.android.libraries.camera.async.AndroidPriorityThread.run+10)

Now looks like:

  #17 pc 0000000000500d7a  /product/app/GoogleCamera/GoogleCamera.apk (offset 0x11d0000) (com.google.android.libraries.camera.async.AndroidPriorityThread.run+10)

Add new unit test for this case.

Bug: 134420076

Test: Wrote new unit test, and verified a non-zero offset for dex file
Test: data results in a frame with a non-zero offset.
Change-Id: I58c134fda4fad5456ca0f1723192667a1ca5d509
2019-06-04 12:07:05 -07:00
Ryan Mitchell
1d9e63df21 Merge "Fix leak of mapped zip central directories"
am: 41f690ba2a

Change-Id: I5b121cc7a2ce33e5a79dbe6cc1203d2ccb70d599
2019-06-04 05:47:46 -07:00
Treehugger Robot
41f690ba2a Merge "Fix leak of mapped zip central directories" 2019-06-04 12:36:52 +00:00
Greg Kaiser
fa1c42efe3 Merge "fastboot: windows: Minor printf format fixes"
am: f74ff74475

Change-Id: I671e885bcbaf9244c424d9806be2695490db1ceb
2019-06-03 17:39:15 -07:00
Treehugger Robot
f74ff74475 Merge "fastboot: windows: Minor printf format fixes" 2019-06-04 00:20:24 +00:00
Mohammad Samiul Islam
c625e74d88 Merge "Allow adb to handle single paramter with install-multi-package flag"
am: d877a96656

Change-Id: Id66d79ddcb462d20fd98d1cc6d530c3e9fc34475
2019-06-03 16:00:58 -07:00
Treehugger Robot
d877a96656 Merge "Allow adb to handle single paramter with install-multi-package flag" 2019-06-03 22:49:48 +00:00
Mark Salyzyn
7d772275c8 Merge "fs_mgr: overlayfs: test: triage data missing after failure flash scratch"
am: b5db741383

Change-Id: I764bf1a863d2b5bc441d7fbf84b8e2715357cb61
2019-06-03 14:43:15 -07:00
Mark Salyzyn
b5db741383 Merge "fs_mgr: overlayfs: test: triage data missing after failure flash scratch" 2019-06-03 21:22:28 +00:00
Greg Kaiser
8acf8c2da7 fastboot: windows: Minor printf format fixes
We recently changed 'xfer' to a size_t, so update the DBG format
accordingly.  We also fix a long standing issue with format for
the unsigned 'read'.

Test: TreeHugger
Change-Id: I3dc5f26a033fea64119016802bc9cdb54bbb7b52
2019-06-03 14:12:42 -07:00
Mark Salyzyn
4d702e8dea fs_mgr: overlayfs: test: triage data missing after failure flash scratch
After flashing empty image to scratch device, the device did not
return after 3 minutes.  It also did not collect any triage data
reporting only:

[  FAILED  ] did not reboot after flash

Add triage data, increase timeout to 4 minutes.

Test: adb-remount-test.sh
Bug: 132070014
Change-Id: Ic607abb5b2575d630bf6c27817a38a90820d24e1
2019-06-03 12:53:07 -07:00