Friday, June 17, 2016

5.0 lollipop - pm hide VS pm disable -- the identity crisis


What's the need of pm disable when pm hide already does its job?


I've compiled some information based on my search and research: click here to see the table (edited).


As you can see, pm hide can achieve what pm disable can, but without needing root access. Also, based on my tests, I've reached the conclusion that when pm hide is performed, unlike pm disable, no matter what, the app will not be loaded in the memory again.


I opine that hide descended from block. Block was first introduced in KitKat 4.4.0, remained till Android L Preview and was later superseded by hide in Android 5.0.0. It is not clear to me what lead to renaming of block to hide and why was it needed?


Regardless, if somebody without root access can achieve the functionality of disable, then why does disable exists at all?


Furthermore, why does hide exists? If hide was built supposedly to help users to get rid of anything they want, without un-installation and without rooting the device, then in the GUI we should be having a relevant option, but we've got only the disable option.


Intertwine questions:



  • What are the merits and demerits of them, excluding those noted in my question?


  • Why both of them exists and to what or whom do they serve?

  • Is it technically true that hide surpasses the functionality of disable and can truly disable any app, when executed on it?


  • New: Given findings of Andrew T. and my tests shown in the table, is component shown in hide's usage an error or have I failed to understand latter's usage?


    For historical purposes: hide's usage as of now is shown as


    pm hide [--user USER_ID] PACKAGE_OR_COMPONENT


Note: The question does not, in any fashion, seeks unsubstantiated opinion but straight to-the-point answer(s). If you must write an opinion, make sure to back it up using credible and technical sources with sound reasoning to make distinction between what is technical and real and what is speculative.





Tests performed on Carbon ROM (Android 5.1.1) and COS12 (Android 5.0.2) for OnePlus One.




No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...