Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #33714 > unrolled thread

Who or what is polluting my external SD card?

Started by"Danny D." <dannydiamico@yahoo.com>
First post2016-08-30 18:04 +0200
Last post2016-09-04 19:18 +0200
Articles 7 on this page of 27 — 8 participants

Back to article view | Back to comp.mobile.android


Contents

  Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-08-30 18:04 +0200
    Re: Who or what is polluting my external SD card? Roger Mills <watt.tyler@gmail.com> - 2016-08-30 18:16 +0100
      Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-08-31 03:30 +0000
        Re: Who or what is polluting my external SD card? Roger Mills <watt.tyler@gmail.com> - 2016-08-31 11:08 +0100
          Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-01 03:47 +0000
            Re: Who or what is polluting my external SD card? John B. <slocombjbEDIT@gmail.xyz> - 2016-09-01 14:10 +0700
              Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-01 18:45 +0000
                Re: Who or what is polluting my external SD card? John B. <slocombjbEDIT@gmail.xyz> - 2016-09-02 12:32 +0700
                  Re: Who or what is polluting my external SD card? Piet <www.godfatherof.nl/@opt-in.invalid> - 2016-09-02 09:41 +0200
                    Re: Who or what is polluting my external SD card? John B. <slocombjbEDIT@gmail.xyz> - 2016-09-02 16:13 +0700
                      Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 07:27 +0000
                        Re: Who or what is polluting my external SD card? John B. <slocombjbEDIT@gmail.xyz> - 2016-09-03 15:40 +0700
                          Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 09:42 +0000
                            Re: Who or what is polluting my external SD card? John B. <slocombjbEDIT@gmail.xyz> - 2016-09-04 11:40 +0700
                              Re: Who or what is polluting my external SD card? Piet <www.godfatherof.nl/@opt-in.invalid> - 2016-09-04 14:05 +0200
                              Re: Who or what is polluting my external SD card? tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-01-17 01:57 -0500
                        Re: Who or what is polluting my external SD card? Piet <www.godfatherof.nl/@opt-in.invalid> - 2016-09-03 10:42 +0200
                          Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 09:42 +0000
                    Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 07:27 +0000
                      Re: Who or what is polluting my external SD card? Hergen Lehmann <hlehmann.expires.5-11@snafu.de> - 2016-09-03 10:38 +0200
                        Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 09:42 +0000
                          Re: Who or what is polluting my external SD card? Hergen Lehmann <hlehmann.expires.5-11@snafu.de> - 2016-09-03 13:39 +0200
                  Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 07:27 +0000
                Re: Who or what is polluting my external SD card? Bob Martin <bob.martin@excite.com> - 2016-09-02 07:34 +0100
                  Re: Who or what is polluting my external SD card? "Danny D." <dannydiamico@yahoo.com> - 2016-09-03 07:26 +0000
            Re: Who or what is polluting my external SD card? Hergen Lehmann <hlehmann.expires.5-11@snafu.de> - 2016-09-01 22:04 +0200
    Re: Who or what is polluting my external SD card? Arno Welzel <usenet@arnowelzel.de> - 2016-09-04 19:18 +0200

Page 2 of 2 — ← Prev page 1 [2]


#33821

From"Danny D." <dannydiamico@yahoo.com>
Date2016-09-03 09:42 +0000
Message-ID<nqe5uh$lmb$2@news.mixmin.net>
In reply to#33819
On Sat, 3 Sep 2016 10:38:51 +0200, Hergen Lehmann wrote:

> Actually, Android has such a rule. For each app, there are two dedicated 
> directories (one in internal storage and one on external SD card) 
> reserved for application-internal data.

Except that those two directories pollute the *top* level of the storage
space (whether internal or external). 

Is that correct?

That is, they go into:
 /(internalstorage)/MYAPPNAME1/myappcrap
 /(internalstorage)/MYAPPNAME2/myappcrap
 /(internalstorage)/MYAPPNAME3/myappcrap
and
 /(externalstorage)/MYAPPNAME1/myappcrap
 /(externalstorage)/MYAPPNAME2/myappcrap
 /(externalstorage)/MYAPPNAME3/myappcrap

Instead, they should go into a dedicated directory, just like your words
stated. The name of that dedicated directory could be anything, but here's
an illustrative example:
 /(internalstorage)/appcrap/MYAPPNAME{1,2,3}/myappcrap
 /(externalstorage)/appcrap/MYAPPNAME{1,2,3}/myappcrap

> But then, there's also the directory where user data is supposed to go. 
> Unfortunately, there is no strict definition, what "user data" is. And 
> unfortunately, no one can prevent an app to store something else there, too.

It's a fair statement that it's not always clear what user data is.
For a camera, it's generally pretty clear that photos and videos are user
data, but, for a map app one could argue whether the offline maps and POIs
are user data, while certainly a GPX track is user data.

Also, one could argue whether saved 'settings' are user data.

That's why I would enforce that the *user* defines what is user data.
No app would ever put stuff in the user directory unless the user set the
setting to do that and even then, the actual directory should be wholly
under the users' control.

>> [3 quoted lines suppressed]
> 
> There is such a directory (/data in internal storage, /.android_secure 
> on SD card).

Then why do I have all that crap on my sd card outside of .android_secure?
(note that I have Android 4.3 and I see that you said below that things
changed in Android 4.4)
 
>> [6 quoted lines suppressed]
> 
> This is not always the developer's fault. In early android days, app 
> data storage was *VERY* limited (only a few 100MB in total!), and it 
> still is quite limited on many entry-level phones.
> If a developer wants his app to run on such devices, he has no choice, 
> but to put larger chunks of data into the user data area and especially 
> onto the external SD card. Yes, there is the dedicated directory 
> mentioned above - but this was not available before android 4.4 and 
> there are still too many devices out there running older versions. 
> Again, if the developer wants to reach as many users as possible, he is 
> forced to put larger chunks of data into the user data area.

This is interesting information. Thank you. 

>> [3 quoted lines suppressed]
> 
> This would surely be too much to ask for the average user. He/she just 
> wants to play that damn game app. If that fails because the app does not 
> have enough memory to store its maps and ads, the app and/or phone will 
> be considered broken.

Defaults are fine as long as the user directory is never polluted unless
the user expressly and manually allows it.

[toc] | [prev] | [next] | [standalone]


#33824

FromHergen Lehmann <hlehmann.expires.5-11@snafu.de>
Date2016-09-03 13:39 +0200
Message-ID<bdpq9d-mbu.ln1@hergen.dyndns.org>
In reply to#33821
Am 03.09.2016 um 11:42 schrieb Danny D.:

>> Actually, Android has such a rule. For each app, there are two dedicated
>> directories (one in internal storage and one on external SD card)
>> reserved for application-internal data.
>
> Except that those two directories pollute the *top* level of the storage
> space (whether internal or external).
>
> Is that correct?

No.

> That is, they go into:
>  /(internalstorage)/MYAPPNAME1/myappcrap
>  /(internalstorage)/MYAPPNAME2/myappcrap
>  /(internalstorage)/MYAPPNAME3/myappcrap

The locations proposed by the android API are actually:

/data/data/<appid>/myappcrap
   (for internal app data)

/<internalstorage>/Android/data/<appid>/myappcrap
   (for app data on tablets using the multi-user feature, with 
<internalstorage> actually being located at "/data/media/<userid>" alias 
"/storage/emulated/<userid>" alias "/sdcard").

/<externalstorage>/Android/data/<appid>/myappcrap
   (for app data on external storage)

Apps developed since the 4.4 era should generally stick to that 
structure, otherwise they will get serious problems on multi-user 
devices and when trying to access the external storage.

> Instead, they should go into a dedicated directory, just like your words
> stated. The name of that dedicated directory could be anything, but here's
> an illustrative example:
>  /(internalstorage)/appcrap/MYAPPNAME{1,2,3}/myappcrap
>  /(externalstorage)/appcrap/MYAPPNAME{1,2,3}/myappcrap

That's exactly, what google proposes. :-P

> It's a fair statement that it's not always clear what user data is.
> For a camera, it's generally pretty clear that photos and videos are user
> data, but, for a map app one could argue whether the offline maps and POIs
> are user data, while certainly a GPX track is user data.
>
> Also, one could argue whether saved 'settings' are user data.

Exactly.

> That's why I would enforce that the *user* defines what is user data.

Again, this would certainly be too much to ask of the average user. Most 
users are not even capable of deciding, whether a game should have 
access to their personal data. The just say "yes" to everything, that 
cool app asks for.

> Then why do I have all that crap on my sd card outside of .android_secure?
> (note that I have Android 4.3 and I see that you said below that things
> changed in Android 4.4)

This may be part of the reason. Things get cleaner on newer versions, at 
least for external storage. Unfortunately, there is still nothing that 
enforces the developers to stick to the conventions on internal storage.

Hergen

[toc] | [prev] | [next] | [standalone]


#33803

From"Danny D." <dannydiamico@yahoo.com>
Date2016-09-03 07:27 +0000
Message-ID<nqdu0g$7c3$6@news.mixmin.net>
In reply to#33756
On Fri, 02 Sep 2016 12:32:30 +0700, John B. wrote:

>>So, while I don't dispute what you said, something is *creating* these
>>folders, and, in effect, "polluting" my SD card.
> 
> As I said, a normal part of the file system :-)
> the file system.

If I had another life to live, I would have asked god to put me in charge
of designing the filesystem structure of Microsoft, Linux, and Android
devices, at the time they were being developed.

For Android, I would have designated a *single* directory (much like
Microsoft tries to do with C:\Windows - but fails overall in doing) where
all the file-system crap would go.

So, if there *must* be a directory on Android, it would be alphabetically
low (so it sorts as last) and hidden most of the time.

Dunno what I'd call it, but something like ".!android" or whatever sorts
low on the list and is hidden. 

Then I'd make a rule that *everything* that is autogenerated by the OS must
go there, so that the user only has to deal with one idiotic directory.
 
> What do you gain by that? An empty file or directory occupies only a
> few bytes and you say that if deleted they reappear in an hour. It
> sounds like an exercise in futility :-)

I'm looking at it from the standpoint of putting files and directories at
the top level - which - because of the indeterminant pollutants - I can't
do because I can never be sure if I created the file or directory by a
program that I care about, or if Android did.

You are not looking at it as a litter pollutant.
To you, it's not an eyesore, and, to you, sorting out what is litter and
what is valuable isn't a problem.

I understand that.

You are looking at it as just an empty directory (just like the makers of
Windows looked at
c:\{boot.ini,boot.bak,cmldr,config.sys,io.sys,msdos.sys,ntdetect.com,ntldr}
as just a bunch of small files.

But "I" look at it as pollutants of my root directory.
Why on earth couldn't they stick those files in a single directory?

Worse - on Windows for example, your START menu is polluted by every
program you install. So you're forced to create your own menu, which works
perfectly since nothing pollutes it - but that also makes the initial start
menu useless.

The rule should have been, IMHO, from the start, to prevent that. I can
think of a few ways but the vast majority of people are too stupid to
prevent the mess. So they can no longer find anything in their start menu
even though a start menu is a FANTASTIC way to run programs if it's
unpolluted. (My start menu, for example, is perfect.)

Even worse, the Documents and Settings hierarchy is so filled with
pollutants that it's basically almost useless to the user, as a top-level
directory. That's bad for backup purposes and for organizational purposes.

Anyway, Android went the same way as Windows. Same concept of polluting
*everything* it touches, including the SD card (which really, should have
nothing to do, per se, with Android polluting it).

I'm ok with a single point of pollution if they must pollute an SD card.

>>I have been doing similarly on Windows for decades, where I create a data
>>directory and put everything I want in there. That way, I can completely
>>delete the contents of Documents and Settings and I lose zero data that I
>>care about.
>>
>>It's amazing to me how terrible operating system developers are at
>>organizing file systems.
> 
> Quite the contrary. They are very good at organizing file systems...
> to fit their needs or notions. The fact that you do not agree doesn't
> make it a bad file system.

I understand your point that, to you, Android littering files and
directories willy nilly all over both the internal and external storage is
"organized" by "their" (horrid) standards.

To me, if they really were "organized", they'd put all their litter in a
single directory, instead of polluting everything everywhere. I'm sure
you've perused the Android file system on the internal sd storage, and you
must be aghast (as I am) at the utter incomprhensible mess that Android
does to the file system.

AM I not right?

I mean, look at slash (/) in the Android file system!
It's a royal mess.
Worse than Windows. 
Even worse than Linux (which at least *tried* to be organized!).

Nothing follows any rules.
It should be so simple that anyone can figure it out.

/apps/(all apps *must* install their pollution here)
/data/ (all apps must store their user-saved data here!)
NOTE: User-saved data is not the same as app-pollution data!
(Most app developers can't fathom that there is a distinction!)
/android/ (all android OS crap goes here)

[toc] | [prev] | [next] | [standalone]


#33757

FromBob Martin <bob.martin@excite.com>
Date2016-09-02 07:34 +0100
Message-ID<e2sks0Fa25hU1@mid.individual.net>
In reply to#33745
in 33947 20160901 194508 "Danny D." <dannydiamico@yahoo.com> wrote:
>On Thu, 01 Sep 2016 14:10:03 +0700, John B. wrote:
>
>> LOST.DIR directory appears to be a normal part of he Android file
>> system and is added at the time the card is formatted.
>>
>> The Android directory also seems to be a normal part of the file
>> system also. At least it appears after formatting the SD card on an
>> Android 5.0.1 phone.
>>
>> The ".android_secure" is, I believe the folder/directory where apps
>> that are "Moved to SD Card" are stored.
>
>I don't doubt anything you said, but I deleted everything but my data
>folder, and within an hour, these additional folders were created, so, it's
>not just created at the time of format.
>
>I don't have any apps "moved to sd card" either.
>
>So, while I don't dispute what you said, something is *creating* these
>folders, and, in effect, "polluting" my SD card.
>
>The lesson here is that pollution will occur, so, it makes no sense to put
>stuff at the top level of the SD card. So I'll stick everything under data
>and then delete periodically all the other top-level folders other than
>data.
>
>I have been doing similarly on Windows for decades, where I create a data
>directory and put everything I want in there. That way, I can completely
>delete the contents of Documents and Settings and I lose zero data that I
>care about.
>
>It's amazing to me how terrible operating system developers are at
>organizing file systems.

That's an incredibly arrogant and conceited attitude. 

[toc] | [prev] | [next] | [standalone]


#33800

From"Danny D." <dannydiamico@yahoo.com>
Date2016-09-03 07:26 +0000
Message-ID<nqdtvo$7c3$3@news.mixmin.net>
In reply to#33757
On Fri, 02 Sep 2016 07:34:40 BST, Bob Martin wrote:

>>It's amazing to me how terrible operating system developers are at
>>organizing file systems.
> 
> That's an incredibly arrogant and conceited attitude.

I know far too much about organizing data to be respectful of the
absolutely sophomoric attitude most developers have toward a clean file
system hierarchy.

If you want, I'll post pictures of my Windows setup, but rest assured, it's
ORGANIZED.

I only maintain a single desktop screen on Android, and rest assured, it's
probably the most well organized desktop of anyone in this thread.

In fact, I'd wager it's better organized conceptionally than 99 percent of
the people on earth who "claim" to have their desktop organized.

I can explain exactly why everything is where it is as they *all* follow a
similar pattern (and I have hundreds of apps - none of which are more than
a click or two away).

I save *all* the data I want in a well-organized data hierarchy and I use a
file redirector to make up for the sheer and utter stupidity of most app
developers when it comes to allowing the user to put data where it belongs.

Nothing whatsoever is ever organized by brand name.
Everything is organized by what the data does.

I have worked in the software industry for three decades. 
While app developers are smart, one thing they are NOT is well organized as
a whole and as a team. They put their crap EVERYWHERE. 

They don't care.
Just like you don't seem to care nor did most of the respondents above seem
to care how things are organized, app developers are even worse organized
than you are.

And that's the problem.
It's not arrogance you see in me; it's knowledge.

I know they don't care one whit about adhering to a well-organized file
system.

And I lament that obvious fact. 
The proof is in the taste of the pudding.
Just *look* at the horrid mess that is the Android file system in practice!

[toc] | [prev] | [next] | [standalone]


#33748

FromHergen Lehmann <hlehmann.expires.5-11@snafu.de>
Date2016-09-01 22:04 +0200
Message-ID<s7em9d-v7m.ln1@hergen.dyndns.org>
In reply to#33736
Am 01.09.2016 um 05:47 schrieb Danny D.:

> I do live with it, and I can use a file redirector to move everything to a
> junk directory but I was just trying to figure out WHY and WHO was
> polluting my SD card.
>
> Currently these are the pollutants:
> 1. LOST.DIR

This is part of the file system. If the file system stored on the card 
gets damaged (for example due to a system crash), the device is supposed 
to move recovered files into LOST.DIR during bootup.

> 2. Android

Starting with Android 4.4, write access to the SD card was restricted to 
one dedicated directory for each application. These directories reside 
below the "Android" folder.
Some Apps may store important data here, do not delete! You can easily 
identify the culprit, because each subdirectory below Android is named 
the same as the app id.

> 3. .android_secure

This is somehow used, when an App is "moved" to the SD card, but i don't 
know the details.
If Android fails to mount an SD card, a corrupted .android_secure folder 
is frequently the cause and deleting the folder may repair the card.

Hergen

[toc] | [prev] | [next] | [standalone]


#33848

FromArno Welzel <usenet@arnowelzel.de>
Date2016-09-04 19:18 +0200
Message-ID<e711b341-6239-27cf-de6a-07d136d8fd73@arnowelzel.de>
In reply to#33714
Danny D. schrieb am 2016-08-30 um 18:04:

> I have a files directory on my SD card where I put everything but something
> is polluting the top level of my sd card with junk.

Why you call it "junk"? Just because you don't want it?

> I just deleted about twenty folders and what first came back were these.
> 
> 1. .android_secure (an empty folder)

.android_secure folder contains files of the apps which you moved to SD
card.

> 2. Android (contains a folder named data)
> 4. Android/data (contains three folders)

Similar to .android_secure, also contains data of apps which use the SD
card.

> a. com.google.android.music/files/._playmusicid
> b.
> com.mapfactor.navigator/files/navigator/log/notifications_(number_date).log.txt
> c. com.samsung.music/cache/

Ask the creators of the Apps (Google Music, Mapfactor Navigator).

> 3. LOST.DIR 

Linux standard folder for the results of file system checks in case the
card wasn't properly unmounted before removing it from the slot or when
the system crashed without unmounting the file systems first.

> The odd thing is that I never even ran those apps nor do I use the external
> SD card for anything other than storing some files. So WHO or WHAT is
> creating all that trash on my SD card?
> 
> Why can't it put all that trash on the internal memory?

Because the system isn't designed that way. Live with it. I wouldn't
bother as long as the system works without any errors.


-- 
Arno Welzel
https://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.mobile.android


csiph-web