Commit Graph

39126 Commits

Author SHA1 Message Date
Dan Willemsen 94e4dc26bb Fix fastboot dist to be compatible with adb
We've got an internal target 'static_sdk_tools' that attempts to ensure
that both adb and fastboot are distributed as artifacts. It's
essentially a loop calling dist-for-goals on
$(HOST_OUT_EXECUTABLES)/{adb,fastboot}.

The dist-for-goals macro has de-duplication checks, but both the src and
dest needs to be identical. Currently adb is using the installed
executable, fastboot is using the built executable, and static_sdk_tools
is trying to use the installed versions of both.

This causes an overriding commands for target warning, which I recently
turned into a warning.

Maybe everything should be converted over to using the built
executables, but that requires a bunch more checks everywhere, and most
places are already using the installed version.

Bug: 77775726
Test: check treehugger, fastboot is dist
Test: m BUILD_HOST_static=1 static_sdk_tools dist
Change-Id: If45fb9706fa75a812610224708b5f95f65b1f1bf
2018-04-09 14:26:23 -07:00
Mark Salyzyn 86c931c5f3 Merge "base: kernel logging get pre-opened /dev/kmsg from environment"
am: 7ff06150c1

Change-Id: I4a2e66fc0ad8b117a0b48e300293ad87d0dde30a
2018-04-09 12:36:48 -07:00
Treehugger Robot 7ff06150c1 Merge "base: kernel logging get pre-opened /dev/kmsg from environment" 2018-04-09 19:26:36 +00:00
Elliott Hughes a1a254bf26 Merge "Add fastboot --os-version and --os-patch-level."
am: 09f2af48fe

Change-Id: I8fc7a8a4d9a281661460167a71bc669c42b61fc8
2018-04-09 11:50:54 -07:00
Elliott Hughes 09f2af48fe Merge "Add fastboot --os-version and --os-patch-level." 2018-04-09 18:40:04 +00:00
Elliott Hughes 577e8b44b6 Add fastboot --os-version and --os-patch-level.
Also move -c to --cmdline to match the python mkbootimg tool. Remove
the short options for these rarely-used options.

Remove #if 0 cruft from <bootimg/bootimg.h>.

Bug: http://b/77340848
Test: manual testing (need to fix http://b/77809061 for unit tests)
Change-Id: Ieaa795566611bd89ba3fee39a1d9f6ad0713a587
2018-04-09 18:37:39 +00:00
Mark Salyzyn 2507a048ab base: kernel logging get pre-opened /dev/kmsg from environment
If the environment has an instance of /dev/kmsg pre-opened, pick up.
This happens when an init script has 'file w /dev/kmsg' in the
daemon's recipe.

libcutils android_get_control_file operations are open-coded to
prevent a dependency on libcutils itself.  Also check that /dev/kmsg
file descriptor is valid and open'd for write only.

Test: check to make sure init() kernel logging still works
Bug: 77541952
Bug: 77661605
Change-Id: I007553acd594ef0815d23f32f8aa2867518570ba
2018-04-09 07:19:33 -07:00
David Anderson 6cebd27db8 Merge "storaged: remove unused includes"
am: 0289f35b83

Change-Id: I60f1482e456c351f00e95c50c18eb759501138c9
2018-04-06 13:25:59 -07:00
David Anderson 0289f35b83 Merge "storaged: remove unused includes" 2018-04-06 20:08:50 +00:00
Mark Salyzyn f062a2cd9e Merge "lmkd: only mlockall() if enabled"
am: 7ee579f6ea

Change-Id: I9e4eedbef5caddca9d7f5452dc483a73cb7de728
2018-04-06 07:32:47 -07:00
Mark Salyzyn 7ee579f6ea Merge "lmkd: only mlockall() if enabled" 2018-04-06 14:21:08 +00:00
Juho Ha d832ea815d Merge "Make libbinderwrapper available in /vendor partition"
am: c593147991

Change-Id: Ia4111ab5808d0c97d066d3902ad8e4b6af8fbd4c
2018-04-06 00:58:55 -07:00
Juho Ha c593147991 Merge "Make libbinderwrapper available in /vendor partition" 2018-04-06 07:47:10 +00:00
Elliott Hughes 9b0d281c4f Merge "Support /odm and /product in "adb remount" and "adb sync"."
am: 6eb9248cb3

Change-Id: I998a0bfa15013c763158db1cda7b06d3271caa43
2018-04-05 19:39:17 -07:00
Luis Hector Chavez 00b2dffd38 Merge "adb: Correctly drop caps when ambient capabilities are used"
am: 44f78bed19

Change-Id: Ifd1f6300a027ad994e57b2c070d180f6e867280d
2018-04-05 19:38:28 -07:00
Mark Salyzyn 4f7d8851a5 Merge "lmkd: test: access /sys/module/lowmemorykiller/ as u:r:shell:s0"
am: b69cb7071d

Change-Id: I230b476f66a86195bfe5cfb3e153960f205cd496
2018-04-05 19:36:01 -07:00
David Anderson 6d65f7c61a storaged: remove unused includes
Bug: 35323867
Test: N/A
Change-Id: I21c0b62765dbd27a462288c5e7577905240720f0
2018-04-05 18:55:08 -07:00
Elliott Hughes 6eb9248cb3 Merge "Support /odm and /product in "adb remount" and "adb sync"." 2018-04-06 01:16:04 +00:00
Treehugger Robot 44f78bed19 Merge "adb: Correctly drop caps when ambient capabilities are used" 2018-04-06 01:05:29 +00:00
Treehugger Robot b69cb7071d Merge "lmkd: test: access /sys/module/lowmemorykiller/ as u:r:shell:s0" 2018-04-06 00:31:14 +00:00
Juho Ha fea13b8501 Make libbinderwrapper available in /vendor partition
Some modules in /vendor partition need to use this
library.

Bug: 77626538
Test: Build docs, test_suites_arm64, test_suites_x86_64
      in Android Things branch

Change-Id: Iec50a4dd9af7cd3b426e5d34d0dd1bf923ece627
2018-04-06 08:41:21 +09:00
Elliott Hughes 10d0c8c37e Merge "Remove the "needs_erase" workaround."
am: bd7b2dcaca

Change-Id: I51f83909de7ef6ddcca0182be372a9b1f7af22b2
2018-04-05 16:30:41 -07:00
Elliott Hughes bd7b2dcaca Merge "Remove the "needs_erase" workaround." 2018-04-05 23:23:17 +00:00
Luis Hector Chavez daacf4f6f3 adb: Correctly drop caps when ambient capabilities are used
This change splits the capability-dropping step of adbd into two. This
is more robust when ambient capabilities are being used, since minijail
cannot currently handle that case.

Bug: 77146512
Test: grep Cap /proc/`pidof adbd`/status
      CapInh: 0000000000000000
      CapPrm: 0000000000000000
      CapEff: 0000000000000000
      CapBnd: 00000000000000c0
      CapAmb: 0000000000000000

Change-Id: I0476a8d80f7a2497600196932542045f3bc87537
2018-04-05 15:34:05 -07:00
Josh Gao 6d200f0982 Merge "adbd: configure jemalloc to not immediately purge."
am: fa1f191ad9

Change-Id: I73bb95509c0ded7fb1e4c8755074ccfd1ddb88fe
2018-04-05 15:25:57 -07:00
Treehugger Robot fa1f191ad9 Merge "adbd: configure jemalloc to not immediately purge." 2018-04-05 22:14:05 +00:00
Josh Gao 218f766e21 adbd: configure jemalloc to not immediately purge.
Profiling of adb_benchmark revealed that something like half of the CPU
time was being spent in malloc and free, which was odd because the
benchmark repeatedly mallocs and frees allocations of the same size. It
turns out that our default configuration of jemalloc will purge after
every free. Configure jemalloc to not do this, for gains of over 100%
on adb_benchmark, and up to 25% (on walleye USB3) in real-life.

Test: adb_benchmark
Change-Id: I602dd1645c3d21709c7f6a78903511ce4d576558
2018-04-05 15:13:30 -07:00
Jaekyun Seok fb031e37a0 Merge "Allow vendor-init-actionable for wlan.driver.status and init.svc.surfaceflinger"
am: 5e5509e8fc

Change-Id: I8d74085efee03b2dfb94a9566496842a9e774ce4
2018-04-05 14:36:51 -07:00
Treehugger Robot 5e5509e8fc Merge "Allow vendor-init-actionable for wlan.driver.status and init.svc.surfaceflinger" 2018-04-05 21:25:02 +00:00
Elliott Hughes 59efd440eb Remove the "needs_erase" workaround.
This workaround shouldn't be necessary now we're using mke2fs.

Bug: http://b/25429933
Test: `fastboot -w flashall`
Change-Id: I577ad445a02a448102fb49674360a732aa3d153c
2018-04-05 14:24:00 -07:00
Tom Cherry a901c56d2b Merge "Remove vendor Wifi and BT entries from fs_config.cpp"
am: 09daaa4991

Change-Id: I1cb1ad321ca55785cff45a4fb677b105b92bbf7f
2018-04-05 10:56:33 -07:00
Tom Cherry 09daaa4991 Merge "Remove vendor Wifi and BT entries from fs_config.cpp" 2018-04-05 17:39:53 +00:00
Jaekyun Seok 167ec7f1d2 Allow vendor-init-actionable for wlan.driver.status and init.svc.surfaceflinger
They are being used as action triggers in some devices including Pixels.
So vendor-init-actionable should be allowed for them.

Bug: 74266614
Test: building succeeded and tested on a Pixel with
PRODUCT_COMPATIBLE_PROPERTY=true

Change-Id: I713c5c1a50053f8d64e1cecd1f7ab5dc18201da1
2018-04-05 21:20:59 +09:00
Elliott Hughes 32a4750ba2 Merge "Remove `emergency` from the `fastboot reboot` completions."
am: 243be559a1

Change-Id: I7d40da109e13f94cb67140c95eb0c5a3263c3b06
2018-04-04 19:45:28 -07:00
Treehugger Robot 243be559a1 Merge "Remove `emergency` from the `fastboot reboot` completions." 2018-04-05 02:36:19 +00:00
Elliott Hughes e95da26f44 Merge "Add newer partitions to the `fastboot flash` completions."
am: 3810f0076b

Change-Id: Ia8f9159b506c7f4a20dbe0b387cb0deb65824c8a
2018-04-04 19:34:25 -07:00
Treehugger Robot 3810f0076b Merge "Add newer partitions to the `fastboot flash` completions." 2018-04-05 02:24:34 +00:00
Josh Gao 454f13818d Merge "Revert "Revert "adb: add transport benchmark."""
am: 8daf742900

Change-Id: Iad7c5e6886ed48b96e59c05ee86d9a89174d9714
2018-04-04 18:57:45 -07:00
Treehugger Robot 8daf742900 Merge "Revert "Revert "adb: add transport benchmark.""" 2018-04-05 01:49:38 +00:00
Elliott Hughes f51faea1ca Merge "Consistently use - rather than _ in fastboot option tab completion."
am: 52cd10fed6

Change-Id: I22381670a6133e347bb8278c6311cc08ded867f3
2018-04-04 17:52:04 -07:00
Elliott Hughes d27a1e4208 Merge changes I50e27f46,I0b7cd983,I3639fdee
am: eace8e2e53

Change-Id: I3d1e1a1db9bee11b73347f5a84a01ea7eddd42e6
2018-04-04 17:50:31 -07:00
Treehugger Robot 52cd10fed6 Merge "Consistently use - rather than _ in fastboot option tab completion." 2018-04-04 23:11:47 +00:00
Elliott Hughes eace8e2e53 Merge changes I50e27f46,I0b7cd983,I3639fdee
* changes:
  Remove lock_bootloader/unlock_bootloader.
  Remove `reboot emergency`.
  Clean up fastboot help:
2018-04-04 22:57:17 +00:00
Jaegeuk Kim fc9c87b2c4 Merge "make_f2fs: specify sector size for target image size and missing options"
am: e21b764eb6

Change-Id: If582b09ea80eb21c581a7a2b9099138b4c9dc157
2018-04-04 14:37:12 -07:00
Josh Gao 9c59649e0b Revert "Revert "adb: add transport benchmark.""
This reverts commit 2ef56a1174.

host_supported is broken in cc_benchmark on Mac, but we probably don't
actually too much about the host benchmarks, so just delete the line.

Bug: http://b/77585931
Test: treehugger
Change-Id: I8898b4037a3faf8e8dee2a99498a6f84e642b92b
2018-04-04 14:26:39 -07:00
Treehugger Robot e21b764eb6 Merge "make_f2fs: specify sector size for target image size and missing options" 2018-04-04 21:26:11 +00:00
Elliott Hughes bd1e2dd67d Remove `emergency` from the `fastboot reboot` completions.
Bug: N/A
Test: N/A
Change-Id: Ia22f51061c845ea19a697e86ac109c02960251fa
2018-04-04 13:51:54 -07:00
Elliott Hughes f0b9c7ccd2 Add newer partitions to the `fastboot flash` completions.
Bug: N/A
Test: `fastboot flash \t`
Change-Id: I1f33c90b8c26b18b9984102ac084b8865d72ff06
2018-04-04 13:51:24 -07:00
Elliott Hughes b2b90154a8 Consistently use - rather than _ in fastboot option tab completion.
(fastboot actually supports both, but only barbarians use underscore.)

Bug: N/A
Test: `fastboot \t`
Change-Id: I52166d8b0e91285d16bcf65ad51de20f57a00ad1
2018-04-04 13:43:56 -07:00
Elliott Hughes 2e9b779d42 Remove lock_bootloader/unlock_bootloader.
These were implemented on Nexus 5X/6P, but the infrastructure for the
challenge-response system isn't available.

Bug: N/A
Test: N/A
Change-Id: I50e27f469ea7c668de1af314f83f5171376ccda4
2018-04-04 13:36:44 -07:00