Android 设备的远程控制 - 模仿任何已安装应用程序的物理击键?

发布于 2024-10-12 18:48:57 字数 1397 浏览 0 评论 0原文

目标:

远程控制 Android 设备。我正在尝试为无法在 Android 手机或平板电脑上使用触摸屏或小型​​滑出式键盘的身体残疾人士制作替代输入设备。我需要能够控制整个 Android 设备 - 发送 KEYCODE_DPAD_DOWN 等按键。将使用操纵杆或其他输入设备,理想情况下命令将通过蓝牙发送到设备。

这就是我现在所处的位置:

我可以通过 Monkeyrunner 发送这些击键来控制活动设备(感谢 Roman R. 的帮助!)。问题是,这需要将计算机连接到该设备并对其进行配置以对其进行编程。我想从系统中完全消除计算机,并允许个人对其 Android 设备进行完全(远程)控制。也许通过在后台运行的应用程序或服务,处理蓝牙交换并产生相应的关键事件。

到目前为止我的研究:

可以发送 KeyEvents,但这似乎只允许与您自己的应用程序交互 - 例如,在 EditText 框中输入文本。 (链接

也是可能的(据我所知了解)捕获设备上的物理按键事件并执行某些操作来响应该事件。

最后,看起来谷歌确切地知道我想要做什么,但出于安全原因不允许这样做。 (链接 - 位于有人链接到博客的页面底部,它位于声明这是不允许的。)

我知道实现这样的东西可能会存在安全问题,但这个项目的整体目标是让用户完全(远程)控制 Android 系统。显然,有必要明确要求用户授权此控制。这种控制已经可用,他们称之为设备管理。这允许应用程序控制系统的非常私密的部分,并且正确地需要明确的授权才能这样做。这个远程控制系统也不例外。

就我而言,它将用于帮助我身体残疾的姐姐。您可以使用它来创建飞行控制系统或其他类似游戏手柄的控制器。实现这种接口的原因有很多。

最后,谷歌正在不断更新Android,而上面指出不能这样做的博客条目已经有两年多了。从那时起发生了很多变化...

有人知道如何做到这一点吗?如果还不能完成,您知道如何向 Android 系统提出正式请求,要求在以后的版本中添加新功能吗?

The goal:

Remote control of an Android device. I'm trying to make an alternate input device for physically disabled individuals who can't use a touchscreen or the tiny slide-out keyboard on an Android phone or tablet. I need to be able to control the entire Android device - send keystrokes like KEYCODE_DPAD_DOWN, etc. A joystick or other input device would be used, and ideally the command would be sent to the device via Bluetooth.

Here's where I am now:

I can send these keystrokes through Monkeyrunner to control an active device (Thanks for the help, Roman R.!). Problem is, that requires a computer to be connected to the device and configured to program it. I'd like to eliminate the computer from the system altogether, and allow an individual to have complete (remote) control over their Android device. Perhaps through an app or service that would run in the background, handle the Bluetooth exchange and produce the corresponding Key Events.

My research thus far:

It is possible to send KeyEvents, but this only seems to allow interaction with your own app - entering text into an EditText box, for example. (link)

It is also possible (as far as I understand) to trap a physical key event on the device and perform some action in response to that event.

Finally, it looks like Google knows exactly what I'm trying to do but has disallowed it for security reasons. (link - at the bottom of the page someone links to this blog, where it is stated that this is not allowed.)

I understand there could be security concerns for implementing something like this, but the whole goal of this project is to give the user complete (remote) control over the Android system. Obviously it would be necessary to explicitly require the user to authorize this control. This sort of control is already available, they call it Device Administration. This allows an app to control very intimate parts of the system, and correctly requires explicit authorization to do so. This remote control system would be no different.

In my case it would be used to assist my sister, who is physically disabled. You might use it to create a flight control system or some other gamepad-like controller. There are a lot of reasons to implement this sort of interface.

Finally, Google is constantly updating Android, and the blog entry above that states this cannot be done is over two years old. A lot has changed since then...

Does anyone have any idea how to do this? If it can't be done yet, do you know how to make an official request for a new feature to be added to the Android system that might allow it in a later release?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

诗化ㄋ丶相逢 2024-10-19 18:48:57

设备管理也可以远程完成,正如您所说的,它可以访问系统级别,不幸的是,它只提供对少数系统级别功能的访问,例如擦除设备、锁定和应用程序中的其他密码设置。但是远程控制,不,我认为设备管理没有帮助。

我想使用 USB 配件来控制设备。看看这个

http://www.microchip .com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en553673

以下链接(软件支持)对于入门非常有帮助

http://ww1.microchip.com/downloads/en/DeviceDoc/Android%20Library%20Help.pdf

他们还有一个配件开发套件。

Device administration can also be done remotely, as u said it has access to system level, unfortunately it provides access to only few system level features like wiping device, locking and other password setting from applications. But remote control, no I don't think device administration helps.

I would think to use a USB accessory which controls the device. Have a look at this

http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en553673

The below link (software support)is highly helpful for getting started

http://ww1.microchip.com/downloads/en/DeviceDoc/Android%20Library%20Help.pdf

they also have a accessory development kit.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文