Question about android development

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
unixfreak
Citizen
Posts: 82
Joined: Thu Oct 15, 2015 6:25 am
Location: Bristol, UK
Contact:

Question about android development

Post 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.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Question about android development

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Question about android development

Post 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.
alloyed
Citizen
Posts: 80
Joined: Thu May 28, 2015 8:45 pm
Contact:

Re: Question about android development

Post 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"
User avatar
unixfreak
Citizen
Posts: 82
Joined: Thu Oct 15, 2015 6:25 am
Location: Bristol, UK
Contact:

Re: Question about android development

Post 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.
eliddell
Prole
Posts: 20
Joined: Sat Dec 10, 2016 6:38 pm

Re: Question about android development

Post 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.
User avatar
unixfreak
Citizen
Posts: 82
Joined: Thu Oct 15, 2015 6:25 am
Location: Bristol, UK
Contact:

Re: Question about android development

Post 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:
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests