HTC Mail Memory Leak/Bug ("Phone Storage Getting Low")

evoVoyager

New member
Jan 17, 2012
3
0
0
Visit site
I've just rooted and am trying to locate the mail data file, as referenced, but am not seeing:

data> >data>com.htc.android.mail>app_mail_temp

I've run a search using SuperManager for: com.htc.android.mail and app_mail_temp and neither turned up.

Of course, my mail is still consuming upwards of 60MB of space and deleting these files is the reason I rooted.

Thoughts?

My root level includes:
/acct
/app-cache
/dev
/etc
/mnt
/proc
/sys
/system
/bootcomplete.rc
/bootcomplete.supersonic.rc
/cwkeys
/default.prop
/shutdown.supersonic.rc
/uventd.goldfish.rc
/uventd.rc
/uventd.supersonic.rc
 

evoVoyager

New member
Jan 17, 2012
3
0
0
Visit site
OK. I've gotten the above sorted out..

I added a terminal emulator and not until switching users to root by executing 'SU' could I see the appropriate directories...

===
su
#
cd /data/data/com.htc.android.mail/app_mail
ls
rm -r ./*
===

This dropped my Mail app down to 11MB from 55MB.
I've deleted all the mail accounts.
Curious, how can I reclaim the remaining 11MB

I've installed K9 mail and configured.
 

evoVoyager

New member
Jan 17, 2012
3
0
0
Visit site
Think I've found the remaining files to houseclean... they seem to be in /data/data/com.htc.android.mail/databases however, I'm not certain if I can safely delete these files or if doing would result in the HTC Mail app not functioning _IF_ if decided to use it in the future.

webviewCache.db
webviewCache.db-shm
webview.db-wal
webviewCache.db-wal
webview.db-shm
mail.db
mail.db-wal
webview.db
mail.db-shm

Can anyone confirm if these database files are specific to mail accounts and get recreated or if they are required files that should not be deleted?

Of course, any explanation of these files is also good knowledge to share!!
 

PolynesianMedic

Well-known member
Jul 4, 2010
84
2
0
Visit site
evoVoyager, how would you explain getting these error messages on a rooted phone running both CM7 nightly 258 and now Condemned CM7 V10. This is Android 2.3.7, if you are not aware. Then I deleted the native Mail apk and MMS apk, yet still these messages occur. I am using Gmail, and GO SMS as my mail and messaging apps.
 

OwnerJFA

Member
Jun 17, 2010
24
0
0
Visit site
I'm having this problem all the time. I use an app, the low memory warning comes on, I spend 15 minutes clearing caches. Sometimes it just come on what seems to be no reason and it takes me quite a long time to clear it.

I have reset my Incredible twice. That solves the problem, but only for a week or so and it starts up all over again.

I'm tempted to either root the phone, or buy a new one. Any ideas?
 

fatlo

New member
Mar 9, 2012
2
0
0
Visit site
Since I found so much help in your forum, I wanted to share my solution to reclaim the memory which htc MAIL was hugging.

(1) What my system was
HTC Sensation Z710e
Android 2.3.4
HTC Sense 3.0
Pyramid PVT Ship S-on RL
HBoot-1.18.000
This mobile was sold through Swisscom in Switzerland in the summer of 2011.
I do not have many apps installed.

(2) How it started
I got the occaisonal complaint, that memory was low. Usually I rebooted the system and was fine again. Then one day updates of installed applications started to fail because of low memory. I then discovered that the "Task Manager" had an menue item "Advanced" and the "Storage Use". I then saw that my "Internal Storage" of 1GB was almost full, only a couple of MBs were left. When I sorted "by size" I found "MAIL" ("Mail for Android", Version 4.021173725446.1119931, proudly copyrighted by htc) at the top of the heap using more than 490MB. I found this strage because at the time I was only synching two POP3 accounts and had only two weeks of mail on the device.

The memory usuage even stayed the same after I removed the two accounts from my MAIL app. This really annoyed me.

I searched the htc site for news. Found none. Finally managed to write them a message to ask if somebody could help me. They asked what phone I had and kindly refferd me to the FAQs. Then I started to search the net for information. I found hints that I was not the only one with this problem and that htc had not really been quick in providing a solution. In fact, I found no trace of a solution provided by htc. But more and more evidence that the MAIL app had a "memory leak", i.e. stored data but did not care to remove it after use ...

And the only way to solve this seemd to be to digg very deep, take a walk through the file system, become "super user" with "root" privileges and clean some folders manually.

(3) Getting to the root of the problem
I spend some time to learn what "rooting a device", "S-OFF"ing a htc phone, "recovery" and "DO NOT DO THIS UNLESS YOU WANT TO VOID YOUR WARANTY!!!" meant.

I found [Anleitungen] Root | S-OFF/S-ON | Custom ROM flashen | Firmware Update/Downgrade - HTC Sensation Root und ROM - Android Forum which is a Swiss-German forum with instructions, warnings, more warnings and an nice FAQ about all the words which I did not yet know. Thanks FordSierra88 and timsah! Really helpfull stuff! And thank you XDA, Unrevoked and AplhaRev for the orriginal work which they reference in their posts!

(3.1) Digging deep
Here is what I did:
(1) got the tool from revolutionary (Revolutionary)
(2) stopped htcSync on my PC
(3) ran the tool and also installed Clockworkmod when the tool asked me to

These steps gave me "S-OFF".

(4) got "Superuser-3.0.6-efgh-signed.zip"
(5) put the zip in the top folder on my sdcard
(6) went to the boot menu by starting the phone with "volume down" pressed
(7) asked "recovery" to "install zip from sdcard" (you need to "toggle signature verification" twice to get "verification dsiabled") and chose to install "Superuser-3.0.6-efgh-signed.zip". I got an error message at the end but the SuperUser-app was still installed ok.

These steps gave me the possibility to obtain "soft root".

(8) I got "Terminal Emulator" from the Android Market
(9) then Android Market suddenly disappeard, but this was just Google "upgrading" it to PlayStore ... but it scared the wits out of me :)
(10) started the Terminal Emulator which luckily still installed fine after I had made some room by shifting other apps to the sdcard.
(11) typed su in the command window and granted myself root privileges

3.2 Where did I finally find the 490MB?
I did not dare to just "rm -r ./*" in /data/data/com.htc.android.mail/app_mail as suggested inn the post by evoVoyager above.

Remembering my old Unix days, I mainly worked with the Terminal Emulator using "ls", "ls -a", "ls -l" and "ls -a -l", "pwd", "cd .." and finally "rm".

/data/data/com.htc.android.mail/app_mail contained a lot of old attachments, many in multiple versions with timestamps some minutes apart: *.pdf, *.jpg, *.JPG, .*.doc, *.xls, winmail*.dat, ... when I removed them using the Terminal Emulator, Mail's storage use dropped from 494MB to 104MB.

/data/data/com.htc.android.mail/databases was good for another 15MB. Before delting them, I used "cat" to moved the databases to "sdcard" and from there to my PC. If I should ever need them again, I know where to find them.

And finally:
/data/data/com.htc.android.mail/app_mail/.data/mail/related and /data/data/com.htc.android.mail/app_mail/.Mail contained old attachments (again *.gif, *.jpg, "*.png", ...) again some with multiple copies and timestamps. If somebody is interested, I have a list of what some 8000 of these file-names look like. After deleting those files, the memory usage of Mail dropped to around 100KB.

This is were I stopped ...

(4) Closing remarks
As suggested in this forum, I got the K9 email client and hope it keeps track of which files are still needed.

I like the htc products. But I find it unbelievable that htc ships an app which just eats memory as if there was no tomorrow. How can htc ignore this behaviour? I am not an Android wizzard, but finally found the files which used up my memory without any connection to the data the Mail app was showing. As a reminder: I deleted all the accounts which I managed with MAIL. It may be more diffciult to prevent MAIL from leaving files in memory, but I think other programmers have done it before.

I hate htc a little because they made me S-OFF and ROOT my phone. Ok, sorry, they did not make me, but sending me an email which referred me to the FAQ on their site did not help.

I hope that this account will help others to render their devices in workable conditions again. Please look at the websites I mentionned and get some idea what you are doing. What you don't want to be doing is "brick" your htc. And "to brick something" is one of the concepts that everybody needs to understand before you even start to S-OFF or ROOT.

Thanks again for this incredible usefull forum.

====================

P.S. While I was searching the phone's file system using the Terminal Emulator, I got JAVAsdk, ADB (What Is ADB And How To Install It With Android SDK) and AndroidCommander ([TOOL] Android Commander 0.7.9.10 - xda-developers, thanks PanPjotr!) for my PC. Its shell window is easier on my eyes and I was able to cut and paste commands and output from it to my PC's notepad for future reference. It also helped me to shuffle some of the files but I did not get so far as to get "hard root" to allow Android Commander to work on the system folders ... I was too scared.
 

jhutchi

New member
Mar 30, 2012
3
0
0
Visit site
Hi All,

I've read through this and cannot find as solution to my problem. On my Evo Shift I have an exchange email from work (one reason I bought the phone--so I could easily access work mail). It built up to 150 mb, which did not disappear even when I deleted my mail account! I had to have a hard reset. Three months later, same thing. Just had a hard reset last week and mail is already up to 53 MB (it was at about 2 after the hard reset). I have it only downloading one day of mail and don't have it syncing with sent mail or deleted files (although it seems to be synced regardless). I downloaded a file reader to see if I could find a .mail folder that might be hoarding things, but saw no such folder. Sprint techs online and at the store seem baffled. I hate this phone for that very reason. And now I"m stuck with it. It looks as if I will ahve to do a hard reset weekly. If anyone has any solutions, please help. I read something about rooting, etc, but this stuff is all so above my abilities.

Thanks.
 

jhutchi

New member
Mar 30, 2012
3
0
0
Visit site
Your problem is my problem, but my mind gets dizzy--I can't do all this to my phone, because I don't understand it! And the Sprint techs there are hopeless. But at least now I know I'm not nuts. I guess I am stuck to a life of hard resets every couple of weeks :(
 

jhutchi

New member
Mar 30, 2012
3
0
0
Visit site
Re: following other info in this thread

I think enabling root access and doing "something" will be the key to fixing my mail memory problems, but quite frankly, I don't have the slightest clue how to do this. Download unrevoked3 on my phone? I can't do this in marketplace. Do it on my computer and hook with the phone? I wish I was more tech savvy. I hate this phone--I can't fix the memory issue other than a hard reset and I am stunned to read all this and realize that the Sprint techs look at me as if they've never seen this problem before. Can anyone give me an idiot's guide to fixing my phone so that the mail won't hoard 150 MB of memory even though I delete the account?
 

PvilleComp

Well-known member
Jun 13, 2010
4,146
603
0
Visit site
Unrevoked is done with your PC or Mac - you don't download it to the phone in the market.

Here are the step by step instructions for using Unrevoked:
public:unrevoked3 [RootWiki]
NOTE: These are for the DROID Incredible. I mention that because you mentioned Sprint Tech's and the Incredible is a Verizon phone.

You will need to be on Froyo and not Gingerbread to root with Unrevoked.

Hope this helps.
 

fatlo

New member
Mar 9, 2012
2
0
0
Visit site
jhutchi, if you are prepared to wipe/hard reset your phone one more time you could try this:

(1) hard reset your phone and restart
(2) download K9 mail app from marketplace/Google Play
(3) setup your email accounts in K9
(4) stop using htc mail app
 

muelgrub

Member
Jan 10, 2012
7
0
0
Visit site
So if too much "data" is the problem, what will deleting some of it do? Like in the NAV app or Maps app. What will deleting the data there do?
 

Luc Heylens

New member
Apr 12, 2012
1
0
0
Visit site
To FATLO,

thanks a lot for this brilliant "how to".
My HTC Desire that was almost dead (3MB left), is now swimming in a comfortable 50 MB memory pool !
As I like the look & feel of the HTC mail app, I will continue using it ... if this does not imply a cleanup every month ;-)

Greetings
Luc
 

Malcolm_G

New member
Jul 26, 2012
1
1
0
Visit site
I just wanted to reply to this, as the posts from evoVoyager and fatlo allowed me to finally stop the HTC mail app from taking 90+mb on my rooted HTC Desire running on Leedroid. As the steps/file locations etc seem slightly different for every phone, I thought I'd post where I found the troublesome files.

So this phone already has S=OFF and is running a LeeDroid V3.3.3 (Android 2.3.3 and HTC Sense 2.1). I downloaded a terminal emulator from the Play Store, and this is what I did:
===
su (grants superuser permissions to the app, only way I could see these folders)
cd /data/data/com.htc.android.mail/app_mail_temp (folder where massive temporary files were hiding)
ls -l (lists files in this directory with information on size - they were all around 25-35MB, I wanted to delete all but the most recent one, which was only 10MB, and conveniently they were named sequentially so I was able to delete all the old ones with the command...)
rm -r 133* (the asterisk is a wildcard, so this deleted all files starting with 133, the most recent one on mine was 134 - I suspect you could just do rm -r ./* and get rid of everything in the directory without ill effects)
===

So there we go, finally solved! Thanks guys, hope this also helps someone
 
  • Like
Reactions: dmaul9