From 1a9958ec8f68abb84c97ff47fd0ae34d4c63714b Mon Sep 17 00:00:00 2001 From: Charlotte D Date: Mon, 19 Nov 2018 09:23:54 +0000 Subject: [PATCH] land -> karate --- Android.mk | 2 +- AndroidProducts.mk | 2 +- BoardConfig.mk | 12 ++++---- README.md | 36 +++++++++++----------- device.mk | 6 ++-- extract-files.sh | 4 +-- libinit/{init_land.cpp => init_karate.cpp} | 23 ++------------ lineage.dependencies | 4 +-- lineage_land.mk => lineage_karate.mk | 16 +++++----- setup-makefiles.sh | 4 +-- 10 files changed, 45 insertions(+), 64 deletions(-) rename libinit/{init_land.cpp => init_karate.cpp} (68%) rename lineage_land.mk => lineage_karate.mk (76%) diff --git a/Android.mk b/Android.mk index 27c7782..c55f1b3 100644 --- a/Android.mk +++ b/Android.mk @@ -22,6 +22,6 @@ LOCAL_PATH := $(call my-dir) -ifeq ($(TARGET_DEVICE),land) +ifeq ($(TARGET_DEVICE),karate) include $(call all-makefiles-under,$(LOCAL_PATH)) endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 262546e..2fd3acf 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -14,4 +14,4 @@ # limitations under the License. PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/lineage_land.mk + $(LOCAL_DIR)/lineage_karate.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index d24bfac..5a51134 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -16,25 +16,25 @@ # # inherit from common msm8937-common --include device/xiaomi/msm8937-common/BoardConfigCommon.mk +-include device/lenovo/msm8937-common/BoardConfigCommon.mk -DEVICE_PATH := device/xiaomi/land +DEVICE_PATH := device/lenovo/karate # Camera BOARD_QTI_CAMERA_32BIT_ONLY := true USE_DEVICE_SPECIFIC_CAMERA := true # Kernel -TARGET_KERNEL_CONFIG := lineageos_land_defconfig +TARGET_KERNEL_CONFIG := lineageos_land_defconfig ## TODO: replace with lenovo kernel # Libinit -TARGET_LIBINIT_MSM8937_DEFINES_FILE := $(DEVICE_PATH)/libinit/init_land.cpp +TARGET_LIBINIT_MSM8937_DEFINES_FILE := $(DEVICE_PATH)/libinit/init_karate.cpp # Libshim TARGET_LD_SHIM_LIBS := /vendor/bin/mm-qcamera-daemon|vendor/lib/libshims_camera.so # Security patch level -VENDOR_SECURITY_PATCH := 2017-04-01 +VENDOR_SECURITY_PATCH := 2018-11-01 # Inherit the proprietary files --include vendor/xiaomi/land/BoardConfigVendor.mk +-include vendor/lenovo/karate/BoardConfigVendor.mk diff --git a/README.md b/README.md index 6fadd48..b879fb1 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,26 @@ -# Common device configuration for Xiaomi Redmi 3S +# Common device configuration for Lenovo K6 (karate) ## Spec Sheet -| Feature | Specification | -| :---------------------- | :-------------------------------- | -| CPU | Octa-core 1.4 GHz Cortex-A53 | -| Chipset | Qualcomm MSM8937 Snapdragon 430 | -| GPU | Adreno 505 | -| Memory | 2/3 GB | -| Shipped Android Version | 6.0.1 | -| Storage | 16/32 GB | -| MicroSD | Up to 256 GB | -| Battery | 4100 mAh (non-removable) | -| Dimensions | 139.3 x 69.6 x 8.5 mm | -| Display | 720 x 1280 pixels, 5.0" IPS LCD | -| Rear Camera | 13 MP, LED flash | -| Front Camera | 5 MP | -| Release Date | June 2016 | +Basic | Spec Sheet +-------:|:------------------------- +CPU | Octa-core 1.4 GHz ARM Cortex-A53 (ARMv7) +Chipset | Qualcomm Snapdragon 430 MSM8937 +GPU | Adreno 505 @ 450 MHz +Memory | 3/4 GB RAM +Shipped Android Version | 6.0.1 +Storage | 16/32 GB +MicroSD | Up to 128GB +Battery | Non-removable Li-Po 4000 mAh battery +Display | 1080x1920 pixels, 5.0 inches (~441 ppi pixel density) +Dimensions | 141.9 x 70.3 x 9.3 mm +Camera | Primary: 13 MP PDAF, LED-Flash, FHD (Sony IMX219/Samsung S5K3P3) +Camera (front) | 8 MP, Fixed-focus, FHD +Fingerprint | Focaltech Fingerprint Sensor (FPC) 1020 +Other Sensors | Gravity, Proximity, Light, Vibrator, Gyroscope, Accelerometer ## Device Picture - -![Redmi 3S](http://cdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-3-pro-2.jpg "Redmi 3S") +![Lenovo K6 Power](http://i.imgur.com/lTgLIRg.jpg "Lenovo K6 Power") ## Copyright diff --git a/device.mk b/device.mk index d268c95..29ea70c 100644 --- a/device.mk +++ b/device.mk @@ -15,10 +15,10 @@ # limitations under the License. # -DEVICE_PATH := device/xiaomi/land +DEVICE_PATH := device/lenovo/karate # Inherit proprietary files -$(call inherit-product-if-exists, vendor/xiaomi/land/land-vendor.mk) +$(call inherit-product-if-exists, vendor/lenovo/karate/karate-vendor.mk) # Audio PRODUCT_COPY_FILES += \ @@ -42,4 +42,4 @@ PRODUCT_PACKAGES += \ -include $(DEVICE_PATH)/vendor_prop.mk # Inherit from msm8937-common -$(call inherit-product, device/xiaomi/msm8937-common/msm8937.mk) +$(call inherit-product, device/lenovo/msm8937-common/msm8937.mk) diff --git a/extract-files.sh b/extract-files.sh index 07d9a81..7598e65 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -18,8 +18,8 @@ set -e -DEVICE=land -VENDOR=xiaomi +DEVICE=karate +VENDOR=lenovo # Load extract_utils and do some sanity checks MY_DIR="${BASH_SOURCE%/*}" diff --git a/libinit/init_land.cpp b/libinit/init_karate.cpp similarity index 68% rename from libinit/init_land.cpp rename to libinit/init_karate.cpp index a8d669b..e90d837 100644 --- a/libinit/init_land.cpp +++ b/libinit/init_karate.cpp @@ -52,7 +52,7 @@ void init_target_properties() std::string buf; std::string product = GetProperty("ro.product.name", ""); - if (product.find("land") == std::string::npos) + if (product.find("karate") == std::string::npos) return; fin.open("/proc/cmdline"); @@ -60,24 +60,5 @@ void init_target_properties() if (buf.find("board_id") != std::string::npos) break; fin.close(); - - if (buf.find("S88537AA1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537AA1_V080_M20_MP_XM"); - } else if (buf.find("S88537AB1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537AB1_V080_M20_MP_XM"); - } else if (buf.find("S88537AC1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537AC1_V080_M20_MP_XM"); - } else if (buf.find("S88537BA1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537BA1_V080_M20_MP_XM"); - } else if (buf.find("S88537CA1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537CA1_V080_M20_MP_XM"); - } else if (buf.find("S88537EC1") != std::string::npos) { - property_set("ro.build.display.wtid", "SW_S88537EC1_V080_M20_MP_XM"); - } - - if (buf.find("S88537AB1") != std::string::npos) { - property_set("ro.product.model", "Redmi 3X"); - } else { - property_set("ro.product.model", "Redmi 3S"); - } + property_set("ro.product.model", "Lenovo K6"); } diff --git a/lineage.dependencies b/lineage.dependencies index 21a5ba7..9667b5f 100644 --- a/lineage.dependencies +++ b/lineage.dependencies @@ -1,6 +1,6 @@ [ { - "repository": "android_device_xiaomi_msm8937-common", - "target_path": "device/xiaomi/msm8937-common" + "repository": "android_device_lenovo_msm8937-common", + "target_path": "device/lenovo/msm8937-common" } ] diff --git a/lineage_land.mk b/lineage_karate.mk similarity index 76% rename from lineage_land.mk rename to lineage_karate.mk index 7b37ba0..19e6e7d 100644 --- a/lineage_land.mk +++ b/lineage_karate.mk @@ -26,19 +26,19 @@ $(call inherit-product, vendor/lineage/config/common_full_phone.mk) # Inherit from land device $(call inherit-product, $(LOCAL_PATH)/device.mk) -PRODUCT_BRAND := Xiaomi -PRODUCT_DEVICE := land -PRODUCT_MANUFACTURER := Xiaomi -PRODUCT_NAME := lineage_land +PRODUCT_BRAND := Lenovo +PRODUCT_DEVICE := karate +PRODUCT_MANUFACTURER := Lenovo +PRODUCT_NAME := lineage_karate -PRODUCT_GMS_CLIENTID_BASE := android-xiaomi +PRODUCT_GMS_CLIENTID_BASE := android-lenovo -TARGET_VENDOR_PRODUCT_NAME := land +TARGET_VENDOR_PRODUCT_NAME := karate PRODUCT_BUILD_PROP_OVERRIDES += \ - PRIVATE_BUILD_DESC="land-user 6.0.1 MMB29M V9.6.1.0.MALMIFD release-keys" + PRIVATE_BUILD_DESC="karate-user 6.0.1 MMB29M V9.6.1.0.MALMIFD release-keys" -BUILD_FINGERPRINT := Xiaomi/land/land:6.0.1/MMB29M/V9.6.1.0.MALMIFD:user/release-keys +BUILD_FINGERPRINT := Lenovo/karate/karate:6.0.1/MMB29M/V9.6.1.0.MALMIFD:user/release-keys PRODUCT_SYSTEM_PROPERTY_BLACKLIST += \ ro.product.model diff --git a/setup-makefiles.sh b/setup-makefiles.sh index d6066cb..50c4bea 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -18,8 +18,8 @@ set -e -DEVICE=land -VENDOR=xiaomi +DEVICE=karate +VENDOR=lenovo INITIAL_COPYRIGHT_YEAR=2018