ADB command to toggle video from portrait to landscape mode - adb

I am playing a video through adb on my device. but it plays in portrait mode by default.
Is there any adb command to toggle the video in landscape mode automatically.

Related

adb screenrecord captures black screen

I am using adb to record the device's video. I pull the video and it plays back a black screen. Is there something else I need to enable?
adb shell screenrecord --time-limit 10 /sdcard/video.mp4
adb pull ./sdcard/video.mp4

how access current and focused window in android adb

I am using Android API 30 adb
adb shell dumpsys window windows
but it is not showing
mCurrentFocused and mFocused app
Kindly help me out
I think you can try this:
dumpsys window | grep -E "mCurrentFocus

How can I emulate fingerprint on real device for tests?

I can emulate finger print in Android emulator with this command:
adb -e emu finger touch 1
But how can I emulte it when I wanna add fingerprint on real device fo qa automation?

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

how to update adb drivers for android phones?

I am having difficulties in my android application because i want to run my project in my android device. I tried to install some drivers for my phone but still, it can't update the drivers and my phone is not recognized even in adb devices. Please help. Thanks.
Run android update adb
Run adb kill-server
Run adb start-server
At this point, calling adb devices started returning devices again.
Now run or debug your project to test it on your device.
If you use Windows
If you don't have the android and adb set as windows environment variables, just go to
C:\Program Files\Android\sdk\platform-tools
(in explorer press Shift+RightClick in the white part and open command window) and use the following commands: ..\tools\android.bat update adb adb kill-server adb start-server
For android phones,
Turn on Developer mode on settings
For Oculus devices,
Open Oculus App in your android/ios device
Make sure the oculus device is connected via bluetooth
Goto Settings, Click on oculus device name
From Dropdown menu, click More Settings -> Developer Mode and turn it on
I was able to find ADB required version 1.0.40 from here and it works like a charm:
D:\Setups\XXXXX\Lineage FP3\platform-tools_28.0.1(ADB_1.0.40)>adb devices
List of devices attached
A2XXXXXXXXX1 unauthorized

Resources