mozilla / MozStumbler

Android Stumbler for Mozilla
http://location.services.mozilla.com
Mozilla Public License 2.0
618 stars 212 forks source link

reports aren't deleted #1729

Closed Djfe closed 8 years ago

Djfe commented 9 years ago

is it intended that reports are saved on the sd card? I thought that you said in the past, that you want to save them in the apps folder (to be save from other apps) they aren't even deleted on my tablet (might be SELinux blocking the access?) -> Samsung Galaxy Tab 3 10.1 (android 4.4)

there are 10660 gz files in there :O (on my smartphone there are 16000 files) it's 2,56mb big, but 41,64MB on the device because the files are so small takes quite some time to open such a folder :D

crankycoder commented 9 years ago

Reports should be deleted immediately upon upload into ichnaea. Are you talking about the log files? We don't do any cleanup of those yet, but that's mostly because it's intended as a debugging/developer feature.

On Sat, Oct 10, 2015 at 7:51 PM, Felix Baumann notifications@github.com wrote:

is it intended that reports are saved on the sd card? I thought that you said in the past, that you want to save them in the apps folder (to be save from other apps) they aren't even deleted on my tablet (might be SELinux blocking the access?) -> Samsung Galaxy Tab 3 10.1 (android 4.4)

there are 10660 gz files in there :O (on my smartphone there are 16000 files) it's 2,56mb big, but 41,64MB on the device because the files are so small takes quite some time to open such a folder :D

— Reply to this email directly or view it on GitHub https://github.com/mozilla/MozStumbler/issues/1729.

Djfe commented 9 years ago

doesn't look like a log to me: the content of the file in the .gz archive:

{"items":[{"timestamp":1431681907248,"longitude":6.xxx,"latitude":50.xxx,"accuracy":16,"wifiAccessPoints":[{"signalStrength":-87,"frequency":2437,"macAddress":"xxx"},{"signalStrength":-89,"frequency":2472,"macAddress":"xxx"},{"signalStrength":-92,"frequency":2437,"macAddress":"xxx"},{"signalStrength":-98,"frequency":2412,"macAddress":"xxx"},{"signalStrength":-100,"frequency":2412,"macAddress":"xxx"}],"altitude":214.xxx,"cellTowers":[{"signalStrength":19,"cellId":2xxx,"radioType":"wcdma","mobileNetworkCode":7,"mobileCountryCode":262,"locationAreaCode":3xxxx}]}]}
crankycoder commented 9 years ago

Hmm.. Which directory are you looking at?

Djfe commented 9 years ago

Sorry for the late answer I was looking at the MozStumbler folder on the internal sdcard And you were right Actually the folder is created when I activate the dev setting for saving the scan log But I was thinking it would be the same that is visible in the app itself and not just reports What also left me wondering is that the .gz files are only created after uploading the records

What I don't like is that these files are simply placed on the sdcard Even unencrypted Other apps are able to easily read them

In the past you said you didn't want to implement a feature to export/save reports on the SD card and you wanted to keep the reports in the app's data folder for privacy Doesn't look like that too me

First I think there should be created one log file per run, that mozstumbler continously writes the app's log into And second it would be nice if these logs could be encrypted using a user defined password before saving them on the SD card

What do you need simple .gz reports for They waste space because they are so small and it's only possible to read them all using the commandline

crankycoder commented 8 years ago

Those log files are only enabled as a developer option, otherwise - we only store files in the application's private storage directory.

We don't use one log file per run as the files are too large - larger log files would have a negative impact on uploading to the server on slow mobile connections. Unstable connections and slow connections would suffer.

Encrypting the data with a password might be nice, but this would also break background uploads of the data when Android kills the application and restarts the process. Presumably, the password would be lost and uploads would not happen. I'm also not entirely convinced this adds any particular privacy to the user anyway. Who is stealing this data? Another Android application that knows specifically about the filesystem layout of MozStumbler?

I'm closing this bug as https://github.com/mozilla/MozStumbler/issues/1729#issue-110824130 is "reports not deleted" which is not true when the Stumbler is running in 'normal' conditions without developer options enabled.