Commit Graph

38803 Commits

Author SHA1 Message Date
Elliott Hughes 689cd77bd1 Merge "Add SIZEOF_MEMBER."
am: 1e4764e90c

Change-Id: Id5feb90cc9e8867b4ea3fd05bead333d385cfe9d
2018-04-11 15:13:01 -07:00
Treehugger Robot 1e4764e90c Merge "Add SIZEOF_MEMBER." 2018-04-11 21:56:25 +00:00
Elliott Hughes 1b86d41c78 Add SIZEOF_MEMBER.
Bug: N/A
Test: ran tests
Change-Id: Icb7e8ae83d242c867b71a990b08eb1a62ed1482c
2018-04-11 12:29:50 -07:00
Dan Willemsen 808c7351c5 Merge "Fix mac build (ldflags -> ldlibs)"
am: 1b2f2ee621

Change-Id: Iff8e64c33629786ca125a53b696eb0ab90eaec20
2018-04-11 01:21:22 -07:00
Treehugger Robot 1b2f2ee621 Merge "Fix mac build (ldflags -> ldlibs)" 2018-04-11 08:11:33 +00:00
Dan Willemsen d81279f7ed Fix mac build (ldflags -> ldlibs)
Test: mmma system/core/fastboot   (on mac)
Change-Id: Ib917758c59fc33d6f8d9bd4f8716cf530c646f54
2018-04-10 22:55:55 -07:00
Elliott Hughes ab30bec294 Merge changes I983f361d,I899c8433,Ie6f4b029,Ic3cb9c82,I27107d05
am: 002959e492

Change-Id: Id80394fb62ce5892a5fbffd6cc73eafa26b55e46
2018-04-10 20:31:11 -07:00
Treehugger Robot 002959e492 Merge changes I983f361d,I899c8433,Ie6f4b029,Ic3cb9c82,I27107d05
* changes:
  Remove unused variable.
  Remove -i vendor id matching.
  Add quotes to -v INFO/OKAY/FAIL for clarity.
  Remove legacy slot-suffix support.
  Add fastboot_test.cpp and test --os-version/--os-patch-level parsing.
2018-04-11 03:22:26 +00:00
Elliott Hughes bcf24c21e7 Merge "Fix Darwin build."
am: fef56f13bb

Change-Id: I9b688db4e00645ac22f366297a3f99fbd68ab7cd
2018-04-10 18:15:18 -07:00
Elliott Hughes fef56f13bb Merge "Fix Darwin build." 2018-04-11 01:02:32 +00:00
Elliott Hughes 7678ffd6d9 Fix Darwin build.
TEMP_FAILURE_RETRY in fs.cpp.

Bug: N/A
Test: N/A
Change-Id: If77da90eeb59e485d5caf4a2e73f7aa91801be2a
2018-04-10 18:01:08 -07:00
Pirama Arumuga Nainar c309a0715f Merge "Remove extra semicolon at end of namespace"
am: 1d2bf45b55

Change-Id: I7209341dea742dc1cdcb2743462b875e95caed10
2018-04-10 17:37:17 -07:00
Josh Gao 994a47cc98 Merge "adb: properly calculate packet size on Mac."
am: ee63d74b6c

Change-Id: I2c4228a1d5bff33ca2db3249e261f98054eb342e
2018-04-10 17:36:33 -07:00
Treehugger Robot 1d2bf45b55 Merge "Remove extra semicolon at end of namespace" 2018-04-11 00:29:29 +00:00
Treehugger Robot ee63d74b6c Merge "adb: properly calculate packet size on Mac." 2018-04-11 00:27:36 +00:00
Elliott Hughes bd86420b83 Remove unused variable.
Bug: N/A
Test: builds
Change-Id: I983f361d3d5a779600077a78b121c4ee399089db
2018-04-10 15:59:46 -07:00
Elliott Hughes f3192bd052 Remove -i vendor id matching.
We removed this from adb years ago.

Bug: N/A
Test: N/A
Change-Id: I899c8433665e64a0c0302d2c30a8e689b8c83d65
2018-04-10 15:38:08 -07:00
Elliott Hughes 234910bc3b Add quotes to -v INFO/OKAY/FAIL for clarity.
This makes it easier to see which part came from the device.

Bug: N/A
Test: fastboot -v flashall
Change-Id: Ie6f4b02933cab21f343998b5fc84f8e487dd3984
2018-04-10 15:34:19 -07:00
Elliott Hughes 42b18a518b Remove legacy slot-suffix support.
Bug: N/A
Test: flashed Pixel
Change-Id: Ic3cb9c8225c75697099723347f7fd820bcadca6e
2018-04-10 15:32:21 -07:00
Pirama Arumuga Nainar eab48ce0d5 Remove extra semicolon at end of namespace
Upcoming clang update to r328903 adds a new warning:
  warning: extra ';' outside of a function is incompatible with C++98
  [-Wc++98-compat-extra-semi]

which is included in -Weverything.

We can just delete the extra semicolon (even though we use gnu99), and
save the extra byte.

Test: Build

Change-Id: I49b6e6af483e011632e6a34c0663c93e5c385aa6
2018-04-10 22:10:54 +00:00
Josh Gao 2ea46521f3 adb: properly calculate packet size on Mac.
OS X reports maxPacketSize as wMaxPacketSize * (bMaxBurst + 1) in the
deprecated GetPipeProperties function. Use the also-deprecated
GetPipePropetiesV2 API to get bMaxBurst and figure out what
wMaxPacketSize is. (This file is going to go away eventually, so don't
bother with switching to the recommended GetPipePropertiesV3, since
it would be a substantially larger charge.)

libusb is unaffected.

Bug: http://b/77733422
Test: python test_device.py
Change-Id: I66517d699a4f39b93ba5eb7882bd8ee6c70f3672
2018-04-10 14:46:34 -07:00
Elliott Hughes 6ebec932d6 Add fastboot_test.cpp and test --os-version/--os-patch-level parsing.
Also switch all remaining headers over to #pragma once, and actually
use FB_COMMAND_SZ.

Bug: http://b/77340848
Test: ran tests
Change-Id: I27107d054c206e66c39208099e36a55df604e08f
2018-04-10 14:24:02 -07:00
Elliott Hughes e60df9a559 Merge "Minimal changes to build fastboot as a library."
am: 20d2159803

Change-Id: Ic24a9abfeb591552b617161112a00e7741bde977
2018-04-10 07:47:01 -07:00
Treehugger Robot 20d2159803 Merge "Minimal changes to build fastboot as a library." 2018-04-10 14:38:50 +00:00
Elliott Hughes 11ff345979 Minimal changes to build fastboot as a library.
Bug: http://b/77809061
Test: builds
Change-Id: I0c388334d643a0a2abf0c03a29f336dc3af2f83f
2018-04-09 20:40:45 -07:00
Dan Willemsen 504696f5c2 Merge "Fix fastboot dist to be compatible with adb"
am: 9e8e19a722

Change-Id: Id99fcf0d421f1cb47b173154af5b61941ccb7dcb
2018-04-09 20:05:59 -07:00
Treehugger Robot 9e8e19a722 Merge "Fix fastboot dist to be compatible with adb" 2018-04-10 02:58:55 +00:00
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