Custom volume and brightness for every app - Magisk

I would like to implement in Magisk possibility of setting custom volume and brightness of every app, but I completely don't know where should I start my education about android system. Is it possible to reach?
Best regards, your M16aV

Or a Module to disable the Sound in an APP.

That's a mod more suited for Xposed, not Magisk. Magisk does not alter running code like Xposed does, it simply injects new files to /system and /vendor, and runs a few scripts. All at boot.

Related

Magisk is being super weird, and another couple questions.

Whenever i use Magisk and i try safetynet test (I have francokernel so it shouldnt be an issue) and i have no modules installed it fails, with a CTS Profile Mismatch.... But if i tick core only mode and restart it passes safetynet..., i thought having no modules is the same as core only? but i need modules for Viper4Android to work... because somewhere down the line of the intense pain, i've made my device go through lol, it has practically muddled up the vendor partition, so i have to have viper installed for my audio to work properly... plus is there anyway to make the "/" part of the system stock again thanks.
You can actually modify certain parts of the system partition without tripping safetynet. Since safetynet was updated, I've decided to manually install any Magisk modules directly as /system modifications (mostly build.prop edits and a few new and modified system apps). Afterwards, turning on "core only mode" allows me to pass safetynet while continuing to keep my past modifications. The only problem with this setup is that I'll have to reflash all my modifications every time I dirty flash my ROM, whereas before Magisk would mount the mods automatically.

What are capabilities of magisk modules? Similar to xposed? Can control LED?

Can magisk module control led and vibration like gravitybox for xposed?
For example in xposed i can change vibration pattern and led color for sms, is it possible in magisk?
Also is it possible to control hardware keys like xposed edge pro?
Magisk is not Xposed. They work very differently. The first adds/deletes/changes system files without (hopefully) triggering SafetyNet whilst the latter performs on the fly patching over almost any part of Android (but triggering SafetyNet)
If what you want to do can be done on system partition by adding/removing/changing files, then you can do it with Magisk.
Please refer to each official thread for more information

Why does Magisk always clear Dalvik cache when i activate or update or deactivate

a module ?
Xposed rootless for example, at each Snapchat logon i have to deactivate/activate it, and each deactivation it's a full dalvik remake (1h).
And the switch toggle of Xposed doesn't work for SafetyNET or SnapChat, so the module have to be deactivated
It's impossible and too long !
So i don't use XPosed and don't make Update of module !
pingopower said:
a module ?
Xposed rootless for example, at each Snapchat logon i have to deactivate/activate it, and each deactivation it's a full dalvik remake (1h).
And the switch toggle of Xposed doesn't work for SafetyNET or SnapChat, so the module have to be deactivated
It's impossible and too long !
So i don't use XPosed and don't make Update of module !
Click to expand...
Click to collapse
Easy, everything has to be optimized for Xposed. But... I don't have long boot time on my device. Activate and deactivate Xposed in magisk is very quick for me. Normal boot time for both. Moto e4 on nougat 7.1.1. so it may be something specific to your device or Android version. Your device may just be very slow optimizing. Do you have a ton of apps installed? Because that makes optimization even longer. It is a very resource intensive operation.
No other modules should have that besides Xposed. Like I said, Xposed MUST optimize EVERYTHING.
pingopower said:
a module ?
Xposed rootless for example, at each Snapchat logon i have to deactivate/activate it, and each deactivation it's a full dalvik remake (1h).
And the switch toggle of Xposed doesn't work for SafetyNET or SnapChat, so the module have to be deactivated
It's impossible and too long !
So i don't use XPosed and don't make Update of module !
Click to expand...
Click to collapse
I don't know why the switch inside Xposed dont work for you. It worked for me when I used Marshmallow.
But what happens about the dalvik is that Xposed is a very complex and extended modification that can hook (and therefore alter) pretty much every app on your device. So when you "remove" or "install" it by enabling or disabling the module on magisk a dalvik wipe is triggered by the system the next time you boot.
The process is similar to when you systemize an app or updates your device, but instead of one or few apps to recompile, the system has to recompile (aka "optimize") most, if not all the apps on your system.
On Marshmallow specially, the Android uses an Ahead Of Time (AOT) compiler, meaning that all this compilation will occur on next boot, before the rest of the system can be used. To fix this problem, Google started using Just In Time (JIT) compiler from Nougat on, meaning that the optimization will occur when and if necessary, and if possible when the device is idle or not being intensely used. That's why in Nougat or Oreo this problem does not happen.

Best SELinux mode changer module? (or why were they all removed from Magisk repo?)

Hey all, I use SELinuxModeChanger apk to set Permissive mode when my device (Xperia Z5Compact) starts.
I would like to use a Magisk module to do it instead. What is the best module (simple, light on resources) to do so?
I just need the device to start in Permissive mode and that's pretty much it.
I notice all the modules that do this were removed from Magisk repo.. why is that, stability issues?
Thanks.
Because it just takes a very simple boot script, something that a Magisk module is a bit of overkill for. To keep the Magisk repo somewhat uncluttered (it's still quite messy), the decision was made to remove all modules that were just too simple.
Why do you want to change to a Magisk module? It'll do the exact same thing as your app... If you really want to skip the app, just put the following inside a file (you can name it whatever, say "selinux", doesn't even need an extension), place it in /data/adb/service.d, give it execution permission and that's it:
Code:
#!/system/bin/sh
setenforce 0
That'll change to permissive at each boot. You could do the same with an app like Tasker, etc...
Very helpful if I need to do it manually, thank you very much!
I just found this module : https://forum.xda-developers.com/apps/magisk/selinux-mode-inverter-t3775271
which I think will do the trick nicely (I like to be able to enable or disable the feature easily from within Magisk).
Didgeridoohan said:
Because it just takes a very simple boot script, something that a Magisk module is a bit of overkill for. To keep the Magisk repo somewhat uncluttered (it's still quite messy), the decision was made to remove all modules that were just too simple.
Why do you want to change to a Magisk module? It'll do the exact same thing as your app... If you really want to skip the app, just put the following inside a file (you can name it whatever, say "selinux", doesn't even need an extension), place it in /data/adb/service.d, give it execution permission and that's it:
That'll change to permissive at each boot. You could do the same with an app like Tasker, etc...
Click to expand...
Click to collapse
Nice idea, I'm using it and loving it, thanks for the info.
Thanks for the ROM. Its very stable and smooth. But i faced with one issue after last update
Any gcam is crashing except for the stock(6.2) on Pixel Experience ROM (last update10.0)I tried different cases like clean cache, removed Google photo, install other gcam mods, change SElinux. Nothing helped me. Has anyone encountered anything like this? Any solution?

Ways to dynamically skip loading modules?

Is there a way to run modules dynamically from SD? In doing so, you have a way to easily disable them by removing the SD card.
Alternatively, is there a way to choose on boot to run Magisk in "safe mode", skipping some or all modules?
Maybe Volume Key Selector could fit the bill, but anything internal to Magisk?
You've got two Magisk built-in options to disable/remove modules already:
https://topjohnwu.github.io/Magisk/faq.html#q-i-installed-a-module-and-it-bootlooped-my-device-help
Other than that you could always setup your own way of disabling modules in a post-fs-data.d script (which loads before the modules are mounted).
Regarding your SD-card question, I guess you could run some elaborate bind mount thing, but that hardly sounds worth the effort...

Categories

Resources