Merge pull request #103 from mehrdad-abdoli/master
Update Google Play Store app
This commit is contained in:
commit
d0271e0be0
33
README.md
33
README.md
|
@ -12,7 +12,7 @@ Docker-Android is a docker image built to be used for everything related to mobi
|
|||
|
||||
<p align="center">
|
||||
<a href="https://youtu.be/pQdpjuYwvp8"><img src="./images/appiumconf2018.png" alt="Appium Conference 2018" width="600"></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
Emulator - Samsung Device | Emulator - Nexus Device | Real Device
|
||||
:---------------------------:|:---------------------------:|:---------------------------:
|
||||
|
@ -144,6 +144,24 @@ There is [example of compose file] to run complete selenium grid and docker-andr
|
|||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
### Google Play Services
|
||||
|
||||
The Google play services (v12.8.74) will be downloaded from [apklinker](https://www.apklinker.com/wp-content/uploads/uploaded_apk/5b51570a214a8/com.google.android.gms_12.8.74-040700-204998136_12874026_MinAPI23_(x86)(nodpi)_apklinker.com.apk) in [utils bash file] file when emulator booted . you can edit [utils bash file] as you need any adb stuffs as the following to disable emulators animation to increase performance:
|
||||
|
||||
adb shell "settings put global window_animation_scale 0.0"
|
||||
adb shell "settings put global transition_animation_scale 0.0"
|
||||
adb shell "settings put global animator_duration_scale 0.0"
|
||||
|
||||
mount it as follow in docker-compose file :
|
||||
|
||||
volumes:
|
||||
- $PWD/videos:/tmp/video
|
||||
- $PWD/src/utils.sh:/root/src/utils.sh
|
||||
|
||||
or when run directly
|
||||
```bash
|
||||
docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -v $PWD/src/utils.sh:/root/src/utils.sh -v $PWD/example/sample_apk:/root/tmp -e DEVICE="Nexus 5" -e APPIUM=true -e CONNECT_TO_GRID=true -e APPIUM_HOST="127.0.0.1" -e APPIUM_PORT=4723 -e SELENIUM_HOST="172.17.0.1" -e SELENIUM_PORT=4444 --name android-container butomo1989/docker-android-x86-8.1
|
||||
```
|
||||
|
||||
Build Android project
|
||||
---------------------
|
||||
|
@ -181,9 +199,9 @@ Genymotion
|
|||
|
||||
![Genymotion](images/logo_genymotion.png)
|
||||
|
||||
Docker-Android supports [Genymotion Cloud].
|
||||
Docker-Android supports [Genymotion Cloud].
|
||||
|
||||
You can easily scale your Appium tests on Genymotion Android virtual devices in the cloud.
|
||||
You can easily scale your Appium tests on Genymotion Android virtual devices in the cloud.
|
||||
Use [device.json] to define the device to start. You can specify the port on which the device will start so you don't need to change the device name in your tests every time you need to run those tests. Then run following command
|
||||
|
||||
```bash
|
||||
|
@ -279,7 +297,7 @@ The following instructions are used for OS X. You'll need [docker-machine-parall
|
|||
```bash
|
||||
$ docker-machine create --driver=parallels prl-dev
|
||||
```
|
||||
|
||||
|
||||
This utility `docker-machine-parallels` will fetch boot2docker.iso to create a vm of VMWare fusion or Parallels Desktop. When the vm is created, you'll see it's booted with VMWare fusion or Parallels Desktop where the network of vm is set to NAT and one IP is assigned. You'll be able to connect to vnc service inside the docker image through that IP. Say it's `10.211.55.3` and we'll use it later.
|
||||
|
||||
3. Setup the virtual machine for nested virtualization support
|
||||
|
@ -290,11 +308,11 @@ The following instructions are used for OS X. You'll need [docker-machine-parall
|
|||
```
|
||||
|
||||
If you use VMWare Fusion, go to menu bar > Vitual Machine > Settings > Processors and Memory, expand Advanced options, and select `Enable hypervisor applications in this virtual machine`.
|
||||
|
||||
|
||||
![Enable nested virtualization for VMWare Fusion](images/vmwarefusion_enable_nested_virtualization.png)
|
||||
|
||||
|
||||
If you use Parallels Desktop, open settings screen of that vm and go to `CPU & Memory` under `hardware` tab, expand Advanced settings and select `Enable nested virtualization`.
|
||||
|
||||
|
||||
![Enable nested virtualization for Parallels Desktop](images/parallels_enable_nested_virtualization.png)
|
||||
|
||||
4. Enable kvm inside virtual machine
|
||||
|
@ -351,6 +369,7 @@ Special Thanks
|
|||
[compose]: <images/compose.png>
|
||||
[line]: <https://github.com/butomo1989/docker-android/blob/master/docker-compose.yml#L70>
|
||||
[example of compose file]: <docker-compose.yml>
|
||||
[utils bash file]: <src/utils.sh>
|
||||
[docker-compose]: <https://docs.docker.com/compose/install/>
|
||||
[1.13.0]: <https://github.com/docker/compose/releases/tag/1.13.0>
|
||||
[Genymotion Cloud]: <https://www.genymotion.com/cloud/>
|
||||
|
|
30
src/utils.sh
Normal file
30
src/utils.sh
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
BOOT ()
|
||||
{
|
||||
A=$(adb wait-for-device shell getprop sys.boot_completed | tr -d '\r')
|
||||
while [[ $A != "1" ]]; do
|
||||
sleep 1;
|
||||
A=$(adb wait-for-device shell getprop sys.boot_completed | tr -d '\r')
|
||||
done;
|
||||
}
|
||||
|
||||
Get_Google_Play_Services ()
|
||||
{
|
||||
wget "https://www.apklinker.com/wp-content/uploads/uploaded_apk/5b51570a214a8/com.google.android.gms_12.8.74-040700-204998136_12874026_MinAPI23_(x86)(nodpi)_apklinker.com.apk"
|
||||
}
|
||||
|
||||
Update_Google_Play_Services ()
|
||||
{
|
||||
adb install -r "$PWD/com.google.android.gms_12.8.74-040700-204998136_12874026_MinAPI23_(x86)(nodpi)_apklinker.com.apk"
|
||||
}
|
||||
Disable_animations ()
|
||||
{
|
||||
# this is for demonstration what other amazing staff can be done here
|
||||
adb shell "settings put global window_animation_scale 0.0"
|
||||
adb shell "settings put global transition_animation_scale 0.0"
|
||||
adb shell "settings put global animator_duration_scale 0.0"
|
||||
}
|
||||
BOOT
|
||||
Get_Google_Play_Services
|
||||
Update_Google_Play_Services
|
||||
Disable_animations
|
|
@ -55,3 +55,10 @@ autorestart=false
|
|||
stdout_logfile=%(ENV_LOG_PATH)s/video-recording.stdout.log
|
||||
stderr_logfile=%(ENV_LOG_PATH)s/video-recording.stderr.log
|
||||
priority=4
|
||||
|
||||
[program:adb-utils]
|
||||
command=./src/utils.sh
|
||||
autorestart=false
|
||||
stdout_logfile=%(ENV_LOG_PATH)s/adb-utils.stdout.log
|
||||
stderr_logfile=%(ENV_LOG_PATH)s/adb-utils.stderr.log
|
||||
priority=5
|
||||
|
|
Loading…
Reference in a new issue