Commit Graph

58450 Commits

Author SHA1 Message Date
TreeHugger Robot 626a4651af Merge "fs_mgr: fix checking for casefold feature already enabled" into rvc-dev 2020-02-27 17:32:06 +00:00
Florian Mayer 7b5ac170d5 Merge "Always use shared memory for atrace." into rvc-dev 2020-02-27 10:50:01 +00:00
TreeHugger Robot f3dfd4d821 Merge "init: prevent persist.sys.usb.config initalized as none,adb" into rvc-dev 2020-02-27 00:53:15 +00:00
Eric Biggers b2bac7f051 fs_mgr: fix checking for casefold feature already enabled
EXT4_FEATURE_INCOMPAT_CASEFOLD is a flag in s_feature_incompat, not in
s_feature_ro_compat.

Bug: 138322712
Test: Treehugger
Change-Id: I07bb1d2b818d423196d8ceebda8900a8adbb19e9
Merged-In: I07bb1d2b818d423196d8ceebda8900a8adbb19e9
2020-02-26 15:43:05 -08:00
Jiyong Park 7e5f2aa478 Merge "Mark updatable APEXes" into rvc-dev 2020-02-26 17:13:12 +00:00
Florian Mayer 923880e176 Always use shared memory for atrace.
Remove ATRACE_SHMEM macro.

Test: atrace ss
      atrace wm
      sanity check output
Bug: 137366208
Change-Id: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
Merged-In: I1b42243678b9b9a41db18e2ff8cb3cf7bde874de
2020-02-26 16:59:18 +00:00
Howard Yen 446c4fbed0 init: prevent persist.sys.usb.config initalized as none,adb
Prevent appending ",adb" to persist.sys.usb.config if "none" is
explicitly defined in default prop.

Bug: 150130503
Test: persist.sys.usb.config initalized correctly
Change-Id: I3b5de6fd102e252019e843f39f0875f5aaea7486
2020-02-26 22:02:08 +08:00
Josh Gao 58d8065034 Merge changes from topic "adbd_cp" into rvc-dev
* changes:
  Properly remove adb DNS services.
  adbd: fix build breakage.
  adbd: remove static dependency on libcutils.
  incremental_server: fix a use of uninitalized memory
2020-02-25 11:48:18 +00:00
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
Arthur Ishiguro c3605ef9c4 Adds AID_CONTEXT_HUB
This will be used to access the Context Hub.

Bug: 149981913
Test: Compile
Change-Id: Ic89cf5b1a8a01ea7077bf7dd89501ed3623f217d
2020-02-24 20:58:31 +00:00
Jiyong Park 7c2ae1f02c Mark updatable APEXes
Mark updatable APEXes as updatable: true so that they are opted-out from
optimizations that make sense only for non-updatable modules; such as
symlinking to the libs in the system partition.

Bug: 149805758
Test: m and check that there is no symlink from the APEX to the system
partition.

Change-Id: Ic3edc7e285e9eafbdaa20b18ccbc0b2231370779
2020-02-24 18:39:23 +09: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