There is a significant number of posts on the internet regarding how people hate bloatware that comes bundled with their devices, how it eats at their precious internal storage space and how they would want to uninstall it (which is impossible w/o rooting your device). While I agree with one’s right to hate the bloatware, everything else is a delusion. Let’s take a look.
I will be using the Android Debug Bridge (ADB) shell to take a look at Android file systems.
C:\>adb shell shell@android:/
Here is how the file system layout of a typical Android device looks like as produced by the df (disk free) shell command. I have removed all the lines that are not relevant to the discussion.
shell@android:/df Filesystem Size Used Free /system 503M 219M 284M /data 4G 23M 4G /cache 251M 4M 247M /storage/sdcard0 1G 92M 1G /storage/sdcard1 8G 1G 7G
What do we see here?
- /system – Android OS itself. In a dedicated partition. This is important. This partition is read only at runtime (safe & secure) and cannot be accessed by the user via USB.
/data – This is where the user data resides that this is what’s called “Internal Storage” when you open up the Settings -> Storage This is where the apps are installed, settings are stored, app data gets saved, etc. Compare the space counters in the screenshot with the ones in the df output. However, this is also cannot be accessed by the user neither via USB nor via built-in file explorers due to very tight file system permissions.
- /cache – caches of all sorts, including optimized application and library code. This gets wiped almost every time you patch your OS resulting in “Android is processing applications 11/10500” dialog that seems to drag on forever. Nevertheless, it is important to get those caches wiped, otherwise apps may crash and misbehave, as the old cached code might be incompatible with the new patches. If you want to learn more about this mumbo-jumbo google for ODEX and Dalvik. As usual, no access via USB.
- /storage/sdcard[0|1] – these are the Internal and External SD Cards. Numbering and exact path might be different for different devices, so it’s best to look at the partition size. I’ll let you figure out which of the two is which on my device. These are fully accessible by the user over USB. And these are very much the only partitions that the user is supposed to access.
Before moving on, one important point: having OS and data in separate partitions has many important benefits:
- Apps don’t litter the OS with their files (look into your Windows folder for once J)
- Can update OS w/o touching the user data.
- Can back up / restore / wipe user data and caches w/o touching the OS.
- OS partition is mounted as read only at runtime, which means extra security and safety (no file system corruptions in case of power failure etc.)
Now it’s time to connect the dots: if Bloatware comes with the OS and survives the wipes – on what partition can it only reside? Think before reading the next line.
shell@android:/pm path com.vendor.bloatware package:/system/app/com.vendor.bloatware-1.apk
So if it sits on the /system partition, can it eat at space available in /data? Can it affect the “Internal Storage” counters? Will uninstalling it free up Internal Storage space? And ultimately will the user be ever able to uninstall anything from a read-only partition?
The answer to all these questions is a solid No.
So what can you do if you still want those pre-packaged apps away from sight? Use the “Disable” option in Settings -> Storage instead:
If you had used or updated the app, the updates will go in the /data partition (/system is read-only – remember?) and will eat up space there (as well as any data the app had generated for you). In this case, the “Uninstall updates”, “Clear Data” and “Clear Cache” buttons will show up. But in fact, when you tap “Disable” – Android will do it for you automatically.
Summary
- Android has a unique partition setup where the OS is separate from the user data, which brings many security and ease of use/management benefits.
- Is bloatware bad? Up to you. Does it eat at your space, should you attempt to uninstall it? No.
- What do you instead – disable them and sleep peacefully.
That’s it for today. Let me know your opinions! What was the nastiest piece of bloatware you have ever encountered?
Leave a Reply