Does Google's new policy affect games with OBB file?

I’ve got an email today and Google says they’re going to update their policy. One of the changes made me wondered. MANAGE_EXTERNAL_STORAGE permission.

In order to get OBB file work on Android, Read and Write permissions must be added in the manifest. I was wondering if they are the same as MANAGE_EXTERNAL_STORAGE? If so, what should I do in order to OBB file works with my game?

1 Like

I have the same concern.

According to the list of permitted uses, Google did not mention anything on APKs larger than 100MB but there is an exception if Storage Access Framework and MediaStore API are not applicable for the app.

The developer must justify in their Console declaration why the Storage Access Framework or MediaStore API is not sufficient for their app’s purpose.

Source:
https://support.google.com/googleplay/android-developer/answer/10467955#zippy=,permitted-uses-of-the-all-files-access-permission,exceptions

My game is about 200MB large and the obb file is stored separately which had been functioning as it should only when the permission is given.

Can anyone please point out what are the Unity solutions to this matter?
Are there any Storage Access Framework or MediaStore API plugin available for the purpose of accessing OBB?

My game received a lot of 1 star reviews just because of asking file storage permission, I would gladly implement any alternatives just to read that OBB file!

I was under impression that you can always read from app’s own folders, e.g. getExternalFilesDir

Keep in mind that Google Play will stop accepting APKs entirely after August 2021. You’ll be forced to use App Bundles (About Android App Bundles  |  Android Developers) and Asset Delivery for games larger than 150MB (Android Developers).

Also, Asset Delivery only works with asset bundles. Unity does not support splitting the player content into Asset Delivery packages like it does with OBBs.

I’m not an android expert, can you share how this is done in Unity? I don’t think I have spefically wrote any code to how the obb file is read, but if I split the app, by default the permission will be requested.

Thank you so much for sharing this info. Can you share how are Unity made games currently utilizing Asset Delivery? As in a plugin? or does it involve exporting to Android Studio?

EDIT: Nevermind! I’ve only just started to read the link:
https://developer.android.com/guide/app-bundle/asset-delivery/build-unity
Thanks!

1 Like

I’m still confused about this. Is WRITE_EXTERNAL permission same as MANAGE_EXTERNAL? One of the line in the link says:

There is no security enforced with these files. For example, any application holding Manifest.permission.WRITE_EXTERNAL_STORAGE can write to these files.

Does it mean I don’t have to do anything? Because OBB works with WRITE_EXTERNAL and READ_EXTERNAL permissions. Are they same as MANAGE_EXTERNAL or not?

@LandonC

My game is built on Addressable system. So, I’m just going to update my game until that date and then wait for a solution from Unity. The new policy however will start on May 2021. I was wondering how it will affect the current OBB file system.

Yeah, but there are so many Android versions where this behavior is buggy, so everyone asks for permissions to work around it.

I’m sure it will be a fun 3 years.

@LandonC @AcidArrow

According to this website (Manifest.permission  |  Android Developers), they are not same. So, I guess, we don’t have to do anything about it.

MANAGE_EXTERNAL:

Allows an application a broad access to external storage in scoped storage.

WRITE_EXTERNAL:

Allows an application to write to external storage.

The Google’s new policy is about MANAGE_EXTERNAL and it also says that READ_EXTERNAL is not included.

1 Like

I don’t think, they can wait that long… can’t they? Because this new system forces us to use the old Unity’s system, which is Asset Bundles.

Addressables is just an asset bundle manager, so you are already using bundles.

Asset bundles is the only way Unity has to load assets that were not packaged directly with the player resources. The Adressables system generates asset bundles and loads them at runtime.

Wait, so is there a way to use Play Asset Delivery with Addressable? I haven’t heard anything from Unity about it. If so, how?

Ah, I get what you mean. You have to call PlayAssetDelivery.RetrieveAssetBundleAsync(bundleName) to get at to your bundle, and I don’t know if Addressables has that kind of support built in. You could probably make it work with a custom provider which wraps around the PlayAssetDelivery code.

– EDIT–
Here’s a post showing how to do exactly that:
https://discussions.unity.com/t/794402/7

2 Likes

Thanks for checking! I’ll mention this to Google in my email to get their say about it.
Google can be ambiguous yet harsh on their decisions.

1 Like

Could you share their response here? I wonder what they will say.

Certainly! Hoping it won’t take them 30 days to reply.

Good news! Google has replied and they have confirmed that MANAGE_EXTERNAL_STORAGE is not READ_EXTERNAL_STORAGE, and we can continue to use that permission for OBB file access. However, it is good to switch to Asset Delivery to comply with the August changes, thanks to KokkuHub for mentioning.

The email contains the following message.

@Paulx774

1 Like