Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Moto G6] Audio is distorted and crackling #184

Closed
julianbraha opened this issue Sep 11, 2018 · 31 comments
Closed

[Moto G6] Audio is distorted and crackling #184

julianbraha opened this issue Sep 11, 2018 · 31 comments
Labels
validation pending A potential fix has been commited, this needs to be validated with next release

Comments

@julianbraha
Copy link

Whether the phone is playing audio through the speakers, or through the headphone jack, the audio is severely distorted.

@phhusson
Copy link
Owner

Ok, first, please give me your getprop ro.vendor.build.fingerprint

Then, try this:
adb root
adb remount
adb shell mount -o bind /mnt/phh/empty_dir /system/lib/soundfx
adb shell mount -o bind /mnt/phh/empty_dir /system/lib64/soundfx
adb shell setprop ctl.restart audio-hal-2-0
adb shell stop
adb shell start
This will soft-restart Android. Do not reboot after this as the change is not persistent.
Once android is started, check if this fixes the issue

@julianbraha
Copy link
Author

julianbraha commented Sep 17, 2018

ro.vendor.build.fingerprint: Xiaomi/sagit/sagit:7.1.1/NMF26X/V8.2.17.0.NCACNEC:user/release-keys

So, a few things:

  1. I installed the magisk module, viper, which partially fixed the audio, but not completely. Like the audio isn't distorted in certain cases, like using youtube or the dialer app. However, it hasn't fixed the issue for the alarm sound, or any sound in google duo. So I don't know if viper is the reason for the following:

  2. When I enter the following commands:
    adb shell mount -o bind /mnt/phh/empty_dir /system/lib/soundfx
    adb shell mount -o bind /mnt/phh/empty_dir /system/lib64/soundfx
    I get:
    failed: No such file or directory

  3. I'm also unable to use adb root while the phone is booted into android, as it returns:
    adbd cannot run as root in production builds
    However, I am able to use adb root while the phone is in the twrp recovery, which is what I attempted.

@phhusson
Copy link
Owner

Why the fuck does the title say Moto G6 if it's a xiaomi?

@julianbraha
Copy link
Author

julianbraha commented Sep 17, 2018

My device is definitely a Moto G6. I have no clue why it says xiaomi in the thing you asked me to retrieve.
I bought my device through the Google store with project fi. It says motorola on the front of it. I don't have anything else plugged into my computer except for this device.

@phhusson
Copy link
Owner

You used magisk's resetprop or something...?

@julianbraha
Copy link
Author

I have magiskhide enabled, and universal safetynet fix installed. I don't recall using anything called resetprop though.

@phhusson
Copy link
Owner

Ok, so please try it all again without magisk enabled.
I'm pretty sure adb root works without magisk

@julianbraha
Copy link
Author

ro.vendor.build.fingerprint: motorola/ali/ali:8.0.0/OPS27.82-72/88:user/release-keys

I uninstalled the modules, as well as magisk, and this time, adb root did work, but:
adb shell mount -o bind /mnt/phh/empty_dir /system/lib/soundfx
adb shell mount -o bind /mnt/phh/empty_dir /system/lib64/soundfx
still returned "failed: No such file or directory"

Anyway, I entered the rest of the commands and the sound is still distorted and crackling.

@phhusson
Copy link
Owner

Ok better, thanks. Having the second command fail is okay, since it's a 32bit Android.

Please dump, inside adb shell:
lsof |grep soundfx

If there is some process running it, kill them with pid

@julianbraha
Copy link
Author

julianbraha commented Sep 17, 2018

Here's what it returned:
audio@2.0-servi 9070 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 9070 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 9070 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 9070 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 9070 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so

@phhusson
Copy link
Owner

Ok. Then in adb, do kill -9 9070
Then check if sound is better.
If it still doesn't work check again the lsof. After the kill the lsof should be empty

@julianbraha
Copy link
Author

julianbraha commented Sep 17, 2018

So I killed the process like you said, but then the audio was still distorted. So I did the lsof command again, and a new process popped up. So I killed that one and tried again. Still distorted. I checked lsof again, and there was a new process. This happened several times:

phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 9070 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 9070 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 9070 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 9070 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 9070 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 9070 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 9070 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill -9 9070
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20160 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20160 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20160 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20160 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20160 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20160 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20160 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20160 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20160 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20160 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20160 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20160
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20651 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20651 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20651 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20651 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20651 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20651 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20651 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20651 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20651 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20651 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20651 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20651
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20751 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20751 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20751 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20751 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20751 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20751 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20751 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20751 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20751 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20751 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20751 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20751
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20817 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20817 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20817 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20817 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20817 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20817 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20817 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20817 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20817 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20817 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20817 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20817
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20904 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20904 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20904 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20904 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20904 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20904 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20904 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20904 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20904 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20904 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20904 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20904
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 20969 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 20969 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 20969 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 20969 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 20969 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 20969 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 20969 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 20969 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 20969 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 20969 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 20969 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so
phhgsi_arm_a:/ # kill 20969
phhgsi_arm_a:/ # lsof |grep soundfx
audio@2.0-servi 21030 audioserve mem REG 259,18 585260 1815 /vendor/lib/soundfx/libswdap.so
audio@2.0-servi 21030 audioserve mem REG 259,18 16256 1811 /vendor/lib/soundfx/libqcomvoiceprocessing.so
audio@2.0-servi 21030 audioserve mem REG 259,18 20484 1808 /vendor/lib/soundfx/libldnhncr.so
audio@2.0-servi 21030 audioserve mem REG 259,18 20476 1806 /vendor/lib/soundfx/libdownmix.so
audio@2.0-servi 21030 audioserve mem REG 259,18 20324 1816 /vendor/lib/soundfx/libvisualizer.so
audio@2.0-servi 21030 audioserve mem REG 259,18 41688 1812 /vendor/lib/soundfx/libreverbwrapper.so
audio@2.0-servi 21030 audioserve mem REG 259,18 76800 1805 /vendor/lib/soundfx/libbundlewrapper.so
audio@2.0-servi 21030 audioserve mem REG 259,18 91152 1809 /vendor/lib/soundfx/libmmieffectswrapper.so
audio@2.0-servi 21030 audioserve mem REG 259,18 16180 1807 /vendor/lib/soundfx/libeffectproxy.so
audio@2.0-servi 21030 audioserve mem REG 259,18 24668 1810 /vendor/lib/soundfx/libqcomvisualizer.so
audio@2.0-servi 21030 audioserve mem REG 259,18 54004 1814 /vendor/lib/soundfx/libspeakerbundle.so

@phhusson
Copy link
Owner

Oops my bad.
In the mount comment I've given, change system to vendor

@julianbraha
Copy link
Author

Running that command returns:

mount: '/mnt/phh/empty_dir'->'/vendor/lib/soundfx': No such file or directory

@phhusson
Copy link
Owner

Oh you meant both commands were returning that error, ok.
Do this then:
mount -o bind /system/phh /vendor/lib/soundfx

And kill again the process found with lsof

@julianbraha
Copy link
Author

Success! The sound is working great after that. Will it stick on reboot?

@phhusson
Copy link
Owner

phhusson commented Sep 17, 2018 via email

@julianbraha
Copy link
Author

Despite the changelog for version 105, I can confirm after installing it on my device that the issue is not yet fixed.

@Dadud
Copy link

Dadud commented Sep 20, 2018

can also confirm its not fixed.

@phhusson
Copy link
Owner

Ok
Please do:
adb root
adb shell sh -x /system/bin/rw-system.sh
and paste the resulting logs here

@julianbraha
Copy link
Author

C:\Users\Julian>adb shell sh -x /system/bin/rw-system.sh

  • getprop persist.sys.vndk

  • vndk=26

  • setprop sys.usb.ffs.aio_compat true

  • mount -o remount,rw /system

  • grep ' /system ' /proc/mounts

  • cut -d ' ' -f 1

  • resize2fs /dev/block/platform/soc/7824900.sdhci/by-name/system
    resize2fs 1.43.3 (04-Sep-2016)
    The filesystem is already 798720 (4k) blocks long. Nothing to do!

  • mount -o remount,ro /system

  • mount -o remount,ro /

  • mkdir -p /mnt/phh/

  • mount -t tmpfs -o 'rw,nodev,relatime,mode=755,gid=0' none /mnt/phh

  • mkdir /mnt/phh/empty_dir

  • fixSPL

  • getprop ro.product.cpu.abi

  • '[' armeabi-v7a '==' armeabi-v7a ']'

  • setprop ro.keymaster.mod 'AOSP on ARM32'
    setprop: failed to set property 'ro.keymaster.mod' to 'AOSP on ARM32'

  • grep by-name

  • head -n 1

  • getprop ro.boot.slot_suffix

  • find /dev/block -type l -name kernel

  • img=

  • '[' -z ']'

  • getprop ro.boot.slot_suffix

  • head -n 1

  • grep by-name

  • find /dev/block -type l -name boot

  • img=/dev/block/platform/soc/7824900.sdhci/by-name/boot

  • '[' -n /dev/block/platform/soc/7824900.sdhci/by-name/boot ']'

  • getSPL /dev/block/platform/soc/7824900.sdhci/by-name/boot android
    Android: 8.0.0
    SPL: 2018-3-01

  • Arelease=8.0.0

  • setprop ro.keymaster.xxx.release 8.0.0
    setprop: failed to set property 'ro.keymaster.xxx.release' to '8.0.0'

  • getSPL /dev/block/platform/soc/7824900.sdhci/by-name/boot spl
    Android: 8.0.0
    SPL: 2018-3-01

  • setprop ro.keymaster.xxx.security_patch 2018-03-01
    setprop: failed to set property 'ro.keymaster.xxx.security_patch' to '2018-03-01'

  • '[' ! -f /vendor/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so ']'

  • continue

  • '[' ! -f /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so ']'

  • grep -oE 'u:object_r:[^:]*:s0'

  • ls -lZ /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so

  • ctxt=u:object_r:vendor_file:s0

  • echo /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so

  • tr / _

  • b=_vendor_lib_hw_android.hardware.keymaster@3.0-impl-qti.so

  • cp -a /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so /mnt/phh/_vendor_lib_hw_android.hardware.keymaster@3.0-impl-qti.so

  • sed -i -e s/ro.build.version.release/ro.keymaster.xxx.release/g -e s/ro.build.version.security_patch/ro.keymaster.xxx.security_patch/g -e s/ro.product.model/ro.keymaster.mod/g /mnt/phh/_vendor_lib_hw_android.hardware.keymaster@3.0-impl-qti.so

  • chcon u:object_r:vendor_file:s0 /mnt/phh/_vendor_lib_hw_android.hardware.keymaster@3.0-impl-qti.so

  • mount -o bind /mnt/phh/_vendor_lib_hw_android.hardware.keymaster@3.0-impl-qti.so /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so

  • '[' ! -f /system/lib64/vndk-26/libsoftkeymasterdevice.so ']'

  • continue

  • '[' ! -f /vendor/bin/teed ']'

  • continue

  • '[' ! -f /system/lib64/vndk/libsoftkeymasterdevice.so ']'

  • continue

  • '[' ! -f /system/lib/vndk/libsoftkeymasterdevice.so ']'

  • continue

  • '[' ! -f /system/lib/vndk-26/libsoftkeymasterdevice.so ']'

  • grep -oE 'u:object_r:[^:]*:s0'

  • ls -lZ /system/lib/vndk-26/libsoftkeymasterdevice.so

  • ctxt=u:object_r:system_file:s0

  • tr / _

  • echo /system/lib/vndk-26/libsoftkeymasterdevice.so

  • b=_system_lib_vndk-26_libsoftkeymasterdevice.so

  • cp -a /system/lib/vndk-26/libsoftkeymasterdevice.so /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so

  • sed -i -e s/ro.build.version.release/ro.keymaster.xxx.release/g -e s/ro.build.version.security_patch/ro.keymaster.xxx.security_patch/g -e s/ro.product.model/ro.keymaster.mod/g /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so

  • chcon u:object_r:system_file:s0 /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so

  • mount -o bind /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so /system/lib/vndk-26/libsoftkeymasterdevice.so

  • getprop init.svc.keymaster-3-0

  • '[' running '==' running ']'

  • setprop ctl.restart keymaster-3-0

  • getprop init.svc.teed

  • '[' '==' running ']'

  • changeKeylayout

  • cp -a /system/usr/keylayout /mnt/phh/keylayout

  • changed=false

  • getprop ro.vendor.build.fingerprint

  • grep -qE -e '.(crown|star)[q2]lte.' -e '.(SC-0[23]K|SCV3[89]).*'

  • getprop ro.vendor.build.fingerprint

  • grep -iq -e xiaomi/polaris -e xiaomi/sirius -e xiaomi/dipper

  • getprop ro.vendor.product.device

  • '[' ali '==' OnePlus6 ']'

  • '[' false '==' true ']'

  • grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml

  • grep android.hardware.biometrics.fingerprint /vendor/manifest.xml
    android.hardware.biometrics.fingerprint

  • getprop ro.hardware

  • grep -qF qcom

  • '[' -f /sys/class/backlight/panel0-backlight/max_brightness ']'

  • getprop ro.vendor.product.device

  • '[' ali '==' OnePlus6 ']'

  • getprop ro.vendor.build.fingerprint

  • grep -q full_k50v1_64

  • grep -q mt6580

  • getprop ro.hardware

  • getprop ro.wlan.mtk.wifi.5g

  • grep -q 1

  • grep -qF 'mkdir /data/.fps 0770 system fingerp' vendor/etc/init/hw/init.mmi.rc

  • mkdir -p /data/.fps

  • chmod 0770 /data/.fps

  • chown system:9015 /data/.fps

  • chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq

  • chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq_cnt

  • getprop ro.vendor.build.fingerprint

  • grep -q -e Xiaomi/clover/clover -e iaomi/wayne/wayne

  • getprop ro.vendor.build.fingerprint

  • grep -q -e Xiaomi/beryllium/beryllium -e Xiaomi/sirius/sirius -e Xiaomi/dipper/dipper -e Xiaomi/ursa/ursa -e Xiaomi/polaris/polaris

  • '[' ! -f /vendor/lib/mtk-ril.so ']'

  • continue

  • '[' ! -f /vendor/lib64/mtk-ril.so ']'

  • continue

  • mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk
    mount: '/system/phh/empty'->'/vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk': No such file or directory

  • true

  • grep -qF 'PowerVR Rogue GE8100' /vendor/lib/egl/GLESv1_CM_mtk.so
    grep: /vendor/lib/egl/GLESv1_CM_mtk.so: No such file or directory

  • '[' -f /vendor/bin/hw/vendor.samsung.hardware.miscpower@1.0-service ']'

  • '[' 26 '==' 27 -o 26 '==' 26 ']'

  • mount -o bind /system/phh/libnfc-nci-oreo.conf /system/etc/libnfc-nci.conf

  • busybox_phh unzip -p /vendor/app/ims/ims.apk classes.dex

  • grep -qF -e Landroid/telephony/ims/feature/MmTelFeature -e Landroid/telephony/ims/feature/MMTelFeature
    unzip: can't open /vendor/app/ims/ims.apk[.zip]

@Dadud
Copy link

Dadud commented Sep 21, 2018

  • getprop persist.sys.vndk
  • vndk=26
  • setprop sys.usb.ffs.aio_compat true
    setprop: failed to set property 'sys.usb.ffs.aio_compat' to 'true'
  • mount -o remount,rw /system
    mount: '/dev/block/platform/soc/7824900.sdhci/by-name/system' not user mountable in fstab
  • mount -o remount,rw /
    mount: 'rootfs' not user mountable in fstab
  • mount -o remount,ro /system
    mount: '/dev/block/platform/soc/7824900.sdhci/by-name/system' not user mountable in fstab
  • true
  • mount -o remount,ro /
    mount: 'rootfs' not user mountable in fstab
  • true
  • mkdir -p /mnt/phh/
  • mount -t tmpfs -o 'rw,nodev,relatime,mode=755,gid=0' none /mnt/phh
    mount: bad /etc/fstab: No such file or directory
  • true
  • mkdir /mnt/phh/empty_dir
    mkdir: '/mnt/phh/empty_dir': Permission denied
  • fixSPL
  • getprop ro.product.cpu.abi
  • '[' armeabi-v7a '==' armeabi-v7a ']'
  • setprop ro.keymaster.mod 'AOSP on ARM32'
    setprop: failed to set property 'ro.keymaster.mod' to 'AOSP on ARM32'
  • grep by-name
  • head -n 1
  • getprop ro.boot.slot_suffix
  • find /dev/block -type l -name kernel
    find: No /dev/block/vold: Permission denied
  • img=
  • '[' -z ']'
  • grep by-name
  • head -n 1
  • getprop ro.boot.slot_suffix
  • find /dev/block -type l -name boot
    find: No /dev/block/vold: Permission denied
  • img=/dev/block/platform/soc/7824900.sdhci/by-name/boot
  • '[' -n /dev/block/platform/soc/7824900.sdhci/by-name/boot ']'
  • getSPL /dev/block/platform/soc/7824900.sdhci/by-name/boot android
    Android: 0.0.0
    SPL: 2000-0-01
  • Arelease=0.0.0
  • setprop ro.keymaster.xxx.release 0.0.0
    setprop: failed to set property 'ro.keymaster.xxx.release' to '0.0.0'
  • getSPL /dev/block/platform/soc/7824900.sdhci/by-name/boot spl
    Android: 0.0.0
    SPL: 2000-0-01
  • setprop ro.keymaster.xxx.security_patch 2000-00-01
    setprop: failed to set property 'ro.keymaster.xxx.security_patch' to '2000-00-01'
  • '[' ! -f /vendor/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so ']'
  • continue
  • '[' ! -f /vendor/lib/hw/android.hardware.keymaster@3.0-impl-qti.so ']'
  • continue
  • '[' ! -f /system/lib64/vndk-26/libsoftkeymasterdevice.so ']'
  • continue
  • '[' ! -f /vendor/bin/teed ']'
  • continue
  • '[' ! -f /system/lib64/vndk/libsoftkeymasterdevice.so ']'
  • continue
  • '[' ! -f /system/lib/vndk/libsoftkeymasterdevice.so ']'
  • continue
  • '[' ! -f /system/lib/vndk-26/libsoftkeymasterdevice.so ']'
  • ls -lZ /system/lib/vndk-26/libsoftkeymasterdevice.so
  • grep -oE 'u:object_r:[^:]*:s0'
  • ctxt=u:object_r:system_file:s0
  • tr / _
  • echo /system/lib/vndk-26/libsoftkeymasterdevice.so
  • b=_system_lib_vndk-26_libsoftkeymasterdevice.so
  • cp -a /system/lib/vndk-26/libsoftkeymasterdevice.so /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so
    cp: /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so: Permission denied
  • sed -i -e s/ro.build.version.release/ro.keymaster.xxx.release/g -e s/ro.build.version.security_patch/ro.keymaster.xxx.security_patch/g -e s/ro.product.model/ro.keymaster.mod/g /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so
    sed: /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so: Permission denied
  • chcon u:object_r:system_file:s0 /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so
    chcon: /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so: Permission denied
  • mount -o bind /mnt/phh/_system_lib_vndk-26_libsoftkeymasterdevice.so /system/lib/vndk-26/libsoftkeymasterdevice.so
    mount: bad /etc/fstab: No such file or directory
  • getprop init.svc.keymaster-3-0
  • '[' running '==' running ']'
  • setprop ctl.restart keymaster-3-0
    setprop: failed to set property 'ctl.restart' to 'keymaster-3-0'
  • getprop init.svc.teed
  • '[' '==' running ']'
  • changeKeylayout
  • cp -a /system/usr/keylayout /mnt/phh/keylayout
    cp: /mnt/phh/keylayout: Permission denied
  • changed=false
  • getprop ro.vendor.build.fingerprint
  • grep -qE -e '.(crown|star)[q2]lte.' -e '.(SC-0[23]K|SCV3[89]).*'
  • getprop ro.vendor.build.fingerprint
  • grep -iq -e xiaomi/polaris -e xiaomi/sirius -e xiaomi/dipper
  • getprop ro.vendor.product.device
  • '[' ali '==' OnePlus6 ']'
  • '[' false '==' true ']'
  • grep vendor.huawei.hardware.biometrics.fingerprint /vendor/manifest.xml
  • grep android.hardware.biometrics.fingerprint /vendor/manifest.xml
    android.hardware.biometrics.fingerprint
  • getprop ro.hardware
  • grep -qF qcom
  • '[' -f /sys/class/backlight/panel0-backlight/max_brightness ']'
  • getprop ro.vendor.product.device
  • '[' ali '==' OnePlus6 ']'
  • getprop ro.vendor.build.fingerprint
  • grep -q full_k50v1_64
  • grep -q mt6580
  • getprop ro.hardware
  • getprop ro.wlan.mtk.wifi.5g
  • grep -q 1
  • grep -qF 'mkdir /data/.fps 0770 system fingerp' vendor/etc/init/hw/init.mmi.rc
  • mkdir -p /data/.fps
  • chmod 0770 /data/.fps
    chmod: /data/.fps: Permission denied
  • chown system:9015 /data/.fps
    chown: /data/.fps: Permission denied
  • chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq
    chown: /sys/devices/soc/soc:fpc_fpc1020/irq: Permission denied
  • chown system:9015 /sys/devices/soc/soc:fpc_fpc1020/irq_cnt
    chown: /sys/devices/soc/soc:fpc_fpc1020/irq_cnt: Permission denied
  • getprop ro.vendor.build.fingerprint
  • grep -q -e Xiaomi/clover/clover -e iaomi/wayne/wayne
  • getprop ro.vendor.build.fingerprint
  • grep -q -e Xiaomi/beryllium/beryllium -e Xiaomi/sirius/sirius -e Xiaomi/dipper/dipper -e Xiaomi/ursa/ursa -e Xiaomi/polaris/polaris
  • '[' ! -f /vendor/lib/mtk-ril.so ']'
  • continue
  • '[' ! -f /vendor/lib64/mtk-ril.so ']'
  • continue
  • mount -o bind /system/phh/empty /vendor/overlay/SysuiDarkTheme/SysuiDarkTheme.apk
    mount: bad /etc/fstab: No such file or directory
  • true
  • grep -qF 'PowerVR Rogue GE8100' /vendor/lib/egl/GLESv1_CM_mtk.so
    grep: /vendor/lib/egl/GLESv1_CM_mtk.so: No such file or directory
  • '[' -f /vendor/bin/hw/vendor.samsung.hardware.miscpower@1.0-service ']'
  • '[' 26 '==' 27 -o 26 '==' 26 ']'
  • mount -o bind /system/phh/libnfc-nci-oreo.conf /system/etc/libnfc-nci.conf
    mount: bad /etc/fstab: No such file or directory
  • grep -qF -e Landroid/telephony/ims/feature/MmTelFeature -e Landroid/telephony/ims/feature/MMTelFeature
  • busybox_phh unzip -p /vendor/app/ims/ims.apk classes.dex
    unzip: can't open /vendor/app/ims/ims.apk[.zip]

@codejoe87
Copy link

Ok
Please do:
adb root
adb shell sh -x /system/bin/rw-system.sh
and paste the resulting logs here

Can also confirm that its not fixed. My phone is Moto G6 Plus version. Here is logs: https://ghostbin.com/paste/9wh4e

phhusson added a commit to phhusson/device_phh_treble that referenced this issue Oct 5, 2018
@phhusson phhusson added the validation pending A potential fix has been commited, this needs to be validated with next release label Oct 5, 2018
abun880007 pushed a commit to Team-UB/device_phh_treble that referenced this issue Oct 5, 2018
Dil3mm4 pushed a commit to Dil3mm4/device_phh_treble that referenced this issue Oct 6, 2018
@Wabo0
Copy link

Wabo0 commented Oct 6, 2018

Can confirm the issue on a Moto G6 running release v106 (system-arm-aonly-vanilla-nosu.img).

Initially described manual method:

$ adb root
$ adb shell
$ mount -o bind /system/phh /vendor/lib/soundfx
$ lsof | grep soundfx
$ kill -9 <PidFromOutputAbove>

Still fixes the issue until reboot. Also music playback over Bluetooth headphones (#126) seems to work after that.

On the first reboot after trying the above the phone got stuck on the "Decryption Unsuccessful" screen after entering the password. Ignoring the "Factory Rest" button and re flashing the system image resulted in a successful decryption and boot. Not sure if this is related though. I wasn't able to reproduce it.

tilaksidduram pushed a commit to tilaksidduram/device_phh_treble that referenced this issue Oct 22, 2018
blissgerrit pushed a commit to BlissRoms/device_phh_treble that referenced this issue Oct 31, 2018
Fixes phhusson/treble_experimentations#184

Change-Id: I280593d2abc8dbd9ca6c7e7ae4f15034420d036e
@Wabo0
Copy link

Wabo0 commented Dec 15, 2018

I'm still having this issue in a current build including the fix. At first I thought it was just the different fingerprints motorola/ali_n/ali_n vs motorola/ali/ali, but changing that didn't fix anything.

When is rw-system.sh being executed? And is there a way to write something to logcat from such an sh script?

@Wabo0
Copy link

Wabo0 commented Jan 9, 2019

Fixed for me in v109 (Moto G6, system-arm-aonly-vanilla-nosu.img)
Thanks :D

@anoraktrend
Copy link

This issue persists on the G6 play, however. I'll provide logs and such if requested.

@julianbraha
Copy link
Author

I can confirm this issue is fixed (tested on v110).

@phhusson
Copy link
Owner

phhusson commented May 5, 2019

@anoraktrend phhusson/device_phh_treble@d06769c this should do the trick

@phhusson phhusson closed this as completed May 5, 2019
@MiningMarsh
Copy link

MiningMarsh commented Oct 13, 2019

I know this issue is closed, but I just wanted to reconfirm for anyone else that has been looking for a fix:

On another Moto G6 flashed with the latest Pie stock vendor (specifically a RETUS variant), and v117, this issue still exists, and the described method of mounting over /vendor/lib/soundfx and killing the audio server still works.

Interestingly, using an Oreo vendor on the Pie rom does not have this problem, but that vendor stopped working on the latest releases.

A lazy but permanent fix on my device has simply been a mv /vendor/lib/soundfx /vendor/lib/soundfx.bak.

growtopiajaw pushed a commit to growtopiajaw/device_phh_treble that referenced this issue Nov 1, 2019
growtopiajaw pushed a commit to growtopiajaw/device_phh_treble that referenced this issue Nov 1, 2019
@leodexe
Copy link

leodexe commented Jun 27, 2020

I have a Moto Z2 Play that has this same issue, however, it only happens on Stock Pie 9.0 firmware, after digging on the XDA forums for quite some time I found out there was actually a solution.

Just like @MiningMarsh stated, on Stock Oreo firmware the audio works without any problems. So the actual solution is keeping the modem firmware from Stock Oreo, while keeping the rest of the Stock Pie firmware intact. This way it fixes the audio issue on the Z2 Play.

You could try for example flashing the Stock Oreo modem on your Moto G6 with Stock Pie 9.0 firmware to try fixing the issue, if it doesn't work you can flash again the Pie firmware again.

onde2rock pushed a commit to onde2rock/treble_experimentations that referenced this issue Apr 3, 2022
Add overlay for Samsung Galaxy A50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation pending A potential fix has been commited, this needs to be validated with next release
Projects
None yet
Development

No branches or pull requests

8 participants