From e45bc0010fe22dde509aacb8ab11ac10b7226882 Mon Sep 17 00:00:00 2001 From: butomo1989 Date: Wed, 29 Aug 2018 13:02:44 +0200 Subject: [PATCH] Enabled adb remotely --- docker/Genymotion | 2 +- genymotion/enable_adb.sh | 2 ++ src/appium.sh | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 genymotion/enable_adb.sh diff --git a/docker/Genymotion b/docker/Genymotion index 47aaea3..f8b4c7e 100644 --- a/docker/Genymotion +++ b/docker/Genymotion @@ -104,7 +104,7 @@ RUN wget -nv -O genymotion.bin "https://dl.genymotion.com/releases/genymotion-${ && chmod +x ./genymotion.bin \ && yes | ./genymotion.bin \ && rm genymotion.bin -COPY genymotion/generate_config.sh genymotion/geny_start.sh /root/ +COPY genymotion/generate_config.sh genymotion/geny_start.sh genymotion/enable_adb.sh /root/ #=================== # Install Terraform diff --git a/genymotion/enable_adb.sh b/genymotion/enable_adb.sh new file mode 100755 index 0000000..ad4bbec --- /dev/null +++ b/genymotion/enable_adb.sh @@ -0,0 +1,2 @@ +#!/system/bin/sh +setprop persist.sys.usb.config adb diff --git a/src/appium.sh b/src/appium.sh index ab6a01d..83ffa52 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -117,6 +117,16 @@ resource "aws_instance" "geny_aws_$index" { Name = "EK-\${data.aws_ami.geny_aws_$index.id}" } count = 1 + + provisioner "remote-exec" { + connection { + type = "ssh" + user = "shell" + private_key = "\${file("~/.ssh/id_rsa")}" + } + + script = "/root/enable_adb.sh" + } } output "image_id_$index" {