T-vK / android-svc

Easy to use Android service wrapper
74 stars 15 forks source link

Unable to reproduce what's shown in the demo #8

Closed zb226 closed 1 month ago

zb226 commented 1 month ago

Hi there! I've tried to follow the demo with a Google Pixel (sailfish). The device is rooted via Magisk, android-svc was built from master, then I've downloaded the sources with android-svc --adb download.

All seems to be fine as far as I can tell:

root@debian11:~/tmp# ./android-svc --adb list-packages | grep IAudioService
android.media.IAudioService
root@debian11:~/tmp# ./android-svc --adb list-methods android.media.IAudioService | grep MasterMute
boolean isMasterMute();
void setMasterMute(boolean mute, int flags, String callingPackage, int userId);
root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.isMasterMute()'
false

But when I try to mute/unmute, nothing happens:

root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.setMasterMute(true, 0, "com.termux", 0)'
root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.isMasterMute()'
false

I've also tried something else:

root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.isSpeakerphoneOn()'
false
root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.setSpeakerphoneOn(true)'
root@debian11:~/tmp# ./android-svc --adb call 'android.media.IAudioService.isSpeakerphoneOn()'
false

Any ideas?

zb226 commented 1 month ago

Follow-up: I've tried the dialer example

root@debian11:~/tmp# ./android-svc --adb call 'com.android.internal.telephony.ITelephony.dial("555-0199")'

...and this does bring up the dialer as expected. Hm.

zb226 commented 1 month ago

So after a bit of research, I found this is very likely due to a hardware problem with this device. Closing this issue.