修改现有的Andr​​oid ROM来控制用户操作 [英] modify a an existing Android ROM to control user actions

查看:114
本文介绍了修改现有的Andr​​oid ROM来控制用户操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个Android应用程序的客户,这将是pre-安装,并与手机一起分发。现在客户要求我的ROM使用别的除了这一个应用程序锁定到prevent未来的用户。即没有浏览,没有电子邮件,没有任何东西可以创建任何费用等。

现在经过一番Google上搜寻它似乎是相对简单从一个Android的图像删除应用程序。但是,即使我可以删除网络浏览器,电子邮件客户端,Android Market的应用程序等等,我怎么能确保用户不会通过USB连接器重新安装这些应用程序?由于Android是只是Linux的,我相信有拒绝所有用户安装新的应用程序的权利(或实际使用此一个应用程序剥夺了他们pretty的任何东西分开)的方法。

如果有人可以点我在正确的方向将是多AP preciated。

编辑: 为了澄清事情有点,客户不希望使用Android设备的手机,即使他们的手机。随着100€触摸屏手机变得可用,它成为可行使用这些手机只是一个特定的目的。在我的客户的情况下,该装置将被用作像一个POS系统:雇员使用电话处理某一种客户的要求,和该应用程序需要具有一个数据连接,这将累积当然成本。现在很明显的合同可以设置将迫使员工缴纳任何异常费自理,但为什么弄得这么复杂?

这是不是采取自由远离用户,而是如何使用Android手机作为通用触摸屏设备具有数据连接,员工可以在企业环境中使用而不会意外的高数据连接费用搬起石头砸自己的脚。

解决方案

有没有真正需要做的,使一个单一用途设备一大堆。如果你打你的卡,它应该是你,而不必鼓捣ROM可以做的。

的快速和简单的方法是将应用程序部署来替代股票发射器,就像任何其他家庭更换可用的。设置,为默认将覆盖大部分的休闲篡改的机会,因为它会留下来启动或安装任何东西没有别的办法。唯一的其他东西我能想到把我的头顶部,你会需要做的是捡搜索按钮,因此它不会弹出默认的Andr​​oid搜索框上面的应用程序和绿键,使手机应用程序韩元我们走来了。

您会,当然,需要一种方式来获得原来的发射器,以保持设备并安装你的应用程序的新版本。我完成了使用维护菜单项的地方,要求某种形式的认证(如密码),改变了家庭的应用程序回到原来并启动它。当你做了做什么,你需要做的,设置您的应用程序为默认启动,你就回到了生意。

修改,以解决MAINERROR(现屋大维Damiean)的评论:

在任何应用程序的任何活动可以通过增加对 android.intent.category.HOME 类别的意图过滤器将自身注册为家庭应用。这是字面上的清单四大行,而你没有写任何code来支持它。以一个77-82看看线路中的<一个href="http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=AndroidManifest.xml;hb=HEAD"相对=nofollow称号=股启动的清单>股票启动的清单对如何做到这一点的例子。 (忽略对默认过滤器和 MONKEY ;他们是没有必要的。)一旦活动被选定为默认处理程序类,它成为在开机启动的第一件事情,什么来了当的首页的关键是pressed。 HTC Sense的,阿奥梅,熊猫家庭等所有使用此机制。

启动股票家(或任何其他应用程序)明确是关于五行code。

边注:有一个关于市场一个应用程序调用首页切换器,可以让你启动任何关于首页类别或设置一个作为默认过滤活动

除非手机制造商增加了很多shovelware的,运行在后台东西应该微不足道,不会碍事。

I am creating an Android application for a customer which will be pre-installed and distributed together with the handsets. Now the customer asked me to lock down the ROM to prevent the future users from using anything else apart from this one app. I.e. no browsing, no email, nothing which could create any costs etc.

Now after some googling it seems to be relatively straightforward to remove applications from an Android image. But even if I can remove the web browser, email client, the Android Market App etc, how can I make sure that the user will not reinstall those apps via the USB connector? As Android is just Linux I am sure there are ways of denying all users the right to install new applications (or actually denying them pretty much anything apart from using this one app).

If somebody could point me in the right direction it would be much appreciated.

EDIT: To clarify things a bit, the customer does not want to use the android devices as phones, even though they are phones. With 100€ touch screen phones becoming available, it becomes viable to use those phones for just one specific purpose. In my customers case, the device will be used as something like a POS system: the employee uses the phone to process a certain kind of customer request, and for this the app needs to have a data connection which will accrue costs of course. Now obviously contracts can be set up that will oblige employees to pay any irregular costs themselves, but why make it that complicated?

This is not about taking freedom away from users but rather about using android phones as general purpose touch screen devices with a data connection that employees can use in a business environment without shooting themselves in the foot with unexpected high data connection cost.

解决方案

There's not really a whole lot you need to do to make a single-purpose device. If you play your cards right, it should be something you can do without having to tinker with the ROM.

The quick-and-easy route would be to deploy your application as a replacement for the stock launcher, just like any of the other home replacements that are available. Setting that as the default would cover most of the opportunities for casual tampering, since it would leave no other way to launch or install anything else. The only other things I can think of off the top of my head that you'd need to do are snag the search button so it doesn't bring up the default Android search box atop your app and the green key so the phone app won't come up.

You would, of course, need a way to get to the original launcher to maintain the device and install new versions of your app. I'd accomplish that using a "Maintenance" menu item somewhere that asks for some form of authentication (e.g., a password), changes the home app back to the original and launches it. When you're done doing what you need to do, set your app as the default launcher and you're back in business.

Edit to address MAINERROR (now Octavian Damiean)'s comment:

Any activity in any application can register itself as a home application by adding an intent filter on the android.intent.category.HOME category. It's literally four lines in the manifest, and you don't have to write any code to support it. Take a look at lines 77-82 in the stock launcher's manifest for an example of how this is done. (Ignore the filters on DEFAULT and MONKEY; they're not necessary.) Once the activity is selected as the default handler for the category, it becomes the first thing launched at boot and what comes up when the Home key is pressed. HTC Sense, aHome, Panda Home, etc. all use this mechanism.

Launching the stock home (or any other application) explicitly is about five lines of code.

Side note: There's a application on the Market called Home Switcher that lets you launch any of the activities filtering on the HOME category or set one as the default.

Unless the handset manufacturer adds a lot of shovelware, the stuff that runs in the background should be inconsequential and won't get in the way.

这篇关于修改现有的Andr​​oid ROM来控制用户操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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