Execute shell commands and get output in a TextView
问题 I want to execute some shell commands and get the output in a TextView . The command may have a continuous output like ping or logcat . Also, the TextView should scroll automatically as the command output is added in real-time. In order to do so, I have done this: package com.example.rootapp; import java.io.DataOutputStream; import java.io.InputStream; import android.app.Activity; import android.os.Bundle; import android.text.method.ScrollingMovementMethod; import android.widget.TextView;