From e947b10e9699c80a0b0748893cdcfd6d401c46cf Mon Sep 17 00:00:00 2001 From: dd3boh Date: Thu, 7 Sep 2017 11:59:33 +0200 Subject: z2_plus: Initial Oreo cleanup Signed-off-by: dd3boh --- BoardConfig.mk | 32 +++---------------- XOS.dependencies | 18 ----------- XOS.mk | 44 -------------------------- cmhw/org/cyanogenmod/hardware/KeyDisabler.java | 8 ++--- configs/media_codecs.xml | 2 +- lineage.mk | 41 ++++++++++++++++++++++++ vendorsetup.sh | 5 ++- xoshw/ButtonBacklightControl.java | 30 ------------------ 8 files changed, 52 insertions(+), 128 deletions(-) delete mode 100644 XOS.dependencies delete mode 100644 XOS.mk create mode 100644 lineage.mk delete mode 100644 xoshw/ButtonBacklightControl.java diff --git a/BoardConfig.mk b/BoardConfig.mk index b920b71..80731be 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -22,8 +22,6 @@ # definition file). # -#TARGET_BUILD_VARIANT:=user - TARGET_OTA_ASSERT_DEVICE := z2,Z2,z2plus,z2_plus PLATFORM_PATH := device/zuk/z2_plus @@ -35,19 +33,6 @@ BOARD_VENDOR := zuk # Use Snapdragon LLVM, if available TARGET_USE_SDCLANG := true -# SDclang -LLVM_PREBUILTS_PATH := $(realpath $(TOP))/prebuilts/clang/linux-x86/arm-multiarch-linux-android-llvm-3.8/bin -LLVM_RTLIB_PATH := $(realpath $(TOP))/prebuilts/clang/linux-x86/arm-multiarch-linux-android-llvm-3.8/lib/clang/3.8.2/lib/linux -CLANG := $(LLVM_PREBUILTS_PATH)/clang -CLANG_CXX := $(LLVM_PREBUILTS_PATH)/clang++ -LLVM_AS := $(LLVM_PREBUILTS_PATH)/llvm-as -LLVM_LINK := $(LLVM_PREBUILTS_PATH)/llvm-link - -# Bootanimaion -TARGET_BOOTANIMATION_MULTITHREAD_DECODE := true -TARGET_BOOTANIMATION_PRELOAD := true -TARGET_BOOTANIMATION_TEXTURE_CACHE := true - # Bootloader TARGET_BOOTLOADER_BOARD_NAME := msm8996 TARGET_NO_BOOTLOADER := true @@ -64,16 +49,15 @@ TARGET_ARCH := arm64 TARGET_ARCH_VARIANT := armv8-a TARGET_CPU_ABI := arm64-v8a TARGET_CPU_ABI2 := -TARGET_CPU_VARIANT := kryo +TARGET_CPU_VARIANT := generic TARGET_2ND_ARCH := arm TARGET_2ND_ARCH_VARIANT := armv7-a-neon TARGET_2ND_CPU_ABI := armeabi-v7a TARGET_2ND_CPU_ABI2 := armeabi -TARGET_2ND_CPU_VARIANT := kryo +TARGET_2ND_CPU_VARIANT := krait ENABLE_CPUSETS := true - TARGET_USES_64_BIT_BINDER := true @@ -83,9 +67,7 @@ BOARD_KERNEL_CMDLINE := \ ehci-hcd.park=3 \ lpm_levels.sleep_disabled=1 \ cma=32M@0-0xffffffff \ - androidboot.selinux=enforcing \ - androidboot.verifiedbootstate=green \ - androidboot.veritymode=enforcing + androidboot.selinux=permissive BOARD_KERNEL_BASE := 0x80000000 BOARD_KERNEL_PAGESIZE := 4096 BOARD_KERNEL_TAGS_OFFSET := 0x00000100 @@ -176,9 +158,6 @@ TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true VSYNC_EVENT_PHASE_OFFSET_NS := 2000000 SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000 -# Enable dexpreopt to speed boot time -# WITH_DEXPREOPT := true - # Init TARGET_INIT_VENDOR_LIB := libinit_z2_plus TARGET_RECOVERY_DEVICE_MODULES := libinit_z2_plus @@ -210,9 +189,8 @@ TARGET_USERIMAGES_USE_EXT4 := true TARGET_USERIMAGES_USE_F2FS := true # SELinux -include device/qcom/sepolicy/sepolicy.mk - -BOARD_SEPOLICY_DIRS += $(PLATFORM_PATH)/sepolicy +# include device/qcom/sepolicy/sepolicy.mk +# BOARD_SEPOLICY_DIRS += $(PLATFORM_PATH)/sepolicy # Sensors USE_SENSOR_MULTI_HAL := true diff --git a/XOS.dependencies b/XOS.dependencies deleted file mode 100644 index d6cff5a..0000000 --- a/XOS.dependencies +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "repository": "android_kernel_zuk_msm8996", - "target_path": "kernel/zuk/msm8996", - "branch": "staging/noog-caf" - }, - { - "repository": "android_vendor_zuk_z2_plus", - "target_path": "vendor/zuk/z2_plus", - "branch": "n7x-caf" - }, - { - "repository": "android_prebuilts_clang_linux-x86_arm-multiarch-linux-android-llvm-3.8", - "target_path": "prebuilts/clang/linux-x86/arm-multiarch-linux-android-llvm-3.8", - "remote": "XOS", - "branch": "XOS-7.1" - } -] diff --git a/XOS.mk b/XOS.mk deleted file mode 100644 index ad07096..0000000 --- a/XOS.mk +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (C) 2013-2016, The CyanogenMod Project -# Copyright (C) 2017, The LineageOS Project -# Copyright (C) 2017 The halogenOS 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. - -# Inherit from those products. Most specific first. -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) - -# Inherit from z2_plus device -$(call inherit-product, device/zuk/z2_plus/device.mk) - -# Inherit some common halogenOS stuff. -$(call inherit-product, vendor/xos/config/common.mk) - -PRODUCT_NAME := XOS_z2_plus -PRODUCT_DEVICE := z2_plus -PRODUCT_MANUFACTURER := ZUK -PRODUCT_BRAND := ZUK -PRODUCT_MODEL := Z2 Plus - -PRODUCT_GMS_CLIENTID_BASE := android-zuk - -TARGET_VENDOR_PRODUCT_NAME := z2_plus -TARGET_VENDOR_DEVICE_NAME := z2_plus -PRODUCT_BUILD_PROP_OVERRIDES += TARGET_DEVICE=z2_plus PRODUCT_NAME=z2_plus - -TARGET_VENDOR := zuk - -# Fingerprint -PRODUCT_BUILD_PROP_OVERRIDES += \ - BUILD_FINGERPRINT="ZUK/z2_plus/z2_plus:7.0/NRD90M/2.5.412_170428:user/release-keys" \ - PRIVATE_BUILD_DESC="z2_plus-user 7.0 NRD90M 2.5.412_170428 release-keys" diff --git a/cmhw/org/cyanogenmod/hardware/KeyDisabler.java b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java index cce3ed1..125bc32 100644 --- a/cmhw/org/cyanogenmod/hardware/KeyDisabler.java +++ b/cmhw/org/cyanogenmod/hardware/KeyDisabler.java @@ -16,7 +16,7 @@ package org.cyanogenmod.hardware; -import org.halogenos.io.FileUtils; +import org.cyanogenmod.internal.util.FileUtils; /* * Disable capacitive keys @@ -27,8 +27,6 @@ import org.halogenos.io.FileUtils; * otherwise visible-when-inactive keys */ -import java.io.File; - public class KeyDisabler { private static String CONTROL_PATH = "/sys/devices/soc/soc:fpc1020/utouch_disable"; @@ -38,10 +36,10 @@ public class KeyDisabler { } public static boolean isActive() { - return FileUtils.readString(new File(CONTROL_PATH), true).equals("1"); + return FileUtils.readOneLine(CONTROL_PATH).equals("1"); } public static boolean setActive(boolean state) { - return FileUtils.writeString(CONTROL_PATH, (state ? "1" : "0")); + return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); } } diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml index 6e2d41e..a2cca69 100644 --- a/configs/media_codecs.xml +++ b/configs/media_codecs.xml @@ -408,5 +408,5 @@ Only the three quirks included above are recognized at this point: - + diff --git a/lineage.mk b/lineage.mk new file mode 100644 index 0000000..a860e38 --- /dev/null +++ b/lineage.mk @@ -0,0 +1,41 @@ +# Copyright (C) 2013-2016, The CyanogenMod Project +# Copyright (C) 2017, The LineageOS 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. + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit from z2_plus device +$(call inherit-product, device/zuk/z2_plus/device.mk) + +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +# Device identifier. This must come after all inclusions. +PRODUCT_NAME := lineage_z2_plus +PRODUCT_DEVICE := z2_plus +PRODUCT_BRAND := Zuk +PRODUCT_MODEL := Z2 Plus +PRODUCT_MANUFACTURER := Zuk +PRODUCT_GMS_CLIENTID_BASE := android-zuk + +# Fingerprint +PRODUCT_BUILD_PROP_OVERRIDES += \ + TARGET_DEVICE="z2_plus" \ + PRODUCT_NAME="z2_plus" \ + BUILD_FINGERPRINT="ZUK/z2_plus/z2_plus:7.0/NRD90M/2.5.412_170428:user/release-keys" \ + PRIVATE_BUILD_DESC="z2_plus-user 7.0 NRD90M 2.5.412_170428 release-keys" + +TARGET_VENDOR := Zuk diff --git a/vendorsetup.sh b/vendorsetup.sh index 071e683..25892fe 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -1,3 +1,2 @@ -add_lunch_combo XOS_z2_plus-user -add_lunch_combo XOS_z2_plus-userdebug -add_lunch_combo XOS_z2_plus-eng +add_lunch_combo lineage_z2_plus-userdebug +add_lunch_combo lineage_z2_plus-eng diff --git a/xoshw/ButtonBacklightControl.java b/xoshw/ButtonBacklightControl.java deleted file mode 100644 index 2401fe0..0000000 --- a/xoshw/ButtonBacklightControl.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2016-2017 halogenOS - * - * 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. - */ - -package org.halogenos.hardware.buttons; - -import org.halogenos.hardware.buttons.IButtonBacklightControl; - -/** - * This class is supposed to control button backlight - */ -public class ButtonBacklightControl extends IButtonBacklightControl { - - public ButtonBacklightControl() { - CONTROL_TYPE = CONTROL_TYPE_NONE; - } - -} -- cgit v1.2.3