How I was able tether without root - LG G6 Guides, News, & Discussion

Following the instructions from this post (except don't rebook at the end) https://forum.xda-developers.com/showpost.php?p=61736387&postcount=15 I was able to successfully tether on the LG G6 h871. The data flows from phone to whatever wifi device smoothly.
The thing I'm still working on is that the changes don't persist if the phone turns off. The settings reset when the phone is restarted. Anyone know how to make the changes stick?
Thanks!

Here's a brief update.
You can actually make these settings from within your phone, instead of through the ADB command, which is useful in case you suffer an inadvertant reboot while in the field. Still haven't been able to make the settings persist through reboot however.
Taken from here https://forum.xda-developers.com/att-lg-v10/help/activate-hotspot-unlocked-lg-v10-t3585697
You use the Settings Database Editor and find these entries in there (you have to find the one in both the System and Global tables).
The setting in Global table "tether_dun_required 0" is protected and won't let you edit it.
You can change this using ADB, and fortunately granting these permissions is a one time process that does persist through normal reboots. https://forum.xda-developers.com/tm...settings-database-editor-tweaks-t3609876/amp/
"adb shell"
"pm grant by4a.setedit22 android.permission.WRITE_SECURE_SETTINGS" (check this command against the text the app pops up when you try to change the protected setting)
"reboot"
Now you are able to go into the Settings Database Editor app and modify these two settings
Global table "tether_dun_required 0"
System table "tether_entitlement_check_state 0"
And viola you will have a working wifi hotspot on your unrooted stock phone. Hopefully I can figure out a way to make these changes stick through reboots though, because it is a bit of a hassle to click through the app anytime it reboots, but at least it works, and it's certainly better than the popping out your sim card trick and trying to time shoving it back in just at the right moment during the wifi hotspot creation trick.

I used to use this trick but tried the other day and while I was able to connect to the hotspot I could not get internet on any device. Anyone else notice this.

Is this issue specific to the h871 / AT&T? On h870 (carrier free) you can just enable it in settings...

Worked very well for me, thanks! Did you get around these settings stick after reboot?

Related

[GUIDE] How to edit Kyocera Brigadier APN settings/change carriers.

So I wrote this guide a while ago for personal use and today I stumbled across a post on here from a couple of years ago about people trying to figure out how to change the APN settings on the Brigadier. I originally did this process to get the Brigadier running on the AT&T network, and sure enough it worked, but this can also be used to just change the APN settings for Verizon. So hopefully this can help some people.
Before you begin:
• Make sure phone has adequate battery life
• Have an SD Card with the apns.sh file and edited apns-conf.xml ready
• In the phone, go to Settings > Security and check the box that says “Unknown Sources” to allow the phone to install apps that are not from the Play Store. (This is for Kingroot)
apns-conf.xml
I originally found the apns-conf.xml in the /etc/ folder after I rooted the phone and used Droid Explorer. I just copied this to my desktop and made the changes for AT&T apn settings. I do not have the original apns-conf.xml file but I will attach my edited one.
This website has a nice list of a bunch of different networks APN settings: https://gist.github.com/imnuts/4319762
apns.sh
Now this part is optional, I just made the script so I didn't have to type out all the commands over and over when I was testing this process. If you choose not use the script, just enter the commands as they are below one by one. If you do choose to use this just open up notepad, paste it in, and save as "apns.sh"
Code:
mount -o remount,rw /system
cp /storage/sdcard1/apns-conf.xml /system/etc/
chmod 0644 /system/etc/apns-conf.xml
cat /system/etc/apns-conf.xml
ls -l /system/etc/apns-conf.xml
The Process
1. Download and install the Kingroot App (Download: http://forum.xda-developers.com/android/apps-games/one-click-root-tool-android-2-x-5-0-t3107461)
2. Once installed, run the App and root the phone. (No restart necessary)
3. Once rooted, go to the Play Store and download the following apps:
a. BusyBox (Author: Stephen (Stericson))
b. Terminal Emulator for Android (Author: Jack Palevich)​4. Once installed, go back to the Kingroot App > Root Authorization and give both Apps root permissions
5. Launch the BusyBox App and click the “Install” button. It will install in a couple seconds
6. Insert the SD Card if you have not already done so
7. Launch the Terminal Emulator App and type the following in order exactly as displayed:
a. “su” – this gives you root permissions in the App
b. “sh /storage/sdcard1/apns.sh” –this executes a script to over write the APN file. (If you chose not to use the script, now is when you enter the commands one by one)
c. If done correctly, and no errors arise, the output should be the contents of the XML file (The ATT configuration should be seen at top of file contents), as well as the permissions “-rw-r--r—“​8. Restart the phone
9. IF CHANGING CARRIERS: Before powering back on insert ATT/other carrier sim card and power on
10. Congrats! The phones APN settings are now changed. These changes will survive a factory reset too.
Warnings:
If you are changing the APN settings to be compatible with a different carrier, be warned I do not know if this will cause any issues down the line. I did not do too much intensive testing on it. I just saw it connected to the network, was able to load web pages, send texts and place calls. I did not use the phone for an extended period of time, but while testing it it seemed to work fine. The only annoying thing about switching carriers is that you will have an icon on your notification bar that says "Unknown Sim" or something along those lines. If you disable the Setup Wizard app, the pop up that shows up when you power the phone on will go away, but the little icon in your notification bar will remain there.
Anyway, I know the phone is getting kinda old now and people might not be using it too much, but I figured it's good to get the information out there anyway. I hope you enjoyed!

difficulty pulling build.prop using twrp - trying to get miracast to work.

Hi there, i've been trying to make some changes to my build.prop (mainly enable miracast...can't believe they would disable it!) and i've had a rather challenging time.
I am now stuck on how to pull the actual build.prop...when i enter the command i get a long list of ADB definitions but no file - at least not that i could find. I tried a few times, including directing the file to be saved on an empty drive in case i could not see it.
I have unlocked my boatloader and installed TWRP. Mounted the system then gone back and entered the commands in ADB....and i don't seem to be having any success. Any help would be appreciated.
thanks
m
Why not just edit it within the built in editors in most file explorers? I use Solid Explorer and it allows me to edit at will within the app itself, no pushing or pulling. Of course I back up my current one before doing anything to it
Tower1972 said:
Why not just edit it within the built in editors in most file explorers? I use Solid Explorer and it allows me to edit at will within the app itself, no pushing or pulling. Of course I back up my current one before doing anything to it
Click to expand...
Click to collapse
i'm not rooted...and i've read that you don't get OTA updates...and it's happened to me more than once that i have an issue with the phone, and i can't get service because it's rooted...
and i guess i thought it was too much trouble to get rooted, make the changes, and then unroot...but i could be wrong at this point?!
You won't get OTA with twrp either. You need stock recovery.
so i bit the bullet and rooted my phone...i was able to get the build.prop editor to work (at first i did not have busybox which it seems helps apps to realize you have root). So now when i go to unable Casting, i can turn it on from the top right of the cast screen, and my tv appears. I can select it and it starts to sync up...then the mircosoft display adapter shows that it's also trying to sync...and then it times out it seems. I've checked it with my tablet and my wife's phone...both work.
any suggestions?
I understand Miracast no longer works in Nougat. I'm still on MM with my 6P and it works, but if you're on 7, you may have lost that feature.
What about WUGS toolkit? Do you need to re rooted for that...ifnot thats what I always use to edit the prop. So much easier as it has most edits you'll make and you just choose.
you never needed to root i edit build.prop like this all the time
1. boot to twrp recovery
2. go to mounts and select system
3. adb pull /system/build.prop
4. make edits
5. adb push build.prop /system/
idk if your edit will work but thats how to do it without root and for some of the other things said in this topic you can ota in twrp but it will fail if modify anything like you just did

Razer Phone 2 soft bricked after applying GPS Joystick GPS disabler

I have a Razer Phone 2 rooted with magisk. I use GPS Joystick. I decided to select the "disable system GPS" setting in its options. I rebooted as the app requested and now my phone loads to the point where it wants me to enter my pin and I see my wallpaper for a split second then the screen goes black and it loads up the status bar about ever 10 seconds for a split second then it repeats. Like it is stuck in a loop. After a couple minutes phone reboots and I get this message...
Android Recovery
razer/chery12/aura
9/P-MR1-RC003-RZR-190305/3110
user/release-keys
Use volume up/down and power
Can't load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory data reset and erase all user data stored on this device.
Try again
Factory data reset
Click to expand...
Click to collapse
So I reached out to the dev of GPS Joystick and he explains that the option disables the location services called "fused location provider" and I have to re-enable it to fix the problem. He sent me a post here explaining that I need to pull an .xml file from the phone, change the code, and push it back. Simple right? Well maybe if I have TWRP, but I don't. I can however boot into the phones recovery options and there is an option there to "apply update from adb" but I cannot seem to pull anything using that interface. My Windows computer recognizes the device using Minimal ADB and Fastboot but it shows it as a whole bunch of numbers then the word "sideload" which I guess is a limited form of adb just for side loading? Maybe someone could make me a script that I can sideload that changes the file back to normal? Here is the code from the dev of GPS Jostick that is used to disable and enable the fused lcoation provider.
It calls this code to disable:
ComponentName component = new ComponentName("com.android.location.fused", "com.android.location.fused.FusedLocationService");
getActivity().getPackageManager().setComponentEnabledSetting(component, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0);
And similar code to re-enable it:
ComponentName component = new ComponentName("com.android.location.fused", "com.android.location.fused.FusedLocationService");
getActivity().getPackageManager().setComponentEnabledSetting(component, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
Click to expand...
Click to collapse
So my question is, can I pull this /data/system/users/0/package-restrictions.xml file from my phone and push it back without using TWRP? But instead using the phones recovery option and its various selections? I'd prefer to exhaust the resources to recover the phone since I have spent weeks personalizing it. I am not fluent in adb but I am hoping someone can throw some ideas or even a solution at me that I am missing. All I got to do is pull a file, change a word, push it back and reboot. I can't imagine there isn't a way to do this by just using what the phone has to offer. Any help would be greatly appreciated.
Another idea that came to mind is in its current condition could I install TWRP? Is fastboot an option at this point? Maybe if I can flash TWRP in its current state I can then make the appropriate modifications.
I ended up fixing the problem. I installed arter97's kernel that had TWRP baked into it. I then used TWRP to copy over the .xml file, change the code as mentioned above, and then copied it back to the phone. Problem solved. It is amazing how one simple word in a .xml file can prevent a phone from functioning properly. It simply amazes me.

Captive Portal Mode re-activating automatically / Android10 (Samsung, others too?)

Hi there.
Problem with captive portal mode. Can't disable it, it re-enables itself after reboot.
Samsung S10+, Android 10 (BeyondROM based on Samsung Stock, magisk rooted).
I've addressed this in the BYR thread, but believe it must be Samsung specific, so hoping to reach more S users here.
Basically what I do is:
Code:
su
su
pm disable com.android.captiveportallogin
settings put global captive_portal_detection_enabled 0
settings put global captive_portal_server localhost
settings put global captive_portal_mode 0
I then check that portal_mode is 0, check with TiBackup that the package is frozen - both OK.
Then I reboot. Afterwards portal_mode is again 1.
Doing same via adb or termux makes no difference (wouldn't have expected it to, but tried nevertheless)
I've put a little script in /data/adb/service.d/ along with the AFwall startup leak fix script. My script gets executed, but after the boot is complete, captive_mode is again 1.
From others I learned that their AOSP 10 does not suffer from this using same procedure, so it must be something particular to Samsung. Something must be resetting this during boot.
Any ideas where to start?
Edit: Additional observation: seems it re-enables itself after some time even without reboot, and / or when switching from 4G to WiFi, or when cycling wifi off/on/off.
Oh, and no, i do not want to redirect captive checks to some trusted servers. Would be an option, sure, but now that I'm in this, I wanna solve it, 'cause someone is not playing nice here

Tasker 'Secure Settings' ADB access - How 'safe' is it ??

Ok lets first explain the situation
I've been dabbling with Tasker (Paid for version)- getting some automation depending on certain situations (mainly stuff like 'If I'm @ {location} get volumes set high' or ' If Unread msg then vibrate my Amazefit bip watch' - Nothing too complicated using variables / javascript etc)
One situation I want to attempt though is 'If Gpay app is started - turn on NFC, but when I leave the app - turn NFC off'
Now I already know there are 2 'main' ways I can turn on/off NFC in Tasker.. either use 'AutoInput plugin' or use 'Secure Settings'
- I've tried with Autoinput plugin but the problem is that with the free option, you need to watch an Ad every day to use it but of course I can pay for it (its only a couple of quid)
However you can't Install it & pay for it directly from within the plugin - you need to install yet another App (AutoApps) first - & although this one is free - I just don't like adding more bloat to my phone than necessary. Adding both the plugin & this additional App adds (although only a 'minor' amount) up to 20Mb
The other method is give Tasker 'Secure settings' permission
- So I read the 'What to do to give 'Write Secure Settings Permission' to Tasker' (enable Developer mode > Usb Debugging > Install ADB on PC etc etc) & it looks simple enough,
But (a loooong time ago) I tried other 'hacks' & it ended up disastrously (probably I did something wrong with missing a step or something) & I just want to make sure that it IS as simple as it seems and also ask how safe is it
for example
* If I type in the command in ADB - could something go wrong & could it crash/brick the phone ?
* Is this permanent - ie if I turn off/on phone or if I get an OTA update & phone restarts - will it stay, or will I have to repeat the ADB command each time ?
* Will this 'break' official OTA updates (whether security &/or Android firmware) - I once did a firmware update with a step that used ADB (IIRC) & it broke something that prevented any updates from happening
- official OR manual firmware updates
Any help/advice would be appreciated
Cannon_Foddr said:
* If I type in the command in ADB - could something go wrong & could it crash/brick the phone ?
* Is this permanent - ie if I turn off/on phone or if I get an OTA update & phone restarts - will it stay, or will I have to repeat the ADB command each time ?
* Will this 'break' official OTA updates (whether security &/or Android firmware) - I once did a firmware update with a step that used ADB (IIRC) & it broke something that prevented any updates from happening
- official OR manual firmware updates
Click to expand...
Click to collapse
ADB is the door to your phone's Android. It's a tool not meant to be used by John Doe. Wrongly used you can brick your phone. Hence it's by default disabled.
1. Yes, using ADB you can render your phone absolutely useless. If you e.g. enter
Code:
adb shell rm -rf /
then phone gets totally wiped ( really all gets destroyed, it gets naked ) - you can throw it into electric waste.
2. ADB commands aren't persistent, but their results may be.
3. ADB itself breaks nothing: it's a driver installed on your computer that let you access Android's files and launch Android executables.
Thanks for the reply
I doubt I'll use THAT command.
I forgot to mention what tasker's command is
adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS
Not 100% sure about your last comment though.
ADB allows access to android files so changing android files could break things, which I'm worried about especially with OTA updates etc. (my last phone stopped getting OTA updates when I rooted it despite using official firmware)
However IF I understand the above command all this does is tell the android operating system ('android') to only give the tasker app (which 'Real' name is 'net.dinglisch.android.taskerm') the rights ('permission') to access the required settings ('WRITE_SECURE_SETTINGS') which the NFC on/off toggle is part of (settings >connected devices > connection preferences> nfc) & 'shouldn' t' affect any other files such as OTA (unless OTA is also part of secure setting?)
@Cannon_Foddr
As I can see you until now haven't understood what ADB is, how it works.
Same probably your understanding of what an OTA is.
Personally never would allow 3rd-party apps ( like Tasker ) to modify sensible system settings: Tasker isn't an open-source app, so you can't control what it does in the last run.
It's simply on you to decide whether Tasker is given that right, or not ...
Can't see why 'open-source' has to do with this
IMHO if Open-source - anyone can release similar apps with added extra hidden code that could spy's on you/steal info etc, but a 'closed sourced' app from a long running developer (tasker been around for 10yrs with over 1mil downloads) must mean people seem to trust him/them & if he was 'dodgy' surely he would've been caught out by now
Anyway the Bottom line seems to be
Safe route: pay for plugin & live with extra bloatware
Or
Risky route: give access to secure system resources, see what happens & keep fingers cross nothing does
Thanks for your replies.. I think I may have to sit down & have a long hard think which route I feel more comfortable with
I have been using Automate for about 4 months now. I granted it WRITE_SECURE_SETTINGS and I have not noticed any modifications in my system. Granted I may have not looked specifically for them but as far as braking the system or disruption of OTAs no issues so far
DennisHarrows said:
I have been using Automate for about 4 months now. I granted it WRITE_SECURE_SETTINGS and I have not noticed any modifications in my system. Granted I may have not looked specifically for them but as far as braking the system or disruption of OTAs no issues so far
Click to expand...
Click to collapse
I assume you had to do something like Taskers command then to grant the secure settings
( "adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS" )
Cannon_Foddr said:
I assume you had to do something like Taskers command then to grant the secure settings
( "adb shell pm grant net.dinglisch.android.taskerm android.permission.WRITE_SECURE_SETTINGS" )
Click to expand...
Click to collapse
Automate is straight forward, there is a toggle for "modify system settings" needed for some tasks to run and one you run the ADB command, it's done

Categories

Resources