Can't Run adb On M1 zsh: segmentation fault adb
Asked Answered
E

4

9

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

Eldwon answered 7/2, 2022 at 12:52 Comment(2)
I'm seeing the same issues since upgrading to build-tools 32.0.0. Google states "Known issue: this version crashes when run without any arguments."Gulosity
yes it is. I explained for the error which I had, hop it can helps you too.Eldwon
E
7

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"

Eldwon answered 8/2, 2022 at 16:7 Comment(0)
C
9

adb gives error but adb command works

enter image description here

Claypoole answered 13/2, 2022 at 8:26 Comment(2)
adb [1] 85820 segmentation fault adb adb --version Android Debug Bridge version 1.0.41 Version 32.0.0-8006631 Interesting, adb crashes but adding params make it work.Durmast
Tnx to you, latest update solved the problemEldwon
E
7

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"

Eldwon answered 8/2, 2022 at 16:7 Comment(0)
M
0

Reinstalling Android SDK Platform-Tools solved the issue for me. Go to Android Studio > Settings > System Settings > Android SDK.

  • Click SDK Tools tab. Uncheck Android SDK Platform-Tools from the list. Click Apply to uninstall the package.
  • Check Android SDK Platform-Tools and click Apply to reinstall it.

Hope this helps.

Martelli answered 18/6, 2022 at 11:13 Comment(0)
B
-1

This looks similar to your problem. Setting up android emulators on mac m1 pros requires extra installation steps.

Bolitho answered 7/2, 2022 at 17:44 Comment(1)
It doesn't related to my problem. Thanks for answer.Eldwon

© 2022 - 2024 — McMap. All rights reserved.