越狱
[https://bookfere.com/post/98.html]
自制插件
根据测试,为自己的插件项目新建一个文件夹
如app1,目录结构
app1
-menu.json
-config.xml
-app1.sh
-app(unix可执行文件)
其中app1.sh为linux的shell脚本
menu.json:
''
''{
'' "items": [
'' {"name": "app1", "priority": 1, "action": "app1.sh"}
'' ]
''}
要改什么字段显然了
config.xml:
''
''
''
''
''
''
''
''
''
''
''
''
''
''
''
app1.sh:
''#!/bin/sh
'' EXTENSION=/mnt/us/extensions/my_app1
'' DPI=
cat /var/log/Xorg.0.log | grep DPI | sed -n 's/.*(\([0-9]\+\), [0-9]\+).*/\1/p'
'' #use different layouts for high resolution devices
'' if [ ${DPI} -gt 290 ]; then
'' PARAM="-l ${EXTENSION}/layouts/keyboard-300dpi.xml"
'' elif [ ${DPI} -gt 200 ]; then
'' PARAM="-l ${EXTENSION}/layouts/keyboard-200dpi.xml"
'' fi
'' export TERM=xterm TERMINFO=${EXTENSION}/vte/terminfo
'' ${EXTENSION}/app1 ${PARAM} "$@"