mirror of
https://github.com/alexal1/Insomniac.git
synced 2026-04-26 10:05:50 +03:00
[GH-ISSUE #164] Add feature to log in #133
Labels
No labels
bug
duplicate
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Insomniac#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mv-debug on GitHub (Oct 30, 2020).
Original GitHub issue: https://github.com/alexal1/Insomniac/issues/164
I use your code within a simulated android environment in docker. It could up automatically till the point of log in in the app. For CD purpose this feature will be nice to automatic log in(also handle multiple accounts in the app make sense).
If you want I could create the Dockerfile for this feature.
@markbookk commented on GitHub (Oct 30, 2020):
What simulated android environment do you have?
@mv-debug commented on GitHub (Oct 31, 2020):
You can use different devices and different os versions. I used this docker image as a base image: https://github.com/budtmo/docker-android.
It worked like a charm on an older laptop with 4 cores and 8gb ram with two android container (for two accounts).
@markbookk commented on GitHub (Nov 2, 2020):
Thanks for this resource, it looks awesome! I will give it a try.
@mv-debug commented on GitHub (Nov 2, 2020):
@alexal1 What do you think about the idea to deploy this framework in docker with a ready to go android setup?
@mv-debug commented on GitHub (Nov 4, 2020):
Do give it a try?
@markbookk commented on GitHub (Nov 9, 2020):
I just tried it and it looks like it is working but the emulator doesn't have Google Play Store... What did you use to download Instagram app? Also, do you have Discord? I am not sure if we should keep talking about this here as it not the main issue.
@future2back commented on GitHub (Nov 9, 2020):
@mv-debug Could Could you give more information on how to make it work please?
@markbookk thanks for trying it, when its posible i will give a try! Sharing content here is a good way to everyone learn about it 👍
@mv-debug commented on GitHub (Nov 9, 2020):
You could use adb to install an app. And you could download apps on some free platforms. Is it allowed to name it here, I will try: https://www.apkmirror.com/apk/instagram/instagram-instagram/instagram-instagram-139-0-0-33-121-release/instagram-139-0-0-33-121-12-android-apk-download/
It is important to use the x86 architecture - if you use docker on amd64 or x86 processor.
I do not have discord, sorry.
@mv-debug commented on GitHub (Nov 9, 2020):
I could write down the steps here - if it okay for you.
@mv-debug commented on GitHub (Nov 9, 2020):
How to:
I could also provide a video if you are interested.
@markbookk commented on GitHub (Nov 9, 2020):
Cool, thanks! I will give it a try and let you know if it worked. I totally forgot I could add the apps via adb.
@future2back commented on GitHub (Nov 9, 2020):
@mv-debug thanks, What OS are you using to run it?
@mv-debug commented on GitHub (Nov 9, 2020):
Hey, I use linux only for development - it is the better platform. But it should also work on windows. If you have got a problem with mac os or windows see: https://github.com/budtmo/docker-android#quick-start
@markbookk commented on GitHub (Nov 9, 2020):
@mv-debug thanks for the help! I used adb install and it worked.
@future2back I also use Linux (Ubuntu) and I can also vouch that it works good.
@mv-debug commented on GitHub (Nov 9, 2020):
I tested it also on a ubuntu machine with 16 cores, with that setup you can run multiple instances of the android simulation (I only test 4 at once). It works like a charm. But it will be nice to implement the login feature.
@markbookk commented on GitHub (Nov 9, 2020):
@mv-debug Nice! Do you use cloud or local hosting?
@mv-debug commented on GitHub (Nov 10, 2020):
I tried in a cloud, but you have got manual steps for setup the environment. At the moment I have got a gitlab-runner on my local machine and let it run every hour. Works like charm.
@future2back commented on GitHub (Nov 10, 2020):
@mv-debug thanks, i will try it here on ubuntu and let you know
@mv-debug commented on GitHub (Nov 10, 2020):
I think I am going to write an script to setup the environment with uiautomator2.
@future2back commented on GitHub (Nov 10, 2020):
Hello @mv-debug and @markbookk after installing docker (step 1) and added my user to docker group , followed step 2 , after acessing http://myip:6080 i can access it and see a page that has a whale Android Docker, could you describe the steps i should follow to make it works? I m new on Docker, i m sorry!
Thanks a lot.
@mv-debug commented on GitHub (Nov 11, 2020):
Try in a console adb devices and check if you see something like this emulator-5554. If yes, you could install the downloaded app via adb install path_to_apk. The use the browser to log in. That's all.
@future2back commented on GitHub (Nov 11, 2020):
Hey @mv-debug thanks for replying, there is no emulator listed on my adb, i runned docker with the same line you listed on step 2! Is it ok?
Thanks
@markbookk commented on GitHub (Nov 11, 2020):
@future2back are you using virtualization for the host OS of Docker?
@future2back commented on GitHub (Nov 11, 2020):
No, I m using ubuntu on a physical computer to run docker.... I tried rebooting my computer, after it
i had to remove
--name android-containerfrom this line:docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1so i started docker image with this line:
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" budtmo/docker-android-x86-8.1is it ok? I m sorry, thanks for for taking your time.
@markbookk commented on GitHub (Nov 11, 2020):
I use this line and it works for me.
Why do you say you had to remove
--name android-container? Any error occurred or anything pops up that you can share?@future2back commented on GitHub (Nov 11, 2020):
heyy @markbookk i had no problem using this line at first time, as the emulator did not appear in the list of devices i restarted the computer, so, do i have to open it again? then if i try
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1i get this error message:
thats why i removed
--name android-containerto "reopen" the image. So i could reopen it but still not appear in the list of devices when i use adb devices@markbookk commented on GitHub (Nov 11, 2020):
That error means that you already have a container running. You can do
docker ps -ato list all containers (not just the ones that are running). More information here: https://docs.docker.com/engine/reference/commandline/ps/You don't have to create a new docker container every time. You just need to start the container you already created with
docker start {name}or in your casedocker start android-container.In regards to the device not showing on
adb devices, I am not sure what the problem may be but it doesn't seem to be a problem with the "docker-android" as it works fine for me. I think your docker container isn't fully running, as you said you only see the "whale android docker" page and you are supposed to be seeing the android emulator.@mv-debug commented on GitHub (Nov 11, 2020):
@future2back Do you see an device under localhost:6080? Something like this.

If you Plug in an real device to the pc, do you see this one via adb? Maybe some udev rules cause problems. Try to use the original ubuntu package (sudo apt install adb), within this package the correct udev rules are rolled out..
@future2back commented on GitHub (Nov 11, 2020):
Thanks for explain me that!
There is no android phone like yours. Thats why i asked if the line on step 2 is correct.
If i right click on it:

Yes i can see device to the pc on using adb.
Any idea? Thanks @markbookk
@mv-debug commented on GitHub (Nov 11, 2020):
What kind of pc or laptop do you have? Sometime a start of an stopped container end in your situation. But a fresh container looks like my pic. Maybe some virtualization setting are not enabled or you do not have enough power for emulation.
@future2back commented on GitHub (Nov 11, 2020):
I m trying it on an old computer, @markbookk is it enought? How can i delete all images and try start again? Is there anyway to show logs of this container to check is there any problem with it?
@mv-debug commented on GitHub (Nov 12, 2020):
I thing this is simply not enough power.
@markbookk commented on GitHub (Nov 12, 2020):
@future2back I think it doesn't have to do with the resources of your computer. If it were the resources, I think it would at least start up and be very slow or give you an error message accordingly. I think it has to do with the virtualization. I suggest looking up online how you can enable virtualization in your BIOS and try that. If that isn't the case, honestly I am not sure how I could help you.
To delete a container or any similar docker related commands, I suggest you just read the same website I had sent previously and search for what you want there. Example, you mentioned you wanted to remove a container so that would be https://docs.docker.com/engine/reference/commandline/rm/ .
@mv-debug commented on GitHub (Nov 12, 2020):
@future2back Maybe you take a look at this site https://2nwiki.2n.cz/pages/viewpage.action?pageId=75202968
@future2back commented on GitHub (Nov 12, 2020):
@mv-debug @markbookk thanks! You both are correct. After enabling virtualization in my BIOS i m able to see the android phone, but seems like that this computer dont have enought resources to run it.
as you can see:
I will try on better computer and let you know! Do you think that is it possible on Macbook or Windows?
For creating different containers do i have to change ports and name? Is there any matrix to this ports or any can be used?
on this line for example:
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1have to change:
-p 6080:6080What ports can be used here?--name android-containerHere any name can be usedthen start the container by
docker start {name}
By the way, what is the gain using the docker instead of an emulator? I see that container resources should be lighter then emulators, but is it very significant? For example, i can run 4 emulators at same time using Windows and ldplayer, memu or any kind of android emulator, but if i start the 5 one my computer get unworkable. If i use the same computer resources but on Ubuntu with containers, could I have more emulators then 4? If yes, could you say in numbers of devices? What are the other benefits of using Insomniac on a container?
Thank you a lot guys!!!
@mv-debug commented on GitHub (Nov 14, 2020):
It depends on your power of the pc. The advantage is you do not have to install anything - except docker. If the login feature is implemented it can be run everywhere.