Fernando Martin
Fernando Martin

Reputation: 689

rm failed, Operation not permitted on Rooted Android

I have one Brigmton tablet which I've rooted thanks to KingRoot apk. I have also installed both fastboot and adb tools in my computer (Ubuntu) so I can access the device once this is usb-plugged:

[root@fmartin-Vostro-3350 ~]# adb devices
List of devices attached 
65EAI7SOAY6SGEZL    device

[root@fmartin-Vostro-3350 ~]# adb shell
shell@mr900:/ $ su
root@mr900:/ # id -a
uid=0(root) gid=0(root) context=u:r:toolbox:s0

My problem is the following, I have few applications which I cannot uninstall, well I can but they get back every reboot. The problem is that, even when they are uninstalled, there is an apk file in /data/app which I cannot remove not even being root:

root@mr900:/ # cd /data/app                                                    
root@mr900:/data/app # rm com.hola.launcher-1.apk                              
rm failed for com.hola.launcher-1.apk, Operation not permitted
l com.hola.launcher-1.apk                                                     
-rw-r--r-- system   system    3111376 2015-10-25 19:36 com.hola.launcher-1.apk

/data is mounted rw, if I try to write there I success:

root@mr900:/data/app # touch writeTest                                         
root@mr900:/data/app # ls -l writeTest                                         
-rw-r----- root     root            0 2013-01-01 11:21 writeTest

And apk file had 'immutable' attribute but I removed it and I still cannot delete it:

root@mr900:/data/app # lsattr com.*                                            
----ia-A-----e- com.dianxinos.dxbs-1.apk
-----a-A-----e- com.hola.launcher-1.apk
----ia-A-----e- com.mubiquo.nestlecocina-1.apk

Any idea what's going on?

Thanks in advance!

Upvotes: 3

Views: 7848

Answers (1)

Fernando Martin
Fernando Martin

Reputation: 689

Following the instructions from the link posted by @Ajitha, then it worked.

Even if I tried removing immutable i attribute, that wasn't enough, I had to remove them all:

root@mr900:/data/app # ls -l
-rw-r--r-- system   system    8122773 2015-10-27 15:52 com.dianxinos.dxbs-1.apk
-rw-r--r-- system   system    3111376 2015-10-25 19:36 com.hola.launcher-1.apk
-rw-r--r-- system   system    9160182 2015-10-28 07:59 com.mubiquo.nestlecocina-1.apk
-rw-r--r-- system   system    7446598 2015-10-24 18:50 mobi.wifi.toolbox-1.apk
-rw-r--r-- system   system    4930894 2013-01-01 11:06 stericson.busybox-1.apk
-rw------- system   system          0 2013-01-01 11:06 vmdl132896219.tmp
-rw-r----- root     root            0 2013-01-01 11:21 writeTest
root@mr900:/data/app # chattr -AacdDijsStu *.apk           
root@mr900:/data/app # rm com.hola.launcher-1.apk                              
root@mr900:/data/app # ls -l com.hola.launcher-1.apk
com.hola.launcher-1.apk: No such file or directory

Upvotes: 2

Related Questions