diff --git a/BoardConfig.mk b/BoardConfig.mk index f5eae2b8..721b63d1 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -202,6 +202,7 @@ BOARD_SEPOLICY_UNION += \ surfaceflinger.te \ system_app.te \ system_server.te \ + tee.te \ wcnss_service.te \ ueventd.te \ usb_uicc_daemon.te \ diff --git a/carbon.dependencies b/carbon.dependencies new file mode 100644 index 00000000..da216a95 --- /dev/null +++ b/carbon.dependencies @@ -0,0 +1,26 @@ +[ + { + "remote": "cm", + "repository": "Cyanogenmod/android_device_oppo_common", + "target_path": "device/oppo/common", + "revision": "cm-12.1" + }, + { + "remote": "cm", + "repository": "Cyanogenmod/android_device_qcom_common", + "target_path": "device/qcom/common", + "revision": "cm-12.1" + }, + { + "remote": "gh", + "repository": "Grarak/android_kernel_oneplus_msm8994", + "target_path": "kernel/oneplus/msm8994", + "revision": "cm-12.1" + }, + { + "remote": "td", + "repository": "proprietary_vendor_oneplus", + "target_path": "vendor/oneplus", + "revision": "cm-12.1" + } +] diff --git a/cm.mk b/carbon.mk similarity index 84% rename from cm.mk rename to carbon.mk index 9e705a94..285ee0b7 100644 --- a/cm.mk +++ b/carbon.mk @@ -1,4 +1,5 @@ # Copyright (C) 2015 The CyanogenMod Project +# Copyright (C) 2015 The Carbon Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,8 +15,8 @@ $(call inherit-product, device/oneplus/oneplus2/full_oneplus2.mk) -# Inherit some common CM stuff. -$(call inherit-product, vendor/cm/config/common_full_phone.mk) +# Inherit some common Carbon stuff. +$(call inherit-product, vendor/carbon/config/common_phone.mk) # Inherit oneplus2-specific vendor tree $(call inherit-product-if-exists, vendor/oneplus/oneplus2/oneplus2-vendor.mk) diff --git a/full_oneplus2.mk b/full_oneplus2.mk index 117b37f3..94708448 100644 --- a/full_oneplus2.mk +++ b/full_oneplus2.mk @@ -21,7 +21,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) # Inherit from oneplus2 device $(call inherit-product, device/oneplus/oneplus2/device.mk) -PRODUCT_NAME := cm_oneplus2 +PRODUCT_NAME := carbon_oneplus2 PRODUCT_DEVICE := oneplus2 PRODUCT_MANUFACTURER := OnePlus PRODUCT_MODEL := oneplus2 diff --git a/init/init_oneplus2.c b/init/init_oneplus2.c index 9f9145f6..b6cbbad8 100644 --- a/init/init_oneplus2.c +++ b/init/init_oneplus2.c @@ -45,7 +45,7 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar UNUSED(msm_ver); UNUSED(board_type); - rc = property_get("ro.cm.device", device); + rc = property_get("ro.carbon.device", device); if (!rc || !ISMATCH(device, "oneplus2")) return; diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc index 8b34d9db..3dadc54e 100755 --- a/rootdir/etc/init.qcom.usb.rc +++ b/rootdir/etc/init.qcom.usb.rc @@ -45,7 +45,6 @@ service qcom-usb-sh /system/bin/sh /init.qcom.usb.sh # MTP on property:sys.usb.config=mtp - setprop sys.usb.cdrom /system/etc/usb_drivers.iso write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 2A70 write /sys/class/android_usb/android0/idProduct F003 @@ -56,7 +55,6 @@ on property:sys.usb.config=mtp on property:sys.usb.config=mtp,adb stop adbd - setprop sys.usb.cdrom /system/etc/usb_drivers.iso write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 2A70 write /sys/class/android_usb/android0/idProduct 9011 diff --git a/sepolicy/device.te b/sepolicy/device.te index 191d9678..394757d3 100644 --- a/sepolicy/device.te +++ b/sepolicy/device.te @@ -1,5 +1,7 @@ type adspd_device, dev_type; +type drm_block_device, dev_type; + type efs_block_device, dev_type; type mdm_helper_device, dev_type; type fingerprint_device, dev_type; diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te index 945f25cb..7bf4cadd 100644 --- a/sepolicy/system_server.te +++ b/sepolicy/system_server.te @@ -2,6 +2,10 @@ allow system_server proc_touchpanel:file rw_file_perms; allow system_server proc_touchpanel:dir { search }; +allow system_server persist_file:dir rw_dir_perms; +allow system_server sensors_persist_file:dir search; +allow system_server sensors_persist_file:file r_file_perms; + # timerfd allow system_server rtc_device:chr_file rw_file_perms; diff --git a/sepolicy/tee.te b/sepolicy/tee.te new file mode 100644 index 00000000..f333dc1c --- /dev/null +++ b/sepolicy/tee.te @@ -0,0 +1,7 @@ +allow tee drm_block_device:blk_file rw_file_perms; + +allow tee vfat:dir search; +allow tee vfat:file read; +allow tee vfat:file open; +allow tee vfat:file getattr; + diff --git a/vendorsetup.sh b/vendorsetup.sh deleted file mode 100755 index a231aa72..00000000 --- a/vendorsetup.sh +++ /dev/null @@ -1,3 +0,0 @@ -add_lunch_combo cm_oneplus2-user -add_lunch_combo cm_oneplus2-userdebug -add_lunch_combo cm_oneplus2-eng