Commit graph

60072 commits

Author SHA1 Message Date
Nikita Ioffe
59709d441f Merge "PrepareZramBackingDevice: use loop_control.h" into rvc-dev am: f42f972130
Change-Id: I3d07a0a0fc4e870ad261234815f3d38b9834d808
2020-04-20 20:21:27 +00:00
Nikita Ioffe
f42f972130 Merge "PrepareZramBackingDevice: use loop_control.h" into rvc-dev 2020-04-20 20:06:16 +00:00
Treehugger Robot
636c515e46 [automerger skipped] Merge "[adb data server] Initialize variable" am: 4a0a6faa08 am: cd7ddc48e5 -s ours
am skip reason: Change-Id Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6 with SHA-1 6a2c18a88f is in history

Change-Id: I67880f96e72a7c4b4f5e814bba934a4dcdcbe848
2020-04-20 19:21:53 +00:00
Yifan Hong
c86ca3f5ff Merge changes from topics "sm_mock", "sm_stub" am: 96174857f2 am: 89881e434c
Change-Id: I1c56b753157a903026fa71650cb8dd6508031ab8
2020-04-20 19:21:22 +00:00
Treehugger Robot
cd7ddc48e5 Merge "[adb data server] Initialize variable" am: 4a0a6faa08
Change-Id: I199459aae7db62cb362c980ba8b1bbc87c41cc4d
2020-04-20 19:04:52 +00:00
Yifan Hong
89881e434c Merge changes from topics "sm_mock", "sm_stub" am: 96174857f2
Change-Id: I5a175863fa6a4fb0047688d487e89c935edcc929
2020-04-20 19:04:08 +00:00
Treehugger Robot
4a0a6faa08 Merge "[adb data server] Initialize variable" 2020-04-20 18:51:23 +00:00
Yifan Hong
96174857f2 Merge changes from topics "sm_mock", "sm_stub"
* changes:
  libsnapshot: Add MockSnapshotManager and MockDeviceInfo.
  libsnapshot: Add GetSnapshotMergeStatsInstance
  libsnapshot: Add SnapshotManagerStub.
  libsnapshot: Add ISnapshotManager.
2020-04-20 18:50:01 +00:00
Greg Kaiser
89fe376d13 [adb data server] Initialize variable
servingComplete_ was left uninitialized and only set to 'true'
in the code.  We initialize it to the 'false' state to avoid
uninitialized references in SkipToRequest().

Bug: 150865433
Test: TreeHugger
Change-Id: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
Merged-In: Ia8a4d7135c432eb657543c5498fc9dbe8f4718b6
2020-04-20 11:06:13 -07:00
Nikita Ioffe
c8313adf88 PrepareZramBackingDevice: use loop_control.h
loop_control.h already provides loop device management APIs that we need
here. In addition, this change fixes a subtle race condition between
uevented creating a loop device node in userspace and
PrepareZramBackingDevice accessing it without waiting for it to be
created.

Test: device boots
Test: adb reboot userspace
Bug: 154500256
Change-Id: If80f18c8c337210030a6caf2aec6f7a47472b6fb
2020-04-20 17:38:17 +01:00
Alessio Balsini
42e2b85dba [automerger skipped] Merge "Fix liblp imported both as static and dynamic lib" into rvc-dev am: 2f8bbb97c0 -s ours
am skip reason: Change-Id I12ba0516a482dc917848b5f34cccc659a60a4803 with SHA-1 0c27fb8c5d is in history

Change-Id: I3c6172f5c4b1c0758072cbdf94a4d9271ce8d949
2020-04-20 16:01:08 +00:00
Alessio Balsini
2f8bbb97c0 Merge "Fix liblp imported both as static and dynamic lib" into rvc-dev 2020-04-20 15:35:23 +00:00
Tom Cherry
4fbcd6eae1 [automerger skipped] Merge "liblog: return -EPERM if a log_is_loggable() returns false" into rvc-dev am: 2dd0ddff06 -s ours
am skip reason: Change-Id I088f760cc274a4a42d72477eb4e2e8d23c613a8a with SHA-1 1ff17fcebb is in history

Change-Id: Ia9619e2828c36450134bd830953e8d93a4a33329
2020-04-20 15:27:51 +00:00
Tom Cherry
2dd0ddff06 Merge "liblog: return -EPERM if a log_is_loggable() returns false" into rvc-dev 2020-04-20 15:05:26 +00:00
Alessio Balsini
75be098a45 Fix liblp imported both as static and dynamic lib
In vts_libsnapshot_test, liblp was explicitly imported as static
library, but due to the importing of libsnapshot_defaults, it also
inherited the shared importing.
The import in libsnapshot_default, is not required, drop it.

Test: manual inspection with ldd
Bug: 148889015
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I12ba0516a482dc917848b5f34cccc659a60a4803
Merged-in: I12ba0516a482dc917848b5f34cccc659a60a4803
2020-04-20 14:54:23 +01:00
Elliott Hughes
f431983109 Merge "Fix unzip formatting." am: 6b9b468dcb am: faa6ce4981
Change-Id: I766d76b49e385806b823c8db7209d1146438f634
2020-04-20 05:22:45 +00:00
Elliott Hughes
faa6ce4981 Merge "Fix unzip formatting." am: 6b9b468dcb
Change-Id: I79c0dfbf2e88ed6689f2bc97c8fff385face188b
2020-04-20 05:00:38 +00:00
Elliott Hughes
6b9b468dcb Merge "Fix unzip formatting." 2020-04-20 04:49:29 +00:00
Treehugger Robot
a37e489125 Merge "Fix liblp imported both as static and dynamic lib" am: 1ff09f4726 am: 62b166a613
Change-Id: I3c71d24addcd8da440bd6d5e87a7f57e2e4dd194
2020-04-19 20:15:35 +00:00
Treehugger Robot
62b166a613 Merge "Fix liblp imported both as static and dynamic lib" am: 1ff09f4726
Change-Id: Ief3d04c9762d5d1ba5ba469f3d15753deb36a251
2020-04-19 20:02:49 +00:00
Treehugger Robot
1ff09f4726 Merge "Fix liblp imported both as static and dynamic lib" 2020-04-19 19:47:09 +00:00
Alessio Balsini
0c27fb8c5d Fix liblp imported both as static and dynamic lib
In vts_libsnapshot_test, liblp was explicitly imported as static
library, but due to the importing of libsnapshot_defaults, it also
inherited the shared importing.
The import in libsnapshot_default, is not required, drop it.

Test: manual inspection with ldd
Bug: 148889015
Signed-off-by: Alessio Balsini <balsini@google.com>
Change-Id: I12ba0516a482dc917848b5f34cccc659a60a4803
2020-04-19 18:34:32 +00:00
Josh Gao
1efd363be5 Merge "adbconnection: silence logspam." am: ff08a51a72 am: b9a10d4538
Change-Id: I591c8d81a67d6412132e4569d9ca0e4583708f95
2020-04-18 03:22:46 +00:00
Josh Gao
b9a10d4538 Merge "adbconnection: silence logspam." am: ff08a51a72
Change-Id: I0fa9ab7c50ab1d00ac8078466f4121d414fc2e6b
2020-04-18 03:01:20 +00:00
Josh Gao
ff08a51a72 Merge "adbconnection: silence logspam." 2020-04-18 02:47:11 +00:00
Treehugger Robot
34f5c7bc83 Merge "adb: change mdns tls service names (RFC 6763)." am: 22cc277bfe am: ecc11836ec
Change-Id: Ie54edd228f5263b5a64439057c19059d5dd8fae1
2020-04-18 02:24:40 +00:00
Treehugger Robot
ecc11836ec Merge "adb: change mdns tls service names (RFC 6763)." am: 22cc277bfe
Change-Id: I542061b862cf8d2296dacccd6171bbb6119c6b1e
2020-04-18 02:02:20 +00:00
Treehugger Robot
22cc277bfe Merge "adb: change mdns tls service names (RFC 6763)." 2020-04-18 01:37:41 +00:00
Treehugger Robot
891bb8d9d1 Merge "adbconnection: delete unnecessary darwin workaround." am: 04e9d07490 am: 7bdf442375
Change-Id: Id497d2c061d183e5fae9700ce0cd12db978e4cfd
2020-04-18 00:23:30 +00:00
TreeHugger Robot
05a8436460 Merge "start: Toggle iorapd on/off when using 'start' command (by itself)" into rvc-dev am: 8ee349bdbd
Change-Id: Ic8bb28c38287511405bee3d02d37b8553b9c33d8
2020-04-18 00:03:40 +00:00
Treehugger Robot
7bdf442375 Merge "adbconnection: delete unnecessary darwin workaround." am: 04e9d07490
Change-Id: I70acba2b1710256a59e2b3c2d24af4208389d99f
2020-04-18 00:02:26 +00:00
Joshua Duong
81f2db4d6a adb: change mdns tls service names (RFC 6763).
Even though mdnsresponder seems to allow us to use _adb_secure_connect
and _adb_secure_pairing as service names, these names violate the syntax
outlined in RFC6763, and may not be compatible with other dns-sd
implementations.

Also address some comments from a previous CL.

Bug: 154268895

Test: atest adbd_test
Change-Id: Ia872e976fc4276587b500a827a41d46d9dc755dd
2020-04-17 16:38:34 -07:00
Josh Gao
d81a805a4c adbconnection: silence logspam.
Userdebug devices enable JDWP for every process, so if adbd is turned
off manually, we get an error message for every single process on the
system.

Bug: http://b/154319466
Test: manual
Change-Id: Ia702974d371e35497573c31e22cfb2b572334590
2020-04-17 16:35:01 -07:00
Treehugger Robot
04e9d07490 Merge "adbconnection: delete unnecessary darwin workaround." 2020-04-17 23:28:40 +00:00
TreeHugger Robot
8ee349bdbd Merge "start: Toggle iorapd on/off when using 'start' command (by itself)" into rvc-dev 2020-04-17 23:26:47 +00:00
Elliott Hughes
6f5913511c Fix unzip formatting.
Test: toybox tests, plus the ziptool tests
Change-Id: I31fd36c1bdb015b7b5062b53874143eb28b20d24
2020-04-17 16:07:01 -07:00
Tom Cherry
ef855954de liblog: return -EPERM if a log_is_loggable() returns false
This was the previous behavior, so retain it.

Bug: 119867234
Test: logging unit tests
Merged-In: I088f760cc274a4a42d72477eb4e2e8d23c613a8a
Change-Id: I088f760cc274a4a42d72477eb4e2e8d23c613a8a
(cherry picked from commit 1ff17fcebb)
2020-04-17 15:51:55 -07:00
Josh Gao
4a1da79208 adbconnection: delete unnecessary darwin workaround.
This shouldn't be compiling for the mac.

Test: none
Change-Id: I9aea1861365c0da041c665e14e3e86cb802ad697
2020-04-17 14:46:41 -07:00
Peter Collingbourne
ed5cde4f36 Merge "libunwindstack: Add Memory::ReadTag() function for reading memory tags." am: b416a925ab am: 3c1f492ee1
Change-Id: Ief0c7672706df05c8d1aeb006083b1a26015f652
2020-04-17 18:55:30 +00:00
Peter Collingbourne
3c1f492ee1 Merge "libunwindstack: Add Memory::ReadTag() function for reading memory tags." am: b416a925ab
Change-Id: I5a748b08e866cda1fd33c3b0d40b4bf8c9a094c5
2020-04-17 18:33:05 +00:00
Peter Collingbourne
b416a925ab Merge "libunwindstack: Add Memory::ReadTag() function for reading memory tags." 2020-04-17 18:16:05 +00:00
Nikita Ioffe
18021cd525 [automerger skipped] Merge "Cleanup logic in KillZramBackingDevice" am: 1e98e552c6 am: b0c6174a30 -s ours
am skip reason: Change-Id I4709da1d08cf427ad9c898cfb2506b6a29f1d680 with SHA-1 a840d405eb is in history

Change-Id: Id9e29f86f684f55e617e44c846c4d0b03494c4b0
2020-04-17 15:39:40 +00:00
Nikita Ioffe
b0c6174a30 Merge "Cleanup logic in KillZramBackingDevice" am: 1e98e552c6
Change-Id: I23f2ce900d81c89662839e7c0899272afb93439d
2020-04-17 15:18:29 +00:00
Nikita Ioffe
1e98e552c6 Merge "Cleanup logic in KillZramBackingDevice" 2020-04-17 15:03:56 +00:00
Nikita Ioffe
a3be996673 Cleanup logic in KillZramBackingDevice
Since this function is used in userspace reboot, we need to be more
diligent with error handling, e.g.:

* If init fails to read /sys/block/zram0/backing_dev, then fail and
fallback to hard reboot.
* Always call swapoff.
* Always reset zram.
* Tear down loop device only if zram is backed by a loop device.

Test: adb reboot userspace
Bug: 153917129
Change-Id: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
Merged-In: I4709da1d08cf427ad9c898cfb2506b6a29f1d680
(cherry picked from commit a840d405eb)
2020-04-17 12:28:25 +01:00
Nikita Ioffe
0e28a9b31f Merge "Cleanup logic in KillZramBackingDevice" into rvc-dev am: aa0ec1a902
Change-Id: I8d3cf312c9aa649d52ad2aa11b0296bf64c019aa
2020-04-17 10:34:41 +00:00
Jerome Gaillard
563a6dd69a Merge "macOS build fix: no off64_t on darwin." into rvc-dev am: acc1a1b5de
Change-Id: Ia4f6526497ede13a8527221ee2f81745ae25ef52
2020-04-17 10:34:35 +00:00
Nikita Ioffe
aa0ec1a902 Merge "Cleanup logic in KillZramBackingDevice" into rvc-dev 2020-04-17 10:23:44 +00:00
Jerome Gaillard
acc1a1b5de Merge "macOS build fix: no off64_t on darwin." into rvc-dev 2020-04-17 10:17:22 +00:00
Elliott Hughes
44daa2dde1 macOS build fix: no off64_t on darwin.
Darwin has always had a 64-bit off_t, and never added an off64_t.

Bug: 153328340
Test: builds on mac
Change-Id: I4b244dda94c67da76c9e0f47b333c2734f5a94af
2020-04-17 10:17:02 +00:00