我可以使用adb外壳将命令发送到我的应用程序 [英] can I use adb shell to send commands to my application

查看:273
本文介绍了我可以使用adb外壳将命令发送到我的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想找到一种方法来创建,我可以发送到使用亚行外壳或类似我的应用程序的命令。这样我可以做一些小的修改我的程序,而不必每次我改变什么时间来重新加载我的申请。

I want to find a way to create commands that I can send to my application using the adb shell or similar. This way I can do some small changes to my program without having to reload my application every time I change anything.

有没有办法打开亚行外壳和发送一个命令来运行的应用程序?

Is there a way to open the adb shell and send a command to a running application ?

如果这是不可能的,那么什么是可能的方式将命令发送到我的应用程序,所以我可以做这样的事情(移动UI元素)或(创建从URL文件),或者其他的一些东西.. ..基本上我希望能够以字符串命令发送到我的应用程序......

If that is not possible, then what is a possible way to send commands to my application so I can do things like (Move the UI Elements) or (Create a file from a URL) or a number of other things.... Essentially I want to be able to send string commands to my application.....

如果我能做到这一点的命令行工具,这将是甜的。否则怎么会去这个好办法?

If I can do that with the command line tools that would be sweet. otherwise What would be a good way to go about this ?

推荐答案

从亚行的shell,键入上午。你可以开始活动和服务,以及发送广播意图。任何参数将打印使用信息。

From an adb shell, type am. You can start activities and services as well as send broadcast intents. No arguments will print usage info.

从主机,你可以做亚行外壳AM<命令方式> ,如果你想从脚本中调用此

From the host machine you can do adb shell am <command> if you want to invoke this from scripts.

这篇关于我可以使用adb外壳将命令发送到我的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆