bootable/newinstaller
修订版 | 595899f754191927658a6ae37e4c281bba6e73e7 (tree) |
---|---|
时间 | 2016-06-27 18:10:20 |
作者 | Ma Jian <majian@jide...> |
Commiter | Chih-Wei Huang |
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
4) reboot back to android, the system time should be correct in
Change-Id: I762b8d9a8923e4a4bf58fcafe347b2708a1c8736
@@ -208,6 +208,8 @@ fi | ||
208 | 208 | # since it conflicts with Android's init |
209 | 209 | echo > /proc/sys/kernel/hotplug |
210 | 210 | |
211 | +export ANDROID_ROOT=/system | |
212 | + | |
211 | 213 | exec ${SWITCH:-switch_root} /android /init |
212 | 214 | |
213 | 215 | # avoid kernel panic |