Skip to content

Instantly share code, notes, and snippets.

So, you have installed Android Studio, and is setting it up for react native, buuuut you're new to fish and it seems like it doesn't have a .bashrc or .zshrc equivalent.

worry not, just run the following, in order:

Set the ANDROID_HOME variable, here the U will make it persist through restarts, and the x will make it be exported:

set -Ux ANDROID_HOME $HOME/Android/Sdk
PlayStore.enabled = yes
abi.type = x86
avd.id = <build>
avd.ini.encoding = UTF-8
avd.name = android10
disk.cachePartition = yes
disk.cachePartition.size = 66MB
disk.dataPartition.path = <temp>
disk.dataPartition.size = 6442450944
disk.systemPartition.size = 0
# Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it
# then iterate opening the selected ports
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ }
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if($found) {
$remoteport = $matches[0];
} else{

function createStyles(theme: ReturnType) { return StyleSheet.create({ screen: { flex: 1 }, header: { paddingHorizontal: spacing[4], paddingTop: spacing[4], paddingBottom: spacing[3], gap: spacing[1], }, headerSubtitle: {