DevLog
Python, TypeScript, etc...
MyPage
Python, TypeScript, etc...
2022/07/04

AndroidへWiFiでアプリ(apkファイル)をインストール

Android
preview
@shiromisanta
Frontend Engineer
  •  /
目次
PC(mac)側準備

PC(mac)側準備

brew install android-platform-tools --cask brew install scrcpy

以下のようなエラーが出たら

Error: python@3.9: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install You can try to install from source with: brew install --build-from-source python@3.9

xcode-selectをインストール

xcode-select --install

android側準備

  1. 設定 > ネットワークとインターネット > Wi-Fi > 接続しているネットワークを選択
  2. IP address欄に表示されているIPを控えておく

接続

# 1. AndroidとPCをUSBで繋ぐ adb tcpip 5555 # 2. USB外してOK adb connect <Android端末のIPアドレス>:5555 scrcpy

ここまでやったらPC上でAndroid画面が開く。

scrcpyでは、PCからAndroid画面内にファイルをドラッグ&ドロップすることで、Androidの「Download」フォルダーにファイルを移動する、APKファイルをインストールなどができる。

その他adbコマンド

# tcpip <PORT>で待ち受けたサーバを殺す adb kill-server # 利用可能なデバイス一覧を表示 adb devices

関連記事

preview
@shiromisanta 2022/08/18
光学カメラAndroidKotlin
preview
@shiromisanta 2022/07/15
AndroidKotlin
preview
@shiromisanta 2022/07/15
AndroidKotlin
preview
@shiromisanta 2022/07/02
AndroidKotlin
2022/07/04

AndroidへWiFiでアプリ(apkファイル)をインストール

Android

PC(mac)側準備

brew install android-platform-tools --cask brew install scrcpy

以下のようなエラーが出たら

Error: python@3.9: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install You can try to install from source with: brew install --build-from-source python@3.9

xcode-selectをインストール

xcode-select --install

android側準備

  1. 設定 > ネットワークとインターネット > Wi-Fi > 接続しているネットワークを選択
  2. IP address欄に表示されているIPを控えておく

接続

# 1. AndroidとPCをUSBで繋ぐ adb tcpip 5555 # 2. USB外してOK adb connect <Android端末のIPアドレス>:5555 scrcpy

ここまでやったらPC上でAndroid画面が開く。

scrcpyでは、PCからAndroid画面内にファイルをドラッグ&ドロップすることで、Androidの「Download」フォルダーにファイルを移動する、APKファイルをインストールなどができる。

その他adbコマンド

# tcpip <PORT>で待ち受けたサーバを殺す adb kill-server # 利用可能なデバイス一覧を表示 adb devices

関連記事

preview
@shiromisanta
Frontend Engineer
  •  /
©︎Devlog