|
本帖最后由 山陰路的夏天 于 2018-3-7 19:23 編輯
數(shù)碼視訊Q5 解決刷機(jī)后遙控器不能開機(jī)喚醒
之前我是江蘇移動的盒子,刷機(jī)是如下地址的原生安卓,
znds.com/forum.php?mod=viewthread&tid=520079&fromuid=4253644
然后問題來了
替換掉/system/etc/remote.conf的遙控文件后,發(fā)現(xiàn)按了遙控器上面的電源關(guān)機(jī)后,不能再次開機(jī)
發(fā)現(xiàn)該系統(tǒng)的開機(jī)識別碼是2bd3,但是我的遙控器識別碼是1608
開機(jī)功能是在boot里面的,除非解包boot修改,否則就只有換遙控器了.
最終的解決思路如下
通過在具有system權(quán)限的shell里面加一個(gè)定時(shí)循環(huán),不停的去重置狀態(tài)
因?yàn)?sys目錄是一個(gè)內(nèi)存文件系統(tǒng),所以每30秒的狀態(tài)重置,也不會傷害到機(jī)器的flash
這個(gè)改法,理論上所有的遙控器都是通用的,
遙控器的關(guān)機(jī)和開機(jī)按鈕終于可以正常工作了
#/system/xbin/preinstall.sh
###############################################################
#/system/xbin/preinstall.sh
MARK=/data/local/symbol_thirdpart_apks_installed
PKGS=/system/preinstall/
SETTINGS=/data/data/com.android.providers.settings/databases/settings.db
STATEWAKE=/sys/power/state
LOCKWAKE=/sys/power/wake_lock
if [ ! -e $MARK ]; then
echo "booting the first time, so pre-install some APKs."
busybox find $PKGS -name "*\.apk" -exec sh /system/bin/pm install {} \;
# NO NEED to delete these APKs since we keep a mark under data partition.
# And the mark will be wiped out after doing factory reset, so you can install
# these APKs again if files are still there.
# busybox rm -rf $PKGS
touch $MARK
echo "OK, installation complete."
sqlite3 $SETTINGS "UPDATE system SET value = '3600000' WHERE name = 'screen_off_timeout' ;"
sqlite3 $SETTINGS "UPDATE system SET value = '0' WHERE name = 'screenshot_button_show' ;"
sqlite3 $SETTINGS "UPDATE secure SET value = '1' WHERE name = 'lockscreen.disabled' ;"
fi
while true ; do
busybox sleep 30s
echo "standby" > $STATEWAKE
echo "standby" > $LOCKWAKE
done
##############################################################################
|
上一篇: UNT400B_4HN 刷了固件后, 內(nèi)存由1g變成400多m 求解決辦法下一篇: 用zANTI給魔百盒裝了一些軟件,說說感受
|