简体   繁体   English

以android.uid.system用户身份进行测试

[英]Testing as android.uid.system user

I am developing an android app that will run under the android.uid.system user (the tablet manufacturer is signing the app for me so it will be able to run under this user id). 我正在开发一个将在android.uid.system用户下运行的android应用(平板电脑制造商正在为我签名该应用,因此它可以在此用户ID下运行)。

The problem I have is that it takes about 2 to 3 weeks each time I want the app signing. 我的问题是,每次我要对应用进行签名时,大约需要2到3周。 As I make code changes I want to be able to test them under the system user but it is not feasible for me to wait this long to be able to test/debug my changes - especially if they turn out to be wrong. 当我进行代码更改时,我希望能够在系统用户下对其进行测试,但是要等待这么长时间才能测试/调试我的更改是不可行的,特别是如果发现它们是错误的。

Is there any way I can test the app on the tablet as the system user (or mimicking system user privileges) without having to get it signed every time? 有什么方法可以让我以平板电脑用户身份测试平板电脑上的应用程序(或模仿系统用户权限),而不必每次都对其进行签名?

Further info: I am developing on windows 7, using Eclipse IDE. 进一步的信息:我正在使用Eclipse IDE在Windows 7上进行开发。 The tablets are running Android 4.4.2 and 4.4.4 (2 different models). 平板电脑正在运行Android 4.4.2和4.4.4(2种不同型号)。 The tablets are not and will not be rooted. 平板电脑不是,也不会生根。 Assume a fairly basic level of understanding of app signing on my part. 假设我对应用程序签名有相当基本的了解。

Thanks in advance 提前致谢

Root the device and install app to system/app folder 根设备并将应用安装到system / app文件夹

I have sorted this myself by rooting the device for development purposes and then copying the app from the data/app folder to system/app and then removing the it from data/app folder. 我自己进行了排序,将其植根用于开发目的,然后将应用程序从data / app文件夹复制到system / app,然后将其从data / app文件夹中删除。

The device then treats it as a system app and so far all of the system level functions I have tried have been working (such as reboot device and set timezone). 然后,设备将其视为系统应用程序,到目前为止,我尝试过的所有系统级功能都已正常运行(例如重新启动设备和设置时区)。

This article helped (although I had to copy (cp) and remove (rm) rather than move (mv) the app). 本文有所帮助(尽管我不得不复制(cp)和删除(rm)而不是移动(mv)应用程序)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 android:sharedUserId =“ android.uid.system”从SDCard获取文件 - android:sharedUserId=“android.uid.system” Obtaining Files from SDCard 当sharedUserId =“ android.uid.system”时,AudioDeviceCallback失败 - AudioDeviceCallback fails when sharedUserId=“android.uid.system” 使用 android:sharedUserId="android.uid.system" 属性获取 SystemProperties.java 类 - Getting SystemProperties.java class using android:sharedUserId="android.uid.system" attributes 如果将shareduserId设置为“ android.uid.system”,则无法运行Android单元测试 - cannot run android unit test if I set the shareduserId as “android.uid.system” 在我的应用程序中设置“android.uid.system”后无法访问sdcard? - It can't access the sdcard after setting “android.uid.system” in my application? Android上系统的GID / UID是什么? - What is the GID/UID of the system on Android? Firebase / Android - 由UID加载用户 - Firebase/Android - Load User by UID 如何从android上的firebase获取用户uid? - How to get user uid from firebase on android? 如何在Android上使用UID获取用户名? - How to get user name using UID on Android? 用户 UID 与 Firestore Android 中的文档 ID 不同 - The User UID is not the same with document id in Firestore Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM