Commit Graph

38865 Commits

Author SHA1 Message Date
Tom Cherry d72432de93 Don't check permissions bits on init scripts for host_init_verifier
Also get rid of the copy in parser.  There's no incentive to switch to
a tokenizer that doesn't modify the input, nor is there a reason to
waste cycles making a copy of every init script as its processed.

Bug: 36970783
Test: boot
Change-Id: I8aca9c9d6f1961e1ab35dee50691a6791fc6ec66
2018-06-19 15:18:40 -07:00
Elliott Hughes 28a3160c07 Merge "Remove liblogcat." 2018-06-18 16:51:41 +00:00
Tom Cherry fe80d069a0 Merge "Support oem_#### users/groups for host_init_verifier" 2018-06-18 15:50:52 +00:00
Treehugger Robot c733e5af3c Merge "Add /system/product/* paths to permitted paths" 2018-06-18 07:18:59 +00:00
Inseob Kim 3918936b9e Add /system/product/* paths to permitted paths
As linker doesn't resolve paths in permitted paths, /system/product
variants should be added to support devices having product partition
under /system.

Bug: 110286945
Test: m -j succeeds on taimen and libraries under /system can dlopen
libraries under /system/product/apps

Change-Id: Icd102d44511702e4ec66c07a367b59c3d9700a44
2018-06-18 14:16:49 +09:00
Elliott Hughes 61b580e15e Remove liblogcat.
Parsing logs isn't an API, and even if you want to do that, popen(3)
already exists.

Bug: N/A
Test: ran tests
Change-Id: I53c40be49141483da0a844a7af47da0b38d29781
2018-06-15 15:32:52 -07:00
Elliott Hughes 8c6f7ec060 Merge "bootstat: remove the only caller of liblogcat." 2018-06-15 21:44:23 +00:00
Elliott Hughes 50a24eb3bc bootstat: remove the only caller of liblogcat.
We need to make progress both on adding the real interface for battery
level and cleaning up logging. This stands in the way of both.

Bug: http://b/77725702
Test: builds
Change-Id: Ia457e497606c2c7965d6895baebb26eef17857c9
Merged-In: Ia457e497606c2c7965d6895baebb26eef17857c9
2018-06-15 12:36:46 -07:00
Tom Cherry 4632f4e868 Merge "Relax host init parser to work with the build system" 2018-06-15 17:03:42 +00:00
Elliott Hughes 9d9c91acdc Merge "libsync: add __INTRODUCED_IN annotations." 2018-06-15 16:08:51 +00:00
Treehugger Robot 60e9dad71e Merge "debuggerd: add support for Java traces." 2018-06-15 00:40:41 +00:00
Josh Gao 24113ae641 debuggerd: add support for Java traces.
Test: `debuggerd -j $(pidof com.android.settings)`
Change-Id: I051c9b6d313e5350416b3d0743c3fc75f43fbd0c
2018-06-14 15:40:06 -07:00
Elliott Hughes 2a358106b7 libsync: add __INTRODUCED_IN annotations.
Bug: https://github.com/android-ndk/ndk/issues/706
Test: N/A
Change-Id: I8a4f98f2c929e28d81672d7e2e0d5dd63d27c7a6
2018-06-14 15:27:26 -07:00
Tom Cherry 290427b442 Support oem_#### users/groups for host_init_verifier
Bug: 36970783
Test: oem_#### users and groups no longer fail in host_init_verifier
Change-Id: I48174f528994d1b225ed897328cc207bdebf07a8
2018-06-14 21:12:02 +00:00
Tom Cherry 863d808c2e Relax host init parser to work with the build system
It's not going to be possible to safely assume $OUT has the right init
scripts to be parsed at a given point, so instead we fall back to
parsing init scripts individually.

This isn't a full revert of the previous commits.  We retain parsing
correctness of the 'import' statements and we retain using the new
host side property functionality.

Also, fix a bug where main was not actually returning -1 on failure

Bug: 36970783
Test: testing individual files still works correctly
Change-Id: I4ae5620f234caa08993deb2c30825904a75f6654
2018-06-14 14:08:33 -07:00
Treehugger Robot ca57890a80 Merge "bootstat: clear persist.sys.boot.reason once read" 2018-06-14 20:58:25 +00:00
Treehugger Robot 62dbf90225 Merge "Revert "init: Add warning in init first stage mount"" 2018-06-14 20:40:17 +00:00
Treehugger Robot fd342497a3 Merge "mkbootimg: add hridya@ to OWNERS." 2018-06-14 19:43:28 +00:00
Elliott Hughes 5587aba58d Merge "Fix `adb logcat` return code." 2018-06-14 19:38:08 +00:00
Wei Wang 37acac49e2 Revert "init: Add warning in init first stage mount"
This reverts commit fdafb3d0ec.

Reason for revert: coldboot time increase
 
Bug: 110210279
Test: Boot

Change-Id: Ibb92c1856f3fc114685c40df67556131409a9231
2018-06-14 18:51:43 +00:00
Elliott Hughes 31f0f1bcee Fix `adb logcat` return code.
`adb shell logcat` works, and `adb logcat` should too.

Bug: http://b/110202648
Test: suspended the logd process and manually removed the socket
Change-Id: If14de7c2eb178c7b4210d6bdb44df084615db33a
2018-06-14 10:47:00 -07:00
Elliott Hughes cab23382f4 mkbootimg: add hridya@ to OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ib6a7c74c95855f41b0fe9ad5a4fe5df8c4097450
2018-06-14 10:27:36 -07:00
Treehugger Robot 445eacd326 Merge "fs_mgr: dmctl: fix 'dmctl help' output" 2018-06-14 16:09:23 +00:00
Mark Salyzyn adc433d3ea bootstat: clear persist.sys.boot.reason once read
To ensure a surprise reboot does not take the last boot reason on
face value especially if coming from more than one boot sessions ago.
We shift and clear the value from persist.sys.boot.reason to
sys.boot.reason.last and establish a correct last reboot reason in
the canonical sys.boot.reason property.

This effectively deprecates persist.sys.boot.reason as an API.  They
should have been using sys.boot.reason instead for a correctly
determined reasoning.

Test: boot_reason_test.sh
Bug: 86671991
Merged-In: If85750704445088fd62978679ab3a30744c46abb
Change-Id: If85750704445088fd62978679ab3a30744c46abb
2018-06-14 15:36:56 +00:00
Sandeep Patil d34d0ef50e fs_mgr: dmctl: fix 'dmctl help' output
Test: adb shell dmctl help
Bug: 110035986

Change-Id: I5764b0b5f707dff03e715f975e54cdc2fd8fd437
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-06-13 18:38:59 -07:00
Treehugger Robot 91061985f5 Merge changes from topic "sharedlib_in_recovery"
* changes:
  Build init with shared libraries
  Shared libs are supported in recovery mode
2018-06-13 23:14:29 +00:00
Treehugger Robot b066bbebd1 Merge changes from topic "libdm"
* changes:
  fs_mgr: libdm: Add support to list existing device mapper devices
  fs_mgr: libdm: add support to create and delete device mapper devices.
  fs_mgr: device mapper: Add libdm and 'dmctl' tool to use it.
2018-06-13 22:45:30 +00:00
Treehugger Robot 06651fbe02 Merge "libsparse: add OWNERS." 2018-06-13 21:48:29 +00:00
Treehugger Robot 43c4bbd965 Merge "sync: remove legacy sync info API" 2018-06-13 21:34:54 +00:00
Sandeep Patil f603cfdd70 fs_mgr: libdm: Add support to list existing device mapper devices
Test: dmctl create system; dmctl list devices; dmctl delete system;
      dmctl list devices
Bug: 110035986

Change-Id: I4ae5d40041458421068976fa2a99c662c542a9a1
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-06-13 13:50:21 -07:00
Treehugger Robot 8e41582c8d Merge changes I8e44ba77,Ib8b933fe
* changes:
  libsparse: Add .clang-format and reformat to google3 style
  libsparse: Change source files to cpp
2018-06-13 20:47:14 +00:00
Treehugger Robot 4aa8421203 Merge "init: Add warning in init first stage mount" 2018-06-13 20:39:32 +00:00
Sandeep Patil 45d94ab683 fs_mgr: libdm: add support to create and delete device mapper devices.
Test: dmctl create system; dmctl delete system
Test: verify that ueventd creates /dev/block/dm-X and verify the dm
device name from /sys/block/dm-X/dm/name
Bug: 110035986

Change-Id: I2a08e2ea7007c0c13fe64d444f0d6618784edae7
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-06-13 13:35:48 -07:00
Sandeep Patil 59f04ee74c fs_mgr: device mapper: Add libdm and 'dmctl' tool to use it.
libdm is small static library that is intended to be the one source to
control device mapper. It is intended to have APIs to create, control
and destroy device mapper targets. Eventually, all fs_mgr implementation
that talks to device mapper will be moved to using libdm APIs.

Added 'dmctl', a command line tool that lists the registered device
mapper targets and their corresponding version. The tool will continue
to get new features to exemplify new APIs implemented in libdm.

The library is intentionally static and folds into libfs_mgr. All
clients must link to libfs_mgr as a result.

Test: dmctl list
Bug: 110035986

Change-Id: I71e7146073a74e7523524bf3b20d0be6d06f9fad
Signed-off-by: Sandeep Patil <sspatil@google.com>
2018-06-13 13:35:44 -07:00
Jerry Zhang 7b444f08c1 libsparse: Add .clang-format and reformat to google3 style
Bug: 78793464
Test: compiles
Change-Id: I8e44ba77195a12fc2bac7d4276bbc4aa95149b31
2018-06-13 20:32:24 +00:00
Elliott Hughes b7761b2673 Merge "logd: make behavior more consistent across builds." 2018-06-13 19:45:56 +00:00
Elliott Hughes 91e66ab14a libsparse: add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie26da2ff47de4cef20050b996a04d53c2b5c358f
2018-06-13 12:43:08 -07:00
Treehugger Robot 0a257c7715 Merge "libsparse: Add method to create sparse file from buffer" 2018-06-13 19:42:41 +00:00
Jesse Hall 82d377b585 sync: remove legacy sync info API
The legacy fence/pt info API has been deprecated for a while. This
change removes it from headers, so remaining users will have to switch
to the modern API when they're re-compiled. The functions are still
provided by libsync.so and tests remain, so existing binaries should
continue to work. Eventually these will be removed too, though, once
it's reasonable to expect those binaries to have been recompiled.

This reverts commit eed25df46a, which
reverted the previous attempt in commit
798ba95bda now that more users of the
legacy API have been converted.

Bug: 35326015
Test: make checkbuild
Test: adb shell dumpsys SurfaceFlinger --latency
2018-06-13 11:52:10 -07:00
Jerry Zhang 5a75507795 libsparse: Change source files to cpp
Bug: 78793464
Test: compiles
Change-Id: Ib8b933fe3ccb8dfa49a77f7955891678bf0df086
2018-06-13 11:17:22 -07:00
Wei Wang fdafb3d0ec init: Add warning in init first stage mount
init need find required devices and it some times takes a long time due
to rogue drivers. Add a warning if the timing is longer than 50ms.

Bug: 80494921
Test: Reboot
Change-Id: I8f937d7ca7127dc89ed76bb6e5f1781459d5c94a
2018-06-13 11:02:13 -07:00
Elliott Hughes cef62b4014 logd: make behavior more consistent across builds.
Bug: 110127913
Test: boots
Change-Id: I0c1efacfb5ac0407e896ddde0bcc63927edc0525
2018-06-13 10:34:43 -07:00
Treehugger Robot 7222199281 Merge "logd: Stop calling prctl(PR_SET_KEEPCAPS, 1)" 2018-06-13 16:41:15 +00:00
Luis Hector Chavez 499f3a2aed logd: Stop calling prctl(PR_SET_KEEPCAPS, 1)
This change removes the call to prctl(PR_SET_KEEPCAPS, 1), because now
that logd is being run with ambient capabilities, init will set the
KEEP_CAPS / KEEP_CAPS_LOCKED securebits.

Bug: 110127913
Test: liblog-unit-tests, logd-unit-tests, logcat-unit-tests
      (on an aosp_sailfish-userdebug)

Change-Id: I72b6a49c5cd1552085f9ad44cb19a7333a13eeea
2018-06-13 07:36:23 -07:00
Christopher Ferris 9c1d75983a Merge "Fix handling of load bias values." 2018-06-13 00:43:13 +00:00
Treehugger Robot cd7244100b Merge "libcutils: add OWNERS." 2018-06-12 22:46:28 +00:00
Tom Cherry 86e65e9cac Merge "ueventd: fix extraneous 'Invalid section' error" 2018-06-12 22:05:48 +00:00
Treehugger Robot cefd4e56ad Merge "bootstat: Remove the CAP_SYSLOG capability" 2018-06-12 20:59:45 +00:00
Elliott Hughes 796eb71e9c libcutils: add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ia147e1dc9511810cd86a463861db3d3d7fedab9b
2018-06-12 13:58:30 -07:00
Treehugger Robot 28cd2a02b1 Merge "logd: Move the capabilities from file based to ambient" 2018-06-12 20:56:56 +00:00