sarvajeet294 / nethack-android

Automatically exported from code.google.com/p/nethack-android
0 stars 0 forks source link

Use of storage space? #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I apologize, this is a highly speculative "issue" - but is it possible that
nethack is using an increasing amount of space on the phone over time, that
is not counted in the "application size"?

I have noticed space disappearing steadily, I _think_ without seeing any
application sizes expanding, and it coincides suspiciously with installing
and running this application. 

I am not yet familiar with how android accounts for space used by
applications, or how an application's use of unixy native code (vs. purely
running in the Java VM) might affect that accounting. But let's just say it
would be surprising to me if their scheme for doing so was working properly
in this case. 

What happens if nethack is just creating a lot of files in /usr/games or
some equivalent? And would they ever be removed, even if the application
was uninstalled?

Then again, apologies in advance, it could just be I have not caught the
correct culprit. 

Original issue reported on code.google.com by davidkwood@gmail.com on 27 Oct 2009 at 4:07

GoogleCodeExporter commented 9 years ago
Perhaps vaguely possible, but definitely not known or expected. It shouldn't be
saving in /usr/games. As far as I know and to the best of my efforts, 
everything will
be saved under /data/data/com.nethackff (with the core game data incl. saves etc
under a subdirectory called nethackdir). While I am myself a bit unclear on 
exactly
how Android measures data usage, I think this would all be considered 
application
data, and from what I can tell, that directory is completely removed if you 
uninstall
the application. I also don't think the application even would be allowed to 
write
somewhere else - even if most of the code is native, it's still running as a 
process
under a UNIX user that is tied to this one application, which I don't think has
permissions to write anywhere else. I'm not 100% sure of this, I'm not sure if 
the
permissions would be any different if you have root access, and I haven't looked
through every single line of the Nethack code to see if there is a path 
hardcoded
somewhere in there, but again, it's definitely not something I believe is 
happening.

Also, when it comes to Android displaying how much space it's using, as far as 
I can
tell, it looks like it correctly includes the size of /data/data/com.nethackff 
when
measuring the size of the application. If I install version 1.1.2 fresh, it 
says 3.02
MB for the application, and 0 for the data. After launching it the first time, 
it
says 3.02+1.57 MB, because it has installed the data files needed by the native 
code,
to /data/data/com.nethackff. After I play it and save, it goes up to something 
like
1.61 MB of data. But, this seems normal and just indicates to me that Android is
summing up the application data correctly. I have been thinking that it would 
make
sense to add a menu option to just wipe out all save games and temporary level 
files
and all that, in case the temporary files accumulate, but really, the result of 
that
wouldn't be any different than re-installing the application.

Anyway, let me know if you find out anything else about this.

Original comment by farnst...@gmail.com on 28 Oct 2009 at 7:33

GoogleCodeExporter commented 9 years ago
It sounds like this would be a difficult problem to have. I was not able to 
come up with 
anything conclusive. This issue should probably be closed. Sorry for the false 
alarm.

Original comment by davidkwood@gmail.com on 12 Nov 2009 at 2:41

GoogleCodeExporter commented 9 years ago
OK, closing. Thanks!

Original comment by farnst...@gmail.com on 12 Nov 2009 at 4:31