aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Lopez <jaime.lopez@gmail.com>2014-12-26 10:38:14 +0100
committerJaime Lopez <jaime.lopez@gmail.com>2014-12-27 10:19:37 +0100
commit2000ec5ca7814987b2d4178f3fe358b4158d47ae (patch)
tree1539271d8a6cce2282164b56b7a8f2e6abff5520
parentaf8a7beab2a9e08bd9424bcf2f3474d8133bc895 (diff)
Find7ext: Storage is different on each variant
Change-Id: I11edcc5f220a11cb41b8d40b20ec27e3c40834de
-rw-r--r--Android.mk4
-rw-r--r--BoardConfig.mk3
-rw-r--r--find7ext.mk5
-rw-r--r--full_find7ext.mk2
-rw-r--r--overlay/frameworks/base/core/res/res/xml/storage_list.xml46
-rw-r--r--rootdir/Android.mk7
-rw-r--r--rootdir/etc/init.qcom.rc73
7 files changed, 137 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index cedf674..68ab990 100644
--- a/Android.mk
+++ b/Android.mk
@@ -16,6 +16,6 @@
LOCAL_PATH := $(call my-dir)
-ifeq ($(TARGET_DEVICE),find7)
-include $(call all-subdir-makefiles,$(LOCAL_PATH))
+ifeq ($(TARGET_DEVICE),find7ext)
+include $(call all-makefiles-under,$(LOCAL_PATH))
endif
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 593ccf6..0d9aceb 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -17,5 +17,8 @@
# Inherit from find7-common
-include device/oppo/find7-common/BoardConfigCommon.mk
+# Recovery
+TARGET_RECOVERY_FSTAB := device/oppo/find7/rootdir/etc/fstab.qcom
+
# Assert
TARGET_OTA_ASSERT_DEVICE := find7,find7a,X9007,X9006,FIND7
diff --git a/find7ext.mk b/find7ext.mk
index c378385..80296d4 100644
--- a/find7ext.mk
+++ b/find7ext.mk
@@ -21,6 +21,11 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
+# Ramdisk - fstab/init.qcom.rc is different for each variant
+PRODUCT_PACKAGES += \
+ fstab.qcom \
+ init.qcom.rc
+
# Device uses high-density artwork where available
PRODUCT_AAPT_CONFIG := normal hdpi xhdpi xxhdpi
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
diff --git a/full_find7ext.mk b/full_find7ext.mk
index 8caeedf..a9e5c4f 100644
--- a/full_find7ext.mk
+++ b/full_find7ext.mk
@@ -20,7 +20,7 @@ $(call inherit-product, device/oppo/find7ext/find7ext.mk)
# Discard inherited values and use our own instead.
PRODUCT_NAME := full_find7ext
-PRODUCT_DEVICE := find7
+PRODUCT_DEVICE := find7ext
PRODUCT_BRAND := OPPO
PRODUCT_MANUFACTURER := OPPO
PRODUCT_MODEL := Find7
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
new file mode 100644
index 0000000..eb72d56
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License")
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- See storage config details at http://source.android.com/tech/storage/ -->
+
+<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- internal SD card -->
+ <storage android:mountPoint="/storage/sdcard0"
+ android:storageDescription="@string/storage_internal"
+ android:primary="true"
+ android:emulated="false"
+ android:mtpReserve="100" />
+
+ <!-- external SD card -->
+ <storage android:mountPoint="/storage/sdcard1"
+ android:storageDescription="@string/storage_sd_card"
+ android:primary="false"
+ android:emulated="false"
+ android:removable="true"
+ android:allowMassStorage="true" />
+
+ <!-- external usb storage -->
+ <storage android:mountPoint="/storage/usbdisk"
+ android:storageDescription="@string/storage_usb"
+ android:primary="false"
+ android:emulated="false"
+ android:removable="true" />
+
+</StorageList>
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 66d8f6e..fe897d5 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -11,3 +11,10 @@ LOCAL_SRC_FILES := etc/fstab.qcom
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
+include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
new file mode 100644
index 0000000..bd593a8
--- /dev/null
+++ b/rootdir/etc/init.qcom.rc
@@ -0,0 +1,73 @@
+#
+# Copyright 2014 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+import /init.qcom-common.rc
+
+on fs
+ mount_all ./fstab.qcom
+ restorecon_recursive /persist
+ setprop ro.crypto.fuse_sdcard true
+
+on init
+ # See storage config details at http://source.android.com/tech/storage/
+ chmod 0701 /mnt/media_rw
+ mkdir /mnt/media_rw/sdcard0 0775 system system
+ mkdir /mnt/media_rw/sdcard1 0775 system system
+ mkdir /mnt/media_rw/usbdisk 0775 system system
+
+ mkdir /storage/sdcard0 0000 system system
+ mkdir /storage/sdcard1 0000 system system
+ mkdir /storage/usbdisk 0000 system system
+
+ export EXTERNAL_STORAGE /storage/sdcard0
+ export SECONDARY_STORAGE /storage/sdcard1:/storage/usbdisk
+
+ # Support legacy paths
+ symlink /storage/sdcard0 /sdcard
+ symlink /storage/sdcard0 /mnt/sdcard
+
+on boot
+ # For find7s notification LED
+ chown system system /sys/class/leds/led:rgb_red/brightness
+ chown system system /sys/class/leds/led:rgb_red/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_red/duty_pcts
+ chown system system /sys/class/leds/led:rgb_red/blink
+ chown system system /sys/class/leds/led:rgb_green/brightness
+ chown system system /sys/class/leds/led:rgb_green/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_green/duty_pcts
+ chown system system /sys/class/leds/led:rgb_green/blink
+ chown system system /sys/class/leds/led:rgb_blue/brightness
+ chown system system /sys/class/leds/led:rgb_blue/ramp_step_ms
+ chown system system /sys/class/leds/led:rgb_blue/duty_pcts
+ chown system system /sys/class/leds/led:rgb_blue/blink
+
+on post-fs-data
+ # Torch
+ chown system camera /sys/devices/qcom,camera-led-flash.81/test
+ chmod 0660 /sys/devices/qcom,camera-led-flash.81/test
+
+service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard0 /storage/sdcard0
+ class late_start
+ disabled
+
+service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard1 /storage/sdcard1
+ class late_start
+ disabled
+
+service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/usbdisk /storage/usbdisk
+ class late_start
+ disabled
+