Settings.db gone on Marshmallow?? R - Nexus 5 Q&A, Help & Troubleshooting

Guys I have a question...
On stock lollipop there is a DATABASE folder located at com.android.providers.settings ,inside the database folder a file called SETTINGS.DB .
I usually edit this file to avoid carrier detecting that I'm tethering and as always worked.
Now I updated to marshmallow on my N5 but the setting.db isn't there anymore.
Ideas?
Thanx
Sent from my Nexus 5 using Tapatalk

I have the same issue.
Basically Tether no longer works on my Nexus 5.
-Hotspot turns on and Data is working on Nexus 5, but connected (Tethered Devices) cannot get internet access.....DNS_Probe failures

I rolled back to lollipop for the moment while finding a solution
Sent from my Nexus 5 using Tapatalk

This worked for me on Sprint device
I used adb to change the settings.db
1. Typed "adb shell"
2. Then "settings put global tether_dun_required 0"
3. I also added in the build.prop file "net.tethering.noprovisioning=true"
reboot and enjoy
Hope this helped.

chrisduclo said:
This worked for me on Sprint device
I used adb to change the settings.db
1. Typed "adb shell"
2. Then "settings put global tether_dun_required 0"
3. I also added in the build.prop file "net.tethering.noprovisioning=true"
reboot and enjoy
Hope this helped.
Click to expand...
Click to collapse
Thanks I'll give that a try now.
Successful, Hotspot working here now.
I already had the build.prop entry (force of habitat) :
net.tethering.noprovisioning=true
For the setting global entry:
I used Terminal Emulator
su (for super user)
Then typed "settings put global tether_dun_required 0"
After making entry I rebooted device and tested Hotspot.
Hotspot working.

My Nexus 5 with rooted (Elementalx) Android 6.0 works with tethering by just turning it on. I am on AT&T.

mariano3113 said:
Thanks I'll give that a try now.
Successful, Hotspot working here now.
I already had the build.prop entry (force of habitat) :
net.tethering.noprovisioning=true
For the setting global entry:
I used Terminal Emulator
su (for super user)
Then typed "settings put global tether_dun_required 0"
After making entry I rebooted device and tested Hotspot.
Hotspot working.
Click to expand...
Click to collapse
Can u make a step by step tutorial for the less knowledge people like me please lol
Sent from my P01MA using Tapatalk

He just told you
Sent from my Nexus 5 using Tapatalk

guinnes.s said:
Can u make a step by step tutorial for the less knowledge people like me please lol
Sent from my P01MA using Tapatalk
Click to expand...
Click to collapse
Step 1) Use a Nexus 5 or 6 on Marshmallow with Root* (There are plenty of threads and ROMs detailing Root access on those Nexus devices with Busybox and Super Su/SuperUser working)
Step 2) Download a File Explorer that offers root privilege like ES File Explorer (Root Explorer toggled On and granted SU access)
Step 3) Navigate in file explorer to System ->Build.prop
Step 4) Open build.prop (Es File Explorer has ES Note Editor included)
Step 5) choose to edit, so that you can add the line entry: net.tethering.noprovisioning=true
Step 6) Save build.prop and exit
Step 7) Download Terminal Emulator or some other Terminal App
Step 8) Open Terminal app and grant SU either by prompt or by typing "su" as a command *App and SU confirmation process may vary*
Step 9) After SU access is acquired in Terminal Emulator/app type: settings put global tethering_dun_required 0
Step 10)Exit Terminal app
Step 11) Reboot device
Step 12) Test Native Hotspot/tether
If not working and on Sprint/CDMA carrier double check/repeat steps 1-12
(CDMA carriers don't allow APN edit on Nexus 5...APN list does not show)
If using GSM carrier (At&t, T-Mobile), if hotspot is still not working;
-Go to settings->Wireless & Networks choose More
-Select Cellurlar Networks
-Select Access Point Names (APN)
-Go to APN Type and add: ,dun
(Comma dun with no spaces*)
Save & Exit
Reboot device
Test Hotspot/tethering, if not working double check all entry changes...

Can you still do this on a phone that is not rooted? This worked on lollipop but doesn't on marshmallow:
adb shell content insert --uri content://settings/system --bind name:s:tether_dun_required --bind value:i:0

testinguser said:
Can you still do this on a phone that is not rooted? This worked on lollipop but doesn't on marshmallow:
adb shell content insert --uri content://settings/system --bind name:s:tether_dun_required --bind value:i:0
Click to expand...
Click to collapse
what's the error that you're getting when you run that command.

[/COLOR]
mariano3113 said:
Step 1) Use a Nexus 5 or 6 on Marshmallow with Root* (There are plenty of threads and ROMs detailing Root access on those Nexus devices with Busybox and Super Su/SuperUser working)
Step 2) Download a File Explorer that offers root privilege like ES File Explorer (Root Explorer toggled On and granted SU access)
Step 3) Navigate in file explorer to System ->Build.prop
Step 4) Open build.prop (Es File Explorer has ES Note Editor included)
Step 5) choose to edit, so that you can add the line entry: net.tethering.noprovisioning=true
Step 6) Save build.prop and exit
Step 7) Download Terminal Emulator or some other Terminal App
Step 8) Open Terminal app and grant SU either by prompt or by typing "su" as a command *App and SU confirmation process may vary*
Step 9) After SU access is acquired in Terminal Emulator/app type: settings put global tethering_dun_required 0
Step 10)Exit Terminal app
Step 11) Reboot device
Step 12) Test Native Hotspot/tether
If not working and on Sprint/CDMA carrier double check/repeat steps 1-12
(CDMA carriers don't allow APN edit on Nexus 5...APN list does not show)
If using GSM carrier (At&t, T-Mobile), if hotspot is still not working;
-Go to settings->Wireless & Networks choose More
-Select Cellurlar Networks
-Select Access Point Names (APN)
-Go to APN Type and add: ,dun
(Comma dun with no spaces*)
Save & Exit
Reboot device
Test Hotspot/tethering, if not working double check all entry changes...
Click to expand...
Click to collapse
I've tried multiple Terminal Emulators on my device and receive an error message after inserting the "settings put global tethering_dun_required 0" and then hitting "ENTER" key on Google Keyboard. I think this process must be completed on a computer using adb command. Can you confirm that the Terminal Emulator app was successful in making this change? I have tried multiple emulators... Thank you!
NEXUS 6, Rooted, Stock 6.0 MRA58K

HUSKER77 said:
[/COLOR]
I've tried multiple Terminal Emulators on my device and receive an error message after inserting the "settings put global tethering_dun_required 0" and then hitting "ENTER" key on Google Keyboard. I think this process must be completed on a computer using adb command. Can you confirm that the Terminal Emulator app was successful in making this change? I have tried multiple emulators... Thank you!
NEXUS 6, Rooted, Stock 6.0 MRA58K
Click to expand...
Click to collapse
Adding some images as confirmation: Current device used for Screen shots was Nexus 5 (hammerhead)
Terminal App screenshot
Su entry screenshot
SU access prompt screenshot
Root Terminal screenshot
Settings Dun entry screenshot
Successful entry w/no error message screenshot
Hope that helps. I'll try tonight on Nexus 6 (shamu) as a follow up.
testinguser said:
Can you still do this on a phone that is not rooted? This worked on lollipop but doesn't on marshmallow:
adb shell content insert --uri content://settings/system --bind name:s:tether_dun_required --bind value:i:0
Click to expand...
Click to collapse
Yes, you should be able to force set value via adb shell without root.
-Or it used to- with Nexus Devices I have an inclanation to Root

HUSKER77 said:
[/COLOR]
I've tried multiple Terminal Emulators on my device and receive an error message after inserting the "settings put global tethering_dun_required 0" and then hitting "ENTER" key on Google Keyboard. I think this process must be completed on a computer using adb command. Can you confirm that the Terminal Emulator app was successful in making this change? I have tried multiple emulators... Thank you!
NEXUS 6, Rooted, Stock 6.0 MRA58K
Click to expand...
Click to collapse
Follow up with success on Marshmallow with Nexus 6 (shamu) (No errors)

testinguser said:
Can you still do this on a phone that is not rooted? This worked on lollipop but doesn't on marshmallow:
adb shell content insert --uri content://settings/system --bind name:s:tether_dun_required --bind value:i:0
Click to expand...
Click to collapse
I just tried this command on 6.0 MRA58K and it appeared to work, I got no errors. I also modified build.prop as above. I will try tomorrow to see if the Tethering data increments within my T-Mobile Account app.

mariano3113 said:
Yes, you should be able to force set value via adb shell without root.
-Or it used to- with Nexus Devices I have an inclanation to Root
Click to expand...
Click to collapse
So you're saying we could get tether on Nexus Marshmallow *without* root?
...or that we can force set that value with ADB shell without root, but *also* need to edit build.prop?
Thanks!

On my N5 on MetroPCS, I was able to enable tethering by just running the following:
Code:
adb shell
settings put global tether_dun_required 0
I ran it has su originally, but I can run it without and don't get any errors. I didn't change the build.prop I did have to change the APN type to IP4 (it would work at first on IP6 but when I switched towers or something it would stop). So in theory in my case root shouldn't be needed, my device is now unrooted again and all is working fine.
Tethering now works, I think this is a little different than some of the other carriers since MetroPCS allows tethering, but just not with a BYOD from what I have heard.

Guys, anyone know the location of settings.db on MM?

On my Sprint Nexus 5 running 6.0.1
I ran the
adb shell
settings put global tether_dun_required 0
Didn't edit build.prop since I have no idea how to.
I'm tethering. No root. Bone stock. No warnings or anything yet.

kschossow said:
On my Sprint Nexus 5 running 6.0.1
I ran the
adb shell
settings put global tether_dun_required 0
Didn't edit build.prop since I have no idea how to.
I'm tethering. No root. Bone stock. No warnings or anything yet.
Click to expand...
Click to collapse
OK. Works perfect on my Nexus 5.
On my Nexus 6p I do the same commands but I get this message when I try to turn on hotspot. "Your device does not support this service. Please contact your service provider."
I thought it might work on the 6p seeing as it works on the Nexus 5. Both are on marshmallow. Any ideas?

Related

{Howto}Downgrrade form rooted 1.47.651.1

Ok... If your wimax isn't working and you want to downgrade to try to get it working this is how to do it...
1st get all of the files like you want to do Toast's Part-2. link: http://forum.xda-developers.com/showthread.php?t=701835
Then do this part:
STEP 2~FLASHING MTD PARTITION TO ENABLE DOWNGRADE:
- download all files posted above
- unzip the flash_image.zip and the mtd-eng.zip
- put the flash_image and mtd-eng.img on the root of your sdcard
- go into shell on ur pc and do:
adb shell
cat /sdcard/flash_image > /data/flash_image
chmod 755 /data/flash_image
/data/flash_image misc /sdcard/mtd-eng.img
- this should only take a second or two
- now put the PC36IMG.zip on the root of your sdcard
- power off the phone
STEP 3~FLASHING ENG BUILD:
- hold volume down + power to boot into hboot
- it should now find and verify the PC36IMG.zip on the root of your sdcard. itll show a blue status bar on the top right of the screen.
- after a minute or so it will ask u if u wanna flash SAY YES
- affter it flashes the PC36IMG.zip it will ask if you wanna reboot. SAY YES
After if finally boots you should see HTC quietly brilliant which hangs forever but it should eventually get past it. Once it does you will have the oldest everything. This is a beta build and has a bunch of tools but just do an upgrade to root like you normally would. I would suggest going to .6 then upgrading to the latest 47 from there.
Hope that this helps someone.
P.S. is anyone willing to dump all of the tools that are included in this rom. It might be helpful for the other devs.
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Tell me the easy way. I would love to do it instead.
kthejoker20 said:
Thats the hard way... but yeah it'l work.
Why is everyone so hype on adb everything...?
Click to expand...
Click to collapse
It's just easier to copy and paste stuff, even typing on a real keyboard. It's a pain in the ass doing it via terminal emulator with the lack of a physical keyboard on our Evo's.
Can anyone confirm if this helps fix the 4g issue?
krosemm said:
Can anyone confirm if this helps fix the 4g issue?
Click to expand...
Click to collapse
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Neotelos_com said:
If you used the unrevoked, no it wont.
There is no fix for 4g from unrevoked yet.
Click to expand...
Click to collapse
I used the toast method. And if i'm not mistaken I should flash roms w/o the 1.47.651.1 OTA update after downgrading right?
Nope, I try this method and it is not working. Some how the new OTA encrypted a code that any lower version will not over write it.
You don't have root access to even copy/paste or push the files to /data. I tried this and got a permission denied error message.
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
It worked for me... you have to make sure that when you enter the su command in adb to look at your phone. There should be a super user permission box that pops up. Accept it and youll be able to adb. It went fine for me after that.
urcboss07 said:
How do you input adb shell into Vista, I clicked "start", "run" and type "cmd" it bring up C:\users\XXXXX\ cd c:\android hit "enter"
then I type
c:\android>adb remount
Access is denied
Please advise what I did wrong. thanks
Click to expand...
Click to collapse
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
mrmomoman said:
1) Put your phone on USB Debug
2) On your Phone make sure the Ninja(SuperUserPermission) is set to prompt you when you have a request.
3) go to your PC and type in adb shell
4) type in SU
5) Once do you that you will see a prompt from the Ninja asking for a request. Allow for it. And it will remember from that point forward.
6) Look at your cmd prompt screen for a # - if you have it you have full access.
Then so what commands you have been given to do.
It can also be done from the Android Terminal Emulator but some might not like working with a smaller screen I like it myself. Makes me feel geeky
Click to expand...
Click to collapse
This would only work if after the messup your still has root access. Some people have root and the "SU" will work but for the people w/o root will get access denied.
also
From above (I hate quoting) have you tried going to your tools folder inside your android folder and from there try your adb commands?
If you applied the OTA sent from Sprint, you lost root access. There will be no Ninja in the programs folder, because it was a new rom that the was flashed with the OTA. Root access has been closed for those that downloaded the update. If you try and type su, you will get permission denied.
Those of you that still have the root and superuser rights, DON'T DOWNLOAD THE OTA!! You are in a better position then the rest of us. I wanted the good battery life, so that's why I did it.

[Q] Nexus S Rooted, but I always have to type "su"...

By all accounts, my Nexus S 2.3.4 has been successfully rooted using this method: http://forum.xda-developers.com/showthread.php?t=1138755
Now I can use apps that require root access, and I can also type "ADB shell su" to gain root access if I want to poke around within the file stucture.
HOWEVER, what puzzles me is that when I type "adb shell", I am prompted by a "$" symbol instead of "#". I have to type "su" from the adb shell in order to get the "#" symbol, and when I exit out of shell I lose my su status. It means that I cannot simply do something like "adb shell ls /system/" or "adb remount"; I get a "permission denied" message. It also means I cannot easily pull or push files to/from the /system/ dirs from the command prompt.
When I was using a rooted 2.3.3, I was always promted with the "#" symbol after typing "ADB shell". How do I get this level of root access in 2.3.4?
This is normal.
Sent from my Nexus S 4G using xda premium
Fair enough. But is there a way to get "#" access directly from "ADB shell" ?
The main thing I want to be able to do is pull and push files directly from/to the system directories. As I mentioned previously, with my old rooted OS (2.3.3) I was able to achieve this by simply typing "adb push [myfile] /system/".
But now, it seems my only options are:
a) "adb push [myfile] sdcard/", then "shell", then "su" and then copy the files from /sdcard/ over to /system/, then "exit" "exit".
b) Boot into recovery, mount the system, then "adb push [myfile] /system/".
Is there a simpler method?
shanksworthy said:
Fair enough. But is there a way to get "#" access directly from "ADB shell" ?
The main thing I want to be able to do is pull and push files directly from/to the system directories. As I mentioned previously, with my old rooted OS (2.3.3) I was able to achieve this by simply typing "adb push [myfile] /system/".
But now, it seems my only options are:
a) "adb push [myfile] sdcard/", then "shell", then "su" and then copy the files from /sdcard/ over to /system/, then "exit" "exit".
b) Boot into recovery, mount the system, then "adb push [myfile] /system/".
Is there a simpler method?
Click to expand...
Click to collapse
Yeah, flash an insecure boot image, otherwise no.
Sent from my Nexus S using xda premium
krohnjw said:
Yeah, flash an insecure boot image, otherwise no.
Sent from my Nexus S using xda premium
Click to expand...
Click to collapse
Can anyone recommend an insecure boot image for I9020A, v2.3.4?
I've looked everywhere...
shanksworthy said:
Can anyone recommend an insecure boot image for I9020A, v2.3.4?
I've looked everywhere...
Click to expand...
Click to collapse
no one wants an insecure boot image. imagine if a malicious app was installed onto your phone, and it had complete root privilege to whatever it want. before you would know it, you would have a $20000 bill to some porn site. and there would be a video of you doing whatever you do in privacy, floating around the internet, recorded from your phones front facing camera

[GUIDE][HOW-TO] Use VPN in Jellybean without security lock

I am not responsible for anything that may come of or from this information. Use at your own risk!
Step #1)
Create security lock through Settings (pattern, pin, password).
Step #2)
Add VPN connections
Step #3)
Plug the phone in and run these commands (requires adb to be setup properly and drivers). I am sure there is a way to do this directly on the phone but this is easier for me.
Commands to remove security:
Code:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=0 where name='lockscreen.password_type';
.exit
exit
Finished!
For me no reboot was required and you do not have to restore pattern in order to create more VPN connections.
Optional Step:
If you decide that you want to restore the security run the one that fits you.
Commands to restore pattern:
Code:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=65536 where name='lockscreen.password_type';
.exit
exit
Commands to restore pin:
Code:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=131072 where name='lockscreen.password_type';
.exit
exit
Commands to restore password:
Code:
adb shell
sqlite3 /data/system/locksettings.db
update locksettings set value=262144 where name='lockscreen.password_type';
.exit
exit
Great! Thank you!
really helpful, i've been fed up with stupid design.
Brilliant, does it also work for ICS?
I don't have an ICS device. If I can find someone that is willing to let me take a look at their ICS device I can see.
When I restart my phone, it needs a password to access VPN menu. what should I do? I don't want to run these commands every time I restart my phone. any solutions?
does it work with exchange password policy as well?
Sent from my GT-I9300 using xda app-developers app
P30SiNa said:
When I restart my phone, it needs a password to access VPN menu. what should I do? I don't want to run these commands every time I restart my phone. any solutions?
Click to expand...
Click to collapse
Hmm did notice that before I will see whats up with that,
portnoy.vitaly said:
does it work with exchange password policy as well?
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
I am not sure but I would imagine so. I would try with pattern lock and not PIN or Password.
Says that "sqlite3: not found" ....
I justd used Forget password option and entered pin , then i didnt choose any options , and the pattern removed
Just tried this. Added vpn, removed lock pattern. It went back to slide, worked fine.
Rebooted, not visiting VPN settings it's asking me to enter credential storage...any ideas how I can a) get past this without wiping my wifi/vpns, or b) remove this but keep my vpns and slide lock?
sorset said:
Says that "sqlite3: not found" ....
I justd used Forget password option and entered pin , then i didnt choose any options , and the pattern removed
Click to expand...
Click to collapse
Same here.
Works great, thanks for sharing :good:
spumanti said:
Same here.
Works great, thanks for sharing :good:
Click to expand...
Click to collapse
Works for me, too, until I reboot :/
Doesn't work. Apparently it's problem with sqlite.
soinfo_relocate(linker.cpp:1013): cannot locate symbol "sqlite3_enable_load_extension" referenced by "sqlite3"...CANNOT LINK EXECUTABLE
Any help please?
Use Script Manager to make this done on every boot.
1. Make this a batch file:
Code:
#!/system/bin/sh
echo "update locksettings set value=0 where name='lockscreen.password_type';" | sqlite3 /data/system/locksettings.db
and save it to your sdcard
2. Use Script Manager to run it on boot and enable su (root).
3. Test it by running it from script manager and see if it runs correctly. You can try enabling PIN and it should be disabled after running this.
4. Final test: reboot your phone and see if PIN/password is disabled.
Keep in mind this gets executed after everything else, so if you try to wake your phone right away, you might still see the PIN prompt.
Another way without script manager:
1. Make this a batch file:
Code:
#!/system/bin/sh
echo "update locksettings set value=0 where name='lockscreen.password_type';" | sqlite3 /data/system/locksettings.db
and save it to your sdcard as 99pinremove
2. Run the following using adb:
Code:
adb shell
su
mount -o remount rw /system
cp /sdcard/99pinremove /etc/init.d/99pinremove
chmod 755 /etc/init.d/99pinremove
chown root:shell /etc/init.d/99pinremove
exit
exit
In 4.4 there is no such file
Code:
/data/system/locksettings.db
.. any ideas?

[HOW TO] Spoof/Change Wi-Fi MAC Address & Hostname in Yuphoria (Root)

Requirements:
1. Rooted Yuphoria phone.
2. Terminal Emulator app.
Steps:
1. Turn Off Wi-Fi and Open Terminal Emulator app.
2. Enter 'su' and grant root access.
3. To change MAC address, Enter the following:
Code:
echo [I]XX:XX:XX:XX:XX:XX[/I] > /sys/devices/soc.0/a000000.qcom,wcnss-wlan/wcnss_mac_addr
(Replace XX:XX:XX:XX:XX:XX with your desired MAC address like 12:34:56:78:9a:bc)
(You can even edit the file 'wcnss_mac_addr' present in /sys/devices/soc.0/a000000.qcom,wcnss-wlan/ if you don't like Terminal )
4. To change the hostname (device id shown in router), Enter the following:
Code:
setprop net.hostname [I]ZZZZZ[/I]
(Replace ZZZZZ with any desired name)
5. Now Turn ON your WiFi
That's it!!
NOTE:
The MAC Address & Hostname restores to original values after reboot (or Power Off )
Alternatively, you can create a script like this:
Code:
#!/system/bin/sh
echo 12:34:56:78:9a:bc > /sys/devices/soc.0/a000000.qcom,wcnss-wlan/wcnss_mac_addr
setprop net.hostname Anonymous
and execute it (give su permission before executing)
I also made a flashable zip to make the job easy. Just flash it and open Terminal and for example, enter:
Code:
su
spoof 12:34:56:78:9a:bc Anonymous
Reply if you have any doubts/issues
Nice thread ..
Sent from my YU5010 using XDA Free mobile app
How to get hostname?
like you mention in example "net.hostname" where can i find it?
kai_bond said:
How to get hostname?
like you mention in example "net.hostname" where can i find it?
Click to expand...
Click to collapse
To get your current hostname:
Code:
su
getprop net.hostname
To set your own hostname:
Code:
su
setprop net.hostname any_text
Please
My Motorola Moto G 2014 has no MAC address? Help me ? please a script forever? There is a possibility ?
rogerdlucca said:
My Motorola Moto G 2014 has no MAC address? Help me ? please a script forever? There is a possibility ?
Click to expand...
Click to collapse
First of all, this thread is for Micromax Yu Yuphoria phone only.
You should have asked in Moto G 2014 sub-forum
Anyway, how do you know that your phone doesn't have MAC address?
Without MAC address, you can't even connect to the internet..
BTW, check Settings->About Phone-> Status -> MAC Address if there is a MAC address..
If there's no MAC address, better flash modemst1.img and modem2st.img
Terminal emulator is showing non existant file after i entered the command
In my phone soc folder is located in sys/devices/system/soc
Sent from my LG-E405 using XDA Free mobile app
sai mohan said:
Terminal emulator is showing non existant file after i entered the command
In my phone soc folder is located in sys/devices/system/soc
Click to expand...
Click to collapse
This is only for Yuphoria phone.
This varies for other phones....
When I try change that one my mobile going to switch off what to do
GokulNC said:
Requirements:
1. Rooted Yuphoria phone.
2. Terminal Emulator app.
Steps:
1. Turn Off Wi-Fi and Open Terminal Emulator app.
2. Enter 'su' and grant root access.
3. To change MAC address, Enter the following:
Code:
echo [I]XX:XX:XX:XX:XX:XX[/I] > /sys/devices/soc.0/a000000.qcom,wcnss-wlan/wcnss_mac_addr
(Replace XX:XX:XX:XX:XX:XX with your desired MAC address like 12:34:56:78:9a:bc)
(You can even edit the file 'wcnss_mac_addr' present in /sys/devices/soc.0/a000000.qcom,wcnss-wlan/ if you don't like Terminal )
4. To change the hostname (device id shown in router), Enter the following:
Code:
setprop net.hostname [I]ZZZZZ[/I]
(Replace ZZZZZ with any desired name)
5. Now Turn ON your WiFi
That's it!!
NOTE:
The MAC Address & Hostname restores to original values after reboot (or Power Off )
Alternatively, you can create a script like this:
Code:
#!/system/bin/sh
echo 12:34:56:78:9a:bc > /sys/devices/soc.0/a000000.qcom,wcnss-wlan/wcnss_mac_addr
setprop net.hostname Anonymous
and execute it (give su permission before executing)
I also made a flashable zip to make the job easy. Just flash it and open Terminal and for example, enter:
Code:
su
spoof 12:34:56:78:9a:bc Anonymous
Reply if you have any doubts/issues
Click to expand...
Click to collapse
Name-Himanshu
Hi, I have redmi 4 ... and redmi 4 wifi path same as yuphoria phone like - /sys/devices/soc/a000000.qcom,wcnss-wlan/wcnss_mac_addr
but when i change the mac address suddenly my phone restard.. please solve my problem..

GUIDE: How to avoid the Captive Portal Checkin to Google

Dear XDA community,
this my first own thread and guide so please be forbear with me
And i hope i choose the right section
As the topic in the thread says it handles about the Captive Portal Checkin done by Android.
So first some general info about this.
1. What is the Captive Portal Checkin?
Every time your android phone connects to the internet via mobile connection or wlan it sends a request to the following url:
http://connectivitycheck.gstatic.com (Google URL).
After that your gets device gets http 204 answer from the mentioned url and at that point the x-symbol at your network icon in the status bar disappears.
The reason for that behavior is that Android wants to be sure that your connection has internet access.
If you block that request via AfWall for example the dns fails in some cases and you can't go into the Internet.
Silly.
2. Why is this problematic?
That's a good question because this answer from Google doesn't much hold data. But every time when this connection is done Google get the following information:
- IP-adress
- Time of the internet access
- the Browser which you use
In my case i use custom roms and no Gapps to avoid Google as much as i can. So i don't want that "ping" to Google.
That's the reason why i searched for possibilitys to get rid of this ping. And thanks to a german security and privacy specalist i found a possibilty to avoid the ping to Google and have working Internet, too.
3. What did that guy do?
Very simple. He just started his own Captive Portal Checkin Service. So no need for Google anymore
WHAT YOU NEED:
- Computer with installed ADB
- Active USB Debugging at your phone
- At least Android 7
TESTED ON:
I tested his instructions on my old Xperia Z3 phone (CarbonROM 7.0 based on Android 9, Custom Rom).
IMPORTANT:
You need to execute the commands with a booted system (valid for both posts where i write the instructions). It DOESN'T work in the terminal of recoveries (e.g. twrp).
Thanks @jaysir for the information.
INSTRUCTIONS:
Android 7:
1. Connect the phone with your computer
2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.
3. Execute these commands in your terminal:
=> adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de" '
Android 8 and 9:
1. Connect the phone with your computer
2. Activate ADB and test the connection with the "adb devices" command. If your phone shows up go to step 3.
3. Execute these commands in your terminal:
=> adb shell 'settings put global captive_portal_http_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_https_url "https://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_fallback_url "http://captiveportal.kuketz.de" '
=> adb shell 'settings put global captive_portal_other_fallback_urls "http://captiveportal.kuketz.de" '
Well that's it. When you want to revert back just execute the commands again with this url:
http command: http://connectivitycheck.gstatic.com/generate_204
https command:
https://connectivitycheck.gstatic.com/generate_204
Link to the source:
https://www.kuketz-blog.de/android-...204-http-antwort-von-captiveportal-kuketz-de/
If i make any typos tell me
Thanks again to the german security researcher and his community there is a way to deactivate the captive portal checkin completly.
It works on Android 7 and Android 8.1/9. But in comparision to the method in my first post this needs root access on your phone.
For all new users:
I recommend Magisk to gain root.
So now the instructions:
For Android 8/9:
1. Open a terminal on your phone (via terminal apps).
2. Type the following command:
- 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
3. Then reboot your phone (via hardware buttons, system or terminal app).
For Android 7:
1. Open a terminal on your phone (via terminal apps).
2. Type the following commands:
- su
- settings put global captive_portal_detection_enabled 0
- settings put global captive_portal_server localhost
- settings put global captive_portal_mode 0
3. Then reboot your phone (via hardware buttons, system or terminal app).
Link to Source
https://www.kuketz-blog.de/empfehlungsecke/#captive-portal
Very nice and very important tutorial!
Just for completeness; and I don't claim and definitely don't have a copyright. I reported these procedures already here end of April in the thread "Enhanced Privacy, Security and Battery Duration! My Measures...". I mentioned it also once here in the AFWall+ thread.
I'm very glad that these procedures get repeated and repeated again. From my personal point of view it's so important to develop the stance to not allow Google to collect our data. I've subscribed to Mike Kuketz and am very grateful for his job and dedication.
Oswald Boelcke said:
Very nice and very important tutorial!
Just for completeness; and I don't claim and definitely don't have a copyright. I reported these procedures already here end of April in the thread "Enhanced Privacy, Security and Battery Duration! My Measures...". I mentioned it also once here in the AFWall+ thread.
I'm very glad that these procedures get repeated and repeated again. From my personal point of view it's so important to develop the stance to not allow Google to collect our data. I've subscribed to Mike Kuketz and am very grateful for his job and dedication.
Click to expand...
Click to collapse
I agree to you. It's a pity that so much people don't care about it.
I must admit i forgot to search in forum whether the instructions was already posted but as you said every mention helps.
Thanks, however, not working on pixel experience rom.
Update:
Seems no settings command under ADB shell, worked when turning on Usb debugging.
jaysir said:
Thanks, however, not working on pixel experience rom.
seems no settings command under ADB shell
Click to expand...
Click to collapse
Thx for your info. And i will try it on my old z3 with the custom rom which you mentioned.
I know there is a Android 9 based Pixel Experience for the z3.
Will report then.
dhacke said:
Thx for your info. And i will try it on my old z3 with the custom rom which you mentioned.
I know there is a Android 9 based Pixel Experience for the z3.
Will report then.
Click to expand...
Click to collapse
Sorry, I did not make myself clear.
It just not working under recovery mode.
After booting to the system and opening the USB debugging, it is working.
jaysir said:
Sorry, I did not make myself clear.
It just not working under recovery mode.
After booting to the system and opening the USB debugging, it is working.
Click to expand...
Click to collapse
Good to know (and i'm happy that now everything works)
I will edit the guide and add your information to it.
Thanks.
Thanks dhacke for all this information.
I got here from a link on an XDA forum for the Huawei Watch 2 LTE smartwatch. Do you know if this can be done to the watch as well?
ajlajluk said:
Thanks dhacke for all this information.
I got here from a link on an XDA forum for the Huawei Watch 2 LTE smartwatch. Do you know if this can be done to the watch as well?
Click to expand...
Click to collapse
As far as i see it the adb method (post 1) could working because according to the Internet the device runs Wear OS which is basically a android version for smartwatches.
So in theory you can activate USB debugging and redirect the captive portal to mike kuketz service as long as the commands are accepted.
Regarding method 2 i can't say anything because i don't own a smartwatch and have zero knowledge whether root is possible/how it is done on those smartwatches (which is needed for that method).
dhacke said:
As far as i see it the adb method (post 1) could working because according to the Internet the device runs Wear OS which is basically a android version for smartwatches.
So in theory you can activate USB debugging and redirect the captive portal to mike kuketz service as long as the commands are accepted.
Regarding method 2 i can't say anything because i don't own a smartwatch and have zero knowledge whether root is possible/how it is done on those smartwatches (which is needed for that method).
Click to expand...
Click to collapse
Just as you said, I enabled adb debugging, opened a terminal session from my mac to the watch and sent the commands from version 1 and they were both accepted. I should be able to check if it has worked tomorrow so will keep everyone updated when I've tested it.
OK. My watch appeared to connect to wifi but then said "No Internet".
I've now done the same mod to my phone, deleted the supermarket wifi I'm trying to connect my watch to from both the watch and the phone and will try again. I'm also wondering whether haveing BT on at the same time is causing a problem so I'll try with it on and then off and see if it makes any difference.
Thanks again for giving me hope I'll be able to connect WearOS 2 to a captive portal wifi network.
Further to above, unfortunately still no joy. Watch says "Connected" for the briefest moment then "No Internet" and won't go any further.
Never mind.
Thanks again for your work for the Android community.
Is it safe?
We are sending data to completely unknown server, that's why asking.
Datta258 said:
Is it safe?
We are sending data to completely unknown server, that's why asking.
Click to expand...
Click to collapse
In my opinion yes. The mentioned security expert has a good reputation afaik and he didn't make any things in the past which give me a reason to distrust him.
And in the near future he will work for german commissioner for data protection and freedom of Informationen. So i think he is a trustworthy person.
In the privacy policy on his site for the captive portal check service he writes that no information at all will be logged.
Of course you can ask him directly via e-mail if my words don't soothe you; i can only share my opinion about that guy
Thanks.
dhacke said:
For Android 8/9:
1. Open a terminal on your phone (via terminal apps).
2. Type the following command:
- 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_portal_mode 0
3. Then reboot your phone (via hardware buttons, system or terminal app).
Click to expand...
Click to collapse
Does this still work on Pie?
On my rooted Galaxy Note 10 (Pie, 1st Sept. Patch) it does not.
Btw. there is a typo, should it be "settings put global captive_portal_mode 0"? This is what I tried. If I then check the values by "settings get..." I get
1: 0
2: localhost
3: 0
So the values were taken, but it still tries to connect to captiveportal.kuketz.de or google (whatever I have set). If I block it, I will get the exclamation next to the wifi symbol.
ZXR said:
Does this still work on Pie?
On my rooted Galaxy Note 10 (Pie, 1st Sept. Patch) it does not.
Btw. there is a typo, should it be "settings put global captive_portal_mode 0"? This is what I tried. If I then check the values by "settings get..." I get
1: 0
2: localhost
3: 0
So the values were taken, but it still tries to connect to captiveportal.kuketz.de or google (whatever I have set). If I block it, I will get the exclamation next to the wifi symbol.
Click to expand...
Click to collapse
Oh yes you are right. There was a typo. It must be 'settings put global captive_portal_mode 0'.
Now it's corrected. Thanks.
Did you make a reboot after execute the commands?
On my side it works on Pie too. I have a z3 with Lineage 16 and my device doesn't make the check.
When it' still not work after the reboot and the commands are typed in right (=> no issue notification in the terminal comes up) the Samsung stock rom could be the problem.
In that case i would recommend to use kuketz server.
dhacke said:
Did you make a reboot after execute the commands?
Click to expand...
Click to collapse
Yes and even after several reboots I get:
adb shell settings get global captive_portal_detection_enabled
0
adb shell settings get global captive_portal_server
localhost
adb shell settings get global captive_portal_mode
0
But, if not opened via script, I can see 185.163.119.132 (kuketz) being blocked by AFWall and the exclamation mark. So I open it with
$IPTABLES -A "afwall" -d 185.163.119.132 -m owner --uid-owner 1000 -p tcp -j ACCEPT
This works but I would prefer no C-P check.
One off-topic question:
Do you have an idea how to open the IP 0.1.0.1:0 in AFWall? It is used for VoLTE, but even I use th script line above (with 0.1.0.1) it still gets blocked. I have to open UID 1000 completely...
ZXR said:
Yes and even after several reboots I get:
adb shell settings get global captive_portal_detection_enabled
0
adb shell settings get global captive_portal_server
localhost
adb shell settings get global captive_portal_mode
0
But, if not opened via script, I can see 185.163.119.132 (kuketz) being blocked by AFWall and the exclamation mark. So I open it with
$IPTABLES -A "afwall" -d 185.163.119.132 -m owner --uid-owner 1000 -p tcp -j ACCEPT
This works but I would prefer no C-P check.
Click to expand...
Click to collapse
You wrote 'adb'. Does it mean that you tried the commands in the adb shell from your Computer with connected phone?
That could explain why it isn't working. The commands must be typed in directly on the phone for deactivation.
I use the App 'Terminal Emulator' from F-Droid for this.
Link: https://f-droid.org/app/jackpal.androidterm
You could try it with that app once more. Apart from that i'm running out of ideas atm.
ZXR said:
One off-topic question:
Do you have an idea how to open the IP 0.1.0.1:0 in AFWall? It is used for VoLTE, but even I use th script line above (with 0.1.0.1) it still gets blocked. I have to open UID 1000 completely...
Click to expand...
Click to collapse
Sorry, but no. I don't use VoLTE or Scripts in AfWall+.

Categories

Resources