[Q] Problem with creating symbolic link in Android - Nexus 7 Q&A, Help & Troubleshooting

Hello,
I need some help with creating symbolic link for my Nexus 7. I used USB OTG Helper to mount my USB Flash Drive. The app then mount my USB Flash drive at /storage/UsbOtgDrives. I can also access the Flash drive at /usbdisk or /mnt/usbdisk. I want to create a symbolic link from either of these 3 folders:
/storage/UsbOtgDrives
/usbdisk
/mnt/usbdisk
to my sdcard folder at /sdcard/usbdisk. These are the command I used for android terminal and its error message
ln -s /mnt/usbdisk /sdcard/usbdisk =======> link Failed Function not implemented
su ln -s /mnt/usbdisk /sdcard/usbdisk =======> No error shows and nothing is created
I just want some way to create a symbolic link from a folder to my USB Flash drive (and the folder MUST be within the /sdcard directory). I am seriously mad at this point cuz I have a Linux system and I use similar command and it works without any problems. Is there a limitation on Android? I am thinking of tampering with USB OTG Helper code so that will change the mount point /sdcard/usbdisk
Please let me know if anybody has found a solution to this problem. I search all over Google and it seems nobody has been able to create a concrete solution. Thanks for your help.

This answer is way too late, but I incidentlry stumbled onto this question. In case anyone else has the same question and needs the same answer. Here it is:
Your SDcard is formatted as FAT32. FAT32 doesn't support symbolic links. If you would put your SDcard in the sdcard reader of your linux system you won't be able to make symlinks either.

Related

[Q] Redirect mount point of External SD..

Can I change the mount point of the External SD card (microsd) from
/mnt/external_sd
to
/mnt/sdcard/MicroSD
I tried changing the entry in vold.fstab to no help. it wasn't mounted to /mnt/external_sd but it also wasn't mounted to the MicroSD folder i made on /mnt/sdcard
This would let any program that doesn't have the ability to handle the external SD card to be able to access it as it wouldn't know where it was. I could then do this to USB drives plugged in as well.
Nova5 said:
Can I change the mount point of the External SD card (microsd) from
/mnt/external_sd
to
/mnt/sdcard/MicroSD
I tried changing the entry in vold.fstab to no help. it wasn't mounted to /mnt/external_sd but it also wasn't mounted to the MicroSD folder i made on /mnt/sdcard
This would let any program that doesn't have the ability to handle the external SD card to be able to access it as it wouldn't know where it was. I could then do this to USB drives plugged in as well.
Click to expand...
Click to collapse
This might not exactly be the route you wanna take, but have you tried adding a symlink? Might do the trick, then again, I'm having a little issue with the same thing right now. Looks like this has been a popular subject lately
symlinks seem to be inoperable in HC.
Found this on another forum
Have you tried "bind" mounting?
Doesn't wok for me as I have a stock (unrooted) transformer...
cd /mnt/sdcard
mkdir MicroSD
mount -o bind /mnt/external_sd /mnt/sdcard/MicroSD
Click to expand...
Click to collapse
Works fairly well. Doesn't effect the storage count for the internal memory however. if we could actually mount it to a folder inside the scdard mount then it may show up as extra space, but i kinda doubt that bit.
Those system files are overwritten on each reboot so you have to "mount -o bind" on every reboot.
If you find a way to make this mount point permanent let me know, I am looking for a way as well.
If you're rooted, I think USB Mount All did this.
powercat_ said:
Those system files are overwritten on each reboot so you have to "mount -o bind" on every reboot.
If you find a way to make this mount point permanent let me know, I am looking for a way as well.
Click to expand...
Click to collapse
What system files? Its simply a mount point created and handled in memory. its never added to a file. I forget what the start up command file is in linux that is the sister of DOSs Autoexec.bat. It would need to be added to that as the last command. Now i have read this is a risky command to run as it can create a endless loop if something attempts to scan the directories it can run into a recursive loop. Now I believe this is because most instances of this command tend to be used to bring a directory onto the desktop thats a few steps above it. Considering that the way I am using it is to link a directory that is outside the scope of another, it shouldn't ever cause this and be a pretty safe way to do it. The BIND command creates a hard link between the two locations. the /mnt/sdcard/MicroSD is a directory I created. when I bind it to the /mnt/external_sd directory the files appear in both places at the same time as MicroSD is simply a... tunnel as it were into External SD. But the programs are convinced its MicroSD. So those that can't use the external sd slot now can through this "tunnel". The same trick can also be applied to the directory for the USB thumb/flash drives.
Just create a directory for it on /mnt/sdcard
fermunky said:
If you're rooted, I think USB Mount All did this.
Click to expand...
Click to collapse
why pay when you can enter a command and its done?
Yes, mount -o bind works, but if you reboot, the mount point is no longer there.
Sure, we can add an entry to fstab, but the file is overwritten by a reboot
the autostart file is init.rc, which is overwritten by a reboot as well, so that rules out using it to auto mount this bind.
let me know if you find other information as I would very much like this to work.
FYI I started a thread about this command a few days back but never got any pertinent information:
http://forum.xda-developers.com/showthread.php?t=1287522
(this was before 3.2 when you couldn't access the SD card from usb)
Nova5 said:
why pay when you can enter a command and its done?
Click to expand...
Click to collapse
Because it is only a few bucks, and it will do it for you without having to manually do it. I know it's quite a simple task, but I say best out of sight/out of mind.
its overwrites those huh? that bites..
fermunky said:
Because it is only a few bucks, and it will do it for you without having to manually do it. I know it's quite a simple task, but I say best out of sight/out of mind.
Click to expand...
Click to collapse
Just takes a bit to track where we can stick the commands to get an auto start. I may make a simple script file to leave on the home screens. tap and done.
Okay it seems the location where the init.rc is stored is volatile. I created a test file in there and rebooted the tablet, file is gone. So its less overwriting and simply copying out of its hidden location to a usable one. sdcard in there is just a mount point for the actual hardware address location of the sdcard. So if we want to get the autostart we would have to discover where HC pulls that data from on boot.
Bind will fail if the location that actually holds the data is not present/ready. usb_storage is more affected by this as a user doesn't normally leave a flash drive in the port. Script manager can auto-execute a script on boot. Works well enough.
hmm...
It appears if you remove the usb drive after making the bind, the bind is broken. So while its workable, its not perfect. Of course since the microsd card is rarley removed, this isn't much of an issue. If we could get the script to also run on insertion of the USB drive that would then make it work better.
SCript Manager allows one to create a direct shortcut to execute a specific script. So you can swap USB drives, tap the script icon and then access the script through the bound directory.
I use the following program created by RubberBigPepper from an alternative russian site about android apps and devices.
Any interesting effect I've noticed, any time the script runs it creates a new mount entry for the bind command, even if that bind already exists. OfficePro5 shows this by listing MicroSD for each bind entry. So I had 13 entries of MicroSD as it ran that many times, due to a setting I shouldn't have checked... Run on Net Change. But it pointed out this interesting effect.
I now see the need for this as one of my apps does not natively see the ext sd card.
OK I tried the apk above and it does not seem to work. I get a folder called ex_sdcard but it is empty and does not reflect the sd card contents.
Nova, you found another way yet you could share, or do I just need to manually create symlinks after every boot?
mountmicrosd.sh
Code:
# Note : Super user required. Your Tablet MUST be rooted!
# Removing the card will disrupt the bind. And Require running script again when plugged back in.
echo Breaks any existing Bind mount to avoid creating duplicate Bind entries. a "failed" response is acceptable as is no response.
umount /mnt/sdcard/MicroSD
echo execute Micro SD mount - card must be plugged in or Invalid Argument error will occur.
mount -o bind /mnt/external_sd /mnt/sdcard/MicroSD
Place the above in a text file with the extension .sh Download from the Market a program called Script Manager. Place the sh file in your SD card root. Run script manager, select that file and check two boxes. Run on Boot, Run as Root. Also create the directory of "MicroSD" Just as its typed. Linux is very caps sensitive. now every time you boot it will automatically run the script and bind the ExSD to the MicroSD directory.
This one will do the USB drive.
mountusb.sh
Code:
# Note : Super user required. Your Tablet MUST be rooted!
# Removing the drive will disrupt the bind. And Require running script again when plugged back in.
echo Breaks any existing Bind mount to avoid creating duplicate Bind entries. a "failed" response is acceptable as is no response.
umount /mnt/sdcard/USBDrive
echo execute USB Drive mount - drive must be plugged in or Invalid Argument error will occur.
mount -o bind /mnt/usb_storage /mnt/sdcard/USBDrive
Create a widget with ScriptManager to have a touchable icon on your screen to run this one. Note it must have the folder "USBDrive" created on the sdcard.
It is unimportant if you use the same filename.sh i did. That is just so I knew at a glance what it does. # is a comment and Echo prints the text following it to the screen. I found a way around the mutiple bind entries by simply unmounting it before making the mount bind. You might see a Failed error, this is just fine. it just means there was no mount for it to undo on its first run. this will be more helpful on the USB drive script than the MicroSD card one.
Very cool, Nova5!
Thanks for taking the time to research it further.
I tested your solution and it works fine!
I updated it with a fix to prevent the multiple entries. You'll need to update your files to reflect the changes I made. a reboot will be the simplest way to ensure it starts with a clean slate. Notice I removed the comment about Running it once only, due to the umount command preceeding the mount command. This removes the bind from memory and then when its created again you don't have the problem of 13 entries of MicroSD in OfficePro like I ran into.
Alright, I think its as good it is going to get. You could put them in the same files but for simplicity and being able to swap USB drives without affecting the ExSD card two files is best.
Wait... debug time. I goofed something.
Okay fixed up and working right. Remember what I mentioned about linux and capitals? oops. Echo is not echo.
Shucks, im not rooted.

How can I create a symlink or bind for USB in the sdcard directory?

I have a rooted a500 and was able to bind the external SD card to a folder in the sdcard directory using "mount -o /mnt/external_sd /mnt/sdcard/external-sd". I was able to do the same with a fat32 USB thumb drive but it breaks as soon as I unplug the USB.
Is there any way to create a link or bind the USB on a more permanent basis? Essentially, I want to be able to quickly get to files on the drive in estrongs file manager without having to change to default directory from sdcard.
Thanks in advance for any assistance.
Sent from my A500 using Tapatalk
Of course, as soon as I posted this, inspiration struck and I simply changed the mount point.
If anyone else wants to do this, you need to edit /etc/vold.fstab to point the the new mount locations. I just changed the mount point to the new folders I created in sdcard and rebooted. Also did this for the external SD card so that I don't have to rebind it each time I reboot.
Sent from my A500 using Tapatalk

[Q] directory bind to play game with OTG usb drive

I am facing this issue with my Nexus 7 4.2.1 stock ROM rooted.
I am trying to move game data to a usb flash drive to save space, and then mount bind the directory using an OTG cable.
When I use StickMount I can see the usb drive at /sdcard/usbStorage/sda1 using ES File Explorer.
Then I use Terminal Emulator to mount bind the directory:
[email protected]:/ $ su
[email protected]:/ # mount -o bind /sdcard/usbStorage/sda1/test /sdcard/Android/data/test
These seems to work because if I navigate the directories using Terminal Emulator, I see how the test directory was linked and the data can be seen.
But if I use ES File Explorer to go to the same directory (/sdcard/Android/data/test), folder is empty, and if I try to run the game, it tries to download again because can't see the data in that directory.
So my question is if I can do the directory bind using other source like /data/media, /storage/sdcard0, or /mnt/sdcard instead of just /sdcard to make ES File Explorer and the game to see the data directory?
It is good to verify with Terminal Emulator that the directory bind worked but not good enough to make the game works saving internal storage space.
Thank you.
http://forum.xda-developers.com/showthread.php?p=35960052
Directory bind does not work on android 4.2.1!
The above thread has more details, hopefully the developer of directory bind app is looking for a solution!
Sent from my Nexus 7 using XDA Premium HD app
I don't need to use the app. I can do it just typing the unix/linux commands.
rabascal said:
I don't need to use the app. I can do it just typing the unix/linux commands.
Click to expand...
Click to collapse
The new file structure in android 4.2.1 is causing problems! The app i believe uses the bind command as well! So it is the bind command that doesn't work properly!
Have you tried using Sy links instead of binding the folder?
Use the following command to symlink
ln -s [source folder] [destination folder] where source and destination are path names
Thank you for the suggestion.
I tried several times on different directories but it didn't work.
I read somewhere that symlink does not work with FAT32. Is this my problem?
The USB flash drive that I am using where I copy the fifa 12 game directory is FAT32.
Do I need to have the usb storage formatted as ext2 or ext4? How can I do that? I am guessing I can't do it on Windows, right?
rabascal said:
Thank you for the suggestion.
I tried several times on different directories but it didn't work.
I read somewhere that symlink does not work with FAT32. Is this my problem?
The USB flash drive that I am using where I copy the fifa 12 game directory is FAT32.
Do I need to have the usb storage formatted as ext2 or ext4? How can I do that? I am guessing I can't do it on Windows, right?
Click to expand...
Click to collapse
Try formatting it to ext3..it will delete the data of course so take a backup.on windows use mini tool partition manager...its free and can format to any ext.

[Q] Mounting ext4 on Nexus 7 Tilapia

Hi there!
I have myself a rooted Tilapia Nexus 7 with me, and I'm trying to watch videos off of an ext4 partition from my external hdd. To mount, I use Stickmount to mount the drive, ES File Explorer to browse the drive for the video I wanna watch, and MX Player to watch the video. It works when I watch videos from its FAT32 partition, but ES File Explorer reports that my ext4 partition is empty.
Since the automated way wouldn't work, I checked out the directory in the terminal emulator and found out it was empty. When that failed, I tried out mounting manually via terminal emulator. I used
Code:
mount
to figure out where the FAT32 partition was being mounted, then I tried manually mounting with:
Code:
# mount -t ext4 /dev/block/sda2 /data/media/0/usbStorage/sda2
This worked in the terminal, and
Code:
ls -a
listed the files in the ext4 partition, but ES File Explorer still wouldn't see the files. I then tried
Code:
# chmod -R 777 /data/media/0/usbStorage/sda2
# chown media_rw /data/media/0/usbStorage/sda2
You'll notice the 'chown' doesn't use '-R', and that's because the native 'chown' on android doesn't support it (surprisingly). I used 'chown' on the folder (sda2) and one folder inside it to see if the problem was ownership. Apparently it wasn't, cause they still didn't appear.
When this didn't work, I made an account here, and posted this question, so here I am.
So, any suggestions?
UPDATE 1:
I recently installed busybox to see if that'd fix it. I used the 'normal' install setting. Long story short, it didn't, and note I have a whole bunch of what I perceive to be useless symlinks, which I suspect over wrote the original binaries. Luckily, not all the binaries were overwritten as some don't work as they should; chown, for example, doesn't work with the android groups and users. I can't uninstall it cause apparently something goes wrong.
UPDATE 2:
StickMount still won't mount my ext4 partition correctly and ES File Explorer still won't detect my files, so I use a terminal, get superuser permissions with
Code:
su
, mount the partition with the above command, and use
Code:
cp
to copy the videos I wanna watch into the 'Movies' folder. It takes some time, and I worry about wearing out the internal storage's sectors, but I suppose it's less costly on the battery life.

Link2SD on Amazon Fire TV

Problem statement
The Amazon Fire TV has a limited memory sotrage of less than 5GB.
FolderMount allows for moving App data/obb to a USB device. Remaining components of the App, which sometimes are the larger part of the app, can't be transfered using
These remaining components can be 100s of MB and even above 1GB (Sine Mora is 292MB, Walking Dead is 1.14GB)
Solution
Link2SD allows for moving these components to an external SD card in the phone world. Below I'll describe how to do this on the Amazon Fire TV with a USB device.
This post heavily relies on tweaking a post by sashavasko. Major kudos to him. Up to finding his post I was not successful in mounting in a way that Link2SD could see the mount. This was due to a change in Android 4.2+ where one App's mounting isn't seen by others.
Below is a step by step guide for running this. I've posted a script for automating this here : http://forum.xda-developers.com/showpost.php?p=54601505&postcount=33
Requirements: Root, Mouse, Terminal Application
Step 0 - Preparations : Format a USB device to the Ext4 File system and install Link2SD
Ext4
Link2SD refers to parititoning your SDcard to both Ext4 and FAT, this is not required on our USB device. All we need is an Ext4 partiton we can mount for Link2SD.
I had a high end USB device I used for FolderMount. For testing, I got a 16GB Lexar Jump Drive, which got decent reviews. $8 at Staples ( even less with the right coupon. Other sizes are also cheap). Both went into my Powered USB hub.
You can also partition a single FAT32 USB device to two partitons - FAT32 and Ext4. I have verified both options. Please note that for this second option, if you already have files on your FAT32 USB device, you'd have to first copy them to a backup, as the partitioning trashes your data. You will then need to restore the backed up files to the FAT partition.
Format/Partition your USB device to Ext4 using free MiniTool Partition Wizard Home Edition on your Desktop/Laptop. Below is a nice post on this (Refer only to step 1), you can find others. Please note that this refers to an SDCard. We will be doing this on a USB device.
http://forum.xda-developers.com/showpost.php?p=37405779&postcount=1
In partitioning, please verify the partitions are created as Primary. Also, not sure is this is required, but I didn't name my partitions.
There are also linux commands to do this - I didn't investigate these.
Stick the Ext4 partitoned USB device into your Amazon Fire TV and power it up. We will need the device in for Step 2.
Link2SD
Download Link2SD from the Google Play store, or sideload it
Make the directory Link2SD requires
Code:
su
mkdir /data/sdext2
exit
Step 1 - Fix adb localhost
Follow step 1 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note1:
You will need a terminal app for this
Note2:
This step should only be run once. Running multiple times can mess the /data/misc/adb/adb_keys file as the key values will concatenate with sashavasko's method. This will cause mounting at boot not to work. If you did this or not sure if you've done this, just erase the duplicate keys from the /data/misc/adb/adb_keys file (the end of a single key is "[email protected] ). Or, better yet, if you aren't seeing any other different keys there - simply su and copy /sdcard/.android/adbkey.pub onto this file.
Step 2 - Install scripts
Follow step 2 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note 1
Look for your Ext4 partitoned device after running:
Code:
adb shell cat /proc/partitions
You should find the Ext4 device under /device/block starting with sd.
For example: My first USB device is sda1, the Ext4 partitoned one was sdb1 (sdb2 when the Lexar drive was partitoned to FAT32 and Ext4).
You should be able to recognize the devices according to their partition sizes.
Note 2
The msd2.sh file should be changed to be:
Code:
#!/system/bin/sh
mount -t ext4 [COLOR="Purple"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR][COLOR="purple"] /data/sdext2 [/COLOR]&& sleep 5 && /system/bin/vold
where the sdb1 device should be replaced by the device you located in Note 1.
Step 3 - Test the script and grant su permissions
Run this (no su command required, no path to the sd.sh file is required)
Code:
sd.sh
Verify you aren't seeing any errors. You will be granting SU permissions.
Run Link2SD. Go to the menu at the top right. Select "Storage Info" - Verify Link2SD recognizes the Ext4 partiton in the third line (under SD Card 2nd Part. ).
Step 4 - Auto Mount at initialization
For this I'm using the /system/etc/install-recovery.sh script which you should already have. This script loads at boot and calls /system/etc/install-recovery-2.sh (a non existent file).
Create a file at /sdcard/install-recovery-2.sh which contains
Code:
#!/system/bin/sh
/system/xbin/sd.sh
Now move the file to its place:
Code:
su
mount -o rw,remount /system
cp /sdcard/install-recovery-2.sh /system/etc/
chmod 755 /system/etc/install-recovery-2.sh
mount -o ro,remount /system
exit
Now Reboot (Long press remote Select + Play)
Step 5 - Link2SD ready to go
Open Link2SD to verify (as you verified before) that after boot Link2SD sees the Ext4 partiton.
Start moving files using Link2SD :
Select an App
Go to "Create Link" - You will be asked which file types to move. Check them all (not the paid option if you haven't paid).
Link2SD will show "Creating Link...", then an advert (in the non payed version) and then: Application files linked and moved to SD card
Note the expected storage change in the Amazon Fire TV's "About" menu option will be seen after Rebooting.
"Remove Link" works properly
"Move to SD card" is not relevant
Final Words
Don't use this to move system apps, or system-like apps
Responsibly for running this is solely on you. I am only describing what works for me.
Works great thanks
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
SaltyCookie_OnLoan2FM_SVE said:
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
Click to expand...
Click to collapse
The one annoying thing about this is during boot it will read the entire partition. This in turn in my case makes booting the Fire TV really slow. Lets hope I dont have to reboot much because it now takes around 2-3 minutes to boot up.
MadFlava said:
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
MarkBP said:
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
Click to expand...
Click to collapse
Come on guys, this is XDA developers
OK, I have this brewing. Should post it by tomorrow.
awesome. how easy is it to reverse this entire process? I'd really like to know the risks before I take the plunge
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
tselling said:
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
Click to expand...
Click to collapse
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
failed for me for tselling method
SaltyCookie_OnLoan2FM_SVE said:
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
Click to expand...
Click to collapse
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Sent from my SAMSUNG-SGH-I497 using Tapatalk
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
desc
meadtj said:
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
Click to expand...
Click to collapse
why does this need more than 1 partition to work anyways? - Link2sd description in play store:
What you need for linking apps:
● root permission.
● a second partition on your SD card.
You should have two partitions on SD card and both should be primary.
The first FAT partition is your standard SD card storage. The second partition is used for application files and can be ext2, ext3, ext4, f2fs or FAT.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files. Because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD Plus can move app's private data files if you have a non-FAT partition
Click to expand...
Click to collapse
So we may be able to use FAT (haven't tried it) but we will lose some moving capabilities.
From my testing - FolderMount does work with the ext4 partiton, so I need two partitions (or 2 usb sticks).
also which partition needs to be the bigger one? - No restriction. Allocate as per your decision and experience with storage costs of apps.
do the sizes matter? - Don't believe her. It does.
Sorry. Uncalled for. Apologies. Not personal. I just had to.
and does stickmount need to be disabled for this to work? - No, it doesn't
983
tselling said:
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Click to expand...
Click to collapse
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
What about Foldermount?
What about FolderMount for Data and OBB files? Can I still use it with Link2SD on same card?
SaltyCookie_OnLoan2FM_SVE said:
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
Click to expand...
Click to collapse
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
OOPS, I did forget one part "mkdir /data/sdext2" (otherwise the mount fails).
tselling said:
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
Click to expand...
Click to collapse
tselling said:
OOPS, I did forget one part "mkdir /data/ext2" (otherwise the mount fails).
Click to expand...
Click to collapse
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
meadtj said:
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
Click to expand...
Click to collapse
Sorry, the directory is /data/sdext2
Your mount command is:
mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Also I am not 100% sure that ext2 filesystem works. ext4 works for sure.

Categories

Resources