0

I would like to install and debug projects using Eclipse ADT. It finds the device and trys to install but then I get the errors below. The phone is a "HTC One S" and it is the Custom ROM "Codename Lungo One S" (4.3). The applications are the Kontalk project and the ApiDemos from the 17 (4.2.2) samples both build for 4.2.2. Installing in the emulator works.

10-10 00:36:30.783: E/AndroidRuntime(2943): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
10-10 00:36:30.783: E/AndroidRuntime(2943): java.lang.SecurityException: Neither user 2000 nor current process has android.permission.INSTALL_PACKAGES.
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.os.Parcel.readException(Parcel.java:1431)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.os.Parcel.readException(Parcel.java:1385)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at android.content.pm.IPackageManager$Stub$Proxy.installPackageWithVerificationAndEncryption(IPackageManager.java:3314)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.runInstall(Pm.java:931)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.run(Pm.java:109)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.commands.pm.Pm.main(Pm.java:77)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:235)
10-10 00:36:30.783: E/AndroidRuntime(2943):     at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/JavaBinder(2943): Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943): error in getService
10-10 00:36:30.793: E/ServiceManager(2943): android.os.RemoteException: Unknown binder error code. 0xfffffff7
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.BinderProxy.transact(Native Method)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.ServiceManagerProxy.getService(ServiceManagerNative.java:123)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.os.ServiceManager.getService(ServiceManager.java:55)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1911)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative$1.create(ActivityManagerNative.java:1909)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.util.Singleton.get(Singleton.java:34)
10-10 00:36:30.793: E/ServiceManager(2943):     at android.app.ActivityManagerNative.getDefault(ActivityManagerNative.java:73)
10-10 00:36:30.793: E/ServiceManager(2943):     at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/ServiceManager(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/ServiceManager(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/ServiceManager(2943):     at dalvik.system.NativeStart.main(Native Method)
10-10 00:36:30.793: E/AndroidRuntime(2943): Error reporting crash
10-10 00:36:30.793: E/AndroidRuntime(2943): java.lang.NullPointerException
10-10 00:36:30.793: E/AndroidRuntime(2943):     at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-10 00:36:30.793: E/AndroidRuntime(2943):     at dalvik.system.NativeStart.main(Native Method)

Any ideas? Can't find anything on this on the internet?

magmabyte
  • 397
  • 1
  • 2
  • 10
  • I downgraded to Codename Lungo CM10 and it works. I don't consider it as a good solution as I would like to use the newest version to debug. So it is related to the version of CL, CM or the original Android. I asked the CL developers and hope they can help. – magmabyte Oct 10 '13 at 10:23

3 Answers3

0

You can try the

<uses-permission android:name="android.permission.INSTALL_PACKAGES" /> 

before the application tag is start in the AndroidManifest.xml.

  • Where would I add this? I tried to do so in the applications manifest but it is says it is only allowed for system applications. – magmabyte Oct 09 '13 at 23:09
0

I think you are looking for this but you can try clean and build your project first.

Community
  • 1
  • 1
  • btw: `android.permission.INSTALL_PACKAGES Not for use by third-party applications.` [Android Reference](http://developer.android.com/reference/android/Manifest.permission.html#INSTALL_PACKAGES) – FizzyMobile Oct 09 '13 at 23:30
  • This does not seem to help. The error messages turns to a warning (or lower depending on the level specified) but the projects build and run as before. – magmabyte Oct 09 '13 at 23:37
  • I believe the issue is connected with your device. Have you used it for debugging before? Why don't you try [this](http://stackoverflow.com/a/12650161/2845800). – FizzyMobile Oct 10 '13 at 00:51
  • Thanks, I tried it, too but it doesn't seem to work. Please see the comment on my question for an update. Your last link is only necessary if you can't reach the phone through the debugger. This is not the case with me, it is listed and I can trigger the install but than it fails. – magmabyte Oct 10 '13 at 10:24
0

The problem is Codename Lungo with CM10.1 and CM10.2. This is a bug or at least you can't debug Apps with the standard procedure. It works on my phone with CL CM10 and CynogenMod 10.2.

Tim Veluwenkamp announced a new version of CL yesterday that may address the issue but I am not sure about it. I am on CM10.2 now.

magmabyte
  • 397
  • 1
  • 2
  • 10