*****************The main content of the question

A few months ago, I accidentally disconnected the device during the execution of the adb push instruction and left a folder with more than 30 GB of garbled characters, which contained many garbled files, This caused a lot of waste of storage space.

The file management programs on Android (such as RootExplorer, Estrongs, etc.) cannot delete the garbled folder

I have tried many ways in many attempts, such as deleting files in adb-shell environment, various methods found on google, and even the busybox terminal program on Android devices, none of them work. The current situation is that I can use the cd command to enter the folder, the rm command with the file name parameter will report an error, the rm command with the inum parameter will not report an error, but the rm command parameter with the inum parameter is invalid after the execution (in the output of the ls command Neither the content nor the Android space status has changed)

The sample command prompt (adb) code snippet is as follows

C:\Users\14520>adb shell
c2q:/ $ cd /sdcard/shit
130|c2q:/sdcard/shit $ cd $(find -inum 11939)
c2q:/sdcard/shit/闊 $ ls -il
total 3009874
36369 drwxrwx--- 3 root everybody       3488 2021-09-07 23:27 2001-00-鐣欎綇杩欎竴鍒荤郴鍒?-5[瀛旈泙寤婃繁椋為摱鑺増][WAV]
34351 drwxrwx--- 3 root everybody       3488 2021-09-07 23:29 2001-00-鐣欎綇杩欎竴鍒荤郴鍒?-10[瀛旈泙寤婃繁椋為摱鑺増][WAV]
c2q:/sdcard/shit/闊 $ find -inum 3488 -exec rm -rf {} \;
c2q:/sdcard/shit/闊 $ ls -il
total 3009874
11946 -rw-rw---- 1 root everybody     253384 2020-05-21 20:04 mgsvtpp.[v4.0.6].zip
39450 drwxrwx--- 8 root everybody       3488 2021-09-07 23:36 銆傚師澹板甫
35775 -rw-rw---- 1 root everybody       1089 2020-04-20 21:30 鏃犲嵃鑹搧.lnk
35826 -rw-rw---- 1 root everybody 2277719590 2019-03-11 12:06 缇ゆ槦.-.[鎽囨粴涓浗涔愬娍鍔沒.婕斿敱浼?(DVDRip)_9522f.mkv
c2q:/sdcard/shit/闊 $

Full screenshot of this code snippet Explanation: The folder with an inum of 11939 is the top level of the garbled folder

Resetting the phone is a bad idea because it costs too much, I don’t want to do it now.

Is there any other way here? If anyone can help me solve this problem(Delete garbled folders without losing other data), I can buy him a(large-large) cup of coffee.

Thanks all the friends here.(My English skills might not be very good, If there are some grammatical problems, forgive me please)

*****************Supplement to what I forgot to say

·I tried "rm with FOLDER_PATH" and "RM with FOLDER_INODE_NUMBER", after running it will return "not found" and no effect (I discovered this before asking the question, but I forgot to add it to the sample code snippet)

# sample example for the Two usages of command “rm” I used refered above
# rm with folder_name
rm -rR NAME
# rm with inode_number, 11939 is inode_number
cd $(find -inum  [11939] )
find -inum 11939 -exec rm -rf {} \;

·All the Android application I knowned cannot delete the garbled folder without root ·The garbled folder is in the internal storage instead of the external storage. ·The model of this device is Samsung Note20 Ultra 12+512G, rooting will cause the loss of data and several functions. The reason I never want to format the partition is that there are too many 504G files to be backed up.

*****************Approximate provisional conclusion

The current situation and imformation proves that: to delete garbled folders without root permissions, It is not feasible to use the "rm" console command (either pointing to path or inode-number'). I can only backup and format the entire partition(contains 504G files). I want to ask a question to see if there is any way to delete the garbled folder without losing other data, but it seems that there is no such way.

By the way, I have paid less attention to stackoverflow these days and did not reply to your message in time. Sorry.

Alas, if there is no other way, I can only format the entire partition (containing 504G files) another day. All in all, thanks to everyone who tried to help me.

  • 1
    Does "c2q:/sdcard" mean that the folder is on an external SD card? Because if so, I'd just backup the intact folders on the SD card on a PC, reformat the SDcard, and then copy back the folders. If it is on the local file system, which I expect to be an ext3/4 variant, I'd think that fsck ought to be capable of returning the folder to a deletable state.
    – LSerni
    Nov 14, 2021 at 14:17
  • @LSerni Thank you for your help, In the most android, the factual path of Internal storage is "/storage/emulated/0/", It’s easier (shorter) to write the path "/sdcard/" (so I often use this way). BTW, the sdcard path is "/storage/SDCARD_NAME/". And I also thought of this. If the folder is in an SD card, it is much more-more convenient(I can use the SD card reader to directly connect to the computer to managing the files on SD card, and there will be fewer permissions issues). There are other things that cannot be stated due to space limitations, I added at the end of the problem description.
    – Xinge
    Nov 16, 2021 at 21:17

1 Answer 1


Can you simply run rm -rf BAD_FOLDER?

If that still doesn't work you've got two options:

  • If you can root your device without destroying your data partition (many modern devices wipe your data when doing that), root it and run e2fsck - your folder might actually be corrupted.

  • If you cannot root your device, backup everything and Factory Reset it - that will format your user partition and the issue will be gone.

  • Thank you very much for your help, neither "rm with FOLDER_PATH" nor "rm with INODE_NUMBER" work (returns "not found"). Root will cause my device to lose some important functions (such as Samsung pay, etc.) and lose data, so I don't want to root. There are other things that cannot be written due to space limitations, I added at the end of the problem description.
    – Xinge
    Nov 16, 2021 at 21:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .