Commit graph

29705 commits

Author SHA1 Message Date
Josh Gao
eaad4e28e8 Merge "base: make boot_clock work on host linux, hide it on non-linux." 2017-05-01 20:49:50 +00:00
Erik Staats
d6f8b5f2d4 Merge "Change set_sched_policy to set slack for current thread." 2017-05-01 18:35:30 +00:00
Elliott Hughes
0754cb929c Simplify "adb sync" documentation.
Remove -p (which only applied to "adb sync"), explicitly mention
$ANDROID_PRODUCT_OUT in the "adb sync" help text, and add "adb sync all"
as a synonym for "adb sync" for ease of documentation.

Bug: http://b/33761074
Test: "adb sync" still works, "adb --help" looks good
Change-Id: Ie5b2459a7e5e4140298f78815be25fa7c7bb47d0
2017-05-01 11:04:31 -07:00
Tom Cherry
f51c66b23b ueventd: fix typo from previous patchset
An forward declaration for a function that was removed in later
patchsets was merged anyway.  Since it's not used anywhere, this CL
removes it.

Test: build bullhead
Change-Id: Ie7223f7d23305b71438cb063b64a574ce32f96bb
2017-05-01 10:53:39 -07:00
Tom Cherry
6daf514448 ueventd: remove leftovers of the SELinux policy update mechanism
Reloading sepolicy has been removed from the system, so this support
code can also now be removed.

Bug: 26544104
Test: Boot bullhead
Change-Id: If9dbc9d540d9a69340c1dd6a483c1f8fe5feb287
2017-05-01 10:39:03 -07:00
David Zeuthen
16c6fd1da7 fs_mgr: Clear AvbOps struct.
This ensures that future operations (e.g. function pointers in the
AvbOps struct) added to AvbOps are set to NULL.

Bug: 37709309
Test: Manually tested on UEFI-based bootloader.
Change-Id: If83ea57b7abad94e472768c594efa210e3351a4d
2017-05-01 13:25:20 -04:00
Treehugger Robot
16214f2955 Merge "logd: CTS test" 2017-05-01 16:50:50 +00:00
Treehugger Robot
ae10af6050 Merge "liblog: __android_log_error_write in vndk" 2017-05-01 16:23:39 +00:00
Mark Salyzyn
f0b53d0726 libcutils: fs_config.c mark vendor, odm and oem partitions in duplicate
Cover both direct and symlink indirect paths to the referenced
files in the vendor, odm and oem partitions.

Test: compile and hand-verify properties
Bug: 37703469
Change-Id: I5b3a887e904baee2ac193ac4a73aaaee0bbfdb9f
2017-05-01 16:17:31 +00:00
Steven Moreland
64328403b5 liblog: __android_log_error_write in vndk
Also added log_safetynet.h header. This contains a memory sensitive logging
function which is used to detect attack attempts.

Fixes: 37442967
Test: liblog-unit-tests on internal marlin
Test: build liblog with BOARD_VNDK_VERSION := current on aosp_arm
Test: libbinder vendor variant links with BOARD_VNDK_VERSION := current

Change-Id: Icfcc2b1acbb3712bf4c84403870dc93401eafb15
2017-05-01 14:40:55 +00:00
Elliott Hughes
4c8acafa25 Merge "Remove unused cruft from <cutils/bitops.h>." 2017-04-30 02:45:46 +00:00
Elliott Hughes
0e8810ccbe Remove unused cruft from <cutils/bitops.h>.
Bug: N/A
Test: builds
Change-Id: I5931f2b91b2d64d8e26f9ba092879c14d0ed3622
2017-04-29 10:22:40 -07:00
Treehugger Robot
6de56724a2 Merge "lmkd: Android.mk -> Android.bp" 2017-04-29 08:14:21 +00:00
Treehugger Robot
0914d2bdff Merge "fs_mgr: code clean up" 2017-04-29 03:21:33 +00:00
Chenjie Luo
fafea32468 Modularize logd.
Separates logd body into a static library liblogd and
virtualize LogBuffer::log to be in a new interface class
LogBufferInterface. User could have different implementation.

Bug: 37756450
Test: liblog-unit-tests, logd-unit-tests and logcat-unit-tests
with (b/37791296).
Change-Id: I1504ff0e992744001b5a2e9abd45692d1318a152
2017-04-28 17:30:25 -07:00
Steven Moreland
1457c9290d lmkd: Android.mk -> Android.bp
Test: links
Change-Id: I19aa62270488af02d64830ca90faf80b35423009
2017-04-28 15:20:18 -07:00
Mark Salyzyn
2bd06f2895 logd: CTS test
Utilize logd-unit-tests as a CTS test

Goal is to check if the kernel logger is enabled.

Test: run cts tests
Bug: 31772697
Change-Id: I6d80350f3e40aff095f81b6600c40dd7d376bd74
2017-04-28 13:50:56 -07:00
Keun-young Park
483d2f9a59 Merge "combine wait for exec log with service exit log" 2017-04-28 20:12:00 +00:00
Josh Gao
ae29339ca1 base: make boot_clock work on host linux, hide it on non-linux.
boot_clock was previously returning zero on any platform that doesn't
define __ANDROID__, including host bionic. Instead of returning a bogus
value, just hide it on non-Linux platforms.

Bug: http://b/37758947
Test: libbase_test32/64 on linux
Change-Id: I96e1d8b92dc44c6308408900cf0d27e1e7db5569
2017-04-28 13:00:00 -07:00
Treehugger Robot
9349b72a67 Merge changes I5b1a1ce0,I483a18f9
* changes:
  fastboot: Add 'get_staged' command
  fastboot: Add 'stage' command
2017-04-28 18:34:08 +00:00
Keun-young Park
4de31e1481 combine wait for exec log with service exit log
- allows easier tracking of wait time from monitoring tools
- this change also reduces unnecessary log spam
- service exit log looks like this:
  init: Service 'exec 4 (/system/bin/otapreopt_slot)' (pid 611) exited with status 0 waiting took 0.060771 seconds

bug: 37752410
Test: reboot and check log
Change-Id: I122902538697f33939eede548e39f155ec419e03
2017-04-28 11:20:12 -07:00
Bowgo Tsai
359bed3615 fs_mgr: code clean up
- Returns FS_MGR_MNTALL_FAIL for failure paths in fs_mgr_mount_all()
- Removes the 'goto out' in fs_mgr_do_mount() as there is nothing to do in
  the 'out' label now. Also removes the "ret = FS_MGR_DOMNT_FAILED;" and
  just return FS_MGR_DOMNT_FAILED directly for the default failure path.
- Changes some LERROR to PERROR

Test: Use fs_mgr_do_mount() to mount /system with AVB
Change-Id: I126a0124a5c9d61302f40ab9db16989500d9777e
2017-04-28 12:47:18 +08:00
Treehugger Robot
263e1e9509 Merge "debuggerd_handler: don't assume that abort message implies fatal." 2017-04-28 02:47:16 +00:00
Josh Gao
637483de91 base: remove execute bit from utf8.cpp, utf8_test.cpp.
Test: none
Change-Id: Idcd7feb2f3a7dc8706c498c55100e82d029858e0
2017-04-27 19:10:07 -07:00
Treehugger Robot
98cc0e1f02 Merge "added include for unistd.h that was missing" 2017-04-28 01:39:55 +00:00
Treehugger Robot
5c7543569a Merge "fs_mgr: set "partition.system.verified" when AVB is used in a A/B device" 2017-04-28 01:21:13 +00:00
Jerry Zhang
169590c47f Merge "Revert "adb: Lower EP_ALLOC retry count"" 2017-04-28 01:06:09 +00:00
Jaesoo Lee
4af3a7966b Merge changes from topic 'libutils-export-headers'
* changes:
  libutils_headers: export libcutils_headers
  libutils: export libbacktrace headers
  libutils: export system_headers
2017-04-28 00:47:35 +00:00
Jaesoo Lee
1e8ac0fd03 libutils_headers: export libcutils_headers
These headers are used in headers in libutils_headers and must be
re-exported.

include/utils/Atomic.h:20:#include <cutils/atomic.h>
include/utils/Trace.h:24:#include <cutils/trace.h>
include/utils/Singleton.h:27:#include <cutils/compiler.h>

Test: modules using libutils_headers don't have to have
libcutils_headers include dirs set.
Bug: 33241851

Change-Id: I039aaaad93bf0944d42f04d2a9e6654b4f867042
2017-04-28 09:42:50 +09:00
Steven Moreland
4ad9d5155b libutils: export libbacktrace headers
This is used in CallStack.h.

Test: m -j libutils
Test: links
Test: trying to compile with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: I076c9551d356824d6e69b82349b890369bc7eea3
Merged-In: If7258e7b38000a72fd520f725030fb0038f90167
2017-04-28 09:42:50 +09:00
Steven Moreland
2d0dc9966a libutils: export system_headers
vendor + vendor_available modules built with BOARD_VNDK_VERSION :=
current aren't allowed to use global headers. Since libutils uses
system headers itself, it should export them as well.

Bug: 33241851
Test: building with BOARD_VNDK_VERSION := current produces many fewer
errors.

Change-Id: Icc7d2beb2a17da291434c6282eb1b9eb458f114c
Merged-In: I950821f1dae3ddc110db50869247913d5b1aa638
2017-04-28 09:42:50 +09:00
Treehugger Robot
a079e453a3 Merge "Initialize textclassifier model update directory" 2017-04-28 00:30:26 +00:00
Josh Gao
e06f2a4886 debuggerd_handler: don't assume that abort message implies fatal.
Applications can set abort messages via android_set_abort_message
without actually aborting. This leads to following non-fatal dumps
printing their output to logcat in the same format as a regular crash.

Bug: http://b/37754992
Test: debuggerd_test
Change-Id: I9c5e942984dfda36448860202b0ff1c2950bdd07
2017-04-27 17:28:05 -07:00
Jerry Zhang
e21b2fb6b4 Merge "Move adbd stopped trigger for configfs into core." 2017-04-27 23:50:15 +00:00
Jocelyn Bohr
91fefadc2e fastboot: Add 'get_staged' command
(cherry-picked from internal nyc-iot-dev to AOSP)

New user-level command usage:

 * fastboot get_staged <outfile>
   Reads staged data from the last command handled by the device. If the
   last command did not result in staged data, this command will fail.

This enables data staged by OEM commands to be transferred from device
to host. get_staged wraps new device command "upload". Fastboot
clients are not required to support "upload", so get_staged won't
work on all devices.

Bug: 36002804
Test: Implemented "upload" in fastboot on imx6ul. Verified that uploading
      ~100K data from the device works.
Change-Id: I5b1a1ce023f362062505ee62746ea8ab6f36bfbf
(cherry-picked from commit 83a875de994bf48f0faa2a8a23ceb0b8f52b6b04)
2017-04-27 16:47:51 -07:00
Jerry Zhang
40a8778491 Revert "adb: Lower EP_ALLOC retry count"
This reverts commit 05fe272a87.

Commit "adb: Do not signal gaget stack unless descriptors are written"
fixed the main issue for configfs devices where device wasn't enabled
until after the ioctl was attempted. Thus it is safe to bring up the
retry count so that the ioctl doesn't fail due to small delays in
usb stack.

Test: use adb, switch configs on configfs devices
2017-04-27 15:00:13 -07:00
Jerry Zhang
75f8d89a8a Move adbd stopped trigger for configfs into core.
This trigger resets ffs.ready in situations where
adbd is stopped via commandline.

Test: stop adbd
Change-Id: Ib5028d55c4883a8291d6de2dbcb0641ff8eb7a48
2017-04-27 14:59:48 -07:00
Jerry Zhang
a06ac26dd1 Merge "Add ffs.mtp.ready triggers to mtp configs." 2017-04-27 21:58:44 +00:00
Abodunrinwa Toki
40673e3381 Initialize textclassifier model update directory
Test: Builds successfully. Directory is initialized on install. Tests pass.
bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Bug: 34780396

Change-Id: Icbf7962f11b66579931f48053132da6e03e62c61
2017-04-27 22:56:43 +01:00
Treehugger Robot
de70e33092 Merge "libtrusty: Android.mk -> Android.bp" 2017-04-27 20:02:17 +00:00
Treehugger Robot
59c74a3bd1 Merge "init: fix last_reboot_reason string" 2017-04-27 19:39:53 +00:00
Elliott Hughes
8e0ccc9ff3 Merge "Make "fastboot update" respect $TMPDIR." 2017-04-27 15:40:03 +00:00
Bowgo Tsai
48fdc292f9 fs_mgr: set "partition.system.verified" when AVB is used in a A/B device
In a A/B device, system partition is mounted by kernel as root.
In vboot 1.0, the dm device name of system partition is "system" with
the following configuration in kernel command line:
    - dm="system none ro,0 1 android-verity /dev/sda34"

In AVB, the dm device name is switched to vroot as:
    - dm="1 vroot none ro 1,0 5201456 verity 1 ..."

When sending ioctl DM_TABLE_STATUS to query status, we should use "vroot" as the
dm device name for AVB. But still pass "system" for the callback function to set
property [partition.system.verified] instead of [partition.vroot.verified].

Bug: 36900078
Test: Use AVB to mount system in a A/B device, checks the property exists
      [partition.system.verified]
Test: Use vboot 1.0 to mount system in a A/B device, checks the property exists
      [partition.system.verified]
Test: Checks 'adb remount' will output warning message:
        - dm_verity is enabled on the system and vendor partitions.
        - Use "adb disable-verity" to disable verity.

Change-Id: Iaee7eb2b00b03729bc07fa24f1b449488716d2ea
2017-04-27 18:58:29 +08:00
Steven Moreland
f304a20523 libtrusty: Android.mk -> Android.bp
Test: links

Change-Id: Ic64361f98e9e51b62bfda8b2b1c3a00ae03f0a37
2017-04-26 18:58:18 -07:00
Elliott Hughes
bbfc281485 Make "fastboot update" respect $TMPDIR.
Bug: http://b/32701538
Test: TMPDIR=/ fastboot update
Change-Id: I06d1bc8d43b306855dfe19bc736513d3336df287
2017-04-26 17:20:36 -07:00
Jerry Zhang
fb256b696b Add ffs.mtp.ready triggers to mtp configs.
This allows devices to use functionfs for mtp and ptp instead
of the ordinary functions. The property is set regardless of
which function is enabled so mtp and ptp functions will continue
to work.

Bug: 33220530
Test: use mtp with ffs and non ffs devices
Change-Id: I4527e153bd10ef1e262e487482ae455835d1c698
2017-04-26 17:11:50 -07:00
Treehugger Robot
8a85c253bf Merge "libbinderwrapper: Android.mk -> Android.bp" 2017-04-26 23:24:58 +00:00
Erik Staats
d32331fb27 Change set_sched_policy to set slack for current thread.
Change set_sched_policy to use prctl PR_SET_TIMERSLACK if setting the policy
for the current thread and /proc/<tid>/timerslack_ns is not supported by the
kernel.

Bug: 32972117
Test: Verified that libcutils SchedPolicy tests pass.  See details in
testing done comment in
https://android-review.googlesource.com/381303 .
Change-Id: Id70940ed7f9ed94c3d105213f069bf3e5a8d8824
2017-04-26 15:39:26 -07:00
Keun-young Park
47d15ed5b9 Merge "set default shutdown timeout to 6 secs" 2017-04-26 22:35:26 +00:00
Treehugger Robot
84d43c8df7 Merge "do not start shutdown animation from init" 2017-04-26 20:59:56 +00:00