Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,959 Members 44,711 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Need help deleting a directory

Tip us?
 
Ch3vr0n
Old
#1  
Senior Member - OP
Thanks Meter 23
Posts: 185
Join Date: May 2009
Exclamation [Q] Need help deleting a directory

So here's the thing i've been exploring the possibilities of USBHost and decided to try an usb stick so i installed Paragon https://play.google.com/store/apps/d...aragon.mounter

It took me a while to get the hang of things. At first my usbstick was formatted in fat32. I specified in paragon i would like the default mount point to be USBStorage instead of /paragonNTFS. I made a small typo at first and named the folder usbStorage

now here comes the problem.

for some reason the app created 2 subfolders called sdb1 and sdb2 and i cannot remove them

Things i've tried:

cyanogenmod file manager in root access mode
-- delete directory > "This operation needs elevated permissions. Try switching to root access mode" (translated from dutch so wording may be a bit off
-- modifying permissions of folders > denied > changing permissions failed. for security reasons some filesystems, such as on sdcards do not allow changing permissions

Same problem for Astro file manager
Same problem when attaching the tablet to computer. parent directory (and sub dirs) get "removed" in windows but when checking the file system on the tablet, the opposite is true and the directories is still present

and now it's starting to piss me off. I want that folder "usbStorage" and it's subfolders "sdb1" and "sdb2" removed. so my guess is it'll have to be done by terminal commands but my terminal experience is ZERO.

in preperation of you guys helping me installed https://play.google.com/store/apps/d...al.androidterm the same one used in cyanogenmod roms. I tried a bit of tinkering myself but prob doing something wrong

what i've tried (in sequence, --ok behind the command means it was succesfully executed)

su --ok
cd sdcard --ok
*rm -rf /usbStorage >> *rm: not found
rm -rf /usbstorage --ok, but folder was still present
rm -rf usbstorage --rm failed for usbStorage, Directory not empty
cd usbStorage --ok
rm -rf sdb1 --ok, rm failed for sdb1, Permission denied

at that point i gave up. I hope you guys can help me out


I do have paragon configured properly now and my USBstick in NTFS is getting recognised. Upon mounting of the usbstick, it now creates a folder called "USBStorage" where the contents of the usb stick is properly displayed.

so where are those android terminal / linux masters to help me out

only thing i can add is that when opening paragon with the stick attached but unmounted i do see a line above it /dev/block/sda1 but that doesn't seem to affect mounting in the specified directory
Device: *** UNLOCKED *** PYRAMID PVT SHIP S-OFF RL
Current Rom: CM11 with ION by sultanxda
Previous Rom(s): CM11 with CAF 3.4.0 kernel , CM10.2 with ION by sultanxda , ViperS 3.1.4 with Sense4+, Stock HTC rom
Recovery: 4EXT Touch 1.0.0.6 RC3 + 4EXT Recovery Control 2.4.6
Kernel: Sultan kernel Pure v1.7.0
Fw: Universal 3.33
 
Ch3vr0n
Old
#2  
Senior Member - OP
Thanks Meter 23
Posts: 185
Join Date: May 2009
Bump, anyone? I want and need this folder removed

Verstuurd vanaf mijn Nexus 7 met Tapatalk
Device: *** UNLOCKED *** PYRAMID PVT SHIP S-OFF RL
Current Rom: CM11 with ION by sultanxda
Previous Rom(s): CM11 with CAF 3.4.0 kernel , CM10.2 with ION by sultanxda , ViperS 3.1.4 with Sense4+, Stock HTC rom
Recovery: 4EXT Touch 1.0.0.6 RC3 + 4EXT Recovery Control 2.4.6
Kernel: Sultan kernel Pure v1.7.0
Fw: Universal 3.33
 
userdelroot
Old
#3  
Senior Member
Thanks Meter 155
Posts: 330
Join Date: Aug 2010
Location: Florida

 
DONATE TO ME
From my understanding of your post.
You are rooted and using cyanogenmod?

Did you try going into the app information and clear data?

In the app drawer hold the app and then drag it to App Info
Clear data.
Did that solve it? If not continue below.

Make sure you don't have the USB stick mounted and or plugged in.
Then go into terminal and type

su

Then type.

mount

The mount command shows all listed mount points. If you don't see the usbStorage or whatever mounted.
Then type.

busybox rm -rf usbStorage

Or whatever the main directory is...
For example directory is at.
/sdcard/usbStorage

cd /sdcard
rm -rf usbStorage


Let me know how you make out.

Sent from my Galaxy Nexus using xda app-developers app

Install or Mount (IOM)
IOM will create a chroot linux environment in android.
IOM will mount a chroot linux environment in android.



If you like my work please Donate
 
Ch3vr0n
Old
#4  
Senior Member - OP
Thanks Meter 23
Posts: 185
Join Date: May 2009
nope, my phone is running CM 10.2 (not relevant to the question) this is the nexus section and its my nexus 7 2013 running stock rom but rooted yes that needs the folders removed.

The folders i need to delete according to the Nexus 7 mount main mount path SD content

main path: /storage/emulated/0 or /storage/emulated/legacy (both are the same according according to ParagonNTFS as a folder the mount path /sdcard/USBStorage = /storage/emulated/0/USBStorage or /storage/emulated/legacy/USBStorage


important lines?

/dev/fuse /storage/emulated/0/ fuse rw,nosuid,nodev,realtime, user_id=1023, default_permissions,allow_other 0 0
/def/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,relatimeuser,user_id=1023, group_id=1023,default_permissions,allow_other 0 0
folders to delete are
/storage/emulated/0/usbStorage
/storage/emulated/0/usbStorage/sdb1 <= can select these just fine
/storage/emulated/0/usbStorage/sdb2
/storage/emulated/0/ParagonNTFS <= simply selecting this folder prompts CM manager "this operation needs elevated priviledges. Try switching to rootmodus, even when the CM filemanager already is in root mode


so i went

Opening terminal
su
cd sdcard (command ok)
cd usbStorage (commando ok)
busybox rm -rf sdb1
rm: can't remove 'sdb1': permission denied

Then i tried

cd /sdcard
rm -rf usbStorage
rm failed for usbStorage, Directory not empty
cd usbStorage
rm -rf sdb1
rm failed for sdb1, Permisison denied
busybox rm -rf sdb1
rm: can't remove 'sdb1': Permision denied

According to Cyanogen mod file manager:

Filesysteminfo:
Status: rw
linkpath?: /storage/emulated/0
Device: /dev/fuse
Type: fuse
Options: rw,nosuid,nodev,relatime,user_id=1023,default_perm issions,allow_other
Dump / Pass: 0 / 0

even with the app ParagonNTFS uninstalled it doesnt work
Device: *** UNLOCKED *** PYRAMID PVT SHIP S-OFF RL
Current Rom: CM11 with ION by sultanxda
Previous Rom(s): CM11 with CAF 3.4.0 kernel , CM10.2 with ION by sultanxda , ViperS 3.1.4 with Sense4+, Stock HTC rom
Recovery: 4EXT Touch 1.0.0.6 RC3 + 4EXT Recovery Control 2.4.6
Kernel: Sultan kernel Pure v1.7.0
Fw: Universal 3.33
 
userdelroot
Old
#5  
Senior Member
Thanks Meter 155
Posts: 330
Join Date: Aug 2010
Location: Florida

 
DONATE TO ME
hmm
try

close the app ParoganNTFS and uninstall it.
then try to delete those directories.

Also when you type
mount
does it show any of the directories you are trying to delete as mounted?
if it is try
umount /sdcard/usbStorage/sdb1
rm -rf /sdcard/usbStorage/sda1
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes