2

I would like to know whether it is possible or not. I want to run react native app in aws workspace. Currently when i am trying to run react-native run-android in aws workspace it says it doesn't support simulators since it requires intel hardware to be enabled. And it will not be possible in aws workspace. Just want to know is there any alternative simulators that i can use in aws workspace to run react native app.

I tried using aws amplify but it is for authentication purpose but not for running a react native app in aws windows instance.

Trinu
  • 1,721
  • 3
  • 21
  • 41
  • you can use expo client – varnit Nov 30 '18 at 17:19
  • i that an option ? – varnit Nov 30 '18 at 17:19
  • and if you really want to have a simulator on amazon workspace then try genny motion emulator but it will be slow without hardware accelaration – varnit Nov 30 '18 at 17:20
  • Thanks for the reply varnit. I see that genny motion emulator is just a url opens a emulator. But how do i actually integrate with react native. if i type react native run-android how to open that genny emulator – Trinu Dec 03 '18 at 14:16
  • You can install expo client in genny motion to integrate it with react native – varnit Dec 03 '18 at 14:21
  • in aws machine expo is installed. So if i use genny motion then can i run the expo client in genny motion? How to integrate expo client with aws? – Trinu Dec 03 '18 at 14:25
  • https://docs.expo.io/versions/latest/workflow/development-mode – varnit Dec 03 '18 at 15:01
  • My code is built with react native create react app. It is ejected one. Will that support ? Thanks for the link – Trinu Dec 03 '18 at 15:15
  • https://stackoverflow.com/questions/43833545/converting-existing-react-native-projects-to-expo – varnit Dec 03 '18 at 15:18
  • People tried it – varnit Dec 03 '18 at 15:19
  • i have found this great reference you need to set the path of genny motion https://medium.com/@devmrin/complete-how-to-create-react-native-app-with-genymotion-android-emulator-on-windows-10-in-10-3834fd90b074 – varnit Dec 03 '18 at 16:01
  • Thanks varnit i will look into the link which you shared and will update here. – Trinu Dec 03 '18 at 16:33
  • @varnit i just followed this link https://medium.com/@devmrin/complete-how-to-create-react-native-app-with-genymotion-android-emulator-on-windows-10-in-10-3834fd90b074 in aws. I got the error "Genymotion requires atleast OpenGL2.0 support". Seems in aws open gl doesn't support. Any other way can you suggest? – Trinu Dec 03 '18 at 19:20

1 Answers1

5

As it turns out after a long research let me list out some options you have here to run react native app on an EC2 machine or Amazon workspace.

AWS Device Farms

AWS device farms in a managed service which test your apps against real devices, its the best option if budget is not a problem as AWS device farms is an expensive service (0.17$ per minute) at the time of writing.

AWS Device Farms official page

Genymotion Cloud

Gennymotion cloud is a cheaper alternative to AWS device farms it deploys on amazon ec2 and available on aws marketplace as AMI.

Gennymotion cloud AMI

Rovello Systems

Rovello Systems is owned by Oracle and it supports nested virtualization you can signup in Ravello and then you will be able to run the android emulator in your ec2.

Rovello Systems

Expo Client

Expo Client is the easiest way to test your react native app on android and ios, just install the expo client app and cli and you can test it on the real device at no cost.

Expo client

Remote ADB

Another workaround is to use remote ADB however for this you have to use a rooted android phone, roms like lineage os provide this option as an inbuilt option.

USB Redirect

Last and just another workaround is to redirect USB to EC2 server, many remote desktop clients support to redirect the USB to a remote computer so you can connect the Android device in your local computer and redirect it to ec2 server.

if you know any other method please mention it in comment box I'm open for discussion

varnit
  • 1,859
  • 10
  • 21
  • i subscribed to genymotion cloud pass. I am able to launch emulator in the browser. But i am unable to run react native app in that emulator. Do you know how to configure react native android command to run in the geny motion cloud emulator. – Trinu Dec 10 '18 at 20:44
  • its very easy you need to enable adb on your genny motion emulator and then connect adb through network with adb connect command then you would be able to run your react native projects on emulator for more reference you can follow the below links https://www.genymotion.com/help/cloud-paas/tutorial/enable-disable-adb/ and https://facebook.github.io/react-native/docs/running-on-device – varnit Dec 11 '18 at 14:48
  • Thanks Varnit i could able to run react native apps in genymotion. – Trinu Dec 12 '18 at 15:12
  • I've been searching for this answer the whole day. Thanks! – rsanath May 23 '20 at 16:03