Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I was downloading Facebook from the Play Store awhile ago when the phone suddenly hanged up so I forcefully shut it down by removing the battery. Now when I re-boot Facebook is no longer in the queue and I need to download it again. Now my question is, where did the Play Store temporarily store it while it was being downloaded? I fear that there's now a rogue incomplete Facebook apk file somewhere that's using up wasted space.

share|improve this question
    
chances are, it is stored in a corrupt format that the phone cannot read. Plug your phone to the PC and do a scan and repair to clear out broken files, that should take care of it. –  forums Feb 22 '13 at 5:24
    
@forums PCs do not generally have tools to clear incomplete downloads from partitions on Android devices. /data isn't even accessible without ADB. –  Matthew Read Feb 22 '13 at 19:30
    
ok, I just assumed android automatically scans partitions on reboot and clear out broken files in partitions so its only the sdcard that need scanning. Big files (50mb-up) cannot be stored in phone memory, so when it is interrupted, only scan and repair may be able to reclaim the memory. –  forums Feb 23 '13 at 3:49

1 Answer 1

up vote 6 down vote accepted

The Playstore app usually uses /data/local to temporarily store .apk files while downloading, then installs them from there, and finally removes the temporary download-file (which then went to /data/app). The /data/local directory should be readable by all processes (so no root needed to list its contents), as it is used as a kind of "temporary directory" for a lot of things (you might think of it as a "misnamed" /tmp directory).

This directory should be "cleaned up" on reboot1, so your issue might rather be a broken .apk in /data/app. A new install should solve this anyway. I further recommend using AppMonster Pro -- yes, the Pro version: on each install/update it grabs the .apk file of the installed/updated app and stores away a copy. So in cases like this, you could simply grab a previous version and install it over.

Just for completeness: There seem to be more such "temporary directories" on Android devices. Investigating a dump from a stock 2.2 Motorola Milestone 2, I e.g. also found /data/download. Different devices might use other directories additionally. But that should not affect your Playstore question.


1 I can only base this on one of my devices (Motorola Milestone 2, stock Android 2.2), where I extracted a Nandroid backup stored on my PC. There the init.rc file (which is called during the boot process) a.o. contains the following:

mkdir /data/local 0771 mot_tcmd shell
mkdir /data/local/tmp 0771 mot_tcmd shell
mkdir /data/local/12m 0771 mot_tcmd shell
mkdir /data/local/12m/batch 0771 mot_tcmd shell

Easy to see: the /data/local directory is created during the boot, which suggests it being empty at this point. Same is valid btw. for /data/download

share|improve this answer
    
In your opinion it's cleared out? Do you mean in your experience? :P –  Matthew Read Feb 22 '13 at 19:30
    
I never felt the need to thoroughly check. Whenever I looked, it was empty. But as I never experienced trouble with an aborted install, I cannot say for sure. Not being at my computer when I wrote this, I had no chance to verify what I thought might be behind -- so thanks for the reminder, I'll update my answer... –  Izzy Feb 22 '13 at 20:27
    
On my Xperia Ray (ST18i) running ICS, I do not have access to the /data directory. Could the settings be different on Xperia phones or it's an ICS thing? –  Alex Essilfie Apr 4 '13 at 18:23
    
You don't have full access to the /data directory and its contents unless your device is rooted. Without root, you can access parts of it if you know where they are; you should e.g. be able to directly access the /data/local folder, but might not be able to "browse" the /data folder contents. So with clicky-clicky graphical interfaces, you might have a hard way getting there unless you can input the full path manually :) –  Izzy Apr 4 '13 at 18:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.