LoginSignup
1
0

More than 1 year has passed since last update.

Android Studioでホスト名を解決する方法

Last updated at Posted at 2022-12-02
-- AVDのリスト確認
$ emulator -list-avds
3.2_QVGA_ADP2_API_30
Pixel_3a_API_33_arm64-v8a

-- 任意のAVDを書き換え可能なモードで起動
$ emulator -avd Pixel_3a_API_33_arm64-v8a -writable-system

起動した後、別タブのターミナルで以下を実行すると既存のhostsを取得できます。(やらなくても良い)

$ adb root
$ adb remount
$ adb pull /system/etc/hosts 

-- 設定したいhostsがCurrentDirectoryにあるとして
$ adb push hosts /system/etc/hosts

確認するとホスト名の解決ができている。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0