Commit graph

40074 commits

Author SHA1 Message Date
TreeHugger Robot
7b7901a849 Merge "storaged: lower capabilities in init" into pi-dev 2018-04-13 18:28:59 +00:00
David Anderson
ce135a67af storaged: lower capabilities in init
Lower storaged's capabilities to DAC_READ_SEARCH as an initial step
toward running it non-root.

Bug: 77634061
Test: storaged still runs and its /proc/pid/status has lower CapPrms
Exempt-From-Owner-Approval: stale OWNERS no longer in org
Change-Id: Ibfe0349fc059e2f37efba33f587176e8ce6be9fe
Merged-In: Ibfe0349fc059e2f37efba33f587176e8ce6be9fe
2018-04-13 11:27:48 -07:00
Logan Chien
c8014f7e54 Merge "Build /vendor/bin/logwrapper too." into pi-dev 2018-04-13 00:56:39 +00:00
Tom Cherry
125781255e init: do not impose vendor_init restrictions on old vendor images
Do not restrict vendor_init restrictions on vendor images that were
built before P, as they will not have the correct permissions.

Bug: 77732028
Test: test new devices and see vendor_init still works
Merged-In: I636a07b54fbfb248e1d1a68a8f3c4d047fd5a9e9
Change-Id: I636a07b54fbfb248e1d1a68a8f3c4d047fd5a9e9
(cherry picked from commit a1dbeb8d33)
2018-04-12 15:33:15 -07:00
Fernando Lugo
c43dd75194 fastboot: fix header_actual calculation
Bug: 77920157
Test: fastboot boot $OUT/kernel
Change-Id: Ibe2f4b9a6476ac11937448e6547b5159af011633
Merged-In: Ibe2f4b9a6476ac11937448e6547b5159af011633
Signed-off-by: Fernando Lugo <flugo@google.com>
(cherry picked from commit 91dfaecca7)
2018-04-12 17:20:53 +00:00
Elliott Hughes
5a4c20bc21 Build /vendor/bin/logwrapper too.
Bug: 77284669
Test: builds
Change-Id: Iaafc856f2a7441d318f7b9376caa6629e02a8e23
Merged-In: Iaafc856f2a7441d318f7b9376caa6629e02a8e23
(cherry picked from commit 0b539f3bcb)
2018-04-12 12:12:46 +00:00
Jaekyun Seok
65ce3b2cd8 Allow vendor-init-actionable for vold-related properties
Bug: 75987246
Bug: 73871799
Test: succeeded building and tested with taimen
Change-Id: Ifec879f07705a52501757b58b1562a97c668b8b0
2018-04-12 08:17:43 +09:00
Josh Gao
2e05dfa2f2 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
(cherry picked from commit 2ea46521f3)
2018-04-11 11:44:26 -07:00
Mathew Inwood
8aafb0d7f5 Merge "Add event log tag for hidden API access logging." into pi-dev 2018-04-11 16:45:27 +00:00
TreeHugger Robot
44fd93d0d3 Merge "fastboot, fs_mgr: set fsverity feature bit" into pi-dev 2018-04-11 03:59:58 +00:00
TreeHugger Robot
aeee02f290 Merge "Use the non-LTO, non-PGO version of libhwbinder" into pi-dev 2018-04-10 18:14:42 +00:00
Mathew Inwood
8ec1c7ea7c Add event log tag for hidden API access logging.
This new event is logged by ART when hidden API accesses are detected.

Test: m
Test: $ adb lolcat -b events
Bug: 64382372
Bug: 77517571
Change-Id: I5ebb1424d83686dade0d34b118944b0c4c0c7bb1
2018-04-10 14:32:23 +01:00
Pirama Arumuga Nainar
9dddfbc77a Use the non-LTO, non-PGO version of libhwbinder
Bug: http://b/77320844

Android.mk doesn't have support for PGO either.  This causes linker
error (about missing __llvm_profile symbols) in the PGO-instrumentation
enabled builds in the release branch.

Test: m ANDROID_PGO_INSTRUMENT=ALL
Change-Id: I84fda4f1ac4f00ac26869507c6f5640b4ec9f6f3
2018-04-09 10:40:06 -07:00
Elliott Hughes
6d2f2135ee Merge "Support /odm and /product in "adb remount" and "adb sync"." into pi-dev 2018-04-09 15:41:00 +00:00
Yifan Hong
c867941783 Merge "health service can write kernel log" into pi-dev 2018-04-06 21:03:34 +00:00
TreeHugger Robot
715700a5a1 Merge "Use non-LTO variant of libhwbinder" into pi-dev 2018-04-06 20:25:02 +00:00
Jaegeuk Kim
b68b02ca5a fastboot, fs_mgr: set fsverity feature bit
Bug: 74604441
Bug: 67380979
Change-Id: Ia336be99eed42bbd0eab1b22e2cc3179a92d5233
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2018-04-06 10:18:21 -07:00
Luis Hector Chavez
2685c77c34 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
Merged-In: I0476a8d80f7a2497600196932542045f3bc87537
(cherry picked from commit daacf4f6f3)
2018-04-06 06:40:14 -07:00
Elliott Hughes
792581f183 Support /odm and /product in "adb remount" and "adb sync".
Bug: http://b/77587036
Test: `adb remount` and `adb sync` still work on hikey

(cherry picked from commit 57e97cb7aa)

Change-Id: Ie49d703dac04e2fb8eda420b9253b8d45b6e1479
2018-04-05 19:45:27 -07:00
Yifan Hong
7eed10800e health service can write kernel log
Test: device without healthd still have battery level messages
Bug: 77541952
Fixes: 77661605
Change-Id: I9b66ecde0735accf8b2d67b9562795be80071dd9
2018-04-05 19:34:43 -07:00
TreeHugger Robot
a4217d03a7 Merge "Allow vendor-init-actionable for wlan.driver.status and init.svc.surfaceflinger" into pi-dev 2018-04-05 22:34:43 +00:00
TreeHugger Robot
587004c48b Merge "Remove vendor Wifi and BT entries from fs_config.cpp" into pi-dev 2018-04-05 20:15:49 +00:00
Yifan Hong
7498160272 Merge changes from topic "healthd_deprecate2" into pi-dev
* changes:
  healthd: a.h.health@2.0-service.override removes healthd
  healthd: add healthd.rc
2018-04-05 19:30:35 +00:00
Christopher Ferris
6c985e2a08 Merge "Add a MemoryOfflineBuffer object." into pi-dev 2018-04-05 18:14:04 +00:00
TreeHugger Robot
4ae7d5c34e Merge "Make logd more aggressive when scanning for the position from which to resume logging." into pi-dev 2018-04-05 18:12:37 +00:00
Tom Cherry
07aa2a6131 Remove vendor Wifi and BT entries from fs_config.cpp
Their capability bits are now specified in their associated init .rc
file, which is the proper place for this to be done.

A notice is added to guide developers away from using android_files to
give services Linux capabilities and to guide them away from adding
vendor/ entries.

Bug: 74554159
Test: BT, Wifi, Tethering work on walleye
Merged-In: I13c425d022b4f5c217587cdf601884ef44650ac7
Change-Id: I13c425d022b4f5c217587cdf601884ef44650ac7
(cherry picked from commit b5e5c56401)
2018-04-05 10:40:49 -07:00
Jaekyun Seok
66797804c6 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
Merged-In: I713c5c1a50053f8d64e1cecd1f7ab5dc18201da1
(cherry picked from commit 167ec7f1d2)
2018-04-05 23:08:39 +09:00
Joe Onorato
4bba698245 Make logd more aggressive when scanning for the position from which to resume logging.
Events in the LogBuffer are supposed to be sorted by timestamp, but for a variety
of reasons that doesn't always happen.  When a LogReader is reading from LogBuffer,
LogBuffer starts at the newest event, and scans backward through the list, looking
for the last event.  Previously it would accept a couple that were a little bit out
of order, but if it found one that was ancient, it would just bail. This change
removes that check for the ancient messages.  They are probably indicative of
something else upstream, but since there is no invariant of the list being sorted,
this change simplifies the search algorithm, and makes it look only at the previous
300 events.

Bug: 77222120
Test: while true ; do frameworks/base/cmds/statsd/run_tests.sh 2h ; done
Change-Id: I0824ee7590d34056ce27233a87cd7802c28f50e4
2018-04-04 14:46:45 -07:00
Yifan Hong
1cf853fb65 healthd: a.h.health@2.0-service.override removes healthd
Removes healthd from the build if -service.override
is provided. This encourages developers to deprecate healthd
for their devices when they can.

When -service.override is used, framework manifest needs
to remove the /backup instance as well; this can be done
by including manifest_healthd_exclude.xml in
DEVICE_FRAMEWORK_MANIFEST_FILE.

Test: build and boot on 2016/2017 Pixel devices
Test: build and boot on a new device
Test: lshal and vts_treble_vintf_test on all these
      devices
Bug: 77541952

Change-Id: I25744feaad3034441cd7a96a5343d4ce3eedc288
2018-04-04 14:43:58 -07:00
Jaegeuk Kim
9a67c69e6c make_f2fs: specify sector size for target image size
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>
2018-04-04 14:26:45 -07:00
Yifan Hong
fd1aa70a0f healthd: add healthd.rc
Split healthd section from init.rc into its own. This allows
healthd.rc to be excluded from the build when healthd is excluded.

Test: builds
Test: exclude healthd from build, healthd.rc is not installed
Bug: 77541952
Change-Id: I1c055f14c5862631f359fd0029289da8f43af063
2018-04-04 14:08:04 -07:00
Christopher Ferris
f4e3ff6619 Add a MemoryOfflineBuffer object.
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
(cherry picked from commit 6633b0ca09)
2018-04-04 12:29:25 -07:00
Yi Kong
95958a74f6 Use non-LTO variant of libhwbinder
... as a workaround for build system does not currently infer non-LTO
usage from Android.mk.

Test: m
Bug: 77320844
Change-Id: Iefe5d08b907133b4cdf1516efee73b2c0161f77e
2018-04-03 12:43:13 -07:00
Jayant Chowdhary
0a5bc29353 Merge "Add dummy vndk library libmkbootimg to enable abi checks on boot_img_hdr." into pi-dev 2018-04-03 16:43:28 +00:00
Jayant Chowdhary
f4bda9a188 Add dummy vndk library libmkbootimg to enable abi checks on boot_img_hdr.
Bug: 74763691

Test: m -j libmkbootimg creates libmkbootimg.so.lsdump.

Test: make -j64

Merged-In: I8d716c560467aaf090f4f7ee9cfbc53a9405f05d
Change-Id: I8d716c560467aaf090f4f7ee9cfbc53a9405f05d
(cherry picked from commit 4cc755dce5)
2018-04-02 17:32:23 -07:00
TreeHugger Robot
0b637d94d6 Merge "storaged: fix divide-by-zero when updating history" into pi-dev 2018-04-03 00:12:17 +00:00
Hridya Valsaraju
88de5556ec Add a header-version argument to fastboot
The argument would set the boot header
version for flash:raw and boot
commands when they are used for boot
image creation.

Bug: 77154616
Test: Dumped the created boot image and checked
the header version using unpack_bootimg

Change-Id: I2c458996817615f4351db102b4234984108d47c0
2018-04-02 22:50:53 +00:00
Chia-I Wu
e3447826a8 Merge "graphics: add render intents and new color modes" into pi-dev 2018-04-02 22:22:28 +00:00
TreeHugger Robot
9d1f78358a Merge "Support Speck encryption." into pi-dev 2018-03-30 20:54:36 +00:00
Paul Crowley
49c27c5cb2 Support Speck encryption.
Test: Modified Pixel to support and use Speck encryption, booted.
Bug: 77227248
Change-Id: I6ec272db5e4f16e9dd4f759203c14ad2a8772cd1
2018-03-30 09:46:02 -07:00
Logan Chien
e9aaadfb2b Allow VNDK-SP extensions to use vendor lib
This commit adds a wildcard linker namespace link between the "vndk"
namespace and the "sphal" namespace of the system processes.  This is
created for VNDK-SP-Ext to load vendor libs in "sphal" namespace.

Bug: 77249955
Test: lunch aosp_walleye-userdebug && make -j8  # runs unit tests
Test: lunch aosp_sailfish-userdebug && make -j8  # runs unit tests
Test: Create a VNDK-SP-Ext, link to vendor libs, and run it.
Change-Id: I71b0fb604a84272156aa119130c272f891847008
Merged-In: I71b0fb604a84272156aa119130c272f891847008
(cherry picked from commit fbaf9767b51891491903521c24b0d4a1ec1c87e8)
2018-03-30 13:30:14 +08:00
TreeHugger Robot
adf13a65b9 Merge changes from topic "recovery-dtbo" into pi-dev
* changes:
  Add a script to unpack boot image
  Add a recovery DTBO section to boot image
2018-03-29 23:51:09 +00:00
TreeHugger Robot
bd920a25a9 Merge "Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode" into pi-dev 2018-03-29 23:45:15 +00:00
Elliott Hughes
465704dbb2 Merge "Add "require partition-exists=" support." into pi-dev 2018-03-29 22:12:50 +00:00
Hridya Valsaraju
d71e39ae57 Add a script to unpack boot image
The script prints out the boot image header
contents and extracts the kernel, ramdisk,
second bootloader and recovery DTBO images.

Bug: 74763691
Test: unpack_bootimg --boot_img $OUT/recovery.img

Change-Id: Iadbca81c157d9e4607f808a14468ab5542347507
Merged-In: Iadbca81c157d9e4607f808a14468ab5542347507
(cherry picked from commit 02c08cc347)
2018-03-29 21:35:46 +00:00
Jaekyun Seok
f328b0d935 Allow vendor-init-actionable for ro.board.platform and sys.boot_from_charger_mode
ro.board.platform and sys.boot_from_charger_mode are already
public-readable, but they should be used as action triggers as well for
some products including Android Go devices.

Bug: 75987246
Test: succeeded building and tested with taimen
Change-Id: I140a8f7ef3fa9823ceced94b00a413800518c240
Merged-In: I140a8f7ef3fa9823ceced94b00a413800518c240
(cherry picked from commit 1f90ccefb6)
2018-03-30 06:13:12 +09:00
Elliott Hughes
9b7cd9ad04 Add "require partition-exists=" support.
The Pixel 2 system images release was a bit of a disaster because anyone
using an old version of fastboot would blindly flash too few partitions,
potentially bricking their device. This change lets us add a line to
the android-info.txt file for a device with a new partition.

Also error out sooner in such cases by checking the requirements
immediately, rather than optimistically unpacking everything first.

Switch Action over to C++ to fix memory issues.

Bug: http://b/77158188 (partition checking)
Bug: http://b/74444116 (error out sooner)
Test: manual testing with a modified android-info.txt

(cherry picked from commit 5620d224b6)

Change-Id: Ib97af6f9392f7672430ff71228484e6ee7af6fbf
2018-03-29 10:46:46 -07:00
Hridya Valsaraju
6bacea2bec Add a recovery DTBO section to boot image
For non-A/B devices, the recovery partition should
be self-sufficient and not depend on any other
partition. Since recovery may need access to devices
added to the DT by overlays(for eg.display), we need to
make sure that the the recovery image also contains
the information from the DTBO image.

The following fields are added to the boot image
header for this purpose:
-boot header version
-header size
-recovery dtbo size
-recovery dtbo address

Bug: 74763691
Test: unpack_bootimage --boot_img $OUT/recovery.img
      diff out/extracted_dtbo $TOP/device/google/wahoo-kernel/dtbo.img

Change-Id: I1969859038b84fac1e4a71f79f2f546b9cacffc8
Merged-In: I1969859038b84fac1e4a71f79f2f546b9cacffc8
(cherry picked from commit 147b355bb3)
2018-03-29 17:31:10 +00:00
David Srbecky
12d902961b Cache DWARF location rules for a given pc.
Decoding the DWARF opcodes is expensive so make sure we cache it.

This speeds unwinding in simpleperf by over a factor of 3x.

Add unit tests for this new behavior.

Bug: 77258731

Test: libbacktrace/libunwindstack unit tests on host and target.
Test: Ran debuggerd -b on various processes on target.
Change-Id: Ia516c0fa5d3e5f76746190bb4b6fdf49fd1c9388
(cherry picked from commit 3386ebade2)
2018-03-29 08:47:49 -07:00
Christopher Ferris
8dc3f94113 Merge "Fix null pointer dereference in RegsArm." into pi-dev 2018-03-29 14:35:05 +00:00