Hey guys!
Deploying your project to the GearVR can be a tedious process, since it is quite uncomfortable to get the APK on the device.
Either use USB 2.0 or the super slow ADB over Wifi transfer.
I like to share a faster solution for UE4 that allows you to package, deploy, install and launch your UE4 project on the GearVR with just one click.
Cable-Free and never having to remove your phone from the headset.
You just need some basic knowledge of how to normally package and deploy a UE4 project to the GearVR.
What it does
- Build the development APK with the Unreal Build Tool.
- Send the APK over to the device using Windows Command-Line FTP.
- Install the APK using ADB.
- Launch the project using ADB.
What you need
- The batch files from the attached zip file.
- Wifi File Transfer installed on your phone. Get it HERE.
- Your phone connected to your local Wifi.
- Your phones IP adress.
How to start
-
Extract the rar file to your UE4 project folder. It will create a new dir called Deploy.
This is where your APK will later be located. -
Set ADB mode to Wifi by running the RapidDeployment_SetWifi file.
It should show “Connected to xxx” before closing, where xxx is your phones IP.
If it does not, you need to connect your phone via USB once and run it again. -
Go to the Deploy folder, right click the RapidDeployment_Setup file and go to edit.
Here you only need to care about the Basic Settings section and edit it according to your needs.
PROJECTTITLE=GearVrGame
This should be the name of your *.uproject file.
PROJECTURL=com.hegi.GearVrGame
This is the Android Package Name you entered in the Android settings inside the editor(Case sensitive!).
PROJECTDIR="D:\Development"
This is the location of the folder of your project.
DEVICEIP=192.168.178.21
This is the IP adress of your Samsung phone(Shown in the Wifi File Transfer App).
AUTOLAUNCH=0
This is an option for automatically launching the project after installation finished.
For this you need to disable the GearVR service on your phone, so it won’t auto start once you put on the headset.
Check out THIS link on how to disable the service.
If this is 0, you need to press a key inside the command line window, after the build finished and you put on your headset.
UE4PATH="D:\Development\UE4\Unreal Engine"
The path where you installed UE4.
UE4VERSION=4.11
The version of UE4 used for your project.
- If everyhing is set up correctly, you should be able to just start the RapidDeployment_Full file.
Currently i have not added any error handling to the batch files, so if something goes wrong they will just close.
In this case you need to execute the batch files in this order and see wich one fails.
*RapidDeployment_Build
RapidDeployment_SendFile
RapidDeployment_Install
RapidDeployment_Launch
*
- The process will take some time, but it is the fastest way i have found so far.
Let me know if you have any questions or suggestions.
Cheers
Michael