5

I own a Moto G which is in 5.0.2 with KK bootloader. An app created a folder in /data/data which sustains in the memory even after uninstallation of the app. I couldn't remove the folder in any way.

  1. I tried with Root browser, with terminal. Root browser says Deleted successfully. while trying to remove the folder, but it remains.

  2. When I tried to remove it from terminal, it says rm: 00160eb4bb6a2325_0: No such file or directory, but it gets listed while using ls. This fails the nandroid backup with TWRP. :( Is there something I can do? Thanks in advance! :)

Edit: ls lists the file, but ls -l fails showing an error.

xavier_fakerat
  • 10,065
  • 6
  • 41
  • 101
Srikanth R
  • 223
  • 2
  • 3
  • 7
  • Seems to be a broken directory node. The only way to fix this is formatting the storage. I had this issue as well, but with an app folder that prevented me to install that app again. – GiantTree Apr 27 '15 at 06:32
  • Sadly, I even tried formatting the entire partition. The creep still remains. :( – Srikanth R Apr 27 '15 at 06:38
  • Then you never formatted. What did you use to format your /data partition? Seems like CWM to me, which does not format using make_ext4fs like TWRP does. – GiantTree Apr 27 '15 at 06:41
  • Yeah, I formatted with CWM. Do you reckon formatting the partition with TWRP work? – Srikanth R Apr 27 '15 at 06:46
  • IIRC CWM "formats" using something like rm -rf /data/*. It obviously does not format but rather delete everything. TWRP uses a proper binary that creates a completely new partition. As I have written: I was in a similar situation and only TWRP helped me. (Other recoveries might format properly as well, but I had a first-hand experience with TWRP) – GiantTree Apr 27 '15 at 06:50
  • Even TWRP failed to remove it. :( It said 'Unable to stat /path/to/folder/' and exited with error. – Srikanth R Apr 27 '15 at 08:02
  • Finally, I had to repair the file system. Directory got deleted with rm -r after that. Thanks! :) I wish I could upvote your answer. – Srikanth R Apr 27 '15 at 08:44

1 Answers1

1

For delete folder /data/data/ [only for rooted devices]

Install adb tool: [if already adb install than skip this step ]

Notice that in this method you will only install the platform-tools like adb or fastboot.

1.1) Download:

Download the platform-tools for your OS from https://developer.android.com/tools/sdk/tools-notes.html
Unpack it to <home-drive>\platform-tools

1.2) Mount:

The following steps are for Windows. If you need a different OS like Linux or OSX, have a look at this answer: https://android.stackexchange.com/a/42475/91312

  1. Copy the folder path.Open the Windows Explorer by pressing + E`.
  2. Right-click on This Computer → Properties.
  3. Advanced System Settings → Advanced → Environment Variables.
  4. Variable PATH → Add a ; (Semicolon) & your <home-drive>\platform-tools.
  5. Save all & close.

Commands for delete folder

 $ adb root

 $ adb remount

 $ adb rm -rf /data/data/<folder-name>

or

  $ adb shell

  $ su

  $ mount -o remount,rw /

  $ rm -rf /data/data/<folder-name>

I hope this help you.

xavier_fakerat
  • 10,065
  • 6
  • 41
  • 101