153
Caches Explained

  1. Tiwi1990
    Ice Cream Sandwich Sep 6, 2018


    #41
  2. anupritaisno1
    KitKat Sep 19, 2018

    anupritaisno1 , Sep 19, 2018 :
    M8 listen

    A script file is NOT put in /cache. The main reason is that the bootloader needs to pass the location of the ROM zip to the recovery partition as an argument while booting it and the bootloader doesn't have a driver to natively open an ext4/f2fs formatted filesystem. The functionality you're describing is actually handled by a kernel module called uncrypt and the misc partition handles this, not the cache partition

    What you have said isn't entirely wrong however. Custom ROMs merely tell the bootloader to boot TWRP without going through misc and put an openrecoveryscript in /cache. However as of nougat most ROMs abandoned the practice and now use the misc partition just the way AOSP does

    The cache partition cannot store anything and is useless when booted into android. Selinux blocks all apps from writing, reading, opening or even doing anything in cache at all. The main reason is that the cache partition cannot be encrypted so anything going into that partition is serious information disclosure

    The cache partition has just one purpose and it has nothing to do with android. The recovery puts crash logs into this partition if the recovery crashes. During a system update, raw data is copied from your system, vendor or any other partition to cache, the raw data is then patched and then the patched blocks are mirrored back to the respective partition. That's what cache does
     

    #42
  3. elanglois
    Lollipop Sep 19, 2018

    elanglois , Sep 19, 2018 :
    First, I'm not your m8.

    Second, openrecovery scripts ARE placed into the /cache partition since I've done this myself. Misc is used to tell the bootloader to boot recovery rather than the android system, but the script to automate the flash process goes on cache. All other partitions are suspect to being overwritten by recovery.

    Encryption has nothing to do with any of this. It's not part of the issue at all. I am not talking about system OTA upgrades since that has nothing to do with any caches or cache partitions.

    Cache partition is sometimes used during incremental OTA upgrades in the way you mention, but only if not using A/B system partitions, and its still pretty rare since there is rarely any reason to copy blocks around. The encryption layer is done in RAM and the incremental OTA replaces full blocks so there is nothing to "patch".
     

    #43
  4. MetalSir
    Honeycomb Sep 30, 2018


    #44
    elanglois and BeingIncog like this.
  5. WarGod1842
    Honeycomb Oct 7, 2018


    #45
    elanglois likes this.
  6. RV@1122
    Cupcake Oct 8, 2018

    RV@1122 , Oct 8, 2018 :
    how can I remove cache and free extra space in latest android 9.0 update
     

    #46
  7. elanglois
    Lollipop Oct 8, 2018


    #47
  8. elanglois
    Lollipop Oct 8, 2018

    elanglois , Oct 8, 2018 :
    see above
     

    #48
  9. RV@1122
    Cupcake Oct 8, 2018


    #49
  10. elanglois
    Lollipop Oct 8, 2018

    elanglois , Oct 8, 2018 :
    What junk data? Look. Don't believe the BS from so-called "cache-cleaners". Half of them are useless, the other half have trojans.

    If you have images, downloads, or old OTA files, erase them.
     

    #50
  11. theionopo
    Eclair Oct 25, 2018

    theionopo , Oct 25, 2018 :
    So detailed, very well written and so very helpful. Trying to keep this in my 'cache' memory for a ready reference. ;)
     

    #51
    Loveit and elanglois like this.
  12. J1542122447286
    Eclair Dec 1, 2018

  13. Georgeoneplus7pro
    Jelly Bean Aug 18, 2019

    Georgeoneplus7pro , Aug 18, 2019 :
    Your article is excellent. I also found out a few things from here. But in my case with 1+7Pro, with 12GB RAM and high performance internal memory, I do not perceive the system slowing down if I delete the cache from the recovery mode, if the behavior of the device I do not like.
     
    Last edited: Aug 18, 2019

    #53
  14. elanglois
    Lollipop Aug 18, 2019

    elanglois , Aug 18, 2019 :
    It doesn't matter what you perceive.

    Fact: Your device will be less efficient and will need to run at higher clock speeds to maintain similar performance.

    Fact: Your device will be rebuilding the cache, further causing slower performance, lower battery life, and a hotter running device

    Fact: Clearing the cache does NOT solve a single problem. Go back and read it again.
     

    #54
  15. Anant Kamat
    Cupcake Jan 23, 2020

    Anant Kamat , Jan 23, 2020 :
    Thanks for the detailed post explaining different types of cache available.
     

    #55
    pablofg1978 likes this.
  16. J1542122447286
    Eclair Jan 23, 2020

    J1542122447286 , Jan 23, 2020 :
    Not entirely true. It's not greatly uncommon for a cache to become corrupt and cause app problems. So in this case, clearing the app cache DOES solve a problem.
     

    #56
  17. elanglois
    Lollipop Jan 23, 2020

    elanglois , via OnePlus 7 Pro , Jan 23, 2020 :
    No. This is totally untrue. It's a myth.

    Clearing the APP cache? You mean the one managed by the app cleared in App Info? That would be a big in the app itself. Consult the developer.

    ART caches don't get corrupt. I've yet to see a single case of this that wasn't placebo
     

    #57
  18. I1577386463794
    Cupcake Jul 7, 2020

    I1577386463794 , Jul 7, 2020 :
    May I ask for your advice: What should I do if phone charging pretty normal till 90%, and then very slowly till 95% and then stop charging? (OnePlus 8)
    Should I clear system cache partition, in this case?
    Thank you in advance!
     

    #58
  19. elanglois
    Lollipop Jul 14, 2020

    elanglois , via OnePlus 7 Pro , Jul 14, 2020 :
    Nope. Caches have nothing to do with charging

    The phone charges slow to stop it from exploding. Let it charge overnight and it will hit 100
     

    #59
  20. PhotonBeard
    Cupcake Oct 11, 2020

    PhotonBeard , Oct 11, 2020 :
    I think this article needs updating or clarifying as there is still a great deal of misinformation about caches. The number one recommendation for almost any issue with a OnePlus phone is to "Wipe cache" from Recovery, but no one seems to be able to prove that this is anything but a placebo.

    OnePlus phones now use the A/B partition scheme so there is no longer a "cache" partition to wipe.

    You might think it wipes the Android Runtime (ART) cache from /data/dalvik-cache, but this not the case.

    Individual app caches are stored in /data/data/[appname]/cache and these can be wiped on an app by app basis from the Storage menu.

    So what exactly does “Wipe cache” do? My assumption is absolutely nothing and it’s simply a legacy from pre A/B devices, but I would appreciate a definitive answer as to whether it does indeed do anything at all (even if as explained above it's rarely worth doing).
     
    Last edited: Oct 17, 2020 at 12:56 PM

    #60
    G_plusone likes this.