Android - In call volume root modify
This approach achieves desired functionality by communicating with Android APIs at AIDL level making use of ADB
Run the command:
adb shell service call audio 7 i32 3 i32 0 i32 1
Here, the service call
refers to IAudioService
. Click here for more info.
7
is the function namedsetStreamVolume
. It is the 7th in the list of functions in the interfaceIAudioService
. Verify it here. (setStreamVolume
takes 3 parametersstreamType
,index
,flag
)i32
is to write the integer INT into the send parcel. (Alternatively we can make use ofs16
for UTF-16 string)3
isstreamType
value. (Value1
→ phone,3
→ speaker,4
→ alarm,6
→ bluetooth)0
isindex
value and1
isflag
value
See the source here.