Android 杂项

幻昼 2021年07月23日 228次浏览
  1. 有线连接上

  2. adb tcpip 5555
    
  3. adb connect 10.220.160.46
    

    adbwifi

查看ip地址

adb shell ifconfig wlan0 | grep "inet addr" | awk '{print $2}' | awk '{match($0,":");print substr($0,RSTART+1)}' 
adb tcpip 5555
adb shell ifconfig wlan0 | grep "inet addr" | awk '{print $2}' | awk '{match($0,":");print substr($0,RSTART+1)}' | xargs -I IP adb connect IP

查看顶部Activity

adb shell dumpsys activity top | grep ACTIVITY

查询oaid

adb shell content query --uri content://com.miui.idprovider/oaid
// bundle 打日志        
JSONObject json = new JSONObject();
for (String k : extras.keySet()) {
    try{
        json.put(k,JSONObject.wrap(extras.get(k)));
    }catch (Exception e){
        Log.i("TAG-jin",  e.getMessage());
    }
}
Log.i("TAG-jin",  new Gson().toJson(json));