# How to access FMOD banks in an install-time asset-pack on Android?

**URL:** <https://qa.fmod.com/t/how-to-access-fmod-banks-in-an-install-time-asset-pack-on-android/20302>\
**Category:** FMOD Engine\
**Tags:** android, csharp\
**Created:** [June 11, 2023, 12:58pm UTC](https://qa.fmod.com/t/how-to-access-fmod-banks-in-an-install-time-asset-pack-on-android/20302 "2023-06-11T12:58:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janne-hmp](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@janne-hmp](https://qa.fmod.com/u/janne-hmp)\
**Post date:** [June 11, 2023, 12:58pm UTC](https://qa.fmod.com/t/how-to-access-fmod-banks-in-an-install-time-asset-pack-on-android/20302/1 "2023-06-11T12:58:17Z")

</div>

Hi,  
I’m working on a game in Xamarin Android (C#) where we have been using FMOD (2.0.9 since this is a bit long-going project, but I think this should not matter). We are trying to access FMOD banks that are part of an Android install-time asset pack (since they are over 150 MB, you need to do this to get them to Google Play). Xamarin Android’s AssetManager.Open finds the banks just fine with `Open("banks/Master.bank")`:

```auto
AssetManager assets = mainActivity.Assets;
Stream s = assets.Open(fullsourcepath)

```

where `fullsourcepath = "banks/Master.bank"`. So I can for example copy the banks to a file, but this takes disk space. But when I call FMOD directly with

`res = _system.loadBankFile(bank_path, LOAD_BANK_FLAGS.NORMAL, out tmpbank);`

where `bank_path = "file:///android_asset/banks/Master.bank"`, I get a file not found error from FMOD.

To my understanding FMOD should supply “banks/Master.bank” to AAssetManager\_open in this case, which is probably exactly the same function call as AssetManager.Open in C#. I think this may have something to do with install-time asset-packs, but I’m not entirely sure, since AssetManager.Open in Xamarin works just fine.

---

<div class="post-metadata">

**Author:** ![janne-hmp](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@janne-hmp](https://qa.fmod.com/u/janne-hmp)\
**Post date:** [June 11, 2023, 6:39pm UTC](https://qa.fmod.com/t/how-to-access-fmod-banks-in-an-install-time-asset-pack-on-android/20302/2 "2023-06-11T18:39:37Z")

</div>

I fact found out the reason: I had forgotten to add `Org.Fmod.FMOD.Init(this);` to MainActitivity.OnCreate. However, it turns out that streaming the voice lines etc. from the assets directory is hopelessly slow (maybe takes a 2-3 sec delay to load) compared to great performance if the banks were saved on disk. I will make another question on this topic.
