Skip to main content

Posts

Your emulator is out of date, please update by launching Android Studio

Your emulator is out of date, please update by launching Android Studio I sometimes run Android emulator from the command line, like: c:\>emulator -avd Pixel_2_API_30 Most of the time I would see the following on the console output WARNING | unexpected system image feature string, emulator might not function correctly, please try updating the emulator. INFO | added library vulkan-1.dll INFO | configAndStartRenderer: setting vsync to 60 hz ERROR | Failed to open /qemu.conf, err: 2 HAX is working and emulator runs in fast virt mode. INFO | Started GRPC server at 127.0.0.1:8554, security: Local INFO | Advertising in: C:\Users\u1\AppData\Local\Temp\avd\running\pid_14608.ini INFO | Your emulator is out of date, please update by launching Android Studio: - Start Android Studio - Select menu "Tools > Android > SDK Manager" - Click "SDK Tools" tab - Check "Android Emulator" checkbox - Click "OK" INFO | boot comple

Change Windows 10 to dark mode and black background

Change Windows 10 to dark mode and black background using Registry (cmd.exe) c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "AppsUseLightTheme" /t REG_DWORD /d "0" /f c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v "SystemUsesLightTheme" /t REG_DWORD /d "0" /f c:\> powershell -command add-type -typedefinition """"using System;`n using System.Runtime.InteropServices;`n public class PInvoke { [DllImport(`"""user32.dll`""")] public static extern bool SetSysColors(int cElements, int[] lpaElements, int[] lpaRgbValues); }""""; [PInvoke]::SetSysColors(1, @(1), @(0x000000))   Ref: https://superuser.com/questions/1214337/update-hkcu-control-panel-colors-background-via-cmd-and-apply-immediately

Kali Linux tmux is not displaying correctly

Kali Linux tmux is not displaying correctly I have a Kali Linux installed using network installer. Running tmux over SSH does not display correctly.  The reason it is not displaying correctly is that the environment variables LANG and LC_CTYPE were not set. To fix it do: $: sudo locale-gen "en_US.UTF-8" $: sudo dpkg-reconfigure locales After reboot, tmux now looks much better

Reverse SSH shell to WSL2

Reverse SSH shell to WSL2 WLS2 is configured by default in a NAT network.That means we can't generally reach it from the outside.  To connect to it externally, let us configure WSL 2 for reverse shell Prerequisite Another SSH server that acts as gateway. This server should be accessible from the outside. For this exercise we will be using 192.168.2.30 as the gateway IP. Step 1: Enable SSH on WSL2 $: sudo ssh-keygen -A Then start SSH: $: sudo service ssh start Step 2: Verify connection from WSL2 to the gateway SSH server $: ssh -R 2222:localhost:22 u1@192.168.2.30 Below is an example connection to Kali SSH server From Kali gateway server, verify that we can connect to port 2222, like: $: ssh u2@localhost -p 2222 By default WSL2 does not allow SSH connection using password, you will get an error like below. u2@localhost: Permission denied (publickey). To fix this, change /etc/ssh/sshd_config on WSL2, ensure that:  PasswordAuthentication is set to yes ChallengeRespo

Fix corrupted console font on Kali Linux 2021.1

Fix corrupted console font on Kali Linux 2021.1 I have installed Kali Linux on a VM with 512 MB memory and 2 vCPU using network installer . The installation was uneventful but my first login shows the following: It is not pretty, so to fix it do: $: sudo dpkg-reconfigure console-setup Then select: UTF-8 Guess optimal character set Terminus 8x16 Select different font type as appropriate. It should now look much better Keywords: Kali, Linux, Console, garbled, corrupted, text

WSL2: Ubuntu fails to start ssh server

WSL2: Ubuntu fails to start ssh server Running sudo service ssh start fails with error message like below: * Starting OpenBSD Secure Shell server sshd sshd: no hostkeys available -- exiting. It is failing because there are no keys generated in the system, to fix it do: $: sudo ssh-keygen -A You should now able to able to start it, like: $: sudo service ssh start

Installing WSL2 on Windows Server 20H2

Installing WSL2 on Windows Server 20H2 Environment info  Host: Windows 10 Release 1909 Pro Virtualization: VMware Professional 14 Pro  Prerequisite  Windows Server 20H2 VMware Tools installed - mount the installer ( Menu | Install VMware Tools... ) PS C:\>setup.exe /S /v "/qn REBOOT=R ADDLOCAL=ALL" PS C:\>shutdown /t 0 /f /r Enable nested virtulization on the VM Install WSL2 Ubuntu 20.04 PS C:\>dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart PS C:\>dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart PS C:\>shutdown /t 0 /f /r PS C:\>#Wait for the reboot to complete PS C:\>Invoke-WebRequest https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile $HOME\Downloads\wsl_update_x64.msi PS C:\>cd $HOME\Downloads PS C:\>msiexec.exe /i wsl_update_x64.msi /quiet /qn PS C:\>wsl --set-default-version 2 PS C:\>curl.exe -L -o ubuntu-2004.zip