Search code examples
react-nativeandroid-studiosegmentation-faultadbapple-m1

Can't Run adb On M1 zsh: segmentation fault adb


I try to run my React Native project on MacBook Pro M1 but when I run adb it's gives error : zsh: segmentation fault adb.

I tried run adb from both ~/Library/Android/sdk/platform-tools & ~/usr/local/bin/adb.

Tried reinstall platform-tools in android studio.

Tried install and reinstall platform-tools from brew.

Tried reinstall android studio itself.

Device: MacBook Pro M1 2020, SSD: 512, RAM: 8

OS: macOS Monterey

Android Studio: android-studio-2021.1.1.21-mac_arm


Solution

  • After install Android Studio create ready project using android studio's ready templates, then build the project. You will get error, ignore the error.

    go to sdk manager then remove platform-tools and click apply button then click Ok and restart android studio.

    again go to sdk manager then install platform-tools. go to the project and build it, build should be successful. run the project.

    Now go to your React Native project and run for android. BOOM it up.

    For physical device tests copy your final gradle to android studio and run it from android studio itself.

    The zsh: segmentation fault adb still remains but you can run you're project on android emulator.

    Google Says: "Pending and it will be ok at the next update"