如何获取NFCEE_ADMIN权限根深蒂固的手机吗? [英] How to obtain NFCEE_ADMIN permission on rooted phone?
问题描述
该NFCEE_ADMIN权限签名级别。 但是,是否有可能欺骗工作再上一个植根于手机这个权限?也许使用类似于时钟同步它的方式的技术?
我想使用反射技术来获得访问NFCExtras:
mAdapter = NfcAdapter.getDefaultAdapter(本);
尝试 {
类mynfcextras =的Class.forName(android.nfc.INfcAdapterExtras);
方法getnfcExtras = mAdapter.getClass()实现getMethod(getNfcAdapterExtrasInterface)。
对象nfcExtras = getnfcExtras.invoke(mAdapter);
}赶上(例外五){
// TODO自动生成的catch块
e.printStackTrace();
}
不过,当然得到以下错误:需要NFCEE_ADMIN权限:无论是用户还是XXX当前进程com.android.nfc.permission.NFCEE_ADMIN
编辑:当然,我也允许添加到程序包,但在安装过程中删除:
W / PackageManager(XXX):未授予权限com.android.nfc.permission.NFCEE_ADMIN打包XXX(的ProtectionLevel = 2标志= 0x8be46)
您的应用程序的签名需要在 /system/etc/nfcee_access.xml
。例如参见 HTTP://$c$c.google.com/p /谋求换安卓/维基/ BuildingTheSystem 一个例子,如何创建它。
The NFCEE_ADMIN permission is signature level. However, is it possible to "cheat" to get this permission on a rooted phone ? Maybe using a technique similar to the way ClockSync does it ?
I am trying to use reflexion techniques to get access to NFCExtras :
mAdapter = NfcAdapter.getDefaultAdapter(this);
try {
Class mynfcextras = Class.forName("android.nfc.INfcAdapterExtras");
Method getnfcExtras = mAdapter.getClass().getMethod("getNfcAdapterExtrasInterface");
Object nfcExtras = getnfcExtras.invoke(mAdapter);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But of course get the following error : "NFCEE_ADMIN permission required: Neither user xxx nor current process has com.android.nfc.permission.NFCEE_ADMIN."
Edit : Of course, I did add the permission to the package, but it is removed during installation :
W/PackageManager( XXX): Not granting permission com.android.nfc.permission.NFCEE_ADMIN to package XXX (protectionLevel=2 flags=0x8be46)
The signature of your app needs to be in /system/etc/nfcee_access.xml
. See e.g. http://code.google.com/p/seek-for-android/wiki/BuildingTheSystem for an example how to create it.
这篇关于如何获取NFCEE_ADMIN权限根深蒂固的手机吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!