Citation: |
OK - step one is root your DI - there are several good videos and scripts to do this already - a good link is here: unrevoked
Once you have root access - you need a way to explore the phone internal storage. We used the Android SDK terminal process - you have to grant it root access to be able to access the phone as su. Now you are in - armed and dangerous - but not much closer to a solution... The main problem to overcome is WHERE in the HECK is the HTC Mail (Dragon) App keeping all of this memory...! Finding this secret protected dir was non trivial and basically turned into a BFMI type excercise - all the while being extremely careful not to irrevocably f-up my DI by accidentally deleting something important. A fancy grep and sort type script would likely have been helpful but the Android BASHish type shell was not conducive to this (and my regular expression skills were rusty) - so I hunted by instinct. The most obvious culprit in root seemed to be the folder called /data - so cd in and look around - (need su to do this) and we are getting closer. In /data there is a protected dir called imaginatively /data/data (good job guys...) - in we go.... In here are dirs for every installed app on the internal storage - DANGER LEVEL high but we are aproaching the lair of the dragon. Careful inspection of the weird names leads us to the /data/data/com.htc.android.mail - entrance to dragons cave... ls inside this dir - and the list shows interesting names - bufferfile (not too big but still significant) - interested us for a bit - also cache (but this was also too small ) - but the jackpot was entering into the app_mail dir - /data/data/com.htc.android.mail/app_mail - and we behold the dragons treasure....! In this folder I found literally thousands of files - all relatively small - all of the mail I thought I had deleted - SAVED - with root only access (600 for you unix heads) - here was the origin of the inability to get rid of these files - they are assigned owner only access - and the owner is some random number (not root) - so even root has to chmod or chown in order to access them... BUG! Just for fun we grab all of the files with the ADB - and then check the size of the uploaded folder - 101 Mb - bingo! ...but now we are here to save the day and free the captured memory - a quick chmod 777 *.* and also a chmod 777 * (to get those pesky files without extensions) - makes the files accessible - we also have to go up one - and chmod the /data/data/com.htc.android.mail/app_mail dir to 777 to allow us to perform the command in the dir (sorry reverse order). ...then - dragon slaying time - cd back into app_mail then rm * and rm *.* (BE CAREFUL!! - you are on your own if you F-up...) - now a quick DI check - Menu -> Settings -> Applications -> Manage Applications (Sort by size) and.....drum roll please) - ta-DAH - the top user is not HTC Mail with 101 mb - it is contacts with a much more reasonable 12.5 mb (ok I have a lot of contacts...so sue me... ![]() So - dragon slain - storage freed - phone working - no factory reset - and you have learned a little bit about Android FS in the process... hope this helps - and if you are not confident you can do this - DON'T - it really really is horribly dangerous....good luck....tl;dr; (Not n00bish safe - danger - root access - hunting dragons...) |