diff --git a/init/reboot.cpp b/init/reboot.cpp index 8e46d579e..e887677da 100644 --- a/init/reboot.cpp +++ b/init/reboot.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #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();