Commit graph

34283 commits

Author SHA1 Message Date
TreeHugger Robot
38eb25e157 Merge "adb: fix deadlock between transport_unref and usb_close." into oc-dr1-dev 2017-06-19 20:58:22 +00:00
Tom Cherry
9cf4000f92 Merge "init: move killing of process groups to libprocessgroup" into oc-dr1-dev 2017-06-19 20:38:37 +00:00
Josh Gao
d1f7fef69b adb: fix deadlock between transport_unref and usb_close.
Fix a deadlock that happened when a reader/writer thread released a
transport while the hotplug thread attempted  to handle a device
disconnection. Decrementing a transport refcount to zero would hold the
global transport mutex and attempt to take the usb handles mutex, while
the hotplug thread would hold the usb handles mutex and try to call
unregister_usb_transport, which would attempt to take the global
transport mutex.

Resolve this by making transport_unref not take the global transport
mutex.

Bug: http://b/62423753
Test: python test_device.py
Merged-In: Ib48b80a2091a254527f3a7d945b6a11fae61f937
Change-Id: Ib48b80a2091a254527f3a7d945b6a11fae61f937
(cherry picked from commit 7e197ef833)
2017-06-19 11:17:44 -07:00
TreeHugger Robot
fe11ca5421 Merge "Add a helpful error message if GetUnreachableMemory fails" into oc-dr1-dev 2017-06-16 04:11:50 +00:00
Colin Cross
952adf44bf Add a helpful error message if GetUnreachableMemory fails
The primary reason for GetUnreachableMemory failing is selinux
blocking system apps from ptracing themselves.  Add a helpful
error message suggesting setenforce 0.

Bug: 27945735
Test: dumpsys meminfo --unreachable com.android.systemui
Change-Id: Ibfa9507860be36dffd514f82027f7a2f8a72ac48
Merged-In: Ibfa9507860be36dffd514f82027f7a2f8a72ac48
(cherry picked from commit 72d3881412)
2017-06-15 13:15:09 -07:00
Tom Cherry
6f45ffc961 init: move killing of process groups to libprocessgroup
libprocessgroup kills the cgroup associated with a given pid and uid,
but not the POSIX process group associated with it.  This means that
to kill both, two of the same signals must be sent, which may cause
some issues.

This change kills all POSIX process groups whose group leaders are
found within a cgroup.  It only then kills processes in the cgroup
that are not part of the POSIX process groups that have been killed.

Bug: 37853905
Bug: 62418791
Test: Boot, kill zygote, reboot
Change-Id: Id1d96935745899b4c454c36c351ec16a0b1d3827
(cherry picked from commit 70a5ed49ef)
2017-06-15 10:21:05 -07:00
TreeHugger Robot
3c7cde0cd4 Merge "Add more logs for writing failures." into oc-dr1-dev 2017-06-15 00:32:40 +00:00
Hung-ying Tyan
6bb4667f47 Merge changes from topic 'move-default-prop-v2' into oc-dev
am: c6b07ec095  -s ours

Change-Id: I4e24182b8e7f3955d359b38d5ff62af1c44ce423
2017-06-14 02:29:29 +00:00
Hung-ying Tyan
c6b07ec095 Merge changes from topic 'move-default-prop-v2' into oc-dev
* changes:
  Load /prop.default in recovery mode
  Revert "Revert "Load default prop from /system/etc/prop.default""
2017-06-14 02:13:50 +00:00
TreeHugger Robot
058aab30b8 Merge "tombstoned: log where we're writing the tombstone." into oc-dr1-dev 2017-06-13 16:37:48 +00:00
Hung-ying Tyan
75801ab5e3 Load /prop.default in recovery mode
Bug: 37815285
Bug: 62525809
Test: Tested with ag/2398663 and ag/2400523. Booted pixel phones,
      checked the location of prop.default, verified the symlink,
      checked a few properties via adb shell and manually tested
      a few apps.
      Booted to recovery and ran 'adb sideload' successfully.
Change-Id: I034b700fcd60b0104873131e94864b16ef4bd9f6
2017-06-13 21:22:50 +08:00
Hung-ying Tyan
12ea2d12ef Revert "Revert "Load default prop from /system/etc/prop.default""
This reverts commit 98a73a2ce1.

Bug: 37815285
Bug: 62525809
Test: Tested with ag/2398663 and ag/2400524. Booted pixel phones,
      checked the location of pro.default, verified the symlink
      at /default.prop, checked a few properties via adb shell and
      manually tested a few apps.
      Booted to recovery mode and ran 'adb sideload' successfully.
Change-Id: I407412a7002b898ffb352cb5f331cab9c15be39a
2017-06-13 21:22:06 +08:00
Josh Gao
55213b6b23 Merge "tombstoned: log where we're writing the tombstone." into oc-dev
am: 855333f346  -s ours

Change-Id: I6b28215be9b3b7586d7fe93f942e43af1067ec9e
2017-06-13 06:45:49 +00:00
Josh Gao
cc25d86de9 tombstoned: log where we're writing the tombstone.
Make it easy to find out where a specific crash's tombstone was written
to by adding a log.

Bug: http://b/62268830
Test: crasher
Merged-In: I1961dfb19f76a42a8448ebafd4be153b73cb6800
Change-Id: I7da49a96bf76dbaa3558ba64539f33283f916d8f
(cherry picked from commit cb68a0317d)
2017-06-12 23:41:45 -07:00
TreeHugger Robot
855333f346 Merge "tombstoned: log where we're writing the tombstone." into oc-dev 2017-06-13 05:35:09 +00:00
Josh Gao
3272000382 tombstoned: log where we're writing the tombstone.
Make it easy to find out where a specific crash's tombstone was written
to by adding a log.

Bug: http://b/62268830
Test: crasher
Merged-In: I1961dfb19f76a42a8448ebafd4be153b73cb6800
Change-Id: I1961dfb19f76a42a8448ebafd4be153b73cb6800
(cherry picked from commit cb68a0317d)
2017-06-12 21:02:02 +00:00
Tao Bao
869f48a256 Merge "Revert "Load default prop from /system/etc/prop.default"" into oc-dev
am: 642ca632f6  -s ours

Change-Id: Ice9637c768c0ef1bf60e603e31be3f5403c81aa3
2017-06-12 19:57:06 +00:00
Tao Bao
642ca632f6 Merge "Revert "Load default prop from /system/etc/prop.default"" into oc-dev 2017-06-12 19:39:53 +00:00
Tao Bao
98a73a2ce1 Revert "Load default prop from /system/etc/prop.default"
This reverts commit 810d71b005.

init fails to read default.prop under recovery:
init: Couldn't load properties from /default.prop: Too many symbolic links encountered

Bug: 62525809
Change-Id: I1f84a18e545e1307dcb230be51606cca731667f9
2017-06-12 17:07:11 +00:00
TreeHugger Robot
1a7a5419d0 Merge "Don't allow libui.so to RS drivers." into oc-dr1-dev 2017-06-12 02:04:21 +00:00
Daichi Hirono
e5a1556d40 Add more logs for writing failures.
Bug: 62429763
Test: libappfuse_test
Change-Id: Ie0eabd09ae9ad3f8ba8c4f38f871dad16b5c58ff
2017-06-12 10:37:08 +09:00
TreeHugger Robot
998e3b28ba Merge "first stage mount: removing the restriction of mount points" into oc-dr1-dev 2017-06-10 11:41:29 +00:00
Jiyong Park
9242f68c0d Don't allow libui.so to RS drivers.
libui.so is not VNDK-SP, so it must not be allowed to RS drivers.

Bug: 37550338
Test: camerascript app works well in 2017 pixel devices
Change-Id: I34971baebdc91f11935d1eb4ddd07d89d4c38958
2017-06-09 17:38:28 +09:00
Hung-ying Tyan
8d87ae4794 Merge "Load default prop from /system/etc/prop.default" into oc-dev
am: 0af496af01  -s ours

Change-Id: Iba712935e81f5a11d524c889f9f7b0ba405f5283
2017-06-09 08:12:20 +00:00
Hung-ying Tyan
0af496af01 Merge "Load default prop from /system/etc/prop.default" into oc-dev 2017-06-09 08:04:36 +00:00
Hung-ying Tyan
810d71b005 Load default prop from /system/etc/prop.default
/default.prop is moved to /system/etc/prop.default for full Treblized
devices. Modifies property_service to load it from there first.

Bug: 37815285
Test: Tested with ag/2371424. Booted pixel phones, checked the location
      of pro.default, verified the symlink at /default.prop, checked a
      few properties via adb shell and manually tested a few apps.

Change-Id: I485231f21fc86b0aec58edf867e229a31e77d85e
2017-06-09 13:02:56 +08:00
Bowgo Tsai
81af8c7362 first stage mount: removing the restriction of mount points
Current first stage mount only allows three mount points: system, vendor
and/or odm. This was introduced by project Treble to mount those
verified partitions early. However, there might be some other custom
partitions needs to be mounted early as well. This CL removes the
restriction and does first stage mount for whatever specified in
fstab-dt.

Bug: 62423887
Test: first stage mount /vendor with vboot 1.0
Test: first stage mount /vendor with vboot 2.0 (AVB)

Change-Id: I6c146c64e673c35c2823523ccbde193590430c48
Merged-In: I6c146c64e673c35c2823523ccbde193590430c48
(cherry picked from commit 06ed613e73)
2017-06-09 12:47:17 +08:00
Yifan Hong
fabe549af1 Mark libqemu_pipe vendor_available
Test: lunch aosp_arm && m -j BOARD_VNDK_VERSION=current

Bug: 38244611
Bug: 62449588

Change-Id: I6f9bc5b1f376a046d05d77436360b32c65981165
2017-06-08 14:16:11 -07:00
Yifan Hong
e250fd84db libqemu: Android.mk -> bp
Test: mma

Bug: 37512442
Change-Id: I96f482b3f7734ca217084104b9b733d33459d635
2017-06-08 14:16:11 -07:00
Josh Gao
fd79f01baf adb: libusb: switch from polling for accessibility to a sleep.
For unclear reasons, it seems that for some people, devices are
becoming accessible, inaccessible, and then inaccessible again.
Switch to a sleep for now.

Bug: http://b/62200735
Test: manual
Merged-In: Id51dcb188c3534a57c35cbfd30a181c99115a23c
Change-Id: Id51dcb188c3534a57c35cbfd30a181c99115a23c
(cherry picked from commit 5b8b10e078)
2017-06-07 11:29:21 -07:00
Josh Gao
f74dd42e4e adb: improve race between device_connected and device_disconnected.
If a device is unplugged while it's being processed, we can be inside
register_usb_transport still when we call unregister_usb_transport,
leading to bad things happening. Move the call of
register_usb_transport into the scope guarded by usb_handles_mutex.

Bug: http://b/62200735
Test: manual
Merged-In: I2517dcb9d30d9a08cebbb5f715ae3fd30c510109
Change-Id: I2517dcb9d30d9a08cebbb5f715ae3fd30c510109
(cherry picked from commit 7dd382ded9)
2017-06-07 11:29:14 -07:00
Logan Chien
435baf5d00 Add libion.so to vndk-sp
am: 40624c5d1d  -s ours

Change-Id: Ifc8472bca50a78be5f75bc4bdec1e51462dbcdf2
2017-06-07 17:57:35 +00:00
Logan Chien
40624c5d1d Add libion.so to vndk-sp
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.

Bug: 62280700
Test: Boots a device from our partners
Merged-In: Ib745dfe52107d792296426b097e13b7c7755d88c
Merged-In: I2bcfe40ed9342de6d81dd310313e984a2c64964b
Change-Id: If30657b93157a2abea29fadcdb0004b37ad9eaf2
2017-06-07 18:13:32 +08:00
Logan Chien
5c880b948e Add libion.so to vndk-sp
This commit adds libion.so to VNDK-SP so that some vendor's
gralloc.${chipset}.so can run without problems.

Bug: 62280700
Test: Boots a device from our partners
Change-Id: I2bcfe40ed9342de6d81dd310313e984a2c64964b
2017-06-07 18:09:37 +08:00
Guang Zhu
fc82c971d4 add component metadata tag to CTS liblog test acses am: de29bf4884
am: c2fbcf6f67  -s ours

Change-Id: Icd55ddd16afadb9dfa2c8f40619ff0b617bd5582
2017-06-06 19:39:51 +00:00
Guang Zhu
c2fbcf6f67 add component metadata tag to CTS liblog test acses
am: de29bf4884

Change-Id: I4bc7c46b9498227ccd19c558fd821d80974bd404
2017-06-06 19:28:39 +00:00
Guang Zhu
8b1f1ca92f Merge "add component metadata tag to CTS liblog test acses" 2017-06-06 19:02:46 +00:00
Josh Gao
8e2661eedc Merge changes I6c6bf61b,I3fb0b3a8 am: 3160a25010 am: 9d7880fe96 am: 14f749c2c4
am: 2d30a74181

Change-Id: I57a3916c312b8cc23c616232e84ad6c5507b5a39
2017-06-06 03:05:34 +00:00
Josh Gao
2d30a74181 Merge changes I6c6bf61b,I3fb0b3a8 am: 3160a25010 am: 9d7880fe96
am: 14f749c2c4

Change-Id: I626e726e1672da9cc1077677b0178e70dda1e923
2017-06-06 02:57:02 +00:00
Josh Gao
14f749c2c4 Merge changes I6c6bf61b,I3fb0b3a8 am: 3160a25010
am: 9d7880fe96

Change-Id: I3f339fdceaa146d5de54957ea35df38e4fc24472
2017-06-06 02:52:01 +00:00
Josh Gao
9d7880fe96 Merge changes I6c6bf61b,I3fb0b3a8
am: 3160a25010

Change-Id: Ida24fdd74569b2c57bdb0d3cdcfa486faf3cf3f2
2017-06-06 02:45:33 +00:00
Treehugger Robot
3160a25010 Merge changes I6c6bf61b,I3fb0b3a8
* changes:
  adb: libusb: don't try to delete a usb_handle twice.
  adb: don't hold queue lock while performing callbacks.
2017-06-06 02:39:40 +00:00
Guang Zhu
de29bf4884 add component metadata tag to CTS liblog test acses
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: I352145965e8cd20371ccce3ba2b25f3a166bc3e8
Merged-In: Ifb7a14817265b4624f1dc6414b547c86aafcf4ac
2017-06-05 23:21:23 +00:00
Guang Zhu
44a4ab854e add component metadata tag to CTS liblog test acses
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: Ifb7a14817265b4624f1dc6414b547c86aafcf4ac
2017-06-05 23:17:50 +00:00
Josh Gao
60b8c26520 adb: libusb: don't try to delete a usb_handle twice.
Previously, we would attempt to delete a usb_handle in both
device_disconnected and usb_close. If the one in device_disconnected
happened to happen first, usb_close would abort when it failed to find
the handle it was supposed to own.

Bug: http://b/62020217
Test: unplugging device on darwin
Change-Id: I6c6bf61bf89a4d9a23458c00b457080d3d6cc744
2017-06-05 15:11:53 -07:00
Josh Gao
664a618c06 adb: don't hold queue lock while performing callbacks.
Fix yet another source of deadlocks.

Bug: http://b/62020217
Test: unplugged device on darwin
Change-Id: I3fb0b3a84c56aed7d0da8ddba36e2d01fdb682ee
2017-06-05 14:54:45 -07:00
Jaegeuk Kim
0331c2cf77 fs_mgr: call format_f2fs correctly with -f
This patch formats f2fs with -f option.

Change-Id: I3fc415f35d81f22cbf1eadebc619465d36205927
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-06-05 13:57:15 -07:00
Mark Salyzyn
dd9cb94957 Merge "liblog: add bool to android_log_event_list" am: d105aa8496 am: 16d6ed1845 am: e19946d27c
am: 9698d08e05

Change-Id: I7fb581ccbc357022e679e741cd84dabf08c430ef
2017-06-05 17:54:17 +00:00
Mark Salyzyn
9698d08e05 Merge "liblog: add bool to android_log_event_list" am: d105aa8496 am: 16d6ed1845
am: e19946d27c

Change-Id: Ic0f19c3525896e92b88d2f9af69b760858b4c422
2017-06-05 17:51:46 +00:00
Mark Salyzyn
e19946d27c Merge "liblog: add bool to android_log_event_list" am: d105aa8496
am: 16d6ed1845

Change-Id: I2ab2284780ec03716c476d09b7988d07eb18331d
2017-06-05 17:44:15 +00:00