Merge changes I76212f65,I6a29c678 into oc-dev

* changes:
  init.rc: create /data/misc/reboot owned by system
  reboot: fix owner and permissions of last_reboot_reason file
This commit is contained in:
TreeHugger Robot 2017-04-14 01:29:38 +00:00 committed by Android (Google) Code Review
commit 5975d4e337
2 changed files with 4 additions and 2 deletions

View file

@ -43,6 +43,7 @@
#include <cutils/android_reboot.h>
#include <fs_mgr.h>
#include <logwrap/logwrap.h>
#include <private/android_filesystem_config.h>
#include "log.h"
#include "property_service.h"
@ -305,7 +306,8 @@ void DoReboot(unsigned int cmd, const std::string& reason, const std::string& re
Timer t;
LOG(INFO) << "Reboot start, reason: " << reason << ", rebootTarget: " << rebootTarget;
android::base::WriteStringToFile(StringPrintf("%s\n", reason.c_str()), LAST_REBOOT_REASON_FILE);
android::base::WriteStringToFile(StringPrintf("%s\n", reason.c_str()), LAST_REBOOT_REASON_FILE,
S_IRUSR | S_IWUSR, AID_SYSTEM, AID_SYSTEM);
if (cmd == ANDROID_RB_THERMOFF) { // do not wait if it is thermal
DoThermalOff();

View file

@ -409,7 +409,7 @@ on post-fs-data
mkdir /data/misc/boottrace 0771 system shell
mkdir /data/misc/update_engine 0700 root root
mkdir /data/misc/trace 0700 root root
mkdir /data/misc/reboot 0700 root root
mkdir /data/misc/reboot 0700 system system
# profile file layout
mkdir /data/misc/profiles 0771 system system
mkdir /data/misc/profiles/cur 0771 system system