Getting the APK to load onto the SD-Card

Hello all,

I’m very (VERY) new to Android, I’ve been on the iOS side for the last 3 years.

My apk is 600 MB and I know that i have to split it using Floky’s Builder tool to get it on Google play, but right now I just want to get it on the phone to test it out. So, I have not yet implemented the Builder tool, I’ve been searching and here is what I think I need to do.

Edit the AndroidManifest with:

android:installLocation="preferExternal"

So I did that and I placed it in the plugins folder in my project (I have pro)

I also changed the “package=” in the manifest to match my bundle ID in my player settings.

I did all of that and I ran a build, Unity created the apk file. I used the Terminal and adb to install it on the device, it installs for a while then stops with a memory error and a path to internal storage. So it seems even with the preferExternal in the manifest, it’s still trying to install in internal storage.

I’m not sure what I’m doing wrong.

JL

I just tried a build with “Force SD-Card Permission” checked and I’m getting the same error.

So here is the error I’ve been getting

failed to copy ‘The_Infinity_Project_2.apk’ to ‘/data/local/tmp/The_Infinity_Project_2.apk’: No space left on device
rm failed for /data/local/tmp/The_Infinity_Project_2.apk

Anyone know what I’m doing wrong?

Thanks,

JL

It seems like your 600MB .apk is first copied to the device temporary folder and then installed (extracted) from there.
You’ll probably have to free at least 1200MB on your SD card, probably much more.
Unzip the .apk on your computer and see how much it takes unpacked.

Hey,

Thanks for the reply,

The SD-Card is empty, (3.86GB free).

The app is 2.34 GB.

I also noticed the Manifest seems very corrupt.

This won’t help him, as the install routine always copies it first into the internal memory or cache partition before installing it and in most cases the cache partition is 30-50 MB in size, because that’s the max file size for the APK allowed by Google Play.

So I don’t think there is much of a way around this, unless you root your phone and softlink the temp folder a folder on your SD Card (you may even be required to repartition the SD Card with ext3/ext4 file system)

Ok, so I was trying to install the APK on my old HTC Nexus one, not enough internal memory I guess, but I have an HTC Inspire 4G and it installed!

So now I can start testing!

Thanks,
JL