在清除应用缓存时,默认不会删除cache文件夹,所以清除缓存后,查看缓存大小为12k(也可能是别的值,只是不为0),可以修改:
frameworks/native/cmds/installd/commands.cpp
int delete_cache(const char *uuid, const char *pkgname, userid_t userid)
{
std::string _cachedir(
create_data_user_package_path(uuid, userid, pkgname) + CACHE_DIR_POSTFIX);
const char* cachedir = _cachedir.c_str();
/* delete contents, not the directory, no exceptions */
return delete_dir_contents(cachedir, 1, NULL); //这里把0改成1.
}