mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 19:33:42 +08:00
dragonpilot mod for 0.8.13-1
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
install_font = False
|
||||
|
||||
if os.path.isfile("/EON"):
|
||||
if not os.path.isfile("/system/fonts/NotoSansCJKtc-Regular.otf"):
|
||||
os.system("mount -o remount,rw /system")
|
||||
os.system("rm -fr /system/fonts/NotoSansTC*.otf")
|
||||
os.system("rm -fr /system/fonts/NotoSansSC*.otf")
|
||||
os.system("rm -fr /system/fonts/NotoSansKR*.otf")
|
||||
os.system("rm -fr /system/fonts/NotoSansJP*.otf")
|
||||
os.system("cp -rf /data/openpilot/selfdrive/assets/fonts/NotoSansCJKtc-* /system/fonts/")
|
||||
os.system("cp -rf /data/openpilot/selfdrive/assets/fonts/fonts.xml /system/etc/fonts.xml")
|
||||
os.system("chmod 644 /system/etc/fonts.xml")
|
||||
os.system("chmod 644 /system/fonts/NotoSansCJKtc-*")
|
||||
os.system("mount -o remount,r /system")
|
||||
|
||||
elif os.path.isfile("/TICI"):
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
if os.path.isfile("/EON"):
|
||||
language = subprocess.check_output(["getprop", "persist.sys.locale"], encoding='utf8').strip()
|
||||
if language != "":
|
||||
os.system("echo -n %s > /data/params/d/dp_locale" % language)
|
||||
elif os.path.isfile("/TICI"):
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
install_key = False
|
||||
if os.path.isfile("/EON"):
|
||||
os.system("setprop persist.neos.ssh 1")
|
||||
os.system("echo -n 1 > /data/params/d/SshEnabled")
|
||||
if not os.path.isfile("/data/params/d/GithubSshKeys"):
|
||||
install_key = True
|
||||
else:
|
||||
with open('/data/params/d/GithubSshKeys') as f:
|
||||
if f.read().strip() == "":
|
||||
install_key = True
|
||||
|
||||
if install_key:
|
||||
os.system("echo -n openpilot > /data/params/d/GithubUsername")
|
||||
os.system("cp /data/openpilot/scripts/ssh_key/setup_keys /data/params/d/GithubSshKeys")
|
||||
|
||||
elif os.path.isfile("/TICI"):
|
||||
pass
|
||||
else:
|
||||
pass
|
||||
Reference in New Issue
Block a user