Commit graph

58388 commits

Author SHA1 Message Date
Joshua Duong
e36a53e307 Properly remove adb DNS services.
Bug: b/150136878
Bug: b/111434128

Bug: http://b/150032044
Test: make
Change-Id: Ibfb92a7c197a25fd1913107d277fbc5f78108c05
Merged-In: Ibfb92a7c197a25fd1913107d277fbc5f78108c05
(cherry picked from commit 79a452a923)
2020-02-24 17:58:34 -08:00
Josh Gao
3467ef46d4 adbd: fix build breakage.
This broke because two CLs touching the Android.bp file both
independently passed presubmit, but failed when combined.

Clean up a misindentation while we're at it.

Bug: http://b/150032044
Bug: http://b/150032367
Test: mma in system/core/adb
Change-Id: I091ef9dec806c767ffb21a5fd73b2bb37ab29ff9
Merged-In: I091ef9dec806c767ffb21a5fd73b2bb37ab29ff9
(cherry picked from commit 6d949e89a4)
2020-02-24 17:58:21 -08:00
Josh Gao
b5778c1fe7 adbd: remove static dependency on libcutils.
We were previously statically linking libcutils into adbd for several
different reasons, which were addressed as follows:

  socket functions: extracted to a statically linked libcutils_network
  fs_config: wrapped with a shared library on /system
  ATRACE: deleted the single use in adbd

Bug: http://b/150032044
Test: treehugger
Change-Id: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
Merged-In: I821fa174cfcbfa8e29a4be10de4016b817adbaf8
(cherry picked from commit a9b62d5452)
2020-02-24 17:58:06 -08:00
George Burgess IV
15c7a3f8f8 incremental_server: fix a use of uninitalized memory
Without this, the caller is likely to assume that their buffer is
fully usable, which clang's analyzer doesn't believe is the case.

Another option is to set `*size` to nonzero.

Caught by the static analyzer:
system/core/adb/client/incremental_server.cpp:111:31: warning: 1st
function call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]

Bug: http://b/150032044
Test: TreeHugger
Change-Id: Ib844aa4ab3ebb297ca8f6f4289bbe3212275275b
Merged-In: Ib844aa4ab3ebb297ca8f6f4289bbe3212275275b
(cherry picked from commit 19b500bd50)
2020-02-24 17:57:58 -08:00
David Srbecky
7e41e88cc5 Rewrite DwarfSectionImpl::InsertFde
Simplify and fix the algorithm.

For consecutive functions (eg [10,20] [20,30]) without
padding in between, the old algorithm would drop FDEs.

Bug: http://b/150050915
Test: libunwindstack_test
Change-Id: Ie886922bec262fb64d4b2ecf01c2961d0652dcdb
(cherry picked from commit a6617cb179)
2020-02-23 06:34:21 +00:00
Automerger Merge Worker
05b54742ff Merge changes from topic "adbwifi-system-core" am: e20d3a006a am: 7c6cb8b9dc am: 79b10538e0
Change-Id: I8a42f01bb83e944bb724fb2d10f2daca8965ee25
2020-02-21 21:50:42 +00:00
Automerger Merge Worker
68aaeea326 Merge "[adbwifi] Add pairing_auth library." am: df8f1217d0 am: 8cc1101a45 am: 1af041bb06
Change-Id: Id78335484123cd3aa5a0963d64d714000ff14737
2020-02-21 21:50:35 +00:00
Automerger Merge Worker
8c09983efe Merge "adbd_auth function signature changes." am: d62c817cce am: f3c0bcf622 am: 32bac7b483
Change-Id: I74db7c1c915a43251400348e0e11791af566cacd
2020-02-21 21:50:13 +00:00
Automerger Merge Worker
79b10538e0 Merge changes from topic "adbwifi-system-core" am: e20d3a006a am: 7c6cb8b9dc
Change-Id: I3b2d9693f8f481a5c9e8386940b17cd35316e897
2020-02-21 21:37:07 +00:00
Automerger Merge Worker
1af041bb06 Merge "[adbwifi] Add pairing_auth library." am: df8f1217d0 am: 8cc1101a45
Change-Id: I22bfd6facf1345bf36c301684fa90319e025b6a0
2020-02-21 21:37:03 +00:00
Automerger Merge Worker
32bac7b483 Merge "adbd_auth function signature changes." am: d62c817cce am: f3c0bcf622
Change-Id: Idb9f945491e2c144cf569c4a10b0ff917aaec148
2020-02-21 21:36:55 +00:00
Automerger Merge Worker
7c6cb8b9dc Merge changes from topic "adbwifi-system-core" am: e20d3a006a
Change-Id: If686ba95502883a9fa47be6eb91e0ecc75e74a38
2020-02-21 21:14:53 +00:00
Automerger Merge Worker
8cc1101a45 Merge "[adbwifi] Add pairing_auth library." am: df8f1217d0
Change-Id: I7e12cc0c936d2a78939c1edf0355e543807c4b4a
2020-02-21 21:14:41 +00:00
Automerger Merge Worker
f3c0bcf622 Merge "adbd_auth function signature changes." am: d62c817cce
Change-Id: I39eea46dc9d475bf9724125708541c577fbab4c7
2020-02-21 21:14:29 +00:00
Joshua Duong
e20d3a006a Merge changes from topic "adbwifi-system-core"
* changes:
  [adbwifi] Add A_STLS command.
  [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation.
  [adbd-apex] Export adbd libraries used by system_server.
  [adbwifi] Add pairing_connection library.
2020-02-21 21:07:27 +00:00
Joshua Duong
5cf7868b7e [adbwifi] Add A_STLS command.
This command will be sent by adbd to notify the client that the
connection will be over TLS.

When client connects, it will send the CNXN packet, as usual. If the
server connection has TLS enabled, it will send the A_STLS packet
(regardless of whether auth is required). At this point, the client's
only valid response is to send a A_STLS packet. Once both sides have
exchanged the A_STLS packet, both will start the TLS handshake.

If auth is required, then the client will receive a CertificateRequest
with a list of known public keys (SHA256 hash) that it can use in its
certificate. Otherwise, the list will be empty and the client can assume
that either any key will work, or none will work.

If the handshake was successful, the server will send the CNXN packet
and the usual adb protocol is resumed over TLS. If the handshake failed,
both sides will disconnect, as there's no point to retry because the
server's known keys have already been communicated.

Bug: 111434128

Test: WIP; will add to adb_test.py/adb_device.py.

Enable wireless debugging in the Settings, then 'adb connect
<ip>:<port>'. Connection should succeed if key is in keystore. Used
wireshark to check for packet encryption.

Change-Id: I3d60647491c6c6b92297e4f628707a6457fa9420
2020-02-21 21:07:13 +00:00
Joshua Duong
d85f5c0130 [adbwifi] Add adbwifi_libs, TLS connection, and MDNS implementation.
Bug: 111434128, 119493510, 119494503

Test: Enable wireless debugging in Settings UI, click "pair with pairing code"
to generate pairing code.
On client, 'adb pair <ip_address>', enter pairing code at prompt and hit
enter. Pairing should complete.
'adb logcat'.
Change-Id: I86527bd3fc52e30a8e08ec5843dc3e100abf91fa
Exempt-From-Owner-Approval: approved already
2020-02-21 21:06:40 +00:00
Joshua Duong
16d5bc6ed5 [adbd-apex] Export adbd libraries used by system_server.
Bug: b/111434128
Bug: b/149181583

Test: cat proc/`pidof system_server`/maps | grep libadb
Test: cat proc/`pidof adbd`/maps | grep libadb
Change-Id: Idd36ca31cba7e4dc2d8836d229b23665e69b42fb
Exempt-From-Owner-Approval: approved already
2020-02-21 21:06:28 +00:00
Joshua Duong
c7a1fb8fd9 [adbwifi] Add pairing_connection library.
Bug: 111434128
Bug: 119494503

Test: atest adb_pairing_connection_test
Change-Id: I54d68c65067809832266d6c3043b63222c98a9cd
Exempt-From-Owner-Approval: approved already
2020-02-21 21:06:12 +00:00
Joshua Duong
df8f1217d0 Merge "[adbwifi] Add pairing_auth library." 2020-02-21 21:04:48 +00:00
Joshua Duong
340a5e86d2 [adbwifi] Add pairing_auth library.
Bug: 111434128
Bug: 119494503

Test: atest adb_pairing_auth_test
Change-Id: Ieada7b8d9d8817292175623af55eac235b938c65
Exempt-From-Owner-Approval: approved already
2020-02-21 21:04:39 +00:00
Joshua Duong
d62c817cce Merge "adbd_auth function signature changes." 2020-02-21 21:02:33 +00:00
Joshua Duong
51378f41a1 adbd_auth function signature changes.
Bug: 111434128

Test: make
Change-Id: If801346e436dc7d7a7dfbbc296f7b2393d1e91af
Exempt-From-Owner-Approval: approved already
2020-02-21 20:12:23 +00:00
Automerger Merge Worker
8cdbcde51a Merge "fs_mgr: support metadata_csum for ext4 partition" am: 04bf79dcb4 am: cfb05f56eb am: 72b365df47
Change-Id: Ib43fb3f967e2a0d03fbd293815befeb3de139b4d
2020-02-21 06:05:03 +00:00
Automerger Merge Worker
78fde6dd94 Merge "Initialize |sentBlocksCount|" am: b182a3582c am: 0cbea75fce am: c67b5cf8c1
Change-Id: I2ab2be5a58b4de5621121420f9f9ad4a9a8db1ed
2020-02-21 06:04:52 +00:00
Automerger Merge Worker
72b365df47 Merge "fs_mgr: support metadata_csum for ext4 partition" am: 04bf79dcb4 am: cfb05f56eb
Change-Id: Ibf6539a8d0d6af4e043042efbef9e3b833eda0d9
2020-02-21 05:54:41 +00:00
Automerger Merge Worker
c67b5cf8c1 Merge "Initialize |sentBlocksCount|" am: b182a3582c am: 0cbea75fce
Change-Id: I7948bf9bbbe865f82ec9efc8db48271b73d230c1
2020-02-21 05:54:30 +00:00
Automerger Merge Worker
cfb05f56eb Merge "fs_mgr: support metadata_csum for ext4 partition" am: 04bf79dcb4
Change-Id: Id217bec57ae8f9ab36f7af0e332328ff1decec59
2020-02-21 05:41:19 +00:00
Automerger Merge Worker
0cbea75fce Merge "Initialize |sentBlocksCount|" am: b182a3582c
Change-Id: I91a105146a320c8d1f24ecf3b4e4e0af736b77fe
2020-02-21 05:41:08 +00:00
Jaegeuk Kim
04bf79dcb4 Merge "fs_mgr: support metadata_csum for ext4 partition" 2020-02-21 05:40:48 +00:00
Yurii Zubrytskyi
b182a3582c Merge "Initialize |sentBlocksCount|" 2020-02-21 05:29:45 +00:00
Automerger Merge Worker
be87549d9c Merge "Remove ld.config.txt from adbd APEX" am: 5694a9559b am: 187bf6c184 am: c0b7e9174f
Change-Id: I14bb9216120a7995102de90d5cb638f2e37852b8
2020-02-21 04:46:26 +00:00
Automerger Merge Worker
c0b7e9174f Merge "Remove ld.config.txt from adbd APEX" am: 5694a9559b am: 187bf6c184
Change-Id: I9a3993b698fd75451ed0dd33f224eaba83bfcf2b
2020-02-21 04:35:34 +00:00
Automerger Merge Worker
187bf6c184 Merge "Remove ld.config.txt from adbd APEX" am: 5694a9559b
Change-Id: I92291c853973747891490ab0b9fafca4a15dd7a0
2020-02-21 04:19:35 +00:00
Kiyoung Kim
5694a9559b Merge "Remove ld.config.txt from adbd APEX" 2020-02-21 04:10:13 +00:00
Automerger Merge Worker
7d0bdfeb86 Merge "Fix the MacOS build of incremental*" am: f10099d79a am: 1714e21a8f am: 42ef4e2fc1
Change-Id: Ib3bcff33d63bcb78198ed3d710db8b5be71858d5
2020-02-21 02:23:11 +00:00
Automerger Merge Worker
42ef4e2fc1 Merge "Fix the MacOS build of incremental*" am: f10099d79a am: 1714e21a8f
Change-Id: Ie67e0b2c1a71c68359f620be57aa8ec7a8d422ca
2020-02-21 02:10:02 +00:00
Automerger Merge Worker
1714e21a8f Merge "Fix the MacOS build of incremental*" am: f10099d79a
Change-Id: Ic5885f76a96d4dd258d0a93df9af1e5ba71c1847
2020-02-21 01:59:26 +00:00
Josh Gao
f10099d79a Merge "Fix the MacOS build of incremental*" 2020-02-21 01:48:52 +00:00
Yurii Zubrytskyi
12051a0937 Initialize |sentBlocksCount|
It happened to always be 0 during all tests.

Test: manual
Change-Id: I2f5089096a8ecda2ec52756199412c7d43f6903c
2020-02-20 16:03:10 -08:00
Yurii Zubrytskyi
b65950642d Fix the MacOS build of incremental*
Test: local build, no feature code changes

Change-Id: Ic0072b06f6bfd6b12f26c4056bd3192cd3fdd778
2020-02-20 15:39:36 -08:00
Automerger Merge Worker
2d99a504a3 Merge "libsnapshot: fix stats write in Resume()" am: 20d9d6a630 am: b568c330dc am: 692cdf94ef
Change-Id: Id81ce411f63c7f16b0d4765f8acad94fd493a0ad
2020-02-20 20:49:54 +00:00
Automerger Merge Worker
692cdf94ef Merge "libsnapshot: fix stats write in Resume()" am: 20d9d6a630 am: b568c330dc
Change-Id: Ica782d25b00bd75e411a7c38e210dac88397bab3
2020-02-20 20:34:38 +00:00
Automerger Merge Worker
b568c330dc Merge "libsnapshot: fix stats write in Resume()" am: 20d9d6a630
Change-Id: I37c5c5eb0063d4f4c94ed321c18614b93086a2bd
2020-02-20 20:18:24 +00:00
Alessio Balsini
20d9d6a630 Merge "libsnapshot: fix stats write in Resume()" 2020-02-20 19:37:25 +00:00
Alessio Balsini
91da9dfeef libsnapshot: fix stats write in Resume()
The Resume() operation is supposed to increment the resume counter, but
the updated counter value was not written to the device.
Fix by adding the write operation and refactoring the code.

Bug: none
Test: m
Change-Id: I3fffd61cc779c59e2780900809f0ce0b84258e78
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-20 15:05:13 +00:00
Automerger Merge Worker
7b7ad663f5 Merge "Store reason in case of userspace-reboot watchdog reboot" am: e53f8b8f9d am: 93823ce9df am: 29651ce5f2
Change-Id: I255be73194c92f6c8a1ad617c0aad71ff86ef848
2020-02-20 12:04:30 +00:00
Automerger Merge Worker
69f44ea75f Merge "[adb] Add a version field to v4 signature format" am: aab85d3b4c am: 7521152cf2 am: 6d309caa59
Change-Id: I56433cae0f16bbabdb34f75f814192bd5dfb309c
2020-02-20 12:04:22 +00:00
Automerger Merge Worker
29651ce5f2 Merge "Store reason in case of userspace-reboot watchdog reboot" am: e53f8b8f9d am: 93823ce9df
Change-Id: Iac34b1d721bab27359724d10e847a65e1be36295
2020-02-20 11:50:37 +00:00
Automerger Merge Worker
6d309caa59 Merge "[adb] Add a version field to v4 signature format" am: aab85d3b4c am: 7521152cf2
Change-Id: I370ccb892a3df564e6067007eae59eb789e21608
2020-02-20 11:50:28 +00:00