Commit Graph

38037 Commits

Author SHA1 Message Date
Tom Cherry 193e43494f Revert "init: use ro.init.subcontexts_enabled to enable subcontexts"
This reverts commit 79193a42e7.

Bug: 62875318
Test: boot walleye, sailfish without SELinux audits
Change-Id: I019b66a3130acba2c07e984e4bc352228f09d7f5
2017-11-27 09:03:28 -08:00
Tom Cherry 4b3bcf2a10 Merge "Move mkdir /data/nfc/... to rootdir init.rc"
am: fa65396ca2

Change-Id: I623f24df9b42500f347ae427f4ffd94395abaa56
2017-11-22 20:03:47 +00:00
Tom Cherry fa65396ca2 Merge "Move mkdir /data/nfc/... to rootdir init.rc" 2017-11-22 19:56:10 +00:00
Logan Chien 20f7dc7041 libutils: Cleanup unused class declaration
This commit removes unused class declaration for SharedBuffer and
TextOutput.  SharedBuffer has become internal implementation details
since 282efae9c.  TextOutput usages have been removed since 9eb2a3b1.

Test: AOSP and master build w/o problems
Change-Id: I1871c4919a46f1ea8f41fb7eb79b4dc800b6f6f4
2017-11-22 18:31:10 +08:00
Chen Xu df482d03ad Merge "a new folder to store OTA carrier id update"
am: 76adcdf688

Change-Id: I052a0810830b2a81a8a992d66e8e59cda343b347
2017-11-22 04:35:44 +00:00
Chen Xu 76adcdf688 Merge "a new folder to store OTA carrier id update" 2017-11-22 04:31:29 +00:00
fionaxu 06b8e2e130 a new folder to store OTA carrier id update
Bug:64131637
Test: Build
Change-Id: I0ce4322f297bab427d70aed3c329345c899786bb
(cherry picked from commit 45713ff621)
2017-11-21 17:31:00 -08:00
Tom Cherry c319310f9b Move mkdir /data/nfc/... to rootdir init.rc
These are directories used by the system so they should be created by
the system.

Test: treehugger
Change-Id: I2a721ef7871c8842fa912497f5ec6988fcec9e58
2017-11-21 10:40:25 -08:00
Mark Salyzyn 6c9f88863c Merge "bootstat: kernel_panic test w/o bootloader or pstore support"
am: 70fda27eb2

Change-Id: Ie15e47de331846858e51ad62076a54a8f6d4c34d
2017-11-21 17:20:05 +00:00
Treehugger Robot 70fda27eb2 Merge "bootstat: kernel_panic test w/o bootloader or pstore support" 2017-11-21 17:14:31 +00:00
Mark Salyzyn 547063eab6 bootstat: kernel_panic test w/o bootloader or pstore support
If the platform has no bootloader or pstore support, kernel_panic
test should fail if the results are not correct. Drop skipping of
failed test if pstore support is lacking.

If device demonstrably has pstore content support, the result must
be exacting kernel_panic,sysrq. Otherwise accept the less precise
result.

Test: On hikey960 (which currently lacks reliable pstore, or a
      compliant bootloader reporting bootreason), expect failure of:
      system/core/bootstat/boot_reason_test.sh kernel_panic
Bug: 63736262
Change-Id: I071a2a9c00dc522ec037c8a8997fea524d17e6e4
2017-11-20 12:18:09 -08:00
Christopher Ferris ce31cff9af Merge "Force call the fallback handler."
am: b7969272a3

Change-Id: I0c2893acb1f1aba246a1346775ed6d83f9b45e44
2017-11-17 18:38:29 +00:00
Christopher Ferris b7969272a3 Merge "Force call the fallback handler." 2017-11-17 18:33:20 +00:00
Luis Hector Chavez 94fb5b0bef init: Drop inheritable capabilities when switching uids
This change explicitly drops all inheritable capabilities (and, by
extension, ambient capabilities) when there are no explicit capabilities
being set by a service and the user is changed. This prevents Android
running in a container from accidentally granting extra capabilities to
services.

Bug: 69320306
Test: aosp_sailfish still boots
Test: sailfish:/ $ grep Cap /proc/`pidof android.hardware.audio@2.0-service`/status
      CapInh: 0000000000000000
      CapPrm: 0000000000000000
      CapEff: 0000000000000000
      CapBnd: 0000003fffffffff
      CapAmb: 0000000000000000
Test: sailfish:/ $ grep Cap /proc/`pidof logd`/status
      CapInh: 0000000000000000
      CapPrm: 0000000440000000
      CapEff: 0000000440000000
      CapBnd: 0000003fffffffff
      CapAmb: 0000000000000000
Test: Android in Chrome OS still boots
Test: localhost ~ # grep Cap /proc/`pidof android.hardware.audio@2.0-service`/status
      CapInh: 0000000000000000
      CapPrm: 0000000000000000
      CapEff: 0000000000000000
      CapBnd: 000000006daefdff
      CapAmb: 0000000000000000
Test: localhost ~ # grep Cap /proc/`pidof logd`/status
      CapInh: 0000000000000000
      CapPrm: 0000000040000000
      CapEff: 0000000040000000
      CapBnd: 000000006daefdff
      CapAmb: 0000000000000000

Change-Id: I9218f2e27ff4fb4d91d50f9a98c0fdb4e272952c
2017-11-17 09:11:37 -08:00
Christopher Ferris 664d2a9093 Force call the fallback handler.
Always check to see if the fallback handler has been called and is
not trying to dump a specific thread.

Bug: 69110957

Test: Verified on a system where the prctl value changes, that before the
Test: change it dumps multiple tombstones, and after the change it
Test: works as expected.
Test: Ran debuggerd unit tests.
Test: Dumped process using debuggerd -b <PID> and debuggerd <PID>.
Change-Id: Id98bbe96cced9335f7c3e17088bb4ab2ad2e7a64
2017-11-16 20:07:13 -08:00
Josh Gao b837763b49 unwindstack: rename Memory::ReadPartially to Read.
Test: mma
Test: treehugger
Change-Id: I53c2c5600fb44620b629c01db85a67789594595f
2017-11-15 15:38:13 -08:00
Josh Gao ef35aa5d40 unwindstack: rename Memory::Read to ReadFully.
Rename Memory::Read to ReadFully to match its semantics with that of
android::base. ReadPartially will be renamed to Read in a follow up
commit, kept intentionally separate so that there aren't any callers
accidentally switched from ReadFully to Read.

Test: treehugger
Change-Id: I7d845ac5244c3025d92c8512e960e5d0d1da05af
2017-11-15 15:38:13 -08:00
Josh Gao 29c5378e91 unwindstack: add Memory::ReadPartially.
Add a way to read while allowing for partial reads.

Test: new tests added to libunwindstack_test, ran 32/64 on hikey960, sailfish
Test: ran unwind on hikey960/sailfish
Change-Id: I8b11d9230fcd3122148ef3f980863ac1404ad70a
2017-11-15 15:38:13 -08:00
Jaegeuk Kim 8d9b6ee621 fastboot: make_f2fs call by linux/darwin
Bug: 69298953
Change-Id: I6a7483e8617b649666247c4ca985384d086f15f8
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-15 14:22:37 -08:00
Steven Moreland 864a1baa0f Merge changes from topic "b69050941"
am: 37eb97d911

Change-Id: Icdfc3e160b2ae1d2dc63c1d86c1a75a199fdf1c0
2017-11-15 21:49:19 +00:00
Treehugger Robot 37eb97d911 Merge changes from topic "b69050941"
* changes:
  Allow a service to override another.
  Move service name duplication lookup to EndSection
  EndSection returns Result<Success>
  Fix out of date SectionParser comment.
2017-11-15 21:30:56 +00:00
yaochen 11bb6bbf41 Merge changes from topic "stats_log"
am: 68f2c85354

Change-Id: I2dce867c04ea61a05b32063f321414f459cbe26c
2017-11-15 19:26:12 +00:00
yaochen 68f2c85354 Merge changes from topic "stats_log"
* changes:
  Register an event logtag for stats logs.
  Create stats buffer in logd.
2017-11-15 19:16:12 +00:00
Steven Moreland 6f5333a4a9 Allow a service to override another.
For instance, on vendor.img:
service foo /vendor/bin/nfc
    ...

And then on odm.img:
service foo /odm/bin/super-nfc
    override

Allows a service on ODM to override a HAL on vendor.

Bug: 69050941
Test: boot, init_tests
Change-Id: I4e908fb66e89fc6e021799fe1fa6603d3072d62a
2017-11-15 10:39:29 -08:00
Steven Moreland 5e1bea30b9 Move service name duplication lookup to EndSection
This is paving the way to allow an "override" tag
in init services. This also means that errors for
part of a service definition in its section will
be shown in addition to the fact that the service
is duplicated.

Bug: 69050941
Test: boot, init_tests
Change-Id: Ic1ea8597789f45ead1083451b3e933db1524bdc9
2017-11-15 10:39:29 -08:00
Steven Moreland 7d0a5c3656 EndSection returns Result<Success>
Allow it to fail. When there is an error for a section ending,
print the error pointing to the line where the section starts.

Bug: 69050941
Test: boot, init_tests
Change-Id: I1d8ed25f4b74cc9ac24d38b8075751c7d606aea8
2017-11-15 10:39:29 -08:00
Yao Chen c6eafeb5bf Register an event logtag for stats logs.
Bug: 69323063
Test: manual
Change-Id: I244aa15c74ad70ba228c2128a3cdc829537ce5e2
2017-11-14 16:24:13 -08:00
Stefan Lafon 701a0658e6 Create stats buffer in logd.
Bug: 69323063
Test: ran unit tests.
Change-Id: Icfb827ab4674172c26b4bbfe1a9b3bffc03dc24b
(cherry picked from commit 1b1b6f50c7)
2017-11-14 16:20:00 -08:00
Steven Moreland b480d441ac Fix out of date SectionParser comment.
It has since been refactored with different
return types.

Bug: 69050941
Test: boot, init_tests
Change-Id: I54c0e6745640136f060ba1876b2f26d95bddc9d6
2017-11-14 13:47:59 -08:00
Xin Li 23e27db576 Merge commit 'a63ccea6abc7ea02e2d98e41c80793ca97237bd3' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: Ia33311cd1fd26dfaea59a69317b306fb91203c40
Merged-In: I03d06b10807e8a313c9654c2e1db36bfb59e3f99
2017-11-14 13:19:45 -08:00
Jeff Sharkey ea41bcf7a3 Merge "Better, consistent definition of AID_SHARED_GID."
am: b77ecd04d8

Change-Id: I9459a24dafc9a11c401a0fef4f9a8e2864ed22c8
2017-11-14 17:04:21 +00:00
Jeff Sharkey b77ecd04d8 Merge "Better, consistent definition of AID_SHARED_GID." 2017-11-14 16:49:30 +00:00
Jeff Sharkey 53d37ba23f Better, consistent definition of AID_SHARED_GID.
AID_SHARED_GID is a GID shared by a specific app across all users on
the same device.  Bring the UserHandle and multiuser.c implementations
into agreement, and copy/paste the unit tests that verify that both
behave identically.

This fixes a regression where multiuser_get_shared_gid() was applying
per-user isolation when it shouldn't have.

Test: adb shell /data/nativetest64/libcutils_test/libcutils_test64
Bug: 34151068, 64548938
Change-Id: I491dd79d23a214425a68865d1d0f8269916aad4c
2017-11-13 16:49:26 -07:00
Jaegeuk Kim 6c2bfb95ee Merge "fastboot: support f2fs format"
am: 21d3840eb3

Change-Id: I348a523a7822a73a9905a747789571457d2f193e
2017-11-13 22:48:15 +00:00
Jaegeuk Kim 21d3840eb3 Merge "fastboot: support f2fs format" 2017-11-13 22:37:34 +00:00
Calvin On 8b03fd8441 Merge "Fix logcatd dependency in logpersist."
am: d0406316fe

Change-Id: I7bf6bf5afaa453ea553d8e1776f148162b273530
2017-11-13 22:19:44 +00:00
Treehugger Robot d0406316fe Merge "Fix logcatd dependency in logpersist." 2017-11-13 22:15:24 +00:00
Steven Moreland 5bd7b32c15 Merge "PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt"
am: c437e14c17

Change-Id: I7fbdb7ad974663beef8f4a985bbd281228f3230c
2017-11-13 21:11:17 +00:00
Treehugger Robot c437e14c17 Merge "PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt" 2017-11-13 21:06:34 +00:00
Calvin On 24e7a25836 Fix logcatd dependency in logpersist.
This change ensures that the logcatd binary is properly
included into builds which contain logpersist. logcatd
is required for logpersist to actually work.

Bug: 69171565
Test: make checkbuild
Test: verified that logcatd binary is present in build
Change-Id: I78161998763a4694ba88af43113fef39a5fbd8c8
2017-11-13 12:22:47 -08:00
Elliott Hughes 3f958ed641 Merge "Remove dead dlmalloc stubs."
am: 2736aec411

Change-Id: I65ad892394b8ec7b9e1bc50849b17ebd48efee89
2017-11-13 17:24:55 +00:00
Elliott Hughes 2736aec411 Merge "Remove dead dlmalloc stubs." 2017-11-13 17:22:20 +00:00
Sandeep Patil 6cdd5f9002 Merge "DO NOT MERGE ANYWHERE Add comments and code about ro.boot.slot back"
am: 6b07ee9fb5  -s ours

Change-Id: Ice1295f8e8a6e3aac3bc561fdb2d5d86c56647ea
2017-11-13 16:38:42 +00:00
Treehugger Robot 6b07ee9fb5 Merge "DO NOT MERGE ANYWHERE Add comments and code about ro.boot.slot back" 2017-11-13 16:36:34 +00:00
Jaegeuk Kim d872118d88 fastboot: support f2fs format
+ quota support

This patch fixes broken f2fs_format by replacing the existing flow with calling
legacy mkfs.f2fs binary explicitly likewise ext4.

This removes obsolete ext4 stuffs as well.

Bug: 67009570
Change-Id: Ia81bcbc7adc3a8b57ada860f7f7871602ac1c6e9
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-11-11 18:29:02 -08:00
Bowgo Tsai 9a9469faeb Merge "first stage mount: abort when failed to parse fstab in device-tree"
am: d0d7346dc7

Change-Id: I46322f29c00a54bb6623eeb57c6fc3f076d942f0
2017-11-11 01:51:14 +00:00
Treehugger Robot d0d7346dc7 Merge "first stage mount: abort when failed to parse fstab in device-tree" 2017-11-11 01:48:30 +00:00
Elliott Hughes 178b010713 Merge "fastboot: show how long extraction takes."
am: 0626f7205e

Change-Id: I2fb3109f0ea97480e07d8a1245a13ebdc5240285
2017-11-11 01:04:43 +00:00
Elliott Hughes 0626f7205e Merge "fastboot: show how long extraction takes." 2017-11-11 00:59:29 +00:00
Elliott Hughes ba3b6a2851 Merge "Move libcutils source to C++."
am: d2ce2f4f45

Change-Id: Ieeb013ede9e4ef00a1b90dc42c71cc6412e83415
2017-11-11 00:28:15 +00:00