Commit graph

13 commits

Author SHA1 Message Date
Sami Tolvanen
acbf9bef43 Add init command to set verified properties
Add a command that updates dm-verity state and sets partition.%.verified
properties used by adb remount.

This is needed in init since fs_mgr cannot set properties:
    I6a28cccb1ccce960841af20a4b20c32d424b5524

Change-Id: I0fdf5bc29c56690dcadff9d0eb216d3c68483538
2015-03-19 10:11:17 +00:00
Elliott Hughes
7010301933 Remove chroot from init.
This is not obviously useful. Let's wait until we have an actual need.

Change-Id: I2c75c96314b281e89df25b6ed202b3dd5dfdaf15
2015-03-18 12:41:54 -07:00
Elliott Hughes
641d3e8ea0 Remove chdir from init.
Change-Id: Ib2880c6cb18db613deac04ee3b06b9719f5248b9
2015-03-15 10:52:20 -07:00
Elliott Hughes
5878aa92cd Remove obsolete setkey.
It's undocumented and unused.

Change-Id: I685dc900adbc14f2e8b4eeebb1e4d111782f141d
2015-03-13 15:37:54 -07:00
Stephen Smalley
d4b2d8923f Remove getsebool/setsebool from init and toolbox.
These were leftovers from the SELinux boolean support that
was originally merged.  Since Android prohibits SELinux policy
booleans, we can just drop it.

Change-Id: I02f646a7d8db65e153702205b082b87a73f60d73
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-03-13 14:01:58 -04:00
Nick Kralevich
cee683e290 builtins: remove setenforce command
Adding "setenforce 0" to init.rc isn't a supported way to turn off
SELinux, and doesn't work with AOSP SELinux policy. Remove the code
from init.

Change-Id: If8c8149560789c9a7ba518a0a100e6033bb68898
2015-03-11 17:48:45 -07:00
Elliott Hughes
a4d98484a2 Merge "Implement exec." 2015-03-11 18:20:29 +00:00
Sami Tolvanen
8ff0190835 Add init support for dm-verity logging mode
Add a built-in command for loading verity state. If dm-verity
will be started in logging mode, trigger verity-logging.

Needs changes from
  Ibb82953594d234f81ad21c40f524190b88e4ac8f

Change-Id: I5af4918f2f14fdd4d07f51c55837e08111fd3748
2015-03-04 03:07:47 +00:00
Elliott Hughes
8d82ea05cb Implement exec.
Change-Id: I20329bc9b378479d745b498d6a00eca0872cd5ab
2015-02-25 17:55:34 -08:00
Yongqin Liu
a197ff12dd bootchart: fix bootchart can not be triggered problem
bootchart uses a file on the data partition to decide if it should collect
data for bootchart, but the data partition will be mounted by the mount_all
command in the "on fs" section, and it will be only added into the action
queue when command "trigger fs" is executed, but that's after the
bootchart_init action (late_init).

This change makes bootchart_init a builtin command of init,
and make it executed as the first command of "on post-fs" section
which will be triggered after the "on fs" section.

This change also refactors the bootchart code to all be in bootchart.cpp.

Change-Id: Ia74aa34ca5b785f51fcffdd383075a549b2a99d9
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2015-02-12 12:13:24 -08:00
Elliott Hughes
f682b4786a Clean up reading and writing in init.
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.

I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...

Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Elliott Hughes
c0e919c920 Stop using #if for conditional compilation.
Use regular 'if' to prevent bitrot.

Also remove remaining typedefs.

Change-Id: I2e6ca928e2db29b88b643cf990ff05cfb0be94a6
2015-02-04 17:16:11 -08:00
Elliott Hughes
f3cf438714 Build init as C++.
This is just the minimal change to keep it building.

Change-Id: I245c5b8413a1db114576c81462eb5737f5ffcef2
2015-02-04 08:59:10 -08:00
Renamed from init/init_parser.c (Browse further)