Hello I would like to know the adb command to unlock the swipe lock in any android phone using some commands irrespective of the device.
Thank You
adb shell su 0 service call window 49 would call WindowManager.dismissKeyguard() in Android 5.1+
Related
actually I'm trying to launch amazon prime app using adb commands in python ,but I'm not able to open the app if it is present in the device ,its getting opened only if the app is in home screen .I have to open the app where ever its present on my device???please help me out.
I'm trying in win 10
you can use "am start -n" commands.
adb shell am start -n com.test/com.test.TestActivity
I am running an application from ADB commands as follow:
adb shell am start -n com.example.someapp.app/.SimpleActivity
The main screen in this app will have two buttons, how can press one of these buttons from ADB Shell?
It looks like the adb shell input command might work for you. You might need to have a rooted device to allow adb simulated touch input to work.
Here's a link to a blog containing a write up on adb input:
https://grymoire.wordpress.com/2014/09/17/remote-input-shell-scripts-for-your-android-device/
You'd normally tap the button (if you know the coordinates):
adb shell input tap <x> <y>
To find coordinates, enable pointer location, then tap the button location on your device:
adb shell settings put system pointer_location 1
No need to root phone.
Tested on Android 10 API 29
I have a task that I need to write Android mobile test automation using Appium and selenium in Java.I have to do scenario that phone has to be unlock using PINCODE pro-grammatical way.
Is there anyway to unlock android mobile in automation tests using pincode? Can anyone give me any suggestions to do this task.
There is no capability in Appium to unlock the pattern/pin lock though appium can wake our device up. To lock/Unlock the screen we need to use ADB commands, below are few examples you can give a try to:
To wake the device from sleep mode
adb shell input keyevent KEYCODE_POWER
To swipe up for obtainging the PIN screen
adb shell input swipe 800 400 400 400
Enter PIN
adb shell input text 0000
Tap on Enter to unlock
adb shell input keyevent KEYCODE_ENTER
I looking for toggle my android phone mobile data with adb command. that is usually i do it with touch my mobile data icon in settings.
i found many reference to do it, for example this question , but nothing work for me, i try use:
$ adb shell svc data enable
$ adb shell svc data disable
when i look to my android phone nothing happen.
my android is KitKat 4 and i sure have rooted
Thanks.
I'm (trying) to use Analog Keyboard for Android Wear from Microsoft Research.
The wearable (Moto360) is properly setup for Bluetooth debugging and the install procedure for the Keyboard finishes as expected:
$ adb devices
List of devices attached
4df11bb241805f93 device
localhost:4444 device
$ adb -e install com.microsoft.research.analogkeyboard-Signed.apk
50 KB/s (5322694 bytes in 103.401s)
pkg: /data/local/tmp/com.microsoft.research.analogkeyboard-Signed.apk
Success
$ adb -e shell ime enable com.microsoft.research.analogkeyboard/.KeyboardService
Input method com.microsoft.research.analogkeyboard/.KeyboardService: now enabled
$ adb -e shell ime set com.microsoft.research.analogkeyboard/.KeyboardService
Input method com.microsoft.research.analogkeyboard/.KeyboardService selected
After that, the Analog Keyboard app is visible in the list of installed apps on the watch and, when opened, works really fine.
The challenge is to make it replace voice commands. Is that possible?
No, it is not possible to intercept or change the voice input mechanisms used throughout Android Wear.