Magisk boot script help for pixel 2 xl - Magisk

Hi guys,
I'm trying to make a script to enable the android 11 notification shade blur in my pixel 2 xl,, so far I have managed to successfully enable it with ADB with this command:
adb shell
taimen:/ $ su
taimen:/ # setprop ro.surface_flinger.supports_background_blur 1
taimen:/ # stop
taimen:/ # start
It does work fine but as soon as the phone reboots it is lost
I made a magisk module and also managed to make a setprop mod with magiskhide that does indeed successfully add ro.surface_flinger.supports_background_blur 1 in build.prop, but the mod does not work unless I adb and input the command
adb shell
taimen:/ $ su
taimen:/ # stop
taimen:/ # start
I believe this is to restart system UI.
Is there any way to do this in magisk automatically at boot?
When I input in termux
su
# stop
The phone seems to try to restart the UI but it gets stuck in google logo, unlike when I do it via adb the screen goes blank and comes back alive when I input via adb
# start
I'm a complete noob in this stuff, I would really like to make a magisk script or module that let me do this, it would be useful to try first via termux to avoid a magisk boot loop in case something goes wrong with this script. The notification blur is actually the only reason I unlocked the bootloader an rooted the phone...
Thanks in advance.

You should use Magisk's resetprop tool.
All you should need in your boot script is this:
Code:
resetprop ro.surface_flinger.supports_background_blur 1
Try using service.d first, but if that doesn't work move the script to post-fs-data.d.
Or, if you're using a module, use a system.prop file.

Does "magiskhide props config 5.3.6" uses resetprop?
I did try that in service.d and post-fs-data.d
As I said, the property does seem to be changed with the setprop, since after a restart of the phone all I need to do is
Adb shell
Su
Stop
Start
And I get the blurred notification shade...

Yes, MagiskHide Props Config uses resetprop (but there you generally don't need to change to late_start service or post-fs-data, the default should be fine most of the time).
With resetprop you shouldn't need to run stop/start. That's the difference.

I did not try the delay option. I really don't know what else I could try though...
Maybe there's a delayed script I could run with the stop/start command?
Edit: sorry if I understand what you're saying, should I delete the magiskhide props config key and instead do it manually? That way I should no need the stop/start command.

I thought you had been doing it manually all along... To quote your first post: "I'm trying to make a script", "I made a magisk module and also managed to make a setprop mod".
If the stop/start commands need to be included for this to work, making your own boot script with the resetprop command and stop/start commands is the way to go.

Yeah yeah sorry, I did manage to make the module, the setprop mod I was referring to was via magiskhide...
My problem is when I try to run this stop/start script in termux
#!/system/bin/sh
su
cd
cd data/adb
stop
start
The phone goes to google logo and is stuck there, I'm afraid if I do that with magisk I could get a non booting phone...

Does this script sounds good to you?
#!/system/bin/sh
resetprop to.surface_flinger.supports_background_blur 1
stop
start
BTW I really appreciate your help!
Edit: just ran this script from termux and stuck at google logo...
Edit 2: if anyone is wondering or maybe it helps someone I ended up making this simple script in service.d
resetprop to.surface_flinger.supports_background_blur 1
Then I discovered all I needed was the terminal command
# killall surfaceflinger
And Systemui does successfully restart with the blurred background, so I created a home screen shorcut with this terminal command and all I need to do is hit the shorcut shortly after booting and it works, it's not automatic but it gets the job done...
Thanks @Didgeridoohan for your help... XDA rocks!

Hello!
I don't know if you're still looking for this but decided to share anyway.
Attached to this post is a Magisk module that enables Background Blur that survives reboots....
It's weird that a simple Magisk module with a system.prop doesn't work but ok... had to create this version which uses a service.sh script to do the job.
You'll need Magisk, obviously.
Enjoy!
Cheers!

Thank you for making this. The double restart is kinda annoying tho

Typhus_ said:
Hello!
I don't know if you're still looking for this but decided to share anyway.
Attached to this post is a Magisk module that enables Background Blur that survives reboots....
It's weird that a simple Magisk module with a system.prop doesn't work but ok... had to create this version which uses a service.sh script to do the job.
You'll need Magisk, obviously.
Enjoy!
Cheers!
Click to expand...
Click to collapse
Is this module device specific or will it work on other devices running Android 11?

rodken said:
Is this module device specific or will it work on other devices running Android 11?
Click to expand...
Click to collapse
It should work on any device running Android 11.

Typhus_ said:
It should work on any device running Android 11.
Click to expand...
Click to collapse
Perfect - functions as expected on OnePlus 8 OOS 11.

How about android 13?

Related

MagiskSU version of su fails, saying "Permission denied"

I recently had a problem (see here) with SuperSU, so I decided to give MagiskSU a try. As it turns out, it seems to have the same issue. When I run a process that requires su, it stalls for a while. In the case of MagiskSU, I then get "Permission denied" after about 20 seconds.
Here's what I get with a few basic commands:
Code:
[email protected]:/ $ su
Permission denied
Code:
[email protected]:/ $ su -v
8:MAGISKSU (topjohnwu)
Code:
[email protected]:/ $ su -V
8
Additionally, when I view the log with adb logcat, I see the following message attributed to su:
Code:
exec am failed with 2: No such file or directory
It looks like this is a message produced here, related to loading am.jar. Unlike in my SuperSU situation, this error happens regardless of whether Magisk is set to "prompt" or "grant".
Any idea how I can debug this? Thanks in advance.
Just to make sure: Have you updated the Magisk Manager so that it's just not the stub installed by the Magisk zip?
And if so, does the Manager report you're properly rooted?
I figured it out. In a previous cleanup attempt, I failed to restore the link named /system/bin/app_process that points to /system/bin/app_process64. This fixed it:
From the TWRP terminal:
Code:
mount /system
cd /system/bin
ln -s app_process64 app_process
Frankly I'm surprised this didn't render my phone unbootable! Nothing else was noticeably affected.
I have the same problem, just logcat says:
W/Magisk: su: request rejected (2000->0)
I found a solution that worked for me, go to Magisk Manager and install "ADB & Fastboot for Android NDK" module, then reboot.
I found in the Magisk app under Superuser that "shell" had the toggle turned off. Once I turned it on, su worked in ADB.
Lletfrix said:
I found a solution that worked for me, go to Magisk Manager and install "ADB & Fastboot for Android NDK" module, then reboot.
Click to expand...
Click to collapse
You are my Hero...
:good::good::good:Thank You Very Much brooo... :good::good::good:​
Hi all,
I have Magisk v18.1 and I'm also trying to get root access from shell. When I run 'su' in a terminal emulator, I get the message 'Permission denied'.
I did install "ADB & Fastboot for Android NDK" as suggested above. I also checked the root options in the magisk app (v7.0.0) and they are all the default, nothing unusual there.
Could you kindly advice if there is anything I can do in order to get root access from the shell with Magisk?
Thanks a lot in advance
I have a same issue on kitkat
Oh boy, I have *absolutely no idea* what I did but it works now. Well, what I did was that I removed the adb & fastboot module and rebooted. When I ran 'su' again in the terminal, I got a request from magisksu to grant authorization. Not sure what's going on, but it works!
geo909 said:
Oh boy, I have *absolutely no idea* what I did but it works now. Well, what I did was that I removed the adb & fastboot module and rebooted. When I ran 'su' again in the terminal, I got a request from magisksu to grant authorization. Not sure what's going on, but it works!
Click to expand...
Click to collapse
Why did you install the ADB and fastboot module? That's for using that device to control ADB and fastboot of another device as if the device with the module were a computer.
madbat99 said:
Why did you install the ADB and fastboot module? That's for using that device to control ADB and fastboot of another device as if the device with the module were a computer.
Click to expand...
Click to collapse
Honestly, that was a classic case of not knowing what I'm doing and just blindly following what other people tried. But good to know what the purpose of that module was, I was wondering!
Hint: Perfdump is the adb shell program, do not disable SU for it
I add my hint: after getting this error message, I checkd the list of apps in Magisk SU: it turned out that I had disabled the "Perfdump" app, because I did not know what it was. It is the adb shell indeed!
I had exactly the same problem on my Android 6.0 with Magisk v19.3 + Magisk Manager v7.3.1. I tried everything, what you wrote (enabled, disabled the "ADB and fastboot" stuff, checked the symlink, ...), but nothing helped me. FYI: previously, I used LineageOS 16 (Android 9.0) on the same phone with this latest Magisk without any problem (but I decided to turn back to the original OS version to avoid instabilities). But now I'm fighting with this dragon.
My wife has Android 6.0 also w/ Magisk, but she got Magisk v18.0 and this works well now... I tried this at me, and surprisingly, that was worked well. Now, I decided to find out, which is the last working version, where is the bug.
The results:
* the Magisk v18.0 with the bundled Magisk Manager - GOOD
* the Magisk v18.0 with the latest Magisk Manager v7.3.2 - GOOD
* the Magisk v18.1 with the latest Magisk Manager v7.3.2 - GOOD
* the Magisk v19.0 with the latest Magisk Manager v7.3.2 - BAD
* the Magisk v19.1 with the latest Magisk Manager v7.3.2 - BAD
* the Magisk v19.2 with the latest Magisk Manager v7.3.2 - BAD
* the Magisk v19.3 with the latest Magisk Manager v7.3.2 - BAD
I don't know, the freshest working Magisk v18.1 + Magisk Manager v7.3.2 is a good combination for all cases, but looks working.
Lletfrix said:
I found a solution that worked for me, go to Magisk Manager and install "ADB & Fastboot for Android NDK" module, then reboot.
Click to expand...
Click to collapse
Yup thanks it still works up to date
Solved
i had the same problem on my redmi note 7 and the most easiest way is unistall your magisk 20.xxx and install a older one 19.xxx and that should do it but remember bouth zip file (flashibile zip) and magisk apk has yo be older than 20.xxx becouse the devs has made a mistake in the coding( or at leat this is what i think hope im wrong)
just update the magisk manager and install automatically the boot and reboot the phone it will be okay
Solution that works for me GalaxyS9 (starlte)
### restart adbd as root
adb root
### then
adb shell
### WORKS.
### I see '#' in prompt, `whoami` responses: 'root'
### My Magisk version. Reported by `su -v`
23.0:MAGISKSU

How to make the phone automatically enter the PIN when booting?

Hi Guys!
Recently I hope to use Tasker to do something automatically when the phone is turned on, but I found that Tasker can't start when my phone is turned on but locked.
So I wrote an Android app that uses the shell to enter the password at boot time, but even if I used DirectBoot mode(developer.android.com/training/articles/direct-boot) it still doesn't work.
So I tried to write a module using Magisk, and automatically entered the password when I booted. This time I raised succeeded.
I think there may be other people who have the same needs as me, so I do a function that can customize the password for others to use.
At first we need install AutoInputBootPinManager(github.com/ZeroingIn/AutoInputBootPinManager) to configure your PIN. The application needs to grant root privileges.
Next we download and install this module(github.com/ZeroingIn/AutoInputBootPin) and reboot phone to enjoy it.
If you have any questions, please submit an issue.
Thank you all.
Interesting idea.
There are several modules available that use a shell script UI, run through a terminal emulator, to change settings for the module. App systemizer, Unified Hosts Adblock, MagiskHide Props Config, Energized Protection, etc. Take a look at them for inspiration.
A couple of things:
An explanation of the command in post-fs-data.sh might be a good idea.
Code:
supolicy --live "allow untrusted_app default_android_service service_manager find"
And, why are you setting this prop? As far as I can tell that's for the app Brevent...
Code:
log.tag.BreventServer=DEBUG
Didgeridoohan said:
Interesting idea.
There are several modules available that use a shell script UI, run through a terminal emulator, to change settings for the module. App systemizer, Unified Hosts Adblock, MagiskHide Props Config, Energized Protection, etc. Take a look at them for inspiration.
A couple of things:
An explanation of the command in post-fs-data.sh might be a good idea.
Code:
supolicy --live "allow untrusted_app default_android_service service_manager find"
And, why are you setting this prop? As far as I can tell that's for the app Brevent(play.google.com/store/apps/details?id=me.piebridge.brevent&hl=en)...
Code:
log.tag.BreventServer=DEBUG
Click to expand...
Click to collapse
Thank you very much for your advice, I will try it. Any progress, I will be posted in this post.
The setting of this prop is my mistake, and you have carefully discovered this bug that I have not noticed.
Because I was a beginner to make the Magisk module, I didn't see the Magisk Module Template(github.com/topjohnwu/magisk-module-template) at first, so I wrote it with reference to the Privileged Api Booter(github.com/Magisk-Modules-Repo/magisk-privileged-api-booter).I will fix this problem right away.
ZeroingIn said:
Thank you very much for your advice, I will try it. Any progress, I will be posted in this post.
The setting of this prop is my mistake, and you have carefully discovered this bug that I have not noticed.
Because I was a beginner to make the Magisk module, I didn't see the Magisk Module Template(github.com/topjohnwu/magisk-module-template) at first, so I wrote it with reference to the Privileged Api Booter(github.com/Magisk-Modules-Repo/magisk-privileged-api-booter).I will fix this problem right away.
Click to expand...
Click to collapse
In that case you have a couple of more things to rectify. The first part I mentioned, about the post-fs-data.sh script is also from that module. So, I'm going to assume you do not need it for your purpose. I'd suggest removing that as well... And after you've done that, you should also go in and edit config.sh and change PROPFILE and POSTFSDATA from true to false, because you're not using them anymore. From the looks of it you're only using service.sh, so only LATESTARTSERVICE needs to be active.
Didgeridoohan said:
In that case you have a couple of more things to rectify. The first part I mentioned, about the post-fs-data.sh script is also from that module. So, I'm going to assume you do not need it for your purpose. I'd suggest removing that as well... And after you've done that, you should also go in and edit config.sh and change PROPFILE and POSTFSDATA from true to false, because you're not using them anymore. From the looks of it you're only using service.sh, so only LATESTARTSERVICE needs to be active.
Click to expand...
Click to collapse
You are right, I modified it with reference to the template.Thanks a lot.
Are you going to.update this at all?
I have a bug if you are...
I only have 1 pin... But all 3 fire... Since there's no way to stop them without deleting it from the script

[HELP] Module to disable emergency call by power button OP6

So there is a temporary solution to the problem posted here
https://forum.xda-developers.com/oneplus-5t/how-to/enable-quick-capture-india-disabling-t3739552
In brief, running the command
Code:
settings put global emergency_affordance_needed 0
disables the double click of power button to make an emergency call. But doesn't persist after a reboot
Some research and found out there is an integer array in framework res values config.xml with the name config_emergency_mcc_codes
refereance: https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml#2943
Was hoping if we can override the array to have an empty list.
If someone could help me making a magisk module for the same I would appreciate it a lot!
Thanks
It's actually quite simple...
Either make a Magisk module that runs that command in the service.sh file (don't forget to enable LATESTARTSERVICE in config.sh), or put a boot script in /sbin/.core/img/.core/service.d that does the same.
The boot script is just any file that contains the following and has execution permissions:
Code:
#!/system/bin/sh
settings put global emergency_affordance_needed 0
adv392 said:
So there is a temporary solution to the problem posted here
https://forum.xda-developers.com/oneplus-5t/how-to/enable-quick-capture-india-disabling-t3739552
In brief, running the command
Code:
settings put global emergency_affordance_needed 0
disables the double click of power button to make an emergency call. But doesn't persist after a reboot
Some research and found out there is an integer array in framework res values config.xml with the name config_emergency_mcc_codes
refereance: https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml#2943
Was hoping if we can override the array to have an empty list.
If someone could help me making a magisk module for the same I would appreciate it a lot!
Thanks
Click to expand...
Click to collapse
Can you try the attached Magisk module and see if it works for you?
Didgeridoohan said:
It's actually quite simple...
Either make a Magisk module that runs that command in the service.sh file (don't forget to enable LATESTARTSERVICE in config.sh), or put a boot script in /sbin/.core/img/.core/service.d that does the same.
The boot script is just any file that contains the following and has execution permissions:
Code:
#!/system/bin/sh
settings put global emergency_affordance_needed 0
Click to expand...
Click to collapse
Hey thanks for the quick response!
I have attached the module as per your suggestions
When I run the following command in the adb shell, I get 1 as output. The output should have been 0.
Code:
adb shell settings get global emergency_affordance_needed
1
Can you help me debug the issue?
Thanks
shadowstep said:
Can you try the attached Magisk module and see if it works for you?
Click to expand...
Click to collapse
Thanks for the quick response!
Unfortunately this doesn't seem to be working
When I run the following command in the adb shell, I get 1 as output. The output should have been 0.
Code:
adb shell settings get global emergency_affordance_needed
1
Is there any way to make the list in config.xml to a empty list?
adv392 said:
Thanks for the quick response!
Unfortunately this doesn't seem to be working
When I run the following command in the adb shell, I get 1 as output. The output should have been 0.
Code:
adb shell settings get global emergency_affordance_needed
1
Is there any way to make the list in config.xml to a empty list?
Click to expand...
Click to collapse
The wait after boot probably just needs to be longer than the 5 seconds that @shadowstep added in their module. Experiment with longer delays to see what works.
Didgeridoohan said:
The wait after boot probably just needs to be longer than the 5 seconds that @shadowstep added in their module. Experiment with longer delays to see what works.
Click to expand...
Click to collapse
Tried with 5, 10, 20, 30, 60 seconds
None of them seem to work
any other workaround?
adv392 said:
Tried with 5, 10, 20, 30, 60 seconds
None of them seem to work
any other workaround?
Click to expand...
Click to collapse
What about if you remove the delay and move the command to post-fs-data instead? You can simply edit and rename the installed module files and rename service.sh to post-fs-data.sh.

[MODULE] Debugging modules: ADB Root, SELinux Permissive, Enable Eng

These modules are not meant for everyday use. They are intended for debugging and modification of a firmware. They significantly lower security of your device while active and even could softbrick it. You've been warned.
ADB Root
Magisk Module that allows you to run "adb root". adb root is not an ordinary root (su), it's adbd daemon running on your phone with root rights. adb root allows you to "adb push/pull" to system directories and run such commands as "adb remount" or "adb disable-verify".
Download v1.0: https://github.com/evdenis/adb_root/releases/download/v1.0/adb_root.zip
Source code: https://github.com/evdenis/adb_root
Support: Telegram
SELinux Permissive
This module switches SELinux to permissive mode during boot process. This module intentionally lowers security settings of your phone. Please don't use it if there is a better solution to your problem, e.g., magiskpolicy. The module will not work if your kernel compiled with always enforcing config, e.g., stock samsung kernels. It's not possible to enable permissive mode on such kernels.
Download v2.0: https://github.com/evdenis/selinux_permissive/releases/download/v2.0/selinux_permissive_v2.0.zip
Source code: https://github.com/evdenis/selinux_permissive
Support: Telegram
Enable Eng
This Magisk Module enables engineering build props. It allows to activate debugging parts of a firmware. Please, disable Magisk Hide for this module. If you don't know what you are doing, don't use this module. It can easily softbrick your device.
Troubleshooting
If your device doesn't boot then you need to reboot to TWRP recovery and
Code:
$ adb shell rm -fr /data/adb/modules/enable_eng
If ADB doesn't work that means adbd in your firmware is build without ALLOW_ADBD_ROOT. You can fix adb autostart either by installing "ADB Root" magisk module or by disabling this module.
Download v1.0: https://github.com/evdenis/enable_eng/releases/download/v1.0/enable_eng.zip
Source code: https://github.com/evdenis/enable_eng
Support: Telegram
Kexec tools for Android
This module adds statically linked kexec binary to your system. Aarch64 only. Kexec is a system call that enables you to load and boot into another kernel from the currently running kernel. Your kernel should support kexec.
Download v1.0: https://github.com/evdenis/kexec/releases/download/v1.0/kexec.zip
Source code: https://github.com/evdenis/kexec
Support: Telegram
GDISK/Parted for Android
The module adds statically linked parted/sfdisk/fdisk/gdisk binaries to your system. Aarch64 only. These utils are standard linux tools to edit the partitions tables on disks.
Download v2.0: https://github.com/evdenis/disk/releases/download/v2.0/disk-v2.0.zip
Source code: https://github.com/evdenis/disk
Support: Telegram
Is also valid for One Plus 5 ?
Inviato dal mio ONEPLUS A5000 utilizzando Tapatalk
tmviet said:
Is also valid for One Plus 5 ?
Click to expand...
Click to collapse
Hi, these magisk modules are device independent. Yes, you can use them on One Plus 5.
evdenis said:
Hi, these magisk modules are device independent. Yes, you can use them on One Plus 5.
Click to expand...
Click to collapse
Tks. A lot [emoji6]
Inviato dal mio ONEPLUS A5000 utilizzando Tapatalk
Thanks @evdenis, this module is great! I haven't gotten the 100% desired behavior (getting adbd with actual root perms) because I'm running a 32-bit architecture (armeabi-v7a) and you've supplied only the 64-bit version of adbd, but I've been using your module to swap out 32-bit versions of different versions of adbd I have lying around (older devices). I'm a n00b when it comes to building adbd from scratch using the latest sources with your patch so I'm planning on using the adbd that came with the device and using a disassembler and a hexeditor to NOP out some calls, such as the call to minijail_enter() and see if I have any success. The original device version of adbd doesn't seem to have the functions in it that you built with the patch, but instead appears to use a bunch of minijail library functions. The device is a rooted android 8.1.0 OS, but it is only rooted systemlessly so many of the ro.* build properties affecting adb are changed well after the OS-essential portion boots rendering my efforts thus-far using the original adbd ineffective I'm guessing. I can now issue the "adb root" command from my machine, but adbd on the device is always being launched with the following command line arg "--root_seclabel=u:r:su:s0" and never gains root permissions by default (the behavior I'm trying to achieve). I can manually use "su" but this doesn't help me with push/pull requests to protected parts of the OS and chainfire's "ADB Insecure" patches adbd successfully, but I still don't get the root perms.
Do you know if the system is starting the process with reduced permissions (i.e. adbd will never be able to gain root access on its own no matter what I modify) and I should go a different route like modifying something else in the system rather than adbd? Again, I've already modified the ro.* properties affecting adbd so it does attempt to re-launch itself as root, it just doesn't end up getting the root perms. Manually launching adbd after killing it from within a shell on the device doesn't seem to affect the permissions in ultimately gets.
If you are anyone has any insight as to what I need to do so that adbd gains root permission, that would be much appreciated.
bpaxda said:
I'm planning on using the adbd that came with the device and using a disassembler and a hexeditor to NOP out some calls, such as the call to minijail_enter() and see if I have any success.
Click to expand...
Click to collapse
It was my initial attempt to gain "adb root" on samsung s10. And noping a couple of calls is not enough on the phone. adbd binary on your device could be compiled without "adb root" branch. This is the case on samsung s10. If "adb root" branch exists one need to force should_drop_privileges() function to return false (https://android.googlesource.com/platform/system/core/+/refs/heads/master/adb/daemon/main.cpp#65) in order to get into the "adb root" branch of code (https://android.googlesource.com/platform/system/core/+/refs/heads/master/adb/daemon/main.cpp#151).
bpaxda said:
ro.* build properties affecting adb are changed well after the OS-essential portion boots rendering my efforts thus-far using the original adbd ineffective I'm guessing.
Click to expand...
Click to collapse
You could try enable_eng magisk module (https://github.com/evdenis/enable_eng). The module changes ro.* props to engineering build props. Depending on a firmware this could help to get "adb root". However, no guaranties that the module will not softbrick your device. In case of softbrick you will need to reboot to TWRP and delete the module, instruction is in the README.md.
bpaxda said:
I can now issue the "adb root" command from my machine, but adbd on the device is always being launched with the following command line arg "--root_seclabel=u:r:su:s0" and never gains root permissions by default (the behavior I'm trying to achieve).
Click to expand...
Click to collapse
Try to disable SELinux either with the magisk module or with a script.
Thanks for your response.
I think you're right. Despite having adjusted the ro properties post-boot, there was nothing in ADB that would change the privileges as if it has been compiled out. By sheer luck, I managed to grab adbd from an identical device that had a recent forced firmware update, but the "improved adbd" actually let me get closer. The updated adbd had code changes to its adbd_main function so that it at least looks at the properties "ro.secure" and "service.adb.root" not to mention new calls to minijail_capbset_drop(), minijail_change_gid() and minijail_change_uid(). Using magisk to dynamically replace my original adbd binary with this updated one actually worked in getting adbd to start root shells without needing to invoke "su"!
However its a weird type of root that can't read certain files like /verity_key but I can see some things I should be able to see as root. I'm no SELinux expert, but my guess is that if everything is functioning correctly, I may be getting an SELinux "restricted" root. In this case, it might be the most I can expect from an SELinux enabled kernel launching adbd as root. Let me explain: since I'm using Magisk, post-boot systemlessly, (the system boots restricted and then I use the mtk_su exploit, to gain root and disable permissive SELinux mode), I'm getting permissive root on a session by session basis. I think the nature of this type of root means the kernel is probably still locked down and thus whatever daemon may be responsible for launching adbd remains locked down. Does this sound correct to you? If so, I can live with that
I'd love to get TWRP on this device, but I'm not sure its possible since TWRP doesn't list my device as supported on their website nor can I get into fastboot mode (I didn't try that hard because I wanted to exhaust other options before flashing anything). Do you think enable_eng would work *after* the ACTION_BOOT_COMPLETE event is processed? I.e. my device is rooted after bootup by a script which runs the exploit, but it is well after the system is fully running and locked-down. Luckily Magisk has a utility to change ro properties, but some of those properties are not looked-at by the system this late in the boot stage. Do you think in this case "enable_eng" would work for me? Thanks again!
bpaxda said:
Let me explain: since I'm using Magisk, post-boot systemlessly, (the system boots restricted and then I use the mtk_su exploit, to gain root and disable permissive SELinux mode), I'm getting permissive root on a session by session basis.
Click to expand...
Click to collapse
I'm not sure that my modules will work with this rooting scenario. As far as I could understand, magisk by default replaces the init process, patches selinux policy before it is loaded and next, calls the original init binary. I don't think that it will be possible to alter selinux policy with different boot scenario for magisk.
bpaxda said:
Do you think enable_eng would work *after* the ACTION_BOOT_COMPLETE event is processed? I.e. my device is rooted after bootup by a script which runs the exploit, but it is well after the system is fully running and locked-down. Luckily Magisk has a utility to change ro properties, but some of those properties are not looked-at by the system this late in the boot stage. Do you think in this case "enable_eng" would work for me?
Click to expand...
Click to collapse
I'm not sure that enable_eng will work. adbd daemon check some properties such as ro.secure dynamically, but they could be cached after the boot. I don't know the ways to drop the cache and re-read these properties (altered with magisk) after the boot. Here are the main properties the modules changes https://github.com/evdenis/enable_eng/blob/master/system.prop
Thanks for making this tool! I'm just wondering if I need to modify my adb to use the module - I run "adb root" normally and get "adbd cannot run as root in production builds" still
Anyone know why when i install SELinux Permissive version 2.0 of the module it still states version 1 in Magisk?
I flashed this in Magisk and rebooted. Now my phone is stuck in a boot loop. Any ideas? I'm using Sony Xperia XZ1 compact.
cheeklitched said:
I flashed this in Magisk and rebooted. Now my phone is stuck in a boot loop. Any ideas? I'm using Sony Xperia XZ1 compact.
Click to expand...
Click to collapse
If you have twrp installed just uninstall and reinstall magisk.
Otherwise,
Boot to bootloader and flash your boot.img file
Code:
fastboot flash boot boot.img
Then let phone boot. Reboot to bootloader again. Flash magisk_patched.img
Code:
fastboot flash boot magisk_patched.img
During startup, as soon as you get to the Google logo, hold the volume button down. This should start the phone in safe mode. See if it loads. If not, reboot phone, and execute this in terminal/command prompt:
Code:
adb wait-for-device shell magisk --remove-modules
This should allow the phone to start up all the way. Enable whatever modules you want. You may need to flash magisk_patched.img again.
This has fixed multiple problems for me. It's redundant, but it tends to work.
I installed the Magisk selinux script, but after installing it no longer shows in Magisk, so how do I dissable/undo/uninstall the script? I installed a Selinux checker and it says it is on permissive, so the scrip must have installed, but I want to remove it. Is there an undo script, or can I manually delete the script in my root filesystem? THX
Hello guys
I used Redmi K20 pro with Eu rom 10.4, android 10.
I used the lastest version of this module but my devices was not found on ADB system on my computer.
So what I do now? I tried to fix it but I cannot find anything about it.
Recently, setting SElinux to permissive is not advised. I had a issue with V4A setting my SElinux to permissive permenantly, but editing the magisk module to set SElinux to enforcing instead of permissive also works.
This is probs the only module that actually sets SElinux properly.
Here's the modded magisk module with the same credited creator, but just sets SElinux to Enforcing instead of permissive
OMFG I THINK THIS IS WHAT IVE BEEN LOOKING FOR. TEH HOLY GRAILLLLL OMGOMGOMG THANK YOU THANK YOU THANK YOUUUUU
Will ADB Root work for Android 8.1?
evdenis said:
These modules are not meant for everyday use. They are intended for debugging and modification of a firmware. They significantly lower security of your device while active and even could softbrick it. You've been warned.
ADB Root
Magisk Module that allows you to run "adb root". adb root is not an ordinary root (su), it's adbd daemon running on your phone with root rights. adb root allows you to "adb push/pull" to system directories and run such commands as "adb remount" or "adb disable-verify".
Download v1.0: https://github.com/evdenis/adb_root/releases/download/v1.0/adb_root.zip
Source code: https://github.com/evdenis/adb_root
Support: Telegram
SELinux Permissive
This module switches SELinux to permissive mode during boot process. This module intentionally lowers security settings of your phone. Please don't use it if there is a better solution to your problem, e.g., magiskpolicy. The module will not work if your kernel compiled with always enforcing config, e.g., stock samsung kernels. It's not possible to enable permissive mode on such kernels.
Download v2.0: https://github.com/evdenis/selinux_permissive/releases/download/v2.0/selinux_permissive_v2.0.zip
Source code: https://github.com/evdenis/selinux_permissive
Support: Telegram
Enable Eng
This Magisk Module enables engineering build props. It allows to activate debugging parts of a firmware. Please, disable Magisk Hide for this module. If you don't know what you are doing, don't use this module. It can easily softbrick your device.
Troubleshooting
If your device doesn't boot then you need to reboot to TWRP recovery and
Code:
$ adb shell rm -fr /data/adb/modules/enable_eng
If ADB doesn't work that means adbd in your firmware is build without ALLOW_ADBD_ROOT. You can fix adb autostart either by installing "ADB Root" magisk module or by disabling this module.
Download v1.0: https://github.com/evdenis/enable_eng/releases/download/v1.0/enable_eng.zip
Source code: https://github.com/evdenis/enable_eng
Support: Telegram
Kexec tools for Android
This module adds statically linked kexec binary to your system. Aarch64 only. Kexec is a system call that enables you to load and boot into another kernel from the currently running kernel. Your kernel should support kexec.
Download v1.0: https://github.com/evdenis/kexec/releases/download/v1.0/kexec.zip
Source code: https://github.com/evdenis/kexec
Support: Telegram
GDISK/Parted for Android
The module adds statically linked parted/sfdisk/fdisk/gdisk binaries to your system. Aarch64 only. These utils are standard linux tools to edit the partitions tables on disks.
Download v2.0: https://github.com/evdenis/disk/releases/download/v2.0/disk-v2.0.zip
Source code: https://github.com/evdenis/disk
Support: Telegram
Click to expand...
Click to collapse
how can i make permissive enfocing because in 2022 i heard thats a BIG security risk and my custom ROM (havoc os) if selinux permissive

Create module magisk replace build.prop

Hello everyone, I try to create a module to replace my build.prop because I do not please change it (system play only).
I do not understand much to magisk modules, can someone make me the module or I can put my build,prop please?
Or if impossible to replace the buil.prop by magisk, can be add the line :
persist.debug.wfd.enable=1
Thank you I've been trying since yesterday and I really can't do it so it seems to be simple
You don't need a module to do that.
Edit: For future reference... I've been reminded that persist props are, well, persistent. No boot script is needed, just run the resetprop command and the value will remain set even across reboots. Until a new value is set, of course.
Simplest way is to just use a boot script and the resetprop tool:
Code:
resetprop persist.debug.wfd.enable 1
Or if you really want to use a module you'll just have to add the line to system.prop and nothing else:
Code:
persist.debug.wfd.enable=1
Or you could use MagiskHide Props Config and the custom prop feature.
And Magisk doesn't actually alter the build.prop file:
https://github.com/Magisk-Modules-R...etting-a-custom-prop-or-removing-a-prop-value
Thank you for this quick response. I'm going to try to figure out how to do this script because I really don't know all this
Hi, I solved the problem with the module activated and in termux
Code:
su
Props resetprop persist.debug.wfd.enable 1
Now he finds the TV but restarts the phone as soon as he connects on it
If you're having problems creating a boot script it might be easier to use the MagiskHide Props Config module. It'll do it for you.
Hi, I aI think I did it. Here's how to do it with the installed module magiskhide props
Code:
su
Props resetprop persist.debug.wfd.enable=1
He finds me the TV, but as soon as he connects to the phone restarts is there a way to solve this problem?
chuppito said:
Hi, I aI think I did it. Here's how to do it with the installed module magiskhide props
Code:
su
Props resetprop persist.debug.wfd.enable=1
He finds me the TV, but as soon as he connects to the phone restarts is there a way to solve this problem?
Click to expand...
Click to collapse
I'm not sure what you're doing there, but that's not right...
If you're gonna use MagiskHide Props Config, just run
Code:
su
props
And then pick the "Add/edit custom props" menu (#4). Follow the on-screen instructions to set your prop.
If you're going to use resetprop as a standalone tool you run:
Code:
su
resetprop persist.debug.wfd.enable 1
That will only survive until a reboot though, which is why you would have to put the line in a service.d boot script if you want it to be permanent.
Edit: For future reference... I've been reminded that persist props are, well, persistent. No boot script is needed, just run the resetprop command and the value will remain set even across reboots. Until a new value is set, of course.
If I use props, I have no options
If I use setprop it doesn't tell me anything
Edit :
With props where I have more options I managed to do.
It was already on 1 while it started again several times.
I watch as soon as I get home if it connects or restarts as soon as it tries
The TV is well detected but as soon as I try to connect, the phone makes a small reboot
chuppito said:
If I use props, I have no options
If I use setprop it doesn't tell me anything
Edit :
With props where I have more options I managed to do.
It was already on 1 while it started again several times.
I watch as soon as I get home if it connects or restarts as soon as it tries
Click to expand...
Click to collapse
Does your edit mean you figured it out? If you didn't, here goes:
From your first screenshot, showing the props module ui, it tells you to "Enter the prop to set". So if you enter persist.debug.wfd.enable you'll get to the next screen where you can enter your desired value (and also see what the current value, if any, is).
The second screenshot is exactly as it should be. You're not supposed to get any feedback if it works.
About your other issues, I have no idea...
Yes I was able to understand how it works. I found a post for other problems on xda, if I understand, google deleted files last July to make this trick obsolete and sell its chomecast

Categories

Resources