Skip to content

Instantly share code, notes, and snippets.

View sandboiii's full-sized avatar

Alexey Zakaldaev sandboiii

View GitHub Profile
@sandboiii
sandboiii / disable-audio-emulator.md
Created February 12, 2025 13:31
Disable audio input for Android Studio Emulator

Disable audio input for Android Studio Emulator

When using Bluetooth headphones, you may encounter the problem running an emulator in Android Studio, the sound in the headphones switches to low quality.

This is due to the fact that the Android emulator starts using your headphones as a microphone so that you can enter voice commands into Android.

In the vast majority of cases, no one uses voice input on the Android emulator, so it can be disabled through the emulator config file.:

  • Open the /.android/ folder on your computer (~/.android/ for Linux, /Users/{user_name}/.android/ for Mac and Windows)
  • Next, open the folder for the emulator you need (/avd/{emulator_name}/)
  • Edit the file config.ini and replace the item hw.audioInput=yes with hw.audioInput=no
@sandboiii
sandboiii / ffmpeg-cheatsheet.md
Last active January 25, 2025 12:10
ffmpeg shell commands cheatsheet

Cut video/audio file

from start to the specified time (-t) parameter:

ffmpeg -t 00:03:59.700 -i video.mp4 -c copy cut.mp4

from the specified time (-ss) parameter to the end:

ffmpeg -ss 00:01:00.700 -i video.mp4 -c copy cut.mp4
@sandboiii
sandboiii / disable-app.md
Last active January 1, 2025 19:25
Disable Android system apps via adb
  1. Open shell:
adb shell
  1. List candidates for disabling:
pm list packages | grep '<OEM/Carrier/App Name>'
  1. Disable selected app:
@sandboiii
sandboiii / pdf-cheatsheet.md
Last active June 21, 2024 15:34
pdf shell commands cheatsheet

Create pdf file from images

convert image_*.jpg image.pdf

or if you need to sort images:

convert $(ls -1v *.jpg) image.pdf

Compress pdf file

@sandboiii
sandboiii / awesome-pastebins.md
Created September 13, 2023 10:20
Awesome hackers pastebin sites
@sandboiii
sandboiii / uiautomatorviewer-errors.md
Last active October 12, 2024 08:46
Android UIAutomatorViewer errors

Hello, I made a simple instruction on how to fix some Android's UIAutomatorViewer errors which I have encountered on my machine. Here it is:

1. Wrong Java version

-Djava.ext.dirs=/home/user/Android/Sdk/tools/lib/x86_64:/home/user/Android/Sdk/tools/lib is not supported.  Use -classpath instead.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
@sandboiii
sandboiii / screenshots-directory.md
Last active September 18, 2023 09:57
Save GNOME screenshots to custom directory on Linux

Save GNOME screenshots to custom directory on Linux

If you want to change default screenshot directory to other location, for example "Screenshots" directory.

Execute following command:

gsettings set org.gnome.gnome-screenshot auto-save-directory "file:///home/$USER/Screenshots/"

Have a good day!

@sandboiii
sandboiii / ITMO-Corp.8021x
Created May 31, 2021 15:14
ITMO-Corp iwd WPA Enterprise PEAP configuration
[Security]
EAP-Method=PEAP
EAP-Identity=anonymous
EAP-PEAP-Phase2-Method=MSCHAPV2
EAP-PEAP-Phase2-Identity=username
EAP-PEAP-Phase2-Password=password
[Settings]
AutoConnect=true