[Q] Need help deleting a directory - Nexus 7 (2013) Q&A

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/details?id=com.paragon.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/details?id=jackpal.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

Bump, anyone? I want and need this folder removed
Verstuurd vanaf mijn Nexus 7 met Tapatalk

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

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_permissions,allow_other
Dump / Pass: 0 / 0
even with the app ParagonNTFS uninstalled it doesnt work

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

were you able to delete the dir?
I had the same problems under very similar circumstances. Stickmount rather than paragon. The only way I could delete the dir was to boot into recovery (team win recovery project v2.7.1.1) and delete it with TWRP's terminal command. Something in the OS apparently locks on to the mount and simply will not let it go ever. It has to be done before android starts. It's very annoying. I am beginning to really be disgusted with many of the decisions google is making with regard to android. Why do they hate sdcard expansion so much? its absurd.
---------- Post added at 04:22 AM ---------- Previous post was at 04:17 AM ----------
Oh and by the way, even though the OS latched on to that folder as if its very existence depended on it, I was never able to even see the files on the USB memory stick with any file explorer. Worked just fine in kit kat and before. In some ways lollipop really sucks.

Related

after the 1 click root - not able to mount some directories in root explorer?

I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
sedric1 said:
I used the post to install the one click root for the samsung epic 4g (sprint), and it appears to have worked. However - after entering root explorer, only some of the directories allow me to edit files. I click the remount as r/w button but nothing happens. Any thoughts?
Click to expand...
Click to collapse
Are you sure you granted root permissions to root explorer when it first ran? Run the superuser app from the app drawer and see if root explorer is on the list of apps that are allowed root permission.
I just tried v2.17.2 and it works fine. I tried changing the permissions on /system/xbin/busybox, it said filesystem mounted ro, then I press the mount rw button and redid the permission change, this time it worked no problem.
Thanks for your response-
yes, when i ran root explorer it asked if i wanted to grant superuser and i said yes. some folders allow it to remount, but - say the /system/bin folder - it doesnt allow it at all.
for further background, i used the automated instructions here for my root:
http://forum.xda-developers.com/showthread.php?t=1342728
i did option A like 5 times and also did option C (as i have EK02).
When opening root explorer it tells me that i have super user permissions. one thing to note- if i go to /system/xbin, i do not see a busybox directory. is there something else i should be installing?
in fact, i cant mount anything under the system directory or sub directories, but above that, i was able to change to r/w mode. i could also mount the /vendor directory right beside the /system directory...
If you were able to remount "/" as r/w then the problem isn't with root. That is basicly an "I'm a little bit pregnant situation" Either you are or you aren't.
Now if you weren't able to get root in the first place, then I'd look at the root.
As to busybox, there is no directory. There should be a file /system/xbin/busybox Also there should be a bunch of symlinks from various apps it supports to busybox.
I see - yea i did validate that busybox is not allowing for a mount or any type of change on that file/directory including busybox but the file is present. any suggestions on what else may be locking down this system directory?
I don't know if root file explorer is implemented it's own concept of ro/rw to protect you from making mistakes or it is using the system facilities. If it is using the system facilities, then once you remount /system as rw, then everything under /system is automatically rw. It is all the same partition.
I would try it from "adb shell" (do not type $ or # symbols)
Code:
$ su
# mount -o remount,rw /system /system
# cd /system/xbin
# chmod 755 busybox
If it lets you do that with no errors, then you have remounted /system/xbin as rw and the problem is with root file explorer. For that, you'd have to check with them or someone more well-versed in why that might be failing.
i appreciate your help
I went off googling the adb stuff/installed it and java's jdk stuff. then figured out how to run that adb shell stuff and validated that it worked (permissions were changed in places that this app didnt allow). knowing that the problem is actually with root explorer helps a ton.. as I just assumed it was working

[HOW TO] add extra +700mb to Internal memory storage +600-900MB from /system

[Tweak root] add extra +700mb to Internal memory storage from /cache & +600-900MB from /system folders.
just run terminal with root & paste code
su
chmod -R 777 /cache
mkdir /cache/"your-program-folder"
mount -o bind /cache/"your-program-folder" /storage/sdcard0/"your-program-folder"
add extra +600mb (+900mb if you have LiteRom) from /system folder.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/sharе
before you can write to /storage/sdcard/share mount it RW
su
mount -o rw,remount /system
after every reboot do it again. how add script to startup folder, any Idea?
all work great. I have 4.5GB + 700MB + 800MB internal storage for my music and maps.
But you cant use any OTA updates because your download /cache folder filed now. Remove all data before update
rm -R /system/share/*
rm -R /cache/*
Re: [Tweak root] add extra +700mb to Internal memory storage
Are you sure you got these commands right? And why don't you just make a script to automatically run these commands at boot? You know, so you don't have to keep running the commands over and over? And you have the work "program" spelled wrong. Its spelled with only 1 "m". Program, not programm.
Sent from my XT907 using Tapatalk 2
Re: [Tweak root] add extra +700mb to Internal memory storage
So what happens if you are using your whole internal sd including this 700 megs and you reboot? Does the system freak out?
Sent from my XT907 using Tapatalk 2
Update
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
Clienterror said:
So what happens if you are using your whole internal sd including this 700 megs and you reboot? Does the system freak out?
Sent from my XT907 using Tapatalk 2
Click to expand...
Click to collapse
everything will be fine, just live little more space on /cache (100mb at least)
UPDATE 1st post. add extra +600mb (+900mb if you have LiteRom) from /system folder. Now I have 6GB internal storage for my music and maps.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/share
before you can write to /storage/sdcard/shear mount it RW
su
mount -o rw,remount /system
But you cant use any OTA updates because your download /cache folder filed now. Remove all before update
rm -R /system/share/*
rm -R /cache/*
serraxer said:
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
everything will be fine, just live little more space on /cache (100mb at least)
UPDATE 1st post. add extra +600mb (+900mb if you have LiteRom) from /system folder. Now I have 6GB internal storage for my music and maps.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/share
before you can write to /storage/sdcard/shear mount it RW
su
mount -o rw,remount /system
But you cant use any OTA updates because your download /cache folder filed now. Remove all before update
rm -R /system/share/*
rm -R /cache/*
Click to expand...
Click to collapse
Well, make a new folder on your sdcard, I used root explorer. I called it "67tweaks", I then zipped up the folder, then navigated to my zipped folder and I removed the .zip extension (doing it this way allowed me to make a new text document, but theres prolly an easier way, but this is the way i used) and then I long pressed it so it would let me open it up as a text document. I deleted some jibberish that was inside, I then started with #!/system/bin/sh, then space, then pasted your commands under the space and I then placed the file under system/etc/init.d folder. Now every time I boot up, the script gets run. You can also use an app like "ROM toolbox" and go to scripts and just create a new script and select it to run at boot, or you can use SMmanager and create a script to run at boot.
serraxer said:
sniperkill
absolutely right. And why don't you just make a script to automatically run these commands at boot?
How, do it, init.rc not work.
I'm no dev so I wouldn't be able to make a script to run at boot, but if you don't have init.d support you can add a script to your init.qcom.post_boot.sh file in system/etc folder and it should run at boot.
Sent from my HTCONE using Tapatalk 2
Click to expand...
Click to collapse
Looks right to me.
Thanks for the info. I am learning to love my M more and more.
thinks, I'm going to have a try.
serraxer said:
[Tweak root] add extra +700mb to Internal memory storage from /cache & +600-900MB from /system folders.
just run terminal with root & paste code
su
chmod -R 777 /cache
mkdir /cache/"your-program-folder"
mount -o bind /cache/"your-program-folder" /storage/sdcard0/"your-program-folder"
add extra +600mb (+900mb if you have LiteRom) from /system folder.
su
mkdir /system/share
chmod -R 777 /system/share
mount -o bind /system/share /storage/sdcard0/sharе
before you can write to /storage/sdcard/share mount it RW
su
mount -o rw,remount /system
after every reboot do it again. how add script to startup folder, any Idea?
all work great. I have 4.5GB + 700MB + 800MB internal storage for my music and maps.
But you cant use any OTA updates because your download /cache folder filed now. Remove all data before update
rm -R /system/share/*
rm -R /cache/*
Click to expand...
Click to collapse
I cut and pasted this exactly and it doesn't work. Can you please reply with exact sequences. I keep getting mkdir failed for /cache/your-program-folder, File exists
Will this work on a bionic?
Sent from my DROID BIONIC using XDA Premium HD app

[method] change play store download location

Hi guys, today i am here to tell you a method only tested on a galaxy y, but i hope it will work for all. this is a method to change the download location for play store.
WARNING!!!
1. WARRANTY IS NOW VOID.
2. NOT MY PROBLEM IF SOME APP FAIL.
3. PLEASE, PLEASE, PLEASE DO A NANDROID BACKUP BEFORE THIS.
This is a simple code but it needs root for sure. now the necessities are as follows:
1. A complete nandroid backup
2. Root Permissions
3. Any terminal emulator. e.g https://play.google.com/store/apps/details?id=hecticman.jsterm
4. You need to know the default download location and the mount point of sd card( if that is where you want the new download location )
Now let's start.
Just know this that mnt/sdcard will have to be replaced by your sdcard mount point and data/app will have to be replaced by the default download location. i underlined them for easy understanding.
NOT MY PROBLEM IF THIS FAILS AND YOUR PLAY STORE CRASHES. JUST DO A NANDROID RESTORE.
THERE WILL ALREADY BE A $ AT START SO U DON'T HAVE TO PUT IT.
$ su
# mkdir /mnt/sdcard/playstore
# cp -r /data/app/* /mnt/sdcard/playstore
# rm -rf /data/app
# ln -s /mnt/sdcard/playstore /data/app
Click to expand...
Click to collapse
what the code does:
1. Grant super user permissions
2. Make a directory in sdcard named playstore.
3. Copy all items (recursively) from data/app to sdcard/playstore
4.Symlink the new location to fake the original.
Hitting Thanks can help.
and once again PLEASE BACKUP BEFORE THIS AND RESTORE IF NOT SUCCESSFUL.
This is based on the code used by link2sd.
Could you please double check your code fragments?
For me it looks, like you create a directory "playstore", but then copy to a directory "playstore-temp", which will most like not exist at that moment.
The ln you're using can't realy work as long as the /data/app directory is still in place... so you would first need to delete /rename it.
Just my 2¢
thanks dude
DThought said:
Could you please double check your code fragments?
For me it looks, like you create a directory "playstore", but then copy to a directory "playstore-temp", which will most like not exist at that moment.
The ln you're using can't realy work as long as the /data/app directory is still in place... so you would first need to delete /rename it.
Just my 2¢
Click to expand...
Click to collapse
looks like i was drunk making so much mistakes . corrected it.
It's not so simple if you use Link2SD. If you link some apps to sdext partition, some files in /data/app are symlinks which cannont be copied to /mnt/sdcard/playstore as it's FAT32. You have to try to symlink /app/data to folder on sdext partition. Create a folder /data/sdext2/playstore, copy /data/app/* there, delete /data/app and symlink /data/sdext2/playstore as /data/app. Sdext partition uses linux filesystem and all symlinks should work properly. I haven't tested it yet, but will do in a minute.
EDIT:
It doesn't work with Link2SD. Phone hangs on boot. It's probably cause Link2SD app must be directly in internal memory (so in real /data/app, not symlinked). I'll try to symlink /data/data or /data/dalvik-cache to save some internal memory but I doubt it'll work.

[Q] rooted - root explorer not copying some dirs

SM-T705, cf-autoroot (incl. SuperSU) checked with root-checker, platform.xml adapted
e.g. if I want to copy /dev to my sdcard ... there comes a message similar to "copying went wrong ... 4.4+ .... in non-root mode some limitations ..."
I won't search for you, please have a read through Q&A and General for a number of other similar questions and corresponding answer I would suggest you please contact a Mod to delete this unneeded thread
Sorry I searched and read a lot of older suggestions but did not get a clue ... and I know about the kitkat probs regarding SD (platform.xml). But still dont understand, why there are just few folders affected ...
So sorry but it seem I need a Little push into the right direction
+1 solid explorer has struggled for me, but root explorer hasn't. Seems to be only certain directories. ...idk
just to make shure - we are talking about Root Explorer (File Manager) non free app. Did you try to copy System dirs like /dev ??
if yes, where to did you copy them. I just figured out that my ext3 partition (1st=exFat, 2nd=ext3) on the SD is mounted to /data/sdext2.
but copying /dev to /data/sdext2 doesnt work either
Could someone please tell me how to Mount /mnt RW
some folder cant be copy. the only way for you to have those are extracting it from the original firmware.
THX - 2 Pprobs now
1
mount -o remount rw /System worked, but still
[email protected]:/ # mkdir /mnt/extSD2
mkdir failed for /mnt/extSD2, Read-only file System
a) with Root Explorer it seemed to work, but was gone after restart ?
b) where to mount my ext3 SDcard partition (1st exfat, 2nd ext3)
c) can I do it by modifying init.rc, universal5420.rc or fstab.goldfish ...
2 how to extract Folders from Firmware files like T705XXU1ANF7_T705DBT1ANF1_T705XXU1ANF7_HOME.tar
I extracted the files within. But how can I Mount those Image files on W8 (ext2fs does not work with my sdcard) ?
2nd best would be to go to my Linux PC (but I'm a Linux DAU) ...
try learn about kitchen or use this software on windows... ^_^ http://sourceforge.net/projects/ext2read/
sorry my english is not good enough ... kitchen seems to be a Linux tool ... this seems to be a good start http://www.modaco.com/topic/366230-tools-useful-tools-for-tinkerers/ or this http://www.diskinternals.com/linux-reader/
Best use OSFMount to Mount the *.img and "Paragon ExtFS for Windows" to view the files
mount -o remount rw /System worked, but still
[email protected]:/ # mkdir /mnt/extSD2
mkdir failed for /mnt/extSD2, Read-only file System
a) with Root Explorer it seemed to work, but was gone after restart ?
b) where to mount my ext3 SDcard partition (1st exfat, 2nd ext3)
c) can I do it by modifying init.rc, universal5420.rc or fstab.goldfish ...
mounting system.img does not work
del

[HOW-TO]Full USB OTG on Media Players in Marshmallow

It's my first relevant post in here so please be benevolent and friendly to me .
Hello everyone,
After long hours of roaming around on the internet, Moto forums, PowerAMP forums (you wouldn't believe how many people posted this problem in there), huge exchange of emails and debugs to the Nexus Media Importer dev, and checking out many many topics here on XDA, I finally came across the only way to use an USB-OTG pendrive as a music library, and having Android detect it (through the Media Service) and build the music library for other media apps to use.
tl dr; Problem: You wanted loads of music without wasting precious internal memory. You tried using an USB pen but no mp3 apps were able to find the files, nor stickmount, nor whatever.
This is so far the only way to do this on android Marshmallow.​
Believe me, I've tried almost everything one can do, including using the Nexus Media Importer, Stickmount, OTG Helper, etc (spoiler alert, none of these worked).
Why is this happening, you ask? Well, Google changed things on Android 6.x.x so much regarding filesystems and USB support that full read/write on USB OTG with other apps no longer works, although I've never tested on previous versions of Android. But I finally managed to find a way to do it, and here I intend to share it with you guys.
Requirements - Rooted phone and permissive SELinux (what is that and how do I do it? don't worry, it's easy and I'll explain a bit later)
1st step - Verify that your phone is capable of using USB-OTG. If it is not, check on play store for other apps that supposedly can enable USB Host support on your phone, although I've never tried them because I never needed, so I can't say anything. My phone is a Moto X 2014 and it comes with OTG support embedded.
2nd step - Format your pendrive as NTFS. This is very important because...
If you use your pendrive as Fat32, Android will mount it to a folder in /data/media_rw/blablabla with GID and UID 1023 (media_rw), which most apps don't have permissions to access, thus they won't be able to find your pendrive and build a music library. Why? Well, glad you asked...
...Since Fat32 doesn't support the linux permissions system, Android mounts the pendrive with the FUSE fs wrapper, which cloaks a permission system hard-coded into some file in the Android system that I wasn't able to tell how could I modify it in order to set the pen permissions as 777 root root.
You can do so by plugging your pen on a Windows PC and right clicking -> Format. Remember to backup your data, otherwise you will lose everything. Your pen will still be able to be used on Windows pcs and Macs. You could also use other fileformats...
... like EXT4 or f2fs or exFAT or whatever, but do it at your own risk. I have no idea if those would work, despite them being able to use the linux permission system.
3rd step - Install the wonderful app Paragon HFS and NTFS mounter from appstore or whatever. They say it isn't compatible with marshmallow but it is, the only issue is that it can't mount a pendrive automatically but it's very easy to do it manually. In the settings menu, you can set SELinux as permissive. Since I'm not an android dev, only an ambicious amateur, I can't really explain what it does or what happens when you do that. So far, neither me or my phone died because of that, so.
Oh by the way, whenever you insert the pen , Android will say it's corrupted and ask you to format it. DO NOT DO IT! That happens because Android doesn't natively support NTFS (hence using an external app to solve that). Oh, and since we're talking about that, there is a way for Android to natively support NTFS...
..., just search it up on XDA. Beware that it's outdated and it won't work on Marshmallow either, unless you edit the copymodulecrc script, but that goes beyond my knowledge. For now, stick to the plan.
4th step - You need to choose the folder which you want to mount the pen to, which will be a folder in the root Android folder (I chose /pen so that I wouldn't forget)
You are now probably thinking, "That's insane! You need to edit init.rc in order to do that!" Well, you're kinda right, but there is a workaround for that. Why do I do this? Well...
... if you mount the pen in another random folder such as /storage/emulated/0/pen it won't work because all the folders underlying that one have certain permission issues that don't let other media apps be able to search for music files.
So here I'll show you two ways of accomplishing this.
4.1 Editing init.rc - This is very complex and NOT RECOMMENDED unless you're very comfortable with messing with boot files. PLEASE DO NOT DO THIS if you aren't sure of what you're doing, don't tell me I didn't warn you.
So in order to do this, well, I won't explain it to you. Search it up on the internet, it's very complex and too big for me to post here. But in the end what you want to do is edit the init.rc file, adding two lines:
"mkdir /pen" and "chmod 777 /pen".
4.2 Creating a script that runs on boot - This is the one method I recommend since it's harmless, but you have to install yet another app, that allows you to run scripts at boot. I used script manager. Then create a script that mounts the / folder as rw, creates the folder /pen, chmods it to 777. I used the following:
#!/system/bin/sh
su -c mount -o rw,remount /proc /
su -c mkdir /pen
su -c chmod 777 /pen
I tried other mount -o commands with rootfs instead of /proc but they didn't work. I don't know the difference but I hope it's harmless. Anyways, let's move on.
Run the script to see if it works, and to create the folder. Use a rooted file explorer to verify if the folder was created.
5th step - Reboot your phone if you had to set SELinux as permissive, and type on the Terminal "su -c getenforce" to confirm that your SELinux is permissive.
VERY IMPORTANT - On the Paragon app, open settings and disable FS access rights, otherwise it's the same as mounting a Fat32 pendrive - not what we want.
On the Paragon app, choose the folder we created before as the folder to mount the pen to, and mount the pendrive. If you followed all the previous steps correctly, the app won't have any issues mounting the pen.
6th step - Find a way to enforce Android building a media library with the new files in the USB OTG pendrive. There are many ways to do this and I recomment the one I used, but I will tell you other ways.
I used the app jetAudio which is a media player that can also forceably build a media library. On jetAudio settings menu, press "Rebuild media library" and point to the /pen folder. It will start reading all the files and Android now detects your pendrive as a media library.
Another way would be to use an app called FolderMount, and creat a symlink from the /pen to another folder in your emulated SD storage (you know, the only folder you have access to if you're not rooted), and wait for some time until hopefully Android detects your new music. If you don't want to use FolderMount, do a symlink with another method (like the ln command)
EDIT - Another cool way I found elsewhere on StackExchange is to run this command (through a script or whatever):
am broadcast -a android.intent.action.MEDIA_MOUNTED -n com.android.providers.media/.MediaScannerReceiver (-d file:///pen)
which forces Android to run a media scan. The part on parenthesis is optional, you can use it to choose the folder in which Android runs the media scan.
Hurray! Congrats for reaching this part of the post. If you did everything correctly, all media apps will finally be able to find the files. I posted some screenies to orientate you.
Feel free to ask anything and I will try to answer or explain. Remember that I'm no Android dev so my knowledge is limited. Feel free to thank me, if you want too.
reserved post
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
AndDiSa said:
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
Click to expand...
Click to collapse
It's not as straight-forward as you're saying.
Most media player apps that weren't updated to support Android 6's native USB OTG support will not be able to read a pen's contents. This topic that I made is aimed to circumvent the issue by mounting the pen in a different way. That bug you mentioned is not something I want to solve, and even if a new kernel solved the issue that I'm talking about, most manufacturers wouldn't update their devices...
Ok, you may be right with apps which are not yet updated to support Marshmallow, I didn't check that.
gaferreira13 said:
It's not as straight-forward as you're saying.
Most media player apps that weren't updated to support Android 6's native USB OTG support will not be able to read a pen's contents. This topic that I made is aimed to circumvent the issue by mounting the pen in a different way. That bug you mentioned is not something I want to solve, and even if a new kernel solved the issue that I'm talking about, most manufacturers wouldn't update their devices...
Click to expand...
Click to collapse
Oh, and maybe now that I think of it, this could solve the problem, since mounting/unmounting is done with the Paragon app instead of Android. Give it a shot
AndDiSa said:
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
Click to expand...
Click to collapse
Using native otg function, you can only copy files between phone and otg dive. To open a file e.g. To install apk from otg, you have to first copy it to phone's storage. On many media player, video can only be played sequentially (seek bar doesn't work).
Stuck at step 4.2, folder is not created
kashinath said:
View attachment 3746340Stuck at step 4.2, folder is not created
Click to expand...
Click to collapse
Hey, is there any way for you to determine the path of your root folder? Maybe using ES File Explorer. For some phones, the root folder isn't pointed to /.
EDIT - If you can't do that, try replacing the first of those commands with the following:
su -c mount -o rw,remount,rw /system
I'm also getting the same issue as kashinath, won't let me create pen. I've also tried pointing the mounter to a directory in /storage/emulated/0/pen but it seems to just crash and restart the app.
EDIT:
Okay so I've solved the problem completely differently. The otg storage is found in /mnt/media_rw, so I used the app "FolderMount [ROOT]" to point the folder "pen" (in the internal storage) to the /mnt/media_rw/*random string* folder. I then used the app "media.Re.Scan:" to force the media scanner to scan that folder as it didn't seem to want to do it. Now all apps seem to be working.
What tipped me off about this was this post: http://forum.xda-developers.com/nexus-6/help/marshmallow-usb-otg-mounting-media-t3230588
It seems you have to turn the folder mount on/off every time you plug/unplug the USB drive otherwise it won't play the files.
Thanks for the detailed instructions nonetheless.
Viridis said:
I'm also getting the same issue as kashinath, won't let me create pen. I've also tried pointing the mounter to a directory in /storage/emulated/0/pen but it seems to just crash and restart the app.
EDIT:
Okay so I've solved the problem completely differently. The otg storage is found in /mnt/media_rw, so I used the app "FolderMount [ROOT]" to point the folder "pen" (in the internal storage) to the /mnt/media_rw/*random string* folder. I then used the app "media.Re.Scan:" to force the media scanner to scan that folder as it didn't seem to want to do it. Now all apps seem to be working.
What tipped me off about this was this post: http://forum.xda-developers.com/nexus-6/help/marshmallow-usb-otg-mounting-media-t3230588
It seems you have to turn the folder mount on/off every time you plug/unplug the USB drive otherwise it won't play the files.
Thanks for the detailed instructions nonetheless.
Click to expand...
Click to collapse
Yeah forget mounting anything in the /storage/emulated/0...
According to the post you linked in your comment, "6.0 mounts to /mnt/media_rw/ but I can't seem to get any media players to see it. I tried creating a symbolic link in /storage/emulated, but I get an error with root explorer about symbolic links not being supported" which is exactly what happened to me
If you don't like the folder mount alternative you can always do a bind command (but i'm not sure how it works), search it up and see if you get any results.
Is your pen in Fat32 though?
There is a workaround for the pen thing... If you use Total Commander and want to edit any files in /, it asks you to run a command that mounts the / folder. Try to see what command it is and replicate it into the script, then the rest might work.
Thank you so much !! It worked on my XT1033 falcon dual sim - MM6.0 identity crisis 1.3a . I can finally restore all my nandroid backups.
Just to correct shouldn't the last command in the script be
su -c chmod 777 /pen
instead of
su -c chmod /pen 777
4k5blr said:
Just to correct shouldn't the last command in the script be
su -c chmod 777 /pen
instead of
su -c chmod /pen 777
Click to expand...
Click to collapse
No, thank you
And, damn you're right, lol I'll correct it ASAP, thanks a lot for pointing it out
I'm a complete newbie at this, in fact I rooted my device just to do this
Anyways I'm getting the same issue kashinath is getting and tried the other command you recommended (su -c mount -o rw,remount,rw /system ) wich also didn't work
In that reply you also said that the root folder is different between devices so, if I determine the path to my root folder, where exactly in the script do I have to put it? (Again I'm a newbie)
Arcane35 said:
I'm a complete newbie at this, in fact I rooted my device just to do this
Anyways I'm getting the same issue kashinath is getting and tried the other command you recommended (su -c mount -o rw,remount,rw /system ) wich also didn't work
In that reply you also said that the root folder is different between devices so, if I determine the path to my root folder, where exactly in the script do I have to put it? (Again I'm a newbie)
Click to expand...
Click to collapse
For my phone the Root folder's path is "/" so I'll put 2 arrows where the path to root is in the command:
" su -c mount -o rw,remount /proc --> / <-- "
So imagine your root path is /root
The command would look like this: " su -c mount -o rw,remount /proc /root " (without "" of course)
If you still can't find the path to your root folder, try searching on the internet "root folder for xxxxx phone"
Hope it helps
gaferreira13 said:
For my phone the Root folder's path is "/" so I'll put 2 arrows where the path to root is in the command:
" su -c mount -o rw,remount /proc --> / <-- "
So imagine your root path is /root
The command would look like this: " su -c mount -o rw,remount /proc /root " (without "" of course)
If you still can't find the path to your root folder, try searching on the internet "root folder for xxxxx phone"
Hope it helps
Click to expand...
Click to collapse
Turns out my phone's root folder is also / , and I'm still getting the same error (mount: '/' not in /proc/mounts)
Maybe its because I have Nougat :/
EDIT: So I think I managed to kinda work around that, I change the command to " su -c mount -o rw,remount / " and it ended up making the pen folder and no errors came out. So I then proceeded to open Paragon, disabled FS access rights, ensured that SELinux was permissive (it is) and change the mount point to the /pen folder, I finally proceeded to manually mount the thing BUT even tough that in my notifications says that I mounted it, on the app it still says that my Flash Drive is still not mounted (even tough it detects it and know that it is an NTFS file system). Basically whenever I try to mount my Flash Drive it wont work even tough the app detects it.
Arcane35 said:
Turns out my phone's root folder is also / , and I'm still getting the same error (mount: '/' not in /proc/mounts)
Maybe its because I have Nougat :/
Click to expand...
Click to collapse
Ooooh. Remember the topic is called "Full USB OTG on Media Players in Marshmallow"
I can't help you then, sorry. The only thing I can tell you is to open the /proc/mounts file as text on the top there should be a command that tells android to mount the root folder as rootfs I believe.
Maybe that could help.
Arcane35 said:
EDIT: So I think I managed to kinda work around that, I change the command to " su -c mount -o rw,remount / " and it ended up making the pen folder and no errors came out. So I then proceeded to open Paragon, disabled FS access rights, ensured that SELinux was permissive (it is) and change the mount point to the /pen folder, I finally proceeded to manually mount the thing BUT even tough that in my notifications says that I mounted it, on the app it still says that my Flash Drive is still not mounted (even tough it detects it and know that it is an NTFS file system). Basically whenever I try to mount my Flash Drive it wont work even tough the app detects it.
Click to expand...
Click to collapse
Try to open the /pen folder, try to see in the properties of /pen if the permissions are set to 777.
gaferreira13 said:
Try to open the /pen folder, try to see in the properties of /pen if the permissions are set to 777.
Click to expand...
Click to collapse
It is set as 0777, so yes (if the 0 is not supposed to be there)
Arcane35 said:
It is set as 0777, so yes (if the 0 is not supposed to be there)
Click to expand...
Click to collapse
Hmm... If you can open the folder fine and maybe create a file in there or something then I can't help you any further. The paragon app doesn't let you do much regarding troubleshooting.
Try using the methods that other people did like using Foldermount or something like that.

Categories

Resources