Create module magisk replace build.prop - Magisk

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

Related

How to edit build prop with magisk?

As title says i want to edit build prop, any modules or something?
@topjohnwu is currently implementing this into Magisk Manager. As for now you can use:
Code:
/data/magisk/resetprop build.prop.item value
loserskater said:
@topjohnwu is currently implementing this into Magisk Manager. As for now you can use:
Code:
/data/magisk/resetprop build.prop.item value
Click to expand...
Click to collapse
Ok im lost not sure how to do that? I need to make a module?
You can either make a module or a script that you put in /magisk/.core/post-fs-data.d. More details in the All-In-One wiki (stickied thread).
And as stated above, in upcoming versions you'll be able to change prop values in a GUI in the Magisk Manager. It's on the to-do list, but of course there's no ETA.
Didgeridoohan said:
You can either make a module or a script that you put in /magisk/.core/post-fs-data.d. More details in the All-In-One wiki (stickied thread).
And as stated above, in upcoming versions you'll be able to change prop values in a GUI in the Magisk Manager. It's on the to-do list, but of course there's no ETA.
Click to expand...
Click to collapse
Thanks, if i use magisk hide it will hide this too right?
Cheers
I added this:
/data/magisk/resetprop ro.product.model "Pixel XL"
/data/magisk/resetprop ro.opa.eligible_device true
/data/magisk/resetprop ro.product.brand "google"
/data/magisk/resetprop ro.product.manufacturer "Google"
In the post fs data of another module so i basically hacked in the build prop, but magisk hide fails (doesn't fail when i don't mess with the build prop)
metrize said:
I added this:
/data/magisk/resetprop ro.product.model "Pixel XL"
/data/magisk/resetprop ro.opa.eligible_device true
/data/magisk/resetprop ro.product.brand "google"
/data/magisk/resetprop ro.product.manufacturer "Google"
In the post fs data of another module so i basically hacked in the build prop, but magisk hide fails (doesn't fail when i don't mess with the build prop)
Click to expand...
Click to collapse
There's a module for activating Google assistant in the repo already. Have you tried that?
Didgeridoohan said:
There's a module for activating Google assistant in the repo already. Have you tried that?
Click to expand...
Click to collapse
I'm more interested in changing the device so that it thinks it's a pixel. It fails safetynet even with magisk hide when i do this though
metrize said:
I'm more interested in changing the device so that it thinks it's a pixel. It fails safetynet even with magisk hide when i do this though
Click to expand...
Click to collapse
Why?
I'm not sure about the details, but if your device doesn't match a profile Google have on their servers you won't get a CTS profile match. That might be why...
Can you pass basic integrity with the mods you made?
Didgeridoohan said:
Why?
I'm not sure about the details, but if your device doesn't match a profile Google have on their servers you won't get a CTS profile match. That might be why...
Can you pass basic integrity with the mods you made?
Click to expand...
Click to collapse
it's for google photos unlimited original backup (only on pixels)
Without the mods i did above I can pass safetynet and everything fine
With the mods nothing psses not even basic integrity.
Can build.prop be reset with magisk hide or is that functionality not possible on android?
If it could reset build.prop to the original build.prop then I would pass safetynet, but I'm not sure if magisk can do this? @topjohnwu maybe might know?
metrize said:
it's for google photos unlimited original backup (only on pixels)
Without the mods i did above I can pass safetynet and everything fine
With the mods nothing psses not even basic integrity.
Can build.prop be reset with magisk hide or is that functionality not possible on android?
If it could reset build.prop to the original build.prop then I would pass safetynet, but I'm not sure if magisk can do this? @topjohnwu maybe might know?
Click to expand...
Click to collapse
It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.
Didgeridoohan said:
There's a module for activating Google assistant in the repo already. Have you tried that?
Click to expand...
Click to collapse
Didgeridoohan said:
It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.
Click to expand...
Click to collapse
Thanks this seems promising, however i don't understand the syntax. If you have time could you tell me what to add with the build prop changes i wanted earlier in the thread. Thanks a lot for all the help
metrize said:
Thanks this seems promising, however i don't understand the syntax. If you have time could you tell me what to add with the build prop changes i wanted earlier in the thread. Thanks a lot for all the help
Click to expand...
Click to collapse
Look at how ro.debuggable, ro.secure and the other ro props are handled in the enable file. Match what you want to do to those and then add similar code with your other desired changes in the disable file.
It should be as simple as copying, pasting and changing variable names and props to match your desired setup.
Didgeridoohan said:
Look at how ro.debuggable, ro.secure and the other ro props are handled in the enable file. Match what you want to do to those and then add similar code with your other desired changes in the disable file.
It should be as simple as copying, pasting and changing variable names and props to match your desired setup.
Click to expand...
Click to collapse
Am I right in assuming when magisk hide is disabled the build prop will be changed back to the pixel one?
thanks
ok it's working just going to do the disable one
Okay, when I did the enable magiskhide and changed it, it passes safetynet but then when I changed the dsiable magiskhide file it fails safetynet now even when i enable magiskhide.. weird
core only works though with changes to both enable and disable so now im muffed
Dammit... Now you piqued my curiosity.
I'm heading to bed (shoulda done that 3 hours ago), but if you post your enable and disable files I'm sure someone can take a look at it. If not, I'm around again after a few hours of z and some breakfast.
Attached enable and disable.
(Renamed it to txt file otherwise wouldn't let it upload)
For the module it's just a system.prop module with the following lines;
# This file will be read by resetprop
# Example: Change dpi
# ro.sf.lcd_density=320
ro.product.model=Pixel
ro.product.brand=google
ro.product.manufacturer=Google
When I go core only mode, enable magisk hide then disable (to get the build prop change) then enable magisk hide again it works though. So I think it's something with the module that makes it fail
metrize said:
When I go core only mode, enable magisk hide then disable (to get the build prop change) then enable magisk hide again it works though. So I think it's something with the module that makes it fail
Click to expand...
Click to collapse
How about without the module installed and Core only mode disable?
Since you seem to have a working setup with the enable/disable scripts I'd consider just using those. You could even set up automation with Tasker or a similar app. Use the following code in a Run Shell action:
Code:
sh /magisk/.core/magiskhide/enable
And the same for the disable script.

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

[Request] OxygenOS Swap Disabler

I was noticing some weird slowdowns on my OnePlus 6 and with a little research I found out that in the last 6 months of releases, OxygenOS keeps a ~2GB swap file and actively uses it. Even if the Smart Boost option is off! More info here: https://forums.androidcentral.com/oneplus-6-6t/949148-open-betas-14-6-oneplus-6-6t.html
Basically in order to de-activate swap we need to add two lines to build.prop. This works successfully on my OnePlus 6, the swap file disappeared and the slowdowns are gone; but I cannot make a module because my only PC has blown it's PSU
persist.vendor.sys.memplus.enable=false
ro.vendor.qti.config.swap=false
Click to expand...
Click to collapse
There's absolutely no need to make a module for something that simple. A couple of options:
Make a boot script (in /data/adb/service.d or /data/adb/post-fs-data.d, start with service.d and if that doesn't work try post-fs-data.d) that uses the resetprop tool. Should look something like this:
Code:
#!/system/bin/sh
resetprop persist.vendor.sys.memplus.enable false
resetprop ro.vendor.qti.config.swap false
Don't forget to make the file executable.
Or, you can use MagiskHide Props Config (shameless plug disclaimer).
Thank you, added the script in service.d, put execute permissions and it works perfectly. I totally forgot Magisk could use bootscripts
Instantly noticed how the interface is way smoother without swap.
I tried MagiskHidePropsConfig before but even after installing everything it needed it still didn't work ("those props don't exist" or something along those lines). Probably too specialized for me to understand.
Glad you got things working. And thank you for the feedback...
That message in the module ui is simply information (if a prop does exist it'll show the current prop value). If you had entered the new value it would have updated the module scripts with your new prop and prompted you to reboot. I'll make sure to make that clearer for the next release...

Information about resetprop

Hello,
I need to tinker my build.prop file to test out a few things.
I read about resetprop, so i have a few questions.
1. What should the filename of the text file be?
2. Where do i need to paste that file for magisk to load it upon startup everytime to alter build.prop systemlessly?
Hey @Didgeridoohan please help!
Thanks.
Short answer: use MagiskHide Props Config.
Long answer when I get an opportunity.
Didgeridoohan said:
Short answer: use MagiskHide Props Config.
Long answer when I get an opportunity.
Click to expand...
Click to collapse
I tried that.
But the boot process is ridiculously slow. It takes over a minute for every boot.
I just need to change a couple of variables systemlessly.
I am reading the documentation since the last 2 days. I read about the magisk boot process from the Magisk Documentation and documentation on "Magisk Hide Props" too, but still had these doubts.
I just need to know that where should i place "resetprop" with relevant flags and options, for magisk to make changes to the fingerprint automatically on boot.
Even a brief help would suffice!
That's interesting... If you wouldn't mind, could you install the module again, set it up and then provide me with the module and Magisk logs? It should not cause that kind of boot delay...
Anyway, just like I write in the introduction of MagiskHide Props Config in the documentation, the module is just a way to make a Magisk boot script to set props using resetprop.
All you need to do to spoof a device fingerprint is to use a boot script in service.d. I've described it in the Magisk guide already, right here:
https://didgeridoohan.com/magisk/MagiskHide#hn_Spoofing_device_fingerprint
i don't know about the context, but it looks to me like it's as simple as creating a magisk module
Developer Guides
The Magic Mask for Android
topjohnwu.github.io
you'll need to place property entries in system.prop

Magisk boot script help for pixel 2 xl

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?

Categories

Resources