DBus命令应用
// 下面这个URL是debus的信号,方法基本知识
https://blog.csdn.net/gangyanliang/article/details/44064267
adb -host shell dbus-monitor type=signal > log.txt
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 过滤信号
dbus-monitor --session "type='signal',interface='music.service.MusicController.interface'"
dbus-monitor --session "type='signal',interface='music.service.MusicController.interface',member='updatePlayProgress'"
dbus-monitor interface=music.service.MusicController.interface
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 发送signal
adb -host shell dbus-send --session --type=signal /music/service/MusicController music.service.MusicController.interface.PlayStatusChanged string:'{"cpid":1,"index":6,"lyricMode":0,"networkMode":false,"recognitionMode":1,"repeat":0,"songId":6103554886,"songname":"Wow.","status":2,"type":300001}'
dbus-send --session --type=signal /music/service/MusicController music.service.MusicController.interface.PlayStatusChanged string:'{"index":-1,"songId":-1,"status":6,"type":-1}'
adb -host shell dbus-send --system --type=method_call --print-reply --dest=music.service.MusicController /music/service/MusicController music.service.MusicController.interface.reqPlayerControl int32:800001 string:"test" int32:1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///函数调用
adb -host shell dbus-send --system --type=method_call --print-reply --dest=com.saic.ivi.MediaService /com/saic/ivi/MediaService/MediaPlay/101 com.saic.ivi.MediaService.MediaPlayer.SeekTo int32:25
dbus-send --system --type=method_call --print-reply --dest=com.saic.ivi.MediaService /com/saic/ivi/MediaService/MediaPlay/101 com.saic.ivi.MediaService.MediaPlayer.SetRepeat string:
adb -host shell dbus-send --system --type=method_call --print-reply --dest=com.saic.ivi.MediaService /com/saic/ivi/MediaService/MediaPlay/100 com.saic.ivi.MediaService.MediaPlayer.PlayFile string:http://127.0.0.1:50050/getUrl?songid=56044028_L
adb -host shell dbus-send --system --type=method_call --print-reply --dest=com.saic.ivi.MediaService /com/saic/ivi/MediaService/MediaPlay/100 com.saic.ivi.MediaService.MediaPlayer.SetNetWorkState boolean:0