Page 1 of 6

[tool] LoveToAndroid - .love to .apk without thinking

Posted: Sat Jul 11, 2015 7:59 am
by qubodup
Update Aug 2nd, 2016: To put your game on Android, follow the instructions in the following video:


https://youtu.be/TAZo-pin4nE

Backups (public, no need for FB account) at https://www.facebook.com/love2Dengine/p ... 9545637201

You'll need Linux, Mac OS X or Windows and "Start Gamedev" from https://qubodup.itch.io/startgamedev
You have a game.love file and want to play it on Android? Okay. Do this:

1. Download and extract loveToAndroid for Windows, OSX or Linux: from https://archive.org/download/lovetoandroid .
2. Override the game.love in project root.
3. Run the make-apk script.
4. Copy the game.apk file to your phone and install it.

5. (optional) edit the lines starting with a 'sed' command in the make-apk script to find out how to change the app name. App ID might be more complicated. This package is mainly used for workshops where you want to install multiple results next to each other.

Old version quoted below because why not.
1. Download and extract LoveToAndroid-v01.zip (107MB) from Mega, Mediafire or Box.net. If chrome blocks the download because it tries to protect naive uses, press Ctrl + J to open the download manager and check the links under the download, one of them allows you to get the file, against Chrome's better judgement. Alternative: http://superuser.com/questions/387724/
2. Open the folder. And your eyes. This is what you see:
lta-screen.png
lta-screen.png (21.48 KiB) Viewed 27969 times
3. Replace the game.love file with your game.love.
4. OPTIONAL replace icon.png with an 144x144 png image.
5. Start 2_love2apk.bat by clicking it and press a key when it asks you to, to close it.
6. Copy the game.apk file to your phone and install it.

Don't like text? Okay, watch this instead:

http://youtu.be/vfn1nTjPuOY

If you want more details, read the readme file and http://bitbucket.org/MartinFelis/love-android-sdl2/wiki or ask here.

This is for windows users who have trouble following the love-android-sdl2 instructions. And for workshops performed on 3rd party computers without admin rights (for example ESPWS).

Readme (v01):
LoveToAndroid is a collection of tools to make it easy to port your LÖVE game to Android.

Steps:
1. Create zip with your game, rename to "game.love" in this folder
2. Start 2_love2apk.bat - this will create "game.apk"
3. Copy "game.apk" to your Android device and open it in the file browser to install

That is it.

OPTIONAL Steps:
4. Replace icon.png (144x144px png) and run 2_love2apk.bat again.
5. Edit tools\love-android-sdl2\AndroidManifest.xml to change name and other details
6. For your apk to have an own ID, not only edit AndroidManifest.xml but also adjust the folder/file names and file content of
tools\love-android-sdl2\src\love\
tools\love-android-sdl2\src\love\to\
tools\love-android-sdl2\src\love\to\android
tools\love-android-sdl2\src\love\to\android\LtaActivity.java
7. Oh yeah, you might want to create a backup of
tools\love-android-sdl2\
so you can use it for other projects

For more, for now, check love-android-sdl2 wiki for more info or ask in the love2d.org LoveToAndroid forum thread.

Background info:
tools\ant is from https://ant.apache.org/bindownload.cgi ; removed documentation, maybe more
tools\jdk is from http://www.oracle.com/technetwork/java/ ... 80260.html JDK, NOT JRE, NOT JAVA PLATFORM , openjdk didn't work; removed as much as I could without breaking ant debug
tools\android is downloaded with Android SDK Manager https://developer.android.com/sdk/index.html SDK TOOLS ONLY, NOT ANDROID STUDIO; removed as much as possible without breaking ant debug
tools\love-android-sdl2 from https://bitbucket.org/MartinFelis/love-android-sdl2 , self-compiled early 2015

CREDITS
Collected by Iwan Gabovitch http://qubodup.net . Check subdirectories for licenses and credits

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sat Jul 11, 2015 10:11 am
by Nixola
Could you make it ask for the name and other things in the prompt, so that it changes them on the fly and then sets them back to default?

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Jul 15, 2015 4:27 am
by Crossing
Just a stupid question.

Does this bypass having to install sdk, jdk, ndk, ant apache and whatever else?

Havent had wifi in awhile i downloaded love using my phone and transfered it over to my pc. I really have no way of installing stuff.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Jul 15, 2015 5:20 am
by qubodup
Nixola wrote:Could you make it ask for the name and other things in the prompt, so that it changes them on the fly and then sets them back to default?
Yes, although I think allowing to set a new ID, so you can install you apps side by side would be even more interesting. For now you should copy the tools/love-android-sdl2/ folder for backup and edit the AndroidManifest.xml directly.
Crossing wrote:Does this bypass having to install sdk, jdk, ndk, ant apache and whatever else?
Yes, that's the point of this package. JDK, Android SDK and ant are included, NDK is not required, since love is pre-compiled. You have to download the 107MB zip though and unpacking it can take a long while depending on PC specs.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Jul 15, 2015 7:11 pm
by Crossing
Okay great. Ill try it out when i get home.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Jul 15, 2015 7:20 pm
by davisdude
Looks great! Can we have it on GitHub? Chrome won't let me download it :x

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Wed Jul 15, 2015 9:43 pm
by TurtleP
Amazing job! Now if only this could be done with iOS and non-jailbroken devices.. :cool:

https://dl.dropboxusercontent.com/u/976 ... .50.17.png

Just to show the test. I only edited the AndroidManifest.xml file and changed the label strings.

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Fri Jul 17, 2015 12:57 pm
by NickRock
That's really cool! But can I put ads on my app as well?

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Sun Oct 18, 2015 2:27 am
by qubodup
Update: Version 6 is out. It runs on Linux, Mac OS X and Windows (not just Win any more) and it auto-generates time-based app id and name
Crossing wrote:Okay great. Ill try it out when i get home.
Success?
davisdude wrote:Looks great! Can we have it on GitHub? Chrome won't let me download it :x
This is a manually created binary bundle (blob?) so I think that would be disrespectful to GitHub and probably violate their ToS so no. There's ways to make Chrome keep untrusted files. Try Ctrl+J and look for link-style buttons below the download info.
TurtleP wrote:Amazing job!
Glad it was useful!
NickRock wrote:That's really cool! But can I put ads on my app as well?
Seems non-trivial: https://bitbucket.org/MartinFelis/love- ... structions

Re: [tool] LoveToAndroid - .love to .apk without thinking

Posted: Mon Oct 19, 2015 9:03 pm
by SrWoOoW
:awesome: :awesome: :awesome: :awesome: :awesome: its cool but with love 0.9.2 can not be used love.touchpressed :cry: :cry: