-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device is unauthorized #87
Comments
I think it is possible to do it manually under Developer Option @red-avtovo , but yes, we need to automate it somehow. |
I'm digging in it and I really hope, that this is just 1 argument to avd creation or emulator starting |
I bumped into the same issue some weeks ago, the root cause is because when the emulator is using Google Play Services it assumes that it is a "production build", so no root access is possible. To install apps and so on, adb uses the common mechanism of private and public keys. And this error pops up when the emulator does not have the public key of the adb server. The way I fixed it in our project was to do "adb devices" before starting the emulator. This is implicitly starting the adb server and generating the keys before the emulator is started, and when the emulator starts it will have the adb server keys. That is what needs to be automated in order to have it working. |
Will try that! Thank @diemol |
@diemol that would be super easy, but it didn't work. I see the keys, but emulator doesn't know about them. |
I solved an issue by starting emulator with |
Hi @red-avtovo , Could you create a PR for it? It would be great. |
ah ok, the Your solution seems pretty good as well, I didn't think about it :) But I guess that can make the boot process slightly slower? |
I didn't make a PR yet, because I'm pretty sure, that we need this tweak just for first container run. |
Fixed in release 1.2 |
@butomo1989 @red-avtovo Hi, I can reproduce this issue using image "butomo1989/docker-android-x86-7.1.1" tag 1.2, its image id is "ace02bf9cf03".
Container logs are here.
Could you help to confirm it, please? |
I also have the issue but only with playstore image.. tried everything there and rolling back to normal google_apis as I cannot understand what playstore needs.. |
@red-avtovo @butomo1989 can you please reopen the issue? The issue is still there on the playstore image. Tried to fix it in the several ways today but I'm out of ideas, need new sources :)) |
@butomo1989 please open this issue |
Do you have ideas of what can be done there? Interesting is that: |
Sorry guys @red-avtovo @JoeSSS @shadow1163 , I have a visit until end of next week so I cannot help :( |
@JoeSSS oh, that happens, because you are not sharing the same Android key with container. |
so, you must run tests inside the container? I use it from running Calabash tests and they are outside. |
Would be good if you will try to use the container as a Grid node. It will proxy all requests through Appium server and eventually execute all commands on container locally |
@shadow1163 do you try to connect to emulator through exposed port outside of container? |
I mean, I may be able to workaround it by just including my tests to the container and just run them inside. But I think that this guy will still trigger adb from outside to get acces + I believe that there are situations when people just want to use the emulator from local :) |
do you think that it is possible to do something here? for example using the same key for both envs if one already exist or defined |
Then you should run your container with passing directory sharing option:
Your local Android key should already be here: |
I will try it tomorrow when I have access to my laptop :) Thanks a lot @red-avtovo |
@red-avtovo I have tried to connect Android on remote machine, the result is same.
I checked the source code, the cmd string always be not include flag "-wipe-data", does it? |
I added |
@JoeSSS what are your findings? Did you find time to verify proposed solution? |
The container was run first time, the line app.py line 203 has created file "/root/init", so the line 210 should always return false. |
@red-avtovo not yet, was busy yesterday. Checking it now |
I created a PR, please help to review it, thanks very much. @red-avtovo @butomo1989 |
@red-avtovo it works as a charm! I think I will create a README note about this #96 . Thanks a lot. |
Latest emulator doesn't provide debugging option enabled by default, which doesn't allow to run automation on Android 7.x
Operating System:
Debian 9
Docker Image:
butomo1989/docker-android-x86-7.1.1
Docker Version:
18.03.1-ce, build 9ee9f40
Docker Command to start docker-android:
Expected Behavior
Device is authorized or at least asking for authorization, like on android 8.x images
Actual Behavior
The text was updated successfully, but these errors were encountered: