Java.lang.SecurityException: Resolution:

I use Instrumentation to test PhoneApp I wrote my test application through Instrumentation

I created apk and installed it on the Nexus One - Android Phone - it passed In my code, I use internal classes that are not part of the standard SDK. I do not create it in Eclipse, but in my built-in env. I am developing Android for Android, so I have an Android tree with all the internal libraries.

I use the appropriate permissions in my manifest.

My apk created probably signed with some signature !! But probably this signature is not good enough.

Now I run the test through adb and immediately received this error:

-------------------------------------------------------------------------------------
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{com.android.phonetests/com.android.phonetests.PhoneInstrumentationTestRunner} from pid=495, uid=495 not allowed because package com.android.phonetests does not have a
 signature matching the target com.android.phone
INSTRUMENTATION_STATUS_CODE: -1
java.
lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{com.android.phonetests/com.android.phonetests.PhoneInstrumentationTestRunner} from pid=495, uid=495 not allowed because package com.android.phonetests does not have a
signature matching the target com.android.phone
-------------------------------------------------------------------------------------

Please, help.

+5
source share
9

? , apk , .

, adb , .

adb uninstall com.android.phone
adb uninstall com.android.phonetests
+3

, , "" . , . , .. , , , .

.

+1

. AndroidManifest, :

category android:name="android.intent.category.LAUNCHER"
+1

, , /, application_test data/app

+1

'

. , APK APK .

+1

, , , Android Developers: Eclipse: "Windows" > "" > "Android" > "" .

, .

, .

0

apk . re-sign.jar, apk .

0

, - .

(./gradlew assembleDebug) , .

0

, Case InstrumentationTest ( Android AOSP)

apk mm Android.mk, LOCAL_CERTIFICATE.

Android.mk .

system application Android.mk LOCAL_CERTIFICATEvalue must match the value of the eventmentment object InstrumentationTest object Android.mk LOCAL_CERTIFICATEvalue

Good luck

0
source

All Articles