Author Topic: Is it possible to tell Aquamail where to save the majority of its data?  (Read 25895 times)

StR

  • Hero Member
  • *****
  • Posts: 1558

I see that currently, about 36 MB of Aquamail's data resides on the internal memory, while about 5.5 MB is on the external card. I looked and couldn't find any configuration option that would allow me to tell Aquamail to use the external card for storage.

From some postings I can guess that what is presently saved on the external card is the attachments (right?). Also from what I know, Android 4.4* imposes some strict limitations on what apps can store/access on the external card. So, I am not sure if with that it would be even possible under Android 4.4+. But it would be nice to be able to use the external storage for data storage, especially on the phones that (1) have relatively small internal storage (8 GB) and do not allow installing apps on the external card (e.g. Droid Razr M).

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #1 on: October 16, 2014, 01:52:23 am »
Um, there is some terminology confusion here.

To an Android developer, Internal Memory is where apps are installed. Most likely not 8 GB, even on very shiny and expensive phones.

In that memory, Aqua only stores metadata and message text.

External Memory aka "memory card" -- as called by Android -- is the "logical" external memory. Used to be a microSD a few years ago, now typically built-in. Logically, it's different, even though it may be a partition on the same memory chip. This is your 8 GB partition. This is where Aqua stores attachments and inline images.

The "real external microSD memory card" -- the third thing -- is not used by Aqua. In theory, I could store attachments and inlines there, even with 4.4 (apps are allowed access to their own directories, even on the "real external microSD"), but there has not been any work for that.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

grumpy

  • Newbie
  • *
  • Posts: 31
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #2 on: October 16, 2014, 10:48:39 am »
Not wishing in any way to contradict our favourite developer (!) but it is of course possible to store attachments on the 'real external microSD memory card' via the 'look and feel/folder for attachments' setting if you're not plagued by the restrictions 4.4 places on you.

Works fine on my 4.3 tablet but won't work on my 4.4 phone which uses the download directory on the 'logical external memory'. Plenty of space there for a few attachments if you do a bit of housekeeping now and again

There are a variety of ways to remove the SD card restrictions under 4.4 involving rooting and patching which seem to work well - just not needed for me on my phone.

EDIT - I lied!. Since I rarely download attachments on my phone I had never tried to set it up to use the real external drive. Just did so and it worked fine, although I had assumed that 4.4 would prevent this. (Moto E, stock Android 4.4.4, unrooted). Any explanation Kostya?
« Last Edit: October 16, 2014, 12:52:12 pm by grumpy »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #3 on: October 18, 2014, 02:21:57 am »
@grumpy -- the 4.4 restriction is 1) hard, that is, no permission will get around it 2) only applies to directories outside the predefined app-specific storage folder.

Those app specific storage folders are under "Android/data", and in Aqua's case (or most any app's) not very useful as storage for user-exposed data.

Same with the "non-external external storage". Aqua stores attachments there as a cache, but they're not intended to be used right there as a user.

Now, when you "save" an attachment in Aqua -- it's detached from said cache, and is moved or copied into the user designated download folder, with a proper name. From that point on, it's under the user's control. And this is what fails on 4.4.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

beaky

  • Full Member
  • ***
  • Posts: 169
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #4 on: October 18, 2014, 09:49:52 pm »
@grumpy -- the 4.4 restriction is 1) hard, that is, no permission will get around it 2) only applies to directories outside the predefined app-specific storage folder.

Those app specific storage folders are under "Android/data", and in Aqua's case (or most any app's) not very useful as storage for user-exposed data.

Same with the "non-external external storage". Aqua stores attachments there as a cache, but they're not intended to be used right there as a user.

Now, when you "save" an attachment in Aqua -- it's detached from said cache, and is moved or copied into the user designated download folder, with a proper name. From that point on, it's under the user's control. And this is what fails on 4.4.
To be clear - are you saying that under 4.4 an app like aqua can be used to save a file to a user designated folder, BUT that folder remains exclusive to aqua mail? So I cannot (say) open the attachment in a suitable application, that also has its own space? I hope I have misunderstood this! It seems fundamental to any email app.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #5 on: October 18, 2014, 10:39:55 pm »
Sorry I probably got tangled up in those complicated English words :)

Let me try again:

- In 4.4, when talking about the "real external microSD that you can remove"

- Apps can read and write to their own per-application data directory under <externalSd>/Android/data/<package name>

- And cannot write anywhere else (IIRC, there are reading restrictions too)

In theory, I could use this per-app directory as the attachment *cache* (currently in the "built-in large storage"), but it's not something intended to be seen by the user...

« Last Edit: October 18, 2014, 10:42:31 pm by Kostya Vasilyev, Aqua Mail »
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #6 on: October 18, 2014, 10:45:35 pm »
Maybe option to save  attachments on removable SD Card could be nice addition.
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #7 on: October 18, 2014, 11:15:09 pm »
In 4.4 (and I presume 5.0), it would only be able to access:

<externalSd>/Android/data/<package name>
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

grumpy

  • Newbie
  • *
  • Posts: 31
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #8 on: October 18, 2014, 11:27:20 pm »
I'm still confused and I'm supposed to be a native English speaker :D

I don't cache attachments during an aquamail refresh/sync but I just did the following
- created a new folder on the external SD card called 'dummy' and set it as the attachments folder in aquamail
- found an email with an attachment, swiped to attachments and hit 'just save'
- navigated to dummy folder and opened the file in Quick Office

No problem at all but isn't this what you are saying should not be possible under 4.4?
Or have I got it completely wrong?

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #9 on: October 18, 2014, 11:40:57 pm »
But I'm not! :)

>> should not be possible under 4.4

Correct.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #10 on: October 19, 2014, 11:24:20 am »
But it can work on ics and jb. On lollipop check this http://developer.android.com/reference/android/provider/DocumentsContract.html#createDocument(android.content.ContentResolver, android.net.Uri, java.lang.String, java.lang.String)
Do you want to use the latest AquaMail version?
Try AquaMail Updater!

StR

  • Hero Member
  • *****
  • Posts: 1558
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #11 on: October 20, 2014, 04:13:13 pm »
Um, there is some terminology confusion here.

To an Android developer, Internal Memory is where apps are installed. Most likely not 8 GB, even on very shiny and expensive phones.

In that memory, Aqua only stores metadata and message text.

External Memory aka "memory card" -- as called by Android -- is the "logical" external memory. Used to be a microSD a few years ago, now typically built-in. Logically, it's different, even though it may be a partition on the same memory chip. This is your 8 GB partition. This is where Aqua stores attachments and inline images.

The "real external microSD memory card" -- the third thing -- is not used by Aqua. In theory, I could store attachments and inlines there, even with 4.4 (apps are allowed access to their own directories, even on the "real external microSD"), but there has not been any work for that.

Thank you, Kostya for the clarification.
It is, indeed, rather confusing.
Please, excuse my ignorance, I am still confused:  if the app (under ics or jb) were to have something stored on microSD, where would that show up in the app info, on the screen like the one in the attachment? Or, will it not show at all?
See the attached screenshot.

Thank you!


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #12 on: October 24, 2014, 01:55:49 am »
I'm confused too.

Believe that "Data" is the smaller portion of built-in memory, which you can't access unless rooted... And "SD card" is the larger portion of built-in memory, where your Download folder is (and others), and which you can access with any file manager.

Neither of the above is the "real MicroSD memory card" (/mnt/ext_sd). Don't know what "USB storage app" is -- on my Galaxy Note 3 with 4.4, I have "SD Card app" and it's zero.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Dmitry_N

  • Newbie
  • *
  • Posts: 24
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #13 on: December 03, 2014, 01:59:21 pm »
What a nice thread, Kostya!
Long time no see ;)
I have a related issue: this folder on the "internal" SD card got cluttered and was taking about 130 MB until I cleared it manually.
Judging by creation dates of the files within this folder (\sdcard\Android\data\org.kman.AquaMail\files\parts\), they were leftovers from emails no longer present either on the server (POP3) or on my device.
Is this supposed to be an issue?

pyler

  • Sr. Member
  • ****
  • Posts: 412
Re: Is it possible to tell Aquamail where to save the majority of its data?
« Reply #14 on: December 03, 2014, 06:29:56 pm »
You can save attachment in any folder on ext sd card using SAF, no? This works on kitkat too
Do you want to use the latest AquaMail version?
Try AquaMail Updater!