Earlier this year, I began investigating the feasibility of creating an Android port of Yandere Simulator. I have now done enough work on it to provide you with a meaningful description of the obstacles that would have to be overcome before an Android port would be ready for release.
If you’re interested, click “Continue Reading.”
Unfortunately, creating an Android port is not as easy as changing the target platform to Android and clicking “Build.” Here’s the primary problem:
APK File Size Limitations
- The file format used to distribute and install applications on Android devices is called APK.
- Any device that stores data (a hard drive, a USB stick, an SD card, etc) uses a “file system” to manage and organize data. Many devices use a file system called FAT32.
- The size limit for a file that is stored on a FAT32 device is 4 gigabytes.
- Yandere Simulator is over 6 gigabytes.
Creating a single APK that contains all of Yandere Simulator would require significant engineering work, because Yandere Simulator is larger than the maximum file size allowed on some file systems.
“Just ask people to reformat their storage devices using a non-FAT32 file system.”
Many users won’t be willing to do this, aren’t tech-savy enough to do this, or won’t realize that reformatting their storage device means deleting all data on the device, and will get mad at me after they realize that they just deleted all their stuff without backing it up first. It’s not an acceptable answer.
“But, I’ve seen illegal, unauthorized ports of Yandere Simulator that managed to run on Android. If those criminals were able to do it, any can’t you do it?”
Those illegal, unauthorized ports were created using ancient builds of Yandere Simulator that were under 4GB in size.
“Okay, so just port an old version of the game that is under 4GB.”
No. I do not retain the project files for ancient, outdated versions of the game. And, even if I did, I would not want to port an obsolete version of the game. I only want to port the most recent version of the game.
“Just compress the game so that it’s under 4GB.”
I asked ChatGPT for the best compression settings, and followed the instructions I got. I told Unity to make an Android build, and let it run overnight while I slept. I came back 10 hours later and saw this:
10 hours…it ran for 10 hours, and the progress bar barely moved. It took 10 hours to make 52 pixels’ worth of progress, and the progress bar is 492 pixels long. This means that it would take 94.62 hours to complete the operation. Jesus Christ. And I don’t even know if that’ll get the game to under 4GB or not.
“Use the Split Application Binary option to split the game into an APK and OBB!”
Ah, you’re referring to the method of splitting the game into two files: an APK that executes the game, and an “OBB” file that contains all of the game’s data. I gave it a try. Using this method, I was able to make a 50MB APK and a 3.7GB OBB file.
“Whoo hoo! Problem solved, right?”
I fucking wish, dude. This is where a whole new slew of problems began.
After installing the game on an Android device and running it, all I could see was a black screen. Huh? What? Why? Was the game even launching? I added background music and sound effects to the game’s first screen (the “Choose Your Resolution” screen), and made a new APK. When I launched it, I could hear the background music playing, and I could hear sound effects whenever I pressed up/down – this indicated that the game was running and functional in the background, just invisible. But, why? Why would the game be rendering as a black screen? Was it a result of shaders or post-processing effects that were incompatible with Android architecture? I added a debug log output to the screen so that I could watch errors appear, but the only error that appeared was related to a single missing shader that wasn’t even being used in that scene.
I made a new APK that was *just* the Resolution screen in order to get the APK small enough to install on an Android device without need for an OBB file. This time, I was able to see the Resolution screen just fine. Okay, so that makes it seem that the problem has something to do with the act of using the OBB method.
I googled it. Other people had also encountered black screens. Various solutions had been found:
- Update to the latest version of Unity
- Use OpenGLES3 as your graphics API
- Set Target API to level 30
- Click “Mute Other Audio Sources”
- Use .NET Standard 2.1 instead of .NET Framework
I tried each solution. Nothing worked.
Eventually, I discovered some configuration of settings that made the game run so slowly that I could see each individual error appear in the error log, and saw something that seemed noteworthy:
No permission to read external storage. Skipping OBB loading.
Oh! Well, that seems pretty specific! So, the only problem is that I have to get that permission, right?
Well, here’s the problem: I spent an entire day trying to figure out how to do it, and I couldn’t. I made around 2 dozen APK files, each with different configurations, and each time, the game simply refused to believe that it had permission to read OBB files.
“YandereDev, you dummy! You need to add READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions to the AndroidManifest.xml file!”
I tried that, and then the APK stopped working. I could install it, but after installing it, there was no option to run it.
“YandereDev, you dummy! You need to make a window appear that asks the user to grant external storage permissions! The function is called Permission.RequestUserPermission(Permission.ExternalStorageRead)!”
I tried that, but the window never popped up.
I think I might have a clue what is complicating the matter, but I’m not entirely sure. Apparently, Google Play stopped permitting APKs with the “READ_EXTERNAL_STORAGE” and “WRITE_EXTERNAL_STORAGE” permissions starting in Android 11 (API level 30), which was officially released in September 2020. As a result, maybe any APK that is told to read an OBB just won’t work anymore, anytime post-2020.
“Then downgrade the game below API level 30! Use API level 29!”
Didn’t work. Black screen.
I think I’ve reached the end of my rope here. Nothing feels worse than spending an entire day working, but making absolutely zero progress and being completely unable to move forward. All I could think was, “If I had spent this day working on the game like normal, instead of working on this stupid Android port, then I could have made sooooo much progress on the game today…” and that’s a horrible feeling.
I’ve considered making a post that just says, “Help! If you know the solution to this problem, please tell me, so that I can finally make an Android port!” But, the last time I asked the community for help, I only got a bunch of responses like, “Have you tried restarting your computer?” This kind of response reflects a fundamental lack of understanding of the situation. If you don’t know what FAT32 is – if you don’t know how to grant an app external read/write permissions – if you don’t know the difference between Android API levels 29 and 30 – I don’t think you can help.
“Wow, you can’t even make a simple Android port! You’re a shitty programmer! You suck!”
Would you like to have the responsibility of developing an intimate familiarity of absolutely every aspect of this screen, as well as full knowledge of which options should be ticked/unticked, along with a complete understanding of why they should be ticked/unticked?
Cuz, if you’re up for that, then, please, be my guest.
…oh? What’s that? You’re not interested? You wouldn’t even know the first place to begin?
Well, I don’t really know if you have the right to be talking any shit, then.
The Bottom Line
I’m not able to make any further progress on the Android port, and I don’t think I’ll be able to unless I get help from an extremely seasoned Android developer who has ported multiple Android projects over 4GB in size and knows all of the solutions to the problems that I’m facing.
Whenever anyone asks me, “Will you ever port the game to Android?” I’m just going to link them to this post.
In short: Mobile game ports are more complex, frustrating, and time-consuming than you can possibly fathom, and I’d rather focus my time and attention on the main game, instead.