device/generic/goldfish
Revision | 1bff005b3dfa358722d4f0e74448c6154008ec2c (tree) |
---|---|
Time | 2017-06-24 05:44:50 |
Author | bohu <bohu@goog...> |
Commiter | android-build-team Robot |
Emulator: update goldfish to 0ff252b9
Bug: 37302997
Test: Build and run sdk_google_aw_x86-userdebug emulator
To commit
0ff252b95a21998caa20403da724d6d7a0f50174 oc-emu-dev
Author: bohu <bohu@google.com>
Date: Mon Jun 27 18:23:28 2016 -0700
Enable bugreport service
Change-Id: Ie04a6f7c3a19415b63db5850dc3b9aa0488af555
(cherry picked from commit bceb8ad4f4290b0076a4315644d79cbd1b713a67)
(cherry picked from commit 0319174f8eb0f97cfe27c70d95b91d006ee6c1ce)
@@ -72,6 +72,9 @@ | ||
72 | 72 | <!-- Feature to specify if the device support managed users. --> |
73 | 73 | <feature name="android.software.managed_users" /> |
74 | 74 | |
75 | + <feature name="android.software.picture_in_picture" /> | |
76 | + | |
77 | + <feature name="android.software.cts" /> | |
75 | 78 | <!-- devices with GPS must include android.hardware.location.gps.xml --> |
76 | 79 | <!-- devices with an autofocus camera and/or flash must include either |
77 | 80 | android.hardware.camera.autofocus.xml or |
@@ -0,0 +1,32 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- | |
3 | + ~ Copyright (C) 2017 The Android Open Source Project | |
4 | + ~ | |
5 | + ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
6 | + ~ you may not use this file except in compliance with the License. | |
7 | + ~ You may obtain a copy of the License at | |
8 | + ~ | |
9 | + ~ http://www.apache.org/licenses/LICENSE-2.0 | |
10 | + ~ | |
11 | + ~ Unless required by applicable law or agreed to in writing, software | |
12 | + ~ distributed under the License is distributed on an "AS IS" BASIS, | |
13 | + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | + ~ See the License for the specific language governing permissions and | |
15 | + ~ limitations under the License | |
16 | + --> | |
17 | + | |
18 | +<!-- | |
19 | +This XML file declares which signature|privileged permissions should be granted to privileged | |
20 | +applications on GMS or Google-branded devices. | |
21 | +It allows additional grants on top of privapp-permissions-platform.xml | |
22 | +--> | |
23 | + | |
24 | +<permissions> | |
25 | + <privapp-permissions package="com.android.sdksetup"> | |
26 | + <permission name="android.permission.BACKUP"/> | |
27 | + <permission name="android.permission.WRITE_SECURE_SETTINGS"/> | |
28 | + </privapp-permissions> | |
29 | + <privapp-permissions package="com.android.dialer"> | |
30 | + <permission name="android.permission.STATUS_BAR"/> | |
31 | + </privapp-permissions> | |
32 | +</permissions> | |
\ No newline at end of file |
@@ -4,5 +4,5 @@ | ||
4 | 4 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK |
5 | 5 | /dev/block/vda /system ext4 ro wait |
6 | 6 | /dev/block/vdb /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait |
7 | -/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check | |
8 | -/devices/*/block/vdd auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata | |
7 | +/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check,quota,forceencrypt=/dev/block/vdd | |
8 | +/devices/*/block/vde auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata |
@@ -68,6 +68,12 @@ on boot | ||
68 | 68 | on fs |
69 | 69 | mount_all /fstab.goldfish |
70 | 70 | |
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 | + | |
71 | 77 | service goldfish-setup /system/etc/init.goldfish.sh |
72 | 78 | user root |
73 | 79 | group root |
@@ -104,3 +110,10 @@ service goldfish-logcat /system/bin/logcat -Q | ||
104 | 110 | service fingerprintd /system/bin/fingerprintd |
105 | 111 | class late_start |
106 | 112 | user system |
113 | + | |
114 | +service bugreport /system/bin/dumpstate -d -p -B \ | |
115 | + -o /data/data/com.android.shell/files/bugreports/bugreport | |
116 | + class main | |
117 | + disabled | |
118 | + oneshot | |
119 | + keycodes 114 115 116 |
@@ -0,0 +1,46 @@ | ||
1 | +#!/system/bin/sh | |
2 | + | |
3 | + | |
4 | +# ro.kernel.android.qemud is normally set when we | |
5 | +# want the RIL (radio interface layer) to talk to | |
6 | +# the emulated modem through qemud. | |
7 | +# | |
8 | +# However, this will be undefined in two cases: | |
9 | +# | |
10 | +# - When we want the RIL to talk directly to a guest | |
11 | +# serial device that is connected to a host serial | |
12 | +# device by the emulator. | |
13 | +# | |
14 | +# - We don't want to use the RIL but the VM-based | |
15 | +# modem emulation that runs inside the guest system | |
16 | +# instead. | |
17 | +# | |
18 | +# The following detects the latter case and sets up the | |
19 | +# system for it. | |
20 | +# | |
21 | +qemud=`getprop ro.kernel.android.qemud` | |
22 | +case "$qemud" in | |
23 | + "") | |
24 | + radio_ril=`getprop ro.kernel.android.ril` | |
25 | + case "$radio_ril" in | |
26 | + "") | |
27 | + # no need for the radio interface daemon | |
28 | + # telephony is entirely emulated in Java | |
29 | + setprop ro.radio.noril yes | |
30 | + stop ril-daemon | |
31 | + ;; | |
32 | + esac | |
33 | + ;; | |
34 | +esac | |
35 | + | |
36 | + | |
37 | +# disable boot animation for a faster boot sequence when needed | |
38 | +boot_anim=`getprop ro.kernel.android.bootanim` | |
39 | +case "$boot_anim" in | |
40 | + 0) setprop debug.sf.nobootanimation 1 | |
41 | + ;; | |
42 | +esac | |
43 | + | |
44 | + | |
45 | +# take the wake lock | |
46 | +echo "emulator_wake_lock" > /sys/power/wake_lock |
@@ -0,0 +1,32 @@ | ||
1 | +#!/system/bin/sh | |
2 | + | |
3 | +# Setup networking when boot starts | |
4 | +ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up | |
5 | +route add default gw 10.0.2.2 dev eth0 | |
6 | + | |
7 | + | |
8 | +# Setup additionnal DNS servers if needed | |
9 | +num_dns=`getprop ro.kernel.ndns` | |
10 | +case "$num_dns" in | |
11 | + 2) setprop net.eth0.dns2 10.0.2.4 | |
12 | + ;; | |
13 | + 3) setprop net.eth0.dns2 10.0.2.4 | |
14 | + setprop net.eth0.dns3 10.0.2.5 | |
15 | + ;; | |
16 | + 4) setprop net.eth0.dns2 10.0.2.4 | |
17 | + setprop net.eth0.dns3 10.0.2.5 | |
18 | + setprop net.eth0.dns4 10.0.2.6 | |
19 | + ;; | |
20 | +esac | |
21 | + | |
22 | + | |
23 | +# set up the second interface (for inter-emulator connections) | |
24 | +# if required | |
25 | +my_ip=`getprop net.shared_net_ip` | |
26 | +case "$my_ip" in | |
27 | + "") | |
28 | + ;; | |
29 | + *) ifconfig eth1 "$my_ip" netmask 255.255.255.0 up | |
30 | + ;; | |
31 | +esac | |
32 | + |
@@ -9,6 +9,9 @@ on init | ||
9 | 9 | symlink /dev/goldfish_pipe /dev/android_pipe |
10 | 10 | symlink /dev/goldfish_pipe /dev/qemu_pipe |
11 | 11 | |
12 | +on post-fs-data | |
13 | + setprop vold.post_fs_data_done 1 | |
14 | + | |
12 | 15 | on boot |
13 | 16 | setprop net.eth0.gw 10.0.2.2 |
14 | 17 | setprop net.eth0.dns1 10.0.2.3 |
@@ -17,6 +20,7 @@ on boot | ||
17 | 20 | setprop ro.build.product generic |
18 | 21 | setprop ro.product.device generic |
19 | 22 | setprop ro.hardware.audio.primary goldfish |
23 | + setprop ro.setupwizard.mode EMULATOR | |
20 | 24 | |
21 | 25 | # fake some battery state |
22 | 26 | setprop status.battery.state Slow |
@@ -44,14 +48,37 @@ on boot | ||
44 | 48 | # start essential services |
45 | 49 | # These were written for the classic emulator, but are applicable to ranchu |
46 | 50 | start goldfish-logcat |
47 | - start goldfish-setup | |
51 | +# start goldfish-setup | |
48 | 52 | |
49 | 53 | |
50 | 54 | # enable Google-specific location features, |
51 | 55 | # like NetworkLocationProvider and LocationCollector |
52 | 56 | setprop ro.com.google.locationfeatures 1 |
53 | 57 | |
54 | -service goldfish-setup /system/etc/init.goldfish.sh | |
58 | +#emulator is not much useful before boot complete | |
59 | +#start it later | |
60 | +on property:sys.boot_completed=1 | |
61 | + setprop sys.usb.config adb | |
62 | + start adbd | |
63 | + start goldfish-logcat | |
64 | + | |
65 | +on property:qemu.adbd=start | |
66 | + setprop sys.usb.config adb | |
67 | + start adbd | |
68 | + start goldfish-logcat | |
69 | + | |
70 | +# allow goldfish-setup to take wake lock | |
71 | + chown root system /sys/power/wake_lock | |
72 | + chown root system /sys/power/wake_unlock | |
73 | + | |
74 | +service ranchu-setup /system/bin/init.ranchu-core.sh | |
75 | + class core | |
76 | + user root | |
77 | + group root | |
78 | + oneshot | |
79 | + | |
80 | +service ranchu-net /system/bin/init.ranchu-net.sh | |
81 | + class late_start | |
55 | 82 | user root |
56 | 83 | group root wakelock |
57 | 84 | oneshot |
@@ -68,6 +95,9 @@ service qemu-props /system/bin/qemu-props | ||
68 | 95 | group root |
69 | 96 | oneshot |
70 | 97 | |
98 | +on property:qemu.logcat=start | |
99 | + start goldfish-logcat | |
100 | + | |
71 | 101 | # -Q is a special logcat option that forces the |
72 | 102 | # program to check wether it runs on the emulator |
73 | 103 | # if it does, it redirects its output to the device |
@@ -83,3 +113,10 @@ service goldfish-logcat /system/bin/logcat -Q | ||
83 | 113 | service fingerprintd /system/bin/fingerprintd |
84 | 114 | class late_start |
85 | 115 | user system |
116 | + | |
117 | +service bugreport /system/bin/dumpstate -d -p -B \ | |
118 | + -o /data/data/com.android.shell/files/bugreports/bugreport | |
119 | + class main | |
120 | + disabled | |
121 | + oneshot | |
122 | + keycodes 114 115 116 |
@@ -0,0 +1,35 @@ | ||
1 | +<manifest version="1.0" type="device"> | |
2 | + <hal format="hidl"> | |
3 | + <name>android.hardware.drm</name> | |
4 | + <transport arch="32">passthrough</transport> | |
5 | + <impl level="generic"></impl> | |
6 | + <version>1.0</version> | |
7 | + <!-- TODO(b/36371166): change to default --> | |
8 | + <interface> | |
9 | + <name>ICryptoFactory</name> | |
10 | + <instance>crypto</instance> | |
11 | + </interface> | |
12 | + <interface> | |
13 | + <name>IDrmFactory</name> | |
14 | + <instance>drm</instance> | |
15 | + </interface> | |
16 | + </hal> | |
17 | + <hal format="hidl"> | |
18 | + <name>android.hardware.graphics.allocator</name> | |
19 | + <transport>hwbinder</transport> | |
20 | + <version>2.0</version> | |
21 | + <interface> | |
22 | + <name>IAllocator</name> | |
23 | + <instance>default</instance> | |
24 | + </interface> | |
25 | + </hal> | |
26 | + <hal format="hidl"> | |
27 | + <name>android.hardware.graphics.mapper</name> | |
28 | + <transport arch="32+64">passthrough</transport> | |
29 | + <version>2.0</version> | |
30 | + <interface> | |
31 | + <name>IMapper</name> | |
32 | + <instance>default</instance> | |
33 | + </interface> | |
34 | + </hal> | |
35 | +</manifest> |
@@ -18,7 +18,9 @@ | ||
18 | 18 | --> |
19 | 19 | |
20 | 20 | <resources> |
21 | + <!-- cannot set this to true because O-CTS is testing the keyguard b/37465076 | |
21 | 22 | <bool name="def_lockscreen_disabled">true</bool> |
23 | + --> | |
22 | 24 | |
23 | 25 | <!-- Allow users to use both the on-screen keyboard, as well as a real |
24 | 26 | keyboard --> |
@@ -109,6 +109,20 @@ int main(void) | ||
109 | 109 | } |
110 | 110 | |
111 | 111 | |
112 | + /* HACK start adbd periodically every minute, if adbd is already running, this is a no-op */ | |
113 | + for(;;) { | |
114 | + usleep(60000000); | |
115 | + char temp[BUFF_SIZE]; | |
116 | + property_get("sys.boot_completed", temp, ""); | |
117 | + int is_boot_completed = (strncmp(temp, "1", 1) == 0) ? 1 : 0; | |
118 | + if (is_boot_completed) { | |
119 | + DD("start adbd ..."); | |
120 | + property_set("qemu.adbd", "start"); | |
121 | + } else { | |
122 | + DD("skip starting adbd ..."); | |
123 | + } | |
124 | + } | |
125 | + | |
112 | 126 | /* finally, close the channel and exit */ |
113 | 127 | close(qemud_fd); |
114 | 128 | DD("exiting (%d properties set).", count); |
@@ -355,7 +355,7 @@ static int sensor_device_poll_event_locked(SensorDevice* dev) | ||
355 | 355 | events[ID_TEMPERATURE].type = SENSOR_TYPE_AMBIENT_TEMPERATURE; |
356 | 356 | continue; |
357 | 357 | } |
358 | - | |
358 | + | |
359 | 359 | /* "proximity:<value>" */ |
360 | 360 | if (sscanf(buff, "proximity:%g", params+0) == 1) { |
361 | 361 | new_sensors |= SENSORS_PROXIMITY; |
@@ -742,7 +742,7 @@ static const struct sensor_t sSensorListInit[] = { | ||
742 | 742 | .fifoMaxEventCount = 0, |
743 | 743 | .stringType = 0, |
744 | 744 | .requiredPermission = 0, |
745 | - .flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE, | |
745 | + .flags = SENSOR_FLAG_ON_CHANGE_MODE, | |
746 | 746 | .reserved = {} |
747 | 747 | }, |
748 | 748 |