Insert my providers APN Setting without flashing anything - Wear OS Q&A, Help & Troubleshooting

I have no internet in other European country's, because my provider has something called a core net and act as a virtual provider.
So, my Provider is not in the APN list of android. My watch choose the ANP of the hardware provider.
So, what I did:
I unlocked the bootloader (search for it).
Booted in the fastboot mode (search for it).
Boot a TWRP recovery image suitable for you're watch (search for it).
For my watch (Huawei watch 2) I took the TRWP from this post from this thread
Code:
fastboot boot recovery.img
Then with booted TWRP start adb shell, I modified the Systems APN file:
Code:
adb shell
vi /system/etc/apns-conf.xml
Here I did a copy of the section from the provider my watch has chosen before and renamed it to the real name of my provider (sipgate), with the correct settings. You can duplicate any entry. Save it end exit.
In TRWP choose "boot fastboot"
then lock bootloader:
Code:
fastboot oem lock
Then choose reboot.
You are done
After this, my watch has chosen the right APN, so the name "sipgate" get received from the handshake as well as the name of the hardware provider. If there is no provider in the apns-conf.xml list, the system chooses the name from the hardware provider.
Now my network is running fine. No need to flash or root. Hope someone find this useful.

I didn't try the other places where the APN should also be located. I found this:
Code:
/data/data/com.android.settings/shared_prefs/com.android.settings_preferences.x*ml
/data/data/com.android.providers.telephony.databses/telephony.db

Related

[Q] Stuck in download mode

Hey guys, my after trying to flash a rom, my g2 soft bricked. I can get into download mode, but cannot get the lg software to work properly. This is what happens.
I enable windows enabler
Open Uptestex
Make sure everything matches the guide I'm using i.e. "diag" and 3cqt
Click normal web test upgrade
My computer then loads LG mobile support tool and never asks me for anything about a language or a country.
What am I doing wrong?
Clicking Read phone information does not work either.
First you have to install the drivers.
Then run the B2CAppSetup.exe (make sure hosts file is untouched, if there is 127.0.0.1 lg..blabla.. then you should put a "#" in front of it, for example #127.0.0.1 lg..blabla...)
Let it install..
Then navigate to c:\programdata\lgemobileax (delete the folder contents), replace the contents with the one you've downloaded.
start http.exe
start window enabler, click on it in systray so the OK flag is shown.
type cmd in searchbox of win7, right click, run as admin..
type copy c:\windows\system32\drivers\etc\hosts c:\hosts
type echo 127.0.0.1 csmg.lgmobile.com >> c:\windows\system32\drivers\etc\hosts
run UpTestEX_mod2_marwin.exe
select 3cqt... and EMERGENCY..
normal upgrade..
clear the phone cache...
select other country..and that's pretty much it..

wifi turning itself off, driver not being loaded.

Edit: Considering all the complex processes that I've done, I'm willing to do some series of steps again with the gathered knowledge, but I still need some guidance.
Actual status: Losing my mind (not fixed)
Here's the info of my current problem:
I have a XT1563, cid12 (cl)
Working perfectly until android 6.0 OTA. After restart, in the wifi screen loading bar is constantly present and switches itself off after a couple of seconds of activated. Network list is empty, mac address appears as 02:00:00:00:00:00 in wifi details and status of the phone.
Sent it to support and they 'updated the software', when I got it back wifi was working, but when I installed sd and sim cards back it stopped working.
The most relevant logcat message that appears to be the main one is from WifiStateMachine:
Code:
WifiStateMachine: Fail to set up pno, want false now false
WifiStateMachine: Failed to load driver
Things I've done
Most of this steps have been tried with clean installs and removing sd/sim cards
Network Reset
Factory Reset
Flash different stock roms (currently on 6.0.1 MPD24.107-52)
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Used twrp 2.8.7 and 3.0.0-r2
Used rsd to flash official firmware for my carrier (RETLA-ENTEL_6.0_MPD24.65-25.1)
Flashed CM 12 and CM 13 unofficial
Installed SuperSU and Busybox
Changed owners and permits in persist/
Copied new persist from different sources
Hex edited .bin file in persist/
downloaded WCNSS_wlan_dictionary.dat and put it in persist to comply with symlink in prima/
fastboot oem install [2 of my carriers; entel, claro]
Replaced WCNSS files in persist with the ones available the motorola repo
Copied WCNSS factory file to prima/ folder
Copied WCNSS_qcom_cfg.ini to /data/misc/wifi
went crazy with 776 permissions
Even after flashing stock with RSDLite, bootloader show the modified status as 3 when I think it should be 2. This has led me to think that something is in the file system that android does not like but is not being fixed by RSD nor clean wipes.
From what I understand, the only thing that could be surviving full flashes and wipes are contents in persist/ and modifications to the root of the system, like busybox and superSU. I've not been able to find any way of cleaning the root of the phone and I imagine that's really dangerous.
TL;DR Wifi driver is not loading, persist folder is ok and clean flash does not fix it.
Possibly relevant logcat entries:
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state
Info for nerds:
Source code of WifiStateMachine.java containing the error message:
Code:
public boolean processMessage(Message message) {
switch (message.what) {
case CMD_START_SUPPLICANT:
[B]if (mWifiNative.loadDriver())[/B] {
// Code for loading supplicant
} else {
loge("Failed to load driver");
}
break;
# More code
}
}
WifiNative.java cointains the class being instantiated where the evaluation calls a empty abstract method:
Code:
public native static boolean loadDriver();
I'm having problems for identifying where this class is being extended for this method to actually do something. If anyone knows please leave a comment.
Wifi problems and fixes
I've still not found a solution for myself, but I figured I still can give some tips for people with problems, especially considering how confusing is to get information about this.
This is a work in progress. I would gladly receive corrections and new info.
Before anything, do a backup. Even if your wifi does not work, it can save you from a lot of problems. Remember to backup the persist folder, a lot of automated recoveries don't make a backup of that folders because it's supposed to survive flashes but there's ways in which you can do it by mistake. It also helps a lot with bug hunting.
Things you should have already tried:
Plane mode on, reboot, wifi on and plane mode off
Network settings reset in android and reboot
Rebooted to safemode (longpress in power off when turning phone off]
Factory reset in android
Removal of SD and SIM cards
Factory reset in recovery
Flash Stock ROM in RDSlite
Unlock bootloader
Activate developer mode and set usb debug on
Installed custom recovery
Clean Flash stock ROM trough fastboot
Flash custom Kernels
Things you need:
adb and fastboot
usb drivers for the phone
Optional Text editor that preserves text format (avoid notepad and MS word)
Optional Busybox for extended commands in android shell (root required)
Optional If you're in windows and want to mess with adb: A decent console to work with.
Option A: cash with cmder
Install cmder
Install NodeJs
Install cash tipping in cmd npm install cash-global -g (after NodeJs)
Option B: babun
http://babun.github.io/
optional Open text editor for easy copy-paste of long paths and commands
optional Hex editor if you want to edit .bin files. I use XVI32
Useful console commands (In windows you need one of the optional shells described above)
List files and folders
Code:
ls -la [path to list]
Find file/folder in linux (and android shell)
Code:
find / -iname '*[word you're looking]*'
* are 'wildcards', they allow for matching any text (or no text at all)
you can add, before -iname, -type f (for files) or -type d (for folders)
Symlink
It's an alternative of copying files. this allows you to simulate having a file in two different places, but really all paint to one. Modifications in this source are going to affect all the links, so it's easier to configure. Android does this a lot.
Code:
ln -s [path to] [from]
Copy files and folders
Code:
cp [-R if you want to move folders] [path to source] [path to target]
logcat for essential wifi messages (short-colored) If someone know more, please let me know
Code:
adb logcat -v brief -v color WifiSerice:V WifiHW:V WifiStateMachine:V FileUtils:V QSEECOMAPI:V *:S
change owners and permissions
the flag -R makes the command work for files and subfolders
Code:
chown user:group [path to file or folder]
chmod [num of user][num of group][num of all] [path to file or folder] [SIZE="2"](e.g. chmod 660 /persist/WCNSS_qcom_wlan_nv.bin)[/SIZE]
grep
This one is awesome; It's for filtering the results of any command, so you can use it for filtering.
Code:
[command you want to filter] | grep -i [term you're looking for]
For example, [adb logcat] gives you a huge list of messages, but [adb logcat | grep -i wifi] gives you just the lines that contain 'wifi'
From my experience, this are the common folders related to wifi configs:
Code:
/persist/
/system/etc/firmware/wlan/prima/
/system/etc/wifi/
/data/misc/wifi/
Command list for do a full clean flash:
please note that system.img_sparsechunk can vary in number according to ROM, but I've put 9 in here because failed commands don't write to phone
note: fastboot flash partition gpt.bin works perfectly when used first, but for me it's failing when I erase system and boot first.
Code:
fastboot erase system -w
fastboot erase boot
fastboot erase fsg
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash modem NON-HLOS.bin.
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot reboot (or reboot-bootloader)
Important: Every time you flash, do a clean wipe. In fastboot this usually means using erase system -w and erase boot before flashing.
Be aware that for getting the logcat your phone must be booted to android OS.
Be aware that for copying and modifying important files you must access the phone's shell either in recovery mode or switching to root with the command (su) that's only accesible if you're rooted.
Ok. If you made it this far you're probably losing your mind. To debug this, especially if you're going to post asking for help, get the catlog of your phone and/or a precise description to look for clues to your problem (I have a command ready for you above).
Here's some common solutions I've found while trying to solve my own problem: (Credits to the authors of the solutions)
Bad permissions/users
These appear to be correct or usable permissions for relevant files. Consider that there's a lot of fragmentation in this info so they might be wrong.
Confirmation of these would be great:
Code:
-rwxrwx--- wifi wifi /system/etc/wifi
-rw-rw---- wifi wifi /system/etc/wifi/wpa_supplicant.conf
-rwxrwx--- wifi wifi /data/misc/wifi
-rwxrwx--- wifi wifi /data/misc/wifi/sockets
-rw-rw---- wifi wifi /data/misc/wifi/wpa_supplicant.conf
-rw-rw---- system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini
-rw-rw---- wifi wifi WCNSS_qcom_wlan_nv.bin
-rw-rw---- root root WCNSS_wlan_dictionary.dat
-rwxrwx--- is 770, -rw-rw---- is 660
Is reported in some places that the parent folder of wpa_supplicant.conf should be -rw-rw---- wifi wifi
Missing or badly configured wpa_supplicant.conf
The solution is place a new copy of the file in the correct folders. If someone has a 'oficial' source or more info let me know
I remember reading that some people had success deleting the file so the SO rebuilds it. Do it to your discretion and remember to backup
Missing WCNSS files
These files are essential and must be in the correct paths for wifi drivers to load.
There's a lot of different sources for this files, but from my experiencie they don't change a lot (last commits are more than one year old).
Files in oficial source repository from motorola
These posts have info and files
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
Paths of relevant files. Please consider that not just because it's here means you need it
Code:
/persist/WCNSS_qcom_wlan_nv.bin
/persist/WCNSS_qcom_wlan_factory_nv.bin
/persist/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini
/system/etc/firmware/wlan/prima/WCNSS_cfg.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_dictionary.dat
/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_factory_nv.bin
/data/misc/wifi/WCNSS_qcom_cfg.ini
/data/misc/wifi/wpa_supplicant.conf
Missing /persist/drm/widevine and/or /persist/prov
Check this two posts:
http://forum.xda-developers.com/showthread.php?t=2589790
http://forum.xda-developers.com/showpost.php?p=48861415&postcount=19
In there you can find backups to get the folders, restore them to /persist/ and check permissions.
Bad MAC address in WCNSS_qcom_wlan_nv.bin
Sometimes the file WCNSS_qcom_wlan_nv.bin needs to be updated with the correct mac address.
Since it's a .bin file, it cannot be changed with a text editor. You need to use a hex editor (XVI32 link is in 'things you need' above).
The mac address starts at 'A' (since is hex) or, more simply, after 10 'cells'. Be aware that in this editor changes get 'inserted' instead of modified, so you have to delete the initial 6 addresses of the old mac.
Put the file back, and check permissions. There's two copies of this file: one in /persist/ and another in /system/etc/firmware/wlan/prima/ change one or both according with your situation
Some logcat messages and details about them
For getting more messages about wifiHW you need a userdebug build like CyanogenMod. Stock roms don't log wifiHW.
Code:
WifiStateMachine: failed to load driver
WCNSS_qcom_cfg.ini and/or WCNSS_cfg.dat is missing somewhere. In my case this was missing from /system/etc/wifi.
Code:
wcnss_service: CAL file not found
This refers to the calibration file. The source of wcnss-service.c defines this file as "WCNSS_qcom_wlan_cal.bin" in the path "/data/misc/wifi/WCNSS_qcom_wlan_cal.bin". however, source show that CAL file is not used if the factory file is present. Source in link gives this address '"/data/misc/wifi/WCN_FACTORY" which is weird because from posts in xda this file has the name "CNSS_qcom_wlan_factory_nv.bin" I'll update if I have more info
Info for nerds:
How android Wifi works:
https://community.freescale.com/docs/DOC-93603
source code for wifi opt framework - android 6.0.1 r22
source code for wifi qcom framework - android 6.0.1 r22
you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3
Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?
RoDeltaLambda said:
Thank you for your answer!
I'll make the edit in the file but I'll take a while to report back on the results because it's already too late in here.
Considering this, would it make sense for a nonmatching mac address show up as 02:00:00:00:00 in the wifi details screen?
Click to expand...
Click to collapse
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.
bablu048 said:
Yes, your Mac address is fine, just checked I also have the same
try this and report if its working
1. Put the phone into airplane mode.
2. Restart the phone.
3. Turn on WiFi.
4. Connect to the WiFi network.
5. Turn off airplane mode.
Click to expand...
Click to collapse
I've tried those steps and it's not working.
Logcat shows "WifiStateMachine: Failed to load driver" in each attempt.
I will update the .bin modifications results in a couple of minutes
bablu048 said:
you need hex editor to edit those .bin files.www.droidrzr.com/topic/65438-how-to-change-your-mac-address-xt926/
forum.xda-developers.com/nexus-4/help/nexus-4-mac-changer-spoofing-t2180809/page3
Click to expand...
Click to collapse
I have tried the modifications to no avail.
Steps I did:
get the wifi mac address from the recovery logs
adb pull the files on recovery with persist mounted
hex edited the lines taken from the screenshot on your second link (Both _factory_nv.bin and _nv.bin
adb pushed lines back to mounted persist on recovery
cleaned data/cache/dalvik
rebooted to system
Is there something in the /data/ folder that could be causing the issue? Now both files show back at -rw-r--r-- permissions with root:root owner. I'll try again without wiping data this time and post the report.
RoDeltaLambda said:
I have tried the modifications to no avail.
Click to expand...
Click to collapse
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/
bablu048 said:
I think this thread solved the problem just by replacing the files from another device forum.cyanogenmod.org/topic/84876-wifi-failure-after-cm11-install-still-present-after-restore-from-backup/
Click to expand...
Click to collapse
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up
After the actions of my last post and before the new flash, I scanned the results of adb logcat *: D | grep Wifi
Here are some entries that could be of interest:
more possibly relevant logcat entries:
Code:
[SIZE="2"][I]Initially country code appears to be empty:[/I][/SIZE]
I WifiService: WifiService trying to set country code to with persist set to true
WifiService: Client connection lost with reason: 4
I WifiService: WifiService trying to set country code to cl with persist set to true
E WifiService: Invoking mWifiStateMachine.setWifiEnable
D WifiStateMachine: setting operational mode to 1
E WifiHW : User build,dont Start logging service.
E WifiService: Invoking mWifiStateMachine.setWifiEnabled
E WifiStateMachine: Failed to load driver
D WifiStateMachine: setWifiState: unknown state
RoDeltaLambda said:
I have tried the steps in that topic, copying the exact same files in /persist and /prima. Problem still persists
From that topic I've learned that at flash time the files from persist are taken out and sent to system folders. I will try to reflash now with the new files and permissions set up
Click to expand...
Click to collapse
I've fully flashed the device with RSD and problem still persist.
Eager to hear some more ideas.
I noticed that in system/etc/firmware/prima, adding to the files I copied, there's one symlink: WCNSS_wlan_dictionary.dat -> /persist/WCNSS_wlan_dictionary.dat
This file is not present in my persist folder (nor the rest of the files in the phone, based on adb shell find . -name WCNSS_wlan_dictionary.dat). I imagine this could clearly cause a problem with the wifi driver looking for a file that does not exist.
Someone has a reliable source where I could get this file? I can try to delete it to see if the SO tries to rebuild something, but I would prefer the safest option first.
have you tried flashing back stock recovery then do a factory reset from there?
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
Thank you for the file and the instructions. I've checked the diff with 3 different sources:
Meninblack007 - vendor
huawei_msm8916
google android source code
All match, so I'll asume this is a universal file without modifications.
Moving this file to persist/ folder made no difference
I've also tried taking the files from motorola official github repo, copy them to persist/ and flash. Without success this far.
I'll send factory_nv.bin to prima folder and report back
flash the firmware through rsd lite, lock the bootloader and take it again to service center.
I am out of ideas and also Google searches.. I'll keep looking and report if I find anything else.
bablu048 said:
copy WCNSS_qcom_wlan_factory_nv.bin to your SD card. Use your filemanger to copy this file to /prima. Reboot
Activate wi-fi, the you'll find your mac adress under Settings > About Phone > Status > Wi-fi MAC Adress
Open WCNSS_qcom_wlan_factory_nv.bin on your phone or PC with a hex editor and type your mac adress inside that file and save it.
File attached just remove .txt
The file is from xt1562
Click to expand...
Click to collapse
I've copied the file between the locations trough adb shell and there's no noticeable difference.
MAC address does not appear either in this screen:
I'll post this image and the versions of the phone in the OP
did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.
jalal-jap said:
did u try ultra kernel?
i have same problem.
i flash ultra kernel(r3), and my wifi work fine.
Click to expand...
Click to collapse
Yes I've tried.
Flashed ultra kernel R2, R3 and squid kernels 14, 15, 15 oc, 15b
Click to expand...
Click to collapse
Considering all the changes I've done, it was a good idea to try again.
I've tried the last release of squid kernel, since the dev of ultra kernel recommended this one for 6.0.1.
Installed the kernel, wiped cache/dalvik and rebooted without success. Logcat is still showing failure at loading drivers.
The main problem I'm having is that the failure point is not correctly specified, so now I'll try to dig deeper into logcats to see if I pinpoint the source of the issue. If anyone can let me know about some complementary logs, I would be super grateful.
I've installed CM to have a userdebug build, in order to debug more in detail thanks to the logs of wifiHW.
After fixing an error of missing WCNSS_qcom_cfg.ini in /system/etc/wifi (Copied from prima folder) I've came across this error appearing persistently:
Code:
wcnss_service: Failed to open /dev/wcnss_ctrl : Bad address
I've looked around but there's no info of how could I deal with this. I will dig around a little more but if someone has a tip I would gladly hear

[GUIDE] Easiest way to root Pixel 2 XL and disable the carrier tether check!

***PIXEL 2XL ONLY!!!*** ***PIXEL 2XL ONLY!!!*** ***PIXEL 2XL ONLY!!!***
Confirmed this works with Android O and P!
UPDATE 3/17/2020: Now confirmed this works with Android Q, but with slight modification!
It took me many hours to piece together the various forums and articles, but these instructions will have you up and running in 30 mins max!
*Below instructions assume brand new phone out of the box, everything stock.
1. Download adb and fastboot on your computer. You don't need the whole SDK and don't need to install anything; Google now provides them in a simple zip file. Get it here for Windows, Linux, Mac. If you're using a Mac, all you have to do is open Terminal, cd into the directory where you unzipped the files, and type ./adb [command] from there. EX: If you downloaded the zip file into your Downloads folder, and extracted the zip also in your Downloads, you'd type the following on a Mac:
Code:
cd ~/downloads/extractedfoldername
Code:
./adb version
with your phone plugged in via USB to the computer to test adb works. Make sure to enable developer mode on your phone, and also enable USB Debugging. NOTE: For all below references to adb and fastboot, make sure to include the "./" before the command from the extracted directory. EX: "./adb" and "./fastboot"
2. Unlock bootloader. Follow the directions provided here in the "Unlock the bootloader of the Pixel 2 / Pixel 2 XL" section. (Don't waste your time reading the rest of those instructions, since that will confuse you and they don't work anyways.) I did unlock_critical at first, but the bootloader still said it was locked. Then I did "flashing unlock" and that unlocked the bootloader. Make sure device status in fastboot on the phone says "unlocked." Reboot the phone.
3. Download the latest Magisk Manager from here to your computer. I used 5.6.4.
4. Type
Code:
./adb push <path_to_file> /sdcard/Download
5. On the phone, go to your Downloads app and install the Magisk Manager apk.
6. Open the manager. Click the Install button. It will ask if you want to "install Magisk-vXX.zip now". Click Install and then select Download Zip Only at the next prompt.
7. Download the TWRP image here to your computer. NOTE: You only need to download the IMG file! Don't need the zip file.
7.5 From your computer, run:
Code:
./adb reboot bootloader
8. From your computer, run:
Code:
./fastboot boot path/to/twrp.img
9. Once phone boots into TWRP, go to Install. Then go to the MagiskManager directory. In there, you should see the "Magisk-vXX.zip" file you downloaded in Step 6.
10. Now reboot your phone and open up the Magisk app. You should now see it says "Latest Version: vXX.X" and "Installed Version: vXX.x" with green check marks next to the items. Open the Magisk settings (3 bars on the top left) and you should see a bunch of options, one of them says #SuperUser. This means you now have root!!
11. To enable the tethering:
For Android 8 and 9:
Code:
./adb shell
Code:
su
**(grant permission if phone asks)**
Code:
mount -o rw,remount /system
Code:
echo "net.tethering.noprovisioning=true" >> /system/build.prop
Very important step! You must reboot for the changes to take effect.
Code:
reboot
For Android 10
It seems like you can no longer mount /system as rw. So it's a little more complicated. If you fully installed Magisk (not the way I did it above), then from Magisk Manager, go to Modules and download MagiskHide Props Config and busybox-ndk. Follow the instructions here to run the Props Config.
If you followed my rooting instructions above, running the Props Config won't work, but there is a workaround.
You could still use the module, but instead of using the props command and the terminal UI, you just use the configuration file to set everything up. Download the settings file, extract it from the module zip (in the /common folder) or copy it from the module directory under /data/adb (in the /common folder), add
Code:
net.tethering.noprovisioning=true
to the CONFPROPS variable, place it in the root of your internal storage (/sdcard) in /data or in /cache (or /data/cache if you're using an A/B device) and reboot.
Another option is to just use a simple boot script. Put the following in a file (doesn't matter what you name it) in /data/adb/service.d:
Code:
#!/system/bin/sh
resetprop net.tethering.noprovisioning true
Give it execution permission (chmod 755 is usually the goto) and then that prop will be set at each boot. If it doesn't seem to work, put the script in /data/adb/post-fs-data.d instead.
Very important step! You must reboot for the changes to take effect.
Code:
reboot
[email protected]##
Giant shoutout and thank you to @Didgeridoohan for helping me debug and figuring this out! You're a life saver.
References:
MagiskHide Props Config Documentation thread
MagiskHide Props Config README
Thread where Didgeridoohan explains the process and help me debug
Codes
Hi im having trouble with getting the commands right, I seem to be getting the message stating the command push requires argument but im not sure why, can you provide the actual command in full how it should be input.
Thanks
I didn't even bother using the commands. All I did was root as given in the guides for this device. I then used a file manager with root capability to access build.prop and edit the file directly to add the line. Afterward I rebooted and was all set.
Of course, with my service provider I may not have needed to do this as their provisioning doesn't seem to touch tethering, even though they don't allow it. I'll find out next month when the security update comes through.
Excellent guide, except for one crucial missing step:
7.5 Reboot back into the bootloader:
Code:
adb reboot bootloader
I'm on a grandfathered att unlimited plan, which does not allow tethering. I have edited the build prop to enable it, but does anyone know if they can detect that I am tethering?
Need help.
i accidentally used this for a pixel 2 and now cannot get past the white startup screen with the google logo. Any ideas?
ashayden said:
I'm on a grandfathered att unlimited plan, which does not allow tethering. I have edited the build prop to enable it, but does anyone know if they can detect that I am tethering?
Click to expand...
Click to collapse
There are multiple ways they can detect whether you are tethering or not. And there's no way to hide the activity either.
Strephon Alkhalikoi said:
There are multiple ways they can detect whether you are tethering or not. And there's no way to hide the activity either.
Click to expand...
Click to collapse
This is a true statement.
frankygoes said:
Need help.
i accidentally used this for a pixel 2 and now cannot get past the white startup screen with the google logo. Any ideas?
Click to expand...
Click to collapse
I'm having the same issue. I previously used the build.prop updated a number of times, but after doing it with the July factory images, I get stuck on boot. Anyone figure out a way around this?
I did this method and have root but I have no recovery.
According to this: https://twrp.me/google/googlepixel2xl.html I needed to install twrp zip after fastboot boot twrp.img and I can't do it now because I'm rooted and need to reflash boot image. dang!
/necro
soccercake7 said:
I did this method and have root but I have no recovery.
According to this: https://twrp.me/google/googlepixel2xl.html I needed to install twrp zip after fastboot boot twrp.img and I can't do it now because I'm rooted and need to reflash boot image. dang!
/necro
Click to expand...
Click to collapse
You don't need reflash your boot image. Just put your phone into recovery, then go back to temporary twrp by fastboot boot twrp.img. Then flash twrp.zip
Strephon Alkhalikoi said:
There are multiple ways they can detect whether you are tethering or not. And there's no way to hide the activity either.
Click to expand...
Click to collapse
Not entirely true if your device is fresh out the box. On my previous phone when we were all trying to unlock the bootloader on the Verizon variant, I did it accidentally. I failed to unlock the bootloader lol, but if you never put a Sim in the device and delete the radio file to temporarily "un-grey" the OEM unlock ticker, and then install a vpn (I used the cracked adguard plus from revdl) and turn on basically everything, then factory reset to get the radio back, then reinstall the vpn and enable all the ad masking options and THEN put your sim in for the first time...
I don't know how or why it works but I went almost three months tethering my heart out on Verizon for like 400-700 gigs/month without being throttled one bit or subjected to their bull**** priority system. An added peculiarity was I also had glasswire data moniter installed before ever inserting the sim and both it and the Verizon built in data meter both just stayed at zero. Unfortunately, I was sending a file to a friend with sendanywhere and we were having trouble getting it to accept the access code so I turned off the adguard protections just for like two minutes and both data monitors started spitting out numbers and I got throttled into Oblivion the following bill cycle.
Again, I don't know how many of those steps are needed or what exactly to turn on in adguard, but I do know that it somehow let's you in the data door and keeps the traffic source anonymous until you give the device a window to phone home with your account. Wish I could be more specific with directions but it absolutely worked, somehow. I haven't used sendanywhere since that day and never will again because it ruined something so beautiful for me.
I tried for probably two dozen hours to reset and recreate the circumstances and get those sweet, sweet zeroes back, but to no avail, so I would assume that it can't ever work on the device once it's had a Sim installed even for a moment, and once working you must keep the vpn running from startup forever...probably can't ever factory reset or you will lose it. I really don't know. I'm sure one of the techier peeps here could figure out how and why it works or already knows, but doesn't want to post it because then it will get fixed and ruin his or her own beautiful thing.
8wrlobo said:
Not entirely true if your device is fresh out the box.
Click to expand...
Click to collapse
https://android.stackexchange.com/q...-companies-detect-tethering-incl-wifi-hotspot
You got lucky.
Strephon Alkhalikoi said:
https://android.stackexchange.com/q...-companies-detect-tethering-incl-wifi-hotspot
You got lucky.
Click to expand...
Click to collapse
I use NordVPN and VPN Tether on rooted (Magisk) stock Google Pixel 2 XL . Carrier doesn't see my tethering.
n2music said:
I use NordVPN and VPN Tether on rooted (Magisk) stock Google Pixel 2 XL . Carrier doesn't see my tethering.
Click to expand...
Click to collapse
A VPN if I recall doesn't prevent the carrier from using the number of hops (i.e. the TTL number) to detect tethering. It does prevent them from seeing what data you are pushing across the network however.
My total data use increases, but tether usage does not. I rarely use more than 30gigs altogether each month anyway, not an abuser.
n2music said:
My total data use increases, but tether usage does not. I rarely use more than 30gigs altogether each month anyway, not an abuser.
Click to expand...
Click to collapse
Not an abuser, but in the eyes of the carriers that don't want you tethering without paying you are a thief. It's silly because in the end it's still data, and just a way for the carriers to gouge you.
Strephon Alkhalikoi said:
Not an abuser, but in the eyes of the carriers that don't want you tethering without paying you are a thief. It's silly because in the end it's still data, and just a way for the carriers to gouge you.
Click to expand...
Click to collapse
I actually do pay for it. I am on beyond unlimited. But I agree with you.
n2music said:
I actually do pay for it. I am on beyond unlimited. But I agree with you.
Click to expand...
Click to collapse
Sorry for assuming you didn't pay for the privilege. Since the discussion started by others centered on ways to prevent carriers from detecting tethering, I ran on that assumption.

[GUIDE] Enable VoLTE for your non operator handset

I have finally been able to get VoLTE working on my X Performance despite my carrier never having 'supported' my handset (they never sold it here).
What you will need?
Windows Computer with Flashtool and minimal ADB and fastboot (if you have already downloaded fimrware as below you can use flashtool on whatever platform your prefer)
Bootloader Unlocked
TWRP
ROOT (Magisk Preferred)
VoLTE enabled firmware (not sure about this one I think you can edit build.prop appropriately)
To unlock Bootloader, TWRP, and ROOT follow this guide
I will first describe how I did it and then how anyone else should be able to achieve the same outcome. Now includes a less convoluted way to do this allowing you to keep all data thanks to those who tested
1) First using a root file browser - I recommend this one browse to /system/etc/customisations/modem/
2) Check to see if there is any reference to your operator's modem in your model firmware. They are all in the format of amss_fsg_dora_xxx_tar.mbn
3) Once you have a spotted your operator you need to take note of what's in between 'dora_' and '_tar' so for example if I use china mobile - I would find amss_fsg_dora_china_mobile_hk_ims_tar.mbn I would need to take note of china_mobile_hk_ims
4) Once you have this you need to connect your phone via ADB to your PC (I found this much easier on a computer).
5) Enter the following commands adb root then adb shell
6) mount -o rw,remount /oem
7) vi /oem/modem-config/modem.conf
8) press 'i' on your keyboard to enter edit mode and delete whatever is in the file and replace it with your operator modem from step 3 - (china_mobile_hk_ims in this example) then press 'ESC' and then ':wq'
9) make a backup of your important data
10) Turn off your phone, connect it into Flashmode to your PC (hold vol- while plugging in to the PC)
11) Flash your firmware with these options - do a wipe of all partitions. Tick the OEM box in the 'Exclude SIN' section. Alternatively follow this and avoid factory reset as per @pbarrette and @SGH-i200
12) Once you have completed reboot your phone and you should pickup VoLTE settings at setup.
IF you don't have root follow the guide earlier on how to backup TA, unlock bootoader
Flash a VoLTE enabled firmware. Install TWRP. Enter recovery (hold Vol- and power to start phone) install your preferred root option. Then connect your phone via ADB (step 5) to find your operator modem per step 3. Continue with Step 6&7. Start your phone.
I have tested this using existenZ 5.5. Theoretically should work for any Xperia phones with an OEM partition, however each phone might have a different modem name for the same operator ( I know this to be the case between the XZP and the XXP), however if you get the bit in between 'modelname_' and '_tar' and follow the same process for editing the modem.conf file you should get the same results.
Credit to
@sdugoten for Unlock, TWRP and ROOT guide
@akshay2shah for informing me of the modem selector tool for other Xperias
@VeixES for informing me of the oem.sin partition and modem.conf files
@niaboc79 for existenZ ROM (highly recommended)
@SGH-i200 and @pbarrette for testing and coming up with an easier way to use this (step 11)
Wipe all partition. It's too difficult.
Is it possible to enable VoWiFi for this device.? My phone carrier supports both VoWiFi and VoLTE on newer Sony Model. But only supports VoLTE on X Performance......
would not be a more detailed guide?
do not know how to copy ...
I did not find my operator ,,amss_fsg_dora_xxx_tar.mbn"
there is a link "default"
kodein said:
would not be a more detailed guide?
do not know how to copy ...
I did not find my operator ,,amss_fsg_dora_xxx_tar.mbn"
there is a link "default"
Click to expand...
Click to collapse
Is your operator an MVNO? You could try and see if using the underlying carrier modem is present? Otherwise see if another operator in your country's modem settings work ( unlikely but your only other option is to try till you have a modem setting that works). You could try looking at the apns-conf.xml file and see if there is an operator with similar settings if you know them.
bluesky1126 said:
Is it possible to enable VoWiFi for this device.? My phone carrier supports both VoWiFi and VoLTE on newer Sony Model. But only supports VoLTE on X Performance......
Click to expand...
Click to collapse
I have the same problem. Unfortunately I don't think there is any way unless you know the VoWiFi settings. I'll look into it. For me at least I'm no longer having dropped calls or missing out on important calls
chris_j26 said:
I have the same problem. Unfortunately I don't think there is any way unless you know the VoWiFi settings. I'll look into it. For me at least I'm no longer having dropped calls or missing out on important calls
Click to expand...
Click to collapse
I see......
Well, still congrats to you~
Please flashable zip sir
chris_j26 said:
1) First using a root file browser - I recommend this one browse to /system/etc/customisations/modem/
2) Check to see if there is any reference to your operator's modem in your model firmware. They are all in the format of amss_fsg_poplar_xxx_tar.mbn
Click to expand...
Click to collapse
If the mbn file is not there, can I copy it to this folder? What has to be changed after copying the file threre?
SGH-i200 said:
If the mbn file is not there, can I copy it to this folder? What has to be changed after copying the file threre?
Click to expand...
Click to collapse
If you got an mbn file it might work. However I suspect that it contains modem specific files if you copied it across from one device family (Xperia X , Xperia xz for example) it theoretically could work. I would imagine you would need to set permissions on the mbn file once copied I would think 1744 would do it but I'm not an expert on Android filesystem permissions. You could always do ls -la in terminal on the folder and replicate those permissions.
chris_j26 said:
10) Turn off your phone, connect it into Flashmode to your PC (hold vol- while plugging in to the PC)
11) Flash your firmware with these options - do a wipe of all partitions. Tick the OEM box in the 'Exclude SIN' section.
12) Once you have completed reboot your phone and you should pickup VoLTE settings at setup.
Click to expand...
Click to collapse
A Factory Reset is not needed to switch the active MBN! Please update point 11 to 'Flash cust-reset.ta' (and keep all your data and settings!):
pbarrette said:
I usually just flash the cust-reset.ta file. That clears the unit in the TA partition which holds the current carrier customization information.
Click to expand...
Click to collapse

Change apns that are locked guide

Okay everyone I have come up with yet another method. This one is demonstrated for android PIE but you can modify it a little and make it work for any version of android I guess.
This guide is written for an audience that has ROOT ACCESS and allows you to configure any type of APN criteria. The need for this guide is VERY VERY VERY real because you have never in your life been more frustrated than not being able to use your device properly all because of Verizons discrimination against its MVNO users by locking down APN's on devices that use Verizons network.
I've written other guides on other forum sections of XDA to get APN's into a phone with this problem but you are never able to completely edit everything how you want it. This is due to the app called "carrier settings" stored in the device that has all the carrier info programed inside the APK that automatically turn off editing APN options when verizon is detected
The simple breakdown of this process is
1. Locate telephony.db
2. copy telephony.db to a backup folder that you create somewhere on your device for safe keeping.
3. Copy telephony.db to your computer
5. open telephony.db using "DB Browser for SQLite" on your PC (I know there are Playstore apps that can edit these databases as well but its a pretty big task to find one that does it right.)
6. Make changes
7. Copy back to phone
8. overwrite the old telephony.db with your new one
9. Reboot phone
Part 1 Steps
1. Use a file explorer on device and navigate to /data/user_de/0/com.android.providers.telephony/databases/
This is the new location of telephony.db
2. Copy "telephony.db" to a backup location for safekeeping and send a copy to your computer.
Part 2 Steps
Open SQLite browser on PC and open the telephony.db file
1. Click on "Browse Data"
2. From there click the drop down next to"table"
Now you will see all your APN's your phone is setup to use. You could just go ahead and change the values of the current apn you are using which is most likely "VZWINTERNET"
3.Double click the field value you want to change
4. type the values you want into the field
5. When done click on "apply"
repeat the editing steps until you get all the values like you want them
6. now click "Write Changes"
7. Now copy the database back to your phone and then place it back into the /data/user_de/0/com.android.providers.telephony/databases/ directory to overwrite the old one
If i helped then give me a like
Picture attached of buttons to click in sqlite pc browser program
This bricked my android install sadly. I wonder what I did wrong.
deskjet390 said:
How I accomplish this on my Pixel XL (and other phones that have locked apn settings)
This is what I have to do because my carriers apns are not in the Pixel XL's database and wrongly detect them as Verizon.
1. First off you need to have root.
2. After root, you need to hook phone into PC and access adb shell with root permissions.
3. After that.... issue this command
Code:
content query --uri content://telephony/carriers/preferapn
This will tell you which APN your phone is using at this current time. I have found it easiest to edit the APN your phone is using already. You then look where it says "_id=SOME NUMBER"
4. Once you know what number your phones APN settings is using then its time to issue the commands to edit that apn Number field
Replace SOME NUMBER with whatever apn number you are editing. Below is the syntax to edit the most usual apn fields. A good thing to do would be to obtain your APN settings and I may be able to help you find out what fields you need to edit
Code:
content update --uri content://telephony/carriers --where "_id=SOME NUMBER" --bind type:s:"default,dun,mms"
content update --uri content://telephony/carriers --where "_id=SOME NUMBER" --bind user:s:"[email protected]"
content update --uri content://telephony/carriers --where "_id=SOME NUMBER" --bind mmsc:s:"http://mms.whateverwirelss.com"
content update --uri content://telephony/carriers --where "_id=SOME NUMBER" --bind mmsport:s:"whateverport"
This is what works for me 100 percent to get the right APNS in a verizon MVNO or Verizon LRA carrier partners apns programmed into whatever device i want to.
Click to expand...
Click to collapse
Follow this instead. Less risky, as you aren't directly editing files ^^
I have a pixel 3a XL on Lineage OS 19.1 and first method worked great. Updated on computer and then transferred back to telephone.db back to phone. Rebooted and mms came right in. I would have preferred just to be able to add the other apns to the apn screen vs mashing the mms info into the one apn that is currently being seen. Not sure if that is possible.

Categories

Resources