Magisk boot script help for pixel 2 xl

Search This thread

ronclone

Senior Member
Dec 3, 2009
64
0
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.
 

Didgeridoohan

Senior Moderator / Dev Committee / Dev Relations
Staff member
May 31, 2012
12,303
1
14,758
Gothenburg
Google Nexus 4
Nexus 6
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.
 

ronclone

Senior Member
Dec 3, 2009
64
0
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...
 
Last edited:

Didgeridoohan

Senior Moderator / Dev Committee / Dev Relations
Staff member
May 31, 2012
12,303
1
14,758
Gothenburg
Google Nexus 4
Nexus 6
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.
 

ronclone

Senior Member
Dec 3, 2009
64
0
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.
 

Didgeridoohan

Senior Moderator / Dev Committee / Dev Relations
Staff member
May 31, 2012
12,303
1
14,758
Gothenburg
Google Nexus 4
Nexus 6
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.
 

ronclone

Senior Member
Dec 3, 2009
64
0
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...
 

ronclone

Senior Member
Dec 3, 2009
64
0
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!
 
Last edited:

Typhus_

Senior Member
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!
 

Attachments

  • Blur4PixelR.zip
    2.3 KB · Views: 66

rodken

Senior Member
Jan 11, 2010
837
282
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!
Is this module device specific or will it work on other devices running Android 11?
 

Top Liked Posts