Android USB debug problem

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By toby3d
:warning: Old Version Published before Godot 3 was released.

Linux Mint Mate 18 (x86-64), Godot Engine v2.1.1.stable.official (on GitHub - duplicated topic with custom build with same problem)
From GitHub

Android SDK/NDK installed, editor configured. After clicking on the icon with android is a process of sending assembly on the phone, but app on phone is not installed and does not start.

For example, I try build Platformer example to my phone on USB cable:

sm      5908 Fri Nov 30 00:00:00 YEKT 1979 assets/tileset.tres
sm     14980 Fri Nov 30 00:00:00 YEKT 1979 assets/tileset_edit.tscn.converted.scn
sm      1863 Fri Nov 30 00:00:00 YEKT 1979 assets/engine.cfb
sm        39 Fri Nov 30 00:00:00 YEKT 1979 assets/_cl_

  s = signature was verified 
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

This jar contains entries whose certificate chain is not validated.
This jar contains signatures that does not include a timestamp. Without a timestamp, users may not be able to validate this jar after the signer certificate's expiration date (2044-04-17) or after any future revocation date.

Re-run with the -verbose and -certs options for more details.
Uninstalling previous version: Benq F5_15
Installing into device (please wait..): Benq F5_15
[100%] /data/local/tmp/tmpexport.apk
	pkg: /data/local/tmp/tmpexport.apk
error: closed
error: closed
Reverse result: 1
error: closed
Reverse result2: 1
Starting: Intent { act=android.intent.action.MAIN cmp=org.godotengine.platformer/org.godotengine.godot.Godot }
java.lang.SecurityException: Permission Denial: startActivity asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
	at android.os.Parcel.readException(
	at android.os.Parcel.readException(
	at Method)
	at dalvik.system.NativeStart.main(Native Method)

Can you test it with another device?

volzhs | 2016-12-30 12:46

:bust_in_silhouette: Reply From: Nutr1z


I never had this error but you can find a solution here : Android permission.INTERACT_ACROSS_USERS_FULL

INTERACT_ACROSS_USERS_FULL is a signature level permission

A permission that the system grants only if the requesting application is signed with the same certificate as the application that declared the permission. If the certificates match, the system automatically grants the permission without notifying the user or asking for the user's explicit approval. 

I guess you must have a signed apk. Do you have added the debug key like that : Exporting for Android

I already add debug keystroke to my godot engine, but problem not solved.

Where should I add this line?


toby3d | 2016-12-30 12:36

In regular apps, you need to add this line in the Manifest.xml file (see App Manifest, under the permission you ask. But I guess (I’m not on my computer), godot will generate each time a new Manifest.xml so I don’t know if you can add this line manually. Let me investigate a bit more when I’m home.

Nutr1z | 2016-12-30 15:03

Okay. This problem have only on my BenQ F5 phone and if I want test my build, I must copy-paste apk to my phone, install and run manually.

On my old tablet and my old smartphone this bug is not visible and builds install/run without extra steps.

toby3d | 2016-12-31 14:07

No solutions? Root?

toby3d | 2017-01-04 09:20

I dont think so. I reply on github because you put some others log !

Nutr1z | 2017-01-04 11:50

Man. I have the same problem. I am using Xubuntu 16.04 and Godot 2.1 and the matching export templates but I can’t run my app in any android phone yet.

Pedro Karut Gimenez | 2017-01-04 20:06