Android: running emulator classified as hardware when adb device name is not generic*, so --virtual fails with ERR_NO_TARGET
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- android, typescript
- 領域
- mobile-dev
調査の方向性
dist/android/utils/adb.jsのparseAdbDevicesから始めます。ここでは、IssueがADBデバイスを分類するdevice:名のチェックを指摘しています。報告されたemulator-5554のプロパティで動作を確認し、Androidのデバイス一覧表示テストを確認してください。接続されたemulator-<port>が、デバイス名がemu64xa16kでも仮想デバイスとして一覧表示され、--virtualで選択できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version: native-run 2.0.3 (latest on npm)
Platform: Linux x86_64, Android Emulator 37.1.11, AVD from the Pixel 10 profile with a 16 KB page-size system image (sdk_gphone16k_x86_64, API 37)
Description
A running emulator is classified as hardware, so --virtual cannot select it and run fails with ERR_NO_TARGET, even though adb lists the emulator as connected.
adb devices -l reports:
emulator-5554 device product:sdk_gphone16k_x86_64 model:sdk_gphone16k_x86_64 device:emu64xa16k transport_id:1
dist/android/utils/adb.js (parseAdbDevices) only treats a serial as an emulator when its device: property starts with generic:
const isGenericDevice = (properties['device'] || '').startsWith('generic');
const type = 'usb' in properties || isIP || !serial.startsWith('emulator') || !isGenericDevice ? 'hardware' : 'emulator';
Current emulator system images report device:emu64xa16k (and similar emu64* values), not generic*. The emulator therefore becomes type: 'hardware'.
Steps to reproduce
- Start an AVD whose system image reports a non-
genericdevice name, e.g. a recent Google APIs / 16 KB page-size image. native-run android --list --jsonlists it underdevices, andvirtualDevicesstays empty.native-run android --app app-debug.apk --virtualfails:
ERR_NO_TARGET: No target devices/emulators available.
The same command without --virtual installs on the emulator, because it is picked as a hardware device.
ionic cordova run android --emulator maps to --virtual, so Ionic Cordova live reload on an emulator is affected.
Expected
A serial of the form emulator-<port> that adb reports in the device state is a running emulator, whatever its device: property says. --virtual should select it.
Possible fix
Classify emulator-<port> serials as emulators without depending on the device: name, or additionally accept the emu* prefix. Alternatively, check ro.kernel.qemu / ro.boot.qemu from getprop, which getDevices already reads.
Related
#324: AVD home resolution ignores $ANDROID_USER_HOME/XDG locations. In the same setup that compounds this bug, because the fallback that would boot an AVD finds none.
- 主要言語
- TypeScript
- スター
- 139
- フォーク
- 35
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/native-run のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
ionic-team/native-run#410 · コメント 1 件 ·
-
tools not found?オープンandroid
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ionic-team/native-run#395 ·
-
android
難易度 3/5 1〜2日 初心者へのやさしさ 28/100
ionic-team/native-run#390 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
ionic-team/native-run#389 ·
-
android
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ionic-team/native-run#387 · リアクション 1 件 ·
ionic-team/native-run の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/playwright#43875 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
calagopus/panel#285 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
adobe/react-spectrum#10909 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
Run the dependency drift check対応中かも @spaceninja が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
cloudfour/lighthouse-parade#449 ·
メンテナーはふだん 1 日以内に返信