From c2a7d009947f1a51dbd19285a893a09382b8c76a Mon Sep 17 00:00:00 2001 From: Valera1978 Date: Sun, 17 Feb 2019 11:43:20 +0300 Subject: [PATCH] init lineage 16.0 --- lineage.mk => AndroidProducts.mk | 13 +- BoardConfig.mk | 11 +- README.md | 18 +- configs/p2p_supplicant_overlay.conf | 1 + device.mk | 28 ++-- full_viennalte.mk => lineage_viennalte.mk | 10 +- manifest.xml | 9 - .../base/core/res/res/values/config.xml | 5 +- .../lineage/res/res/values/config.xml | 154 ++++++++++++++++++ rootdir/etc/init.qcom.rc | 24 ++- rootdir/etc/init.qcom.usb.rc | 2 + system.prop | 28 ++-- 12 files changed, 226 insertions(+), 77 deletions(-) rename lineage.mk => AndroidProducts.mk (62%) rename full_viennalte.mk => lineage_viennalte.mk (78%) create mode 100755 overlay/lineage-sdk/lineage/res/res/values/config.xml diff --git a/lineage.mk b/AndroidProducts.mk similarity index 62% rename from lineage.mk rename to AndroidProducts.mk index b6aa927..c6eb0cf 100755 --- a/lineage.mk +++ b/AndroidProducts.mk @@ -1,6 +1,5 @@ # -# Copyright (C) 2014-2016 The CyanogenMod Project -# Copyright (C) 2017 The LineageOS Project +# Copyright (C) 2018 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. @@ -13,12 +12,6 @@ # 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 some common LineageOS stuff. -$(call inherit-product, vendor/lineage/config/common_full_phone.mk) - -$(call inherit-product, device/samsung/viennalte/full_viennalte.mk) - -PRODUCT_DEVICE := viennalte -PRODUCT_NAME := lineage_viennalte +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_viennalte.mk diff --git a/BoardConfig.mk b/BoardConfig.mk index 5972b9a..597398b 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -25,7 +25,6 @@ TARGET_OTA_ASSERT_DEVICE := viennalte,viennaltexx # WITH_TWRP := true # Audio -BOARD_HAVE_NEW_QCOM_CSDCLIENT := true USE_CUSTOM_AUDIO_POLICY := 1 # Bluetooth @@ -37,9 +36,6 @@ BOARD_HAVE_SAMSUNG_BLUETOOTH := true # Bootloader TARGET_BOOTLOADER_BOARD_NAME := MSM8974 -# Camera -USE_DEVICE_SPECIFIC_CAMERA := true - # Extended Filesystem Support TARGET_EXFAT_DRIVER := sdfat @@ -66,6 +62,13 @@ TARGET_INIT_VENDOR_LIB := libinit_msm8974 # Legacy BLOB Support TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS := true TARGET_LD_SHIM_LIBS += /system/vendor/lib/hw/camera.vendor.msm8974.so|libshim_camera.so +TARGET_PROCESS_SDK_VERSION_OVERRIDE += \ + /system/bin/mediaserver=22 \ + /system/vendor/bin/mm-qcamera-daemon=22 \ + /system/vendor/bin/hw/rild=27 + +# Lineage Hardware +JAVA_SOURCE_OVERLAYS := org.lineageos.hardware|$(LOCAL_PATH)/lineagehw|**/*.java # Partitions BOARD_FLASH_BLOCK_SIZE := 131072 diff --git a/README.md b/README.md index e815c0b..5feaba1 100755 --- a/README.md +++ b/README.md @@ -19,27 +19,25 @@ Copyright (C) 2017 Valera Chigir - Make a workspace -mkdir cm14 -cd cm14 +mkdir cm16 +cd cm16 - Do repo init & sync -repo init -u git://github.com/LineageOS/android.git -b cm-14.1 +repo init -u git://github.com/LineageOS/android.git -b cm-16.0 - Create .repo/local_manifests/roomservice.xml with the following content: ``` - + - + - - - + ``` @@ -59,7 +57,7 @@ repo sync . build/envsetup.sh - - Build cm14 + - Build cm16 brunch viennalte @@ -67,4 +65,4 @@ or another way: lunch lineage_viennalte-userdebug export USE_CCACHE=1 -make -j10 bacon +make -j16 bacon diff --git a/configs/p2p_supplicant_overlay.conf b/configs/p2p_supplicant_overlay.conf index 37f7a5b..c6d2d78 100755 --- a/configs/p2p_supplicant_overlay.conf +++ b/configs/p2p_supplicant_overlay.conf @@ -1,2 +1,3 @@ disable_scan_offload=1 p2p_search_delay=100 +p2p_no_group_iface=1 \ No newline at end of file diff --git a/device.mk b/device.mk index 940f33a..3041bd3 100755 --- a/device.mk +++ b/device.mk @@ -35,10 +35,6 @@ TARGET_SCREEN_WIDTH := 2560 TARGET_SCREEN_HEIGHT := 1600 TARGET_BOOTANIMATION_HALF_RES := true -$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk) - -$(call inherit-product-if-exists, frameworks/native/build/phone-xxxhdpi-3072-hwui-memory.mk) - # Audio PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/audio/audio_effects.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.conf \ @@ -48,12 +44,7 @@ PRODUCT_COPY_FILES += \ # Camera PRODUCT_PACKAGES += \ - android.hardware.camera.provider@2.4-impl \ - camera.device@1.0-impl \ - camera.msm8974 \ - libshim_camera \ - libxml2 \ - Snap + libshim_camera # Doze PRODUCT_PACKAGES += \ @@ -127,17 +118,22 @@ PRODUCT_PACKAGES += \ macloader PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \ - $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf + $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \ + $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf + +# ADB +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + persist.sys.usb.config=adb \ + ro.adb.secure=0 \ + ro.secure=0 # Root PRODUCT_PACKAGES += \ su -# ADB -PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - persist.sys.usb.config=adb \ - ro.adb.secure=0 +# Root +PRODUCT_PACKAGES += \ + su # common msm8974 $(call inherit-product, device/samsung/msm8974-common/msm8974.mk) diff --git a/full_viennalte.mk b/lineage_viennalte.mk similarity index 78% rename from full_viennalte.mk rename to lineage_viennalte.mk index 896f0e3..30c1fdb 100755 --- a/full_viennalte.mk +++ b/lineage_viennalte.mk @@ -13,14 +13,18 @@ # limitations under the License. # Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) # Inherit from viennalte device $(call inherit-product, device/samsung/viennalte/device.mk) +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + # Set those variables here to overwrite the inherited values. -PRODUCT_NAME := full_viennaltexx -PRODUCT_DEVICE := viennaltexx +PRODUCT_NAME := lineage_viennalte +PRODUCT_DEVICE := viennalte PRODUCT_BRAND := samsung PRODUCT_MANUFACTURER := samsung -PRODUCT_MODEL := viennalte +PRODUCT_MODEL := SM-P905 diff --git a/manifest.xml b/manifest.xml index 1c68ad1..e0de722 100755 --- a/manifest.xml +++ b/manifest.xml @@ -1,13 +1,4 @@ - - android.hardware.camera.provider - passthrough - 2.4 - - ICameraProvider - legacy/0 - - android.hardware.light passthrough diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 1c05819..bab0ec5 100755 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -95,7 +95,10 @@ com.android.systemui/com.android.systemui.doze.DozeService - true + + + true diff --git a/overlay/lineage-sdk/lineage/res/res/values/config.xml b/overlay/lineage-sdk/lineage/res/res/values/config.xml new file mode 100755 index 0000000..42103f5 --- /dev/null +++ b/overlay/lineage-sdk/lineage/res/res/values/config.xml @@ -0,0 +1,154 @@ + + + + + 0 + + + 83 + + + 65 + + + + + + + + + + + + + + diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index d42ad3b..122613e 100755 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -33,6 +33,7 @@ on early-init chmod 0755 /sys/kernel/debug # Increase max readahead size to 512 KB + restorecon --recursive /sys/block/mmcblk0/queue write /sys/block/mmcblk0/queue/read_ahead_kb 512 write /sys/block/mmcblk0/queue/scheduler noop @@ -76,6 +77,9 @@ on post-fs-data mkdir /data/misc/wifi 0770 wifi wifi chmod 0660 /data/misc/wifi/wpa_supplicant.conf mkdir /data/misc/wifi/sockets 0770 wifi wifi + mkdir /data/vendor/wifi 0770 wifi wifi + mkdir /data/vendor/wifi/wpa 0770 wifi wifi + mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi mkdir /data/misc/dhcp 0775 dhcp dhcp @@ -369,14 +373,6 @@ on boot # bcmtch15xxx TSP chown system system /sys/class/input/input0/enabled - # SEC DVFS sysfs node - chown radio system /sys/power/cpufreq_max_limit - chown radio system /sys/power/cpufreq_min_limit - chown radio system /sys/power/cpufreq_table - chmod 664 /sys/power/cpufreq_max_limit - chmod 664 /sys/power/cpufreq_min_limit - chmod 664 /sys/power/cpufreq_table - chown radio system /sys/devices/system/cpu/kernel_max chmod 664 /sys/devices/system/cpu/kernel_max @@ -889,12 +885,10 @@ service qmuxd /vendor/bin/qmuxd group radio audio bluetooth gps oem_2950 log service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ - -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ - -I/system/etc/wifi/p2p_supplicant_overlay.conf \ - -puse_p2p_group_interface=1 \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \ + -g@android:wpa_wlan0 + interface android.hardware.wifi.supplicant@1.0::ISupplicant default + interface android.hardware.wifi.supplicant@1.1::ISupplicant default class main socket wpa_wlan0 dgram 660 wifi wifi disabled @@ -984,6 +978,8 @@ on property:sys.boot_completed=1 # Symlink directories to access telephony.db and preferred-apn.xml required by libsec-ril symlink /data/user_de/0/com.android.providers.telephony/databases /data/data/com.android.providers.telephony/databases symlink /data/user_de/0/com.android.providers.telephony/shared_prefs /data/data/com.android.providers.telephony/shared_prefs + restorecon /data/data/com.android.providers.telephony/databases + restorecon /data/data/com.android.providers.telephony/shared_prefs service charger /charger class charger diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc index 15eeec5..867d712 100755 --- a/rootdir/etc/init.qcom.usb.rc +++ b/rootdir/etc/init.qcom.usb.rc @@ -42,6 +42,8 @@ on fs mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 write /sys/class/android_usb/android0/f_ffs/aliases adb + setprop sys.usb.ffs.aio_compat 1 + # Following are the parameters required for usb functionality. They provide configurable options like # product_id/vendor id and allows specifying required functions: # diff --git a/system.prop b/system.prop index 4cb333d..9c62e63 100755 --- a/system.prop +++ b/system.prop @@ -3,23 +3,31 @@ dalvik.vm.dex2oat-swap=false # Audio af.fast_track_multiplier=1 -audio_hal.period_size=192 -audio.offload.video=true -persist.audio.fluence.speaker=true -persist.audio.fluence.voicecall=true -persist.audio.fluence.voicerec=false -ro.qc.sdk.audio.fluencetype=fluence -use.voice.path.for.pcm.voip=false -use.dedicated.device.for.voip=true audio.deep_buffer.media=true +audio.offload.buffer.size.kb=32 audio.offload.pcm.16bit.enable=true audio.offload.pcm.24bit.enable=true -audio.offload.multiple.enabled=false -audio.offload.buffer.size.kb=32 +audio.offload.video=true +persist.vendor.audio.fluence.speaker=true +persist.vendor.audio.fluence.voicecall=true +persist.vendor.audio.fluence.voicerec=false +ro.vendor.audio.sdk.fluencetype=fluence +vendor.audio.offload.multiple.enabled=false +vendor.audio_hal.period_size=192 +vendor.dedicated.device.for.voip=true +vendor.voice.path.for.pcm.voip=false # Camera camera2.portability.force_api=1 +# Dalvik heap +dalvik.vm.heapstartsize=16m +dalvik.vm.heapgrowthlimit=192m +dalvik.vm.heapsize=512m +dalvik.vm.heaptargetutilization=0.75 +dalvik.vm.heapminfree=2m +dalvik.vm.heapmaxfree=8m + # Display ro.hdcp2.rx=tz ro.qualcomm.cabl=1