[Q] "Operation not permitted" trying to mount extSD as intSD

patchyfog

Member
Mar 24, 2012
17
0
21
Gold Coast
Hi, I've been trying to move all my game data from my internal SD card to my larger external SD card with no joy.

I have used condi's AIO tool to install init.d support, which reported as successful, but when I follow obicom's instructions as listed in POST #43 of this thread http://forum.xda-developers.com/showthread.php?t=1490116&page=5
I repeatedly receive the message "Operation not permitted."
I have used both ADB Shell and Terminal Emulator with the same result.

I'm obviously doing something wrong as other people appear to have had success with these instructions, I just don't know what.

Here's what I've done: (on rooted ICS from condi's AIO tool)

Installed init'd support "successfully"
Moved all data from sdcard/Android/data over to sdcard2/game_data

In ADB Shell/Terminal Emu. entered the following line;
mount -o bind /sdcard2/game_data /sdcard/Android/data
and this is where I get the "Operation not permitted" message.

Any ideas?
 

agc93

Senior Member
Mar 14, 2011
348
83
0
Brisbane
Once you're in shell, before running the mount command, run the command 'su' first (without the quotes). Your prompt should change from $ to # and try running the mount command again.

Explained: In most Linux systems, unless the fstab has been specifically setup to do it with the user option, filesystems can only be mounted by root. In rooted versions of Android, the normal user can elevate into a root prompt with su, then allowing you to mount and unmount any filesystems.
 
  • Like
Reactions: patchyfog

patchyfog

Member
Mar 24, 2012
17
0
21
Gold Coast
Ahaaa

Awesome! Can't believe it was something so simple, thanks, and thanks for explaining the reason.

I must have somehow totally missed the "su" instruction in the other thread.

Half of my games work, the other just seem to need re-installing which is no big drama.

Again, thanks, it's much appreciated mate.
 

patchyfog

Member
Mar 24, 2012
17
0
21
Gold Coast
Script?

Once you're in shell, before running the mount command, run the command 'su' first (without the quotes). Your prompt should change from $ to # and try running the mount command again.

Explained: In most Linux systems, unless the fstab has been specifically setup to do it with the user option, filesystems can only be mounted by root. In rooted versions of Android, the normal user can elevate into a root prompt with su, then allowing you to mount and unmount any filesystems.
Hi, is there a way I can create a script (or the like) that would do this, and other similar directory changes, at boot?
At present I need to enter these manually each time the tablet starts, which isn't too much of a drama for me but when other people use it they end up downloading the data all over again when they start a game.

Thanks
 

agc93

Senior Member
Mar 14, 2011
348
83
0
Brisbane
There is an app available on Google Play called Script Manager (which can be used to create scripts to run at boot as su (which mount command require), which should do what you need. You'll need to use a plain text editor (I believe there is one included with Script Manager) to enter each of the mount command you want to run on a separate line. Then set the file to executable (chmod +x scriptname), and add it to Script Manager.

Note that I haven't used it in a while, so follow whatever instructions Script Manager gives you. They're probably more up to date.
 

patchyfog

Member
Mar 24, 2012
17
0
21
Gold Coast
There is an app available on Google Play called Script Manager (which can be used to create scripts to run at boot as su (which mount command require), which should do what you need. You'll need to use a plain text editor (I believe there is one included with Script Manager) to enter each of the mount command you want to run on a separate line. Then set the file to executable (chmod +x scriptname), and add it to Script Manager.

Note that I haven't used it in a while, so follow whatever instructions Script Manager gives you. They're probably more up to date.
Okay thanks, yet again, I'll give it a try today.
 

lagano86

New member
Jul 20, 2017
1
0
0
Operation not permitted

Hi,i wanted to change my mac address on phone and even with that su command i get "operation not permitted" (my phone is rooted)...even apk named overclock for android could not grant root acces...in root checker my phone is rooted(and i have been rerooting it but still same).AND THERE IS NO FIX ON INTERNET
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone