APKs and Expansion Files
You should break large apps into an APK and one or more expansion files to improve both the developer and the user experience. This is in addition to asset files.
This has the following advantages:
For developers
- Apps split into an APK, expansion, and asset files take less time to upload.
- Expansion and asset files are hosted and served from Meta servers.
For users
- It takes less time to download and apply patch updates.
You can supplement your APK file with one expansion file and one or more generic asset files. Generic asset files can be identified as DLC or as required files, which means they will be downloaded at app install time. For more information, see
Asset Files below.
All apps with expansion and asset files must be uploaded with the Oculus Platform Command Line Utility.
Important
If you are familiar with Google Play APK expansion files, be aware that Meta Quest APK expansion file sizes and naming patterns are different.Legacy APK expansion files (OBB)
Legacy APK expansion files must meet the following specifications:
- The expansion file must be in the Opaque Binary Blob (OBB) file format
- Each mobile app is allowed one OBB expansion file up to 4 GB in size.
- To identify the OBB expansion file, the filename of the APK expansion must be
main.versionCode.packageName.obb.
versionCode - the version code of the APK you are uploading with the expansion file. For Unity developers, this is the Bundle Version Code in Player Settings.packageName - the package name of the APK. For example: If you are uploading APK version 3 and your package name is com.meta.example, your expansion file name should be main.3.com.meta.example.obb.
- You must use the
-obb parameter of the command line tool when you upload the app to provide the path to this expansion file.
Updating expansion files and APKs
Expansion files (.obbs) and APKs must be updated together. This means that even if your update contains changes only to the APK or only to the expansion file you must increment the version code for each and upload new versions of them together. The only exception is if you decide to stop providing an expansion file and decide to distribute a single APK. In this scenario, you would upload a new APK but omit the –obb parameter. Expansion files must be uploaded with the command-line utility.
APKs for Multiple Device Types
You can build a single APK that runs on different devices, but be aware of the following:
For Meta Quest, make sure you use supported features only. Your app will be scanned at upload for the following features that are not supported. If these are found, you will be required to update your app:
- You cannot rely on Google Play Services (such as Google Firebase, Google Cloud Messaging, and so on), or third-party libraries that depend on Google Play Services when running on Meta Quest.
- Meta Quest does not have a 2D phone display, and therefore some app behaviors (such as push notifications, or authentication through a separate Android application) can’t be used on it.
- Meta Quest cannot run applications that rely upon access to a camera.
- Meta Quest does not have a touchpad on the headset display. Your app should not refer to an headset display touchpad when running on Meta Quest.
Required assets have the following guidance:
- Required asset files should also be less than 4 GB, but can be any format (including OBB format) and have any name.
- You must use the
--assets_dir parameter of the command line tool when you upload the app to provide the directory that contains the additional expansion files. For more information about required asset files, see Asset Files for Mobile Apps. - If files are required, you must use the
--asset-files-config parameter, and include a JSON config file that marks the asset as required.