• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

bootable/newinstaller


Commit MetaInfo

修订版595899f754191927658a6ae37e4c281bba6e73e7 (tree)
时间2016-06-27 18:10:20
作者Ma Jian <majian@jide...>
CommiterChih-Wei Huang

Log Message

init: fix localtime_r not work in /init

There is no ANDROID_ROOT environment variable set in /init so that
localtime_r doesn't work because it cannot find the correct tzdata
file under /system.

NO_REF_TASK
Tested:
1) make sure persist.rtc_local_time is 1
2) make sure sysclktz 1 in init.rc
3) set local time in android and reboot to bios, bios should have

local time

4) reboot back to android, the system time should be correct in

local time (even network time sync is not available)

Change-Id: I762b8d9a8923e4a4bf58fcafe347b2708a1c8736

更改概述

差异

--- a/initrd/init
+++ b/initrd/init
@@ -208,6 +208,8 @@ fi
208208 # since it conflicts with Android's init
209209 echo > /proc/sys/kernel/hotplug
210210
211+export ANDROID_ROOT=/system
212+
211213 exec ${SWITCH:-switch_root} /android /init
212214
213215 # avoid kernel panic