安装失败后无法清理内存
我正在测试一个300MB的游戏。我尝试从 IDE(本例中为 IntelliJ)部署它,但忘记保留 600MB 的空间(当通过 Eclipse 或 IntelliJ 安装文件时,它会传输到内存中)。安装失败,出现错误“设备空间不足”,现在我只有 31MB 的可用空间。
由于无法通过手机进行清理,我该如何清理?有没有办法从 Eclipse 或 ADB 中删除这个传输的文件?
我尝试移除电池、清理应用程序的缓存和数据等,但都是徒劳。
更新
我使用ADB shell进入文件系统。这是 df 命令的输出
/dev: 86488K total, 12K used, 86476K available (block size 4096)
/data: 1428484K total, 1100000K used, 32848K available (block size 4096)
/cache: 65536K total, 36320K used, 29216K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 250880K total, 231936K used, 18944K available (block size 4096)
/lgdrm: 2816K total, 1180K used, 1636K available (block size 4096)
/sdcard: 1920704K total, 252832K used, 1667872K available (block size 32768)
似乎我必须清理 /cache 目录,但系统不允许我
$ purge /cache
purge: permission denied
I was testing a game of 300MB. I tried to deploy it from the IDE (IntelliJ in this case), but forgot to leave 600MB of space (when a file is installed via Eclipse or IntelliJ, it gets transfered into internal memory). The installation failed with an error "Not enough space on the device" and now I only have 31MB of free space.
How can I clean this as I cannot do it from the phone? Is there a way to delete this transfered file from Eclipse or ADB?
I tried removing battery, cleaning applications' cache and data, etc. All in vain.
UPDATE
I used ADB shell to enter the file system. This is output of df
command
/dev: 86488K total, 12K used, 86476K available (block size 4096)
/data: 1428484K total, 1100000K used, 32848K available (block size 4096)
/cache: 65536K total, 36320K used, 29216K available (block size 4096)
/sqlite_stmt_journals: 4096K total, 0K used, 4096K available (block size 4096)
/system: 250880K total, 231936K used, 18944K available (block size 4096)
/lgdrm: 2816K total, 1180K used, 1636K available (block size 4096)
/sdcard: 1920704K total, 252832K used, 1667872K available (block size 32768)
It seems that I would have to clean /cache directory but the system does not allow me
$ purge /cache
purge: permission denied
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
如果您想通过 ADB 尝试此操作,可以尝试“
ADB uninstall
”。使用命令提示符转到计算机上的“
\SDK\android-sdk-\platform-tools\
”路径,然后键入上述命令从手机中删除整个应用程序。You could try a "
ADB uninstall <package>
" if you'd like to try this via the ADB.Go to your "
<Android SDK Path>\SDK\android-sdk-<platform type>\platform-tools\
" path on your computer with a command prompt, then type the above command to remove the entire application from the handset.我也经历过类似的事情,我正在努力回忆我是如何处理的。
我当然使用手机本身(Astro)上的文件浏览器来删除文件 - 这没有任何问题。
由于某种原因,我认为要删除的文件位于数据目录中,但我对此不太有信心。
I've had something similar to me and I'm trying to remember how I dealt with it.
I certainly used a file browser on the phone itself (Astro) to delete the files- which didn't have any issues.
For some reason I'm thinking the files to delete are in the data directory, but that I am less confident on.
不幸的是,软重置是唯一的解决方案。如果有人提出更好的方案,请说出来。 ADB shell 在这种情况下毫无用处。
Unfortunately soft reset was the only solution. If someone comes up with a better one, please say so. ADB shell was useless in this case.
转到设置 -> 隐私 -> 通过单击以下步骤重置出厂数据,它将释放内存
但问题是它会删除您手机上的所有应用程序和应用程序。确保 SD 卡已移除。尝试一下对我有用
go to setting->privacy->factory data reset by clicking follow procedure it will free memory
but problem is that it erase all apps on ur phone & make sure that sd card removed. try it work for me
我刚刚遇到了这个问题,我可以通过使用 adb shell 来修复它,然后 su (显然必须安装 su,许多安装默认情况下没有附带它),然后转到 /data/local/tmp 并删除上面的所有内容文件夹。
非常重要:不要忘记 su,否则你的权限将不断被拒绝
I just had this issue, I could fix it by using adb shell, then su (obviously must have su installed, many installs don't come with it by default), then going to /data/local/tmp and deleting everything on that folder.
Very important: DON'T forget the su, otherwise you will just keep getting a permission denied
当我尝试将大型应用程序安装到我的 Galaxy Tab 2 平板电脑时,我就遇到了这种情况。安装失败,但该应用程序仍然占用超过 1GB 的空间,而且我无法找到任何方法在 Android 中删除它。我能够通过执行以下操作找到这些文件并清除它们:
I had this happen to me when trying to install a large app to my Galaxy Tab 2 tablet. The install failed, but the app was still taking up over 1GB of space and I couldn't figure out any way to remove it within Android. I was able to find the files and clear them out by doing the following: