how to set proxy authentication with adb - adb

how to set proxy authentication with adb
I tried
adb shell settings put global http_proxy 192.168.225.100:3128
adb shell settings put global global_http_proxy_host 192.168.225.100
adb shell settings put global global_http_proxy_port 3128
adb shell settings put global global_http_proxy_username foo
adb shell settings put global global_http_proxy_password bar
but it not working

Related

How to use ADB to change the virtual enviroment on Oculus Quest 2

I want to be able to switch the VR (oculus quest 2) virtual environment from my computer to control the environment the user is seeing. I believe that ADB commands is the likely solution.
The only command I can find to change the activity is
adb -s _MQDH_CONNECTED_DEVICE_SERIAL_ID_ shell am start -n com.oculus.shellenv/.ShellEnvActivity
However, this command is just a general command to go to the home screen. Is there a way to modify this to change the virtual environment

Unable to access system storage in adb shell

I was trying to install a gsi with DSU sideloader. It needs me to type a command using adb to initialize the installation. But I keep getting this error while running the adb shell command on my pc
adb shell sh/storage
/system/bin/sh: sh/storage: inaccessible or not found
The actual command was adb shell sh/storage/emulated/0/Dsu/workspace_dsuhelper/install
Which also results in the same error: /system/bin/sh: sh/storage/emulated/0/Dsu/workspace_dsuhelper/install : inaccessible or not found.
I know that /storage/emulated/0... exists but I am unable to access it. What could be the issue?
use this command to get the storage status
adb shell df /data

I need an adb command to enable an android accesibility option

I'm trying to start voice access but the phone I'm using doesn't have the accessibility menu is there a direct adb command to get it started?
To start the accessibility service you can use:
adb shell settings put secure enabled_accessibility_services com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService
And to stop:
adb shell am force-stop com.google.android.marvin.talkback
NEW_SERVICE can be enabled by
adb shell settings put secure enabled_accessibility_services NEW_SERVICE
However, this can also disable all OTHER_ENABLED_SERVICES. So It's better to use
adb shell settings put secure enabled_accessibility_services OTHER_ENABLED_SERVICES:NEW_SERVICE
Here we use : to join services. The content of OTHER_ENABLED_SERVICES can be known using
adb shell settings get secure enabled_accessibility_services
The content of NEW_SERVICE can be extracted from the result too, if you turn on the service maually.
NEW_SERVICES can be disabled using
adb shell settings put secure enabled_accessibility_services OTHER_ENABLED_SERVICES

How can I Check with adb that there is an external storage Card?

I want to check a file in a sdcard but I have to use ADB.
I made this :
adb shell ls $EXTERNAL_STORAGE
It prompts me a list of directories but it's not my sdCard.
How can I find a file in my sdcard using adb ?
#paralleles. You can use the following adb command below to check if an external storage card exists:
adb shell echo /$EXTERNAL_STORAGE
If the above command executes successfully, you'll see a similar output as below :
Alternatively you can start an adb shell session and traverse the directory so as to find the desired file in your sdcard as follows :
adb shell
cd $EXTERNAL_STORAGE
If the above commands executes successfully, you'll see a similar output as below (depending on the files/folders in your SdCard):

what is the key_code to enable or disable wifi via adb for non rooted device

I have a non rooted Samsung device , i want to enable/disable wi-fi settings for my usages via adb.To open wifi for non rooted device via adb i ran below command
adb -s 4d0075754fdb41cd shell am start -n com.android.settings/.wifi.WifiSettings
By default the wifi is coming as diabled , i want to enable/disable it
I tried with Keyevent , however this did not helped much
adb shell input keyevent 22
The wi-fi slider looks like below , i tried with all available key_code .
Can anyone point me a way to get the correct keycode here!!
You can try adb -s $PHONESERIAL shell "svc wifi enable" if you just want to turn on the wifi with adb.
Was already answered here : android adb turn on wifi via adb
You placed appium tag, so if you using appium, try running:
adb -s $device_id shell am broadcast -a io.appium.settings.wifi --es setstatus enable
adb -s $device_id shell am broadcast -a io.appium.settings.wifi --es setstatus disable

Resources