Starting from Android Marshmallow and above, simply changing the ro.product.model entry in /system/build.prop will not change the device's name everywhere. The build.prop change can only be seen in Settings > About phone.
Introduced in 6.0, Android stores your device name in an additional location, in addition to the build.prop entry. It is stored in a database in your phone's memory. The value in the database is populated the first time you boot up your device (after installing ROM for example), so even if you alter the device name in build.prop, apps can still detect your "old" device name through the database entry.
In the past, the database was stored in a file, but since Marshmallow Settings Storage (com.android.providers.settings) stores a bunch of your phone's settings in memory. Here is how you can change your device's model name.
1. You should modify the ro.product.model entry your /system/build.prop if you haven't already:
Example:
Code:
ro.product.model=My Phone Model Name
2. Next, connect your device to the computer, make sure you have ADB installed.
Alternatively, you can use Terminal Emulator on your device. Run the commands below as root user, but do not include the adb shell part.
3. Execute the following to see the device name stored in the device's Settings database:
Code:
adb shell settings get global device_name
It should return your current device name, <DEVICE_NAME>.
4. Replace the existing model name with a new one:
Code:
adb shell settings put global device_name "<NEW_DEVICE_NAME>"
For example, if I want to change my device name to My Phone Model Name, I would issue the following command:
Code:
adb shell settings put global device_name "My Phone Model Name"
6. Now check to see the device name is updated (same as first command)
Code:
adb shell settings get global device_name
It should now return the updated device name. E.g, My Phone Model Name
Next, reboot your device and apps should correctly detect your new device name.
I hope this helps! Feel free to leave any questions or comments in this thread.
Additional Resources:
@piit79 has a similar tutorial for changing your device's ID, also for Marshmallow and above:
https://forum.xda-developers.com/ne...android-id-t3219345/post63168322#post63168322
Good tutorial, but I would recommend using simpler ADB commands.
For example, change this:
adb shell content insert --uri content://settings/global --bind name:s:device_name --bind value:s:<DEVICE_NAME>
to this:
adb shell settings put global device_name <DEVICE_NAME>
MishaalRahman said:
Good tutorial, but I would recommend using simpler ADB commands.
For example, change this:
adb shell content insert --uri content://settings/global --bind name:s:device_name --bind value:s:<DEVICE_NAME>
to this:
adb shell settings put global device_name <DEVICE_NAME>
Click to expand...
Click to collapse
Thanks, that makes it much simpler. Seems like the put command overwrites the existing value for you.
wow, good job, this looks really good (though i don't need it right now, it is good to know it's possible). my question is, would something similar be possible for the name of the rom and kernel? i'd like my bank's app to think i'm on stock, it does check safetynet but even with magisk and passed safetynet it doesn't work on any other rom than stock.. thanks in advance for your answer!
Google Photos
Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?
This looks like it only changes the device name, that we can change through settings anyways. Editing the build.prop changed the model, but nothing else has changed that I can tell. For example, my Note 3 is running an S7 Edge port, the device and model name have been changed back to SM-900V (for the Note 3) but the product is still showing hero2ltexx. I realize that's just another build.prop line.
There is a huge possibility that this is doing just what it was intended to do and I daydreamed some imaginary far off results, but I figured I'd list it in case it was any help...thank you
bombaglad said:
wow, good job, this looks really good (though i don't need it right now, it is good to know it's possible). my question is, would something similar be possible for the name of the rom and kernel? i'd like my bank's app to think i'm on stock, it does check safetynet but even with magisk and passed safetynet it doesn't work on any other rom than stock.. thanks in advance for your answer!
Click to expand...
Click to collapse
Hi, the ROM and kernel information are not stored in the global settings database. However, you can try modifying your ROM name in the /system/build.prop file.
prwnd said:
Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?
Click to expand...
Click to collapse
I'm not sure, but I think the device name must be set to Pixel XL when you set up your device for the first time. This is why full-size Photo backups work on custom "Pixel" ROMs (for non-Pixel devices).
I'm sure you can do it with terminal emulator on rooted device, so no ADB and PC is needed.
minimale_ldz said:
I'm sure you can do it with terminal emulator on rooted device, so no ADB and PC is needed.
Click to expand...
Click to collapse
You are right, if using Terminal on your device, you must be root user and use the same commands but remove the adb shell part.
I got this:
Too many arguments
usage: settings [--user NUM] get namespace key
settings [--user NUM] put namespace key value
settings [--user NUM] delete namespace key
settings [--user NUM] list namespace
namespace' is one of {system, secure, global}, case-insensitive
If '--user NUM' is not given, the operations are performed on the owner user.
Xperia M4 Aqua E2303
EDIT: OK; old method worked for me. Successfuly changed it. New method didn't work.
srdjanLeo said:
I got this:
Too many arguments
usage: settings [--user NUM] get namespace key
settings [--user NUM] put namespace key value
settings [--user NUM] delete namespace key
settings [--user NUM] list namespace
namespace' is one of {system, secure, global}, case-insensitive
If '--user NUM' is not given, the operations are performed on the owner user.
Xperia M4 Aqua E2303
EDIT: OK; old method worked for me. Successfuly changed it. New method didn't work.
Click to expand...
Click to collapse
Which command did you use? Make sure your device name is surrounded by double quotes.
JBNex said:
Which command did you use? Make sure your device name is surrounded by double quotes.
Click to expand...
Click to collapse
Forgot qoutes
I tried with Terminal Emulator and it works So, my mistake.
it needs root ??
I want a way to get google assistant without root or custom recovery on htc 10 ?
elawady.2014 said:
it needs root ??
I want a way to get google assistant without root or custom recovery on htc 10 ?
Click to expand...
Click to collapse
You can't use this to get Google Assistant, but yes it does work without root.
JBNex said:
I'm not sure, but I think the device name must be set to Pixel XL when you set up your device for the first time. This is why full-size Photo backups work on custom "Pixel" ROMs (for non-Pixel devices).
Click to expand...
Click to collapse
.
i had the same question. in fact this is the main reason I wanna change my device model number now my question is... If i wanna change my device model from "oneplus 3" to "Google pixel" i just need to use the command "Pixel XL 9000"? right?
.
and another question... what's with the" Pixel XL 9000"??? can't i just simply use "pixel/ Google pixel" cause, as far as i know, Google also offer full size photo backup for both pixel and pixel xl.
sahed01 said:
.
i had the same question. in fact this is the main reason I wanna change my device model number now my question is... If i wanna change my device model from "oneplus 3" to "Google pixel" i just need to use the command "Pixel XL 9000"? right?
.
and another question... what's with the" Pixel XL 9000"??? can't i just simply use "pixel/ Google pixel" cause, as far as i know, Google also offer full size photo backup for both pixel and pixel xl.
Click to expand...
Click to collapse
Oh that was just an example to show that you could change it to any name you want. Simply Pixel XL would work!
JBNex said:
Oh that was just an example to show that you could change it to any name you want. Simply Pixel XL would work!
Click to expand...
Click to collapse
.
okay. wish me luck! I'm gonna change my device name "oneplus 3" to "Pixel" let's see if full size unlimited photo backup works!
there is no such code as "ro.product.model" in my oneplus 3 device. only "ro.product.brand=oneplus" and "ro.product. manufacturer" what should I do?
Error
Yeah bro
I have changed it using build.prox but now my device is Automatically switching off and on how to solve it.....
Related
Dislcaimer: this is for educational purposes only,you shall not use this on other people phones without permission under any circumstances,and am not responsable to any misuse of this hack
Click to expand...
Click to collapse
ok so not long ago i had a problem with a locked android device with a pattern and i managed to unlock it using adb,so here's how in case you were stuck one day with a locked device.
the device needs to have usb debugging enabled in case usb debugging isn't enabled and you have cwm you can run the same instructions from cwm,root is not required (though it will be so better if the device was rooted)
this was tested on:gingerbread,ice cream sandwich and jelly bean.
both method are through adb.
method 1:
Code:
adb shell
cd /data/data/com.android.providers.settings/databases
sqlite3 settings.db
update system set value=0 where name='lock_pattern_autolock';
update system set value=0 where name='lockscreen.lockedoutpermanently';
.quit
-AND/OR-
method 2:
Code:
adb shell rm /data/system/gesture.key
and that's a video showing how method 2 is done (thanks to melvinchng) : http://www.youtube.com/watch?v=tVJ7T2oC_Zs&feature=player_embedded
you can try both of them,here is how i managed to remove the lock:
1- run the first method.
2-reboot
3-run the second method
4-reboot
NOTES:
-in the first method each line is a seperate command so click enter after typing each line.
-in the second method type all the command and then press enter.
-after running both methods and rebooting you may see the pattern lock,that doesn't necessarily mean it doesn't work,just try any random pattern and it may unlock then remove the pattern from settings.
-this may and may not work,it may work on some devices and don't on others,so all you can do is trying it but i can't assure it will work.
a small donation would be much appreciated thank (check my signature)
But What if i remember the password well enough, but didnt have data enabled the moment it got locked?
Explained elaborately here>>>http://forum.xda-developers.com/showthread.php?p=29963687
It will unlock either (Loook at the time of message above - I am time traveler )
i have better method than bot the above ones
look for smudges on the phone
Do the files need to be restored or are they just the user data for the pattern locks?
This is really great...
i wonder how do you discover this
you must be a hacker
Or you could boot into recovery backup data
wipe factory reset and reboot
Could try restoring data but most likely restore pattern lock
Or simply enter your gmail address as requested
2nd option...
if you have Custom recovery
use AROMA File Explorer and you can do the same thing through the recovery
or adb through the recovery
FWIW, on CM10 neither method works as non-root. Yay CyanogenMod.
Method #1 FAIL:
1|[email protected]:/data/data/com.android.providers.settings/databases $ ll
opendir failed, Permission denied
255|[email protected]:/data/data/com.android.providers.settings/databases $ sqlite3 settings.db
Error: unable to open database "settings.db": unable to open database file
Method #2 FAIL:
[email protected]:/data $ ll /data/system/gesture.key
-rw------- system system 20 2012-08-11 04:51 gesture.key
[email protected]:/data $ rm /data/system/gesture.key
rm failed for /data/system/gesture.key, Permission denied
(I use faceunlock + pattern (mostly to keep my kid outta my phone), but if I actually cared more about security I'd encrypt my phone and use a passphrase instead)
This is a useful guide, thanks, I will try it :good:
So I guess if Debugging wasn't previously enabled, you have no chance to unlock it...
I've noticed a locked Archos tablet in a shop (probably some stupid shopper locked it) and when I saw this thread announced on the first page I was thinking of helping the shop owner. But I guess I cannot.
Have a nice day!
I don't know whether this method can use on neither:
Rooted
Installed Busybox
Rom Version Older or Newer than CM7
This method require ADB Debugging On & A PC & A tool Provided
I found this trick a long time ago
I come for sharing
Click to expand...
Click to collapse
Download the By-pass security Hack.7z
http://www.mediafire.com/download.php?li2686c3jenmen6
Click to expand...
Click to collapse
Primary Step for all method:
Click to expand...
Click to collapse
Extract it to anywhere using 7-zip.
Open SQLite Database Browser 2.0.exe in SQLite Database Browser.
Run pull settings.db.cmd inside By-pass security Hacks folder to pull out the setting file out of your phone.
Drag settings.db and drop to SQLite Database Browser 2.0.exe program.
Navigate to Browse data tab, At table there, click to list down the selection & selete secure
Instruction To Remove Pattern Lock:
Click to expand...
Click to collapse
Now, find lock_pattern_autolock, Delete Record
Close & save database
Run push settings.db.cmd and reboot your phone
Instruction To Remove PIN Lock:
Click to expand...
Click to collapse
Now, Find Or Create lockscreen.password_type, double-click & change it's value to 65536, Apply changes!
Now, find lock_pattern_autolock, Delete Record, If doesn't exist, Ignore
Close & save database
Run push settings.db.cmd and reboot your phone
Instruction To Remove Password Lock:
Click to expand...
Click to collapse
Now, find lockscreen.password_salt, Delete Record
Now, find lockscreen.password_type, Delete Record
Close & save database
Run push settings.db.cmd and reboot your phone
hmmm i hope those thief's don't find these thread lol
zmore said:
FWIW, on CM10 neither method works as non-root. Yay CyanogenMod.
Click to expand...
Click to collapse
Nor does either method work on unrooted Galaxy Nexus with stock Jelly Bean. Yay stock Android.
mixtapes08 said:
hmmm i hope those thief's don't find these thread lol
Click to expand...
Click to collapse
don't leave usb debugging checked on then.
I advise you guys to also post your Android version. My opinion is that the security hole that permits this hack has been removed in JellyBean, maybe even in an earlier version.
I will try it too a little later, just for the fun's sake.
aussiebum said:
don't leave usb debugging checked on then.
Click to expand...
Click to collapse
If you have forgotten to leave USB debugging enabled, reboot your phone into recovery and do the same. No USB debugging required.
You may however need to mount the partition being accessed by this method, and you can do that only if you have a custom recovery installed (which you more-than-likely have, since you're here on XDA). Just go to 'Mounts and Storage' and mount /data. Then use the method just the normal way. Cheers!
Useful guide for sure. Will keep this as reference!
Does this only work for the pattern unlock or will it also work on the password or the PIN unlock screen?
I can confirm that it is working on a CM7.2 Motorola Defy.
Thanks m.sabra!
Hi,
Which would be the most reliable way to read the model number of the phone? (I'm currently using Sony LT26i)
I run getprop and there are a couple of commands which return the result LT26i...
ro.semc.product.model
ro.product.model
ro.product.device
ro.build.product
Which of those would give the correct result for all other android phones, or would the result be the same regardless of the device connected - I ask because I currently dont have multiple devices to test with.
Also when reading carrier information using the gsm.bla commands is this specifically referring to the current sim in the phone as it returns results pertaining to the currently inserted sim but the ro.carrier command returns the result UNKNOWN (but maye this is returning the lock information in my case the phone is unlocked but I dont know which is why im asking).
Also finally ro.secure returns the value 1, is this referring to the bootloader lock state or something else?
I cant seem to find detailed documents on each command so I hope you dont mind me asking - i'm just researching android commands right now.
Thanks
What do you get from
Build.MODEL
and
Build.MANUFACTURER ?
---------- Post added at 01:08 PM ---------- Previous post was at 01:06 PM ----------
(assuming you are doing this in code..!)
PicomatStudios said:
What do you get from
Build.MODEL
and
Build.MANUFACTURER ?
Click to expand...
Click to collapse
reply
Hi,
I don't get any results with these - command box is just blank. I do get results with all my listed commands but I'm just trying to determine which command gives the most accurate model number across different brand devices for example if I run the command ro.product.model on a sony and get the correct result, will it be the same for if this command is ran on a htc or samsung etc - will it still get the correct result regardless of device?
Thanks for the reply
aaronmarsh632 said:
Hi,
I don't get any results with these - command box is just blank. I do get results with all my listed commands but I'm just trying to determine which command gives the most accurate model number across different brand devices for example if I run the command ro.product.model on a sony and get the correct result, will it be the same for if this command is ran on a htc or samsung etc - will it still get the correct result regardless of device?
Thanks for the reply
Click to expand...
Click to collapse
the getprop command just searches the build.prop file (located in /system om my phone), so the value (ro.****** or whatever) depends on the device and what is available in that file - that is why PicomatStudios's commands didn't return anything: your build.prop doesn't have that.
I also really want to know how to identify a device so I'm going to continue following this. Just one more thing: the following looks to me to be the most promising, but you'll have to compare the build.prop file with other phones's file to see.
ro.product.model
ro.product.brand
ro.product.name
ro.product.device
ro.product.board
ps. I use the above in combination with each other to identify, I would love to know if there was a better way, that works om other phones!
stepie22 said:
the getprop command just searches the build.prop file (located in /system om my phone), so the value (ro.****** or whatever) depends on the device and what is available in that file - that is why PicomatStudios's commands didn't return anything: your build.prop doesn't have that.
I also really want to know how to identify a device so I'm going to continue following this. Just one more thing: the following looks to me to be the most promising, but you'll have to compare the build.prop file with other phones's file to see.
ro.product.model
ro.product.brand
ro.product.name
ro.product.device
ro.product.board
ps. I use the above in combination with each other to identify, I would love to know if there was a better way, that works om other phones!
Click to expand...
Click to collapse
Thanks for the info, i'd agree the above seems to be the most universal, I have checked a few devices with positive results and also some information found here http://guardianproject.info/wiki/Android_getprop_collection concludes the same
stepie22 said:
the getprop command just searches the build.prop file (located in /system om my phone), so the value (ro.****** or whatever) depends on the device and what is available in that file - that is why PicomatStudios's commands didn't return anything: your build.prop doesn't have that.
Click to expand...
Click to collapse
Yeah these are from the Java API rather than getprop commands (might not be useful depending on the context!)
http://developer.android.com/reference/android/os/Build.html
Hey guys,
We had plenty of sweet surprises for Mi 4i recently, especially considering the Nougat ROMs. This also implies that you'll be busy in flashing a plenty of times.
You should also have noticed by now that when you flash a new ROM, you can't entirely Skip the network connection requirement after the first boot. This annoyed me so much because I have a slow, conservative bandwidth.
Fortunately, I have found a solution; but make no mistake, I'm NOT the author of this solution. This method was originally for Nexus 7 by organophosphate. I'm just extending this amazing trick to Mi 4i.
If you want, you can read the original post.
What do you need?
PC
Your phone
TWRP recovery
ADB on PC
Have them all before proceeding.
Procedure :
1. After installing your ROM through TWRP, mount system partition(Advanced>Mount>check system).
2. Connect your phone to PC via USB. Let the phone be in recovery. All the work is to be done in the same.
3. Launch ADB. Just ensure proper connection by first using adb usb and then adb devices commands. It should then show your phone connected in recovery mode.
4. Now, the important part.
If you want to skip only the WiFi setup part but not the rest of initial setup, execute adb shell sed -i 's/ro.setupwizard.wifi_required=true/ro.setupwizard.wifi_required=false/g' /system/build.prop
If you want to skip entire setup and directly goto home screen, launch Shell by executing adb shell and then execute the command echo "ro.setupwizard.mode=DISABLED" >> /system/build.prop.
5. Reboot your phone, either by using adb reboot (or just reboot in Shell) or using Reboot option in recovery.
6. Now, you should see a Skip button in WiFi setup page or Home screen depending on your choice in step 4.
7. Enjoy/explore your new OS
Few personal notes:
1. Entire procedure should happen while your phone is in recovery mode.
2. Skipping the setup wizard entirely has more working chance(almost every time) than skipping just WiFi setup. Skipping WiFi setup rarely worked for me. So, I'd recommend the former option.
3. Skipping initial setup entirely won't cause any trouble as it just for collecting the very basic information. Those details can be set manually later.
5. This method won't cause any trouble usually. That said, I'm not responsible for bootloops(although I haven't encountered it yet). This is not to discourage you but to let you know of worst case scenario. Should this happen, please refer to original article mentioned earlier.
Credits :
organophosphate for this amazing hack.
I(yourSAS) may/may not deserve credit for extending the method and sharing, depending on your result
or extractt he flashable zip
edit the build.prop
re pack it again and flash?
faizauthar12 said:
or extractt he flashable zip
edit the build.prop
re pack it again and flash?
Click to expand...
Click to collapse
I guess that would work. But it'll be lengthy and tedious.
If devs test and do that before releasing the ROM, this problem will be no more.
faizauthar12 said:
or extractt he flashable zip
edit the build.prop
re pack it again and flash?
Click to expand...
Click to collapse
In that case what lines should I delete/edit ?
elonmusk said:
In that case what lines should I delete/edit ?
Click to expand...
Click to collapse
oopss, we don't need to do this trick anymore
lineage already fix ( patch ) the setup wizard, it will ask a Wi-Fi connection..
so make sure you're an up-to date build
faizauthar12 said:
oopss, we don't need to do this trick anymore
lineage already fix ( patch ) the setup wizard, it will ask a Wi-Fi connection..
so make sure you're an up-to date build
Click to expand...
Click to collapse
Yes! I'm on the latest version.. was just curious..
elonmusk said:
Yes! I'm on the latest version.. was just curious..
Click to expand...
Click to collapse
It is already explained in first post. Those two are basic Linux commands:
- echo - is a simple command line text files editor/creator
Code:
echo "ro.setupwizard.mode=DISABLED" >> /system/build.prop
It mean: append text string "ro.setupwizard.mode=DISABLED" to the end of text file "/system/build.prop" , so if you want to do manually these unpack/repack acrobation, just paste "ro.setupwizard.mode=DISABLED" in build .prop
- sed - is advanced command line text editor, you can change already existing text in text file with your desired, using exact match or regex, etc.
Code:
sed -i 's/ro.setupwizard.wifi_required=true/ro.setupwizard.wifi_required=false/g' /system/build.prop
It mean: Get text file "/system/build.prop" , find in file following text string "ro.setupwizard.wifi_required=true" and change it to "ro.setupwizard.wifi_required=false", so if you want to do manually unpack/repack acrobations, just change true to false in mentioned text string, in build.prop.
Anyway, thanks to @yourSAS for sharing idea
Skip WiFi Setup / Setup Wizard On Fresh Boot
Figured I would leave my notes here as this where google dropped me off...
Yes ro.setupwizard.wifi_required doesn't work as expected most of the time as it was replaced with ro.setupwizard.require_network.
That being said one should be using it to skip WiFi setup:
adb shell sed -i 's/ro.setupwizard.require_network=any/ro.setupwizard.require_network=no/g' /system/build.prop
Click to expand...
Click to collapse
None the less here is a little breakdown of the process with a few suggestions:
1. Boot to TWRP.
2. Mount System partition.
3. Pull current build.prop to see what is currently set.
--- There may be other possible values for these properties.
--- There are many other things one can change from here, google them.
--- Also you may find that once mounted the build.prop resides in /system/system rather.
4. Run commands.
5. Reboot, Profit!
# Pull current build.prop from phone to local folder; see what you currently have.
adb pull /system/build.prop
# Push build.prop back to device.
# You can use this method, just be sure you save your the text file with correct line endings for Linux (no CR only LF).
# Using commands to edit the file rather than a pull/push will ensure things stay the same.
adb push /system.build.prop
# Replace elements in text files (build.prop).
adb shell sed -i 's/FIND.THIS/REPLACE.WITH.THIS/g' /system/build.prop
# Append (add a new line) to text file.
echo "NEW LINE TO ADD" >> /system/build.prop
# Relevant properties
# Set which, or if any network is required
ro.setupwizard.require_network=
any, no, wifi
# Same as above but older property
ro.setupwizard.network_required=
true, false
# Again replaced by above
ro.setupwizard.wifi_required=
true, false
# Control the complete setup process
ro.setupwizard.mode=
OPTIONAL, ENABLED, DISABLED
Click to expand...
Click to collapse
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+.
On Android 10, by default, all apps are set to use the default system graphics driver. You were also able to select the type of driver (default, game or system) from a menu that an app would use when running. In android 11, that option is not available (as of June 16, 2021).
However, in android 11 you can change this manually and enable the 'developer driver' for your graphics preferences for any app using ADB.
Code:
adb shell settings put global game_driver_opt_in_apps com.package.name
To add more than one application to the settings value, you probably have to separate the package names by either a comma or semicolon. Once you're done with that step, run the next command.
Code:
adb shell settings put global game_driver_prerelease_opt_in_apps com.package.name
Then reboot the device. Enter settings, system, advanced, developer settings and choose 'Graphics Driver Preference' and make sure the application you chose in the first step has the 'developer driver' selected. Please note that the option will not be present in the drop-down menu when selecting the application in graphics driver preferences. All other applications should say 'default'.
Have you now adb command for system graphics driver ? I Huawei device and I can't change it at all only via adb debugging.
Does anyone know the command for system graphics driver?
Maybe in the Dev Options Menu?
Zaxx32 said:
Maybe in the Dev Options Menu?
Click to expand...
Click to collapse
I don't have any that menu in android 10 but when I change on dev or game driver there is performance differences so it work but I was try and I don't know how to set it up so my only hope is adb.
astronomy2021 said:
I don't have any that menu in android 10 but when I change on dev or game driver there is performance differences so it work but I was try and I don't know how to set it up so my only hope is adb.
Click to expand...
Click to collapse
I fund it on Poco X3 Pro with "adb shell settings list global" had few apps set as a system driver.
The Command for system graphics driver is
Code:
adb shell settings put global game_driver_opt_out_apps com.package.name
astronomy2021 said:
Does anyone know the command for system graphics driver?
Click to expand...
Click to collapse
+1
rodken said:
+1
Click to expand...
Click to collapse
I think its:
Code:
adb shell settings put global game_driver_opt_in_apps com.package.names
rodken said:
+1
Click to expand...
Click to collapse
Actually here is the answer you are looking for:
Code:
adb shell settings put global game_driver_all_apps
And for the values of that setting:
Code:
Game driver global preference for all apps:
0 = default
1 = All apps use game driver
2 = All apps use system graphics driver
Reference: http://www.java2s.com/example/java-src/pkg/android/provider/settings-84201.html
DragonFire1024 said:
Actually here is the answer you are looking for:
Code:
adb shell settings put global game_driver_all_apps
And for the values of that setting:
Code:
Game driver global preference for all apps:
0 = default
1 = All apps use game driver
2 = All apps use system graphics driver
Reference: http://www.java2s.com/example/java-src/pkg/android/provider/settings-84201.html
Click to expand...
Click to collapse
I am utlizing Tasker for my adb shell needs and after inputting 'settings put global game_driver_all_apps 2', I not able to produce the results that I am trying to effectuate.
rodken said:
I am utlizing Tasker for my adb shell needs and after inputting 'settings put global game_driver_all_apps 2', I not able to produce the results that I am trying to effectuate.
Click to expand...
Click to collapse
Disappointing actually. I thought perhaps there would be some kind of discernible difference whether it would have been good or bad. But I'm also not surprised as perhaps It is a bit early as I believe this would apply to the very most recent versions of Android probably going into 12. I guess we'll have to wait and see what it pertains to if anything.
It throws this to me. I use termux on phone without using adb shell
Exception occurred while executing 'put':
java.lang.SecurityException: Permission Denial: getCurrentUser() from pid=5222, uid=10268 requires android.permission.INTERACT_ACROSS_USERS
at com.android.server.am.UserController.getCurrentUser(UserController.java:2214)
at com.android.server.am.ActivityManagerService.getCurrentUser(ActivityManagerService.java:19388)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:259)
at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
at android.os.ShellCommand.exec(ShellCommand.java:44)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:49)
at android.os.Binder.shellCommand(Binder.java:932)
at android.os.Binder.onTransact(Binder.java:816)
at android.os.Binder.execTransactInternal(Binder.java:1162)
at android.os.Binder.execTransact(Binder.java:1126)
Click to expand...
Click to collapse
To make editing easier, using Setedit also works
astronomy2021 said:
I fund it on Poco X3 Pro with "adb shell settings list global" had few apps set as a system driver.
The Command for system graphics driver is
Code:
adb shell settings put global game_driver_opt_out_apps com.package.name
Click to expand...
Click to collapse
My pc says dont find package
astronomy2021 said:
I fund it on Poco X3 Pro with "adb shell settings list global" had few apps set as a system driver.
The Command for system graphics driver is
Code:
adb shell settings put global game_driver_opt_out_apps com.package.name
Click to expand...
Click to collapse
I'm new into this, but that "com.package.name" is a file or what? If it's like this, where I find it? Or that [/CODE] what I got to write in this?