* 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
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
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
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
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
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
The SnapshotMergeStats class is issued by SnapshotManager to track the
merge duration and possible reboots during the merge process.
Bug: 138817833
Test: m
Change-Id: I04e53bb8f6aa9e740c0dcc77c3a9566383954fba
Signed-off-by: Alessio Balsini <balsini@google.com>
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>
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
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
/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>
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
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
The metadata_csum can enhance ext4 stability, so this patch adds a way to
enable it.
Requiring "metadata_csum" in fsmgr flag of fstab.
Bug: 149039306
Change-Id: I618a65d7afc63a617f5f2582c93002af7f8e7234
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Because we cache file descriptors associated with cgroup "tasks" file it
should not be used with SetProcessProfiles API which operates on entire
processes rather than tasks. Change SetProcessProfiles API to prevent
cache fd usage, modify ExecuteForProcess to not attempt to use cached
fd. Also fix unconditional calls to EnableResourceCaching from
ExecuteForTask which should be called only when SetTaskProfiles is used
with use_fd_cache set to true.
Bug: 149524788
Change-Id: I880efaf8217a4dd7ccfbb4fb167b2295cefc057a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
When kernel lowmemorykiller driver is enabled lmkd detects it by
checking write access to /sys/module/lowmemorykiller/parameters/minfree
parameter. By default this file does not have write access and init
process changes that from "on boot" section of init.rc. However
"on boot" is never executed in the charger mode, therefore lmkd fails
to detect the kernel driver. Fix this by setting lowmemorykiller kernel
driver parameters before lmkd is started.
Bug: 148572711
Test: boot into charger mode with kernel lmk driver enabled
Change-Id: Ifc3ef725b95bdb5f7d801031429dc26bae014d1f
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Those keys will be used for key revocation check by DSU installation
service. Note that failing to copy those keys to /metadata is NOT fatal,
because it is auxiliary to perform public key matching prior to booting
into DSU images on next boot. The actual key matching will still be done
on next DSU boot.
Bug: 146910547
Test: boot device, checks the avb keys are copied to /metadata/gsi/dsu/avb/.
Change-Id: I25a4eba82e84288bac7a859205c920628a063651
Since both the client and daemon will now be generating keys.
BUG: b/111434128
Test: atest adb_crypto_test
Change-Id: I6fac562ae5629ab30b6639fbd88d822dae6e96bd