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)
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)
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
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
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)
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)
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
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
/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
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)
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)
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)
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
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
Bug: 36140955
Bug: 35360169
Test: new unit test to ensure that all modules have this field
Change-Id: I352145965e8cd20371ccce3ba2b25f3a166bc3e8
Merged-In: Ifb7a14817265b4624f1dc6414b547c86aafcf4ac
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