Commit Graph

58242 Commits

Author SHA1 Message Date
Joshua Duong 788b308188 Merge changes from topic "adbwifi-client-mdns" am: a71ba615ea am: 73447676aa am: 560b4a0c94
Change-Id: Ica35bc1d72ed33a2693166a54893491647cdb12d
2020-02-18 06:03:26 +00:00
Joshua Duong 560b4a0c94 Merge changes from topic "adbwifi-client-mdns" am: a71ba615ea am: 73447676aa
Change-Id: Ifc9736f4ab3940ad48e16691d3d0cae33adea315
2020-02-18 05:45:42 +00:00
Joshua Duong 73447676aa Merge changes from topic "adbwifi-client-mdns" am: a71ba615ea
Change-Id: I621b1667dd42fca057c2ac992bf1fa4f988555af
2020-02-18 05:30:03 +00:00
Joshua Duong a71ba615ea Merge changes from topic "adbwifi-client-mdns"
* changes:
  add a version TXT record to adb secure mdns services
  adbd: only register dnsservices via explicit API
  adb client interface for secure services
  get the ip address info for all DNS services
  make the client browse for appropriate mdns services
  Add mDNS services for pairing and connect
2020-02-18 05:14:19 +00:00
Lingfeng Yang 39e54b8c5b add a version TXT record to adb secure mdns services
In the context of secure connect, allows adbd and host adb to reject
each other based on incompatible versions without even having to
actually connect (since it is a DNS TXT).

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: I54312d8b67370c397ba81ecdbca1b27e3ee58572
2020-02-18 05:13:06 +00:00
Lingfeng Yang 615036f494 adbd: only register dnsservices via explicit API
For privacy/security reasons, let's not broadcast the adb secure
services on startup automatically, and instead leave that up to
the rest of the adbd code somehow.

Instead, this CL adds an API in daemon/mdns.h that lets the user
control when registration happens, potentially only doing so if
the developer option is enabled or something.

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: Idc994a59ef9e5d48f08796c21989883497e19ef8
2020-02-18 05:12:52 +00:00
Lingfeng Yang cef4ade8e1 adb client interface for secure services
This CL exposes a callback-based interface to perform some action for
each resolved pairing/connect service as a function of their hostname,
ip address, and port.

The ADB client can then use this information to either set up secure
connections directly, or to tell the adb host server to do so, or
something.

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: I2dd04c322df5b0597859f44703cfd2f3f29fd737
2020-02-18 05:12:36 +00:00
Lingfeng Yang 4b62bcde04 get the ip address info for all DNS services
This CL adds functionality to the class ResolvedService where the ip
address associated with a resolved DNS service is recorded.

It also avoids connecting to the device unless it is the Things-related
DNS service.

Next step is to add some kind of interface in other parts of adb code
to retrieve these IP addresses.

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: I46895a7a5bf5660f524c7323a9454f1e2c7d385c
2020-02-18 05:12:25 +00:00
Lingfeng Yang c712f2db76 make the client browse for appropriate mdns services
This CL makes it so the client looks for the adb secure pairing
and adb secure connect services. Nothing else should happen,
but this should be useful to see if the right packet traffic for
discoverability is happening.

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: I266bdb8526cf39bbfa131344dca2b1bb14c14a7b
2020-02-18 05:10:52 +00:00
Lingfeng Yang be49d8a2a9 Add mDNS services for pairing and connect
- ADB Secure Pairing
- ADB Secure Connect

Nothing else is implemented.

Bug: 111434128, 119490749

Test: N/A
Exempt-From-Owner-Approval: already approved
Change-Id: I2e7873b62a3c7631451e47f6a301f8c4a5ffa2e2
2020-02-18 05:07:32 +00:00
Treehugger Robot d15f1fc063 Merge "Utility class to measure snapshot merge duration" am: e87527faa3 am: e6060c927c am: 5a88ff5e18
Change-Id: Ie2f86222e09bdaf1976f10fd996912d550b47e7d
2020-02-18 02:55:13 +00:00
Treehugger Robot 5a88ff5e18 Merge "Utility class to measure snapshot merge duration" am: e87527faa3 am: e6060c927c
Change-Id: I5a45e418293f6cc9fe523e3ead09475308ee06d1
2020-02-18 02:41:56 +00:00
Treehugger Robot e6060c927c Merge "Utility class to measure snapshot merge duration" am: e87527faa3
Change-Id: I951e71eacee17d5ecf1f3b3edca2beb7d2ad38dd
2020-02-18 02:26:43 +00:00
Treehugger Robot e87527faa3 Merge "Utility class to measure snapshot merge duration" 2020-02-18 02:12:16 +00:00
Alessio Balsini cd3915d2e7 Utility class to measure snapshot merge duration
With the Virtual A/B feature, when the device successfully boots after an OTA
update, a dm-snapshot merge operation is performed, which consolidates the
updated images to the base devices.  This merge operation depends on the OTA
size and may affect the device performance until completed.
Create the SnapshotMergeStats class that takes care of measuring the duration
of a merge operation and manages the merge state file to continue tracking the
merge in the case of an interruption due to a reboot.

Bug: 138817833
Test: m
Change-Id: I9dcf1423716c89d8f9b4a0feb4e75bb7b9d18935
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-17 16:36:36 +00:00
Treehugger Robot 470d50854e Merge "snapshot: helper to get access snapshot_state path" am: 34ad19f4c4 am: 054e278ab1 am: f9b8446205
Change-Id: I0609f33a5d13fea8fff8689db2c32c5386c90bda
2020-02-17 13:11:51 +00:00
Treehugger Robot f9b8446205 Merge "snapshot: helper to get access snapshot_state path" am: 34ad19f4c4 am: 054e278ab1
Change-Id: I1f10485c805426597c147c95197a47340b374105
2020-02-17 12:56:39 +00:00
Treehugger Robot 054e278ab1 Merge "snapshot: helper to get access snapshot_state path" am: 34ad19f4c4
Change-Id: I7088d6cf474ec65522315ff11597941ded130f79
2020-02-17 12:44:04 +00:00
Treehugger Robot 34ad19f4c4 Merge "snapshot: helper to get access snapshot_state path" 2020-02-17 12:31:49 +00:00
Wei Wang f21f71bdbc Merge "fsmgr: print unabbreviated log when exec child commands" am: 71fcaf5726 am: a7a1a9690e am: 96114740a3
Change-Id: I42fb007fb13e703eb57e185d1df780a4a9372c3a
2020-02-17 10:12:59 +00:00
Suren Baghdasaryan cb3003c1bc Merge "Set lowmemorykiller kernel driver parameters before lmkd is started" am: 36ef05cbde am: b3553f8963 am: 355db04b78
Change-Id: I585cac23b8bfe71db2e7a649f4c815a1dd88e091
2020-02-17 10:12:44 +00:00
Treehugger Robot 15c0b798bd Merge "bootstat: enhance last reboot reason property with file backing" am: 7550e6f882 am: ffd276388f am: c0210f1d0e
Change-Id: I6d953d6b9308dc46619e52f81cb5469b22df55d0
2020-02-17 10:12:25 +00:00
Wei Wang 96114740a3 Merge "fsmgr: print unabbreviated log when exec child commands" am: 71fcaf5726 am: a7a1a9690e
Change-Id: I7973d5f4ab33ac972ab33e0ff1b80cb3ce49c3a6
2020-02-15 07:41:44 +00:00
Wei Wang a7a1a9690e Merge "fsmgr: print unabbreviated log when exec child commands" am: 71fcaf5726
Change-Id: If6d6bf1bedf703357c25f8179ab1a0958290b681
2020-02-15 07:26:16 +00:00
Wei Wang 71fcaf5726 Merge "fsmgr: print unabbreviated log when exec child commands" 2020-02-15 07:06:37 +00:00
Suren Baghdasaryan 355db04b78 Merge "Set lowmemorykiller kernel driver parameters before lmkd is started" am: 36ef05cbde am: b3553f8963
Change-Id: Ie0805dc4957df0a82080fda8bdb8d8748d8b67d5
2020-02-15 01:36:46 +00:00
Ruchir Rastogi d430c85c52 Merge "Delete stats_event_list from libstatssocket" 2020-02-15 01:34:34 +00:00
Suren Baghdasaryan b3553f8963 Merge "Set lowmemorykiller kernel driver parameters before lmkd is started" am: 36ef05cbde
Change-Id: I5531b99dd32326f72ba1a06643ac286f05b71ddd
2020-02-15 01:20:14 +00:00
Suren Baghdasaryan 36ef05cbde Merge "Set lowmemorykiller kernel driver parameters before lmkd is started" 2020-02-15 01:02:08 +00:00
Treehugger Robot c0210f1d0e Merge "bootstat: enhance last reboot reason property with file backing" am: 7550e6f882 am: ffd276388f
Change-Id: Ib88d1f04b039d613d1bfe536383036a64b3ab9a7
2020-02-14 23:58:12 +00:00
Treehugger Robot ffd276388f Merge "bootstat: enhance last reboot reason property with file backing" am: 7550e6f882
Change-Id: I34032211f2e49b8e5a105afe0540cbce543c8fd9
2020-02-14 23:46:09 +00:00
Treehugger Robot 7550e6f882 Merge "bootstat: enhance last reboot reason property with file backing" 2020-02-14 23:36:49 +00:00
Wei Wang 02e89ecdb5 fsmgr: print unabbreviated log when exec child commands
logs need to be printed at time when it is generated by the child
process which is very useful to understand the boottime impact of
those blocking commands.

Bug: 149418646
Test: boot
Change-Id: Ibee343af6088d57b2976bceb812abb58f3b3f610
2020-02-14 23:34:39 +00:00
TreeHugger Robot ea37af2c62 Merge "AStatsEvent_overwriteTimestamp" 2020-02-14 23:11:48 +00:00
TreeHugger Robot 346e73b00a Merge "Revert "Explicitly disable FUSE"" 2020-02-14 22:01:23 +00:00
Ruchir Rastogi e1cff24259 Delete stats_event_list from libstatssocket
This change is done in internal master because the flag has not been
switched in AOSP, so stats_event_list is still being used there.

Test: m -j
Bug: 145573568
Change-Id: Ica525d0fd731b8d3e9d273ce2220a3d3179d93d9
2020-02-14 13:34:10 -08:00
Mark Salyzyn ee016ce0b3 bootstat: enhance last reboot reason property with file backing
Helps with support of recovery and rollback boot reason history, by
also using /metadata/bootstat/persist.sys.boot.reason to file the
reboot reason.

Test: manual
Bug: 129007837
Change-Id: Id1d21c404067414847bef14a0c43f70cafe1a3e2
2020-02-14 13:24:16 -08:00
Suren Baghdasaryan 8136531529 Merge "libprocessgroup: Prevent SetProcessProfiles from using cached fd" am: e6f2b7d884 am: 9b2ef5c7db am: 178a102a4f
Change-Id: Ic119b8d02695f9bcb1a1fae2cccb689c8fe6dc5d
2020-02-14 21:07:12 +00:00
Alessio Balsini be0e44d0f1 snapshot: helper to get access snapshot_state path
/metadata/ota/snapshot_state is a temporary file that keeps track of
snapshot merge operations across reboots.

Bug: 138817833
Test: m
Change-Id: I9785db3f73e1575b8ac8a522d938d09f8948e1b0
Signed-off-by: Alessio Balsini <balsini@google.com>
2020-02-14 20:49:08 +00:00
Suren Baghdasaryan 178a102a4f Merge "libprocessgroup: Prevent SetProcessProfiles from using cached fd" am: e6f2b7d884 am: 9b2ef5c7db
Change-Id: I8864137ea3ff86597a54cec31c8cc17d6dc2474b
2020-02-14 20:47:40 +00:00
Suren Baghdasaryan 9b2ef5c7db Merge "libprocessgroup: Prevent SetProcessProfiles from using cached fd" am: e6f2b7d884
Change-Id: If0c41894534a2b5b42ba2febac0c6d0bfb517c64
2020-02-14 20:34:28 +00:00
Suren Baghdasaryan e6f2b7d884 Merge "libprocessgroup: Prevent SetProcessProfiles from using cached fd" 2020-02-14 20:17:39 +00:00
Mark Salyzyn cc7cf4fa5a Merge changes I5b4a87d6,I131315d4 am: 48c0de4907 am: 0bfe8df121 am: cf044e0f1c
Change-Id: Id86b51c063544d6f65eb1c2a88d5646f4f2ab856
2020-02-14 20:12:28 +00:00
Mark Salyzyn cf044e0f1c Merge changes I5b4a87d6,I131315d4 am: 48c0de4907 am: 0bfe8df121
Change-Id: Id05a84d2584926d60ab5e5248348b835788a63e4
2020-02-14 19:54:56 +00:00
Howard Ro f8e70a5bf8 Merge "Expose AStatsSocket_close() from the statsd apex" 2020-02-14 19:43:21 +00:00
Mark Salyzyn 0bfe8df121 Merge changes I5b4a87d6,I131315d4 am: 48c0de4907
Change-Id: I83a35efa9a1b5115a6203a4ab1d4bf177097b657
2020-02-14 19:35:17 +00:00
Mark Salyzyn 48c0de4907 Merge changes I5b4a87d6,I131315d4
* changes:
  fs_mgr: overlayfs: test: if wait_for_screen times out, skip later
  fs_mgr: remount: add -v option
2020-02-14 19:20:23 +00:00
Mark Salyzyn f7aa5403c5 fs_mgr: overlayfs: test: if wait_for_screen times out, skip later
To improve the test period for adb-remount-test.sh, if the device
fails to get to the launcher on the first try when wait_for_screen,
then print a warning to skip all later wait_for_screen conditions.

The wait_for_screen testing is really there to deal with first
confirming that the device is capable of getting to the launcher,
and that later tests that influence corners of adb remount behavior
do not result in a failure to get to the launcher screen.  The
developer should look into ways to fix the failure to get to the
launcher on the first try, but failure to do so should have no
bearing on the remaining tests, so dropping the wait_for_screen
functionality is not an issue.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: adb-remount-test.sh
Bug: 148881519
Change-Id: I5b4a87d6e1f545a304eb74f2114aadd1128f25b3
2020-02-14 11:19:35 -08:00
Mark Salyzyn ba2449b6ca fs_mgr: remount: add -v option
By default print only ERROR message, or messages without a source
(eg: [fs_mgr]) library.  Print all messages to stderr if the -v
option is added.  Always log all messages to the Android logger.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Test: adb-remount-test.sh
Change-Id: I131315d4bae6ed29991043033811cf22e6032f8b
2020-02-14 11:19:35 -08:00
Ruchir Rastogi e41a6c621c AStatsEvent_overwriteTimestamp
Create a function to overwrite timestamp for LogEvent tests. This
function is not exposed outside of the APEX.

Test: bit libstatssocket_test:*
Change-Id: Id0eac485af60e952cc700f7d1231b1b971400982
2020-02-14 10:56:49 -08:00