You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ADB无法启动且常规方案无效——Debian Buster下Genymotion技术求助

Hey there, let's work through this frustrating ADB/Genymotion issue you're hitting with your CRNA app on Debian Buster. I've dealt with similar tool mismatches before, so let's go through some targeted checks that often fix this kind of problem:

1. Fix ADB Binary Version Mismatch

Genymotion ships with its own ADB binary, and if it's out of sync with the one from your Android SDK, that's the #1 cause of these weird connection issues.

  • First, check which ADB your system is using: run which adb and note the full path.
  • Open Genymotion, go to Settings > ADB. If it's set to "Use Genymotion's embedded ADB", switch it to "Use custom Android SDK tools" and point it directly to your SDK's platform-tools folder (not just the root SDK directory—this is a common mistake!).
  • Verify versions match: Run adb version in your terminal, then navigate to Genymotion's embedded ADB path (usually /opt/genymotion/tools/adb) and run ./adb version. They need to have the same major/minor version number. If not, either update your Android SDK platform-tools or stick with using your SDK's ADB in Genymotion.
2. Fix Debian Udev Permissions

Debian has strict device permissions, and even virtual Genymotion devices can hit roadblocks here.

  • Create or edit the Android udev rules file: sudo nano /etc/udev/rules.d/51-android.rules
  • Add this line (replace <your-username> with your actual Debian login name):
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0666", OWNER="<your-username>"
    
    (18d1 is Google's vendor ID, which covers Genymotion virtual devices)
  • Reload udev rules and trigger changes: sudo udevadm control --reload-rules && sudo udevadm trigger
  • Log out and back in—this ensures the new permissions apply to your user session.
3. Ensure CRNA Picks Up the Correct ADB

CRNA sometimes uses a different ADB instance than the one you've configured in your shell.

  • Run npx react-native info and look for the "ADB" entry—make sure it points to your Android SDK's platform-tools/adb.
  • If it's wrong, hardcode the paths in your shell config (.bashrc or .zshrc):
    export ANDROID_HOME=/path/to/your/android-sdk
    export PATH=$ANDROID_HOME/platform-tools:$PATH
    export PATH=$ANDROID_HOME/tools:$PATH
    
  • Source the config file: source ~/.bashrc (or equivalent for your shell) and confirm with echo $PATH that platform-tools appears early in the list.
4. Force Genymotion to Reconnect to ADB

Sometimes Genymotion gets stuck in a disconnected state even if ADB is running.

  • Start your Genymotion virtual device, then click the small gear icon (device settings) > ADB > hit the "Refresh ADB" button.
  • Alternatively, use the toolbar icon (looks like a phone with a USB cable) and select "Restart ADB connection".
5. Wipe Stale ADB Processes & Sockets

Even adb kill-server can leave behind lingering processes or corrupted sockets.

  • Kill all ADB-related processes: sudo killall adb
  • Delete any stale ADB socket files in /tmp: rm -f /tmp/adb*
  • Start ADB fresh: adb start-server
  • Check if your device shows up: adb devices—you should see your Genymotion device listed with a "device" status (not "unauthorized" or "offline").
6. Update All Tools

Outdated versions are a common hidden culprit:

  • Update Genymotion to the latest Debian-compatible version (you can grab it from their official download page).
  • Open the Android SDK Manager and update platform-tools, build-tools, and the SDK platform matching your Genymotion device's Android version.

If none of these work, try creating a brand new Genymotion virtual device with the same Android version your app targets—sometimes existing devices get corrupted ADB configurations that are hard to fix.

内容的提问来源于stack exchange,提问作者Robbie Milejczak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:07:41