Compare commits

...

18 Commits

Author SHA1 Message Date
Pierre-Hugues HUSSON
54d34268cb
Merge pull request #273 from guylamar2006/patch-1
Rename resetprop to resetprop_phh to prevent conflict with Magisk
2021-09-02 00:16:11 +02:00
guylamar2006
1e665496d2
Magisk
Changed resetprop to resetprop_phh to prevent conflict with Magisk.
2021-09-01 16:38:15 -05:00
guylamar2006
de8249361f
Magisk
Changed resetprop to resetprop_phh to prevent conflict with Magisk.
2021-09-01 16:32:14 -05:00
guylamar2006
98245d8427
Magisk
Renamed to setprop_phh to prevent conflict with Magisk.
2021-09-01 14:13:49 -05:00
Pierre-Hugues HUSSON
51964b08c2
Merge pull request #247 from TTTT555/patch-1
begonia: Drop deprecated props
2021-05-01 22:07:08 +02:00
TTTT555
9d3d8de412
begonia: Drop deprecated props
* these fixes are not needed since A10/A11 vendor (and only cause errors)
2021-05-01 21:13:59 +02:00
Pierre-Hugues HUSSON
1ddbcc1216
Merge pull request #224 from DarkJoker360/10-emui9-fp
Address Huawei fingerprint denials
2021-01-22 10:52:41 +01:00
DarkJoker360
207d758a4f Address Huawei fingerprint denials
* Fixes fingerprint enrollment issues on P vendor devices.
2021-01-22 10:42:34 +01:00
Pierre-Hugues HUSSON
0bf2de0b26
Merge pull request #214 from eremitein/merlin
tweaks for Xiaomi Redmi Note 9 'merlin'
2020-10-17 23:12:15 +02:00
Victor Bo
4f5c4420f4 tweaks for Xiaomi Redmi Note 9 'merlin'
audiojack, brightness, fp touches
  (thanks Akitake for reports)
2020-10-17 14:58:29 -04:00
Pierre-Hugues Husson
1be7bd1bb1 Fix CAF audio policy on non-boot 2020-10-13 17:20:26 +02:00
Pierre-Hugues HUSSON
3705999a82
Merge pull request #209 from eremitein/redmi9
Redmi9 need uinput trick
2020-10-07 20:55:13 +02:00
Victor Bo
7370ee9c1b Redmi9 need uinput trick 2020-10-07 14:14:42 -04:00
Pierre-Hugues Husson
9a2b982b7f Some devices require their vendor mounted to /persist even if fstab says otherwise
See https://github.com/phhusson/treble_experimentations/issues/668
2020-10-05 22:14:32 +02:00
Pierre-Hugues Husson
768afc3cbe Fix A2DP on some Qualcomm Q vendors by disable A2DP offload harder
Also there is a mismatch between framework which expects property to be
false/true and treble app setting it to 0/1
2020-10-02 20:05:58 +02:00
Pierre-Hugues Husson
51f9d61755 Looks like Samsung FODs are calibrated at 319 nits, not max brightness 2020-09-29 00:19:35 +02:00
Pierre-Hugues HUSSON
57029e924a
Merge pull request #204 from LooKeR-learner/android-10.0
Fix jack on realme 6
2020-09-25 13:39:38 +00:00
Mohit
106e66d123
Update rw-system.sh 2020-09-25 17:38:51 +05:30
5 changed files with 52 additions and 30 deletions

View File

@ -151,7 +151,7 @@ PRODUCT_PACKAGES += \
Stk
PRODUCT_PACKAGES += \
resetprop
resetprop_phh
PRODUCT_COPY_FILES += \
device/phh/treble/phh-securize.sh:system/bin/phh-securize.sh \
device/phh/treble/files/ota.sh:system/bin/ota.sh \

View File

@ -106,9 +106,9 @@ if [ "$1" == "persist.sys.phh.disable_audio_effects" ];then
fi
if [[ "$prop_value" == 1 ]];then
resetprop ro.audio.ignore_effects true
resetprop_phh ro.audio.ignore_effects true
else
resetprop --delete ro.audio.ignore_effects
resetprop_phh --delete ro.audio.ignore_effects
fi
restartAudio
exit
@ -120,6 +120,7 @@ if [ "$1" == "persist.sys.phh.caf.audio_policy" ];then
fi
if [[ "$prop_value" == 1 ]];then
umount /vendor/etc/audio
umount /vendor/etc/audio
mount /vendor/etc/audio/audio_policy_configuration.xml /vendor/etc/audio_policy_configuration.xml
else

View File

@ -10,7 +10,7 @@ vndk="$(getprop persist.sys.vndk)"
[ -z "$vndk" ] && vndk="$(getprop ro.vndk.version |grep -oE '^[0-9]+')"
if [ "$vndk" = 26 ];then
resetprop ro.vndk.version 26
resetprop_phh ro.vndk.version 26
fi
setprop sys.usb.ffs.aio_compat true
@ -89,8 +89,8 @@ changeKeylayout() {
-e xiaomi/wayne -e xiaomi/jasmine -e xiaomi/jasmine_sprout \
-e xiaomi/platina -e iaomi/perseus -e xiaomi/ysl -e Redmi/begonia\
-e xiaomi/nitrogen -e xiaomi/sakura -e xiaomi/andromeda \
-e xiaomi/whyred -e xiaomi/tulip -e xiaomi/onc \
-e redmi/curtana -e redmi/picasso; then
-e xiaomi/whyred -e xiaomi/tulip -e xiaomi/onc -e Redmi/merlin \
-e redmi/curtana -e redmi/picasso -e redmi/galahad; then
if [ ! -f /mnt/phh/keylayout/uinput-goodix.kl ]; then
cp /system/phh/empty /mnt/phh/keylayout/uinput-goodix.kl
chmod 0644 /mnt/phh/keylayout/uinput-goodix.kl
@ -299,16 +299,22 @@ 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 -e nubia/nx60 -e nubia/nx61 -e xiaomi/tulip -e Redmi/begonia\
-e xiaomi/nitrogen -e xiaomi/whyred -e xiaomi/platina -e Redmi/merlin \
-e xiaomi/ysl -e nubia/nx60 -e nubia/nx61 -e xiaomi/tulip \
-e xiaomi/lavender -e xiaomi/olive -e xiaomi/olivelite -e xiaomi/pine; then
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
fi
#Xiaomi Redmi Note 9
if getprop ro.vendor.build.fingerprint |grep -qi -e Redmi/merlin; then
setprop persist.sys.overlay.devinputjack true
fi
#Realme 6
if getprop ro.vendor.product.device |grep -iq -e RMX2001;then
setprop persist.sys.phh.fingerprint.nocleanup true
setprop persist.sys.qcom-brightness "$(cat /sys/class/leds/lcd-backlight/max_brightness)"
setprop persist.sys.overlay.devinputjack true
fi
if getprop ro.vendor.product.device |grep -iq -e RMX1801 -e RMX1803 -e RMX1807;then
@ -387,8 +393,7 @@ for f in /vendor/lib/mtk-ril.so /vendor/lib64/mtk-ril.so /vendor/lib/libmtk-ril.
setprop persist.sys.radio.ussd.fix true
done
if getprop ro.vendor.build.fingerprint | grep -iq -e iaomi/cactus -e iaomi/cereus \
-e Redmi/begonia; then
if getprop ro.vendor.build.fingerprint | grep -iq -e iaomi/cactus -e iaomi/cereus; then
setprop debug.stagefright.omx_default_rank.sw-audio 1
setprop debug.stagefright.omx_default_rank 0
fi
@ -560,7 +565,7 @@ if [ -f /system/phh/secure ];then
copyprop() {
p="$(getprop "$2")"
if [ "$p" ]; then
resetprop "$1" "$(getprop "$2")"
resetprop_phh "$1" "$(getprop "$2")"
fi
}
@ -590,22 +595,22 @@ if [ -f /system/phh/secure ];then
copyprop ro.system.product.manufacturer ro.product.vendor.manufacturer
copyprop ro.product.manufacturer ro.product.vendor.manufacturer
(getprop ro.vendor.build.security_patch; getprop ro.keymaster.xxx.security_patch) |sort |tail -n 1 |while read v;do
[ -n "$v" ] && resetprop ro.build.version.security_patch "$v"
[ -n "$v" ] && resetprop_phh ro.build.version.security_patch "$v"
done
resetprop ro.build.tags release-keys
resetprop ro.boot.vbmeta.device_state locked
resetprop ro.boot.verifiedbootstate green
resetprop ro.boot.flash.locked 1
resetprop ro.boot.veritymode enforcing
resetprop ro.boot.warranty_bit 0
resetprop ro.warranty_bit 0
resetprop ro.debuggable 0
resetprop ro.secure 1
resetprop ro.build.type user
resetprop ro.build.selinux 0
resetprop_phh ro.build.tags release-keys
resetprop_phh ro.boot.vbmeta.device_state locked
resetprop_phh ro.boot.verifiedbootstate green
resetprop_phh ro.boot.flash.locked 1
resetprop_phh ro.boot.veritymode enforcing
resetprop_phh ro.boot.warranty_bit 0
resetprop_phh ro.warranty_bit 0
resetprop_phh ro.debuggable 0
resetprop_phh ro.secure 1
resetprop_phh ro.build.type user
resetprop_phh ro.build.selinux 0
resetprop ro.adb.secure 1
resetprop_phh ro.adb.secure 1
setprop ctl.restart adbd
fi
@ -695,7 +700,7 @@ if getprop ro.vendor.build.fingerprint | grep -iq \
fi
if getprop ro.build.overlay.deviceid |grep -qE '^RMX';then
resetprop ro.vendor.gsi.build.flavor byPass
resetprop_phh ro.vendor.gsi.build.flavor byPass
setprop oppo.camera.packname com.oppo.engineermode.camera
setprop sys.phh.xx.brand realme
fi
@ -735,12 +740,12 @@ if getprop ro.vendor.build.fingerprint |grep -qiE \
-e razer/cheryl ; then
setprop media.settings.xml "/vendor/etc/media_profiles_vendor.xml"
fi
resetprop service.adb.root 0
resetprop_phh service.adb.root 0
# This is for Samsung Galaxy devices with HBM FOD
# On those devices, a magic Layer usageBits switches to "mask_brightness"
# But default is 255, so set it to max instead
cat /sys/class/backlight/*/max_brightness |sort -n |tail -n 1 > /sys/class/lcd/panel/mask_brightness
echo 319 > /sys/class/lcd/panel/mask_brightness
if getprop ro.vendor.build.fingerprint |grep -qiE '^xiaomi/';then
setprop persist.sys.phh.fod.xiaomi true
@ -768,7 +773,7 @@ if getprop ro.build.overlay.deviceid |grep -iq -e RMX1941 -e RMX1945 -e RMX1943
setprop persist.sys.phh.mainkeys 0
fi
resetprop ro.bluetooth.library_name libbluetooth.so
resetprop_phh ro.bluetooth.library_name libbluetooth.so
if getprop ro.vendor.build.fingerprint |grep -iq xiaomi/cepheus;then
setprop ro.netflix.bsp_rev Q855-16947-1
@ -787,9 +792,13 @@ fi
setprop vendor.display.res_switch_en 1
if getprop ro.bionic.cpu_variant |grep -q kryo300;then
resetprop ro.bionic.cpu_variant cortex-a75
resetprop_phh ro.bionic.cpu_variant cortex-a75
setprop dalvik.vm.isa.arm64.variant cortex-a75
setprop dalvik.vm.isa.arm64.features runtime
fi
resetprop ro.control_privapp_permissions log
resetprop_phh ro.control_privapp_permissions log
if grep -q /mnt/vendor/persist /vendor/etc/fstab.qcom;then
mount /mnt/vendor/persist /persist
fi

View File

@ -5,6 +5,10 @@ type teecd_data_file, file_type;
type dmd_device, file_type;
allow hal_fingerprint_server dmd_device:chr_file rw_file_perms;
allow hal_fingerprint_server sysfs:file rw_file_perms;
allow tee hal_fingerprint_default:process { getattr };
allow tee teecd_data_file:dir { search write getattr add_name };
allow tee teecd_data_file:file { read write create getattr open };
allow tee system_data_file:dir { getattr };
type oeminfo_nvm, domain;
type oeminfo_nvm_device, file_type;

View File

@ -44,3 +44,11 @@ on property:persist.sys.phh.caf.audio_policy=*
on property:persist.sys.phh.vsmart.dt2w=*
exec u:r:phhsu_daemon:s0 root -- /system/bin/phh-prop-handler.sh "persist.sys.phh.vsmart.dt2w"
on property:persist.sys.phh.disable_a2dp_offload=0
setprop persist.sys.phh.disable_a2dp_offload false
on property:persist.sys.phh.disable_a2dp_offload=1
setprop persist.sys.phh.disable_a2dp_offload true
on property:persist.sys.phh.disable_a2dp_offload=*
setprop persist.bluetooth.bluetooth_audio_hal.disabled ${persist.sys.phh.disable_a2dp_offload}