Mount Error SDext2 - Sony Xperia M4 Aqua

Hi,
I am attempting to use Link2SD app to utilise a second external SD card. However, I receive mounting error. I have tried to emulate the scenario within (SM) script manager by running the mount script (see below). However, the error is the same. ("Permission denied or invalid argument").
ROM: Marshmallow 6.0.1
Rooted with root access.
script: mount -t ext2 -o rw /dev/block/mmcblkp2 /data/sdext2
Any ideas?
Thanks!

Link2SD does not work with Android 5 or above, you need Apps2SD (App2SD: All in One Tool [ROOT])
This tool can create the mount script, afterwards you can chose to use Link2SD or stay with Apps2SD which can also do the job.

Related

[Q] mount -o bind at boot on stock rom

Hi !
I have an application (CamScanner) with large amount of data (~8Gb). This app doesn't support transfering data do external SD card, so I checked mount -o bind command to bind directory with data stored on external SD to directory in /sdcard and it's working correctly. Question is where I can put this command so that system will run it at boot time after external sd card is ready. There is no /etc/init.d directory on my SGS2 (stock XXKI4). I prefer not to install any applications to perform such a simple task...
Thanks for help, regards !
slig said:
I prefer not to install any applications to perform such a simple task...
Click to expand...
Click to collapse
I think you have no choice, as stock kernels do not have init.d support. You'd need to go down the route of either using an app to run a script on boot, install a kernel with init.d support, or stick with your current method of manually running a script when you need to use the app.
Also, you could try asking the developers kindly to allow saving to external_sd. There's an Email Developer link on the Android market, and a Contact Us link on their website
Thanks for response. I found script named init.rc located in "/", it has several mount commands inside, wonder if it can be used...
Also discovered that app Tasked has ability to run shell scripts with root privileges (at boot or at application start). I suppose I have to put this shell script in /system because in /sdcard owner permissions cannot be set so that file cannot be modified (vfat does not support that) and a security hole would be created...
I think that I'll also ask developer for this feature as You suggest.
slig said:
Thanks for response. I found script named init.rc located in "/", it has several mount commands inside, wonder if it can be used...
Click to expand...
Click to collapse
Everything in "/" is initramfs, a volatile ramdisk changes to which would be lost
on reboot. Only exception are directories in which actual partitions are mounted,
like /system and /data (you can check which directories with "mount" command).
Have you tried just using symbolic link?
INFO
This may be the best solution, try something like:
Code:
mkdir /sdcard/AppFolder
ln -s /sdcard/AppFolder /data/data/com.your.application.data.folder
Just in case you don't know, you can execute those command using
Terminal Emulator. You were considering modifications to /, so I guess you already have root.
Yes, I have rooted my SGS2 via ZergRush.
I didn't know that / is volatile initramfs, thanks for that information.
As for symbolic link - unfortunately on my stock ROM both /sdcard and /sdcard/external_sd filesystems are vfat and don't support symbolic linking. Only working way I discovered is bind mount.
In my case, I have the following:
mount -o bind /sdcard/external_sd/CamScanner /sdcard/CamScanner
And application runs OK, all data is accessible and doesn't consume internal flash memory.
I'll take a look how hard would be to write some small application to do just this task - define some pairs of source and target directories and mount - bind them at start.
I've somehow missed the fact that you're need redirection from /sdcard
to /sdcard/external_sd, I was thinking about symlink on /data...
Anyways, there another nice trick you can do - if you can devote your SD card
to this one application, then just edit /system/etc/vold.fstab to make SD card
mount in /sdcard/CamScanner instead of /sdcard/external_sd.

[Q] Link2SD:2nd partition shown but still not working

I tried to install Link2SD in Micromax A58 as the internal storage is very low and need to install some more apps. Already rooted and installed Link2SD to use the ext4 2nd partition of my 8 GB SD card. After trying with all possible ways, couldn't get it worked. All the time it was showing error--
"Mount Script can not be created. Mount: No such file or directory"
Previously even the 2nd partition was not shown as mounted in the storage info of Link2SD but after modifying the install-recovery.sh in /etc path, the storage info now atleast showing the 2nd partition as mounted. My install-recovery.sh looks like below--
#!/system/bin/sh
/system/xbin/daemonsu --auto-daemon &
/system/etc/install-recovery-2.sh
mount -t ext4 -o rw /dev/block/mmcblk0p2 /data/sdext2
mount -t ext4 -o rw /dev/block/vold/179:2 /data/sdext2
Now, the problems are as below--
1) Installed multiple applications but none of them are actually linked to SDcard. The Link2SD shows them as 'On SD Card' and just after installing 9-10 small applications, the internal memory is now full. If I go to 'Create Link', it is giving error '/data/sdext2 mount not found'.
2) When try to recreate mount script and choosing 'ext4' as parameter, it still throws error
"Mount Script can not be created. Mount: No such file or directory"
It seems that even though the storage info shows the 2nd partition as mounted, but system couldn't identify it somehow. So, Link2Sd is not working at all.
Please help and advice further. Thanks a lot.

[Q] Error in init.d script

Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
meciu99 said:
Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
Click to expand...
Click to collapse
Try this: https://www.youtube.com/watch?v=nWN0tOSPFv4
It should work fine!
in this tutorial I can expand RAM memory, but this is I dont want to do.
I have about 800MB left in internal storage - and I cant install big games like Asphalt 8, and because of that I want to create script to automatically swap internal with external memory.
I've tried already apps like Internal 2 External SD, Link2SD, DirectoryBind, FolderMount.

can't mount 2nd partition after cm update

I have a 2nd ext4 partition on my sdcard that has apps installed on it. After doing a CM update, all those apps are missing and I can't recreate the mount scripts.
When I go into link2sd and try to recreate the mount scripts I get a dialog asking me to choose the filesystem with this path in it:
Code:
/dev/block/mmcblk1p2
I choose ext4, because that is the filesystem of my 2nd partition, and then I get an error:
Code:
mount:'/dev/block/vold/179:66'->'data/sdext2' no such file or directory
I've verified that /data/sdext2 exists. Any help or suggestions are greatly appreciated, thanks.

Help Remount Default /sdcard PATH, Please

Reasons:
0.) You know, apps like messing up internal storage.
1.) I have installed dozens of ROMs flashed with DualBoot Patcher(It's a great tool), and all of them share the same /sdcard path( /data/media/0, actually it's /raw/data/media/0 ), it's a terriable mess.
2.) Android Nougat does NOT have xposed yet, so I cannot use xposed module XInternalSD to do this.
Due to /sdcard being linked to /storage/emulated/0, I should mount -o bing $another_path to /storage/emulated/0.
What I want to do is:
remount $data_partition_mount_point/media/$my_path to /storage/emulated/0 when the phone is booting, so my system can use another path for internal storage
I want to unmount the default /storage/emulated and only to mount /storage/emulated/0 to keep /storage/emulated clean.
CAN I ?
But after too many times failed, I failed again. I CANNOT mount $my_path as Internal Storage again. It ends up with "Access Denied",or "cross-device link", or seperated permissions(not as a sdcard)
Also, I tried to modify install-recovery.sh to let my scripts execute when booting, but sepolicy denied my orders (like mkdir, mount, setenforce ). So, I run my scripts via APP "Boot Shell".
Is there anyone who know how to do this? Or, can a script change the default Internal Storage path?

Categories

Resources