love.filesystem does not work on Android 6.0+

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Macsek
Prole
Posts: 11
Joined: Sat May 07, 2016 3:25 pm

love.filesystem does not work on Android 6.0+

Post by Macsek »

Hello everyone!

I'm trying to make an autoupdater for my game to simplify the testing/distribution process for my games. It works quite well on Android 5.0 and below but it doesnt want to work on android 6.0+

here is the bit of code that manages the download/run part:

Code: Select all

 local body, code = http.request("mydomain/game.love")
    if not body then error(code) end
    file = love.filesystem.newFile( "game.love" )
    file:open("w")
    file:write(body)
    file:close()

Code: Select all

love.filesystem.mount('game.love', '')
            package.loaded.main = nil
            package.loaded.conf = nil
            love.conf = nil
            love.init()
            love.load(args)
The download part does not throw an error but when i try to load it the app just resets so i assume there is nothing on the storage.
Does anyone have a similar problem?

Also i cannot open the /data directory in Android to check if there is something in it or not... :x

Thanks in advance. :nyu:
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: love.filesystem does not work on Android 6.0+

Post by zorg »

Macsek wrote: Sun Mar 26, 2017 10:12 am

Code: Select all

 local body, code = http.request("mydomain/game.love")
    if not body then error(code) end
    file = love.filesystem.newFile( "game.love" )
    file:open("w")
    file:write(body)
    file:close()
The download part does not throw an error but when i try to load it the app just resets so i assume there is nothing on the storage.
Does anyone have a similar problem?

Also i cannot open the /data directory in Android to check if there is something in it or not... :x

Thanks in advance. :nyu:
Hi!

Exactly why can't you open the data directory?
If you lack a file manager, then get Total commander for android and look for it with that. (if it works on 6.x, i only have 3.x, 4.x and 5.x droid devices sadly)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Macsek
Prole
Posts: 11
Joined: Sat May 07, 2016 3:25 pm

Re: love.filesystem does not work on Android 6.0+

Post by Macsek »

Ugh after some figthing with android sdk/ndk the fix on the bitbucket worked:

https://bitbucket.org/MartinFelis/love- ... -android-6

I still don't know why i cant see anything in any of love's directories i'm using Amaze File Explorer from F-Droid.
Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 23 guests