I develop Android app, which uses ciphered obb file. This obb file consists of 3 files (I created it with jobb tool). On the most devices all is ok, but on the three devices there is ERROR_COULD_NOT_MOUNT. And I don't understand how to fix it. I want to distribute app without any errors :) Please, help me to do it! :)
That I have tryed: 1) Unmount and mount obb file; 2) Create obb file from the folder without "read-only" attribute. But all of it won't work.
Steps to reproduce the problem (including sample code if appropriate). 1) Create folder, put into it 3 different files. 2) Create obb file from the folder from step 1. 3) Try to mount this file from the app (sample code below).
final File mainFile = new File(Environment.getExternalStorageDirectory() + "/Android/obb/" + packageName + "/" + "main." + versionCode + "." + packageName + ".obb"); OnObbStateChangeListener listener = new OnObbStateChangeListener() { @Override public void onObbStateChange(String path, int state) { super.onObbStateChange(path, state); if (state == OnObbStateChangeListener.MOUNTED) { doNextSteps(); } else if (state == OnObbStateChangeListener.ERROR_COULD_NOT_MOUNT) { Toast.makeText(getApplicationContext(), "ERROR_COULD_NOT_MOUNT", Toast.LENGTH_LONG).show(); } } }; if (!storageManager.isObbMounted(mainFile.getAbsolutePath())) { storageManager.unmountObb(mainFile.getAbsolutePath(), true, listener); storageManager.mountObb(mainFile.getAbsolutePath(), "password_string", listener); } else { doNextSteps(); }
What happened. I have "ERROR_COULD_NOT_MOUNT" error on the following devices: 1) HTC PJ401 One S; 2) Samsung GT-I9505 Galaxy S IV; 3) Samsung SM-N9005 Galaxy Note 3. But on Samsung SM-N900T Galaxy Note 3 and Samsung GT-I9500 Galaxy S IV all is ok.
So, after all my investigations I can say. All I can to do is workaround. And I have created one file from the these 3 files by
copy /B file1+file2+file3 result_file.obb
And then I use this file as non-ciphered obb. After all this manipulations all works well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With