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
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
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
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
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
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
This workaround shouldn't be necessary now we're using mke2fs.
Bug: http://b/25429933
Test: `fastboot -w flashall`
Change-Id: I577ad445a02a448102fb49674360a732aa3d153c
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
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
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
This isn't in the bootloader requirements doc, and the internet implies
that you actually need to use `fastboot oem edl` or `fastboot oem
reboot-edl` anyway.
Bug: N/A
Test: N/A
Change-Id: I0b7cd9839fbd06fc104d029e92d5986dc3c6eda3
The total sectors that we want to format is used in different meanings from
various users. This notifies its size based on 4096 bytes explicitly.
Bug: 76407663
Change-Id: I4e00f2e2289c1381f0238d2a4acb606a0ab551a9
Merged-In: I4e00f2e2289c1381f0238d2a4acb606a0ab551a9
Reported-by: katao@xiaomi.com
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Use this for offline stack data so that it's not necessary to
copy any data around.
Add unit tests for the new object.
Bug: 77258731
Bug: 74354410
Test: Ran libunwindstack/libbacktrace unit tests.
Change-Id: I9b0f25d9520c96e64aedef5f295423c60ddb3488
When connecting to an address, we construct a transport first, and then
check whether we've already connected to that address. The consequent
destruction of the BlockingConnectionAdapter attempts to join threads
that haven't been started, which aborts.
Make it safe to destruct a BlockingConnectionAdapter without calling
Start on it first, to solve this.
Bug: http://b/69137547
Test: nc -l 12345 & (adb connect localhost:12345; adb connect localhost:12345)
Test: python test_adb.py
Change-Id: I6cb968a62dbac6332907e06575893d764905ee62
After:
usage: fastboot [OPTION...] COMMAND...
flashing:
update ZIP Flash all partitions from an update.zip package.
flashall Flash all partitions from $ANDROID_PRODUCT_OUT.
On A/B devices, flashed slot is set as active.
Secondary images may be flashed to inactive slot.
flash PARTITION [FILENAME]
Flash given partition only.
basics:
devices [-l] List devices in bootloader (-l: with device paths).
getvar NAME Display given bootloader variable.
reboot [bootloader] Reboot device.
locking/unlocking:
flashing lock|unlock Lock/unlock partitions for flashing
flashing lock_critical|unlock_critical
Lock/unlock 'critical' bootloader partitions.
flashing get_unlock_ability
Check whether unlocking is allowed (1) or not(0).
advanced:
erase PARTITION Erase a flash partition.
format[:FS_TYPE[:SIZE]] PARTITION
Format a flash partition.
set_active SLOT Set the active slot.
oem [COMMAND...] Execute OEM-specific command.
boot image:
boot KERNEL [RAMDISK [SECOND]]
Download and boot kernel from RAM.
flash:raw PARTITION KERNEL [RAMDISK [SECOND]]
Create boot image and flash it.
-c CMDLINE Override kernel command line.
--base ADDRESS Set kernel base address (default: 0x10000000).
--kernel-offset Set kernel offset (default: 0x00008000).
--ramdisk-offset Set ramdisk offset (default: 0x01000000).
--tags-offset Set tags offset (default: 0x00000100).
--page-size BYTES Set flash page size (default: 2048).
--header-version VERSION Set boot image header version.
Android Things:
stage IN_FILE Sends given file to stage for the next command.
get_staged OUT_FILE Writes data staged by the last command to a file.
options:
-w Wipe userdata.
-u Do not erase partition first when formatting.
-s SERIAL Specify a USB device.
-s tcp|udp:HOST[:PORT] Specify a network device.
-i VENDOR_ID Filter devices by USB vendor id.
-S SIZE[K|M|G] Use sparse files above this limit (0 to disable).
--slot SLOT Use SLOT; 'all' for both slots, 'other' for
non-current slot (default: current active slot).
--set-active[=SLOT] Sets the active slot before rebooting.
--skip-secondary Don't flash secondary slots in flashall/update.
--skip-reboot Don't reboot device after flashing.
--disable-verity Sets disable-verity when flashing vbmeta.
--disable-verification Sets disable-verification when flashing vbmeta.
--wipe-and-use-fbe Enable file-based encryption, wiping userdata.
--unbuffered Don't buffer input or output.
--verbose, -v Verbose output.
--version Display version.
--help, -h Show this message.
Bug: N/A
Test: `fastboot --help`
Change-Id: I3639fdee68de544f12e75004ccbb03b8386e64ed