Merge pull request #103 from mehrdad-abdoli/master

Update Google Play Store app
This commit is contained in:
Budi Utomo 2018-07-30 17:00:42 +02:00 committed by GitHub
commit d0271e0be0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 7 deletions

View file

@ -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
---------------------
@ -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
View 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

View file

@ -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