Compare commits

...

37 Commits

Author SHA1 Message Date
Pierre-Hugues HUSSON
50a598c339
Merge pull request #134 from jpourmalek/android-8.1
Update phhgsi_arm64_a system.img size to match Huawei P9 Android 8.1
2019-12-12 00:18:43 +01:00
jpourmalek
93abd86dac
Update phhgsi_arm64_a system.img size to match Huawei P9 Android 8.1 2019-11-01 00:41:30 +03:30
Pierre-Hugues Husson
5a9c96ec32 Be compatible with AOSP master BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
In that case, don't enforce system image size
We will need to implement after build checks to ensure we still work on
older devices
2019-06-10 10:43:41 +02:00
Pierre-Hugues HUSSON
b9a1e2ec5c
Merge pull request #100 from wangpy/fix-arm_a-system-image-size
Decrease system partition size for arm_a images so it fits in for more devices.
2019-04-18 21:41:17 +02:00
Brian Wang
4299615fed Decrease system partition size for arm_a images so it fits in for more devices 2019-04-18 08:40:28 +00:00
Pierre-Hugues Husson
e17d1dd03b Force onUssdFinished on MTK RIL 2019-04-02 23:10:20 +02:00
Pierre-Hugues Husson
d5356ee268 Include sim toolkit 2019-03-14 13:00:51 +01:00
Pierre-Hugues Husson
3772908b38 Fix incoming SMS and mobile data on MT6379 2019-02-27 17:09:10 +01:00
Pierre-Hugues HUSSON
ea419e9266
Merge pull request #94 from suwakowww/sync-changes
Sync some fixes for 8.1 tree
2019-02-13 10:45:59 +00:00
suwakowww
242ad2b8dd change "perseus" to "sakura"
Perseus start on 9.0, seems no need this fix.  And seems sakura need this fix too, because daisy applied.
2019-02-13 14:10:48 +08:00
suwakowww
8165b69e2c Sync some fixes for 8.1 tree 2019-02-13 13:48:02 +08:00
Pierre-Hugues Husson
4ca7363d39 Bigger system partition for arm 2019-01-08 10:21:27 +01:00
Pierre-Hugues HUSSON
e7ca75151b
Merge pull request #66 from milankragujevic/android-8.1
Fix RIL on MTK for more devices and Bootanimation on Oreo GSI
2019-01-07 23:30:34 +01:00
Pierre-Hugues Husson
313c678c18 Add phhgsi_a64_a for arm32 devices with 64bits binder 2019-01-07 22:11:39 +01:00
Pierre-Hugues Husson
5570b50a52 Samsung has two android.hardware.power HAL. Take appropriate one.
Samsung includes both stock AOSP android.hardware.power service, and
their own vendor.samsung.hardware.miscpower.

Since the two HALs define the same full-qualified name, hwservicemanager
takes whichever comes last.

Using proper power HAL is needed for Samsung device to have proper sleep
of the touchscreen, and better power handling.
2019-01-07 21:59:02 +01:00
Pierre-Hugues HUSSON
26514452f0
Merge pull request #72 from jamuir/android-8.1
fix audio jack on LG G7 and V40
2018-12-21 18:57:48 +01:00
James Muir
2cd74842ae Make audio jack work on LG V40 ThinQ
(cherry picked from commit b0ddf1a61d)
2018-12-21 12:21:42 -05:00
Pierre-Hugues Husson
898773be18 Add LG G7 Thinq for dev input jack
(cherry picked from commit 1d4c8d2860)
2018-12-21 12:21:28 -05:00
James Muir
9e83890d87 Fix module name
GoogleHome was renamed to GoogleNow.

  https://github.com/opengapps/aosp_build/commit/111a2743
2018-12-19 08:17:37 +01:00
Milan Kragujević
887436270d
Merge pull request #1 from milankragujevic/milankragujevic-patch-1
Fix bootanimation on Oreo GSIs
2018-11-28 12:32:37 +01:00
Milan Kragujević
bb8623c559
Fix bootanimation on Oreo GSIs 2018-11-28 12:32:13 +01:00
Milan Kragujević
d69d0ee67b
Add libmtk-ril.so to AT+EAIC patch in rw-sytem.sh 2018-11-28 12:31:24 +01:00
James Muir
44de60f56c Add missing "="
Fix the base64 encoded of the x509 cert for Google Webview.

You can check this by doing a base64-decode and then using openssl:

  openssl x509 -in gwv.der -inform DER -text -noout
2018-10-10 10:31:30 +02:00
Pablo
9ece067361 Ignore vendor SysuiDarkThemeOverlay.apk
Fixes buggy dark theme on jasmine
2018-09-28 19:23:56 +02:00
Pierre-Hugues Husson
b27a9affd2 Allow to add multiple inherit entries 2018-09-05 11:09:33 +02:00
Pierre-Hugues Husson
3e0f024cad Include Xiaomi Mi 6X in 12bits backlight devices 2018-09-05 11:07:50 +02:00
Pierre-Hugues Husson
afff20d8a4 Disable fingerprint buttons on Mi Mix 2S (cf bug #144) 2018-09-05 11:07:42 +02:00
Pierre-Hugues Husson
b01ca6ae48 Override keylayouts on S9/Note9 to include assistant button, and hard press on home to wake up 2018-09-05 11:07:37 +02:00
Pierre-Hugues Husson
bdbd72c7da Fix FDE + MTK RIL fix 2018-08-29 20:38:16 +02:00
Pierre-Hugues Husson
99d0cda107 Fix MTK RIL by disablimg IMS and EPDG
This isn't ideal from a user point-of-view because the device will
reboot on first boot.

Thanks a lot @Dinolek !
2018-08-29 20:38:11 +02:00
Pierre-Hugues Husson
4ba8184713 Edit mtk-ril to fix incoming call
https://github.com/phhusson/treble_experimentations/issues/57#issuecomment-416998086
2018-08-29 18:38:36 +02:00
Pierre-Hugues Husson
e4185d0cb0 Add brightness fix for mipad 4 2018-08-29 18:38:31 +02:00
AndroPlus
006a105a32 Add hack to fix Bluetooth audio on LineageOS-based custom roms
thanks bgcngm
2018-08-28 00:06:32 +02:00
Pierre-Hugues Husson
7e339c7b92 empty mount vendor's dark theme 2018-08-27 10:26:59 +02:00
Pierre-Hugues Husson
76abd6cb76 Some devices declare boot hal, but doesn't have it. Put bootctl at the end until I get a better fix 2018-08-27 10:26:55 +02:00
Pierre-Hugues Husson
85658e55b3 Add option to pass a path to an mk in generate.sh 2018-08-27 10:26:34 +02:00
James Muir
ddd243d375 Trivial. Drop extra "libion.so"
the library libion.so is already listed.
2018-08-08 20:02:58 +02:00
21 changed files with 207 additions and 13 deletions

1
Android.bp Normal file
View File

@ -0,0 +1 @@
subdirs = [ "cmds" ]

11
base.mk
View File

@ -71,3 +71,14 @@ PRODUCT_COPY_FILES += \
device/phh/treble/twrp/twrp.rc:system/etc/init/twrp.rc \
device/phh/treble/twrp/twrp.sh:system/bin/twrp.sh \
device/phh/treble/twrp/busybox-armv7l:system/bin/busybox_phh
PRODUCT_COPY_FILES += \
device/phh/treble/files/samsung-gpio_keys.kl:system/phh/samsung-gpio_keys.kl \
device/phh/treble/files/samsung-sec_touchscreen.kl:system/phh/samsung-sec_touchscreen.kl
#MTK incoming SMS fix
PRODUCT_PACKAGES += \
mtk-sms-fwk-ready
PRODUCT_PACKAGES += \
Stk

14
cmds/Android.bp Normal file
View File

@ -0,0 +1,14 @@
cc_binary {
name: "mtk-sms-fwk-ready",
srcs: [
"mtk-sms-fwk-ready.cpp",
],
shared_libs: [
"vendor.mediatek.hardware.radio@2.6",
"libutils",
"libhidlbase",
],
init_rc: [
"mtk-sms-fwk-ready.rc"
],
}

View File

@ -0,0 +1,12 @@
#include <iostream>
#include <unistd.h>
#include <vendor/mediatek/hardware/radio/2.6/IRadio.h>
using ::vendor::mediatek::hardware::radio::V2_6::IRadio;
using ::android::sp;
int main(int argc, char **argv) {
auto svc = IRadio::getService(argv[1]);
svc->setSmsFwkReady(1);
}

View File

@ -0,0 +1,3 @@
on property:sys.boot_completed=1
exec u:r:phhsu_daemon:s0 root -- /system/bin/mtk-sms-fwk-ready slot1
exec u:r:phhsu_daemon:s0 root -- /system/bin/mtk-sms-fwk-ready slot2

View File

@ -0,0 +1,11 @@
# Copyright (C) 2018 The LineageOS Project
# SPDX-License-Identifier: Apache-2.0
key 114 VOLUME_DOWN
key 115 VOLUME_UP
key 116 POWER
key 703 ASSIST
key 103 SYSTEM_NAVIGATION_UP
key 105 SYSTEM_NAVIGATION_LEFT
key 106 SYSTEM_NAVIGATION_RIGHT
key 108 SYSTEM_NAVIGATION_DOWN

View File

@ -0,0 +1,29 @@
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
key 172 WAKEUP

View File

@ -16,7 +16,7 @@ PRODUCT_PACKAGES += \
CalculatorGoogle \
PrebuiltDeskClockGoogle \
CalendarGooglePrebuilt \
GoogleHome \
GoogleNow \
LatinImeGoogle \
phh-overrides

View File

@ -2,14 +2,21 @@
rom_script=''
if [ -n "$1" ];then
rom_script='$(call inherit-product, device/phh/treble/'$1'.mk)'
if echo "$1" | grep -qF /;then
rom_script=''
for i in "$@";do
rom_script="$rom_script"$'\n''$(call inherit-product, '$i')'
done
else
rom_script='$(call inherit-product, device/phh/treble/'$1'.mk)'
fi
fi
echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk
for part in a ab;do
for apps in vanilla gapps foss gapps-go;do
for arch in arm64 arm;do
for arch in arm64 arm a64;do
for su in yes no;do
apps_suffix=""
apps_script=""
@ -36,9 +43,12 @@ for part in a ab;do
apps_script=''
apps_name="vanilla"
fi
if [ "$arch" == "arm" ];then
vndk="vndk-binder32.mk"
fi
if [ "$arch" == "arm" ];then
vndk="vndk-binder32.mk"
fi
if [ "$arch" == "a64" ];then
vndk="vndk32.mk"
fi
su_suffix='N'
if [ "$su" == "yes" ];then

View File

@ -71,7 +71,7 @@ namespace.sphal.links = default,vndk,rs
namespace.sphal.link.default.shared_libs = libc.so:libm.so:libdl.so:libstdc++.so:liblog.so:libnativewindow.so:libEGL.so:libsync.so:libGLESv1_CM.so:libGLESv2.so:libvndksupport.so:libz.so
# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line.
namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so:android.hidl.base@1.0.so:libion.so
namespace.sphal.link.vndk.shared_libs = android.hardware.renderscript@1.0.so:android.hardware.graphics.allocator@2.0.so:android.hardware.graphics.mapper@2.0.so:android.hardware.graphics.common@1.0.so:android.hidl.memory@1.0.so:libhwbinder.so:libbase.so:libcutils.so:libhardware.so:libhidlbase.so:libhidlmemory.so:libhidltransport.so:libion.so:libutils.so:libc++.so:android.hidl.base@1.0.so
# Renderscript gets separate namespace
namespace.sphal.link.rs.shared_libs = libRS_internal.so

View File

@ -29,7 +29,7 @@
<signature>MIIDxzCCAq+gAwIBAgIJAML7APITsgV7MA0GCSqGSIb3DQEBBQUAMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEWMBQGA1UEAwwNY2hyb21lX2NhbmFyeTAeFw0xNjAyMjkxOTA5MDdaFw00MzA3MTcxOTA5MDdaMHoxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEWMBQGA1UEAwwNY2hyb21lX2NhbmFyeTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANXfeAoZlr0ya1HBzIfAz/nLLjpPJeAPvuX5dueaxmiQgv2hNG22acriFuiiJI6TU0t8AIVJD5Ifbc4OOuA0zeFhdzWWGnmTRH6x27WI7bzOKnAqOvv21ZBmE9i8Vo++K13xWdTs3qVn1bn9oUONxFu0wKDzXYZhoj1Jom0RZGjXm16xuPlEuOzMcjiNBDoYuxPAXkMcK/G1gP4P4nAV8Rd/GGIjKRS/SUtcShhoAMOQhs4WIEkUrvEVRwhBDIbpM87oFbCVdBH38r0XS6F6CdhPJsKFhoEfq4c01HZqNmDpCPA8AAcCuSWqmXoTIqs7OqkWgduE2bInbWU7WMaTl+kCAwEAAaNQME4wHQYDVR0OBBYEFB/AsC4iPAqaLoNytNSx29qByI7+MB8GA1UdIwQYMBaAFB/AsC4iPAqaLoNytNSx29qByI7+MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAMb2Td3ro/+MGVnCPAbwBSOZMVLUKGqt6zr8CShW9mtFHnmy29EaWSYYAj1M4+6Vpkq85NsgBEck7rnUjV8A3Q0NKdTys1KRKJqVvQRBN6SwqQenSf/abxQCa8Z+69rh+3BkIU1HLtu5lrMDZwon5H91L5mpORn6vItd20uW132lwSDeUEW2CHslTrodoFuTUcSUlRiq/URfUH3baO1QHXkxpQwrBPKL5deJfcZnxh5MAtAGSQL7gHvayEFlDppETXdDO7vgGTH2dEK2TjKWALbGiKkxSqjRyTNt4/FOj10TqNRdUamj+ydVJgzGQ8bki4Vc6NnKm/r4asusxapkVR4=</signature>
</webviewprovider>
<webviewprovider description="Google WebView" packageName="com.google.android.webview" availableByDefault="true">
<signature>MIIDuzCCAqOgAwIBAgIJANi6DgBQG4ZTMA0GCSqGSIb3DQEBBQUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDAp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EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAEQu8QiVxax7/diEiJrgKE1LwdXsIygJK/KnaKdnYEkAQpeu/QmrLiycm+OFbL1qHJIB7OuI/PQBUtcaNSiJSCVgtwtEbZWWIdsynqG/Nf4aGOndXegSQNRH54M05sRHLoeRycPrY7xQlEwGikNFR76+5UdwFBQI3Gn22g6puJnVukQm/wXQ+ajoiS4QclrNlixoDQsZ4STLH4+Wju2wIWKFFArIhVEIlbamq+p6BghuzH3aIz/Fy0YTQKi7SA+0fuNeCaqlSm5pYSt6p5CH89y1Fr+wFc5r3iLRnUwRcy08ESC7bZJnxV3d/YQ5valTxBbzku/dQbXVj/xg69H8l8M=</signature>
</webviewprovider>
<!-- The default WebView implementation -->
<webviewprovider description="AOSP WebView" packageName="com.android.webview" availableByDefault="true" isFallback="true" />

View File

@ -1,7 +1,12 @@
#!/system/bin/sh
if grep -qF android.hardware.boot /vendor/manifest.xml;then
bootctl mark-boot-successful
[ "$(getprop vold.decrypt)" == "trigger_restart_min_framework" ] && exit 0
if [ -f /vendor/bin/mtkmal ];then
if [ "$(getprop persist.mtk_ims_support)" == 1 -o "$(getprop persist.mtk_epdg_support)" == 1 ];then
setprop persist.mtk_ims_support 0
setprop persist.mtk_epdg_support 0
reboot
fi
fi
#Clear looping services
@ -12,3 +17,7 @@ getprop | \
while read svc ;do
setprop ctl.stop $svc
done
if grep -qF android.hardware.boot /vendor/manifest.xml;then
bootctl mark-boot-successful
fi

View File

@ -0,0 +1,7 @@
include build/make/target/board/generic_arm_a/BoardConfig.mk
include device/phh/treble/board-base.mk
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1572864000
endif
TARGET_USES_64_BIT_BINDER := true

View File

@ -1,4 +1,6 @@
include build/make/target/board/generic_arm64_a/BoardConfig.mk
include device/phh/treble/board-base.mk
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2080374784
endif

View File

@ -1,4 +1,6 @@
include build/make/target/board/generic_arm64_ab/BoardConfig.mk
include device/phh/treble/board-base.mk
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648
endif

View File

@ -1,4 +1,6 @@
include build/make/target/board/generic_arm_a/BoardConfig.mk
include device/phh/treble/board-base.mk
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1056964608
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1313583104
endif

View File

@ -1,4 +1,6 @@
include build/make/target/board/generic_arm_ab/BoardConfig.mk
include device/phh/treble/board-base.mk
ifeq ($(BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE),)
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824
endif

View File

@ -40,6 +40,37 @@ fixSPL() {
fi
}
changeKeylayout() {
cp -a /system/usr/keylayout /mnt/phh/keylayout
changed=false
if getprop ro.vendor.build.fingerprint | \
grep -qE -e ".*(crown|star)[q2]*lte.*" -e ".*(SC-0[23]K|SCV3[89]).*";then
changed=true
cp /system/phh/samsung-gpio_keys.kl /mnt/phh/keylayout/gpio_keys.kl
cp /system/phh/samsung-sec_touchscreen.kl /mnt/phh/keylayout/sec_touchscreen.kl
chmod 0644 /mnt/phh/keylayout/gpio_keys.kl /mnt/phh/keylayout/sec_touchscreen.kl
fi
if getprop ro.vendor.build.fingerprint |grep -iq \
-e xiaomi/polaris -e xiaomi/sirius -e xiaomi/dipper \
-e xiaomi/wayne -e xiaomi/jasmine -e xiaomi/jasmine_sprout \
-e xiaomi/platina -e xiaomi/sakura -e xiaomi/ysl \
-e xiaomi/nitrogen -e xiaomi/daisy;then
cp /system/phh/empty /mnt/phh/keylayout/uinput-goodix.kl
chmod 0644 /mnt/phh/keylayout/uinput-goodix.kl
cp /system/phh/empty /mnt/phh/keylayout/uinput-fpc.kl
chmod 0644 /mnt/phh/keylayout/uinput-fpc.kl
changed=true
fi
if [ "$changed" == true ];then
mount -o bind /mnt/phh/keylayout /system/usr/keylayout
restorecon -R /system/usr/keylayout
fi
}
if mount -o remount,rw /system;then
resize2fs $(grep ' /system ' /proc/mounts |cut -d ' ' -f 1) || true
elif mount -o remount,rw /;then
@ -48,7 +79,13 @@ fi
mount -o remount,ro /system || true
mount -o remount,ro / || true
mkdir -p /mnt/phh/
mount -t tmpfs -o rw,nodev,relatime,mode=755,gid=0 none /mnt/phh || true
set +e
fixSPL
set -e
changeKeylayout
if grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml;then
mount -o bind system/phh/huawei/fingerprint.kl /vendor/usr/keylayout/fingerprint.kl
@ -87,3 +124,41 @@ if grep -qF 'mkdir /data/.fps 0770 system fingerp' vendor/etc/init/hw/init.mmi.r
chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq
chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq_cnt
fi
if getprop ro.vendor.build.fingerprint |grep -q -i \
-e xiaomi/clover -e xiaomi/wayne -e xiaomi/sakura \
-e xiaomi/nitrogen -e xiaomi/whyred -e xiaomi/platina \
-e xiaomi/ysl;then
setprop persist.sys.qcom-brightness $(cat /sys/class/leds/lcd-backlight/max_brightness)
fi
if getprop ro.vendor.build.fingerprint |grep -q -i -e xiaomi/wayne -e xiaomi/jasmine;then
setprop persist.imx376_sunny.low.lux 310
setprop persist.imx376_sunny.light.lux 280
setprop persist.imx376_ofilm.low.lux 310
setprop persist.imx376_ofilm.light.lux 280
fi
for f in /vendor/lib/mtk-ril.so /vendor/lib64/mtk-ril.so /vendor/lib/libmtk-ril.so /vendor/lib64/libmtk-ril.so;do
[ ! -f $f ] && continue
ctxt="$(ls -lZ $f |grep -oE 'u:object_r:[^:]*:s0')"
b="$(echo "$f"|tr / _)"
cp -a $f /mnt/phh/$b
sed -i \
-e 's/AT+EAIC=2/AT+EAIC=3/g' \
/mnt/phh/$b
chcon "$ctxt" /mnt/phh/$b
mount -o bind /mnt/phh/$b $f
setprop persist.sys.phh.radio.force_cognitive true
setprop persist.sys.radio.ussd.fix true
done
mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk || true
mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkThemeOverlay.apk || true
#If we have both Samsung and AOSP power hal, take Samsung's
if [ -f /vendor/bin/hw/vendor.samsung.hardware.miscpower@1.0-service ];then
mount -o bind /system/phh/empty /vendor/bin/hw/android.hardware.power@1.0-service
fi

1
sepolicy/bootanim.te Normal file
View File

@ -0,0 +1 @@
allow bootanim gpu_device:dir r_dir_perms;

View File

@ -24,7 +24,7 @@ if [ -n "$FOUND_HUAWEI" ];then
setprop debug.hwui.profile true
fi
if getprop ro.hardware |grep -qiE qcom;then
if getprop ro.hardware |grep -qiE -e qcom -e judyln -e judypn;then
FOUND_QCOM=1
setprop persist.sys.overlay.devinputjack true
fi

View File

@ -4,6 +4,9 @@ on post-fs
mount none /system/etc/usb_audio_policy_configuration.xml /vendor/etc/usb_audio_policy_configuration.xml bind
export LD_CONFIG_FILE /system/etc/ld.config.${persist.sys.vndk}.txt
# HACK to fix Bluetooth audio on custom roms
mount none /vendor/lost+found /vendor/etc/audio bind
service phh_on_boot /system/bin/phh-on-boot.sh
oneshot
disabled