Commit graph

56893 commits

Author SHA1 Message Date
Treehugger Robot
551130fc2b Merge "Revert "Revert "Delay initial accept() until server initialized""" 2020-03-28 01:27:38 +00:00
Treehugger Robot
02875acf84 Merge "[adb] Use incremental installation by default" 2020-03-28 00:47:26 +00:00
David Anderson
9d7eaf48bc Merge "fastbootd: Unmount /cache before flashing." 2020-03-27 23:48:13 +00:00
Treehugger Robot
e578fd579e Merge "init: even better logging around subsequent sys.powerctl messages" 2020-03-27 23:30:25 +00:00
Yifan Hong
4e78aa8f12 Merge changes from topic "fdr_merge"
* changes:
  libsnapshot: Allow forward merge on FDR
  libsnapshot: Place forward merge indicator for wipe
  libsnapshot: Add allow-forward-merge indicator.
  libsnapshot: Fix DataWipeAfterRollback test
2020-03-27 23:05:15 +00:00
Treehugger Robot
e10591fc62 Merge "init: do not handle control messages after shutdown" 2020-03-27 22:55:30 +00:00
Treehugger Robot
cf14ea2c7f Merge "init: fix StopSendingMessages()" 2020-03-27 22:36:51 +00:00
Tom Cherry
080fa98815 init: even better logging around subsequent sys.powerctl messages
Bug: 150863651
Test: add delays during critical parts of shutdown and see the
      expected debug information
Change-Id: Ida586903fd3eefc32ca9ee34ea2db037896ed9f4
2020-03-27 14:39:16 -07:00
Tom Cherry
22d6348845 init: do not handle control messages after shutdown
We already stop queue'ing new control messages, but we forgot to stop
handling those control messages that are already queued.  This CL
fixes that.

Bug: 150863651
Test: CF reboots appropriately
Change-Id: Ifea07a30b868de23eb735db10d8bae410e1b98bb
2020-03-27 14:08:20 -07:00
Tom Cherry
68855276a1 init: fix StopSendingMessages()
A typo made this function a no-op.

Bug: 150863651
Test: CF responds to messages appropriately
Change-Id: Iaae0264fae3f2b899ceb5ba0364a4773df1f7ca3
2020-03-27 13:57:53 -07:00
Daniel Colascione
c2612cd775 Revert "Revert "Delay initial accept() until server initialized""
This reverts commit b71b5af783.

Test: actually build device and host adb this time
Change-Id: I9f9375aa83c9d023a1e26d2f95676b734e12f926
2020-03-27 20:51:19 +00:00
Yurii Zubrytskyi
4532ea881a [adb] Use incremental installation by default
This CL turns on the incremental installation for all
"adb install ..." commands where no explicit mode has been set.
To disable this, set the ADB_INSTALL_DEFAULT_INCREMENTAL
environment variable to 0/n/no/false. Unset to enable back

+ improve the install command argument parsing a bit: allow
  --wait for all installation modes, --incr is enough for
  an incremental install (and --no-incr to disable it)

Bug: 150183149
Test: adb install with different apks and command line switches
Change-Id: I1a237f34b70d920146746ab16104e28ef555a5fd
2020-03-27 12:30:29 -07:00
Tom Cherry
44a6d9a527 Merge "init: use an eventfd instead of socketpair to wake the main loop" 2020-03-27 17:10:55 +00:00
Tom Cherry
40463336a8 init: use an eventfd instead of socketpair to wake the main loop
eventfd is a more suitable mechanism.

Bug: 150863651
Test: boot CF, ctl.start services, reboot CF
Change-Id: Ie5c3b0c048afdd7afa4bfc4cba26bec3225925e5
2020-03-27 08:08:52 -07:00
Treehugger Robot
6b42d6d859 Merge "adb: Avoid extra string construction" 2020-03-27 15:00:05 +00:00
Greg Kaiser
030f1effdf adb: Avoid extra string construction
Test: TreeHugger
Change-Id: Ie03062a17b98866f1bc419a7e509461cf4e6bb80
2020-03-27 06:10:11 -07:00
Yurii Zubrytskyi
a1f41fc6f1 Merge "[adb] generic "cast_handle_to_int" function" 2020-03-27 07:03:22 +00:00
Treehugger Robot
f225aa3f24 Merge "adb: fix bugreport status line." 2020-03-27 06:14:16 +00:00
Yurii Zubrytskyi
e3e64b8f54 [adb] generic "cast_handle_to_int" function
Now one can use it without platform #ifdefs

Bug: 150183149
Test: compiles
Change-Id: I6280dcdd2faaff33014f11237d9d04231ac16b82
2020-03-26 22:25:46 -07:00
Josh Gao
82f715b7b5 adb: fix bugreport status line.
The status line char* was getting converted to bool and used as the
compression argument, and the actual status line was defaulting to
nullptr. This didn't actually really change anything, since we only use
the name during transfer, and not for the final message at the end, so
the output is slightly uglier for 50 milliseconds.

This also had the side effect of turning on compression for the
already-compressed bugreport zip, which costs a bit of throughput with
brotli.

Bug: https://issuetracker.google.com/150827486
Test: adb bugreport foo.zip
Change-Id: I74bed9c09442c655a956eb1e8318c0123632ef4c
2020-03-26 21:10:31 -07:00
Treehugger Robot
919678bcbe Merge "libsnapshot: Fix intermittent test failure due to missing null check." 2020-03-27 00:24:19 +00:00
Yifan Hong
973b8c10d1 libsnapshot: Allow forward merge on FDR
If forward merge indicator exists at unverified state during FDR,
we are allowed to initiate merge and finish it before wiping userdata.

Test: downgrades
Test: update with data wipe
Test: vts_libsnapshot_test
Bug: 152094219
Change-Id: I151f1af4aca446cc52e669c5c3ea2b2e55acb468
2020-03-26 15:01:13 -07:00
Yifan Hong
6b0251232a libsnapshot: Place forward merge indicator for wipe
If the device applies a package with FDR, place forward merge indicator
so that on FDR, the snapshots aren't abandoned, and we forward merge
the update.

Test: apply downgrade
Test: apply update with data wipe
Test: vts_libsnapshot_test
Bug: 152094219
Change-Id: Id32aeca380db797cd777321837f146333ae6b33c
2020-03-26 15:01:13 -07:00
Treehugger Robot
d9fb5c895b Merge "init: add missing TEMP_FAILURE_RETRY" 2020-03-26 21:59:30 +00:00
David Anderson
533b2b6296 libsnapshot: Fix intermittent test failure due to missing null check.
Bug: 152547190
Test: vts_snapshot_test
Change-Id: If7adc4fba61325e52d6268531ce0a15b00c0a380
2020-03-26 14:56:11 -07:00
Yifan Hong
f9e1e16377 libsnapshot: Add allow-forward-merge indicator.
The indicator signals that on factory data reset, initiating
merge is allowed.

Test: vts_libsnapshot_test
Test: apply downgrade update
Test: apply update with FDR
Bug: 152094219
Change-Id: Ieecddd198136571dd652ca62c27fe65a12b7b15f
2020-03-26 14:56:11 -07:00
Yifan Hong
a4f9b07490 libsnapshot: Fix DataWipeAfterRollback test
Test: run it
Bug: 152094219
Change-Id: I06852d7a0514481cbeed3ef66192ba49a24cb54b
2020-03-26 14:56:11 -07:00
Tom Cherry
975bfe1146 init: add missing TEMP_FAILURE_RETRY
Bug: 150863651
Test: boot
Merged-In: I09e86e08a716c2c2933e090d57818a9aad6486f8
Change-Id: I09e86e08a716c2c2933e090d57818a9aad6486f8
2020-03-26 20:50:35 +00:00
Josh Gao
4dc73c0b58 Merge "adb: implement compression for file sync." 2020-03-26 20:34:17 +00:00
Josh Gao
939fc19aee adb: implement compression for file sync.
This improves performance when syncing by up to 2x (remote cuttlefish
goes from 11.9 MB/s to 21.3 MB/s, blueline over USB 2.0 from 36 MB/s
to 70 MB/s).

This results in a slight drop in push speeds over USB 3.0 (125 -> 115
MB/s on blueline), presumably because we're compressing and extracting
on only a single thread, but the gains over lower bandwidth transports
make this worth it to submit this now and parallelize later.

Bug: https://issuetracker.google.com/150827486
Test: ADB_COMPRESSION={0, 1} test_device.py (with new/old adbd)
Change-Id: Ic2a0c974f1b6efecda115f87d336e3caac810035
2020-03-26 13:31:32 -07:00
David Anderson
2ffc31b090 fastbootd: Unmount /cache before flashing.
Bug: 150112538
Test: fastboot flash cache on non-A/B device
Change-Id: I8a86bc4d12e4b3be020bbe47e02262a5aaa913a7
2020-03-25 21:00:13 -07:00
Joshua Duong
1e413c8a9d Merge changes from topic "adbwifi-bugfixes"
* changes:
  Pass the os handle to the tls connection.
  Fix pairing aes_128_gcm key initialization.
2020-03-26 02:16:14 +00:00
Joshua Duong
1b273ed0e3 Pass the os handle to the tls connection.
This fixes the tls connection failure on Windows.

Bug: 150719467

Test: 'adb pair', 'adb connect' on Windows host machine.
Test: atest adb_tls_connection_test
Change-Id: I54b8945543ad8b430510fa51dd7bea64a119454f
2020-03-26 02:16:01 +00:00
Joshua Duong
87c00f8c80 Fix pairing aes_128_gcm key initialization.
Bug: 150719467

Test: atest adb_pairing_auth_test
Test: check 'adb pair' command on all three platforms work
Change-Id: Idfc64fe7bed2d09f4da9d2f7df70f9d6ae4e8fa3
Exempt-From-Owner-Approval: approved in go/ag/10808153
2020-03-26 02:14:48 +00:00
Treehugger Robot
5e4b94d44d Merge "Revert "Revert "Set apex_available property""" 2020-03-26 00:42:36 +00:00
Jiyong Park
697134d1d4 Revert "Revert "Set apex_available property""
This reverts commit 56a712f6c9.

Reason for revert: forward fix is at aosp/1265379

Exempt-From-Owner-Approval: relanding of an already approved CL

Change-Id: I0d93417939d570ce21f105ee4b3bae6414194dbe
2020-03-26 00:23:56 +00:00
Nikita Ioffe
fc51af215b Merge "Use properties for various userspace reboot timeouts" 2020-03-25 20:02:05 +00:00
Tom Cherry
08e3b83917 Merge changes from topic "liblog-api-review"
* changes:
  Reland: "Fixed a typo in the version name""
  liblog: correct new APIs per the API review
2020-03-25 18:44:18 +00:00
Tom Cherry
3e4c8acfdb Reland: "Fixed a typo in the version name""
This reverts commit e6e87fd705.

Bug: 150949964
Test: build
Change-Id: Ia2f04700fcd9b8e2e3bef7ab5084d36444161939
2020-03-25 18:36:26 +00:00
Tom Cherry
ebf43ad2d8 liblog: correct new APIs per the API review
1) Rename __android_logger_data to __android_log_message and rename
   __android_log_write_logger_data to
   __android_log_write_log_message. Move the const char* message
   argument into __android_log_message.
2) Add @param, @return, and "Available since API level 30." to the
   documentation of new functions.
3) Document that the user defined aborter should but may not abort.
4) Document the line separation is the responsibility of the log
   function provided to __android_log_set_logger().

Bug: 150898477
Test: build, liblog and libbase unit tests
Change-Id: I07c41011ef25b3e7cc4943f3f1e240a2f6aa2802
2020-03-25 18:36:10 +00:00
Nikita Ioffe
7b41a1558d Use properties for various userspace reboot timeouts
Test: adb reboot userspace
Bug: 146560409
Change-Id: I435e4f93a8769ff7d30cf781e0b48fa3e96121ef
2020-03-25 17:46:13 +00:00
David Anderson
f12ea1ed1b Merge "init: Forcefully mount system_ext on DAP devices if not present in fstab." 2020-03-25 17:01:38 +00:00
Treehugger Robot
58f35246cf Merge "init: add more logging around reboots" 2020-03-25 15:48:24 +00:00
Treehugger Robot
02e31fc51e Merge changes from topic "merge-incremental-adb"
* changes:
  [adb] file sync performance on Windows
  Adding block kind to protocol for future streaming of a tree.
  [adb] Print fewer progress messages for push/pull
  [adb] Optimize fdevent machinery
  [adb] Fix incremental installation on Windows
  [adb incremental] send priority blocks first
  [adb data server] wait for installation results before terminates
  Implement the new v4 signing scheme in adb
2020-03-25 05:46:21 +00:00
David Anderson
d0ce5303e3 init: Forcefully mount system_ext on DAP devices if not present in fstab.
Bug: 150315914
Test: cuttlefish boots with system_ext missing from fstab
Change-Id: I99f292a070678b8a98500258af98129fbd81dfa7
2020-03-24 22:24:32 -07:00
Tom Cherry
1c688365ac init: add more logging around reboots
Particularly in the case of the device failing to reboot.  Some test
devices are showing that they've received the reboot message but
without rebooting.

Bug: 150863651
Test: prevent init from handling reboot and see a stacktrace
Test: reboot works normally
Change-Id: Ide001dadbb9e9cd235ea509066e6ae6664bb429b
2020-03-24 18:01:50 -07:00
Tianjie Xu
19c5cc224f Merge "Implement the functions to parse zip64 structs" 2020-03-25 00:21:46 +00:00
Tianjie
6ab29129ec Implement the functions to parse zip64 structs
Implement the logic to parse zip64 eocd and zip64 extended info
in the extra field. Also add unit tests and python tests which
create packages larger than 4GiB.

The extraction of zip entry size > 4GiB will be supported in the follow
ups.

Bug: 150900468
Test: unit tests pass
Change-Id: I4cd9ebbd9709b3d2f9cd293625d2c79024bb45a5
2020-03-24 15:06:57 -07:00
Treehugger Robot
2d90168f80 Merge "Add vts10 suite to existing vts tests" 2020-03-24 21:49:44 +00:00
Tom Cherry
7581e86a72 Merge "Remove ANDROID_LOG_RDONLY, etc" 2020-03-24 21:00:57 +00:00