Issue with post-fs-data mode and resetprop. Can anyone help me ?

Search This thread

anupritaisno1

Senior Member
Apr 29, 2014
1,846
1,918
I am trying to make a "GoogleAssistantEnabler" magisk module, here is my post-fs-data.sh

Code:
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}

/data/magisk/resetprop ro.product.model Pixel XL
/data/magisk/resetprop ro.opa.eligible_device true

# This script will be executed in post-fs-data mode
# More info in the main Magisk thread

I've attached a screenshot of the "about phone" section of my device.

In "about phone" it says "Pixel" instead of "Pixel XL"

What am I doing wrong ?
 

Attachments

  • Screenshot_20161210-202451.png
    Screenshot_20161210-202451.png
    129.4 KB · Views: 341

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
I am trying to make a "GoogleAssistantEnabler" magisk module, here is my post-fs-data.sh

Code:
#!/system/bin/sh
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/...
# This will make your scripts compatible even if Magisk change its mount point in the future
MODDIR=${0%/*}

/data/magisk/resetprop ro.product.model Pixel XL
/data/magisk/resetprop ro.opa.eligible_device true

# This script will be executed in post-fs-data mode
# More info in the main Magisk thread

I've attached a screenshot of the "about phone" section of my device.

In "about phone" it says "Pixel" instead of "Pixel XL"

What am I doing wrong ?

Why are you making a module when one already exists that works?
 

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
I'm using it on my OnePlus One just fine.

---------- Post added at 10:22 AM ---------- Previous post was at 10:18 AM ----------

This should be the module that's in the second post. It's basically what you're trying to do.
https://r.tapatalk.com/shareLink?ur...hare_fid=3793&share_type=t&share_pid=69640307


However if you can make a module that doesn't have to edit build props and doesn't have to use the app to skip the voice training that would be awesome.
 

anupritaisno1

Senior Member
Apr 29, 2014
1,846
1,918
I'm using it on my OnePlus One just fine.

Doesn't matter. Maybe it will work on one device but it can cause a lot of damage to your phone if something important got overwritten

What I'm trying to do is use post-fs-data for safe modification.

What you're doing is replacing your entire build.prop for just 2 lines of code, not to mention that you're risking stability and also getting rid of device-specific values in build.prop
 

Link_of_Hyrule

Senior Member
Oct 12, 2010
2,060
769
Ogden, Utah
www.ubermicrostudios.com
This is the code in the module I linked to.

Code:
#!/system/bin/sh 
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 
# This will make your scripts compatible even if Magisk change its mount point in the future MODDIR=${0%/*} 
# This script will be executed in post-fs-data mode 
# More info in the main Magisk thread /data/magisk/
resetprop -n ro.product.model "Pixel XL" /data/magisk/
resetprop -n ro.opa.eligible_device true /data/magisk/
resetprop -n ro.product.manufacturer Google
 
Last edited:
  • Like
Reactions: anupritaisno1

anupritaisno1

Senior Member
Apr 29, 2014
1,846
1,918
This is the code in the module I linked to.

Code:
#!/system/bin/sh 
# Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 
# This will make your scripts compatible even if Magisk change its mount point in the future MODDIR=${0%/*} 
# This script will be executed in post-fs-data mode 
# More info in the main Magisk thread /data/magisk/
resetprop -n ro.product.model "Pixel XL" /data/magisk/
resetprop -n ro.opa.eligible_device true /data/magisk/
resetprop -n ro.product.manufacturer Google

Yeah I just read it

Thanks a lot!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    This is the code in the module I linked to.

    Code:
    #!/system/bin/sh 
    # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 
    # This will make your scripts compatible even if Magisk change its mount point in the future MODDIR=${0%/*} 
    # This script will be executed in post-fs-data mode 
    # More info in the main Magisk thread /data/magisk/
    resetprop -n ro.product.model "Pixel XL" /data/magisk/
    resetprop -n ro.opa.eligible_device true /data/magisk/
    resetprop -n ro.product.manufacturer Google
    1
    Yeah I just read it

    Thanks a lot!
    Sorry if there was confusion but it's hard to directly link to a post on tapatalk.
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