Quick answer: The OBB path includes the package name and versionCode. Build it precisely, and handle the case where Play hasn’t downloaded it yet (fresh install) with the downloader library.

An Android game splits assets into an OBB expansion file. On some devices it loads; on others “file not found”. The path was hardcoded with the wrong versionCode, or the OBB wasn’t downloaded.

Build the Path Correctly

String packageName = context.getPackageName();
int versionCode = context.getPackageManager()
    .getPackageInfo(packageName, 0).versionCode;

String obbDir = context.getObbDir().getAbsolutePath();
String mainObb = obbDir + "/main." + versionCode + "." + packageName + ".obb";

The versionCode in the filename must match the installed APK’s versionCode. Hardcoding it breaks on every update.

Fresh Install: OBB May Not Exist Yet

Play Store usually downloads the OBB with the APK, but not always (large files, network conditions). If the file is missing on first launch, use Google’s Downloader Library (APKExpansionPolicy + DownloaderService) to fetch it.

Storage Permission

Older Android versions need READ_EXTERNAL_STORAGE to access the OBB outside the app sandbox. On modern Android, getObbDir() is app-scoped — no permission needed. Target a recent API and use getObbDir().

Prefer App Bundles

For new projects, Android App Bundles with asset packs replace OBBs entirely — Play delivers and manages the packs. Migrate if you can; OBBs are legacy.

Verifying

Install via Play internal testing on multiple devices. OBB loads on all. Update the app (new versionCode); the path adapts and still resolves.

“The OBB path encodes the versionCode. Build it dynamically, and handle the not-yet-downloaded case.”

If you’re still on OBBs, plan a migration to asset packs — Play increasingly favors App Bundles and the OBB flow is fragile.