开发者

Running adb commands like dmesg and logcat in my app in real time

开发者 https://www.devze.com 2023-02-01 16:57 出处:网络
Here\'s what I\'m trying to accomplish: I want to be able to show dmesg logs and logcat output in an app I\'m writing. I know that I\'m supposed to use Runtime.getRuntime().exec(), however other than

Here's what I'm trying to accomplish: I want to be able to show dmesg logs and logcat output in an app I'm writing. I know that I'm supposed to use Runtime.getRuntime().exec(), however other than that, I'm pretty lost. I tried to find some examples, but couldn't.

Can someone here give me some information on how to do this? Maybe poin开发者_运维知识库t me to some example code. Aside from doing the following in my code:

Runtime.getRuntime().exec("dmesg");

or

Runtime.getRuntime().exec("logcat");

I'm not sure what else to do to be able to read dmesg and logcat outputs.

I also want to be able to run commands like 'ls' and 'cat'

Thanks,


Well CrazyJay this article 'Running Android Native Code in your Android app' may be of help to you

& it suggests you to this app

0

精彩评论

暂无评论...
验证码 换一张
取 消