From b2f9d5cafdc6c11f841f9164bb27790370bc1490 Mon Sep 17 00:00:00 2001 From: baolong24 <1667375308@qq.com> Date: Fri, 28 Feb 2020 05:41:49 +0000 Subject: [PATCH] dior: CM bringup --- BoardConfig.mk | 6 +++--- {MKActions => CMActions}/Android.mk | 2 +- {MKActions => CMActions}/AndroidManifest.xml | 10 +++++----- {MKActions => CMActions}/proguard.flags | 0 .../res/drawable/ic_settings_gestures.xml | 0 .../res/values-zh-rCN/strings.xml | 0 .../res/values-zh-rCN/styles.xml | 0 {MKActions => CMActions}/res/values/strings.xml | 0 {MKActions => CMActions}/res/values/styles.xml | 0 {MKActions => CMActions}/res/xml/gesture_panel.xml | 0 .../cmactions}/BootCompletedReceiver.java | 2 +- .../com/cyanogenmod/cmactions/CMActionsService.java | 10 +++++----- .../cmactions}/GesturePreferenceActivity.java | 2 +- .../cmactions}/GesturePreferenceFragment.java | 2 +- build.sh | 8 ++++++++ mk.dependencies => cm.dependencies | 0 mokee.mk => cm.mk | 12 ++++++++---- .../org/cyanogenmod}/hardware/KeyDisabler.java | 4 ++-- .../org/cyanogenmod}/hardware/VibratorHW.java | 4 ++-- init/init_dior.cpp | 3 +-- sepolicy/file.te | 2 +- sepolicy/system_app.te | 2 +- sepolicy/system_server.te | 2 +- 23 files changed, 41 insertions(+), 30 deletions(-) rename {MKActions => CMActions}/Android.mk (97%) rename {MKActions => CMActions}/AndroidManifest.xml (83%) rename {MKActions => CMActions}/proguard.flags (100%) rename {MKActions => CMActions}/res/drawable/ic_settings_gestures.xml (100%) rename {MKActions => CMActions}/res/values-zh-rCN/strings.xml (100%) rename {MKActions => CMActions}/res/values-zh-rCN/styles.xml (100%) rename {MKActions => CMActions}/res/values/strings.xml (100%) rename {MKActions => CMActions}/res/values/styles.xml (100%) rename {MKActions => CMActions}/res/xml/gesture_panel.xml (100%) rename {MKActions/src/com/mokee/mkactions => CMActions/src/com/cyanogenmod/cmactions}/BootCompletedReceiver.java (96%) rename MKActions/src/com/mokee/mkactions/MKActionsService.java => CMActions/src/com/cyanogenmod/cmactions/CMActionsService.java (96%) rename {MKActions/src/com/mokee/mkactions => CMActions/src/com/cyanogenmod/cmactions}/GesturePreferenceActivity.java (96%) rename {MKActions/src/com/mokee/mkactions => CMActions/src/com/cyanogenmod/cmactions}/GesturePreferenceFragment.java (98%) create mode 100644 build.sh rename mk.dependencies => cm.dependencies (100%) rename mokee.mk => cm.mk (77%) rename {mkhw/org/mokee => cmhw/org/cyanogenmod}/hardware/KeyDisabler.java (94%) rename {mkhw/org/mokee => cmhw/org/cyanogenmod}/hardware/VibratorHW.java (94%) diff --git a/BoardConfig.mk b/BoardConfig.mk index acbf6cb..3ea556e 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -100,11 +100,11 @@ MAX_EGL_CACHE_KEY_SIZE := 12*1024 # of the device. MAX_EGL_CACHE_SIZE := 2048*1024 -# MKHW +# CMHW BOARD_USES_MOKEE_HARDWARE := true BOARD_HARDWARE_CLASS := \ - hardware/mokee/mkhw \ - $(LOCAL_PATH)/mkhw + hardware/cyanogen/cmhw \ + $(LOCAL_PATH)/cmhw # No old RPC for prop TARGET_NO_RPC := true diff --git a/MKActions/Android.mk b/CMActions/Android.mk similarity index 97% rename from MKActions/Android.mk rename to CMActions/Android.mk index 4c38901..9965e4c 100644 --- a/MKActions/Android.mk +++ b/CMActions/Android.mk @@ -5,7 +5,7 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) -LOCAL_PACKAGE_NAME := MKActions +LOCAL_PACKAGE_NAME := CMActions LOCAL_CERTIFICATE := platform LOCAL_PRIVILEGED_MODULE := true diff --git a/MKActions/AndroidManifest.xml b/CMActions/AndroidManifest.xml similarity index 83% rename from MKActions/AndroidManifest.xml rename to CMActions/AndroidManifest.xml index abb2086..16df21a 100644 --- a/MKActions/AndroidManifest.xml +++ b/CMActions/AndroidManifest.xml @@ -1,6 +1,6 @@ @@ -13,21 +13,21 @@ android:label="@string/device_settings_app_name" android:persistent="true"> - + - + + android:theme="@style/CMActions"> diff --git a/MKActions/proguard.flags b/CMActions/proguard.flags similarity index 100% rename from MKActions/proguard.flags rename to CMActions/proguard.flags diff --git a/MKActions/res/drawable/ic_settings_gestures.xml b/CMActions/res/drawable/ic_settings_gestures.xml similarity index 100% rename from MKActions/res/drawable/ic_settings_gestures.xml rename to CMActions/res/drawable/ic_settings_gestures.xml diff --git a/MKActions/res/values-zh-rCN/strings.xml b/CMActions/res/values-zh-rCN/strings.xml similarity index 100% rename from MKActions/res/values-zh-rCN/strings.xml rename to CMActions/res/values-zh-rCN/strings.xml diff --git a/MKActions/res/values-zh-rCN/styles.xml b/CMActions/res/values-zh-rCN/styles.xml similarity index 100% rename from MKActions/res/values-zh-rCN/styles.xml rename to CMActions/res/values-zh-rCN/styles.xml diff --git a/MKActions/res/values/strings.xml b/CMActions/res/values/strings.xml similarity index 100% rename from MKActions/res/values/strings.xml rename to CMActions/res/values/strings.xml diff --git a/MKActions/res/values/styles.xml b/CMActions/res/values/styles.xml similarity index 100% rename from MKActions/res/values/styles.xml rename to CMActions/res/values/styles.xml diff --git a/MKActions/res/xml/gesture_panel.xml b/CMActions/res/xml/gesture_panel.xml similarity index 100% rename from MKActions/res/xml/gesture_panel.xml rename to CMActions/res/xml/gesture_panel.xml diff --git a/MKActions/src/com/mokee/mkactions/BootCompletedReceiver.java b/CMActions/src/com/cyanogenmod/cmactions/BootCompletedReceiver.java similarity index 96% rename from MKActions/src/com/mokee/mkactions/BootCompletedReceiver.java rename to CMActions/src/com/cyanogenmod/cmactions/BootCompletedReceiver.java index 7de00f3..77d6740 100644 --- a/MKActions/src/com/mokee/mkactions/BootCompletedReceiver.java +++ b/CMActions/src/com/cyanogenmod/cmactions/BootCompletedReceiver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.mokee.mkactions; +package com.cyanogenmod.cmactions; import android.content.BroadcastReceiver; import android.content.Context; diff --git a/MKActions/src/com/mokee/mkactions/MKActionsService.java b/CMActions/src/com/cyanogenmod/cmactions/CMActionsService.java similarity index 96% rename from MKActions/src/com/mokee/mkactions/MKActionsService.java rename to CMActions/src/com/cyanogenmod/cmactions/CMActionsService.java index 6fa3670..0043fcd 100644 --- a/MKActions/src/com/mokee/mkactions/MKActionsService.java +++ b/CMActions/src/com/cyanogenmod/cmactions/CMActionsService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.mokee.mkactions; +package com.cyanogenmod.cmactions; import android.app.Service; import android.content.BroadcastReceiver; @@ -36,8 +36,8 @@ import java.util.ArrayList; import java.util.List; -public class MKActionsService extends Service { - private static final String TAG = "MKActionsService"; +public class CMActionsService extends Service { + private static final String TAG = "CMActionsService"; private static final boolean DEBUG = false; private static final String GESTURE_HAND_WAVE_KEY = "gesture_hand_wave"; @@ -109,11 +109,11 @@ public void disable() { @Override public void onCreate() { - if (DEBUG) Log.d(TAG, "MKActionsService Started"); + if (DEBUG) Log.d(TAG, "CMActionsService Started"); mContext = this; mPowerManager = (PowerManager)getSystemService(Context.POWER_SERVICE); mSensor = new DiorProximitySensor(mContext); - mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MKActionsWakeLock"); + mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "CMActionsWakeLock"); SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(mContext); loadPreferences(sharedPrefs); sharedPrefs.registerOnSharedPreferenceChangeListener(mPrefListener); diff --git a/MKActions/src/com/mokee/mkactions/GesturePreferenceActivity.java b/CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceActivity.java similarity index 96% rename from MKActions/src/com/mokee/mkactions/GesturePreferenceActivity.java rename to CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceActivity.java index 426fc1f..837fe80 100644 --- a/MKActions/src/com/mokee/mkactions/GesturePreferenceActivity.java +++ b/CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.mokee.mkactions; +package com.cyanogenmod.cmactions; import android.os.Bundle; diff --git a/MKActions/src/com/mokee/mkactions/GesturePreferenceFragment.java b/CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceFragment.java similarity index 98% rename from MKActions/src/com/mokee/mkactions/GesturePreferenceFragment.java rename to CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceFragment.java index 2dece25..e8ec4a0 100644 --- a/MKActions/src/com/mokee/mkactions/GesturePreferenceFragment.java +++ b/CMActions/src/com/cyanogenmod/cmactions/GesturePreferenceFragment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.mokee.mkactions; +package com.cyanogenmod.cmactions; import android.os.Bundle; import android.support.v14.preference.PreferenceFragment; diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..178dc25 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +cd ~/cm-14.1 +. build/envsetup.sh +lunch cm_dior-userdebug +export LC_ALL=C +mka bacon | tee log.log + diff --git a/mk.dependencies b/cm.dependencies similarity index 100% rename from mk.dependencies rename to cm.dependencies diff --git a/mokee.mk b/cm.mk similarity index 77% rename from mokee.mk rename to cm.mk index f44c9f3..45a4bba 100644 --- a/mokee.mk +++ b/cm.mk @@ -20,11 +20,11 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) $(call inherit-product, device/xiaomi/dior/device.mk) $(call inherit-product-if-exists, vendor/xiaomi/dior/dior-vendor.mk) -# Inherit some common MK stuff (full) -$(call inherit-product, vendor/mk/config/common_full_phone.mk) +# Inherit some common CyanogenMod stuff (full) +$(call inherit-product, vendor/cm/config/common_full_phone.mk) # Product configuration -PRODUCT_NAME := mk_dior +PRODUCT_NAME := cm_dior PRODUCT_DEVICE := dior PRODUCT_BRAND := Xiaomi PRODUCT_MANUFACTURER := Xiaomi @@ -32,5 +32,9 @@ PRODUCT_MODEL := HM NOTE 1LTE PRODUCT_GMS_CLIENTID_BASE := android-xiaomi +# Build fingerprint +BUILD_FINGERPRINT="Xiaomi/dior/dior:4.4.4/KTU84P/V9.2.4.0.KHICNEK:user/release-keys" + PRODUCT_BUILD_PROP_OVERRIDES += \ - PRODUCT_NAME=dior + PRIVATE_BUILD_DESC="dior-user 4.4.4 KTU84P V9.2.4.0.KHICNEK release-keys" + diff --git a/mkhw/org/mokee/hardware/KeyDisabler.java b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java similarity index 94% rename from mkhw/org/mokee/hardware/KeyDisabler.java rename to cmhw/org/cyanogenmod/hardware/KeyDisabler.java index 67c7ef5..9a9bb7b 100644 --- a/mkhw/org/mokee/hardware/KeyDisabler.java +++ b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.mokee.hardware; +package org.cyanogenmod.hardware; -import org.mokee.internal.util.FileUtils; +import org.cyanogenmod.internal.util.FileUtils; /* * Disable capacitive keys diff --git a/mkhw/org/mokee/hardware/VibratorHW.java b/cmhw/org/cyanogenmod/hardware/VibratorHW.java similarity index 94% rename from mkhw/org/mokee/hardware/VibratorHW.java rename to cmhw/org/cyanogenmod/hardware/VibratorHW.java index 33bc16b..86bbf24 100644 --- a/mkhw/org/mokee/hardware/VibratorHW.java +++ b/cmhw/org/cyanogenmod/hardware/VibratorHW.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.mokee.hardware; +package org.cyanogenmod.hardware; -import org.mokee.internal.util.FileUtils; +import org.cyanogenmod.internal.util.FileUtils; public class VibratorHW { diff --git a/init/init_dior.cpp b/init/init_dior.cpp index 9fe4899..6963cac 100644 --- a/init/init_dior.cpp +++ b/init/init_dior.cpp @@ -65,6 +65,5 @@ void vendor_load_properties() property_override("ro.product.device", "dior"); property_override("ro.build.product", "dior"); - property_override("ro.build.description", "dior-user 4.4.4 KTU84P V8.0.1.0.KHIMIDG release-keys"); - property_override("ro.build.fingerprint", "Xiaomi/dior/dior:4.4.4/KTU84P/V8.0.1.0.KHIMIDG:user/release-keys"); } + diff --git a/sepolicy/file.te b/sepolicy/file.te index dbff080..1768cca 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -1,3 +1,3 @@ -#============= mkhw ============== +#============= cmhw ============== type display_sysfs, sysfs_type, file_type; type vibeamp_sysfs, sysfs_type, file_type; diff --git a/sepolicy/system_app.te b/sepolicy/system_app.te index dcfacf2..acde1a7 100644 --- a/sepolicy/system_app.te +++ b/sepolicy/system_app.te @@ -1,3 +1,3 @@ -#============= mkhw ============== +#============= cmhw ============== allow system_app vibeamp_sysfs:file rw_file_perms; allow system_app display_sysfs:file rw_file_perms; diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te index e276dd7..034bc4a 100644 --- a/sepolicy/system_server.te +++ b/sepolicy/system_server.te @@ -1,3 +1,3 @@ -#============= mkhw ============== +#============= cmhw ============== allow system_server display_sysfs:file rw_file_perms; allow system_server vibeamp_sysfs:file rw_file_perms;