How to create a Mac partition on an existing Windows drive without losing other drives on a same HDD?
- Use a Windows PC, delete that drive
- Access Mac, create partition from that deleted drive
How to config Android development
Install
- Install Android Studio
- Install Emulator
- List up all installed emulator
/Users/hung-nb/Library/Android/sdk/tools/emulator -list-avds
- Install Gradle
- Install Java, version 8 or higher
- Download Gradle from https://gradle.org/releases/
$ curl -O -L https://downloads.gradle-dn.com/distributions/gradle-6.0.1-bin.zip
$ mkdir -p ~/bin/gradle
$ unzip -d ~/bin/gradle gradle-6.0.1-bin.zip
Config
~/.bash_profile
export ANDROID_SDK_ROOT=~/Library/Android/sdk export ANDROID_HOME=~/Library/Android/sdk export ANDROID_AVD_HOME=~/.android/avd export GRADLE_HOME=$HOME/bin/gradle/gradle-6.0.1 export PATH=$GRADLE_HOME/bin:$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools alias run-emulator1="$ANDROID_HOME/emulator/emulator @Pixel_2_API_28" alias run-emulator2="$ANDROID_HOME/emulator/emulator @Pixel_3_XL_API_29"
~/.zshrc
source ~/.bash_profile
Hot keys
Open Finder from terminal
open .
Right click
Option + Click
Quit app
Cmd + Q
How to create empty file with a specific size?
mkfile -n 1G temp_1GB_file mkfile -n 100M temp_100MB_file
How to clean up Mac storage?
- Clean up simulator images
open ~/Library/Developer/Xcode/UserData/IB Support/Simulator Devices - Clean up DerivedData
open ~/Library/Developer/Xcode/DerivedData - Clean up Mac cache
open /Library/Caches/ - Clean up app cache
open ~/Library/Caches/
Is it safe to empty folder “~/Library/Developer”?
YES if you plan to completely remove your existing Xcode and install a new version
Leave a Reply