MrFluffums
Member
- Dec 23, 2024
- 144
- 371
- 63
Hi all! Figured I'd write an Android porting tutorial.
Tools required:
OpenJDK
Download the appropriate SDK version for your operating system. You have two options: Downloading a .msi (the installer, recommended if you don't know how to set environmental variables) or a .zip file. You need OpenJDK21+.
If you download the installer:
Download and run the msi file. It's recommended to install to C:\vntools\openjdk21\. Make sure to select "modify PATH variable" and "Set JAVA_HOME" (see screenshot).
If you download the zip file, extract the files in the 'jdk-21.0.5+11' folder to C:\vntools\openjdk21\. Make sure to set your JAVA_HOME to C:\vntools\openjdk21\, and include C:\vntools\openjdk21\bin to your PATH.
When you've installed / extracted OpenJDK, run "java -version" in a command prompt to check if Java is installed correctly - it should say something like 'openjdk version "21.0.7"'.
Ren'Py SDK
The Ren'Py SDK is necessary to build Ren'Py games for android. Extract the contents of the self-extracting archive to something like C:\vntools\renpysdk
Game compressor (link)
Necessary as there's a limit of 2GB for Android APKs. Extract it to C:\vntools\ufcompressor or something.
Setting up Android
Start the SDK launcher. Select Tutorial project, click Android. Agree to download RAPT. Click android again, choose "install SDK".
Choose "generate keys". This will generate a set of android keys. Copy android.keystore and bundle.keystore from the tutorial folder (C:\vntools\renpysdk\tutorial) to C:\vntools\androidkeys.
Go to preferences and set projects folder to C:\vntools\visualnovels, then you don't clutter up your Ren'Py SDK folder.
Compressing game
Download the Windows / Linux variant of the game you wish to build. Copy the zip file to C:\vntools\visualnovels\<title of visual novel>, rename it to something like '.<title visual novel>.original.zip', make sure it has a '.' as first character (Ren'Py will ignore files with a filename that starts with a dot, otherwise it'll pack the zip into the APK). Extract the contents of only the game folder to C:\vntools\visualnovels\<title of visual novel>\game. You don't need any of the executables, renpy or lib folder!
Start ultrafast game compressor. Click 'Ren'py, RPGM, kirikiri compressors'. Click 'Compress Ren'Py' after unchecking 'pack unpacked files back to rpa'. It'll try to compress the files. If it fails, delete the game folder, after that reextract the game folder from the original zip, then retry compression but now check 'limit images processing speed'.
Copy android keys from C:\vntools\androidkeys to C:\vntools\visualnovels\<title of visual novel>. Don't worry, Ren'Py won't pack them in your release.
Create an android-icon_foreground.png image of exactly 256px x 256px in C:\vntools\visualnovels\<title of visual novel>, this'll be your icon.
Building Android version
In the SDK, select your project (maybe press refresh if you don't see it.). Press configure, it'll ask about the name of the game. Then it'll ask about a package name, I just use <developer name>.<gamename>. The developer name and game name should be alphanumeric only, no spaces or anything. Other settings can be left to default, most likely.
Then choose 'Build package', and you're done!
I'll add some screenshots later on, but hopefully this is already helpful.
Help! The APK was build, but the game doesn't start
This section is only necessary to do if your APK doesn't work after the last step!
Check if after compression + unpacking there are .rpy files available in the /game folder. If there aren't, you probably have to decompile the .rpyc files back to .rpy. Download unren.rpy from
Then make sure to search the newly decompiled rpy files for any lines containing build.classify and build.archive, and remove them from the scripts.
After that you can try to rebuild your APK and it should work.
Tools required:
OpenJDK
You must be registered to see the links
Download the appropriate SDK version for your operating system. You have two options: Downloading a .msi (the installer, recommended if you don't know how to set environmental variables) or a .zip file. You need OpenJDK21+.
You don't have permission to view the spoiler content.
Log in or register now.
Download and run the msi file. It's recommended to install to C:\vntools\openjdk21\. Make sure to select "modify PATH variable" and "Set JAVA_HOME" (see screenshot).
You don't have permission to view the spoiler content.
Log in or register now.
If you download the zip file, extract the files in the 'jdk-21.0.5+11' folder to C:\vntools\openjdk21\. Make sure to set your JAVA_HOME to C:\vntools\openjdk21\, and include C:\vntools\openjdk21\bin to your PATH.
When you've installed / extracted OpenJDK, run "java -version" in a command prompt to check if Java is installed correctly - it should say something like 'openjdk version "21.0.7"'.
Ren'Py SDK
You must be registered to see the links
The Ren'Py SDK is necessary to build Ren'Py games for android. Extract the contents of the self-extracting archive to something like C:\vntools\renpysdk
Game compressor (link)
Necessary as there's a limit of 2GB for Android APKs. Extract it to C:\vntools\ufcompressor or something.
Setting up Android
Start the SDK launcher. Select Tutorial project, click Android. Agree to download RAPT. Click android again, choose "install SDK".
Choose "generate keys". This will generate a set of android keys. Copy android.keystore and bundle.keystore from the tutorial folder (C:\vntools\renpysdk\tutorial) to C:\vntools\androidkeys.
Go to preferences and set projects folder to C:\vntools\visualnovels, then you don't clutter up your Ren'Py SDK folder.
Compressing game
Download the Windows / Linux variant of the game you wish to build. Copy the zip file to C:\vntools\visualnovels\<title of visual novel>, rename it to something like '.<title visual novel>.original.zip', make sure it has a '.' as first character (Ren'Py will ignore files with a filename that starts with a dot, otherwise it'll pack the zip into the APK). Extract the contents of only the game folder to C:\vntools\visualnovels\<title of visual novel>\game. You don't need any of the executables, renpy or lib folder!
Start ultrafast game compressor. Click 'Ren'py, RPGM, kirikiri compressors'. Click 'Compress Ren'Py' after unchecking 'pack unpacked files back to rpa'. It'll try to compress the files. If it fails, delete the game folder, after that reextract the game folder from the original zip, then retry compression but now check 'limit images processing speed'.
Copy android keys from C:\vntools\androidkeys to C:\vntools\visualnovels\<title of visual novel>. Don't worry, Ren'Py won't pack them in your release.
Create an android-icon_foreground.png image of exactly 256px x 256px in C:\vntools\visualnovels\<title of visual novel>, this'll be your icon.
Building Android version
In the SDK, select your project (maybe press refresh if you don't see it.). Press configure, it'll ask about the name of the game. Then it'll ask about a package name, I just use <developer name>.<gamename>. The developer name and game name should be alphanumeric only, no spaces or anything. Other settings can be left to default, most likely.
Then choose 'Build package', and you're done!
I'll add some screenshots later on, but hopefully this is already helpful.
Help! The APK was build, but the game doesn't start
This section is only necessary to do if your APK doesn't work after the last step!
Check if after compression + unpacking there are .rpy files available in the /game folder. If there aren't, you probably have to decompile the .rpyc files back to .rpy. Download unren.rpy from
You must be registered to see the links
, and run your game to automatically decompile the rpyc files. If you ran your game from the launcher, be advised that un.rpy apparently can create a folder /game in C:\vntools\renpysdk, which will stop renpy
You must be registered to see the links
. You solve this by deleting C:\vntools\renpysdk\game.Then make sure to search the newly decompiled rpy files for any lines containing build.classify and build.archive, and remove them from the scripts.
After that you can try to rebuild your APK and it should work.
Last edited: