Show all hidden files

defaults write com.apple.Finder AppleShowAllFiles YES
defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder
Copy the code

Do not show all hidden files

defaults write com.apple.Finder AppleShowAllFiles NO
defaults write com.apple.finder AppleShowAllFiles No && killall Finder
Copy the code

* 1. Where is the debug.keystore path for Android Studio under MAC?

Execute the “show all hidden files” command in terminal:

defaults write com.apple.Finder AppleShowAllFiles YES
defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder
Copy the code

Then under the path: / Users/zhouhui/android/debug. Keystore

* 2. Uninstall Android Studio completely on Mac

  • 1. Uninstall Android Studio
rm -Rf /Applications/Android\ Studio.app  
rm -Rf ~/Library/Preferences/AndroidStudio*  
rm ~/Library/Preferences/com.google.android.studio.plist  
rm -Rf ~/Library/Application\ Support/AndroidStudio*  
rm -Rf ~/Library/Logs/AndroidStudio*  
rm -Rf ~/Library/Caches/AndroidStudio*  
Copy the code
  • I deleted all the good demos I had been working on for eight years and they are not recoverable. I don’t think it’s necessary to use this command, you can manually delete the demo you don’t need.
rm -Rf ~/AndroidStudioProjects
Copy the code
  • Delete Gradle
rm -Rf ~/.gradle 
Copy the code
  • Uninstall Android Virtual Devices(AVDs) and *.keystore
rm -Rf ~/.android 
Copy the code
  • 5. Delete the Android SDK Tools
rm -Rf ~/Library/Android*  
Copy the code

* 3. Change the color of LogCat

  • A.ndroid Studio->Preferences or Command +,
  • B. Go to Editor -> Colors &Fonts -> Android Logcat or enter Logcat in the search box above
  • C. click Assert respectively, Debug and Error, Info, Verbose, Warning options, and then in later will Use Inberited attributes to remove check
  • D. Click the color boxes behind the Foreground, and set their color values respectively. You can copy and paste them
  • E.A pply – > OK

The color values are as follows:

The Log level Color value
Assert 8F0005
Debug 0070BB
Error FF0006
Info 48BB31
Verbose BBBBBB
Warning BBBB23

* 4. Get SHA1 and MD5 in Android Studio

Open Terminal in Android Studio or directly open the Terminal of the system.

Keystore SHA1 and MD5 keytool -list -v -keystore ~/.android/debug.keystore -alias androidDebugkey -storepass android -keypass android

To get the other keystore, For example, the official signature file keytool -list -v -keystore ~/User/ your username /debug.keystore -alias androiddebugkey -storepass android -keypass android

* 5. Modify the hosts for Mac

  • A. Go to – – Go to the folder – Enter
  • b./private/etc/
  • C. Click Go – Find the hosts file – copy it to the desktop
  • D. Select Edit Text – Add the following information
  • E. 192.30.255.112 github.com

* 6.Git commit failed because github readme. md file is not in local code directory

Solutions:

1. Run the following command to merge code: pull=fetch+merge git pull –rebase origin master

2. After executing the above code, you can see the readme. md file in the local code base

Git push -u origin master git push -u origin master

* 7. Adb common commands

1.log adb shell ps | grep master

2. Install apk adb install apk path

3. Forcibly install adb install -r apk path