How to edit build prop with magisk?

Search This thread

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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.
 
  • Like
Reactions: UserNamist

metrize

Senior Member
Nov 29, 2013
156
20
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.

Thanks, if i use magisk hide it will hide this too right?

Cheers
 

metrize

Senior Member
Nov 29, 2013
156
20
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)
 
  • Like
Reactions: drdrewdown

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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)

There's a module for activating Google assistant in the repo already. Have you tried that?
 

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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

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?
 

metrize

Senior Member
Nov 29, 2013
156
20
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?
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?
 

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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?

It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.
 

metrize

Senior Member
Nov 29, 2013
156
20
There's a module for activating Google assistant in the repo already. Have you tried that?

It's possible... You can edit the enable and disable files in /magisk/.core/magiskhide/ to do what you want.

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
 

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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

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.
 

metrize

Senior Member
Nov 29, 2013
156
20
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.

Am I right in assuming when magisk hide is disabled the build prop will be changed back to the pixel one?

thanks
 

metrize

Senior Member
Nov 29, 2013
156
20
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
 
Last edited:

metrize

Senior Member
Nov 29, 2013
156
20
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
 

Attachments

  • disable.txt
    920 bytes · Views: 548
  • enable.txt
    2.6 KB · Views: 850

metrize

Senior Member
Nov 29, 2013
156
20
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
 

Didgeridoohan

Senior Moderator / Developer Relations
Staff member
May 31, 2012
11,541
11,997
Gothenburg
Google Nexus 4
Nexus 6
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

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.
 
  • Like
Reactions: metrize

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    What is it that doesn't work on 11 (I don't have any 11 devices, so if there's something that isn't working it would be great to know)?

    If you mean the SafetyNet CTS check, it's no use updating the fingerprint just yet. If it doesn't work now, it's not gonna work until Google certifies the build.
    well after playing with your Module!!! Between 2 pixel 2 xl devices 1 on 10 and second on 11 beta 3 i was using Solid Explorer and went into files and added fingerprint info manually and wifi calling props, and tethering prop. everything is working. Thanks for Your FAST Answers.
    Sometimes it just takes playing with things to understand them !!!! (I mean my Dumd azz!!!) LOL
    2
    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

    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.
    2
    It is easiest to just start with a fresh template and make a module. The template does most the work for a prop change, you just have to add the values you want and it will work.
    1
    @topjohnwu is currently implementing this into Magisk Manager. As for now you can use:
    Code:
    /data/magisk/resetprop build.prop.item value
    1
    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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone