심예인 심예인 - 5 months ago 10
Bash Question

How can I use adb shell command in android?

I want use adb shell cammand in android.
My goal is show "adb shell pm list packages -f" result on android( just print that result )

I think it is only one solution.. is there any other solution on my problem?

I want just print that result( packages list )..!

Answer
Process process = Runtime.getRuntime().exec("your command");
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));

try this one , Hope this will helps you ! cheers !

Comments