Apps like Link2SD and Titanium Backup are able to "freeze" other apps, that is disable them without removing them. What do these apps do to achieve this?
4 Answers
Titanium Backup etc just use in-built Package Manager (pm)
to freeze an app. pm
has a feature to prevent apps from running & from appearing in Launcher. To use it, Titanium Backup etc execute following command:
pm disable {package_name}
You can freeze apps by yourself without using a dedicated freezer app. Just use the above command in Terminal Emulator or ADB Shell
.
For example, if you want to freeze Stock Web Browser
, open Terminal Emulator
& switch to root using su
command. Then, execute # pm disable com.android.browser
.
It'll return #Package com.android.browser new state: disabled
. Done!
Restart your Launcher (some devices may require reboot) to see the app icon gone.
To defrost the app, just replace disable
with enable
in the command.

- 12,381
- 13
- 63
- 103
I found how pm disable
works:
If you run cat /system/bin/pm
, it gives:
# Script to start "pm" on the device, which has a very rudimentary
# shell.
#
base=/system
export CLASSPATH=$base/framework/pm.jar
exec app_process $base/bin com.android.commands.pm.Pm "$@"
So apparently it is the same as the PackageManager we use from Java, it is calling it - just in a root context that no user app can directly access.
You CAN check if something is frozen, using
getPackageManager().getApplicationEnabledSetting( the package name ) ==
getPackageManager().COMPONENT_ENABLED_STATE_DISABLED)

- 565
- 1
- 7
- 20
pm disable
can be bypassed by the app re-enabling the component. A better way to do this is to use the undocumented feature of Intent Firewall as such: https://github.com/lihenggui/blocker

- 191
- 7
In Unix systems, files have 3 authorizations: read, write, and execute.
(For 3 categories of people: the owner of the file [usually its creator], a group of people, and everyone else, but it is out of the subject).
If you remove the execute authorization of the file, it cannot be launched (executed) anymore.

- 107
- 4
-
Hello dralpuop. Android apps are not binaries, so adding or removing the executable permission makes no difference to their execution. – Firelord Nov 22 '19 at 06:09
-
Android is System 5 Unix, where (for example) shell scripts are not binaries, yet adding or removing the executable permission MAKES a difference. – ftpo Nov 22 '19 at 22:03
-
1A shell script can be executed without executable bit set by passing it as an argument to an intepreter directly, so it makes no difference for shell scripts, or for apps. The question and question is about apps Android apps by the way, not about shell scripts. – Firelord Nov 22 '19 at 22:38
-
1Try this source to know how apps are run in Android. https://github.com/dogriffiths/HeadFirstAndroid/wiki/How-Android-Apps-are-Built-and-Run – Firelord Nov 22 '19 at 22:40
-
Apart from which, apps are marked disabled in
packages.xml
, and the disabled status is reported indumpsys packages
. Simply changing their file permissions wouldn't cause that. – Izzy Sep 22 '20 at 06:44
pm disable
only says "killed", then the process starts up again immediately. kill -STOP pid is better. You can see which are stopped, inps
output. – NoBugs May 02 '13 at 14:30