Runner for ADB๋ฅผ ์ฌ์ฉํ๋ฉด Android ๊ธฐ๊ธฐ์์ ADB ๋ช
๋ น์ ์ ์ฅํ๊ณ ์คํํ ์ ์์ต๋๋ค.
ADB ๋ช
๋ น์ ์คํํ๋ ค๋ ์ฅ์น์๋ Wi-Fi ๋๋ฒ๊น
์ด ํ์ฑํ๋์ด ์์ด์ผ ํฉ๋๋ค.
๋์ ์ฅ์น๊ฐ ADB ๋ช
๋ น์ ์๋ฝํ๋๋ก ํ๋ ค๋ฉด ๋ค์์ ์คํํด์ผ ํ ์ ์์ต๋๋ค.
adb tcpip 5555
PC์ ADB ๋๋ LADB์ ๊ฐ์ ๋ค๋ฅธ ์ฑ์ ์ฌ์ฉํ์ฌ ์ด ์์
์ ์ํํด์ผ ํฉ๋๋ค.
์ธํ
ํธ์ ํจ๊ป ๋ธ๋ก๋์บ์คํธ๋ฅผ ์ ์กํ์ฌ ๋ค๋ฅธ ์ฑ์์ ADB ๋ช
๋ น์ ์คํํ ์๋ ์์ต๋๋ค.
์์ ์ฝ๋:
๊ฐ ์๋ = ์๋()
intent.action = "dev.tberghuis.adbrunner.RUN_ADB"
intent.putExtra("HOST", "192.168.0.99")
intent.putExtra("ADB_COMMAND", "์ ์์ฝ ํฌ๋ก ์๋")
์๋.addFlags(์๋.FLAG_INCLUDE_STOPPED_PACKAGES)
์ธํ
ํธ.๊ตฌ์ฑ ์์ =
ComponentName("dev.tberghuis.adbrunner", "dev.tberghuis.adbrunner.AdbRunnerBroadcastReceiver")
appContext.sendBroadcast(์๋)
์์ค ์ฝ๋: https://github.com/tberghuis/RunnerForAdb
์
๋ฐ์ดํธ ๋ ์ง
2023. 6. 16.