volte is not working in any custom rom in my oneplus 3t , i have tried all the solutions . but volte not worked ,,,,,,, but in the oxygen os the volte is working fine , the problem is only with the custom roms , i have tried evolution , havoc , pixel , crdroid , bliss rom , but same issue ,,,,, please help
[email protected] said:
volte is not working in any custom rom in my oneplus 3t , i have tried all the solutions . but volte not worked ,,,,,,, but in the oxygen os the volte is working fine , the problem is only with the custom roms , i have tried evolution , havoc , pixel , crdroid , bliss rom , but same issue ,,,,, please help
Click to expand...
Click to collapse
Start with comparing apns-conf.xml from oos to your prefered custom rom for your carriers mcc/mnc. (Ignore the line breaks in the oos version, just compare the variables/values.)
volte
nvertigo67 said:
Start with comparing apns-conf.xml from oos to your prefered custom rom for your carriers mcc/mnc. (Ignore the line breaks in the oos version, just compare the variables/values.)
Click to expand...
Click to collapse
can u please explain step by step ? so that i can do it easily
[email protected] said:
can u please explain step by step ? so that i can do it easily
Click to expand...
Click to collapse
Get apns-conf.xml from the OOS version volte has proofed to work for you. It's in /system/etc/apns-conf.xml.
Get apns-conf.xml from the custom rom you'd like to use. It's in /system/etc/apns-conf.xml for android 9 roms; $sys_root/system/[vendor|product]/etc/apns-conf.xml for android 10 roms. In doubt boot to twrp mount system and run
Code:
find / -name apns-conf.xml 2>/dev/null
in the twrp terminal.
Get the mcc (mobile country code) and mnc (mobile network code) of your sim (you can find the mcc/mmc e.g. in the settings of your active apn.
Find all entries in the OOS' apns-conf.xml (blocks beginning with "<apn carrier=" and ending on "/>"), which contain your sim's mcc/mnc.
Find all lines in the custom rom's apns-comf.xml containing your sim's mcc/mnc.
Compare all apn comfigs you've found. Consider all line breaks in the OOS apn blocks as white space.
Make the lines in tne custom rom's apns-conf.xml to have the same config (as one line) as in OOS' apns-conf.xml.
Replace the apns-conf.xml you've just created in the installed custom rom (check and restore - if necessary - permissions and selinux contexts before and after replacing; e.g. in the twrp terminal after mounting system
Code:
ls -lZ $(find / -name apns-conf.xml 2>/dev/null)
cp /sdcard/Dpwnload/apns-conf.xml.new $(find / -name apns-conf.xml 2>/dev/null)
ls -lZ $(find / -name apns-conf.xml 2>/dev/null)
;to restore original permission use chmod; to restore original selinux contexts use restorecon; both commands support "-?" for syntax).
After booting the custom rom reset network settings and reboot. Go to the apn settings and check if your changes are cortectly shown. Only if the changes are shown, test volte.
If that fails you need to compare the carrier settings for your sim's mcc/mnc. Get CarrierConfig.apk and Phone.apk from the custom rom and from OOS. Decompile all 4 apks with baksmali and compare all resources containing your sim's mcc/mnc. Documentation on smali/baksmali is found here: https://github.com/JesusFreke/smali/wiki and https://forum.xda-developers.com/showthread.php?t=2193735 (just starting points, there are many guides around).
volte
nvertigo67 said:
Get apns-conf.xml from the OOS version volte has proofed to work for you. It's in /system/etc/apns-conf.xml.
Get apns-conf.xml from the custom rom you'd like to use. It's in /system/etc/apns-conf.xml for android 9 roms; $sys_root/system/[vendor|product]/etc/apns-conf.xml for android 10 roms. In doubt boot to twrp mount system and run
Code:
find / -name apns-conf.xml 2>/dev/null
in the twrp terminal.
Get the mcc (mobile country code) and mnc (mobile network code) of your sim (you can find the mcc/mmc e.g. in the settings of your active apn.
Find all entries in the OOS' apns-conf.xml (blocks beginning with "<apn carrier=" and ending on "/>"), which contain your sim's mcc/mnc.
Find all lines in the custom rom's apns-comf.xml containing your sim's mcc/mnc.
Compare all apn comfigs you've found. Consider all line breaks in the OOS apn blocks as white space.
Make the lines in tne custom rom's apns-conf.xml to have the same config (as one line) as in OOS' apns-conf.xml.
Replace the apns-conf.xml you've just created in the installed custom rom (check and restore - if necessary - permissions and selinux contexts before and after replacing; e.g. in the twrp terminal after mounting system
Code:
ls -lZ $(find / -name apns-conf.xml 2>/dev/null)
cp /sdcard/Dpwnload/apns-conf.xml.new $(find / -name apns-conf.xml 2>/dev/null)
ls -lZ $(find / -name apns-conf.xml 2>/dev/null)
;to restore original permission use chmod; to restore original selinux contexts use restorecon; both commands support "-?" for syntax).
After booting the custom rom reset network settings and reboot. Go to the apn settings and check if your changes are cortectly shown. Only if the changes are shown, test volte.
If that fails you need to compare the carrier settings for your sim's mcc/mnc. Get CarrierConfig.apk and Phone.apk from the custom rom and from OOS. Decompile all 4 apks with baksmali and compare all resources containing your sim's mcc/mnc. Documentation on smali/baksmali is found here: https://github.com/JesusFreke/smali/wiki and https://forum.xda-developers.com/showthread.php?t=2193735 (just starting points, there are many guides around).
Click to expand...
Click to collapse
Thanks for the help . But is there any simple way to do it because i am just a beginner so it is very difficult for me to do this process
[email protected] said:
Thanks for the help . But is there any simple way to do it because i am just a beginner so it is very difficult for me to do this process
Click to expand...
Click to collapse
If you are a customer and not willing to learn to become a user, dubugging is beyond our scope. Try finding somebody doing it for you.
Good luck!
nvertigo67 said:
If you are a customer and not willing to learn to become a user, dubugging is beyond our scope. Try finding somebody doing it for you.
Good luck!
Click to expand...
Click to collapse
ok thank you
Related
Hey folks!
As some probably might have noticed, Galnet's awesome Miui ROM doesn't support MVNO providers. Fortunately some clever guy (thank you very much aziztcf) has found a solution that allows MVNO users like me to use the data connection without having to tick the data roaming checkbox.
Also the R icon is being hidden by this temporary fix. The only problem is that the "fix" only lasts until you restart your phone or enter flightmode. This means a lot of typing.
So aziztcf said a script might be ideal so you don't have to enter adb or your terminal emulator app every startup.
However I am stuck there as I never wrote a script before.
My question. Can anybody point me in the right direction? This is with what i came up so far.
The idea is to change the gsm.sim.operator.numeric/alpha to match the actual provider ones. So in my case i want it to be 23201 and A1, also I want to change the .isroaming to false and alter the beginning of the IMSI to match the original provider.
I placed this "script" in etc/init.d but it isn't working.
#!/system/bin/sh
#
#getprop
#setprop gsm.sim.operator.numeric 23201
#setprop gsm.sim.operator.alpha "A1"
#setprop gsm.operator.isroaming false
#setprop ril.IMSI 23201xxxxxxxxxx
thanks in advance guys!
Good luck!
really? is that everything you have? -.- anybody else?
perfectlysquare said:
really? is that everything you have? -.- anybody else?
Click to expand...
Click to collapse
I have created a file named roam (without extension) with this:
Code:
#!/system/bin/sh
su
setprop gsm.sim.operator.numeric 21407
setprop gsm.sim.operator.alpha "movistar"
setprop gsm.operator.isroaming false
setprop ril.IMSI 21407xxxxxxxxx
then i execute using "sh roam" and then when i close the terminal emulator, it works. but now, I'm using the APN of movistar, not the APN from my operator. I dont know if this is the solution for the MVNOs...
For execute this script every time you reboot, you can put the script in /etc/init.d/roam. ¿?
(sorry for my english)
Solution?
perfectlysquare said:
Hey folks!
As some probably might have noticed, Galnet's awesome Miui ROM doesn't support MVNO providers. Fortunately some clever guy (thank you very much aziztcf) has found a solution that allows MVNO users like me to use the data connection without having to tick the data roaming checkbox.
Also the R icon is being hidden by this temporary fix. The only problem is that the "fix" only lasts until you restart your phone or enter flightmode. This means a lot of typing.
So aziztcf said a script might be ideal so you don't have to enter adb or your terminal emulator app every startup.
However I am stuck there as I never wrote a script before.
My question. Can anybody point me in the right direction? This is with what i came up so far.
The idea is to change the gsm.sim.operator.numeric/alpha to match the actual provider ones. So in my case i want it to be 23201 and A1, also I want to change the .isroaming to false and alter the beginning of the IMSI to match the original provider.
I placed this "script" in etc/init.d but it isn't working.
#!/system/bin/sh
#
#getprop
#setprop gsm.sim.operator.numeric 23201
#setprop gsm.sim.operator.alpha "A1"
#setprop gsm.operator.isroaming false
#setprop ril.IMSI 23201xxxxxxxxxx
thanks in advance guys!
Click to expand...
Click to collapse
I think I have found a solution. (I have the same problem) - You need Root for this to work!
Here's what I did:
1.) Installed Busybox from PlayStore (open downloaded app and hit Install-Button within App)
2.) Installed SManager from PlayStore
3.) With SManager created a script named "netinit.sh" in system/bin
4.) Wrote the script (manually within SManager Editor!!! - didn't work when I pasted the lines into the file.):
#!/system/bin/sh
setprop gsm.sim.operator.alpha "A1"
setprop gsm.operator.isroaming false
getprop | grep operator
5.) With Smanager set the script to execute on boot and notify.
6.) With Smanager set the Permissions on the script to allow all access. (Found in Properties of script)
7.) Did a reboot and waited for the script notification BEFORE I unlocked the SIM.
8.) Voilá!
Hope, it works for you too!
Regards,
YogiwanKenobi said:
I think I have found a solution. (I have the same problem) - You need Root for this to work!
Here's what I did:
1.) Installed Busybox from PlayStore (open downloaded app and hit Install-Button within App)
2.) Installed SManager from PlayStore
3.) With SManager created a script named "netinit.sh" in system/bin
4.) Wrote the script (manually within SManager Editor!!! - didn't work when I pasted the lines into the file.):
#!/system/bin/sh
setprop gsm.sim.operator.alpha "A1"
setprop gsm.operator.isroaming false
getprop | grep operator
5.) With Smanager set the script to execute on boot and notify.
6.) With Smanager set the Permissions on the script to allow all access. (Found in Properties of script)
7.) Did a reboot and waited for the script notification BEFORE I unlocked the SIM.
8.) Voilá!
Hope, it works for you too!
Regards,
Click to expand...
Click to collapse
I follow this steps on miui v5, I don t know what I am doing wrong but it does not work...
razorinc said:
I follow this steps on miui v5, I don t know what I am doing wrong but it does not work...
Click to expand...
Click to collapse
Hi,
Does the script start?
Do you get an error in the console, when you manually run the script?
KR
Yogi
After I make a script I restart the phone, but launcher freezes...
At first, I am not liable for any harm or damage that may happen to your device!
If you have su and didn't trigger knox, I CANNOT guarantee that running this script won't cause 0x1!
Requirements:
1) P905/viennalte/Qualcomm based model ONLY (won't work on Exynos devices. MIGHT work on other Qualcomm LTE deices from Note Pro and Tab Pro series - feel free to repost but give credits!) running 4.4.2 stock;
2) root access with SuperSU (using cf-root - credits to chainfire);
3) busybox installed (I do recommend this paid installer: https://play.google.com/store/apps/details?id=stericson.busybox.donate , MOST PROBABLY free version will be more than enough, too, but I haven't tested it as I have license...)
4) Android Terminal Emulator installed ( free at: https://play.google.com/store/apps/details?id=jackpal.androidterm )
Installation:
1) download file init.d_qcom.sh using below link and put it in the root of internal memory (so it will be placed in: /sdcard/init.d_qcom.sh)
2) run Android Terminal Emulator
3) at command line, type:
Code:
su -c /sdcard/init.d_qcom.sh
(give it an access if requested)
4) voila.
Additional info for advanced users:
1) scripts in /system/etc/init.d shall be root:root 755 (and NOT 777 as stated in A LOT of sources, thou has to be a heavy idiot to give write access for system files to "world"...)
2) init.d is handled from one of the /system/etc qualcomm additional scripts as it refused to work using regular install-recovery.sh method...
3) scripts are triggered paralelly but I am using different method (find/nohup/su combination...), as this damn rom refused to simply execute "run-parts" applet...
4) init.d permission helper script included (just put your scripts in init.d and they'll receive proper permissions on reboot)
Download:
http://www12.zippyshare.com/v/32009778/file.html
Nice to see some developement for this tab!
Anyway to port it to exynos? :fingers-crossed:
prohackerbro said:
Nice to see some developement for this tab!
Anyway to port it to exynos? :fingers-crossed:
Click to expand...
Click to collapse
+1
sent from my amazing NotePro 12.2 via Tapatalk
Criminal23 said:
+1
sent from my amazing NotePro 12.2 via Tapatalk
Click to expand...
Click to collapse
I might try, however I do not own the device and the file structure is completely different.. Can you first enter via Android Terminal:
Code:
su
ls -l / >/sdcard/content.txt
ls -l /system/etc >>/sdcard/content.txt
And post the /sdcard/content.txt file which will be created (or its contents only)?
Also, i would be glad if you copy every *.rc file from root of filesystem to a dir , compress it to one file and post it too
esgie said:
I might try, however I do not own the device and the file structure is completely different.. Can you first enter via Android Terminal:
Code:
su
ls -l / >/sdcard/content.txt
ls -l /system/etc >>/sdcard/content.txt
And post the /sdcard/content.txt file which will be created (or its contents only)?
Also, i would be glad if you copy every *.rc file from root of filesystem to a dir , compress it to one file and post it too
Click to expand...
Click to collapse
Here you are
Criminal23
Criminal23 said:
Here you are
Criminal23
Click to expand...
Click to collapse
Criminal23 said:
Here you are
Criminal23
Click to expand...
Click to collapse
After looking into sent (and posted) files, I have to say that the init process in our devices are ABSOLUTELY different.
Qualcomm version triggers about 7-8 scripts lying in /system, which are provided by Qualcomm, which are pointed in configuring all the hardware provided with their chipset - in addition to init.???.rc files from the kernel. The clue was to add init.d execution command at the very end of one of those scripts (and that is done automatically with script attached in the first post).
Exynos version does not launch (almost - see below) ANY external script during the boot. Whole process seems to be performed by rc files lying in root of the filesystem, which are embedded in kernel's ramdisk and any edits won't preserve the reboot, so it cannot be done without repacking the kernel and that is something far more troublesome to perform without device in hand, without the firmware on disk and without a plenty of time.
BUT
it still runs /system/etc/install-recovery.sh which is an Android standard and which genuine purpose was to reflash recovery back to stock if a custom one was detected. Now, it is sometimes utlized to run somehing at boot, especially: it is used by SuperSu (in addition with other methods) to run its daemon. The problem is that kitkat introduced enforcing SELinux, that Samsung SELinux policy adds special security context for this file, that install-recovery.sh won't be launched if the file has no proper security label - and that while installing SuperSu, the context is set in a different way and in final, install-recovery.sh isn't launched, until we restore /system context, and restoring context to the system ends with... non working su, so we have to flash it again, breaking install-recovery.sh context... Did you get it? - it's a loop as fixing one thing breaks the second, and fix to the second breaks the first That is why on my qualcomm device i have chosen another script file to run the init.d - and as you don't have any other script except install-recovery.sh, I don't know where it might be put...
BUT also I cannot guarantee that the behavior above is not qualcomm-exclusive and it is possible that on exynos device everything will work without problem!
That's why you may want to try standard method for all the devices (term init - uses install-recovery.sh method described above):
http://forum.xda-developers.com/showthread.php?t=1933849
and if it won't work then you have to wait for - at least - repacked kernel with init.d support embedded into init.rc files or run your script by an external app, ie SManager. Just be aware that even if term init work, it may stop working every time you flash SuperSu, so remember to run the script again then.
Sorry for not being too helpful.
TWRP 3.0.2 and systemless supersu 2.79
You must unlock bootloader first
From bootloader menu
*- To permanently install
fastboot flash recovery (TWRP files name)
*- Running TWRP without installing
Fastboot boot (twrp files name)
download
TWRP 3.0.2 android M
TWRP 3.0.2 Android N (Android wear 2.0)
systemless Wear SU 2.79 from
https://forum.xda-developers.com/apps/supersu/android-wear-6-0-1-root-squashfs-t3319097
To CHANGE (ADDING or EDITING) APN
edit or add apn on two files (APN-Name and value MUST MATCH between these two files)
The watch select and display APN selection based on MCC and MNC value that stored under the SIM card
(you can see the sim card value under telephony.db under siminfo data)
*- apns-conf.xml
/system/etc/apns-conf.xml
*- telephony.db
/data/data/com.android.providers.telephony/databases/telephony.db
You can push and pull these files from recovery menu main screen
1- Boot into TWRP
2- Mount System as RW (from mount menu)
3- connect the watch into computer and install ADB drivers.
4- Than run adb pull to get the files
Edit the files (by adding APN or edit existing carriers APN)
apns-conf.xml with any text or xml editor
telephony.db (under data and carriers) with Db browser for sqllite or any sql editor
APN name and data value on both files MUST BE THE SAME/MATCH otherwise the watch wont load the selection
5- ADB push to push the files back to the watch
6. Run shell command to change permission, ownership and group
apns-conf.xml - chmod 644 (rw r r), chown and chgrp root
telephony.db - chmod 660, chown and chgrp radio
Wanting to try this, but it isn't letting me mount /system. TWRP log says "Failed to mount '/system' (No such device)". The "Mount system RO" checkbox checks, but doesn't actually mount RO either.
I also looked for the telephony.db and it didn't exist at /data/data/com.android.providers.telephony/databases/telephony.db. The "databases" folder doesn't exist. Couldn't check for the one in /system
Running wear 2.0, so I DL'd the correct TWRP. I did boot-only, not flash.
Any ideas?
Concur.
Rayfen Windspear said:
Wanting to try this, but it isn't letting me mount /system. TWRP log says "Failed to mount '/system' (No such device)". The "Mount system RO" checkbox checks, but doesn't actually mount RO either.
I also looked for the telephony.db and it didn't exist at /data/data/com.android.providers.telephony/databases/telephony.db. The "databases" folder doesn't exist. Couldn't check for the one in /system
Running wear 2.0, so I DL'd the correct TWRP. I did boot-only, not flash.
Any ideas?
Click to expand...
Click to collapse
I have the same problem with TWRP and System RO. I did it in the same manner for booting from bootloader, because the flashing of recovery does not work correctly. I flash the TWRP using fastboot flash recovery, but every time I attempt to boot into recovery I get the same android icon with a red triangle over the top and an exclamation inside. I did not check the apn, because if I cannot go into recovery or flash SU I know that would be useless to even try. Same here device name nemo from bootloader screen using wear 2.0 (Android 7.1.1). Unlocked using fastboot oem unlock.
My Nexus 5 is rooted with custom Nougat ROM and it does NOT have the .db in the data directory. Given that they use a lot of the same AOSP code, it's probably safe to say that Wear 2.0 (nougat 7.1.1) doesn't need this here either. My conclusion then, is that they have consolidated these settings to the XML in the /system directory, which we cannot mount.
In the thread linked for the systemless su, it mentions that system is read only as it is squashfs. I can only assume that this applies to /system/etc/apns-conf.xml, so I'm not sure how OP was able to push the modified file back to /system in the first place without taking this into account.
Got it working with my FreedomPop SIM. Should work to add any APN. So I combined this with another guy's guide. There are two main differences.
First off, use twrp-3.1.1.0.img from this guy's thread. https://forum.xda-developers.com/lg-urbane-2/how-to/root-twrp-squashfs-3-1-1-lg-urbane-2nd-t3661569
Then it works to mount /system as READ ONLY, which allows you to use the systemless-su from this thread. WARNING: This may not modify the system, but it does modify and reflash another partition (I didn't catch which). I do not know if this will prevent your device from receiving OTAs afterward (It updates, see edit below). ALSO, because there isn't a SuperSU app, there is no management of what can use su privileges. Any app could discover root and do whatever without your knowledge. I plan to remove su from my watch when I get around to it now that my APN has been added. I will post how when I do.
EDIT: I just received an update through the Play Store that updated my AW version, build number, the works. Security patch August 1st. The APN I added persists after the update, though it showed the "no sim" icon until I went and manually enabled cell and selected the APN again.
After getting that done, follow these instructions for adding the APN starting from the header "Add the APN via the ADB shell". https://michaeltroger.github.io/blog/2017/08/12/add-apn-in-android-wear-2
Adding FreedomPop's data APN went as follows:
adb shell
su
content insert --uri content://telephony/carriers --bind name:s:"FreedomPop" --bind numeric:s:"310170" --bind type:s:"default,supl" --bind mcc:i:310 --bind mnc:i:170 --bind apn:s:"fp.com.attz"
If you happen to mess up, or have to add it with trial and error as I did, you can use the following two commands to fix things.
content query
content delete
Using the where clause as exampled in the above link.
NOTE: I just found out that as these changes are systemless, they DO NOT survive an unpair/reset.
Use this TWRP instead for Android wear 2
I modified from Android wear 2 stock recovery
TWRP 3.1.1
https://drive.google.com/open?id=0B4W0KuzRjVvGNkF1UnFkQkFBcU0
Systemless root
https://drive.google.com/open?id=0B4W0KuzRjVvGMzJka1dGRFM2dGc
Dont flash TWRP instead run fastboot boot (TWRP image name)
You wont be able to flash any OTA update with TWRP.
Your watch will keep rebooting to TWRP if you try to download and install any OTA.
Rayfen Windspear said:
Got it working with my FreedomPop SIM. Should work to add any APN. So I combined this with another guy's guide. There are two main differences.
First off, use twrp-3.1.1.0.img from this guy's thread. https://forum.xda-developers.com/lg-urbane-2/how-to/root-twrp-squashfs-3-1-1-lg-urbane-2nd-t3661569
Then it works to mount /system as READ ONLY, which allows you to use the systemless-su from this thread. WARNING: This may not modify the system, but it does modify and reflash another partition (I didn't catch which). I do not know if this will prevent your device from receiving OTAs afterward (It updates, see edit below). ALSO, because there isn't a SuperSU app, there is no management of what can use su privileges. Any app could discover root and do whatever without your knowledge. I plan to remove su from my watch when I get around to it now that my APN has been added. I will post how when I do.
EDIT: I just received an update through the Play Store that updated my AW version, build number, the works. Security patch August 1st. The APN I added persists after the update, though it showed the "no sim" icon until I went and manually enabled cell and selected the APN again.
After getting that done, follow these instructions for adding the APN starting from the header "Add the APN via the ADB shell". https://michaeltroger.github.io/blog/2017/08/12/add-apn-in-android-wear-2
Adding FreedomPop's data APN went as follows:
adb shell
su
content insert --uri content://telephony/carriers --bind name:s:"FreedomPop" --bind numeric:s:"310170" --bind type:s:"default,supl" --bind mcc:i:310 --bind mnc:i:170 --bind apn:s:"fp.com.attz"
If you happen to mess up, or have to add it with trial and error as I did, you can use the following two commands to fix things.
content query
content delete
Using the where clause as exampled in the above link.
NOTE: I just found out that as these changes are systemless, they DO NOT survive an unpair/reset.
Click to expand...
Click to collapse
Is Safetynet working after removing root? I presume you can still sideload updates or that there is a method to return to stock if SafetyNet is tripped?
sjavvaji said:
Is Safetynet working after removing root?
Click to expand...
Click to collapse
I never got around to forcefully disabling/removing it. Nor have I gotten around to redoing it after unpaid/reset wiped it all. How would I test that? I'll get it back on and working then remove root this time sometime this week and give it a go. I don't use Android pay, so I'm not sure how I would test it. Perhaps I could adb push one of the checker apps for phone and hope it works?
Rayfen Windspear said:
I never got around to forcefully disabling/removing it. Nor have I gotten around to redoing it after unpaid/reset wiped it all. How would I test that? I'll get it back on and working then remove root this time sometime this week and give it a go. I don't use Android pay, so I'm not sure how I would test it. Perhaps I could adb push one of the checker apps for phone and hope it works?
Click to expand...
Click to collapse
That would be one way to do it. I have my watch coming in tomorrow and a Freedompop sim on the way. I would prefer Android Pay working over data but having both working is optimal.
sjavvaji said:
That would be one way to do it. I have my watch coming in tomorrow and a Freedompop sim on the way. I would prefer Android Pay working over data but having both working is optimal.
Click to expand...
Click to collapse
Just getting around to tinkering today. Did a bit of research and found that installing the systemless SU modifies the kernel. I'm going to dig a little deeper and hopefully come up with a zip to flash that will completely undo everything that is done by the SU zip (if there isn't one already) to make sure that safetynet not only passes, but that the kernel is stock and secure too. The recent update they pushed for Aug security patch possibly updated the kernel too, yet the APN survived, so once set, APNs definitely live in the userdata and should be fine.
Rayfen Windspear said:
Just getting around to tinkering today. Did a bit of research and found that installing the systemless SU modifies the kernel. I'm going to dig a little deeper and hopefully come up with a zip to flash that will completely undo everything that is done by the SU zip (if there isn't one already) to make sure that safetynet not only passes, but that the kernel is stock and secure too. The recent update they pushed for Aug security patch possibly updated the kernel too, yet the APN survived, so once set, APNs definitely live in the userdata and should be fine.
Click to expand...
Click to collapse
Let me know how it goes! I would honestly just like to get the APN working and return to stock. So assuming it works, the process would go, unlock bootloader, run TWRP w/o install, install systemless SU, edit APN, run TWRP w/o install, uninstall systemless SU, and bootloader relock. Am I missing anything?
sjavvaji said:
Let me know how it goes! I would honestly just like to get the APN working and return to stock. So assuming it works, the process would go, unlock bootloader, run TWRP w/o install, install systemless SU, edit APN, run TWRP w/o install, uninstall systemless SU, and bootloader relock. Am I missing anything?
Click to expand...
Click to collapse
Ooooh... does SafetyNet check for an unlocked bootloader? Does relocking it force a data wipe? I can't remember, because once I unlock, I've never gone back
Rayfen Windspear said:
Ooooh... does SafetyNet check for an unlocked bootloader? Does relocking it force a data wipe? I can't remember, because once I unlock, I've never gone back
Click to expand...
Click to collapse
Yeah. I forgot it required a data wipe. That might be an issue lol.
So is there a way to install Magisk? Or any way to bypass the SafetyNet check and a way to reverse the systemless SU check?
Edit:
I did some more research and it seems like we might be able to install Magisk in place if the systemless root uses SuperSU. Other LG watches in the past and android wear devices in general have been rooted using Magisk in place of SuperSU and it seems to pass safetynet.
hoodred said:
TWRP 3.0.2 and systemless supersu 2.79
You must unlock bootloader first
From bootloader menu
*- To permanently install
fastboot flash recovery (TWRP files name)
*- Running TWRP without installing
Fastboot boot (twrp files name)
download
TWRP 3.0.2 android M
TWRP 3.0.2 Android N (Android wear 2.0)
systemless Wear SU 2.79 from
https://forum.xda-developers.com/apps/supersu/android-wear-6-0-1-root-squashfs-t3319097
To CHANGE (ADDING or EDITING) APN
edit or add apn on two files (APN-Name and value MUST MATCH between these two files)
The watch select and display APN selection based on MCC and MNC value that stored under the SIM card
(you can see the sim card value under telephony.db under siminfo data)
*- apns-conf.xml
/system/etc/apns-conf.xml
*- telephony.db
/data/data/com.android.providers.telephony/databases/telephony.db
You can push and pull these files from recovery menu main screen
1- Boot into TWRP
2- Mount System as RW (from mount menu)
3- connect the watch into computer and install ADB drivers.
4- Than run adb pull to get the files
Edit the files (by adding APN or edit existing carriers APN)
apns-conf.xml with any text or xml editor
telephony.db (under data and carriers) with Db browser for sqllite or any sql editor
APN name and data value on both files MUST BE THE SAME/MATCH otherwise the watch wont load the selection
5- ADB push to push the files back to the watch
6. Run shell command to change permission, ownership and group
apns-conf.xml - chmod 644 (rw r r), chown and chgrp root
telephony.db - chmod 660, chown and chgrp radio
Click to expand...
Click to collapse
Is there a way to flash back to stock AW 1.5?
Sent from my SM-G965U using Tapatalk
Hi! I need to modify build.prop in /vendor partition. As i understood system.prop can't affect it. So i decided to edit it with "sed" cmd. But i got stuck on boot script. It is executed in magisk logs, but there is no code executed (i added one copy+paste cmd to test).
How should i properly modify /vendor files?
Should i modify it in post-fs-data.sh or service.sh?
I'm noob in magisk module making
Bash:
# This script will be executed in post-fs-data mode
# More info in the main Magisk thread
MODDIR=${0%/*}
#testing and no result
cp /system/build.prop /storage/emulated/0/build.propes
cp /system/build.prop /sdcard/build.propes
#i want to do this
sed -i 's/ro.product.system.brand=Xiaomi/ro.product.system.brand=Google/g' ${$MODDIR}/system/build.prop
sed -i 's/ro.product.system.brand=Xiaomi/ro.product.system.brand=Google/g' ${$MODDIR}/vendor/build.prop
Why do you need to edit the actual build.prop file? Isn't it enough to use the resetprop tool (system.prop in the module).
Didgeridoohan said:
Why do you need to edit the actual build.prop file? Isn't it enough to use the resetprop tool (system.prop in the module).
Click to expand...
Click to collapse
I've tried to do this via system.prop, but got negative result. When i do replace modified files through recovery, i get positive result. Idk whats the problem, cuz i even tried to mount files in moddir/system/ folder. Seems android somehow detects any changes
So i have to copy files to module folder, modify, and replace them in original directory. Now the problem is in editing file, i successfully copied file but "sed" doesnt seem to work lol
What do you mean with "negative results"? Does the prop value not change? Have you tested with the getprop command (because you can't look in the prop file, it won't change when using the resetprop tool)?
Using a Magisk module to magic mount the prop files is likely not going to work since that will happen way too late for the files to be read by the system.
Didgeridoohan said:
What do you mean with "negative results"? Does the prop value not change? Have you tested with the getprop command (because you can't look in the prop file, it won't change when using the resetprop tool)?
Using a Magisk module to magic mount the prop files is likely not going to work since that will happen way too late for the files to be read by the system.
Click to expand...
Click to collapse
Negative result for me - app does not recognize me as another device. There is some protection in it that doesnt simply read system props. It read the build props in root directory. (last android security patch)
I just need to modify files in module directory and thats all. I have only this problem now.
No apps can read the build.prop files directly (unless they're root apps, of course)... Apps will be reading the values, not the file, which is why the resetprop tool works without changing the prop file.
If you really want to go for it though your sed command looks fine, except that I would use ${MODDIR}/system/vendor/build.prop since I don't think the ${MODDIR}/vendor symlink will be available when post-fs-data.sh is executed.
Not sure why you're copying the files to the internal storage and why you're naming them .propes, so can't say much about that.
How to change files in the directory /system with Magisk
Note:
I tested the instructions below with Magisk 24. 25.0, and 25.2 on an ASUS Zenfone 8 running OmniROM (Android 12 ) .
The filesystem for /system is normally mounted read-only In Android 12 and it's difficult to change files in that filesystem.
One possible solution to change files in /system is to create a Magisk module for this task.
For testing if a Magisk Module would work like expected you can create a Dummy Magisk module . The steps to implement the Dummy Magisk Module are:
Install Magisk, enable root access for the shell in Magisk and enable access via adb (this can be done in the "Developer Options" in the system settings)
Next connect to the phone using the command
Code:
adb shell
and become root user
Code:
su -
Now create a sub directory in the directory
/data/adb/modules
e.g.
Code:
ASUS_I006D:/ # ls -ld /data/adb/modules/*
drwxrws--- 3 u0_a118 media_rw 3452 2022-05-30 12:12 /data/adb/modules/playstore
ASUS_I006D:/ #
Then copy the new files for the directory in /system to that directory (/data/adb/modules/<modulename>/ is equal here to the root dir, /, on the phone)
Example:
Code:
ASUS_I006D:/ # find /data/adb/modules/playstore
/data/adb/modules/playstore
/data/adb/modules/playstore/system
/data/adb/modules/playstore/system/etc
/data/adb/modules/playstore/system/etc/permissions
/data/adb/modules/playstore/system/etc/permissions/com.android.vending.xml
/data/adb/modules/playstore/system/priv-app
/data/adb/modules/playstore/system/priv-app/Phonesky
/data/adb/modules/playstore/system/priv-app/Phonesky/lib
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libbrotli.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libconscrypt_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libcronet.85.0.4181.5.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libgame_sdk_device_info_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libphonesky_data_loader.so
/data/adb/modules/playstore/system/priv-app/Phonesky/lib/arm/libtensorflowlite_jni.so
/data/adb/modules/playstore/system/priv-app/Phonesky/Phonesky.apk
/data/adb/modules/playstore/system/priv-app/FakeStore
/data/adb/modules/playstore/system/priv-app/FakeStore/oat
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64/FakeStore.odex
/data/adb/modules/playstore/system/priv-app/FakeStore/oat/arm64/FakeStore.vdex
/data/adb/modules/playstore/system/priv-app/FakeStore/FakeStore.apk
ASUS_I006D:/ #
Now reboot the phone.
After the reboot all files in /data/adb/modules/<modulename> will be mapped to /system by Magisk, e.g:
Code:
ASUS_I006D:/ # find /system/priv-app/Phonesky/
/system/priv-app/Phonesky/
/system/priv-app/Phonesky/lib
/system/priv-app/Phonesky/lib/arm
/system/priv-app/Phonesky/lib/arm/libbrotli.so
/system/priv-app/Phonesky/lib/arm/libconscrypt_jni.so
/system/priv-app/Phonesky/lib/arm/libcronet.85.0.4181.5.so
/system/priv-app/Phonesky/lib/arm/libgame_sdk_device_info_jni.so
/system/priv-app/Phonesky/lib/arm/libphonesky_data_loader.so
/system/priv-app/Phonesky/lib/arm/libtensorflowlite_jni.so
/system/priv-app/Phonesky/Phonesky.apk
ASUS_I006D:/ #
ASUS_I006D:/ # find /system/priv-app/FakeStore/
/system/priv-app/FakeStore/
/system/priv-app/FakeStore/oat
/system/priv-app/FakeStore/oat/arm64
/system/priv-app/FakeStore/oat/arm64/FakeStore.vdex
/system/priv-app/FakeStore/oat/arm64/FakeStore.odex
/system/priv-app/FakeStore/FakeStore.apk
ASUS_I006D:/ #
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 in the boot partition.
Notes:
Magisk "replaces" existing directories and files in /system with the files in that directory by using bind mounts.
You can not add additional files or directories to /system using this method -- it's only possible to add additional files and directories to the existing sub directories in /system.
This Magisk feature can also be used to make files in sub directories in /system writable -- see How to make files in system writable for detailed instructions.
This method can also be used to replace files in the directories /vendor, /product, or /system_ext:
from https://topjohnwu.github.io/Magisk/guides.html:
The system folder
All files you want to replace/inject should be placed in this folder. This folder will be recursively merged into the real /system; that is: existing files in the real /system will be replaced by the one in the module’s system, and new files in the module’s system will be added to the real /system.
If you place a file named .replace in any of the folders, instead of merging its contents, that folder will directly replace the one in the real system. This can be very handy for swapping out an entire folder.
If you want to replace files in /vendor, /product, or /system_ext, please place them under system/vendor, system/product, and system/system_ext respectively. Magisk will transparently handle whether these partitions are in a separate partition or not.
Click to expand...
Click to collapse
But this seems to work only to replace existing files in these directories.
This method to replace files in /system simulates a module in Magisk so if everything is okay I strongly recommend to create a "real" Magisk Module with the new files for /system.
Trouble Shooting
If something does not work check the Magisk log file in /cache :
/cache/magisk.log
History
Update 10.06.2022
added the infos about how to update files /vendor, /product, /system-ext
Update 12.06.2022
The Magisk Module to install the patched Playstore used in this example can be downloaded here
http://bnsmb.de/files/public/Android/PlayStore_for_MicroG.zip
see also this Message
https://forum.xda-developers.com/t/...h-a-patched-playstore-from-nanodroid.4456421/
Update 03.10.2022
The sentence about how to update files in /vendor, /product, /system-ext was missing here --fixed
Added a note about what can not be done using this method
Update 04.11.2022
Added the hint for the post to make files in /system writable
Doing some cleanup to make the instructions more clear
Update 18.01.2023
See How to change any file or directory using Magisk for another approach to change files on read-only mounted filesystems.
Can this way be used with the Product and other folders?, framework?
To remove apps?, make fake apk's?
NisseGurra said:
Can this way be used with the Product and other folders?, framework?
Click to expand...
Click to collapse
I just did a quick test and it seems that replacing files in other folders seems not to work
(but this was only a quick test without checking the documentation for Magisk ...)
To remove apps?, make fake apk's?
Click to expand...
Click to collapse
I don't think that you can remove files because Magisk uses bind mounts for replacing the files. But you can disable apps by creating empty files.
E.g. in my example in the previous post
/data/adb/modules/playstore/system/priv-app/FakeStore/FakeStore.apk
is an empty file to overwrite (and therfor disable) the file
/system/priv-app/FakeStore/FakeStore.apk.
That's neccessary because FakeStore.apk and Phonesky.apk use the same signature and that is not allowed in Android.
regards
Bernd
Tested to change a app: SamsungCalendar
Copied the files to /data/adb/modules/
Want to exchange the samsung calendar to an other calendar app that cant be installed due to name conflict.
Replace app?, seems no go
NisseGurra said:
Tested to change a app: SamsungCalendar
Copied the files to /data/adb/modules/
Want to exchange the samsung calendar to an other calendar app that cant be installed due to name conflict.
Replace app?, seems no go
Click to expand...
Click to collapse
Post an "ls -l" for the directory with the app you want to replace and the output of
ls -lr /data/adb/
The file structure in /data/adb/module must match the file structure in / , e.g. to replace the file
/system/priv-app/<appname>/<app.apk>
the file to replace that app must be
/data/adb/modules/<modulename>/system/priv-app/<appname>/<app.apk>
Module Name can be any name .
regards
Bernd
I have try this again, seems magisk creates an file connected to the replaced file.
How do i make these files?
I have some 200 apps in system that i like to disable. Would an "fake" apk disable these apps?
Tested calendar app again, it replaces apk but as its in system/app it can not start the "calendar"
Hi,
Do you think that in this module I can switch mbm system file from
vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
kubans2301 said:
Hi,
Do you think that in this module I can switch mbm system file from
vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
Click to expand...
Click to collapse
Hi
The file does not exist on my phone:
Code:
ASUS_I006D:/ # ls /vendor/rfs/msm/mpss/readonly/vendor/
firmware
ASUS_I006D:/ #
So I will create it now:
Code:
ASUS_I006D:/data/adb/modules/fmradio # mkdir -p system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # echo "# Test file" > system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # cat system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
ASUS_I006D:/data/adb/modules/fmradio #
and reboot
Code:
ASUS_I006D:/data/adb/modules/fmradio # reboot
after the reboot the file is thre:
Code:
ASUS_I006D:/data/adb/modules/fmradio # cat /vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # echo "Test 1234" >>./system/vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio #
ASUS_I006D:/data/adb/modules/fmradio # cat /vendor/rfs/msm/mpss/readonly/vendor/mbm/mcfg_sw/mbn_sw.txt
# Test file
Test 1234
ASUS_I006D:/data/adb/modules/fmradio #
So it should also work to "overwrite" an existing file in that directory.
regards
Bernd
regards
Bernd
NisseGurra said:
I have try this again, seems magisk creates an file connected to the replaced file.
How do i make these files?
I have some 200 apps in system that i like to disable. Would an "fake" apk disable these apps?
Tested calendar app again, it replaces apk but as its in system/app it can not start the "calendar"
Click to expand...
Click to collapse
HI
I missed that post -- what did you do exactly and what did not work?
regards
Bernd
just make a Replace list in customize.sh in magisk zip is fine
Thank you so much. It works perfectly on my Xiaomi mi 11 on miui 14 (android 13). It is easy and very fast way to change files in subfolders in system when it mounted read-only.
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
So this replaces files or just creates some links?
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
veso266 said:
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
So this replaces files or just creates some links?
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
Click to expand...
Click to collapse
This is great and the best thing is that if something doesnt work and I get a bootloop I can always just boot into safe mode and remove the module
Click to expand...
Click to collapse
correct (and if booting to save mode does not work anymore you can boot from the recovery image and fix the problem)
So this replaces files or just creates some links
Click to expand...
Click to collapse
/system is mounted read-only and neither you nor Magisk can replace files on a read-only mounted filesystem . Magisk creates bind mounts for the files and directories to replace.
Bind mounts only exist in memory and will be removed by a reboot.
For instance if I make a module to replace Samsung My Files with a custom app, will this be reversible, meaning that if I delete my module I get original My Files app back?
Click to expand...
Click to collapse
yes, just deactivate or deinstall the Magisk Module. This can be done either in the Magisk App, in an adb shell, or, if the phone does not boot anymore, from within a booted recovery image
regards
Bernd
bnsmb said:
correct (and if booting to save mode does not work anymore you can boot from the recovery image and fix the problem)
/system is mounted read-only and neither you nor Magisk can replace files on a read-only mounted filesystem . Magisk creates bind mounts for the files and directories to replace.
Bind mounts only exist in memory and will be removed by a reboot.
yes, just deactivate or deinstall the Magisk Module. This can be done either in the Magisk App, in an adb shell, or, if the phone does not boot anymore, from within a booted recovery image
regards
Bernd
Click to expand...
Click to collapse
Thanks, let me first tell you I am using Android 10 (no need to upgrade, and I don't want some obscure api to be removed, which I found out about when I need it)
I was able to make a small module that adds a priv-app, a permissions and a library, and it works great
No the onlything I need to add is a system service
So I need to replace framework.jar (I also have EdXposed installed through Riru and I dont want to break it)
Now I have Samsung Galaxy S10+ (SM-G975F) which doesnt have this service, but korean version of it (SM-G975N) has
So for the first test, I just wanted to transplant framework.jar (using the same android version of course) from SM-G975N to my SM-G975F
this seams easier to do then patch my framework.jar, because I read that system service also needs to be signed, and I don't know how to do that yet
I hope replacing framework.jar file will be enought (since I also read system services are located elsewhere)
The service I need to add is called: FMRadioService.java (and is located under com\android\server\ (if you decompile framework.jar)
Now I need to figure out how to recover, if something goes wrong (because something alawys goes wrong, I would like to be prepared)
So how to enter safe mode and disable my module?
And you said that if this doesnt work I can boot from recovery image (what image? is stock recovery allright? (I don't have TWRP yet (I will install it, once I figure out how), and I explained the reasons in this thread: https://forum.xda-developers.com/t/...-app-after-you-have-root-with-magisk.4564363/ )
Thanks
veso266 said:
Thanks, let me first tell you I am using Android 10 (no need to upgrade, and I don't want some obscure api to be removed, which I found out about when I need it)
I was able to make a small module that adds a priv-app, a permissions and a library, and it works great
No the onlything I need to add is a system service
So I need to replace framework.jar
Now I have Samsung Galaxy S10+ (SM-G975F) which doesnt have this service, but korean version of it (SM-G975N) has
So for the first test, I just wanted to transplant framework.jar (using the same android version of course) from SM-G975N to my SM-G975F
this seams easier to do then patch my framework.jar, because I read that system service also needs to be signed, and I don't know how to do that yet
I hope replacing framework.jar file will be enought (since I also read system services are located elsewhere)
The service I need to add is called: FMRadioService.java (and is located under com\android\server\ (if you decompile framework.jar)
Now I need to figure out how to recover, if something goes wrong (because something alawys goes wrong, I would like to be prepared)
So how to enter safe mode and disable my module?
And you said that if this doesnt work I can boot from recovery image (what image? is stock recovery allright? (I don't have TWRP yet (I will install it, once I figure out how), and I explained the reasons in this thread: https://forum.xda-developers.com/t/...-app-after-you-have-root-with-magisk.4564363/ )
Thanks
Click to expand...
Click to collapse
Hi
I don't have a Samsung phone and as far as I know Samsung uses other tools then other vendors for accessing the phone ...
Anyway, these are the instructions to do this on an ASUS Zenfone 8 (using fastboot and adb):
To enter the safe mode just press the power button; wait until the dialog with restart, power-off, etc occurs. Klick on the restart button in that dialog without releasing the power button of the phone. A new dialog to confirm the Save mode should appear.
To boot the ASUS Zenfone 8 from the recovery image boot the phone into the bootloader
adb reboot bootloader
and then issue on the PC
sudo fastboot boot <recovery_image>
<recovery_image> can either be the TWRP image for the phone or the recovery image for the LineageOS (or any other recovery with enabled access via adb).
adb is enabled by default in the TWRP image; in the LineageOS access via adb must be enabled via a menu entry after booting from the image.
AFAIK the stock recovery from Android does not support access via adb.
The phone can also be booted from the recovery installed on the phone via
adb reboot recovery
if the installed recovery supports access via adb.
And, for the records:
In most cases where the OS is loaded after booting the phone but seems to hang, access via adb will already work.
The Magisk Modules are stored in sub directories the directory /data/adb/modules/ , e.g.:
Bash:
ASUS_I006D:/ # ls -l /data/adb/modules/
total 21
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 MiXplorer
drwxr-xr-x 4 root root 3452 1970-01-29 22:32 PlayStore_for_MicroG
drwxr-xr-x 5 root root 3452 1970-01-29 22:32 addbin
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 bootctl-binary
drwxr-xr-x 5 root root 3452 1970-02-01 14:10 btop++
drwxrwxrwx 3 root root 3452 1970-01-29 22:32 nano-ndk
drwxr-xr-x 3 root root 3452 1970-01-29 22:32 ssh
ASUS_I006D:/ #
To disable a Magisk module after the next reboot create the file
/data/adb/modules/<modulename>/disable
To force Magisk to remove a Magisk module after the next reboot create the file
/data/adb/modules/<modulename>/remove
(see also here: https://forum.xda-developers.com/t/some-hints-for-using-magisk-on-android-phones.4471857/)
Note that Magisk will disable all Magisk modules automatically if the phone is booted into Safe mode.
regards
Bernd