Jeff Sharkey | 7c38b54 | 2013-04-10 14:18:23 -0700 | [diff] [blame] | 1 | |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 2 | on early-init |
Roman Kiryanov | 80322ac | 2020-02-28 09:19:41 -0800 | [diff] [blame] | 3 | mount tracefs tracefs /sys/kernel/tracing |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 4 | |
Jeff Sharkey | 7c38b54 | 2013-04-10 14:18:23 -0700 | [diff] [blame] | 5 | on init |
Jeff Sharkey | cbf417f | 2015-03-30 19:12:57 -0700 | [diff] [blame] | 6 | |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 7 | on boot |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 8 | setprop ARGH ARGH |
| 9 | setprop net.eth0.gw 10.0.2.2 |
| 10 | setprop net.eth0.dns1 10.0.2.3 |
Ron Munitz | e96a7c7 | 2013-05-16 16:28:23 +0300 | [diff] [blame] | 11 | setprop net.dns1 10.0.2.3 |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 12 | setprop net.gprs.local-ip 10.0.2.15 |
Lingfeng Yang | d0dc616 | 2017-01-19 15:53:05 -0800 | [diff] [blame] | 13 | setprop persist.adb.notify 1 |
| 14 | setprop persist.sys.usb.config adb |
| 15 | setprop qemu.adb.secure 0 |
| 16 | setprop ro.adb.secure 1 |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 17 | setprop ro.radio.use-ppp no |
| 18 | setprop ro.build.product generic |
| 19 | setprop ro.product.device generic |
| 20 | |
| 21 | # fake some battery state |
| 22 | setprop status.battery.state Slow |
| 23 | setprop status.battery.level 5 |
| 24 | setprop status.battery.level_raw 50 |
| 25 | setprop status.battery.level_scale 9 |
| 26 | |
Yurii Zubrytskyi | 6fc69c7 | 2016-05-13 14:13:32 -0700 | [diff] [blame] | 27 | # set up the GPU caching |
| 28 | setprop ro.hwui.texture_cache_size 72 |
| 29 | setprop ro.hwui.layer_cache_size 48 |
| 30 | setprop ro.hwui.r_buffer_cache_size 8 |
| 31 | setprop ro.hwui.path_cache_size 32 |
| 32 | setprop ro.hwui.gradient_cache_size 1 |
| 33 | setprop ro.hwui.drop_shadow_cache_size 6 |
| 34 | setprop ro.hwui.texture_cache_flushrate 0.4 |
| 35 | setprop ro.hwui.text_small_cache_width 1024 |
| 36 | setprop ro.hwui.text_small_cache_height 1024 |
| 37 | setprop ro.hwui.text_large_cache_width 2048 |
| 38 | setprop ro.hwui.text_large_cache_height 1024 |
| 39 | |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 40 | # disable some daemons the emulator doesn't want |
| 41 | stop dund |
| 42 | stop akmd |
| 43 | |
| 44 | # start essential services |
Lingfeng Yang | d0dc616 | 2017-01-19 15:53:05 -0800 | [diff] [blame] | 45 | start qemud |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 46 | start goldfish-logcat |
| 47 | start goldfish-setup |
| 48 | |
| 49 | setprop ro.setupwizard.mode EMULATOR |
| 50 | |
| 51 | # enable Google-specific location features, |
| 52 | # like NetworkLocationProvider and LocationCollector |
| 53 | setprop ro.com.google.locationfeatures 1 |
| 54 | |
| 55 | # For the emulator, which bypasses Setup Wizard, you can specify |
| 56 | # account info for the device via these two properties. Google |
| 57 | # Login Service will insert these accounts into the database when |
| 58 | # it is created (ie, after a data wipe). |
| 59 | # |
| 60 | # setprop ro.config.hosted_account username@hosteddomain.org:password |
| 61 | # setprop ro.config.google_account username@gmail.com:password |
| 62 | # |
| 63 | # You MUST have a Google account on the device, and you MAY |
| 64 | # additionally have a hosted account. No other configuration is |
| 65 | # supported, and arbitrary breakage may result if you specify |
| 66 | # something else. |
| 67 | |
Nick Kralevich | 8f9288e | 2013-07-12 13:49:49 -0700 | [diff] [blame] | 68 | on fs |
| 69 | mount_all /fstab.goldfish |
| 70 | |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 71 | #emulator is not much useful before boot complete |
| 72 | #start it later |
| 73 | on property:sys.boot_completed=1 |
| 74 | setprop sys.usb.config adb |
| 75 | start adbd |
| 76 | |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 77 | service goldfish-setup /system/etc/init.goldfish.sh |
| 78 | user root |
Lingfeng Yang | d0dc616 | 2017-01-19 15:53:05 -0800 | [diff] [blame] | 79 | group root |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 80 | oneshot |
| 81 | |
| 82 | # The qemu-props program is used to set various system |
| 83 | # properties on boot. It must be run early during the boot |
| 84 | # process to avoid race conditions with other daemons that |
| 85 | # might read them (e.g. surface flinger), so define it in |
| 86 | # class 'core' |
| 87 | # |
| 88 | service qemu-props /system/bin/qemu-props |
| 89 | class core |
| 90 | user root |
| 91 | group root |
| 92 | oneshot |
| 93 | |
Lingfeng Yang | d0dc616 | 2017-01-19 15:53:05 -0800 | [diff] [blame] | 94 | service qemud /system/bin/qemud |
| 95 | socket qemud stream 666 |
| 96 | oneshot |
| 97 | |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 98 | # -Q is a special logcat option that forces the |
| 99 | # program to check wether it runs on the emulator |
| 100 | # if it does, it redirects its output to the device |
| 101 | # named by the androidboot.console kernel option |
| 102 | # if not, is simply exits immediately |
bohu | 7197f73 | 2017-03-07 14:10:50 -0800 | [diff] [blame] | 103 | # logd user added to prevent logcat from logging content. |
| 104 | # log group added to support access to read logs socket. |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 105 | service goldfish-logcat /system/bin/logcat -Q |
bohu | 7197f73 | 2017-03-07 14:10:50 -0800 | [diff] [blame] | 106 | user logd |
| 107 | group log |
keunyoung | a76102f | 2013-03-05 11:01:50 -0800 | [diff] [blame] | 108 | oneshot |
bohu | 9aaf1aa | 2015-05-27 17:56:45 -0700 | [diff] [blame] | 109 | |
| 110 | service fingerprintd /system/bin/fingerprintd |
| 111 | class late_start |
| 112 | user system |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 113 | |
| 114 | service bugreport /system/bin/dumpstate -d -p -B \ |
bohu | b7cfb88 | 2017-08-29 12:21:07 -0700 | [diff] [blame] | 115 | -o /data/user_de/0/com.android.shell/files/bugreports/bugreport |
bohu | 0319174 | 2017-04-24 20:36:25 -0700 | [diff] [blame] | 116 | class main |
| 117 | disabled |
| 118 | oneshot |
| 119 | keycodes 114 115 116 |