add the pre-recovery service

Add a service called "pre-recovery" which is normally stopped but can
be started by the system server when we want to go into recovery.  It
will do any preparation needed (currently needed to handle update
packages that reside on an encrypted /data partition) and then set
sys.powerctl when it's ready to actually reboot.

Bug: 12188746
Change-Id: I894a4cb200395a0f6d7fe643ed4c2ac0a45d2052
This commit is contained in:
Doug Zongker 2014-01-14 12:30:40 -08:00
parent 475377b68a
commit 7baebf1345
3 changed files with 7 additions and 0 deletions

View file

@ -247,6 +247,7 @@ static const struct fs_path_config android_files[] = {
/* the following files have enhanced capabilities and ARE included in user builds. */
{ 00750, AID_ROOT, AID_SHELL, (1 << CAP_SETUID) | (1 << CAP_SETGID), "system/bin/run-as" },
{ 00750, AID_ROOT, AID_ROOT, 0, "system/bin/uncrypt" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/bin/*" },
{ 00755, AID_ROOT, AID_ROOT, 0, "system/lib/valgrind/*" },
{ 00755, AID_ROOT, AID_SHELL, 0, "system/xbin/*" },

View file

@ -110,6 +110,7 @@ struct {
} control_perms[] = {
{ "dumpstate",AID_SHELL, AID_LOG },
{ "ril-daemon",AID_RADIO, AID_RADIO },
{ "pre-recovery", AID_SYSTEM, AID_SYSTEM },
{NULL, 0, 0 }
};

View file

@ -577,3 +577,8 @@ service mdnsd /system/bin/mdnsd
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
service pre-recovery /system/bin/uncrypt
class main
disabled
oneshot