Commit Graph

27130 Commits

Author SHA1 Message Date
Jin Qian 8b7eb7bb2a fs_mgr: fix clang static analyzer warning
Pointer from strdup is lost hence triggers mem leak warning from
clang, since ptr returned from basename may not point to start of
duplicated string any more.

Switch to use gnu version of basename which doesn't modify input
string so that strdup is no longer necessary.

Bug: 27126348
Test: compile

Change-Id: I937a68c01c223230932c932bffdd35da6503c3c4
2017-01-20 18:01:49 +08:00
Jaekyun Seok 57337e7791 Merge "Load default/build props from each partition"
am: 8dbab358f0

Change-Id: Id2330e53018b7e9638383eda697db7550b1a8324
2017-01-20 04:02:20 +00:00
Treehugger Robot 8dbab358f0 Merge "Load default/build props from each partition" 2017-01-20 03:58:52 +00:00
George Burgess IV 5675b05f52 Merge "Fix a call to openat with incorrect arguments"
am: 18044da576

Change-Id: Ib2e858afb84ec87933ba34969b3fd8afb3814a0f
2017-01-20 00:05:29 +00:00
Treehugger Robot 18044da576 Merge "Fix a call to openat with incorrect arguments" 2017-01-19 23:58:22 +00:00
Josh Gao 456e1ad420 adb: move usb_* to client/usb_*.
Bug: http://b/31321337
Test: mma
Change-Id: I21eefab953737e87d211959616ac4f48926dd92c
2017-01-19 15:49:55 -08:00
Paul Lawrence f029da5368 Merge "Enable seccomp in init with generated policy"
am: cfb8800e18

Change-Id: I5db39f788e643d299a92a2494873e10dec1d76fb
2017-01-19 23:30:33 +00:00
Treehugger Robot cfb8800e18 Merge "Enable seccomp in init with generated policy" 2017-01-19 23:26:10 +00:00
George Burgess IV 7008c8484d Fix a call to openat with incorrect arguments
Caught by running clang-FORTIFY over Android.

Bug: None
Test: Builds
Change-Id: If138c4bbb7f5fb40bbb20e24adbb25a6ef1286ac
2017-01-19 13:33:52 -08:00
Josh Gao 44c688ca19 adb: reorganize adbd USB handling code.
Break adbd's USB initialization code into its own static library to
allow it to be used by benchmark code that pretends to be adbd.

Bug: http://b/31289465
Test: adb shell works on bullhead
Change-Id: I0ac7d78a4f7aef59bd6d14fc5cf1ed870e1f3a9d
2017-01-19 13:19:45 -08:00
Jeff Sharkey d150012349 Merge "Define GID range for external data and OBBs."
am: 1e7cdf3c7d

Change-Id: I14bab914f585c5d7ad95d63ceb3096981ee4f3a5
2017-01-19 16:23:57 +00:00
Jeff Sharkey 1e7cdf3c7d Merge "Define GID range for external data and OBBs." 2017-01-19 16:16:40 +00:00
Tao Bao 92c260159a healthd: Track the API change of minui/minui.h.
ev_init() and ev_iterate_available_keys() now take std::function
callback functions.

Test: mmma system/core/healthd
Change-Id: I8231b57ba816fcba8f698dd7145724021e235664
2017-01-18 23:02:45 -08:00
Gustavo Padovan 519bf2c698 Merge changes Icb8e6290,Iadde7b21,I743ab92c,Ie078fbc2,I2ab3cd46, ...
am: c42bd0931f

Change-Id: Ic0a59fafc040e778bfce3af97326b090ac8d59d0
2017-01-19 00:42:21 +00:00
Gustavo Padovan 7b98240813 libsync: tests: redefine PollOnDestroyedTimeline()
am: 801492b8a6

Change-Id: I1e75acee45764fa6a3c246edfad544a682fa20bd
2017-01-19 00:42:20 +00:00
Gustavo Padovan 26df302b33 libsync: tests: remove WaitOnDestroyedTimeline test
am: e4682802cb

Change-Id: I75539a0eb3813b90ff2cc034ac719c162721783f
2017-01-19 00:42:15 +00:00
Gustavo Padovan 8dc6cc921b libsync: add support to new Sync API
am: 61ab0d74d2

Change-Id: I403d73c6c13cd15c11df1d59172b0cd9f74bf3a7
2017-01-19 00:42:11 +00:00
Gustavo Padovan 86be7fd517 libsync: open new location of sw_sync file
am: ffc687baad

Change-Id: I8da84e3bee0d805f36fcd6977bf6f2a60d500e6e
2017-01-19 00:42:07 +00:00
Gustavo Padovan f951c0d87a libsync: add new Sync kernel API
am: 6786575d42

Change-Id: Id7fe3249a907ea89307aa94735d9ebac8fc00e30
2017-01-19 00:42:02 +00:00
Gustavo Padovan 0d7e19b894 libsync: move kernel headers for sync ioctls to sync.h
am: d6bbc5de66

Change-Id: I542516c8c714a9484926105a1dc8d12ad3f28b76
2017-01-19 00:41:58 +00:00
Treehugger Robot c42bd0931f Merge changes Icb8e6290,Iadde7b21,I743ab92c,Ie078fbc2,I2ab3cd46, ...
* changes:
  libsync: tests: redefine PollOnDestroyedTimeline()
  libsync: tests: remove WaitOnDestroyedTimeline test
  libsync: add support to new Sync API
  libsync: open new location of sw_sync file
  libsync: add new Sync kernel API
  libsync: move kernel headers for sync ioctls to sync.h
2017-01-19 00:39:36 +00:00
Jeff Sharkey 7e5d0b1fae Define GID range for external data and OBBs.
To quickly answer the question of "how much data is a UID using?" we
need a GID range to label files on external storage, similar to
the GID ranges already defined for cached and shared data.

Also define a new GID that will be used to label the OBB files shared
between all users under /data/media/obb.

Test: builds, newly added tests pass
Bug: 34263266
Change-Id: I16fb7d166c3dcdeafbf477162d191d3b73ae8ac2
2017-01-18 17:11:05 -07:00
Jaekyun Seok de21de7a42 Load default/build props from each partition
The following files will be loaded additionally.
- /odm/default.prop and /vendor/default.prop for default props.
- /odm/build.prop for build props.

The props files must follow the following priority order.
- /default.prop > /odm/default.prop > /vendor/default.prop
- /system/build.prop > /odm/build.prop > /vendor/buid.prop

Test: tested default/build prop files with enabling early mount, but
didn't test files of odm partition because odm partition doesn't
exist now.
Bug: 34116668
Change-Id: I946d076dae38f2288865dd986fb16d801d4abcc0
2017-01-19 08:45:40 +09:00
Josh Gao 11b938e881 Merge "debuggerd: advance our amazing bet."
am: 230201dcbf

Change-Id: Id3594e862e0861756daa11124bd3ee90ddca0cbc
2017-01-18 23:19:39 +00:00
Josh Gao 230201dcbf Merge "debuggerd: advance our amazing bet." 2017-01-18 23:04:09 +00:00
Colin Cross b58d3b2900 Merge "Export android_filesystem_config.h as a filegroup"
am: 80112f73cd

Change-Id: Ia5c3d2ee93f9b5e5838158a49bf4b4cb14e0128c
2017-01-18 16:59:48 +00:00
Colin Cross 80112f73cd Merge "Export android_filesystem_config.h as a filegroup" 2017-01-18 16:53:26 +00:00
Jorim Jaggi 469e51ac4f Merge "Revert "init: split property context into platform & non-platform components""
am: 8e81cd6609

Change-Id: Ia1db23aca8da20fef7288fcd4c4c1c583ad63d09
2017-01-18 16:44:31 +00:00
Jorim Jaggi 3b6c6d5d90 Revert "init: split property context into platform & non-platform components"
am: 328cb5d141

Change-Id: I27df33e9ddcf2d6523118a6286b8a98160d723b3
2017-01-18 16:41:57 +00:00
Jorim Jaggi 8e81cd6609 Merge "Revert "init: split property context into platform & non-platform components"" 2017-01-18 16:33:32 +00:00
Jorim Jaggi 328cb5d141 Revert "init: split property context into platform & non-platform components"
This reverts commit 871c306855.

Change-Id: I3e14b71e9fc5f37c9691405ce20031451643f9b4
2017-01-18 15:33:26 +00:00
Sandeep Patil b29cafdd83 Merge "init: split property context into platform & non-platform components"
am: b8e5553887

Change-Id: Id1b5514a10fadbc3ee61c5c36e2f054d9f5930a3
2017-01-18 06:17:55 +00:00
Sandeep Patil ca1bcdb286 init: split property context into platform & non-platform components
am: 871c306855

Change-Id: I2702dba233f674a19e7a44541e74124be3b0b0f0
2017-01-18 06:17:53 +00:00
Treehugger Robot b8e5553887 Merge "init: split property context into platform & non-platform components" 2017-01-18 06:09:02 +00:00
Colin Cross 1207ba3d5a Export android_filesystem_config.h as a filegroup
bionic/libc/Android.bp needs to reference android_filesystem_config.h,
export it using a filegroup module.

Bug: 34283327
Test: builds
Change-Id: Id7650f3b64d7eb52f945f538d05b691b8b3c3fcb
2017-01-17 18:20:28 -08:00
Winter Wang 6a5f085288 Merge "init: usb: fix audio_source function typo"
am: 56098eed3b

Change-Id: I3d27da1b19ec01de99ea7092b816f0a67789db19
2017-01-18 01:44:21 +00:00
Treehugger Robot 56098eed3b Merge "init: usb: fix audio_source function typo" 2017-01-18 01:39:39 +00:00
Hung-ying Tyan 959aeb17d5 init: add ro.boot.init_rc
SoC vendors and ODMs need a way to run different init scripts under
different boot modes. This patch adds a new ro.boot.init_rc kernel
cmdline argument to support this.

Bug: 26639863
Test: Tested on bullhead with androidboot.init_rc given a
non-existent .rc file which leads to expected boot failures.
Boot succeeds if androidboot.init_rc is not specified.

Change-Id: I2bca1cc3de6720feced041fe87266fb8afcce8b0
2017-01-18 09:39:36 +08:00
James Hawkins c5129582bb Merge "bootstat: Fix false metrics due to soft reboots."
am: bde89da5fc

Change-Id: I4c49fff20f78e4bff744dfe94a7207cf7e151404
2017-01-17 23:50:15 +00:00
James Hawkins bde89da5fc Merge "bootstat: Fix false metrics due to soft reboots." 2017-01-17 23:46:58 +00:00
Gustavo Padovan 801492b8a6 libsync: tests: redefine PollOnDestroyedTimeline()
On mainline if the sw_sync timeline is destroyed the fences doesn't not
signal or error. So change the test to check if the fence is still there
by polling the fence with timeout zero and asserting if it is not
signalled.

Test: Sync unit tests still passes.
Change-Id: Icb8e629018eef35074ae91d0f29ed1f12e90492b
2017-01-17 14:29:41 -08:00
Gustavo Padovan e4682802cb libsync: tests: remove WaitOnDestroyedTimeline test
The mainline Sync File implementation doesn't have wait ioctl anymore.
Only poll is supported now, and we already have a test for that.

Test: Sync unit tests still passes.
Change-Id: Iadde7b2173024af9b8d20316e640297cf214c645
2017-01-17 14:29:18 -08:00
Gustavo Padovan 61ab0d74d2 libsync: add support to new Sync API
Change libsync functions in a way that it can run dynamically on both
APIs.

v2: fix whitespace changes and poll return handling

v3: handle error cases on sync_wait()

Test: Sync unit tests still passes.
Change-Id: I743ab92ce39cbfa75dca41dd0a435efa9f2aab66
hange-Id: Ib56f2c6441b41028bc9f66998676790b7713988a
2017-01-17 14:29:01 -08:00
Gustavo Padovan ffc687baad libsync: open new location of sw_sync file
sw_sync file for debug was moved to debugfs. Try to open it and if it
fails try to open /dev/sw_sync.

Test: Sync unit tests still passes.
Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580
hange-Id: I216874964368d939bed2779d98cd89e527a57d45
2017-01-17 14:28:45 -08:00
Gustavo Padovan 6786575d42 libsync: add new Sync kernel API
Add the new API to the internal sync.h file. As there is two different
APIs we will need to discovery dynamically which one to use.

v2: Fix Documentation

Test: Sync unit tests still passes.
Change-Id: I2ab3cd46e48ba5d9c73d54f9583b1a8141566581
2017-01-17 14:28:26 -08:00
Gustavo Padovan d6bbc5de66 libsync: move kernel headers for sync ioctls to sync.h
This patch moves the legacy API to the internal sync.h header
and add documentation to it.

Test: Sync unit tests still passes.
Change-Id: I9b17eb23af30043b3df5fb9e857affad68ba8521
2017-01-17 14:28:00 -08:00
Winter Wang 60c763ed52 init: usb: fix audio_source function typo
for audio_source function instance, there exist 2 function name here:
    "audio_source.gs2" and "audio_source.gs3"
I believe this usb accessory audio name "audio_source.gs2" is a typo,
as there is no need to create another audio_source instance.

Test: Manual

Change-Id: I70b513db474632eb990131c285c8d5105c17970f
Signed-off-by: Winter Wang <wente.wang@nxp.com>
2017-01-17 14:27:34 -08:00
Josh Gao cbe70cb0a8 debuggerd: advance our amazing bet.
Remove debuggerd in favor of a helper process that gets execed by
crashing processes.

Bug: http://b/30705528
Test: debuggerd_test
Change-Id: I9906c69473989cbf7fe5ea6cccf9a9c563d75906
2017-01-17 13:57:57 -08:00
James Hawkins 800ceb45b1 bootstat: Fix false metrics due to soft reboots.
Use a flag to enable/disable logging metrics, set to false during soft
reboots.

Bug: 32807863
Change-Id: Ib1359327af4e18d40400c29961c454f7be1b8d0c
Test: None
2017-01-17 13:28:17 -08:00
Tao Bao bd8a24e292 Merge "Revert "init: add ro.boot.init_rc""
am: 4c5c9db17b

Change-Id: I837b786637e5862cbad3338d053ce9b8c730241b
2017-01-17 20:25:29 +00:00