How can I deploy my game to Android?

Hi,
I’m wondering how I can deploy my game to Android directly from Unreal Editor 4?
I’ve tried both with my Samsung Galaxy S4 (Kies) and HTC One X, none of them appear in Device Manager.
It is possible to manually add an Android device in Device Manager, but how can I know what identifier to type in, and what chances would it have to work?

I want to make sure what kind of markets are available for my game in early stage.

I can also mention that I’ve set ANT_HOME, ANDROID_HOME, JAVA_HOME, ANDROID_NDK_ROOT. Have installed both the SDK and the NDK.

I could solve this by installing the TADP found in folder /Engine/Extras/Android after forking the source from github.
Just to be sure, I also build from code and used Unreal Editor from there. Used File → Package project → Android. When build finished, I went to the folder and ran the batch file. Successfully deployed to Android (Samsung Galaxy S4).

Oh, and I used the Mobile template starter project. Took some time to bake because I didn’t choose a specific texture compression format though.

hi,do you have the file ue4game-armv7.apk ue4game-armv7.so in Binaries/Android?

Yes, also UE4Game-Android-Shipping-armv7.apk and .so.

my obb file is 2gb. any idea why this is so big?

I got Mobile Temple (demo project) and created android package.
My obb file is about 750MB which is freaking large considering its only tiny map . Have you tried running your project on android device? I used the batch file to put it on my nexus 7 (first gen) and it crashes.

My obb file is about 600-700 MB. Check if you haven’t accidently put or forgot assets / resources in the Content folder. Use the file system. Normally obb files can be extracted using the jobb tool in Android SDK. However, I haven’t managed to do that with UE4 created obbs.

That size seem about right. I managed to make it work on my Samsung Galaxy S4. FPS was pretty low, but it worked and looked correct. I guess your device could be too slow. I think it might be possible to disable some functions by using flags, when building, and also choosing a texture compression format that fits well with your device. I believe ETC1 is the most compatible one.

If you include the StarterContent in your project, it will bloat the content a lot. Currently, when you Package a build, it will put ALL content from your project into the .obb. We are planning to allow for selecting only some maps when you package, which will then only put the assets required for those maps into the .obb.

If you have code tho, and you load assets by string name, you will have to do some extra work to tell the cooker program about those assets.

Anyway, either start over with a clean project, or go into your Content directory and start deleting :slight_smile:

BTW, the .obb file is actually just a renamed .pak file (UE4’s “virtual file system”, which is a bunch of jammed together files).

You can use UnrealPak tool (in Engine\Binaries\Win64) to list the contents:

UnrealPak -test

Hope this helps!
Josh

Thanks BlackDragon I will try that.

Thanks Josh,
-test works,

but that doesn’t allow me to remove any content then pak it again.

How can I

  1. unpak obb file into folders and files
  2. pak files into obb file (or just .pak)

Thanks!

I have the android sdk already installed on my computer. I am using it with Unity 4.3.4 and it works. Is there anyway to point UE4 to it?

The UnrealPak tool doesn’t have an unpak function. Probably wouldn’t be hard to add one tho. But it’s not the expected use case, we expect .pak files to just be created over and over, and just be the output build product.

Do you want to do that simply to make the final .obb file smaller?

UE4 wants to have 4 environment variables set. They are listed in the docs:

Yes. I had a lot of trouble just to get simple app running on my android phone/tablet so I am thinking of coming back to it in few months when it is more polished. Thanks Josh!

  1. I don’t know which texture compression I am supposed to use.
  2. I used Mobile Temple to create apk, obb file, deployed to my android tablet(nexus 7 1st gen), and the app crashed instantly. I tried this with different texture compression, no luck. I also followed tutorial to create small officeroom with automatic glassdoor, and that crashed also.
  3. cooking takes way~~ too long, on my computer it takes at least 2 hours if start from clean. (Took me a long time to find advanced cooking option to not clean every time you cook)

I tried this few weeks ago so I believe it was 4.0.1

Independent of too much data, what other problems are you having? We expect it to work, even if it’s not fully optimized :slight_smile:

  1. Four finger tap on your device, it tells you what your device supports. ETC1 is always safe. In 4.1, the editor will detect the formats supported on your device for the Launch menu (pretty sure that feature made it in in time for 4.1)
  2. You need logs. “adb logcat -s UE4 -s Debug” on the commandline will help, and there are also some GUI tools to get the logging data.
  3. How are you cooking? Even a clean cook shouldn’t be long, since we cache the slow parts (the texture compression, etc). So it should be a matter of opening and saving packages. Also, we shipped with the DerivedDataCache for some texture formats. If you cook for Android, it will take a long time the first time because it is compressing ALL texture formats.

Hey everyone,

We wanted to provide some updated information on Android development/deployment for this question.

To start with, if you are reading this question and have yet to start developing for Android here is everything that you will need to know about prerequisites that need to be installed to be able to package and deploy with UE4/Android:

Setting Up Unreal Engine Projects for Android Development | Unreal Engine 5.3 Documentation

For packaging your project for deployment, check out the following:

Packaging Unreal Engine Projects | Unreal Engine 5.3 Documentation

Finally, to Launch/Deploy to your device, check out the following:

Launching Unreal Engine Projects on Devices | Unreal Engine 5.3 Documentation

We will continue to update our documentation for the Android workflow to provide the best experience possible. If you have any feedback for the Android workflow, please let us know here:

https://forums.unrealengine.com/forumdisplay.php?24-Feedback-for-Epic

Thanks!

-Steve

Hi, I am a bit confused about Android. You are saying that obb file is like a pak file for windows, so I assume all the content folders are stored inside. Is there anyway I can include a bunch of third party files as loss files? The non-assets content to copy/package did not work. Thanks