Tengo un HTC One m7 internacional. Tiene acceso de root. Android piruleta 5.0.2
El volumen de llamadas entrantes es demasiado bajo a pesar de estar en el volumen máximo.
¿Qué archivo en el sistema raíz debo modificar para aumentar el volumen máximo? ¿Qué línea de código corresponde a esta configuración?
gracias
Este enfoque logra la funcionalidad deseada al comunicarse con las API de Android en el nivel AIDL haciendo uso de ADB
Ejecute el comando:
adb shell service call audio 7 i32 3 i32 0 i32 1
Aquí, el servicio call
se refiere a IAudioService
. Haga clic aquí para obtener más información.
7
es la función llamada setStreamVolume
. Es el 7º en la lista de funciones de la interfaz IAudioService
. Compruébalo aquí . ( setStreamVolume
toma 3 parámetros streamType
, index
, flag
)i32
es escribir el entero INT en el paquete de envío. (Alternativamente, podemos hacer uso de s16
la cadena UTF-16)3
es streamType
valor (Valor 1
→ teléfono, 3
→ altavoz, 4
→ alarma, 6
→ bluetooth)0
es index
valor y 1
es flag
valorVer la fuente aquí .
para Android 10
adb shell media volume --show --stream 1 --set 1
ejemplo :
/ $ media volume --show --stream 4 --set 1
[v] will control stream=4 (STREAM_ALARM)
[v] will set volume to index=1
[v] Connecting to AudioService
Uso específico
usage: media [subcommand] [options]
media dispatch KEY
media list-sessions
media monitor <tag>
media volume [options]
media dispatch: dispatch a media key to the system.
KEY may be: play, pause, play-pause, mute, headsethook,
stop, next, previous, rewind, record, fast-forword.
media list-sessions: print a list of the current sessions.
media monitor: monitor updates to the specified session.
Use the tag from list-sessions.
media volume: the options are as follows:
--stream STREAM selects the stream to control, see AudioManager.STREAM_*
controls AudioManager.STREAM_MUSIC if no stream is specified
--set INDEX sets the volume index value
--adj DIRECTION adjusts the volume, use raise|same|lower for the direction
--get outputs the current volume
--show shows the UI during the volume change
examples:
adb shell media volume --show --stream 3 --set 11
adb shell media volume --stream 0 --adj lower
adb shell media volume --stream 3 --get
Manubhargav
NK2013
Manubhargav
adb shell service call audio 7 i32 3 i32 0 i32 1
Fuente: publicación SONK2013