Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 8d764fd

Browse files
committed
Bug 1003711 - Part 3: Setup config and media file for DarwinStreamingServer; Add dss and dss-setup for init.rc.
1 parent f486d03 commit 8d764fd

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

darwinstreamingserver/Android.mk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright (C) 2012 Mozilla Foundation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
LOCAL_PATH := $(call my-dir)
16+
17+
include $(CLEAR_VARS)
18+
LOCAL_MODULE := init.goldfish.dss.sh
19+
LOCAL_MODULE_TAGS := optional eng
20+
LOCAL_MODULE_CLASS := ETC
21+
LOCAL_SRC_FILES := $(LOCAL_MODULE)
22+
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
23+
include $(BUILD_PREBUILT)
24+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/system/bin/sh
2+
3+
src_config_fname=/system/etc/streaming/streamingserver.xml
4+
dst_config_fname=/data/misc/streaming/streamingserver.xml
5+
6+
src_media_fname=/system/media/streaming/sample_h264_100kbit.mp4
7+
dst_media_fname=/data/misc/streaming/media/sample_h264_100kbit.mp4
8+
9+
cat $src_config_fname > $dst_config_fname
10+
cat $src_media_fname > $dst_media_fname

etc/init.goldfish.rc.patch

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/rootdir/etc/init.goldfish.rc b/rootdir/etc/init.goldfish.rc
2-
index 83b7f8a..2864fc6 100644
2+
index 83b7f8a..ba7753d 100644
33
--- a/rootdir/etc/init.goldfish.rc
44
+++ b/rootdir/etc/init.goldfish.rc
55
@@ -1,23 +1,33 @@
@@ -36,7 +36,7 @@ index 83b7f8a..2864fc6 100644
3636

3737
# disable some daemons the emulator doesn't want
3838
stop dund
39-
@@ -25,16 +35,61 @@ on boot
39+
@@ -25,16 +35,78 @@ on boot
4040

4141
# start essential services
4242
start qemud
@@ -60,6 +60,11 @@ index 83b7f8a..2864fc6 100644
6060
+ # Create a writable fake fwpath for emulator. (/sys/module/wlan/parameters/fwpath on device)
6161
+ write /data/misc/wifi/fake_fwpath sta
6262
+
63+
+ # Create the directories used by DarwinStreamingServer.
64+
+ mkdir /data/misc/streaming 0770
65+
+ mkdir /data/misc/streaming/logs 0770
66+
+ mkdir /data/misc/streaming/media 0770
67+
+
6368
+service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dtest -iwlan0 -c/data/misc/wifi/wpa_supplicant_test.conf -ddd
6469
+ class late_start
6570
+ user root
@@ -89,6 +94,18 @@ index 83b7f8a..2864fc6 100644
8994
+ user root
9095
+ group wifi net
9196
+ oneshot
97+
+
98+
+# Darwin Streaming Server.
99+
+service dss /system/bin/DarwinStreamingServer -d
100+
+ class late_start
101+
+ user root
102+
+ disabled
103+
+ oneshot
104+
+
105+
+service dss-setup /system/bin/sh /system/etc/init.goldfish.dss.sh
106+
+ class late_start
107+
+ user root
108+
+ oneshot
92109
+
93110
# enable Google-specific location features,
94111
# like NetworkLocationProvider and LocationCollector
@@ -98,7 +115,7 @@ index 83b7f8a..2864fc6 100644
98115
# account info for the device via these two properties. Google
99116
# Login Service will insert these accounts into the database when
100117
# it is created (ie, after a data wipe).
101-
@@ -71,8 +126,15 @@ service qemud /system/bin/qemud
118+
@@ -71,8 +143,15 @@ service qemud /system/bin/qemud
102119
# -Q is a special logcat option that forces the
103120
# program to check wether it runs on the emulator
104121
# if it does, it redirects its output to the device

0 commit comments

Comments
 (0)