Mounting SDCard with execute permissions on HTC ONE - Android Q&A, Help & Troubleshooting

I've installed LinuxOnAndroid with Fedora 19, I'm trying to get the /dev/fuse /sdcard to mount with exec permissions.
Currently it's only mounting /dev/fuse without execute permissions.

techjohnny said:
I've installed LinuxOnAndroid with Fedora 19, I'm trying to get the /dev/fuse /sdcard to mount with exec permissions.
Currently it's only mounting /dev/fuse without execute permissions.
Click to expand...
Click to collapse
Have you edited fstab?
I'm sorry, but I think it requires kernel mods.
You could use the dd command to make a .img on internal memory or the sdcard, then use
Code:
mkdir /data/extramem
busybox -o loop /sdcard/made.img /data/extramem

Lgrootnoob said:
Have you edited fstab?
I'm sorry, but I think it requires kernel mods.
You could use the dd command to make a .img on internal memory or the sdcard, then use
Code:
mkdir /data/extramem
busybox -o loop /sdcard/made.img /data/extramem
Click to expand...
Click to collapse
Finally found my answer here:
https://linuxonandroid.uservoice.com/knowledgebase/articles/74683-how-to-i-give-linux-more-space
Yes, creating a loop device and mounting was exactly what had to be done.
Thanks.

techjohnny said:
Finally found my answer here:
https://linuxonandroid.uservoice.com/knowledgebase/articles/74683-how-to-i-give-linux-more-space
Yes, creating a loop device and mounting was exactly what had to be done.
Thanks.
Click to expand...
Click to collapse
Alright, cool.

Related

[EXPANDSD] Join your external SD with internal SD!

WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
I tried gscript and init.d, but doesn't seem to be working
woohoo a great dev has come. glad you got here mate! love your work on Desire section.
harrynghiem said:
Hi mate,
Thks for your shares. I have a question. How run init_expandsd.sh?
Click to expand...
Click to collapse
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
dexterdave said:
you can try to use terminal emu, just type su then navigate to folder where the script located, then type sh init_expandsd.sh then enter. this might do the trick to execute .sh
Click to expand...
Click to collapse
Does it work for you?
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
problems when connecting phone to pc
hi,
tried the "mount --bind" in order to try your script.
works fine. the directory contents is shared between the 2 path's,
but i have a problem when i connect the phone to a pc.
when i try to disconnect, the sdcard and external_sd are not
available anymore until i reboot the phone
note: the commands that i have executed are:
Code:
mkdir /mnt/sdcard/external_sd/foo
echo "test" > /mnt/sdcard/external_sd/foo/test
mkdir /mnt/sdcard/foo
mount --bind /mnt/sdcard/external_sd/foo /mnt/sdcard/foo
Can this script be placed in init.d folder for autorun at boot?
Edit: sorry, already answered above: no, it cannot.
Sent from my GT-P1000 using Tapatalk
Seems abandoned by @ownhere
Sent from my GT-I9100
Idan73 said:
Seems abandoned by @ownhere
Sent from my GT-I9100
Click to expand...
Click to collapse
too bad, it could be very useful..
TheFirstBen said:
It's a great idea thanks a lot for your work. I was wondering why ln was not working.
But too bad it does not work for me, i get the following error :
[1] Segmentation fault
Do you have any idea why ?
Thanks again
Click to expand...
Click to collapse
got the same problem please help
How to use?
ownhere said:
WARN: For developer only.
attachment is the EXPANDSD script.
Why use it?
So many applications use /sdcard for mass data storage(gameloft, navigation...),
but I9100's internal_sd size is limit to 11G, so we need external_sd's space.
But these applications dosen't know how to use external_sd, old method is hack the apk for external_sd, but this will change apk's signature, and need smali/baksmali to work. My method work in system level, don't need change any apk file.
How to use:
1.make expandsd.ownhere dirctory in external_sd root directory.
2.move internal_sd's directory(for example:/gameloft) to expandsd.ownhere
3.run init_expandsd.sh
Theory:
use 'mount --bind' feature, bind external_sd's dir to internal_sd.
Because the sd card using fat32 partition format, the 'ln -s' command does not work, so the "mount --bind" is the only way to dynamically change the directory content.
Click to expand...
Click to collapse
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
dawabz94 said:
thanks,
this is genius
I'm not using your script (have myself some ux & scripting skills) but did not know about the -bind option on android
Ridiculously simple and efficient
Did it my own way and it works great
Thanks a lot for this
Click to expand...
Click to collapse
Then why not share with us please !
Let us know how you did
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Chairmansaab said:
Then why not share with us please !
Let us know how you did
Click to expand...
Click to collapse
Hi,
it's very easy indeed, once you got the point.
I do most of my stuff using an "adb shell" session so I'll post here my steps to get it working.
Also I like simple implementation so my script is the strict minimum needed to mount necessary folders
I assume you have a rooted device with working busybox and a kernel that supports /etc/init.d/
I suggest you do the test on a dummy folder before applying on a real folder.
So start by creating a folder called /sdcard/dummy
Do it the way you want , I do it with an "adb shell" session
Code:
cd /sdcard
mkdir dummy
Then copy some files in it (photos for examples)
Code:
cd /sdcard
cd DCIM
cd Camera
cp `ls -1 |tail -5` /sdcard/dummy
From now on, we consider we want to move transparently /sdcard/dummy to the external SD
1. move the folder to the external sd
CAUTION : I'm running a CM9 rom => my external sd is mounted on /mnt/emmc
Standard samsung sdcard mount is /sdcard/external_sd
The path might be different according to your brand and rom
Moving the folder code
Code:
cd /sdcard
mv dummy /mnt/emmc/
2. Create the mount point in the indernal SD
Code:
cd /sdcard
mkdir dummy
3.a Check the mount is successful by manually doing it
Code:
mount --bind /mnt/emmc/dummy /sdcard/dummy
3.b Check you see exactly the same thing on both folders
Both commands should return exactly the same output
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
If everything is fine, then you're good to go
4. Automate mount at boot time
Create a script in /etc/init.d to automate the mount at boot time
I personally use "vi" but most people prefer graphical UIs, I can't recommend any here, do it your own way
So basically you would go root,remount /system in read/write mode and create the file
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
vi 90binds
Insert following lines, save and exit
Note that the "sleep 60" is to let the system boot up before mounting partitions (thanks to the initial script shared here)
Code:
#!/system/bin/sh
sleep 60
mount --bind /mnt/emmc/dummy /sdcard/dummy
Change owner and permissions, flush disk cache and remount /system in read only
Code:
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cd /etc/init.d
chown root:shell
chmod 6755 90binds
sync
mount -o remount,ro /dev/block/mmcblk0p9 /system
To check, run
Code:
su
cd /etc/init.d
ls -l 90binds
The output should look like this :
Code:
-rwsr-sr-x 1 root shell [I]0 MMM D HH:MM[/I] 90binds
5. Now you can reboot and check - after reboot - that the mount is done
Both commands should return exactly the same output (always ran in an "adb shell" session)
Code:
ls -l /sdcard/dummy
Code:
ls -l /mnt/emmc/dummy
6. Now you're good to move other folders
Basically, you move the folder to external SD
Create the mount point on the internal SD
Append the mount command in the 90binds script
And that's it
Hope this helps
---------- Post added at 11:09 AM ---------- Previous post was at 11:04 AM ----------
benc88 said:
Yes I'd like to know another method also.!
Sent from my GT-I9100 using XDA
Click to expand...
Click to collapse
Just posted
Take time to read and understand the idea

[Q] SDCard Script

Can someone post the script that mount sdcard at boot?
I created a kernel but it doesn't mount sdcard at boot, it's possibile to create the script in system/etc/init.d that mount sdcard at boot?
Try busybox mount while booted to see if it's possible to mount SD Card with a script. SD card mounts automatically if it's FAT32 and it takes a little vold.fstab configuration for other file systems. You should check franco's or LG's kernel to see how to automount sd card from kernel.
This is taken from CM7, put it in init.d and see.
Turducken said:
This is taken from CM7, put it in init.d and see.
Click to expand...
Click to collapse
Thank you very much but what's that?
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $e2fsk_exitcode;
if [ "$e2fsk_exitcode" -lt 2 ];
then
# mount and set perms
$BB mount -o noatime,nodiratime,barrier=1 -t ext3 $SD_EXT_PART $SD_EXT_DIRECTORY;
if [ "$?" = 0 ];
then
$BB chown 1000:1000 $SD_EXT_DIRECTORY;
$BB chmod 771 $SD_EXT_DIRECTORY;
log -p i -t mountsd "$SD_EXT_DIRECTORY successfully mounted";
else
log -p e -t mountsd "Unable to mount filesystem for $SD_EXT_DIRECTORY!";
fi
else
log -p e -t mountsd "Unable to repair filesystem, disabling apps2sd";
fi
Click to expand...
Click to collapse
EDIT: Mount This script sdcard?
#!/system/bin/sh
mount -o remount,ro -t yaffs2 /dev/block/mmcblk0
Click to expand...
Click to collapse
RE-EDIT: The CM7 script doesn't works, in the second reboot the sd wasn't mount
The CM7 script mounts a2sd apps (apps2sd script). The second one should be like
Code:
mount -o remount,r[b]w[/b] -t [b]fat32[/b] /dev/block/mmcblk0
. As I already said, it's probably a kernel problem, vold mounts sdcards automatically.
Cricco said:
Thank you very much but what's that?
Click to expand...
Click to collapse
That part of the script mounts an ext partition if one exists.
RE-EDIT: The CM7 script doesn't works, in the second reboot the sd wasn't mount
Click to expand...
Click to collapse
As Ianis G. Vasilev said there are various ways to mount the SD card but I suspect the issue is with the kernel you've compiled. Flash francos, if it mounts then your kernel is bad. Run logcat to see what's going on.
**EDIT**
I didn't see Ianis post before I began mine...
so with
mount -o remount,rw -t fat32 /dev/block/mmcblk0
Click to expand...
Click to collapse
the sd will be mount?
EDIT: I need a script that mount sd without write or read permission, infact if i use root explorer and I go to sdcard sometimes the sdcard folder is blank, so the sd didn't mount
Read permissions are needed to see what's on the sd card. For a read-only mount replace rw with ro:
Code:
mount -o remount,r[b]o[/b] -t fat32 /dev/block/mmcblk0
I would advice you to use dmesg(should be enabled in kernel) to see if your phone detects the card and logcat to see if any errors are preventing your card from mounting.
Now i create script
#!/system/bin/sh
mount -o remount,rw -t fat32 /dev/block/mmcblk0
mount -t vfat -o /dev/block/mmcblk0
Click to expand...
Click to collapse
is it correct?

Useful Commands in Terminal Emulator

Hi guys!
I created this thread mainly because many useful things can be done in Terminal emulator. I will show you some simple commands which are useful.
Very useful if you don't have Root explorer when you need it.
Make sure you take a Nandroid backup before you try out just in case you can restore when you do something wrong!
You can get terminal Emulator from here: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Note: Most commands need root. So type su and press enter and grant superuser permissions to Terminal Emulator!
First type this command before using any of the commands below just in case(needs root)
Code:
su
Some useful commands:
Turning device off (Turns your device off very fast!! ):
Code:
poweroff
Rebooting:
Code:
reboot
Rebooting to Recovery
Code:
reboot recovery
Rebooting to download mode:
Code:
reboot download
Forcing Most Apps to install to SDcard(Root needed with Terminal Emulator, no need root with ADB):
Code:
pm setInstallLocation 2
Alternatively, you can type 0 at the end instead of 2 for Auto location install mode or 1 for Internal memory install mode
To check what the current install location is:
Code:
pm getInstallLocation
Mounting R/W in system(Use with caution)
Code:
mount -o rw,remount -t /system
If above one doesnt work, try this.
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
Unmounting R/W in system.
Code:
mount -o ro,remount -t /system
If above code doesn't work, try this
Code:
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
Moving files from sdcard to system (Use after mounting R/W):
Code:
busybox cp /sdcard/<path> /system/<path>
Example: busybox cp /sdcard/demo/framework-res.apk /system/framework/
Changing file permissions to rw-r--r-- (Use after mounting R/W):
Code:
chmod 644 <path>
Example 1: chmod 644 /system/app/mms.apk
Example 2: chmod 644 /system/app/*.apk (This command changes the file permission of all apps in the folder to rw-r--r--)
Changing the current directory:
Code:
cd <path>
Example: cd /sdcard
Listing all the files and folders under the current directory:
Code:
ls
If you want to view all the files and folders in your sdcard, type:
cd /sdcard
ls
Making a new folder:
Code:
mkdir <path>
Example: mkdir /sdcard/newfolder
Removing files (For System files, Use after mounting R/W)
Code:
rm <path>
Example: rm /system/app/demoapp.apk
Removing Folders:
Code:
rmdir <path>
Get info of your build.prop values
Code:
getprop
That's all for now. I will add a few more later!
If you have any more new commands or if I have given an improper command, feel free to post it in the thread
Thanks for reading.
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
UserU said:
Have you any idea on why if I were to enter pm set-install-location 2(SD card), the next line would be "Killed"?
Click to expand...
Click to collapse
I don't understand your question...
Anyways...Thanks for reminding me of that command!
system.img said:
I don't understand your question...
Anyways...Thanks for reminding me of that command!
Click to expand...
Click to collapse
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
u0 [email protected]:/ $ pm set-install-location 2
Killed
137|u0 [email protected]:/ $
Click to expand...
Click to collapse
UserU said:
No problem. This is the output from the Terminal Emulator. The bold command changes the default install dir to the SD card:
Click to expand...
Click to collapse
I never got that problem on adb.
Let me see....
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
panpjp said:
This:
mount -o remount rw system
Is much easier than the previous one to mount readwrite.
Sent from my GT-P7300 using xda app-developers app
Click to expand...
Click to collapse
Isnt it /system?
ok...will add to op.
Thanks.
system.img said:
Isnt it /system?
ok...will add to op.
Thanks.
Click to expand...
Click to collapse
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
panpjp said:
Not necessary for it to be /system
Sent from my Desire using xda app-developers app
Click to expand...
Click to collapse
Ok....
system.img said:
I never got that problem on adb.
Let me see....
Click to expand...
Click to collapse
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
UserU said:
Here's a thread which shed some light on the similar issue.
http://forum.xda-developers.com/showthread.php?t=1495423
Click to expand...
Click to collapse
I got it.
It needs root.
So type
su
pm set-install-location 2
Then you are done!
wow thanks !!
Bassesh said:
wow thanks !!
Click to expand...
Click to collapse
Welcome!
Useful
A question: once i tried to type
bootanimation
Click to expand...
Click to collapse
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Toni5830 said:
Useful
A question: once i tried to type
The boot animation started but..i couldn't stop it!! I could "use" the phone (i caught 4 or 5 screens) but the only thing i saw was the bootanimation.. i had to pull the battery off and restart my ace.. any solution??
Click to expand...
Click to collapse
That is the use of the bootanimation command. You can stop it either by pulling battery or closing terminal emulator!
But what I did to stop it was to rotate my phone to landscape and somehow close terminal emulator.
But in ADB it is easier to stop using exit command.
how to get info about /system memory and /data memory ?
rajxelton said:
how to get info about /system memory and /data memory ?
Click to expand...
Click to collapse
What info do you exactly want? Free Space, Partition Size or Used space?
system.img said:
What info do you exactly want? Free Space, Partition Size or Used space?
Click to expand...
Click to collapse
partition size. well can you tell me for all.
Anyone know a command to trigger media scanner?
Thanks for the commands. Quite new to all of this and these will help me understand things a little better

[CM11][4.4]SD Switch KitKat

Hallo, I want to know how I can switch the SD cards from external to internal in CM11?
I didn't find vold.fstab.
Thanks
SWTR said:
Hallo, I want to know how I can switch the SD cards from external to internal in CM11?
I didn't find vold.fstab.
Thanks
Click to expand...
Click to collapse
Since 10.2 I've done it by uncommenting the #persist in the Vold section toward the end of the build.prop but it isn't working for me in cm11. At least on my Moto Bionic that works. I still can't find a way but if you find out how I'd love to know.
Sent from my Bionic
bump also looking for solution
Use script manager to execute this script at boot..
For GalaxySL = i9003
#!/system/bin/sh
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:49 /mnt/media_rw/sdcard0
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:1 /mnt/media_rw/sdcard1
Can't be installed inside "init.d" folder.. Suggest to use /data..
Replace the id = 179:49 and 179.1 according to your device internal and external id.You can check them by executing the command:
mount | grep sdcard0
and
mount | grep sdcard1
to swap change the id.. change the sdcard0 id to sdcard1..
It ain't working
adx3660 said:
Use script manager to execute this script at boot..
For GalaxySL = i9003
#!/system/bin/sh
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:49 /mnt/media_rw/sdcard0
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:1 /mnt/media_rw/sdcard1
Can't be installed inside "init.d" folder.. Suggest to use /data..
Replace the id = 179:49 and 179.1 according to your device internal and external id.You can check them by executing the command:
mount | grep sdcard0
and
mount | grep sdcard1
to swap change the id.. change the sdcard0 id to sdcard1..
Click to expand...
Click to collapse
Installed the Script manager,wrote the scripts but while executing it says no unmount command found....
vivin007 said:
Installed the Script manager,wrote the scripts but while executing it says no unmount command found....
Click to expand...
Click to collapse
What phone?
Samsung Galaxy Tab P1000
adx3660 said:
What phone?
Click to expand...
Click to collapse
P1000 Installed with Cm11 terecheng 25-12-2013.....
External to Internal sdcard app also is a no go.....its only a partial success
vivin007 said:
P1000 Installed with Cm11 terecheng 25-12-2013.....
External to Internal sdcard app also is a no go.....its only a partial success
Click to expand...
Click to collapse
I am sorry @vivin007 I don't have that device.. but I suggest you to double check the code that u typed in and try to ask in your device section the code and how to mount and unmount sd.. I am really2 sorry..
Up!
Sorry, but also looking for a better solution than linking!
I am currently trying this http://forum.xda-developers.com/showpost.php?p=48876834&postcount=472
so far so good but havent tested it much, i think games run slower..
No Problem dude
adx3660 said:
I am sorry @vivin007 I don't have that device.. but I suggest you to double check the code that u typed in and try to ask in your device section the code and how to mount and unmount sd.. I am really2 sorry..
Click to expand...
Click to collapse
Ha ha ha ....No Problem dude...You did a great Job helping me!
BTW Wish you a Happy New Year....
Will find a Solution....
vivin007 said:
Ha ha ha ....No Problem dude...You did a great Job helping me!
BTW Wish you a Happy New Year....
Will find a Solution....
Click to expand...
Click to collapse
Happy New Year too.. don't forget to share if u find a solution,,
Found it for P1/L/N Tab
adx3660 said:
Happy New Year too.. don't forget to share if u find a solution,,
Click to expand...
Click to collapse
Got Sd switched @adx3660 dude for P1/L/N Tab after Requesting such a feature with the Terenceng dev in his CM11 Roms, he was kind enough to build it for me.
He has asked me to test it, I am going to do it Now.
Folder mount
Gesendet von meinem Xperia SP
adx3660 said:
Use script manager to execute this script at boot..
For GalaxySL = i9003
#!/system/bin/sh
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:49 /mnt/media_rw/sdcard0
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:1 /mnt/media_rw/sdcard1
Can't be installed inside "init.d" folder.. Suggest to use /data..
Replace the id = 179:49 and 179.1 according to your device internal and external id.You can check them by executing the command:
mount | grep sdcard0
and
mount | grep sdcard1
to swap change the id.. change the sdcard0 id to sdcard1..
Click to expand...
Click to collapse
Thanks, this worked on my galaxy ace plus! But having unmount before mount threw some error like device is busy or something, works if I just have the mount command.
adx3660 said:
Use script manager to execute this script at boot..
For GalaxySL = i9003
#!/system/bin/sh
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:49 /mnt/media_rw/sdcard0
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:1 /mnt/media_rw/sdcard1
Can't be installed inside "init.d" folder.. Suggest to use /data..
Replace the id = 179:49 and 179.1 according to your device internal and external id.You can check them by executing the command:
mount | grep sdcard0
and
mount | grep sdcard1
to swap change the id.. change the sdcard0 id to sdcard1..
Click to expand...
Click to collapse
Cant execute those commands with terminal?
TecknoFreak said:
Cant execute those commands with terminal?
Click to expand...
Click to collapse
Why not give it a test.. :good:
p/s: I am not responsible for anything happen while / when you using this script..
Guys Im a newbie here but Ive been looking for a way to swap my Galaxy Tab 2 7'0's (running CM11 ) external sd with the internal memory. ive tried several scripts and guides but I just cant seem to find a solution. Is there a memory swap mod made for it or can anyone help me with that.
Hi can u help me? how to swap memory with 2.5 build.. i have some trouble with that.. (newbie here )

[SOLVED] Missing apps after reboot - Apps linked to SD card (Link2SD)

Hello!
I linked some apps to SD card second partition with Link2SD app.
After restarting my device the linked apps were missing.
I used the quick reboot feature, which fixed the problem temporary.
Do I really have to quick reboot my phone after every reboot to access the linked apps or is there a way to fix this problem?
write your own mount script.
aIecxs said:
write your own mount script.
Click to expand...
Click to collapse
I don't know how to, but I found the file which has the problem.
What should I make writeable: Group/Global?
Is it safe to change those settings?
Sorry, I'm a noob
get yourself a root explorer and find the /data/adb/service.d directory. there should be mount script for Link2SD. please show the contents of this file.
aIecxs said:
get yourself a root explorer and find the /data/adb/service.d directory. there should be mount script for Link2SD. please show the contents of this file.
Click to expand...
Click to collapse
I found the folder, but it's empty.
okay then create one. set permissions executable. replace mmcblk1p2 with proper partition.
/data/adb/service.d/40link2sd
Bash:
#!/system/bin/sh
test -d /data/sdext2 || exit 1
umount -l /data/sdext2
until grep -q /data/sdext2 /proc/mounts; do
mount -t ext4 -o rw,nosuid,nodev,noatime,nodiscard /dev/block/mmcblk1p2 /data/sdext2
sleep 1
done &
edit: fixed typo: grep (missing file name)
aIecxs said:
okay then create one. set permissions executable. replace mmcblk1p2 with proper partition.
/data/adb/service.d/40link2sd
Bash:
#!/system/bin/sh
test -d /data/sdext2 || exit 1
umount -l /data/sdext2
until grep -q /data/sdext2; do
mount -t ext4 -o rw,nosuid,nodev,noatime,nodiscard /dev/block/mmcblk1p2 /data/sdext2
sleep 1
done &
Click to expand...
Click to collapse
Thanks for your help, but as I said I'm a beginner so there are a few things I don't understand.
- What is the extension of the file?
- How to exactly set the RWX settings?
- Should I put a space after mmcblk1p2, then type ext4?
no suffix. like in your screenshot. spaces matter.
aIecxs said:
no suffix. like in your screenshot. spaces matter.
Click to expand...
Click to collapse
space matter. Like this?
/dev/block/mmcblk1p2 ext4/data/sdext2
no. exactly as in post #6
aIecxs said:
no. exactly as in post #6
Click to expand...
Click to collapse
you said replace mmcblk1p2. what does that mean? how to?
check cat /proc/partitions from terminal which is the 2nd partition of your MicroSD card. if you did not create 2nd partition yet, will tell you.
aIecxs said:
check 'cat /proc/partitions' which is the 2nd partition of your MicroSD card. if you did not create 2nd partition yet, will tell you.
Click to expand...
Click to collapse
i have the second partition, but what do you mean replace mmcblk1p2 ?
which is the block device name of your second partition?
aIecxs said:
which is the block device name of your second partition?
Click to expand...
Click to collapse
ext4? im not sure if you meant that
get a terminal emulator app (or connect phone to PC adb shell) and check the output of following command:
Code:
cat /proc/partitions
aIecxs said:
get a terminal emulator app (or connect phone to PC adb shell) and check the output of following command:
Code:
cat /proc/partitions
Click to expand...
Click to collapse
if your 2nd partition is mmcblk1p2 then just mount /dev/block/mmcblk1p2 as in post #6 (nothing to replace)
aIecxs said:
if your 2nd partition is mmcblk1p2 then just mount /dev/block/mmcblk1p2 as in post #6 (nothing to replace)
Click to expand...
Click to collapse
How can I check that? I dont understand the output of the command
you can double check first partition with grep /dev/block/vold /proc/mounts
Code:
:/ $ grep /dev/block/vold /proc/mounts
/dev/block/vold/public:179,129 /mnt/media_rw/8075-15FD vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
in my case 1st partition is
179 129 1935608 mmcblk1p1
therefore next minor is 2nd partition
179 130 1935607 mmcblk1p2

Categories

Resources