Got success in uploading and download the Expansion files Apk external data, Android Expansion
but now I am facing CRC while unzipping my files.
Not getting exactly where the problem is, Google rename my files as .obb
Searching for workaround, if any?
Update
Complete explanation defined here Steps to create APK expansion file
Fixed it, I just skip checking CRC32 algorithm and its working very fine.
I suspect you are having the same problem as this question. In brief, the sample code doesn't work for compressed zip files.
Related
I have opened .apk archive file which shows me the following file:
Androidmanifest.xml
resource.ars
META-INF folder
RES folder
I am not able to get classes.dex. It shows me in zip folder but when I extract it classes.dex disappear after extraction.
No idea how that happened to you, but you can decompile the apk directly into Java source code using a tool called JADX. Just search it for your platform in Google.
I got the solution of my question and posting answer so may be helpful to someone.
Android .apk file which I was using was malware sample. My Antivirus was not allowing extraction of classes.dex, so it was removed by Antivirus automatically after few seconds.
Hi guys I am new to android application. recently I am developing one application.It works well and fine. But my problem is application contains the audio's and sequence images(nearly 10000 images)by the end of the project apk size is 530 MB. how to create the expansion file for that project. i want to upload the project into play store. please guys anyone help me to create how the expansion files are created for that project.
I follow this website http://developer.android.com/google/play/expansion-files.html but I can not under stand properly. please any help me
An expansion file is typically just a zip archive of the things you want to have in it. Use your favorite ZIP tool to generate it.
Your expansion file name format should be : [main|patch]...obb
Gather all your contents inside a folder and rename the folder as per the naming format above and with .zip as extension.
For eg: main.1.com.your.packagename.zip.
Now you can upload this expansion file along with the apk.
It thinks my two expansions files are:
main.3.com.jenny.test.obb (49.7 MB)
patch.2.com.jenny.test.obb (49.7 MB)
But, I only uploaded one .obb file, and it wasn't the one labeled "patch". Additionally, if I try to modify the app at all, I get an error saying it cannot delete the 2nd version because the third version relies on it. I can't modify anything!
Am I correct that this extra "patch" file is wrong? If it is, how do I remove it? I manually increased my version (it was originally doing it for version 2, with a patch of 1), and upload a new file, it doesn't help at all.
My .obb and .apk are being generated through Unity, if that matters.
i got the same error last week. The obb file was added twice.
Since you can't remove the patch file for an apk that is already uploaded, you have to upload a new apk.
I recommend you to increase the build-number of your Project, build the splitted apk+obb again and upload them again to the console.
Be sure to add the new obb as expansion file and that no "patch"-file is selected (since you won't be able to change it later)
I have read all the documentation about APK Expansion for Android.
I have a simple question:
I have an application that is about 5mb of code and has 40mb of assets files. These assets files will be updated in further release of the app, so I have implemented the APK Expansion.
Now, I have to publish the apk and the obb files on the google play console.
Documentation says that "main" must be used for files necessary to run the app, and "patch" for optional files. In my case my assets file are optionals and will be updated togheter with the app apk code change, so what files I need to upload?
The apk and a file zip named main.<expansion-version>.<package-name>.obb ?
The apk and a file zip named patch.<expansion-version>.<package-name>.obb ?
Or the apk and file zip containing both the two files? In this case which name I had to use?
Thanks in advice
You need to upload the apk and the zip with .zip extension. Google play console will convert to .obb format, you don't need to care about it.
My application is over 50MB because I use a lot of MP3 files. I typical do this ...
uri = Uri.parse("android.resource://red.cricket.RecordAlbum/" + R.raw.track_001_64kb );
... but if I have to use APK Expansion file I assume the above line of code has to change. But change to what? Any help is greatly appreciated!
Edit 1)
Thanks for your answer Ted. I did create the expansion file like so:
red#ubuntu:~/android/workspace/Album/res/raw$ zip -n .mp3 main.1.com.redcricket.Album.obb *mp3
So what do I do now? rm -f *mp3; cd ../..; ant clean ; ant debug Somehow I do not think that is going to work. Where do I put the main.1.com.redcricket.Album.obb file?
The steps are pretty clearly laid out in the docs. In outline, the steps are:
Remove the .mp3 files from your .apk and put them in an expansion file. Name the expansion file according to the directions. The format of the file can be anything you want, but the docs suggest that for audio files you use an uncompressed ZIP format. Android includes the APK expansion ZIP library that can be used to load .mp3 files directly from a ZIP file without having to unpack it.
Rewrite the app to look for the expansion file in the location
Context ctx = getContext();
String loc = ctx.getExternalStorageDirectory()
+ "/Android/obb/" + ctx.getPackageName();
Write code so that if the file is not there, your app will download it from Google Play, using the Application Licensing service as described in the docs. There's quite a bit of coding and configuration involved in this step.
Access the .mp3 file(s) you want using the APK expansion ZIP library. The docs have examples of loading an MP3 from an expansion file by calling MediaPlayer.setDataSource() with a file descriptor, an offset into the ZIP file, and a file length.
Also see this thread for more details on how to do all this.