電腦下載ADB。手機開啟發開人員模式,啟用無線偵錯
電腦ADB下載網址:https://developer.android.com/studio/releases/platform-tools?hl=zh-tw
指令(注意port適配對時用的)
./adb pair 192.168.31.115:39003
然後輸入配對碼,此時手機應該可以看到以配對裝置裡有電腦
如果你想看裝置,可以下指令
./adb devices
然後我們來連線吧(注意port和配對時的不一樣)
./adb connect 192.168.31.115:43391
此時可以下指令旋轉螢幕之類的,i後面的數字可以改0~3
./adb -s 192.168.31.115:43391 shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
如果你只有一個裝置可以不用目標,
./adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0