implementar no comando no android rooted e obter o resultado

Como sou iniciante no stackoverflow, não posso adicionar um comentário.

Eu vi esta página:
Ler a saída do comando dentro do processo su

e eu tentei esta resposta e está tudo bem:

Process p = Runtime.getRuntime().exec(new String[]{"su", "-c", "system/bin/sh"});
DataOutputStream stdin = new DataOutputStream(p.getOutputStream());
//from here all commands are executed with su permissions
stdin.writeBytes("ls /data\n"); // \n executes the command
InputStream stdout = p.getInputStream();
byte[] buffer = new byte[BUFF_LEN];
int read;
String out = new String();
//read method will wait forever if there is nothing in the stream
//so we need to read it in another way than while((read=stdout.read(buffer))>0)
while(true){
    read = stdout.read(buffer);
    out += new String(buffer, 0, read);
    if(read<BUFF_LEN){
        //we have read everything
        break;
       }
 }
 //do something with the output

mas quando tentei o comando no shell, a resposta foi o mesmo comando.

Eu coloquei este comando:

stdin.writeBytes("echo AT+CQI?\n");

a resposta foi:

AT+CQI?

Eu escrevi:

stdin.writeBytes("echo ATinkd\n");

a resposta foi:

ATinkd

Isso significa "bla..bla..bla ..". isto é, o sistema Android não reconhece esses comandos como em comandos.

Gostaria de saber se algum corpo tem um conselho ou solução.

questionAnswers(1)

yourAnswerToTheQuestion