Wednesday, June 3, 2015

file system - This app promises to run "fstrim" without root but I am not sure if it works


I am not sure if this app works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for fstrim, it doesn't require root access which is quite incredible.



Answer



AFAIK, only apps running as root (UID 0) (1) or system (UID 1000) (2) or with android.permission.MOUNT_UNMOUNT_FILESYSTEMS (3) can do fstrim. But third party apps can neither get UID 0/1000 (without rooting phone), nor the said permission is for third party apps (4).


Also manually sending FITRIM ioctl with fstrim command requires at least capability SYS_ADMIN (5), which is almost root if not full root.


The app you have mentioned asks for permissions CLEAR_APP_CACHE (delete all apps cache data) and KILL_BACKGROUND_PROCESSES (close other apps). So it's quite evident what it must be doing to give a feel of lag-free experience.



PS: You don't need to run fstrim manually in most cases, OS can handle this. See this answer.


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 ...