charging, battery, performance, caches and battery calibration myths busted

  1. Twowheeler
    Froyo Aug 26, 2019

    Twowheeler , Aug 26, 2019 :
    Why is there such a difference in how long the script takes to complete? My first run took considerably longer than all the ones after it

  2. elanglois
    Lollipop Aug 26, 2019

    elanglois , Aug 26, 2019 :
    Because it knows what has already been optimized and doesn't need it again.

    Why do you keep running it? It's likely not doing anything

  3. donPepitoGrillo
    Honeycomb Sep 23, 2019

    donPepitoGrillo , Sep 23, 2019 :

    I recently discover your post, very very interesting.

    But there's something I don't understand at all. Does this process need to be execute only when we make a clean operating system installation (or an update through an OTA)?? Or even when we install new apps/update apps in our devices??


  4. anupritaisno1
    KitKat Sep 23, 2019

    anupritaisno1 , Sep 23, 2019 :

  5. donPepitoGrillo
    Honeycomb Sep 23, 2019

    donPepitoGrillo , Sep 23, 2019 :
    Wow! then, is it better to charge to 100% all days? Because apps are updated from Play Store frequently.

  6. donPepitoGrillo
    Honeycomb Sep 23, 2019

    donPepitoGrillo , Sep 23, 2019 :
    Sorry but, what's the difference between executing "cmd package bg-dexopt-job" and "cmd package compile -m everything -f -a"??

  7. JJRedick20
    Cupcake Sep 23, 2019

    JJRedick20 , Sep 23, 2019 :
    First of all, do not leave an AGM unit without supervision while charging. You should closely control via voltage and temperature. Otherwise, you may encounter such a phenomenon as thermal acceleration.

    Simply put, this is an electrolyte heating. When the liquid is heated, the resistance decreases. Respectively, higher charging current can be delivered. As a result, a battery starts to warm up and the risk of a short circuit arises. In such a case, it is necessary to immediately stop charging and take a break for cooling.

  8. anupritaisno1
    KitKat Sep 23, 2019

    anupritaisno1 , Sep 23, 2019 :
    Cool story bro

    When did phones start using agm units?

  9. anupritaisno1
    KitKat Sep 23, 2019

    anupritaisno1 , Sep 23, 2019 :
    cmd package calls the package manager
    compile tells cmd package what command you're running. In this case it's compile
    -m is the compilation mode. There are several modes
    Supported arguments are "assume-verified, extract, verify, quicken, space, space-profile, speed, speed-profile, everything, everything-profile"
    Obsolete (but supported) arguments are verify-none (if specified defaults to assume-verified), interpret-only (quicken), verify-profile (verify), verify-at-runtime (extract), balanced (speed), time (space)
    Only one compilation mode may be chosen
    Assume-verified, extract, verify are only used by developers
    Space and space-profile optimise code for space at the cost of execution time. It only makes sense on android go devices
    Quicken and speed-profile are android defaults. bg-dexopt-job runs speed-profile. Your phone uses profiling to generate a profile used by speed-profile. Speed-profile without a profile is the same as quicken
    Everything compiles everything that the hardware can possibly compile
    Speed compiles everything that can be provably shown to benefit from compilation
    Speed-profile also does that same as speed but only compiles as per the profile and doesn't 100% compile everything in it
    Everything-profile compiles the entire profile

    -f force
    -a all

    bg-dexopt-job just runs speed-profile and does garbage collection. The compile command doesn't do garbage collection

  10. elanglois
    Lollipop Sep 23, 2019

    elanglois , Sep 23, 2019 :
    Exactly! Plug your phone in at night, every night.

  11. donPepitoGrillo
    Honeycomb Sep 24, 2019

    donPepitoGrillo , Sep 24, 2019 :
    Well, I have thought about creating a routine with tasker to update apps at certain days, while charging, and forcing optimization when reaching 100% and when all apps have been updated.

    Do you think it's a good option?
    Last edited: Sep 24, 2019

  12. donPepitoGrillo
    Honeycomb Sep 24, 2019

    donPepitoGrillo , Sep 24, 2019 :
    Oh my god! very complete answer! I almost cried, people tend to answer briefly :blush:

    Some more questions, please:

    1. "Speed-profile" is the default mode but, are "everything" and "everything-profile" better than the default one? I know they will need more CPU time and storage to compile all but, are there any other disadvantages? I am intereseted in speed and specially in battery benefits.

    2. Does executing some mode (for example "speed-profile") overrides the results of previous executions? I mean, if I execute "everything", does executing "speed-profile" next time will revert all compilations made by "everything"?

    Regards :wink:

  13. elanglois
    Lollipop Sep 24, 2019

    elanglois , Sep 24, 2019 :
    No. Just use the phone the way it was designed.

  14. anupritaisno1
    KitKat Sep 24, 2019

    anupritaisno1 , Sep 24, 2019 :
    1 In programming there's a concept of space vs run time
    Essentially if you reduce one the other goes up. Increasing one will cause the other to go down.

    2 https://android.googlesource.com/platform/art/ /master/runtime/compiler_filter.h#30
    As per the code the everything compiler filter takes the highest precedence

  15. elanglois
    Lollipop Sep 24, 2019

    elanglois , Sep 24, 2019 :
    I would dispute your number one. Thats a possible trade off, but not a common one. In most cases smaller code runs faster.

  16. donPepitoGrillo
    Honeycomb Sep 25, 2019

    donPepitoGrillo , Sep 25, 2019 :
    I think I have lost the point. Won't "everything mode" get my device speeder and better in battery life?

  17. MuhtashimDurjoy
    Cupcake Nov 28, 2019

  18. driversti
    Donut Dec 2, 2019

    driversti , Dec 2, 2019 :
    Use ADB instead

  19. F1556512995080
    Cupcake Dec 16, 2019

    F1556512995080 , Dec 16, 2019 :
    How do we know the process is done? for me it just hangs.

    Oneplus5T rooted with magisk.

  20. NateDev
    Honeycomb Dec 22, 2019

    NateDev , Dec 22, 2019 :
    With the everything mode, it means theres no JIT, only AOT. This is bad for 2 reasons.

    Firstly, JIT isn't always slower compared to AOT. it can do more specific optimizations in the moment vs AOT which can only do general optimizations. Secondly, more AOT means more storage use, but it also means a larger memory footprint as all the precompiled AOT code has to be loaded into RAM, which can also cause garbage collection to run more frequently. Also, it causes slower startup times for apps because of all the precompiled code. There's a reason Google uses both AOT and JIT. If there was a better way they would've done it.

    Speed-profile is the only good compiler filter to use IMO. Even speed (not everything) is too much AOT.

    donPepitoGrillo likes this.