Making Safetynet (CTS Profile) Pass on ROG II - CN Rom - ASUS ROG Phone II Questions & Answers

Hey Guys,
Any ideas?
I tried extracting my P30 Pro Values and made a script. (In Service.d with 0777 Permission)
#!/system/bin/sh
resetprop ro.debuggable 0
resetprop ro.secure 1
resetprop ro.build.type user
resetprop ro.build.tags release-keys
resetprop ro.build.description VOG-L29-user 9 HUAWEIVOG-L29 153C185 release-keys
resetprop ro.build.fingerprint HUAWEI/VOG-L29/HWVOG:9/HUAWEIVOG-L29/153C185:user/release-keys
resetprop ro.bootimage.build.fingerprint HUAWEI/VOG-L29/HWVOG:9/HUAWEIVOG-L29/153C185:user/release-keys
resetprop ro.build.version.security_patch 2019-08-01
Click to expand...
Click to collapse
Still the CTS profile fails, Any ideas how to make it pass?

have you tried https://droidholic.com/fix-cts-profile-mismatch-errors/ ?

z3r0h said:
have you tried https://droidholic.com/fix-cts-profile-mismatch-errors/ ?
Click to expand...
Click to collapse
Didn't help much.

Having the same problem on it.
Try to install two magisk module and it doesn't help.
MagiskHide Props Config
SafetyPatch

attachsnow said:
Having the same problem on it.
Try to install two magisk module and it doesn't help.
MagiskHide Props Config
SafetyPatch
Click to expand...
Click to collapse
Not really sure where is the problem.
Need to probably emulate starting from device name itself.

JazonX said:
Not really sure where is the problem.
Need to probably emulate starting from device name itself.
Click to expand...
Click to collapse
After flashing WW rom on CN device, I try to search prop value.
Maybe we can try those info first?
Search CN:
[persist.asus.ship_location]: [CN]
[ro.boot.country_code]: [CN]
[ro.build.fingerprint]: [asus/CN_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys]
[ro.config.versatility]: [CN]
[ro.product.carrier]: [ASUS-ASUS_I001D-CN]
[ro.product.name]: [CN_I001D]
[ro.product.vendor.name]: [CN_I001D]
[ro.vendor.build.fingerprint]: [asus/CN_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys]
Search WW:
[ro.asus.build.version]: [asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys]
[ro.asus.product.name]: [WW_I001D]
[ro.bootimage.build.fingerprint]: [asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys]
[ro.build.asus.sku]: [WW]
[ro.build.csc.version]: [WW_ZS660KL-16.0622.1906.19-0]
[ro.build.description]: [WW_Phone-user 9 PKQ1.190414.001 16.0622.1906.19-0 release-keys]
[ro.build.display.id]: [PKQ1.190414.001.WW_Phone-16.0622.1906.19-0]
[ro.build.flavor]: [WW_Phone-user]
[ro.build.fota.version]: [WW_Phone-16.0622.1906.19-0]

Okay, I know how to workaround it.
But it is just workaround. Use adb shell to do this:
su
resetprop ro.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
stop;start
cts profile will pass until you restart. (Yes, restart will get fail again.)
By the way, we cannot use this method if your device is unroot.

Hi all,
If you are using CN device and flash WW rom with Magisk root, you can use this method for pass cts profile:
Create init.sh in /sbin/.core/img/.core/service.d as the following code:
#! /system/bin/sh
sleep 10
resetprop persist.asus.ship_location WW
resetprop ro.boot.country_code WW
resetprop ro.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
resetprop ro.config.versatility WW
resetprop ro.product.carrier ASUS-ASUS_I001D-WW
resetprop ro.product.name WW_I001D
resetprop ro.product.vendor.name WW_I001D
resetprop ro.vendor.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
stop;start
You can modify sleep time to any if you like. I set 0 for now but maybe it will let boot not fully complete.
And before try it, backup your data first.
Thanks.

attachsnow said:
Hi all,
If you are using CN device and flash WW rom with Magisk root, you can use this method for pass cts profile:
Create init.sh in /sbin/.core/img/.core/service.d as the following code:
#! /system/bin/sh
sleep 10
resetprop persist.asus.ship_location WW
resetprop ro.boot.country_code WW
resetprop ro.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
resetprop ro.config.versatility WW
resetprop ro.product.carrier ASUS-ASUS_I001D-WW
resetprop ro.product.name WW_I001D
resetprop ro.product.vendor.name WW_I001D
resetprop ro.vendor.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
stop;start
You can modify sleep time to any if you like. I set 0 for now but maybe it will let boot not fully complete.
And before try it, backup your data first.
Thanks.
Click to expand...
Click to collapse
Device wont boot. It's stuck in the Bootanimation splash screen.
Any ideas to recover other than Re-flash the whole thing again?

attachsnow said:
Okay, I know how to workaround it.
But it is just workaround. Use adb shell to do this:
su
resetprop ro.build.fingerprint asus/WW_I001D/ASUS_I001_1:9/PKQ1.190414.001/16.0622.1906.19-0:user/release-keys
stop;start
cts profile will pass until you restart. (Yes, restart will get fail again.)
By the way, we cannot use this method if your device is unroot.
Click to expand...
Click to collapse
almost bricked but never mind, fixed it\
I was getting "unable to connect to google services" before, but now it's "payload invalidation".....
safety passes in core mode but not normal magisk mode
edexposed is triggering it but forcing blacklist on gsm/gsf doesn't solve it.

Related

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

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 ?
anupritaisno1 said:
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 ?
Click to expand...
Click to collapse
Why are you making a module when one already exists that works?
Link_of_Hyrule said:
Why are you making a module when one already exists that works?
Click to expand...
Click to collapse
That was a cache mod which is no longer is supported by magisk
anupritaisno1 said:
That was a cache mod which is no longer is supported by magisk
Click to expand...
Click to collapse
No there is a new one that isn't a cache mod. I think it's in that same thread a few pages in.
Link_of_Hyrule said:
No there is a new one that isn't a cache mod. I think it's in that same thread a few pages in.
Click to expand...
Click to collapse
Well can you link me to it ?
There is a link on the last page of this thread but I can't directly link since I'm on mobile http://forum.xda-developers.com/showthread.php?t=3478316
Link_of_Hyrule said:
There is a link on the last page of this thread but I can't directly link since I'm on mobile http://forum.xda-developers.com/showthread.php?t=3478316
Click to expand...
Click to collapse
I just checked it
It looks like it's only for nexus devices
I'm trying to use post-fs-data mode for universal device support. What you linked me to simply tells magisk to replace the build.prop
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.
Link_of_Hyrule said:
I'm using it on my OnePlus One just fine.
Click to expand...
Click to collapse
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
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
Link_of_Hyrule said:
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
Click to expand...
Click to collapse
Yeah I just read it
Thanks a lot!
anupritaisno1 said:
Yeah I just read it
Thanks a lot!
Click to expand...
Click to collapse
Sorry if there was confusion but it's hard to directly link to a post on tapatalk.

Question : "magisk hide unable to watch hidelist" any way to fix?

i use oneplus 3 with OxygenOs 3.5.5 when i use the rom (stock) and install magisk and enable magisk hide it hides root and safetynet succeed and it unmounts
But when i start from the beginning on the stock rom and install RR on the rom (customrom) and full unroot and reinstall magisk and enable magisk hide and reboot i get this in the log and it doesn't unmount :
HTML:
MagiskHide: starting MagiskHide Daemon
MagiskHide: Unable to watch /magisk/.core/magiskhide/hidelist
any help please to get it to unmount and hide root ?
to know after i installed RR and full unrooted safetynet passed
ahmedsasker said:
i use oneplus 3 with OxygenOs 3.5.5 when i use the rom (stock) and install magisk and enable magisk hide it hides root and safetynet succeed and it unmounts
But when i start from the beginning on the stock rom and install RR on the rom (customrom) and full unroot and reinstall magisk and enable magisk hide and reboot i get this in the log and it doesn't unmount :
HTML:
MagiskHide: starting MagiskHide Daemon
MagiskHide: Unable to watch /magisk/.core/magiskhide/hidelist
any help please to get it to unmount and hide root ?
to know after i installed RR and full unrooted safetynet passed
Click to expand...
Click to collapse
Run the following commands in a terminal emulator:
Code:
su
cd /magisk/.core/magiskhide
sh disable
sh enable
You're probably gonna get an output that the hidelist can't be created because of a permissions issue. That probably means the Magisk image doesn't get mounted properly at boot.
Another user (@gunner007dc) that had this issue fixed it by using a different kernel.
Didgeridoohan said:
Run the following commands in a terminal emulator:
Code:
su
cd /magisk/.core/magiskhide
sh disable
sh enable
You're probably gonna get an output that the hidelist can't be created because of a permissions issue. That probably means the Magisk image doesn't get mounted properly at boot.
Another user (@gunner007dc) that had this issue fixed it by using a different kernel.
Click to expand...
Click to collapse
that is what i get and safetynet doesn't pass still ..
Code:
[email protected]:/magisk/.core/magiskhide # sh disable
MagiskHide: Stopping MagiskHide daemon
disable[27]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
1|[email protected]:/magisk/.core/magiskhide # sh enable
MagiskHide: Removing dangerous read-only system props
touch: '/magisk/.core/magiskhide/hidelist': Read-only file system
chmod: chmod '/magisk/.core/magiskhide' to 40755: Read-only file system
chmod: chmod 'rm' to 100755: Read-only file system
chmod: chmod 'list' to 100755: Read-only file system
chmod: chmod 'enable' to 100755: Read-only file system
chmod: chmod 'disable' to 100755: Read-only file system
chmod: chmod 'add' to 100755: Read-only file system
grep: /magisk/.core/magiskhide/hidelist: Bad file descriptor/magisk/.core/magiskhide/add[14]: [: 0: unexpected operator/operand
enable[65]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
MagiskHide: Starting MagiskHide daemon
to know without the magisk and have root removed with the custom rom the safetynet passes so what is wrong ?
if magisk doesn't get mounted properly how could i fix that ?
i tried to install another karnel whick support systemless root and i got bootloop maybe cuz of the custom rom RR so i can't install another karnel while the one i tried the only one i saw that support systemless root
please anyway to make magisk work ? (i tried the two versions under 12.0 too)
ahmedsasker said:
that is what i get and safetynet doesn't pass still ..
Code:
[email protected]:/magisk/.core/magiskhide # sh disable
MagiskHide: Stopping MagiskHide daemon
disable[27]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
1|[email protected]:/magisk/.core/magiskhide # sh enable
MagiskHide: Removing dangerous read-only system props
touch: '/magisk/.core/magiskhide/hidelist': Read-only file system
chmod: chmod '/magisk/.core/magiskhide' to 40755: Read-only file system
chmod: chmod 'rm' to 100755: Read-only file system
chmod: chmod 'list' to 100755: Read-only file system
chmod: chmod 'enable' to 100755: Read-only file system
chmod: chmod 'disable' to 100755: Read-only file system
chmod: chmod 'add' to 100755: Read-only file system
grep: /magisk/.core/magiskhide/hidelist: Bad file descriptor/magisk/.core/magiskhide/add[14]: [: 0: unexpected operator/operand
enable[65]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
MagiskHide: Starting MagiskHide daemon
to know without the magisk and have root removed with the custom rom the safetynet passes so what is wrong ?
if magisk doesn't get mounted properly how could i fix that ?
i tried to install another karnel whick support systemless root and i got bootloop maybe cuz of the custom rom RR so i can't install another karnel while the one i tried the only one i saw that support systemless root
please anyway to make magisk work ? (i tried the two versions under 12.0 too)
Click to expand...
Click to collapse
Looks like what for a strange reason /magisk is mounted as read-only. Try mount as rw:
Code:
mount -w -o remount /magisk
Deic said:
Looks like what for a strange reason /magisk is mounted as read-only. Try mount as rw:
Code:
mount -w -o remount /magisk
Click to expand...
Click to collapse
Code:
[email protected]:/ $ su
[email protected]:/ # mount -w -o remount /magisk
[email protected]:/ # cd /magisk/.core/magiskhide
[email protected]:/magisk/.core/magiskhide # she disable
sh: she: not found
127|[email protected]:/magisk/.core/magiskhide # sh disable
MagiskHide: Stopping MagiskHide daemon
disable[27]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
1|[email protected]:/magisk/.core/magiskhide # sh enable
MagiskHide: Removing dangerous read-only system props
touch: '/magisk/.core/magiskhide/hidelist': Read-only file system
chmod: chmod '/magisk/.core/magiskhide' to 40755: Read-only file system
chmod: chmod 'rm' to 100755: Read-only file system
chmod: chmod 'list' to 100755: Read-only file system
chmod: chmod 'enable' to 100755: Read-only file system
chmod: chmod 'disable' to 100755: Read-only file system
chmod: chmod 'add' to 100755: Read-only file system
grep: /magisk/.core/magiskhide/hidelist: Bad file descriptor/magisk/.core/magiskhide/add[14]: [: 0: unexpected operator/operand
enable[65]: can't open /magisk/.core/magiskhide/hidelist: No such file or directory
MagiskHide: Starting MagiskHide daemon
[email protected]:/magisk/.core/magiskhide #
I still get the same result ...
ahmedsasker said:
I still get the same result ...
Click to expand...
Click to collapse
If you type just:
Code:
su
mount
and look for a line that starts something like:
Code:
/dev/block/loop0 on /magisk
In the parenthesis at the end of the line, the text should start with "rw". Does it?
Didgeridoohan said:
If you type just:
Code:
su
mount
and look for a line that starts something like:
Code:
/dev/block/loop0 on /magisk
In the parenthesis at the end of the line, the text should start with "rw". Does it?
Click to expand...
Click to collapse
No it it does start with ro
Code:
/dev/block/loop0 on /magisk type ext4 (ro,seclabel,noatime,data=ordered)
ahmedsasker said:
No it it does start with ro
Code:
/dev/block/loop0 on /magisk type ext4 (ro,seclabel,noatime,data=ordered)
Click to expand...
Click to collapse
Ok. Next, try:
Code:
mount -o remount,rw /magisk
If that doesn't work, try:
Code:
mount -o remount,rw -t ext4 /dev/block/loop0 /magisk
Didgeridoohan said:
Ok. Next, try:
Code:
mount -o remount,rw /magisk
If that doesn't work, try:
Code:
mount -o remount,rw -t ext4 /dev/block/loop0 /magisk
Click to expand...
Click to collapse
I tried both and it keeps telling me that it is read-only
Code:
[email protected]:/ $ su
[email protected]:/ # mount -o remount,rw /magisk
'/dev/block/loop0' is read-only
ount -o remount,rw -t ext4 /dev/block/loop0 /magisk <
'/dev/block/loop0' is read-only
ahmedsasker said:
I tried both and it keeps telling me that it is read-only
Code:
[email protected]:/ $ su
[email protected]:/ # mount -o remount,rw /magisk
'/dev/block/loop0' is read-only
ount -o remount,rw -t ext4 /dev/block/loop0 /magisk <
'/dev/block/loop0' is read-only
Click to expand...
Click to collapse
Hm... I have no idea...
From your earlier posts I assume you've already uninstalled and reinstalled Magisk a few times, right? Have you tried an unofficial beta snapshot (both Magisk and the Manager)?
I still say you should try a different kernel. I don't know what you mean with "supports systemless root", but I'd try flashing a kernel like Elemental over the one that comes with RR and then install Magisk. Maybe even try installing and running Kernel Auditor, like it says in the link I posted earlier.
Didgeridoohan said:
Hm... I have no idea...
From your earlier posts I assume you've already uninstalled and reinstalled Magisk a few times, right? Have you tried an unofficial beta snapshot (both Magisk and the Manager)?
I still say you should try a different kernel. I don't know what you mean with "supports systemless root", but I'd try flashing a kernel like Elemental over the one that comes with RR and then install Magisk. Maybe even try installing and running Kernel Auditor, like it says in the link I posted earlier.
Click to expand...
Click to collapse
I meant that it was written that it supports systemless root in the XDA forums plus I tried to flash elementalx karnel and went into boot loop ...
I'll try the snapshot one now and thanks alot <3
ahmedsasker said:
I meant that it was written that it supports systemless root in the XDA forums plus I tried to flash elementalx karnel and went into boot loop ... How can I uninstall the elementalx karnel to try another one without reflashing the whole rom ?
I'll try the snapshot one now and thanks alot <3
Click to expand...
Click to collapse
Dirty flash the ROM or open up the ROM zip, extract the boot.img and flash that in TWRP.
Didgeridoohan said:
Dirty flash the ROM or open up the ROM zip, extract the boot.img and flash that in TWRP.
Click to expand...
Click to collapse
OMG thanks alot it works well now and passes with the snapshot version <3
thanks again x3
Didgeridoohan said:
Dirty flash the ROM or open up the ROM zip, extract the boot.img and flash that in TWRP.
Click to expand...
Click to collapse
please do you know compatible version of systemless xposed with snapshot magisk ! cuz latest v87 after I flash it, closed installer says that there's not framework installed but normal official one works
systemless xposed v87 was working fine on magisk v12
i installed the official one now and it is working very well
what is the difference between systemless xposed and the normal one ? (cuz both got caught by safety net)
ahmedsasker said:
please do you know compatible version of systemless xposed with snapshot magisk ! cuz latest v87 after I flash it, closed installer says that there's not framework installed but normal official one works
systemless xposed v87 was working fine on magisk v12
i installed the official one now and it is working very well
what is the difference between systemless xposed and the normal one ? (cuz both got caught by safety net)
Click to expand...
Click to collapse
It's very likely the Xposed Magisk module needs to be updated to work with v13... I don't use Xposed though, so I wouldn't know.
The difference between system and systemless xposed is that one is installed into system and the other one is systemless. :laugh: Seriously... That's the difference. They'll both trigger SafetyNet. Systemlessness is not about passing SafetyNet.
Didgeridoohan said:
Run the following commands in a terminal emulator:
Code:
su
cd /magisk/.core/magiskhide
sh disable
sh enable
You're probably gonna get an output that the hidelist can't be created because of a permissions issue. That probably means the Magisk image doesn't get mounted properly at boot.
Another user (@gunner007dc) that had this issue fixed it by using a different kernel.
Click to expand...
Click to collapse
In my device, no file in /magisk/...why?:crying::crying:
Hooxp17 said:
In my device, no file in /magisk/...why?:crying::crying:
Click to expand...
Click to collapse
No idea. I can't see your device and I can't read your mind... Meaning: you've given very few details.
I'm gonna make a guess though: are you taking about the ".core" folder? It's a hidden folder, so if your file explorer isn't set to see hidden files and folders you won't see it.
If this is not your issue, give more details.
Didgeridoohan said:
Dirty flash the ROM or open up the ROM zip, extract the boot.img and flash that in TWRP.
Click to expand...
Click to collapse
Which ROM? How to Dirty Flash? I have G5 Plus
brandonsisco said:
Which ROM? How to Dirty Flash? I have G5 Plus
Click to expand...
Click to collapse
Uhm... That was a specific advice for a specific issue...
What's your issue?
Didgeridoohan said:
Run the following commands in a terminal emulator:
Code:
su
cd /magisk/.core/magiskhide
sh disable
sh enable
You're probably gonna get an output that the hidelist can't be created because of a permissions issue. That probably means the Magisk image doesn't get mounted properly at boot.
Another user (@gunner007dc) that had this issue fixed it by using a different kernel.
Click to expand...
Click to collapse
hello, i have a problem with magisk, so i found your post. but in the terminal emulator can't see this file.. can you help me?

How to change the value of ro.config.tima Systemless-ly?

Hello!
I am trying to change the value of the 'ro.config.tima' property from 1 to 0 using a boot script and resetprop,
I made a file in /data/adb/post-fs-data.d called 'resetprop.sh' and I put this into it:
Code:
#!/system/bin/sh
resetprop ro.config.tima 0
Then, I gave it execution permissions and rebooted, only to see that the value was still 1...
So I tried again, but this time I added other properties to that file to make sure that the script was running:
Code:
#!/system/bin/sh
resetprop ro.config.tima 0
resetprop ro.boot.warranty_bit 1
resetprop ro.warranty_bit 1
When I rebooted, the other properties changed from 0 to 1; while, the 'ro.config.tima' property stayed at 1.
I then tried a third time, this time I did the exact same thing but put the file in /data/adb/service.d instead, I rebooted and got the same result, the other properties changed to 1 and 'ro.config.tima' stayed at 1.
So then, I tried the "MagiskHide Props Config" Module but when I install it, it causes my whole system to crash and then my device restarts/reboots (Over and over again until I remove the module with TWRP).
Edit: My device is an SM-T350 (Samsung Galaxy Tab A)
Is there any way I can get this property to change to 0 Systemless-ly? Any help would be appreciated.
First try running the command in a terminal emulator. If that changes the value you can try adding a delay to the script before it executes the resetprop command (use service.d).
Didgeridoohan said:
First try running the command in a terminal emulator. If that changes the value you can try adding a delay to the script before it executes the resetprop command (use service.d).
Click to expand...
Click to collapse
When I type it in a Terminal emulator it changes to 0,
So how long of a delay should I add?
JJcoder said:
When I type it in a Terminal emulator it changes to 0,
So how long of a delay should I add?
Click to expand...
Click to collapse
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Didgeridoohan said:
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Click to expand...
Click to collapse
Thanks, I will let you know if it works.
Didgeridoohan said:
Start with sleep 60 and if that works you can try 30 and so on until you find a value that works and you're comfortable with.
Click to expand...
Click to collapse
Unfortunately, it did not work. Is there anything else I can try? This is what I have in the 'resetprop.sh' file located in /data/adb/service.d:
Code:
#!/system/bin/sh
sleep 60
resetprop ro.config.tima 0
JJcoder said:
Unfortunately, it did not work. Is there anything else I can try? This is what I have in the 'resetprop.sh' file located in /data/adb/service.d:
Code:
#!/system/bin/sh
sleep 60
resetprop ro.config.tima 0
Click to expand...
Click to collapse
If 60 doesn't work, try a longer time...
Didgeridoohan said:
If 60 doesn't work, try a longer time...
Click to expand...
Click to collapse
I tried 100, 300, 500, even 1000 and none of them have worked...
How much longer do I have to go? Or am I going to have to do something else?
Try something like this:
Code:
LOC="/data/media/0/tima_test.txt"
echo "$(date +"%H:%M:%S")" > $LOC
resetprop -v ro.config.tima 0 >> $LOC
until [ "$(getprop ro.config.tima)" == 1 ]; do
sleep 1
done
echo "$(date +"%H:%M:%S")" >> $LOC
resetprop -v ro.config.tima 0 >> $LOC
getprop ro.config.time >> $LOC
That is pure untested air code, but in theory it should let us know if the prop value resets to 1 sometime after boot, and when it happens. If nothing else, it might give us some info on what happens when resetprop runs on that prop (but unless something is wrong it'll likely not show anything).
All the info should be in the tima_test.txt file on your internal storage. Wait a good while before you check it...

Need fingerprint for a stock x606f

Trying to get a custom rom to pass safetycheck. Using a magisk module.
Need fingerprint of stock or rooted device.
Command from terminal is "getprop ro.build.fingerprint"
Any help appreciated.
Fingerprint is
ro.build.fingerprint
Lenovo/LenovoTB-X606F/X606F:10/QP1A.190711.020/TB-X606F_USR_S300177_2103041623_V9.56_BMP_ROW:user/release-keys
ro.build.version.security_patch
2021-02-05

How To Guide How to run a script at every boot using Magisk

How to run a script at every boot using Magisk
Note:
I tested the instructions below with Magisk 24.3 . They may or may not work with other versions of Magisk
Another very useful feature from Magisk that can also be used without creating a Magisk Module is the ability to start scripts after booting the phone:
To execute scripts after rebooting the phone just copy them to one of the directories
/data/adb/post-fs-data.d
/data/adb/service.d
on the phone, make the script executable (chmod +x scriptname) and reboot the phone.
(See also https://github.com/topjohnwu/Magisk/blob/master/docs/guides.md#boot-scripts)
Because the mapping will be done while booting the phone it will also survive updating the OS on the phone to a new version as long as the user data is not deleted and Magisk is installed.
To remove the script just delete the script and reboot the phone.
In case the phone does not boot anymore after adding the script just boot the phone from a recovery with adb support, for example from the TWRP:
Code:
# boot the phone into the bootloader and then do
sudo fastboot boot /data/backup/ASUS_ZENFONE8/twrp/twrp-3.6.1_12-1-I006D.img
Then connect via "adb shell" to the phone and delete the script .
I used this method to correct the SELinux context for the NFC device in the first version of AospExtended 9.0 for the ASUS Zenfone 8 (the device tree is recreated from scratch each time the phone boots so the change must be done after every reboot):
Code:
cat /data/adb/service.d/correct_dev_pn553.sh
#!/system/bin/sh
NFC_DEVICE="/dev/pn553"
echo ""
echo "The SELinux context for \"${NFC_DEVICE}\" is now:"
ls -lZ ${NFC_DEVICE}
echo ""
echo "Correcting the SELinux context for the NFC device \"${NFC_DEVICE}\" ..."
chcon -v u:object_r:nfc_device:s0 /dev/pn553
echo ""
echo "The SELinux context for \"${NFC_DEVICE}\" is now:"
ls -lZ ${NFC_DEVICE}
Again, if the script is tested and working you should create a Magisk module for it.
Update 06.06.2022 20:27
Corrected a minor typo
Update 18.06.2022
Corrected a typo : chmod -x must be chmod +x.
(Thanks to oldman20 for the hint)
​Update 26.06.2022​Fixed minor typos in the title of the post
Update 18.01.2023
See How to change any file or directory using Magisk for how to use this method change files on read-only mounted filesystems.
bnsmb said:
on the phone, make the script executable (chmod -x scriptname) and reboot the phone.
Click to expand...
Click to collapse
Correctly is chmod +x scriptname, right?
oldman20 said:
Correctly is chmod +x scriptname, right?
Click to expand...
Click to collapse
Yes, thanks for the hint . I corrected the post

Categories

Resources