From b5f88903c387b208629bcc04aad2c92f242e4144 Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Mon, 26 Mar 2012 12:07:14 -0700 Subject: Add bthid device driver ko file. Init it as device driver node. Author: Priti Aghera Change-Id: Iae05cfeca4a02755594c1276135b5aa737c90004 --- init.tuna.rc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 070ab1d..86dec0c 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -46,6 +46,11 @@ on boot write /sys/bus/usb/devices/usb1/power/autosuspend_delay_ms 0 write /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms 0 +# Start kernel driver (for BTHID) + insmod /system/lib/modules/bthid.ko + chmod 0660 /dev/bthid + chown bluetooth bluetooth /dev/bthid + on fs mkdir /factory 0775 radio radio mount_all /fstab.tuna -- cgit v1.1 From b87103903a3dbe7eedc4009f6f3076b927ae75af Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 13 Aug 2012 16:47:58 -0700 Subject: Specify destination sdcard mount point. Bug: 6925012 Change-Id: Ib9d5ce0dfba3669e75a9c57af9f7ae3872bb6235 --- init.tuna.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 86dec0c..41d35e4 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -165,7 +165,7 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ # create virtual SD card at /storage/sdcard0, based on the /data/media directory # daemon will drop to user/group system/media_rw after initializing # underlying files in /data/media will be created with user and group media_rw (1023) -service sdcard /system/bin/sdcard /data/media 1023 1023 +service sdcard /system/bin/sdcard /data/media /storage/sdcard0 1023 1023 class late_start service p2p_supplicant /system/bin/wpa_supplicant \ -- cgit v1.1 From a3471cd8e45f43704c882ddff985df7818971e3a Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 16 Aug 2012 13:44:37 -0700 Subject: Multi-user external storage support. Move FUSE daemon to secure mount point, and relax /storage access now that sdcard_r is enforced using private bind mounts in zygote. Bug: 6925012 Change-Id: I6c3b54e07a176408053749de6966b26c9f58bb5f --- init.tuna.rc | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 41d35e4..bf91ed4 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -1,17 +1,21 @@ import init.tuna.usb.rc -on early-init - export EXTERNAL_STORAGE /storage/sdcard0 - mkdir /storage 0050 system sdcard_r - mkdir /storage/sdcard0 0000 system system - # for backwards compatibility - symlink /storage/sdcard0 /sdcard - symlink /storage/sdcard0 /mnt/sdcard +on init + mkdir /mnt/secure/sdcard0 0700 root root + + export EXTERNAL_STORAGE /storage/sdcard0 + mkdir /storage 0711 root root + mkdir /storage/sdcard0 0000 root root + symlink /storage/sdcard0 /sdcard + symlink /storage/sdcard0 /mnt/sdcard + + # Save bugreports as owner + export BUGREPORT_WRITE_PATH /mnt/secure/sdcard0/0 + export BUGREPORT_READ_PATH /storage/sdcard0 on post-fs-data - # we will remap this as /storage/sdcard0 with the sdcard fuse tool - mkdir /data/media 0770 media_rw media_rw - chown media_rw media_rw /data/media + mkdir /data/media 0770 media_rw media_rw + mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi mkdir /data/misc/dhcp 0770 dhcp dhcp @@ -162,11 +166,9 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ group drmrpc oneshot -# create virtual SD card at /storage/sdcard0, based on the /data/media directory -# daemon will drop to user/group system/media_rw after initializing -# underlying files in /data/media will be created with user and group media_rw (1023) -service sdcard /system/bin/sdcard /data/media /storage/sdcard0 1023 1023 - class late_start +# virtual sdcard daemon running as media_rw (1023) +service sdcard /system/bin/sdcard /data/media /mnt/secure/sdcard0 1023 1023 + class late_start service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \ -- cgit v1.1 From 1fcda24688b3a31babaf8e84aed9ae6fe0793f55 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 20 Aug 2012 13:21:11 -0700 Subject: Migrate sdcard0 to shell-accessible location. Bug: 7005701 Change-Id: I0c07505d9ccc2842186a00a4e96489063cc8c7e8 --- init.tuna.rc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index bf91ed4..647e8e5 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -1,16 +1,20 @@ import init.tuna.usb.rc on init - mkdir /mnt/secure/sdcard0 0700 root root + mkdir /mnt/shell/sdcard0 0700 shell shell + # External storage path for apps export EXTERNAL_STORAGE /storage/sdcard0 + # External storage path for adb + export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0 + mkdir /storage 0711 root root mkdir /storage/sdcard0 0000 root root symlink /storage/sdcard0 /sdcard symlink /storage/sdcard0 /mnt/sdcard # Save bugreports as owner - export BUGREPORT_WRITE_PATH /mnt/secure/sdcard0/0 + export BUGREPORT_WRITE_PATH /mnt/shell/sdcard0/0 export BUGREPORT_READ_PATH /storage/sdcard0 on post-fs-data @@ -167,7 +171,7 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ oneshot # virtual sdcard daemon running as media_rw (1023) -service sdcard /system/bin/sdcard /data/media /mnt/secure/sdcard0 1023 1023 +service sdcard /system/bin/sdcard /data/media /mnt/shell/sdcard0 1023 1023 class late_start service p2p_supplicant /system/bin/wpa_supplicant \ -- cgit v1.1 From 73c0d9500d21ff61d760bf91619618b24a649706 Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Fri, 17 Aug 2012 14:57:57 -0700 Subject: Revert "Add bthid device driver ko file. Init it as device driver node." UHID device in kernel is used instead of this driver. This reverts commit b5f88903c387b208629bcc04aad2c92f242e4144. --- init.tuna.rc | 5 ----- 1 file changed, 5 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 647e8e5..00a3865 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -54,11 +54,6 @@ on boot write /sys/bus/usb/devices/usb1/power/autosuspend_delay_ms 0 write /sys/bus/usb/devices/usb2/power/autosuspend_delay_ms 0 -# Start kernel driver (for BTHID) - insmod /system/lib/modules/bthid.ko - chmod 0660 /dev/bthid - chown bluetooth bluetooth /dev/bthid - on fs mkdir /factory 0775 radio radio mount_all /fstab.tuna -- cgit v1.1 From baaaeb0278566694207ab70cd6f75c80179762a4 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 21 Aug 2012 10:36:20 -0700 Subject: Iteration on multi-user external storage. Symlink to make /sdcard work for shell users. Environment variable to find root of multiuser SD card. Bug: 6925012 Change-Id: Ia190a609a3b04357a7acb8fe630971bb13aab249 --- init.tuna.rc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 00a3865..98be753 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -1,15 +1,14 @@ import init.tuna.usb.rc on init + # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/sdcard0 0700 shell shell - # External storage path for apps export EXTERNAL_STORAGE /storage/sdcard0 - # External storage path for adb - export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0 + export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0 - mkdir /storage 0711 root root - mkdir /storage/sdcard0 0000 root root + # Support legacy paths + symlink /mnt/shell/sdcard0/0 /storage/sdcard0 symlink /storage/sdcard0 /sdcard symlink /storage/sdcard0 /mnt/sdcard -- cgit v1.1 From e16d1caba7c837d4e68ff686981f822afb651705 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Wed, 5 Sep 2012 16:02:26 -0700 Subject: Remove /sdcard hack for shell users. Using a /storage/sdcard0 symlink and a tmpfs staging area was used to enable "/sdcard" paths for both zygote processes and the shell user, but it breaks on devices with both emulated and physical external storage. Specifically, vold can't mount a physical sdcard onto the primary storage symlink, and zygote can't re-bind-mount when secondary storage is remounted after dropping privileges. Bug: 7094858, 7064600 Change-Id: Ic9821129f94c22d0c64e84d8ee9f55d505a78e5d --- init.tuna.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 98be753..a55d833 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -3,12 +3,12 @@ import init.tuna.usb.rc on init # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/sdcard0 0700 shell shell + mkdir /storage/sdcard0 0000 root root export EXTERNAL_STORAGE /storage/sdcard0 export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0 # Support legacy paths - symlink /mnt/shell/sdcard0/0 /storage/sdcard0 symlink /storage/sdcard0 /sdcard symlink /storage/sdcard0 /mnt/sdcard -- cgit v1.1 From d46c45ffb6ead626e9bbe9a03c489bde035a278b Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 6 Sep 2012 13:18:55 -0700 Subject: Bring back ADB_EXTERNAL_STORAGE. Bug: 7119408 Change-Id: Ia08146965ee6218a033a70c2f02cbc621e339316 --- init.tuna.rc | 1 + 1 file changed, 1 insertion(+) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index a55d833..530330f 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -6,6 +6,7 @@ on init mkdir /storage/sdcard0 0000 root root export EXTERNAL_STORAGE /storage/sdcard0 + export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0 export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0 # Support legacy paths -- cgit v1.1 From 260f6e0aac21567ddf16390e9b0206f923d5081f Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 11 Sep 2012 23:18:48 -0700 Subject: Include user identifier in external storage paths. When building external storage paths, always include user in path to enable cross-user paths and aid debugging. Bug: 7131382 Change-Id: Ic065fb8739a9d5d6e7f88ab93932391d906fed57 --- init.tuna.rc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 530330f..c850128 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -2,20 +2,23 @@ import init.tuna.usb.rc on init # See storage config details at http://source.android.com/tech/storage/ - mkdir /mnt/shell/sdcard0 0700 shell shell - mkdir /storage/sdcard0 0000 root root + mkdir /mnt/shell/emulated 0700 shell shell + mkdir /storage/emulated 0000 root root + mkdir /storage/emulated_legacy 0000 root root - export EXTERNAL_STORAGE /storage/sdcard0 - export ADB_EXTERNAL_STORAGE /mnt/shell/sdcard0/0 - export MULTIUSER_EXTERNAL_STORAGE /mnt/shell/sdcard0 + export EXTERNAL_STORAGE /storage/emulated_legacy + export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0 + + export EMULATED_STORAGE_SOURCE /mnt/shell/emulated + export EMULATED_STORAGE_TARGET /storage/emulated # Support legacy paths - symlink /storage/sdcard0 /sdcard - symlink /storage/sdcard0 /mnt/sdcard + symlink /storage/emulated_legacy /sdcard + symlink /storage/emulated_legacy /mnt/sdcard # Save bugreports as owner - export BUGREPORT_WRITE_PATH /mnt/shell/sdcard0/0 - export BUGREPORT_READ_PATH /storage/sdcard0 + export BUGREPORT_WRITE_PATH /mnt/shell/emulated/0 + export BUGREPORT_READ_PATH /storage/emulated on post-fs-data mkdir /data/media 0770 media_rw media_rw @@ -166,7 +169,7 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \ oneshot # virtual sdcard daemon running as media_rw (1023) -service sdcard /system/bin/sdcard /data/media /mnt/shell/sdcard0 1023 1023 +service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 class late_start service p2p_supplicant /system/bin/wpa_supplicant \ -- cgit v1.1 From 826bac872817bcc3bb3fb134b9eaa9b88e1b3f92 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 13 Sep 2012 02:29:21 -0700 Subject: One more legacy symlink. Change-Id: If598bb76fc760c7f12dcf9a5ff865508106e73d0 --- init.tuna.rc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index c850128..af3c88d 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -15,10 +15,7 @@ on init # Support legacy paths symlink /storage/emulated_legacy /sdcard symlink /storage/emulated_legacy /mnt/sdcard - - # Save bugreports as owner - export BUGREPORT_WRITE_PATH /mnt/shell/emulated/0 - export BUGREPORT_READ_PATH /storage/emulated + symlink /storage/emulated_legacy /storage/sdcard0 on post-fs-data mkdir /data/media 0770 media_rw media_rw -- cgit v1.1 From 62532ce655d9f10166d9193003f4d8b21e59a227 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Thu, 20 Sep 2012 12:54:32 -0700 Subject: tuna: dhcp: Add CLIENTID request to dhcpcd service BUG: b/7175187 Change-Id: I4977a4429827ab1f996d1cefb47c094fe8cafb91 Signed-off-by: Dmitry Shmidt --- init.tuna.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index af3c88d..94dc2fd 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -192,7 +192,7 @@ service wpa_supplicant /system/bin/wpa_supplicant \ disabled oneshot -service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL +service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL class main disabled oneshot @@ -207,7 +207,7 @@ service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL disabled oneshot -service dhcpcd_eth0 /system/bin/dhcpcd -ABKL +service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL class main disabled oneshot -- cgit v1.1 From 708e9e045705d9dfed744936b44bd89c145226d6 Mon Sep 17 00:00:00 2001 From: Zhihai Xu Date: Wed, 19 Sep 2012 14:07:27 -0700 Subject: ISSUE 6849488 Bluedroid stack, remove system/bluetooth. remove system/bluetooth stuff bug 6849488 Change-Id: I183359650b84e32dc210d272d42e34d0db346ac3 --- init.tuna.rc | 9 --------- 1 file changed, 9 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 94dc2fd..6181640 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -127,15 +127,6 @@ service fRom /system/bin/fRom \ class late_start oneshot -service hciattach /system/bin/brcm_patchram_plus --enable_hci --no2bytes --enable_lpm \ - --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 \ - --patchram /vendor/firmware/bcm4330.hcd /dev/ttyO1 - class main - user bluetooth - group bluetooth net_bt_admin - disabled - oneshot - service pvrsrvctl /vendor/bin/pvrsrvctl --start --no-module class core user root -- cgit v1.1 From eea86dbc4b27344c51a913a80c2fc3852d44fcc8 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Sun, 30 Sep 2012 12:48:02 -0700 Subject: Final shuffle to make /sdcard work in shell. Move legacy mount location to /storage/emulated/legacy, and create a symlink to point towards shell-visible FUSE daemon. This symlink is then masked from zygote-forked apps by a tmpfs. Bug: 7255202 Change-Id: I22967c10e5719c0628816f061606924ddd15e5bb --- init.tuna.rc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index 6181640..e2cae6f 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -4,18 +4,16 @@ on init # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/emulated 0700 shell shell mkdir /storage/emulated 0000 root root - mkdir /storage/emulated_legacy 0000 root root - - export EXTERNAL_STORAGE /storage/emulated_legacy - export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0 + export EXTERNAL_STORAGE /storage/emulated/legacy export EMULATED_STORAGE_SOURCE /mnt/shell/emulated export EMULATED_STORAGE_TARGET /storage/emulated # Support legacy paths - symlink /storage/emulated_legacy /sdcard - symlink /storage/emulated_legacy /mnt/sdcard - symlink /storage/emulated_legacy /storage/sdcard0 + symlink /storage/emulated/legacy /sdcard + symlink /storage/emulated/legacy /mnt/sdcard + symlink /storage/emulated/legacy /storage/sdcard0 + symlink /mnt/shell/emulated/0 /storage/emulated/legacy on post-fs-data mkdir /data/media 0770 media_rw media_rw -- cgit v1.1 From 1cbde26f0976035b7cfca5cee517358047f333f6 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Sun, 30 Sep 2012 17:21:13 -0700 Subject: Allow traversal into /storage/emulated. Bug: 7255202 Change-Id: Ifc017e702f0c6b6d3ecb3220a5321303f3849c51 --- init.tuna.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.tuna.rc') diff --git a/init.tuna.rc b/init.tuna.rc index e2cae6f..466ee7c 100755 --- a/init.tuna.rc +++ b/init.tuna.rc @@ -3,7 +3,7 @@ import init.tuna.usb.rc on init # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/emulated 0700 shell shell - mkdir /storage/emulated 0000 root root + mkdir /storage/emulated 0555 root root export EXTERNAL_STORAGE /storage/emulated/legacy export EMULATED_STORAGE_SOURCE /mnt/shell/emulated -- cgit v1.1