Stop android emulator from command line jump pop up message - command-line

So i am start my Android emulator from command line using this command:
%ANDROID_HOME%\emulator\emulator.exe -avd Pixel_XL_API_27
And when i want to stop i am using this command:
adb -e emu kill
So after this command i have window message:
Any option to disable this message >

Adding -no-snapshot-save parameter will disable snapshot.
You can check other params available at https://developer.android.com/studio/run/emulator-commandline#startup-options

Related

Neovim: how to send keys to terminal emulator

When I open up a nvim terminal emulator and enter the following command, trying to execute command 'python':
:normal! ipython
It turned out the register content is pasted onto the screen, as if 'p' is pressed under normal mode, even if 'i' has been pressed in prior to (supposedly) enter terminal-insert mode.
This does not help either:
:execute "normal! ipython\<CR>"
Where have I gone wrong, and how could I do it correctly?
Alternatively I used termopen() to execute a command in the terminal on start, something like
:call termopen('python')
But still, no idea about how to do so with normal!.
:normal! ipython
doesn't mean "run the program". It means "switch to Normal mode and run !" which is a filter command; then run i that is switch to Insert mode and insert "python".
To run a command from the vim command line use
:!ipython

How to exit sudo terminal to normal terminal on mac OS bigSur? - Flutter

How to exit sudo terminal to normal terminal on macOS bigSur?
If you are stuck as shown in the screenshot, just hit “Ctrl + c”. This will terminate the current std-reader/process and give you the control.
If you are already signed in to another user with su. You can go back to previous session/user by simply typing “exit”.

How can I update my account to use zhs. in VSCode?

When I run my code in VS Code, I get this message after every user interface input
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
What can I do to use zsh and/or keep this messsage from appearing?
If you are using MAC, Apple has changed the default Interactive Shell from macOS Catalina.
But your Shell still could be bash.
if you want to change it to zsh, just run the following command in your terminal.
chsh -s /bin/zsh
and if you want to stop message appearing every time you open terminal
just follow this article here.

NuSMV on Mac -int command option not found

I'm trying to run NuSMV on Mac and I can run it normally but when I need to use the interactive mode the -int option gets an error - The command line option "–int" is unknown.
Has anybody else had this issue?

adb command to open settings and change them

I'm looking for adb command to open settings and change them. For example: this command open display settings
adb shell am start -n com.android.settings/.DisplaySettings
I want to go further in menu to Display output mode then choose 720P 60HZ
As my menu is like this on android tv box:
Settings > Display > Display output Mode > HDMI 720P60HZ etc
Is there a adb command to do this go through settings then choose 720P60Hz directly with shell ?
Use this command to see a help on how you can use the settings adb shell command:
adb shell settings
Use get and put commands (after settings) to change the settings.
You will have to figure out the KEYs (use list) and acceptable VALUEs yourself (read documentation like https://developer.android.com/reference/android/provider/Settings.Global for the global NAMESPACE).
I'm not sure how to change the value directly, but to expand on another answer (and also because it sounds like this is what you're asking for), you can use adb to navigate through settings windows and pick different things in the UI. I've done that with some settings I can't seem to set a value from a single adb command. I just use the virtual Tab key to navigate through the menu items then press Enter to select a submenu or toggle an option.
I don't have an android tv box so I don't have the setting you do, but the commands would look something like this:
adb shell am start -a android.settings.DISPLAY_SETTINGS
adb shell input keyevent TAB
adb shell input keyevent TAB
adb shell input keyevent ENTER
adb shell input keyevent TAB
adb shell input keyevent TAB
adb shell input keyevent TAB
adb shell input keyevent TAB
adb shell input keyevent ENTER
adb shell am force-stop com.android.settings
You can try sending one tab command at a time to see how many you need to send before getting to the item you want.
Tips:
You can also use the Back button to go back a page:
adb shell input keyevent BACK
And you can use the arrow keys to navigate through confirmation popups (or move brightness/volume sliders):
adb shell input keyevent DPAD_RIGHT
adb shell input keyevent DPAD_LEFT
adb shell input keyevent DPAD_UP
adb shell input keyevent DPAD_DOWN
Here's a list of more key commands you can use (just look for the ones preceded by KEYCODE_, and remove that part. e.g. KEYCODE_BACK would be BACK as illustrated above):
https://developer.android.com/reference/android/view/KeyEvent
And here's a list of more direct settings windows you can launch:
https://stackoverflow.com/a/39873312
Copied here: (just precede them with adb shell am start -a to launch)
com.android.settings
com.android.settings.APPLICATION_DEVELOPMENT_SETTINGS
com.android.settings.DISPLAY_SETTINGS
com.android.settings.DOCK_SETTINGS
com.android.settings.QUICK_LAUNCH_SETTINGS
com.android.settings.SOUND_SETTINGS
com.android.settings.TTS_SETTINGS
com.android.settings.VOICE_INPUT_OUTPUT_SETTINGS
android.settings.ACCESSIBILITY_SETTINGS
android.settings.ACCOUNT_SYNC_SETTINGS
android.settings.ACCOUNT_SYNC_SETTINGS_ADD_ACCOUNT
android.settings.ADD_ACCOUNT_SETTINGS
android.settings.AIRPLANE_MODE_SETTINGS
android.settings.APN_SETTINGS
android.settings.APPLICATION_SETTINGS
android.settings.BLUETOOTH_SETTINGS
android.settings.DATA_ROAMING_SETTINGS
android.settings.DATE_SETTINGS
android.settings.DEVICE_INFO_SETTINGS
android.settings.DISPLAY_SETTINGS
android.settings.INPUT_METHOD_SETTINGS
android.settings.INTERNAL_STORAGE_SETTINGS
android.settings.LOCALE_SETTINGS
android.settings.LOCATION_SOURCE_SETTINGS
android.settings.MANAGE_ALL_APPLICATIONS_SETTINGS
android.settings.MANAGE_APPLICATIONS_SETTINGS
android.settings.MEMORY_CARD_SETTINGS
android.settings.PRIVACY_SETTINGS
android.settings.SECURITY_SETTINGS
android.settings.SETTINGS
android.settings.SOUND_SETTINGS
android.settings.SYNC_SETTINGS
android.settings.SYSTEM_UPDATE_SETTINGS
android.settings.USER_DICTIONARY_SETTINGS
android.settings.WIFI_IP_SETTINGS
android.settings.WIFI_SETTINGS
android.settings.WIRELESS_SETTINGS
ACCESSIBILITY_FEEDBACK_SETTINGS
android.net.vpn.SETTINGS
android.search.action.SEARCH_SETTINGS
android.search.action.WEB_SEARCH_SETTINGS
As far as I know ther is no such functionality. However, you can use the
adb shell input tap <x> <y>
command to trigger a touch event. Unfortunately, such code will not work device-indepently as the position of your settings on the screen depends on the device you are using.
Alternatively you can try the
adb shell input keyevent <19|20|21|22>
command to emulate curser events to select the setting you want to alter.
Finally, you can use
adb shell input keyevent 66
to trigger the enter key. This should work on all devices having the same options in the settings submenu.