Page 1 of 1

Question about android development

Posted: Wed Aug 23, 2017 12:25 pm
by unixfreak
EDIT; could someone move this to https://love2d.org/forums/viewforum.php?f=11 ? I just noticed there is a subforum for android stuff. Thanks...


I've just started tinkering with https://love2d.org/wiki/love.touch
In an attempt to write a small module for an on screen controller, so i can try and port some small games i've made to be playable on a touch screen.

I am wondering, is there a way for me to "execute" the love application over USB and run directly on the android device, without having to copy/paste files etc? For instance, i would like to be able to connect a smartphone to the USB on my computer, and run the love game from a terminal, which executes it on the device?

The reason for this, is that it is becoming tedious to keep copy/pasting files to mass storage and then finding the files etc to manually run them, and the touch functions cannot be debugged where no touch device is present.

Re: Question about android development

Posted: Thu Aug 24, 2017 7:40 am
by easy82
I'm sure there are better ways, but you can use Quick Edit to edit lua files on Android, and use File Manager+ and Love2D for Android to run games on the device.

Re: Question about android development

Posted: Thu Aug 24, 2017 5:51 pm
by bartbes
unixfreak wrote: Wed Aug 23, 2017 12:25 pm EDIT; could someone move this to https://love2d.org/forums/viewforum.php?f=11 ? I just noticed there is a subforum for android stuff. Thanks...
That forum is retired, as android is now supported officially.
unixfreak wrote: Wed Aug 23, 2017 12:25 pm I am wondering, is there a way for me to "execute" the love application over USB and run directly on the android device, without having to copy/paste files etc? For instance, i would like to be able to connect a smartphone to the USB on my computer, and run the love game from a terminal, which executes it on the device?
I'm sure this is possible with adb. Both pushing files to the device, and starting applications. See also this page.

Re: Question about android development

Posted: Fri Aug 25, 2017 1:00 am
by alloyed
here is the specific adb command I've used in the past
this isn't nearly as instant as I liked but it worked

Code: Select all

adb push releases/mygame.love /sdcard/
adb shell am start -S -n "org.love2d.android/.GameActivity" -d "file:///sdcard/mygame.love"

Re: Question about android development

Posted: Sat Aug 26, 2017 6:57 pm
by unixfreak
alloyed wrote: Fri Aug 25, 2017 1:00 am here is the specific adb command I've used in the past
this isn't nearly as instant as I liked but it worked

Code: Select all

adb push releases/mygame.love /sdcard/
adb shell am start -S -n "org.love2d.android/.GameActivity" -d "file:///sdcard/mygame.love"
Yeah, i'd guessed adb could be used, do you know if there is a way to get "just" adb on my computer? I run Slackware and looked for some packages, but none are available besides the entire eclipse based IDE and other bloat. I know adb comes with the android SDK but i'd rather have just the one tool on hand on its own, as i'd rather keep it simple.

Possibly i could launch the love application with just an ssh server? Eg; scp it to the android device, and run it that way in a single command?
I'm not too familiar with android to be honest, but that works for computer to computer.

Re: Question about android development

Posted: Sat Aug 26, 2017 8:18 pm
by eliddell
unixfreak wrote: Sat Aug 26, 2017 6:57 pm Yeah, i'd guessed adb could be used, do you know if there is a way to get "just" adb on my computer? I run Slackware and looked for some packages, but none are available besides the entire eclipse based IDE and other bloat. I know adb comes with the android SDK but i'd rather have just the one tool on hand on its own, as i'd rather keep it simple.
adb, fastboot and mkbootimg are packaged together as dev-util/android-tools on my distro (Gentoo). Arch seems to have an equivalent package. I'm not sure about Slackware.

The package's homepage is given as https://android.googlesource.com/platfo ... /core.git/ , but I get the impression you may need some additional files not in that repository to actually get the thing to compile (f2fs, libselinux, something from ext4 utils).

Hopefully that will give you a place to start, anyway . . . although it might be less painful just to let Eclipse sit there taking up disc space.

Re: Question about android development

Posted: Sun Aug 27, 2017 2:41 am
by unixfreak
eliddell wrote: Sat Aug 26, 2017 8:18 pm adb, fastboot and mkbootimg are packaged together as dev-util/android-tools on my distro (Gentoo). Arch seems to have an equivalent package. I'm not sure about Slackware.

The package's homepage is given as https://android.googlesource.com/platfo ... /core.git/ , but I get the impression you may need some additional files not in that repository to actually get the thing to compile (f2fs, libselinux, something from ext4 utils).

Hopefully that will give you a place to start, anyway . . . although it might be less painful just to let Eclipse sit there taking up disc space.
Oh thanks, i completely overlooked "android-tools", thinking adb would be a standalone package named "adb". But yes, there is a build script for that https://slackbuilds.org/repository/14.2 ... oid-tools/

Many thanks! Hopefully this will work as outlined above. :awesome: