So i restarted my phone this afternoon, and went to put in my screen lock password, and I get the incorrect password error over and over, until it gives me the you must wait 30 seconds.. Ive done a battery pull and still no love. Is the only way to remedy this a full data wipe. I just got bamf ginger remix up and running.
I did just find this its an older post though does anyone know if it will still work.
> ./adb shell
# sqlite3 data/data/com.android.providers.settings/databases/settings.db
sqlite> update system set value=0 where name='lock_pattern_autolock';
sqlite> update system set value=0 where name='lockscreen.lockedoutpermanently';
sqlite> .exit
# exit
I have this in general also which ill remove this is probably a better place for it.
Just two things I've observed with rooting my NT:
the /data folder on my Nook Table resets on reboot, to cause commands like 'adb shell mkdir /data/<somename>' to fail.
To correct, I have to execute 'adb shell' and:
Code:
$ su root
# chmod 777 /data
# exit
$ exit
then resume any adb commands
I have to remove 'Auto Mount' and uncheck-check the 'USB Debbuging' box (top one in list) in Development settings after a reboot/power down.
The 'AppMenu' apk http://suipre.com/AppMenu.apk is great for doing this, but it does need to be done if I power down/reboot
Hope this helps someone!
Extra notes or hints welcome!
@Bharat: If I've posted this in the wrong place - please let me know
Hi All,
I am writing a batch script to perform functions via ADB to set up our devices.
The device is rooted, and i can do the following via ABD:
adb root
adb remount
adb shell
sqlite3 /data/system/locksettings.db
sqlite3> update locksettings SET value='1' where name='lockscreen.disabled';
sqlite> .quit
There is not the issue so far, and this works to disable the screen lock from swipe to "none"
Here is the issue, I have created a batch file, which processes all the various commands I have, which works perfectly, the problem is i cannot execute that as one command I.E.
adb shell sqlite3 /data/system/locksettings.db update locksettings SET value='1' where name='lockscreen.disabled';
This fails, i have tried various syntax changes but i get and error of TO MANY OPTIONS FOR LOCKSETTINGS
any thoughts or solutions would be most appreciated.
Kind regards
Anthony Aveley
I found I can use these ADB commands to turn on and of the WiFi of a rooted phone:
Code:
adb shell su -c 'svc wifi enable'
adb shell su -c 'svc wifi disable'
However, I'm interested in doing it without having to root the phone for an automatic testing I'm doing. Do you guys know if this is possible?
I found this project which allows me to connect to a WiFi through ADB commands not being a root user. I was wondering if anyone knows how to disconnect also from ADB and not being a root user.
UPDATE:
I've been recently trying:
Code:
C:\adb>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
adb server is out of date. killing...
* daemon started successfully *
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
and
Code:
C:\adb>adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
I also found doing this type of command:
Code:
adb shell input keyevent 20 & adb shell input keyevent 23
I can navigate and click. The problem seems to be that I always finish in a different state so the next time I input the command
Code:
adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
I start in a different place and start clicking elsewhere. I've tried returning home, but that doesn't fix the issue. Is there any way to start always from the same point inside the WiFi settings?
Thanks!
natiya said:
I found I can use these ADB commands to turn on and of the WiFi of a rooted phone:
Code:
adb shell su -c 'svc wifi enable'
adb shell su -c 'svc wifi disable'
However, I'm interested in doing it without having to root the phone for an automatic testing I'm doing. Do you guys know if this is possible?
Click to expand...
Click to collapse
Turn WiFi off
Code:
adb shell settings put global airplane_mode_on 1
adb shell settings put global wifi_on 0
adb shell settings put global wifi_scan_always_enabled 0
Afterwards you've to re-boot the device.
Turn WiFi on
Code:
adb shell settings put global airplane_mode 0
adb shell settings put global wifi_on 1
adb shell settings put global wifi_scan_always_enabled 1
jwoegerbauer said:
Turn WiFi off
Code:
adb shell settings put global airplane_mode_on 1
adb shell settings put global wifi_on 0
adb shell settings put global wifi_scan_always_enabled 0
Afterwards you've to re-boot the device.
Turn WiFi on
Code:
adb shell settings put global airplane_mode 0
adb shell settings put global wifi_on 1
adb shell settings put global wifi_scan_always_enabled 1
Click to expand...
Click to collapse
Thank you, but those don't produce any change on my device. Actually, if I put the first two commands without doing "adb kill-server" in between, I get this message:
error: more than one device/emulator
Click to expand...
Click to collapse
But the output when they work is:
adb server is out of date. killing...
* daemon started successfully *
Click to expand...
Click to collapse
and nothing happens.
I've been recently trying:
Code:
C:\adb>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
adb server is out of date. killing...
* daemon started successfully *
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
and
Code:
C:\adb>adb -s serial_number shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings
Starting: Intent { act=android.intent.action.MAIN cmp=com.android.settings/.wifi.WifiSettings }
Warning: Activity not started, its current task has been brought to the front
This opens the screen where you can turn on and off the WiFi but it doesn't do it...not sure if I'm missing something!
Just to be shure, make shure your using the latest version of ADB offered by google here:
https://developer.android.com/studio/releases/platform-tools
You could use adb wifi
After activating when using usb it and connecting through the same wifi:
svc wifi enable
works without root
I'm a little late to this thread, but if it still helps the OP, non-rooted Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb start-server && adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to turn the non-rooted Android Wi-Fi on or off via adb (which was the OP's original question after all).
Maybe this will work if we can figure out how to tap the buttons?
adb shell "am start -a android.settings.WIFI_SETTINGS"
Click to expand...
Click to collapse
For swiping on the phone from adb this works...
C:\> adb shell input swipe 500 1000 500 100
This will instantly swipe from center to the top of the screen.
You can add a time period, e.g., take 3 seconds to swipe that.
C:\> adb shell input swipe 500 1000 500 100 3000
Click to expand...
Click to collapse
But you want to tap the buttons, right?
If we can figure out the positions, maybe this would work?
C:\> adb shell am start -n com.google.android.gms/.ads.settings.AdsSettingsActivity
That should pop up an Android "Reset Advertising ID" settings page.
C:\> adb shell input tap 500 400
If run after the command above, that will tap the button to
asking to "Opt out of Ads Personalization" in that Activity
if that button is like mine, at the X=500 & Y=400 location.
On my phone, this is the "Reset advertising ID" button location:
adb shell input tap 500 200
On my phone, this is the "OK" button on that GUI above.
adb shell input tap 700 1000
C:\> adb shell am force-stop com.google.android.gms
If run after bringing up the advertising-id reset Activity,
it will close the activity without doing anything else.
Click to expand...
Click to collapse
Here is a somewhat related post...
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
Type adb tcpip 5555 in the command line or Terminal and press Enter.
Find your phone's IP address in Settings > About Phone > Status > IP Address.
Back in the command line or Terminal, type adb connect [your Android's IP address].
Finally, press Enter again.
Regards,
J Wick
I changed my settings for rounded corners and the display size but I forgot to backup what it was originally.
What are the defaults for:
Code:
adb shell settings get secure sysui_rounded_size
adb shell settings get secure sysui_rounded_content_padding
adb shell wm size
I found the following to be more to my preferences by toning down the large rounded corners:
Code:
adb shell settings put secure sysui_rounded_size 8
adb shell settings put secure sysui_rounded_content_padding 5
adb shell wm size 1440x2780
But I'm having an issue with touch responsiveness and I don't know if it's because I altered these settings. I will often have to tap multiple times for the screen to respond; but it's inconsistent. Kind of like the digitizer goes to sleep and I have to tap once to wake it up and then again for a touch to respond. But if I can end up tapping a bunch of times before it actually "wakes up".
I am running the latest LOS rom from this forum.
Hi. Would someone please type this adb command so that I can get the default values?
Code:
adb shell settings get secure sysui_rounded_size
adb shell settings get secure sysui_rounded_content_padding