Viper4Android Working on AOSP ROMs Without System Sound Distortion (Also MIUI 12 Based ROMs) // POCO X3 NFC & POCO X3 PRO - Xiaomi Poco X3 NFC Themes, Apps, and Mods

After many hours of research and trial-errors, i have found a way to make v4a work without system sound distortion like notification or ringer sounds.
1- First of all, get Viper4Android from magisk repo in the manager app, or just get the latest Viper4Android apk.
2- Install the module and proceed to the app, if you use apk just give root to the app and let it reboot.
3- After rebooting it will not work as it shoud be, this is where the magic happens. Use a root explorer and head in to:​
​"/data/adb/modules/Viper4AndroidFX."​
​There you will find a file called "post-fs-data.sh"​
​Open that file and add these lines to the last line.​
magiskpolicy --live 'allow audioserver audioserver_tmpfs file { read write execute }'
magiskpolicy --live 'allow audioserver system_file file { execmod }'
magiskpolicy --live 'allow mediaserver mediaserver_tmpfs file { read write execute }'
magiskpolicy --live 'allow mediaserver system_file file { execmod }'
magiskpolicy --live 'allow audioserver unlabeled file { read write execute open getattr }'
magiskpolicy --live 'allow hal_audio_default hal_audio_default process { execmem }'
magiskpolicy --live 'allow hal_audio_default hal_audio_default_tmpfs file { execute }'
magiskpolicy --live 'allow hal_audio_default audio_data_file dir { search }'
magiskpolicy --live 'allow app app_data_file file { execute_no_trans }'
magiskpolicy --live 'allow mtk_hal_audio mtk_hal_audio_tmpfs file { execute }'
Click to expand...
Click to collapse
This is how it should look like.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then save the file and reboot. What this is going to do is handle SELinux for you.(Also this will make Viper4Android work in MIUI 12 Based ROMs.)
4- After rebooting you will still have distortion in system sound effects. This step will solve this issue. (If you have Read/Write Vendor you can use any root explorer for this step.If so follow from step 4.2)
You either need a Read/Write Vendor or simply use OrangeFox Recovery to mount vendor(if you are on global miui, you need read/write vendor.
4.1- In OrangeFox Recovery go to settings mounting options and mount Vendor.
4.2- After you mount it, you need to go back to root dir, head into "/Vendor/lib64/soundfx" and "/Vendor/lib/soundfx" directories. In both of these folders you will find a blob called "libvolumelistener.so". You need to delete this blob or move it to somewhere else.
4.3- After deleting or moving these two blobs, simply reboot.
5- After you reboot, open Viper4Android and open the settings. There you need to toggle on and off and simply leave the Legacy Mode ENABLED.
This is all it takes to have Viper4Android work stable with no distortion in system sounds, also works with misound and dirac (at least for me on Arrow OS 11.)
I only found these codes and libvolumelistener by simply searching for hours. Credits goes to the people who shared these in the first place so feel free to thank them or me.
Credits:
Libvolumelistener Fix
Necessary Command Lines
BTW if you want to use Viper4Android in MIUI 12 based custom ROMs, You only need to use the STEP 3 COMMAND LINES ONLY. Viper4Android will work with MIUI soundfx, you dont need to disable anything.​

i can't mount vendor

@gsser: Thanks for this, policies succesfully applied on Xiaomi.eu.

ary_evo said:
i can't mount vendor View attachment 5254789
Click to expand...
Click to collapse
Which rom do you use? On custom miui based roms you should be able to mount vendor, if you are on global you need to use r/w vendor

So I've done this.
It now works in Spotify. System sounds all ok.
Just apps note have distorted sound like insta, YouTube, Facebook, Chrome
When I initially thought the files where renamed they wasn't!
Struggling to mount Vendor with OFox? How did you manage this?
4.1- In OrangeFox Recovery go to settings mounting options and mount Vendor.
4.2- After you mount it, you need to go back to root dir, head into "/Vendor/lib64/soundfx" and "/Vendor/lib/soundfx" directories. In both of these folders you will find a blob called "libvolumelistener.so". You need to delete this blob or move it to somewhere else.

f0xy said:
So I've done this.
It now works in Spotify. System sounds all ok.
Just apps note have distorted sound like insta, YouTube, Facebook, Chrome
When I initially thought the files where renamed they wasn't!
Struggling to mount Vendor with OFox? How did you manage this?
4.1- In OrangeFox Recovery go to settings mounting options and mount Vendor.
4.2- After you mount it, you need to go back to root dir, head into "/Vendor/lib64/soundfx" and "/Vendor/lib/soundfx" directories. In both of these folders you will find a blob called "libvolumelistener.so". You need to delete this blob or move it to somewhere else.
Click to expand...
Click to collapse
Try audio compatibility patch. I have tried pixelexperience plus, arrow os and resurrectionremix 10. In all of these roms it works without any distortion at all. If you still getting distortion but not from system sounds, its either your kernel sound drivers messing up the sound or your rom has bad audio configuration. I can blast max volume +6dB from v4a and still dont get distortion in anywhere. Im on pixelexperience+.

gsser said:
Try audio compatibility patch. I have tried pixelexperience plus, arrow os and resurrectionremix 10. In all of these roms it works without any distortion at all. If you still getting distortion but not from system sounds, its either your kernel sound drivers messing up the sound or your rom has bad audio configuration. I can blast max volume +6dB from v4a and still dont get distortion in anywhere. Im on pixelexperience+.
Click to expand...
Click to collapse
I'm on miui because aosp based custom rom speaker and bluetooth audio is really worse than miui, could this help? I'd like to try arrow os or PE+, thanks

castleofglass said:
I'm on miui because aosp based custom rom speaker and bluetooth audio is really worse than miui, could this help? I'd like to try arrow os or PE+, thanks
Click to expand...
Click to collapse
you can try and use equalizer of v4a to make it sound whatever you like. and not just v4a, you can use any sound mod.

gsser said:
you can try and use equalizer of v4a to make it sound whatever you like. and not just v4a, you can use any sound mod.
Click to expand...
Click to collapse
I'm a noob about audio settings, isn't there a prebuilt rom or maybe a preset I can get somewhere? Thanks

Does it works with PE+ with CAF vendor

it should
sergio😀 said:
Does it works with PE+ with CAF vendor
Click to expand...
Click to collapse

Try this one. No editing nor additional sounds mods needed, just install it and enjoy. It even had some presets preloaded.
Credit goes to WSTxda. You can find his telegram channel inside the app.

Thanks for this, it worked.
But i had to remount root folder because remount of vendor would not make it r/w for some reason. Also found out, once you apply your fixes you can just install any Dolby Atmos mod APK without changing selinux, but in this case audio modification library has to be installed.

will this work on rooted stock miui 12.5.2? what is r/w vendor? can i use the latest twrp nebrassy (it can mount encrypted volumes) instead of ofox?

Thanks, third step did the trick!

schrickz said:
Try this one. No editing nor additional sounds mods needed, just install it and enjoy. It even had some presets preloaded.
Credit goes to WSTxda. You can find his telegram channel inside the app.
Click to expand...
Click to collapse
this will need audio compatibility patch???

Related

[SCRIPT] [GUIDE] Google Play Services Battery Drain Fix/Workaround

Anyone's Google Play Services update recently? If you're suddenly experiencing dreadful battery life due to Google Play Services (see pic below) then this fix might be right for you. ​
Background: Recently, an update to Google Play Services (ver. 7.0.97) was released and reports flooded the internet with complaints of battery life issues. People had battery graphs similar to this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I also experienced this issue. After checking my frequency tables in my kernel tweaker, I noticed that my phone was NEVER going into Deep Sleep, and, instead, was sitting at 300mhz even when the screen was off. After some Googling and reading some comments on GitHub, it seemed apparent that the problem was one Service in particular "SystemUpdateService".
The Problem: Without going into much detail SystemUpdateService is basically Google's OTA update service, and when it detects that your phone need and update while running a Custom ROM, it fails and re-runs this check over and over again. It's this wakelock that drains your battery.
The Solution: Enabling the service. You read that correctly. For whatever reason, enabling the service actually prevents the wakelock from occurring. I, along with a few testers, have been using our phones for hours now after having run the script and the wakelock and battery drain is completely gone.
Method #1: init.d Script
For those of you with custom ROMs that support init.d scripts, simply unzip and place this script in the /etc/init.d folder (as root) and set permissions to 755. The service becomes disabled again as soon as the phone reboots. We place this script in the init.d folder so the script runs automatically every time the phone boots. If your Custom ROM does NOT support init.d scripts skip over to Method #2 or 3.
DOWNLOAD SCRIPT HERE: View attachment fixUpdateService.zip
Permissions Screenshot:
The source code to this script (Edited slightly, Credit to Oreganoian on Reddit):
Code:
echo "Disabling SystemUpdateService Battery Drain"
su -c pm enable com.google.android.gms/.update.SystemUpdateActivity
su -c pm enable com.google.android.gms/.update.SystemUpdateService
su -c pm enable com.google.android.gms/.update.SystemUpdateService$ActiveReceiver
su -c pm enable com.google.android.gms/.update.SystemUpdateService$Receiver
su -c pm enable com.google.android.gms/.update.SystemUpdateService$SecretCodeReceiver
su -c pm enable com.google.android.gsf/.update.SystemUpdateActivity
su -c pm enable com.google.android.gsf/.update.SystemUpdatePanoActivity
su -c pm enable com.google.android.gsf/.update.SystemUpdateService
su -c pm enable com.google.android.gsf/.update.SystemUpdateService$Receiver
su -c pm enable com.google.android.gsf/.update.SystemUpdateService$SecretCodeReceiver
echo "Script Execution Successful"
Method #2: Manually Running the Script
This method works best if you like working in the terminal or file explorer. Or if you would rather just do things yourself. Place the script above in the /etc/init.d directory and set permissions to 755. This time, however, you must run the script yourself EVERY TIME THE PHONE BOOTS. You can do this by using your file explorer, if it supports executing scripts (see output below) or running the script via Terminal.
Terminal: Run this command as root (type "su" and hit enter):
Code:
./etc/init.d/fixUpdateService.sh
File Explorer: I personally use FX (File Explorer), which is a wonderful app by the way, so the output in the screenshot below may be styled different but generally should appear the same:
Method #3: Enabling SystemUpdateService via App
Now, if you're a no frills kinda person, or just don't feel comfortable rummaging around in your filesystem or terminal, there is an app you can download called Disable Service which lets you do the same thing, just with a nice GUI. YOU MUST DO THIS EVERY TIME YOU REBOOT YOUR PHONE.
Steps:
Once installed, launch the app.
Then click the "System" tab on the top right.
Scroll down and select "Google Play services"
Scroll down to "SystemUpdateService" and CHECK the box.
Done!
There you have it! Hope this helps!
Great!
Method 1 doesn't work on hammerheadcaf 20150318 but Method 3 is working like a charm and the battery drain issue seems to be gone!
And CyanogenMod is going to deal with this issue before long:
http://review.cyanogenmod.org/#/c/91579/
http://review.cyanogenmod.org/#/c/91021/
Hello...
This only occurs in custom roms or it happens also in Stock Rom?
Thank you...
blackzigong said:
Great!
Method 1 doesn't work on hammerheadcaf 20150318 but Method 3 is working like a charm and the battery drain issue seems to be gone!
And CyanogenMod is going to deal with this issue before long:
http://review.cyanogenmod.org/#/c/91579/
http://review.cyanogenmod.org/#/c/91021/
Click to expand...
Click to collapse
Interesting, I'll try to see if I can edit the script to get it to work right. Make sure you enable the service with that app every time you reboot your phone.
Also, I've been reading those CyanogenMod discussions. Very interesting. Hopefully they tackle the issue soon and the solution makes its way into other ROMs
Kc_Nirvana said:
Hello...
This only occurs in custom roms or it happens also in Stock Rom?
Thank you...
Click to expand...
Click to collapse
As far as I know, this bug only affects custom ROMs.
Method 1 didn't work but method 2 and 3 worked. I believe the permissions for the script
should be 755 instead of 744.
Update : changing permissions didn't help either.
755 or 744? Screenshot shows 744 but instructions say 755. Assuming 744 is correct.
soundneedle said:
755 or 744? Screenshot shows 744 but instructions say 755. Assuming 744 is correct.
Click to expand...
Click to collapse
Permissions for init.d scripts should;d be 755. I'll update the picture to reflect that. Thank you for pointing that out.
Kc_Nirvana said:
Hello...
This only occurs in custom roms or it happens also in Stock Rom?
Thank you...
Click to expand...
Click to collapse
I'm experiencing the battery drain with stock HTC sense on my M8 and GP services 7.0.97. The battery usage is very high for GP services (e.g. 38% for screen off!) and the "awake" bar shows the phone awake even during periods of low usage--too many awake intervals.
Will init.d scripts work on CM11s?
CM fixed this a couple days ago with 2 commits. Hopefully all the ROM teams will incorporate it into their builds.
http://review.cyanogenmod.org/#/c/91579/
http://review.cyanogenmod.org/#/c/91021/
AndrasLOHF said:
CM fixed this a couple days ago with 2 commits. Hopefully all the ROM teams will incorporate it into their builds.
Click to expand...
Click to collapse
CM11s may not get another update though. I can confirm that the shell script doesn't work at startup on CM11S.
Edit: sorry didnt realise this was posted in the Nexus 5 section
Does this also effect cm11s?
Pretty important to add that for that 3rd Method to work you also have to enable that same SystemUpdateService in Google Services Framework. (In addition to enabling it in Google Play Services).
At least, that's what I've read on other posts/Google+ pages. I'm trying it now so do this at your own risk =)
Thanks for the script. Works for me, but only manually. I can't get it to work in the init.d at startup. It's in the folder, permissions 755. I'm not that into scripts - anyone who got it working mind for some tips?
humba80 said:
Thanks for the script. Works for me, but only manually. I can't get it to work in the init.d at startup. It's in the folder, permissions 755. I'm not that into scripts - anyone who got it working mind for some tips?
Click to expand...
Click to collapse
Your ROM may not support init.d. Mine doesn't and so I'm using tasker to run the script at boot.
Sandman-007 said:
Your ROM may not support init.d. Mine doesn't and so I'm using tasker to run the script at boot.
Click to expand...
Click to collapse
Tasker! Didn't think of it. Thank you!
Script works for me, but it doesn't solve battery drain: I have to use privacy guard to remove both keep awake and wake up...
Why you try these hard to stop the Systemupdate Wakelock??
See my guide here.Its simple as you like.No scripts included:http://forum.xda-developers.com/showthread.php?t=3060548
This is a permanent fix.No need to redo after reboots
vaisakh7 said:
Why you try these hard to stop the Systemupdate Wakelock??
See my guide here.Its simple as you like.No scripts included:http://forum.xda-developers.com/showthread.php?t=3060548
This is a permanent fix.No need to redo after reboots
Click to expand...
Click to collapse
Yup, but checking after the script mod, only keep awake permission was denied and I still got more than 8000 wake locks
gpvecchi said:
Yup, but checking after the script mod, only keep awake permission was denied and I still got more than 8000 wake locks
Click to expand...
Click to collapse
Did you try my fix?
I've attached screenshots there.
Tapped from my furious ZR

[SafetyNet Fix][PoC] Pass SafetyNet after 2017-07-17 on Magisk V13

EDIT: Official fix is out, please follow this link: https://forum.xda-developers.com/showpost.php?p=73079059&postcount=25
Good evening,
since Google broke all our beloved SafetyNet passing phones I decided to have a look at it. Turns out they have extended their property scanning.
There is an easy fix BUT: I have no idea how this fix interferes with Magisks internal behavior. @topjohnwu Why are properties used for magisk internals?
SafetyNet checks now for these properties, so we have to delete them:
Code:
[init.svc.magisk_pfs]: [stopped]
[init.svc.magisk_pfsd]: [stopped]
[init.svc.magisk_service]: [stopped]
[persist.magisk.hide]: [1]
EDIT: @dimon222 had a look at magisk source and answered my question why these properties even exist:
BTW, I shortly check'd source of Magisk, it seems 3 of those flags are related to exit code after start of Magisk services on boot. Basically, they're automatically set by Android when service with such name is started.
I guess dev will probably rename those services to avoid detect or hide it somehow.
https://github.com/topjohnwu/Magisk/blob/master/scripts/init.magisk.rc
And the last flag is some internal for Magisk.
It feels like something serious, but I don't know if its only used during boot. Maybe if u reset it after boot, it won't be automatically reloaded by Magisk, and it will continue to use hide.
https://github.com/topjohnwu/Magisk/search?utf8=✓&q=MAGISKHIDE_PROP
Worth to check if SafetyNet apps are still working after that, not just SafetyNet check itself. Its quite possible that it won't hide, if it gets this property from global variable at realtime.
Click to expand...
Click to collapse
How to fix this:
1. This fix is only a temporary fix. You will have to apply it after every reboot.
2. Use a Terminal emulator app or adb to enter these commands.
3. Use resetprop to delete the properties - again: I have no idea how this interferes with magisk behavior!!!! Do this at your own risk:
Code:
su
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
Using Magisk Core mode? also execute this command:
Code:
resetprop --delete ro.magisk.disable
4. Optional/Not recommended: If you want to make this temporary fix more permanent, add all the required resetprop calls to a .sh file inside /magisk/.core/service.d/ and let magisk automatically execute the script for you every startup.
Troubleshooting if this didnt work:
Still doesnt work? Try this: https://forum.xda-developers.com/showpost.php?p=73056617&postcount=65
Check for other magisk properties using "getprop | grep magisk" and delete them as well (at your own risk!)
After deleting the properties SafetyNet check will pass again
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What kind of functionality do you still have after this? Does magisk manager crash? Do modules work? Does su work?
Can you please explain in detail that how to do it.
Thanks
Would these persist through a flash-all without wiping the device? I still couldn't get safety net to pass after that.
ali.ahmad said:
Can you please explain in detail that how to do it.
Thanks
Click to expand...
Click to collapse
Looks like you just need adb shell or a terminal emulator on your phone, and su/root.
ali.ahmad said:
Can you please explain in detail that how to do it.
Thanks
Click to expand...
Click to collapse
Yes please, I'm a little lost too
ali.ahmad said:
Can you please explain in detail that how to do it.
Thanks
Click to expand...
Click to collapse
Type it into a terminal on your phone.
No luck
It worked for me, thank you.
Enviado desde mi SM-N930F mediante Tapatalk
Interesting. I'm curious, how were you able to detect what safety net is actually detecting?
I haven't tried your fix as it's not super imperative for me to get safetynet passing for myself just curious what you are using to find this stuff out.
Either way thanks for the work
Then, is these sure? I don't have a computer here to unbrick my phone.
Jolt420 said:
What kind of functionality do you still have after this? Does magisk manager crash? Do modules work? Does su work?
Click to expand...
Click to collapse
SU still works, Magisk hide seems to work as well (safetynet passes, so magiskhide has to work)
I don't use many modules, only AppSystemizer and this one still works
ali.ahmad said:
Can you please explain in detail that how to do it.
Thanks
Click to expand...
Click to collapse
You need to enter the commands either in a Terminal Emulator app on your phone or use adb to connect to your phone and then enter the commands.
Also keep in mind that the fix is only temporary, you need to apply the fix after every reboot.
Astur13 said:
Then, is these sure? I don't have a computer here to unbrick my phone.
Click to expand...
Click to collapse
It is only temporary. After every reboot you have to apply the fix again. So if it doesnt work/bug your phone simply reboot
Test_subj said:
No luck
Click to expand...
Click to collapse
please provide the output of
Code:
getprop | grep magisk
after applying the fix
Is there a way to load commands from a txt or something like that? It's a bit of a bother to manually enter it every time we reboot.
[email protected] said:
Good evening,
since Google broke all our beloved SafetyNet passing phones I decided to have a look at it. Turns out they have extended their property scanning.
There is an easy fix BUT: I have no idea how this fix interferes with Magisks internal behavior. @topjohnwu Why are properties used for magisk internals?
SafetyNet checks now for these properties:
Code:
[init.svc.magisk_pfs]: [stopped]
[init.svc.magisk_pfsd]: [stopped]
[init.svc.magisk_service]: [stopped]
[persist.magisk.hide]: [1]
How to fix this:
1. This fix is only a temporary fix. You will have to apply it after every reboot.
2. Use a Terminal emulator app or adb to enter these commands.
3. Use resetprop to delete the properties - again: I have no idea how this interferes with magisk behavior!!!! Do this at your own risk:
Code:
su
resetprop --delete init.svc.magisk_pfs
resetprop --delete init.svc.magisk_pfsd
resetprop --delete init.svc.magisk_service
resetprop --delete persist.magisk.hide
After deleting the properties SafetyNet check will pass again
Click to expand...
Click to collapse
Worked for me! Thanks!
ivanes82 said:
Is there a way to load commands from a txt or something like that? It's a bit of a bother to manually enter it every time we reboot.
Click to expand...
Click to collapse
You could store it in a .sh file on sdcard and execute the .sh file. (dont forget chmod +x)
It also might work to put the .sh file in /magisk/.core/service.d to let magisk automatically execute the script at startup, but im not sure if thats too early
Worked for me on the 6P. Magisk and root seem good so far.
[email protected] said:
You could store it in a .sh file on sdcard and execute the .sh file. (dont forget chmod +x)
It also might work to put the .sh file in /magisk/.core/service.d to let magisk automatically execute the script at startup, but im not sure if thats too early
Click to expand...
Click to collapse
Thank you very much. It is only as a temporary solution.
Worked for me on HTC 10, Magisk 13.2

[MODULE][AOF] Always-on Fingerprint v1.4[MAGISK 15.0+]

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
INTRODUCTION
I know, pressing the home button to unlock your phone it's very annoying. This module allows you to unlock your device without pressing the home button. The fingerprint scanner will remain always-on to allow that.
REQUIREMENTS
- Magisk 15.0+
- Any device
FEATURES
- Unlock your device without pressing the home button
- Works for sure with FPC fingerprints
CHANGELOG
- Updated module template to 1500
DOWNLOAD
AOF v1.4
INSTALLATION
Flash trough TWRP recovery and reboot.
SOURCE CODE
GitHub
CREDITS
- @Psy_Man (For this module)
you left kenzo sir?
no more firmware updates...
sorry for #OT
xN00Bx said:
you left kenzo sir?
no more firmware updates...
sorry for #OT
Click to expand...
Click to collapse
Yup. I've switched to MI Note 2.
Will alwyas on FP consume more battery and reduce the lifespam of the scanner? Thanks for the nice modules!
lsl640 said:
Will alwyas on FP consume more battery and reduce the lifespam of the scanner? Thanks for the nice modules!
Click to expand...
Click to collapse
I have it enabled in my phone and no battery drain for me.
I am going to flash it on my Mi note 2....Hope there wont be any battery drains.
Edit: It's working....Need to check battery drains....
Hi @Psy_Man,
I'm having issue on this module with my mi5 (128gb with global rom 8.1.4.0). After flashed it, Google Play and Google Play services crashed (keep pop-up error "has stopped") Do your module have any log for me to trace it?
cutesniper22 said:
Hi @Psy_Man,
I'm having issue on this module with my mi5 (128gb with global rom 8.1.4.0). After flashed it, Google Play and Google Play services crashed (keep pop-up error "has stopped") Do your module have any log for me to trace it?
Click to expand...
Click to collapse
Can not be related to this module. Wipe cache and dalvik cache and than reboot.
Stuck during boot on Mi5 64gb, Tried on MIUI 8 Global Beta 7.7.20 and MIUI 9 Global Beta 7.8.24. Magisk 13.6 Beta.
Psy_Man said:
Can not be related to this module. Wipe cache and dalvik cache and than reboot.
Click to expand...
Click to collapse
Yup, I did that before. No longer happened if I removed this module. (Google play store/services back to normal after restarted )
Reinstall this module again ... crashing is coming back again ~
cutesniper22 said:
Yup, I did that before. No longer happened if I removed this module. (Google play store/services back to normal after restarted )
Reinstall this module again ... crashing is coming back again ~
Click to expand...
Click to collapse
I will add logs to the next version
I've installed it on gemini miui8 7.6.29dev & magisk 13.3
I'm experiencing Play Services crashing after activating your module (it works flawlessly, tbh).
The solution for me was to uninstall the safetynet fix beta5.
My opinion is that a conflict happens between the two post-fs-data.sh files
edit: i've inserted the aof patch into the safetynet fix module and everything is working fine. Remove aof module and safetynet, reboot, then reboot to recovery and flash this file or add this module via magisk manager
Not working on Mi Note 2 with 8.5.2.0 China stable -
Stuck at mi logo and not boot on miui 9
MI 5 cihazımdan Tapatalk kullanılarak gönderildi
Does not work on Mi Note 2 MIUI 8.2.6.0
No side issues, just simply does not work.
When after booting I check /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup it is still 0
The module was installed through Magisk and is marked active.
Thanks.
Flawless
Work flawlessly in a MI 5, running MIUI 9 latest xiaomi.eu version
mikhailmv said:
Does not work on Mi Note 2 MIUI 8.2.6.0
No side issues, just simply does not work.
When after booting I check /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup it is still 0
The module was installed through Magisk and is marked active.
Thanks.
Click to expand...
Click to collapse
even manual execution of something like:
su
echo 1 >> /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
cat /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
gives:
0
mikhailmv said:
even manual execution of something like:
su
echo 1 >> /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
cat /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
gives:
0
Click to expand...
Click to collapse
This is strange! Try to chmod it first, so: chmod 777 /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
Than: echo 1 > /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
Psy_Man said:
This is strange! Try to chmod it first, so: chmod 777 /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
Than: echo 1 > /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup
Click to expand...
Click to collapse
It does not help
I can set up any permissions on this file I want
And I do not get any error messages regarding "Permission denied"
And by the way the chmod sets the permissions properly: -rwxrwxrwx
But the result of cat /sys/devices/soc/soc:fpc_fpc1020/enable_wakeup is still 0
Thanks
Max Biaggi said:
I've installed it on gemini miui8 7.6.29dev & magisk 13.3
I'm experiencing Play Services crashing after activating your module (it works flawlessly, tbh).
The solution for me was to uninstall the safetynet fix beta5.
My opinion is that a conflict happens between the two post-fs-data.sh files
edit: i've inserted the aof patch into the safetynet fix module and everything is working fine. Remove aof module and safetynet, reboot, then reboot to recovery and flash this file or add this module via magisk manager
Click to expand...
Click to collapse
Thanks! This is working well for me!

[script&magisk][root]Disable analytics, app measurement, campaign tracking, etc

Attached is a reasonably simple script which disables (or enables) a number of services for application analytics, application measurement, facebook ads, firebase performance monitoring and a few more. The amount of services disabled depends on the applications which you have installed. In my case 430+ services were disabled when running the script. This will increase security and possibly improve battery life a bit.
You must be rooted to use the script. The script code is pretty simple, have a look.
Download the attached file, rename and remove the ".txt" extension.
Instructions to install/use:
Code:
# push the script to your phone using adb
> adb push dss /sdcard/
# go onto your phone
> adb shell
# switch to root
% su
# mount /system as read-write
% mount -o remount,rw /system
# copy the script to the /system/bin/ directory
% cp /sdcard/script /system/bin/
# make sure it is executable
% chmod 755 /system/bin/dss
# execute the script
% dss disable
# output printed to the screen
% reboot
To enable the services again just run the script with argument "enable".
Alternatively, flash the attached magisk module from within the Magisk app. It will achieve the same effect.
Note that the magisk module will run for quite some time in the background whilst your phone is already fully booted.
To check what the module is doing, do:
Code:
> adb shell
% su
% tail -f /data/adb/modules/dss/log
When it has finished you will see "-- done" in the log.
Welkom :good:
I suggest to make a magisk module of this script to make it user friendly.
Keep up the good work old friend
Great to see you again, good idea to make it into a module. Will look at it tomorrow.
Good to see! Look forward to the module, Cheers
Can't you just run the script using EXKM?
For the ones who want to see if you have any of those apps (basically see if you need it/ if the custom kernel or Magisk module already hasn't disabled them).
Run this in Minimal ADB or whichever ADB tool you prefer:
Bash:
- adb shell
- su
- PLIST=`/system/bin/cmd package list packages | grep -v Swift | sort | sed 's/package://g'`
for i in $PLIST; do
echo "$i"
done
This will list all packages you've installed, see if it has any of the packages mentioned above.
OK, I looked into making this a magisk module ...
Problem is that you only have to run the script once (with disable).
So it is not really something which needs to run upon every boot.
Therefore, a magisk module is a bit pointless IMHO.
Anyway, the magisk module is attached if you want to try it.
@foobar66
Is this safe to try on the 6T?
..Cory.. said:
@foobar66
Is this safe to try on the 6T?
Click to expand...
Click to collapse
Yes, no problem.
foobar66 said:
Yes, no problem.
Click to expand...
Click to collapse
Thanks brother, will try shortly!
can anyone report their findings on this? does it improve things?
best way to know is try it make backup to feel safe
So I just need to flash magisk module, reboot so it will be activated and then I can remove it?
I do not know if it improve anything but i had to reboot twice. After the first reboot nothing worked as expected. Now it seems to work normal
Updated OP with the magisk module.
Thanks a LOT - very good addition to AFWall
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
---------- Post added at 20:38 ---------- Previous post was at 20:29 ----------
foobar66 said:
OK, I looked into making this a magisk module ...
Problem is that you only have to run the script once (with disable).
So it is not really something which needs to run upon every boot.
Therefore, a magisk module is a bit pointless IMHO.
Anyway, the magisk module is attached if you want to try it.
Click to expand...
Click to collapse
Well, can I just delete the Magisk module after running it once?
---------- Post added at 20:56 ---------- Previous post was at 20:38 ----------
ATTENTION ANDROID 10 Users: not working on Q-Beta 4
does this play nice if I have oxytweaker module which already disables some of the logging and analytic stuff?
Thanks. Look forward to trying this. If we want to reverse the module do we just delete it from Magisk? Thanks
carro_d said:
does this play nice if I have oxytweaker module which already disables some of the logging and analytic stuff?
Click to expand...
Click to collapse
i would say it does the same, its just another approach
and oxytweaker also changes some build prop stuff, so this is like the "light" version, thats focussed on the analytic stuff
Would this break safety net? Thanks!

[MODULE] Scoped Storage Disabler [11]

As many of you know, Scoped Storage aka "FUSE" or the new "Apple-Like Secure Storage" made by Google, was officially implemented on Android 11 ... just to make our android life, more difficult !
Not only we can no longer fully manage our own phone storage, but many apps were broken and don't have access to our own files (Music Players, Emulators, File Manager, ... etc).
Scoped Storage also have a huge impact on file transfer (USB, Copy/Past, DLNA, ...etc) ... it slowdown very well the speed !
To stop this mess, i have made a simple Magisk module to bring back the legacy support for the old sdcardfs !
For noobs, what does it mean in english : you have access and control to all your folders on the internal/external storage !
But first, you have to check if your custom rom / rooted oem OS still have the support for sdcardfs, by using this command in terminal or adb shell (computer) :
mount I grep sdcardfs
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you see "sdcardfs", then your OS still support the switch from fuse to sdcardfs :
Your phone will restart automatically after applying this module due to the virtualization switch from fuse to sdcardfs !
If you can't see sdcardfs in terminal, then your custom rom doesn't support the switch, but can be easily re-implemented by your rom developers !
Since the " Scoped Storage " feature removes natively the direct access to the "0" folder, make sure you create this folder again at the root of your internal storage and move all your folders/files there after applying this MOD ... to avoid duplicated / or unrecognized files by some apps (Instagram, Fb, Whatsapp ...)
Use a root/file explorer to create the "0" folder so you have your internal storage as below :
Phonograph have access again to all my storage !
Reserved
... and I have access again to our beloved path :
I tried your module in my Mi Pad 4 (clover) with unofficial LineageOS 17.1 from 20200512 and, even with Root Explorer and Simple Gallery, I'm unable to browse media in external storage attached to the USB port.
Is this a known limitation? Cause everything seems to work with internal storage and card reader, even before installing this module...
LOS 17.1 doesn't support Scoped Storage !!!
This module is for A11
maybe your kernel doesn't support OTG, grab your fstab here from :
/vendor/etc/...fstab !
Or
your cable is not a true OTG cable : try the same cable in another device that support OTG too !
Tips :
use your OTG cable in TWRP menu, to see if you can read something through the cable !
Let me know the result !
Your problem is likely the OTG support and not the sdcardfs !!!
Worked great, only problem is that Facebook Messenger stops working if you install it after the module. If you install Messenger first you just can't send any photos after you flash the module.
Axcellerator98 said:
Worked great, only problem is that Facebook Messenger stops working if you install it after the module. If you install Messenger first you just can't send any photos after you flash the module.
Click to expand...
Click to collapse
how did you solve? I have not been able to get Facebook to work anymore ...
zibibo said:
how did you solve? I have not been able to get Facebook to work anymore ...
Click to expand...
Click to collapse
I just disabled the moduled,and re-enabled it when I need it.(you have to reboot every time you enable or disable it).
Axcellerator98 said:
I just disabled the moduled,and re-enabled it when I need it.(you have to reboot every time you enable or disable it).
Click to expand...
Click to collapse
You don't have to do that everytime, just :
. sync everything in facebook messenger to you account (settings>account)
. clear data & cache for facebook messenger
. launch again facebook messenger and log in again !
I just tried this module on my Galaxy Tab S7+ running stock Android 11 firmware. i was expecting a bootloop, but Android started fine. However, at first the module didnt seem to be working, everything still felt restricted as before (mostly not being able to see the full contents of certain directories, like /Android/data/ on MicroSD). And running 'mount grep | fuse' in a terminal still returned results related to internal/external storage. i did run the grep sdcardfs command before installing the module, i got plenty of references. it seem my firmware is 'strange' in that it uses a mix of fuse/sdcardfs for certain things.
Anyway, since i didnt get stuck in a bootloop, i got the feeling that the property being set by the module wasnt actually taking effect despite multiple reboots. So i hunted down all the build.prop/default.prop files in /system, /product, and /vendor. Then i edited them by adding the persist line of the module to the end of each file, followed by backing up/replacing the original files and rebooting. After rebooting it seems i can access all data/media/obb subdirectories of Android, in both internal/external storage.
i still have more tests to do, i'm not fully convinced that the module and my edits are working. and i need to narrow down exactly which of the files need to be edited, so that i can put the rest back to their original state.
For the preliminary tests i've done so far, i tested with X-Plore, Total Commander, and Root Explorer. I will soon try various things in other apps, to see what the extent of access actually is, and to see if any actions are blocked.
And before i forget, after all this, i still get fuse references when using 'mount | grep fuse', but none of them seem to be related to internal/external storage. The output of the command now is different from what i saw before editing the files.
i'm just wondering if some users can give me ideas regarding things to try, so that i can either confirm or deny that the module and my edits are doing what i expect (returning full read/write access of all internal/external storage directories to me, the device owner, rather than being restricted by Android).
Thanks!
AnonVendetta said:
I just tried this module on my Galaxy Tab S7+ running stock Android 11 firmware. i was expecting a bootloop, but Android started fine. However, at first the module didnt seem to be working, everything still felt restricted as before (mostly not being able to see the full contents of certain directories, like /Android/data/ on MicroSD). And running 'mount grep | fuse' in a terminal still returned results related to internal/external storage. i did run the grep sdcardfs command before installing the module, i got plenty of references. it seem my firmware is 'strange' in that it uses a mix of fuse/sdcardfs for certain things.
Anyway, since i didnt get stuck in a bootloop, i got the feeling that the property being set by the module wasnt actually taking effect despite multiple reboots. So i hunted down all the build.prop/default.prop files in /system, /product, and /vendor. Then i edited them by adding the persist line of the module to the end of each file, followed by backing up/replacing the original files and rebooting. After rebooting it seems i can access all data/media/obb subdirectories of Android, in both internal/external storage.
i still have more tests to do, i'm not fully convinced that the module and my edits are working. and i need to narrow down exactly which of the files need to be edited, so that i can put the rest back to their original state.
For the preliminary tests i've done so far, i tested with X-Plore, Total Commander, and Root Explorer. I will soon try various things in other apps, to see what the extent of access actually is, and to see if any actions are blocked.
And before i forget, after all this, i still get fuse references when using 'mount | grep fuse', but none of them seem to be related to internal/external storage. The output of the command now is different from what i saw before editing the files.
i'm just wondering if some users can give me ideas regarding things to try, so that i can either confirm or deny that the module and my edits are doing what i expect (returning full read/write access of all internal/external storage directories to me, the device owner, rather than being restricted by Android).
Thanks!
Click to expand...
Click to collapse
... as stated in the second post, your rom developer must add the support for sdcardfs if it is not natively supported !
@gringo80: Did you even bother to read my post in full? i *SAID* that i get entries for *BOTH* fuse and sdcardfs in terminal. So obviously, my ROM developer (Samsung) supports it.
Hi,
seems to be working great for me. File access speeds and loading of folders are improved a lot. Some apps recognize duplicate folders/files . In my case poweramp. Not all items are duplicate. But most of them.
$ mount | grep fuse
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
Reports FUSE having no links. Sdcardfs returns a lot. (Expected behavior there)
Spoiler: $ mount | grep fuse
$ mount | grep fuse
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
Spoiler: $ mount | grep sdcardfs
$ mount | grep sdcardfs
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal,unshared_obb)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb)
/data/media on /mnt/runtime/full/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb)
/mnt/media_rw/7470-1AF4 on /mnt/runtime/default/7470-1AF4 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6)
/mnt/media_rw/7470-1AF4 on /mnt/runtime/read/7470-1AF4 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/7470-1AF4 on /mnt/runtime/write/7470-1AF4 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/7470-1AF4 on /mnt/runtime/full/7470-1AF4 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=7)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb)
/mnt/media_rw/7470-1AF4 on /storage/7470-1AF4 type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6)
please close this thread.
thanks
gringo80 said:
please close this thread.
thanks
Click to expand...
Click to collapse
Thread closed on request of OP @gringo80
Axcellerator98 said:
Worked great, only problem is that Facebook Messenger stops working if you install it after the module. If you install Messenger first you just can't send any photos after you flash the module.
Click to expand...
Click to collapse
See the 2nd post for the solution +++
Please read again the 2nd post for the solution to avoid the duplicated / or unrecognized files by some apps (Instagram, Fb, Whatsapp ...)
Hello, this is a great achievment.
I discovered this pita google rubbish after hours spent trying to get my little android media box to copy over files to my usb hdd as I always had.
(prob what google is really trying to prevent)
Unfortunately freak tab forum where I would expect this info to be for these devices has shut. So im a bit left in the dark.
So would your fix work on any Android 11 rom with root. tks
My rom support ???

Categories

Resources