forked from ZeroPhone/ZPUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_emulator
executable file
·35 lines (25 loc) · 924 Bytes
/
setup_emulator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python2
import os
from helpers import (read_config, write_config)
CONFIG_PATH = 'config.json'
def create_file(filename):
if not os.path.exists(filename):
open(filename, 'a').close()
if __name__ == '__main__':
try:
config = read_config(CONFIG_PATH)
except:
config = dict()
config['input'] = [{'driver': 'pygame_input'}]
config['output'] = [{"driver": "pygame_emulator"}]
write_config(config, CONFIG_PATH)
create_file("emulator")
# Phone app will try to connect to a modem.
# The emulator environment is unlikely to have one
# In the future, the modem could be emulated.
# Until then, the app will likely have to be
# disabled on emulators
create_file('apps/phone/do_not_load')
create_file('apps/flashlight/do_not_load')
create_file('apps/hardware_apps/do_not_load')
create_file('apps/test_hardware/do_not_load')