LinuxSE Problem ? ln -s gives permission denied - General Questions and Answers

Hi, for Termux on my Galaxy S5 (Android 10,LineageOS 17.1) I need additional space with an Ext4 FS.
I have lots of space on my SD card (adoptable storage) but not on my internal storage.
For that I have created a 4G file, formatted it as Ext4, and loop mounted it on /mnt/T.
I cannot access this as a normal user under Termux. Therefore I tried
bindfs -u10218 -g10218 /mnt/T /data/data/com.termux/files/home/T
As a non-root user under Termux I can cd to that folder, I can read, create and write to files.
But I cannot create a symlink from one file in T to different name in T.
I suspect a LinuxSE problem. I don't know how to change the SE context. It doesn't look like a bindfs problem. It occurs in the kernel as shown by strace.
Many thanks for any hints or pointers,
Helmut

Related

Issues with apps to sdcard?? POST HERE ONLY!!!

I was able to install and run apps from the sd card (ext2), but somehow I still uninstall some apps that i don't use frequently. Is there anyway I can remove the apps from the sd card that i uninstalled? I know the fact that they don't occupy that much spaces, but still I'm thirsty for the knowledge on that issue
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
samysam05 said:
uuummm you can go to your terminal and
1- su
2- cd /system/sd/app or app-private
3- ls
4- rm "filename you wanna remove" without double quotes
5- Thats it !!!
Click to expand...
Click to collapse
and because of the "ln -s" command you could also cd /data/data/app .. it all points to the same place now
issues partitioning SD card for moving apps
I am having ALOT of trouble trying to format my 4GB SD card to the fat32/ext2 partitions.
I have tried using partition manager 9, setting the fat32 (2.8GB) as a primary, and also setting the SECOND partition ext2 as a primary (1GB). I also tried using gparted and did the same EXACT partition, size and settings in all the different programs. I also tried a mixture of FAT16/FAT32 and ext2 for all the settings. I then tried using ext2fsx on my mac using the same exact settings as before. No matter what, it doesn't mount /system/sd, it always is mounted to /system/sdcard.
(the below are estimated because I was entering all commands in the terminal on my G1)
I'm suppose to see something similar to the following:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sd
I always get something to similar to:
dev/mmcblk0p2 1.2G 9.1M 1.1G 1% /system/sdcard
I always see the fat32 partition but never the ext2. I know that alot of people on this forum seem to be able to do this without issue. I unfortunately have been working it on all day.
Can someone PLEASE help me out? Thanks!!!
have you tried moving the apps to sd? see if you actually move all your apps and look at that line again to see if there is an adjustment in size
Which directory does your mountd.conf and init.rc files specify in it if you open them up? Does it say /system/sd or system/sdcard? I believe tempo had his saying system/sdcard and used different files than the ones in the post by dwang that does basically the same thing. I recall one of them using /system/sdcard in their post and the other doing just /system/sd. Use the same file from the same post and don't mix the 2 up because they are not the same.
I used dwang's instructions and files and got my 2GB card partitioned and working. I have had a problem getting my 8gb card working for some reason but that is another story. It seems my 8gb isn't readable or writeable after I partition the ext2 section although the fat32 is ok. I'm familiar with linux but don't know what I need to do to make that partition writeable when I can't get it to show up at all except in gparted and partition manager under windows. I tried busybox df -h without it showing so no luck there...
Hopefully what I metioned helps you and maybe somebody has an idea why mine didn't work either although I wasn't very specific.
I tried both files and mounting on both /system/sd and /sd neither of which worked . I also tried various programs to partition the sd card. I have no other ideas...
Hi,
This is how it should look.
I use an adb shell through the computer (windows xp).
The drive with 1.5g available is the sd card drive.
Non-market apps on SD card issue
Okay... Getting this to work has sucked horribly for me and after rooting through the other forums that would apply to my issue i've found no solution. I have RC33 JFv1.42 LucidREM mod, with /app, /app-private, and /data all copied to the EXT2 partition of my SD card. I am trying to install the AndroidVNC viewer using the AppsInstaller app, I have AndroidVNC saved onto the root of the FAT32 partition of my SD card. The Appsinstaller sees it but when I go to install the .apk itself it's giving me the following error:
"androidVNC could not be viewed. Free up some space on your phone and try again." Giving me a 'cancel,' and 'manage applications' button under.
The error doesn't make any sense because when I login to my terminal as root and # busybox df -h, the only parts of my system that are full are the usual suspects:
/system
/system/modules
/system/xbin
all of which are full, but they always have been for me, so I'm not sure if the Appsinstaller is trying to use one of those blocks to extract to temporarily or something like that. what am i missing here!?!?
bump
Partial App migration to SD card...possible?
Has anyone tried to move only *some* of the apps to the SD card?
I'm stuck with a class 4 mSD card, so as I understand it, moving the apps en masse to the SD card isn't a recommended option.
But I was wondering if perhaps I might move *some* apps to the SD card...maybe just ones that I don't use often, or aren't particularly complicated, or maybe just ones that seem to run perfectly fine from the card.
Some of the "high performance" apps, or ones with a lot of I/O dependency I'd leave on the phone internal storage.
As it stands right now, I'm at total app saturation. I've uninstalled infrequently used apps and have them backed up for ready restoration anytime/anyplace. I've moved every cache possible. Yet even at 13MB free, the phone still complains I don't have enough room to install the latest build of AndNav2.
Should I even attempt a partial migration? I have no paid apps (and apparently couldn't install any even if I wanted to) so I'd just be moving the *.apk file and maybe the *.odex files? Is that all I need to move and then symlink to?
Bump for day crew.....
I'm using this setup. I use my own bash script to move apps:
Code:
#!/bin/bash
# mvappndata.sh 1.1 by Autarkis
# GPL OpenSource
adb remount
adb shell cp -rp /data/app/$1.apk /system/sd/app/$1.apk
adb shell rm /data/app/$1.apk
adb shell ln -s /system/sd/app/$1.apk /data/app/$1.apk
adb shell cp -rp /data/data/$1 /system/sd/data/$1
adb shell rm -r /data/data/$1
adb shell ln -s /system/sd/data/$1 /data/data/$1
You call it with the application's name without the .apk suffix.
Code:
mvappndata.sh com.mobisystems.msdict.embedded.wireless.pons.ssd
Known Bugs:
* apps moved this way don't show as Installed or Updated in Market, but as Free
* sometimes, when you are running out of memory, it won't be possible to install new apps from market - the downloading process will hang right at the beginning. Making even more room does the trick
I leave all apps that are being started at boot time or once started should run as a service in the internal memory. I move all the big apps (like dictionaries) to the SD. It mostly works, but since many apps are buggy themselves it's difficult to tell where a certain Force Close is coming from.
Cheers from Switzerland,
Autarkis
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
f4phantomii said:
Ah...precisely what I was looking to do. Thanks....that helps a lot.
I'm guessing I can modify the script to run directly on the phone....it appears you have constructed to move apps while connected to a PC via the USB cable. Is this correct?
Click to expand...
Click to collapse
Yes on both counts. I also use ls -laS to display installed apps sorted by size.
looping on android, home button & silent not working on 1.42
Hi,
Had a weird experience the other day. Phone was fine (rooted RC33/JF1.41). Got some AK Notepad reminders but was busy with something so I ignored them (but heard the alert go off). A few minutes later, the phone spontaneously rebooted and from that point on just looped on the android screen.
I figured I was due for an upgrade, so I popped out the sdcard and upgraded to JF1.42. The phone did come back to life, but at that point the home button won't work (wasn't a hardware issue as it worked to get me to the home+power loader) and when I held down power to shut down, I got only the "power off phone" option but no "silent mode" option. Very strange. This was obviously no good, so I went back to 1.41.
Long story short, the phone still looped, so I took this as a sign that a wipe was unavoidable (I didn't have a recent nandroid backup), but since I had WAY too many apps I never used (~200) and my phone was getting unstable (things were constantly force-quitting), I figured I may as well do some spring cleaning and start fresh.
I learned my lesson and finally got the important apps reinstalled and the phone reconfigured the way I want it -- and then did a nandroid backup so I can avoid this in the future.
But what the heck happened that made the buttons not work? That one freaked me out a bit...
And of course I still wonder what caused me to loop in the first place, totally randomly and spontaneously. Are there specific things that can cause that and if it happens again, is there an easy way to fix it?
Thanks
Gah! This is driving me nuts! I absolutely can't make this work.
I can transfer the whole /data/app and /data/data directories to /system/sd, but as I have a class 4 SD card, I get tons of force closes on apps.
So then I try just moving single apps. For example, moving the OI Flashlight app to the sd card.
Code:
# busybox -a /data/app/org.openintents.flashlight.apk /system/sd/app
# rm -r /data/app/org.openintents.flashlight.apk
# ln -s /system/sd/app/org.openintents.flashlight.apk /data/app/org.openintents.flashlight.apk
I do the same thing with the appropriate data directory for the app. I check and the files are moved. The symlinks are present.
But when I try to run the app, it just tells me that the application is not installed on my phone!
Grr! Then if I delete the symlinks and cp the files back to their original locations, same result. I end up having to re-install from backup.
Very frustrating. Any advice?
I don't know what busybox -a does.
It probably shoud say "cp -rp" instead.
It's important that you preserve access rights.
It's also very important that /system/sd is an ext2 partition. vfat won't do.
My script also assumes that as a preparation, /system/sd/app and /system/sd/data have been created. Like that:
Code:
mkdir /system/sd/app
mkdir /system/sd/data
I assumed that was self-explanatory, but it probably wasn't.
unionfs works for this:
have cake and eat it micro-howto:
(Use a recent jf dist)
/system/bin/insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko /system/modules/2.6.25-01843-gfea26b0/kernel/fs/unionfs/unionfs.ko
(partition sd card as described in the aps-on-sd howto)
(mount to /data/local/ext for this example)
mkdir /data/local/ext/app
busybox mount -v -t unionfs -o dirs=/data/local/ext/app=rw:/data/app=ro unionfs /data/app
This has been tested; downloaded apps go to sd card but the system sees apps in /data as well.
The only issue with this is you can't umount the unionfs mount. In theory, you can have writes go to the real /data/app with:
busybox mount -o remount,dirs=/data/local/ext/app=ro:/data/app=rw /data/app
But I have not tested this.
losing storage after moving cache and apps.
Hi all,
I have moved apps to Sd Card.. I have moved cache to sd card and when all is said and done I had 47mb of 74mb free.. YES... but wait..
Now in using my phone I keep losing free space I am now at 45 of 74mb free. How can I found out what is taking my free space up .?
Please help. Thanks in advance for your time.

data2sd

Hi All,
Here is my first contribution to the community, hope it is useful!
I've rezzed up a construct to produce a new /data on sd. It makes use of a second partition formatted ext2 or ext3 mounted to /system/sd with /system/sd/data then mounted over /data.
I've included a lengthy readme file which should explain things in greater detail.
Read the readme first to get a list of dirs & files this construct adds to the /data, then copy the files as explained and off you go!
currently my /data "volume" is 2GB and all is lovely!
Things to note:
I'm rom JF1.51 ADP1 CRB43, the sdcard is 8gb class6
The sd /data contains several scripts of my own design which if not needed can be deleted. I include my modified bootdeb.sh script as it mounts to /data/local/mnt/debian vs /data/local/mnt (that is a script I modified for my own needs which you may find useful)
Feel free to adjust any of the scripts according to your needs. Just note that if I update the construct, that your changes may be undone if you use it, so back them up in that scenario.
Also, I include my mount.ak.sh script which make use of a loopfs to accomplish the roughly the same thing, but in a single partition environment (intended as proof of concept).
**There is NO booting into recovery and wiping of the phone for this mod!**
Thanks to JesusFreak for the roms and saurik for the Debian info!
Cheers!
Wow! Nice, Going to try it out. Thanks
is that mean after running data2sd the phone's completely running on sd? and so much faster?
Hi,
To followup on xnycen's question, why would we do this? Is the benefit only in providing more space, or is there also a performance increase (or decrease)?
hate to see the sdcard fail with this change
well...
Yes, after the install you are running complete on sd,
but because of the method used, if you reboot, and take out the sdcard before the boot starts, you will be running as you were before the data2sd aka normal; put the sdcard back in, reboot and you are in data2sd mode again.
This effectively gives you two android run modes: "normal" and data2sd. If the SDCore can not be located the Android will boot in normal mode. You can of course try to keep them sync'd, but if you do the data2sd from a clean slate you can effectively have a "safemode" and if you have an issue with some app, go into this "safemode" and do some investigations or adjustments as the SDCore will mount if you put the sdcard in after the system is in "safemode" but the apps and such will not be loaded until you reboot.
The size expansion is the primary benefit of the construct. As far as speed goes, I haven't checked to see if there are any speed gains in moving /data to the sd... Can someone who's interested check that out and let us know?
Darkstrumn said:
Yes, after the install you are running complete on sd,
but because of the method used, if you reboot, and take out the sdcard before the boot starts, you will be running as you were before the data2sd aka normal; put the sdcard back in, reboot and you are in data2sd mode again.
This effectively gives you two android run modes: "normal" and data2sd. If the SDCore can not be located the Android will boot in normal mode. You can of course try to keep them sync'd, but if you do the data2sd from a clean slate you can effectively have a "safemode" and if you have an issue with some app, go into this "safemode" and do some investigations or adjustments as the SDCore will mount if you put the sdcard in after the system is in "safemode" but the apps and such will not be loaded until you reboot.
The size expansion is the primary benefit of the construct. As far as speed goes, I haven't checked to see if there are any speed gains in moving /data to the sd... Can someone who's interested check that out and let us know?
Click to expand...
Click to collapse
Speed is all I'm interested in If it speeds the device up, why not?
Anyone have anything to report about the speed? I am very interested in this
wow having this "dual boot" seems like an incredible idea... can anyone report on this?
can someone please give a more noob friendly instructions? from what I understand as of now is:
1) boot into recovery and wipe the phone (I'm assuming we can keep whatever ROM we had before)
2) place data2sd.img in root of SDcard (fat32)
3) and this is where I get lost... how exactly do I move the sh file to that location? how do I chmod it? how do I run it? what are the adb commands? thanks!
Hmmnm I thought we weren't doing this because of inheriant security risks?
Not to mention what happens when you mount your fat32 partition....are the apps no longer (as well as your data) available?
NO booting into recovery and wiping of the phone!
Hold up people!
**There is NO booting into recovery and wiping of the phone!**
My bad for not being clear on the wipe instructions!
1) (optional) If you are to wipe it (your choice it is not required), then press menu->settings->SD card & phone storage->scroll to bottom of screen and select "Factory data reset". This will wipe the /data partition only removing all apps and settings. BACKUP YOUR /data dir to sd, First or you will need to down load all your apps again to include paid apps!!
2) place data2sd.img in root of SDcard (fat32)
3) terminal in or adb shell in.
4) cp /sdcard/data2sd.sh to /data/local/bin - to copy the script to your user-space
5) chmod 0750 /data/local/bin/data2sd.sh - to make it executable
6) /data/local/bin/data2sd.sh or data2sd.sh may work to run the script
7) once the install is done it should tell you to reboot. If you had the ddms debugger running, you can observer the log as it is working.
8) done. It may boot a little longer if you clean-slate installed and then restored your apps by copying them back into /data/app and /data/app-private which has the affect of reinstalling everything, and thus the boot will take a while if you have alot of apps like I do. Again you can observe this as the Android boots if you have the debugger running.
thanks a lot man, will give this a shot in a few hours! not at my comp right now
security risks and (u)mounting /sdcard
TheDudeOfLife said:
Hmmnm I thought we weren't doing this because of inheriant security risks?
Not to mention what happens when you mount your fat32 partition....are the apps no longer (as well as your data) available?
Click to expand...
Click to collapse
Not sure why there would be any security issues, the Android is already rooted. If someone can steal the sdcard, they can steal the entire Android, and if the sdcard is left lying about, then yes it can be strolen then too.
The construction of the SDCore assumes all the original permissions, so nothing has access to things it shouldn't save the scripts that use the cache as a backup mount point, but it is given the same permissions as /data, so no worries.
With this construct in place, you can't physically remove the sdcard without first powering off the Android, or rebooting it and removing the sdcard first thing. But while the system is operational, you can mount the sdcard to usb and umount it from usb without issue as long as any mounts to the sdcard are released (loopfs, etc) prior to trying. vold will give 10 tries to umount /sdcard to include attempting to kill the processes with file locks on /sdcard when it tries to umount the volume to attach it to usb.
A a matter of fact, if you observe via teh ddms debugger during boot, the vold service is busy checking the sdcard and mounting it well after the system has already mounted the sdcp2 and begun initializing apps from the sd /data.
So, as long as "sdcard partition2" (sdcp2) remains mounted and all, you can mount the sdcard to the connected Host and back and still have access to your apps and data all you want. I reckon this is how the app2sd and dalvik2sd constructs also perform.
The only thing to really note is that the first partition must be vfat (fat32) and the second either ext2 or ext3 (currently as they support file permissions). vold only cares about the first partition which it expects to be a vfat volume. So as long as p1 is vfat and p2 is posix compliant, we're golden!
The only real question I don't have a good answer for is the speed gains question. My card is a 8GB class6 and things seem fairly responsive. I don't know how much different it would be with a class 4 or 2, or the real speed difference with the built in storage. Honestly it feels a little more responsive, but I haven't really done things that make it feel sluggish.
Oh, I saw the .img and assumed you just mounted the .img from fat32. My bad for not reading all the instructions.
Any problems with apps crashing? I have had a lot of quirky issues in the past with merging the entire partition.
Thanks for the response. I like what you've done here. I'll have to try it out for sure.
TheDudeOfLife said:
Oh, I saw the .img and assumed you just mounted the .img from fat32. My bad for not reading all the instructions.
Any problems with apps crashing? I have had a lot of quirky issues in the past with merging the entire partition.
Thanks for the response. I like what you've done here. I'll have to try it out for sure.
Click to expand...
Click to collapse
No worries; the .img file can be thought of as an install cdrom it is only used the one time during install.
As far as apps crashing, no problems!
During my experimentation building the construct, permission mangling happens if apps are moved out of /data/app, /data/app-private but /data/data and maybe /data/dalvik-cache are not cleaned up prior to copying apps back into their respective app dirs.
What happens is the app dirs are monitored. if you move an apk into the dirs android will install the app. Likewise if you delete an app from those dirs PackageManager will uninstall the app. If /data/data already has the dir for the app, it will use it. if the /data/system/packages.xml and /data/data don't have the same id assigned to that app, you get a permissions\\id conflict; the PackageManager will not manipulate the dir if the id's don't match.
The app /data/local/bin/archiveApps.sh, /data/local/bin/softWIPE.sh and /data/local/bin/restoreApps.sh scripts allow one to backup thier apps to the new /data/app-archive and /data/app-private-archive dirs, clean out /data/data/ /data/dalvik-cache, and restore the apps to their app dirs. As the apps are copied into their dirs, the PackageManager will update /data/system/packages.xml proper and rebuild /data/data and the dalvikVM will build the /dalvik-cahce proper.
Someone made a seemingly nice script (I've not used it yet) called fix_permissions.sh that will parse the /data/system/packages.xml and update the ownership id of the apps /data/data sub dir proper and thus is more scalpel like in operation, but that process doesn't make a backup of the apps; so using both may be the most effective replacing the softWIPE.sh part of the process with the fix_permissions.sh instead.
The only time you should run into issues is if say you have 10 apps installed in teh SDCore /data and 6 in Android /data and then attempt to sync them (because the 6 are different than the 10) by copying\\merging Android /data with SDCore /data the SDCore /data/data /data/dalvik-cache and /data/system/packages.xml will now be mangled.
/data/system/packages.xml will now no longer know about the 10 apps that were installed prior, and on boot PackageManager will "install" them, but /data/data will have dirs inside with now different id's from what was newly assigned them in /data/system/packages.xml, and the 10 apps will now not work correctly but the 6 will as dirs with matching id's were created when they were "installed" new.
To fix, either the softWIPE.sh process outlined above, or the fix_permissions.sh process also mentioned above.
So did anyone try this at all?
Can this be done after doing the apps2sd by marcusmaximus? I tried it but when trying to chmod 0750 /data/local/bin/data2sd.sh it said "No such file or directory" so i tried mkdir /data/local/bin and got "File Exists" so i proceeded with copying data2sd.sh to /data/local/bin again which went without showing any errors and when trying to chmod 0750 /data/local/bin/data2sd.sh again i got the same error so i tried to ls /data/local/bin and just got # what am i doing wrong?
looks interesting! might try this during the weekends ill give an update if i encounter any issues or not
interesting. I'll be looking into this!

File manager that can create symbolic (soft) links?

I want to move my ringtones and notfication sounds from internal storage to /sd-ext. To do this I need to create a symbolic link from /system/media/audio -> /sd-ext/media/audio/
It seems that root explorer is unable to create symbolic links so are there any other android apps available that can do this? I really don't want to have to install the android SDK just to do this so is there an easy way to do this from the phone?
Cheers,
Richard.
If your rooted and have terminal installed you should be able to enter the following:
ln -sf /sd-ext/media/audio /system/media/audio
I haven't tried it myself in android but its what would work in a regular linux environment.
technoplunk said:
If your rooted and have terminal installed you should be able to enter the following:
ln -sf /sd-ext/media/audio /system/media/audio
I haven't tried it myself in android but its what would work in a regular linux environment.
Click to expand...
Click to collapse
Thanks that did the trick. I installed Terminal Emulator from the market and su'd then created the link. After a reboot all my ringtones and notifications are now working from my sd-ext partition
Cheers,
Richard.
Glad to hear it worked, at the time I replied I didn't even own an Android phone yet.
This weekend I finally picked up a Desire HD.
I am trying to do the same thing on an elocity a7 ... rooted, running froyo, Dexter's mod 1.42. Terminal has su. I enter the following:
Ln -sf /sdcard/sdcard-disk/olivetree /sdcard/olivetree
I get the message: Link failed. No such file or directory.
Both directories exist and contain files. I have tried with various combinations of directories existing with or without files ... same thing.
Any ideas? Thanks
aimeehammond said:
I am trying to do the same thing on an elocity a7 ... rooted, running froyo, Dexter's mod 1.42. Terminal has su. I enter the following:
Ln -sf /sdcard/sdcard-disk/olivetree /sdcard/olivetree
Both directories exist and contain files. I have tried with various combinations of directories existing with or without files ... same thing.
Any ideas? Thanks
Click to expand...
Click to collapse
Assuming /sdcard/sdcard-disk/olivetree and /sdcard/olivetree are both directories without any functioning links and contain some files that differ from each other, I would do enter the following in the terminal:
cp -a /sdcard/olivetree /sdcard/sdcard-disk/olivetree
rm -rf /sdcard/olivetree
ln -sf /sdcard/sdcard-disk/olivetree /sdcard/olivetree​
These steps copy all data from one directory to the other.
Delete one of the directories.
Link the existing directory to the removed directories location.
Thanks, Technoplunk. Now I get the message:
Link failed. Operation not permitted. :|
Does your lines in the terminal begin with a hash "#" character? If it does not then your not running the commands as root.
Try typing 'su' without the quotes then running the commands I suggested above.
Yes, I was already running in root ... did the su ... got the #
Thinking a little harder about your problem I realize your trying to do a soft link from one portion of a fat32 partition to another. I suspect the issue might be that you can't create soft links on a fat32 partition as it probably isn't supported. Microsoft created fat32 and never supported soft links on it.
It worked for laxity because he was linking from an ext3 or ext4 partition to the fat32. The actual link resided on the ext partition.
The file structure of this tablet seems a bit weird to me. /sdcard is the tablet's internal storage. The sub-directory /sdcard/sdcard-disk is the micro sd card. I would have expected it to be in the root directory of the tablet, but it's not. However, I didn't think the internal storage was FAT32. Is it??
I'm baffled.
The "mount" command will list all partitions and their types. Its a bit verbose on my phone. Any fat32 partitions will probably say vfat rather than ext(#).
Aha. Several partitions (/system /data /misc /cache) are ext3.
/sdcard and /sdcard/sdcard-disk are FAT32.
Is there a way to format the internal /sdcard as ext3?
Thanks so much for your help!
I recommend poking the people in the Elocity A7 section of the forums, they have more experience with your particular device and can likely tell you if it is safe to try or not.
I should also add that changing those partitions to ext3 would mean you could no longer drag and drop files from a Windows pc as Windows can't read that partition type.
Same question:
laxity said:
...
It seems that root explorer is unable to create symbolic links so are there any other android apps available that can do this?
...
Click to expand...
Click to collapse
I don't mind if it's free or paid application!
Problem solved!!!
Root Explorer v2.17 (estimated releasing date tomorrow, 10/28/2011) has "Link to this folder" / "Link to this file" and "Create link" options!
No more painful usage of terminal emulators on small screens!
Thank you Speed Software !
I have a similar problem. The music bib stored by google music should reside on my second sd card. In the moment the app stores the music automatically on the first internal sd card. But I have the same problem that the internal sd card is fat32. So is there any solution to move my bib to the second sd card?
Thanks
Hi there!
I have a similar situation as I got deleted my "lib" file, that is a symbolic link, from my "com.android.mms" folder.
From RootExplorer I remember the file pointing to "... -> com.android.mms", so what am I supposed to type in Terminal Emulator?
Tnx in advance.
Sent from my Samsung Galaxy S5 SM-G906K using TapaTalk
Hello,
Sorry to unhearth this post but I have a similar problem and these command lines do not seems to work.
technoplunk said:
Assuming /sdcard/sdcard-disk/olivetree and /sdcard/olivetree are both directories without any functioning links and contain some files that differ from each other, I would do enter the following in the terminal:cp -a /sdcard/olivetree /sdcard/sdcard-disk/olivetree
rm -rf /sdcard/olivetree
ln -sf /sdcard/sdcard-disk/olivetree /sdcard/olivetree​These steps copy all data from one directory to the other.
Delete one of the directories.
Link the existing directory to the removed directories location.
Click to expand...
Click to collapse
On my daughter's SGJ5 running 6.0.1, I have an issue with Musical.ly taking too much space because it is storing video files on the phone memory and wont be moved to SD card.
So I got inspiration from your post and thought of creating a symbolic link between the folder where Musical.ly stores its videos to another one on the SD card: respectively '/storage/emulated/0/Android/data/com.zhiliaoapp.musically/files/localvideos' on the phone memory and '/storage/6561-3337/Videos/musically' which I created on the SD card.
I ran the following command using adbputty:
cp -a /storage/emulated/0/Android/data/com.zhiliaoapp.musically/files/localvideos /storage/6561-3337/Videos/musically
rm -rf /storage/emulated/0/Android/data/com.zhiliaoapp.musically/files/localvideos
ln -sf /storage/6561-3337/Videos/musically/localvideos /storage/emulated/0/Android/data/com.zhiliaoapp.musically/files/localvideos
cp and rm worked fine but when I try to run the ln command I get the following error:
ln: cannot create symbolic link from '/storage/6561-3337/Videos/musically/localvideos' to '/storage/emulated/0/Android/data/com.zhiliaoapp.musically/files /localvideos': Operation not permitted
Edit: I tried the following command instead (inspired from "https://forum.xda-developers.com/showpost.php?p=62273638&postcount=18")
ln -sf /storage/6561-3337/Videos/musically/localvideos /data/media/0/Android/data/com.zhiliaoapp.musically/files
and that works for creating the symlink but Musical.ly does show anymore Private videos, nor is it possible to create new ones.
Could you please help me with this?
Cheers

[Q] make links between ext4 and fat32

Because my ROM is big enough(around 8G), and my SDCard has been full with various files, so i want to link a big file stored in ROM to SDCard so as to save the treasure space of SDCard( the big file cannot be identified by a software except it is in /sdcard patition ) first i take an test to validate the method: try to link a file /data/test.mp3 to /sdcard/test_fat32.mp3, then in the terminal (#su), i tried to make a symbolic link like this :
Code:
ln -s /data/test.mp3 /sdcard/test_fat32.mp3
but failed:
ln: /sdcard/test_fat32.mp3: Operation not permitted
Googling for a while, and i found that i cannot create symbolic links with fat32, i dont want to format the SDCard to ext4, because i want to make such an app to share with my friends. you surely cannot demand everyone of the format, what's more, maybe many apps cannot identify ext4 files. does anyone have a good idea to realize it? or some other ways to access inner files and fake the app that it is a file in /sdcard? any help appreciated!

[ROOT] Move obb folder to external SD (mount -o bind folder)

Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
needo2 said:
Using on CM11, should work for any android build above 4.#.#
If you are having trouble mounting folders like I did like SuperMount, FolderMount didn't work for me
Even if they work, they require payment for most important features
Get BusyBox (Most custom ROMs already have it, like CM)
I used busybox mount because regular mount didn't work
Get the SManager app
Move the contents of obb folder to somewhere in external SD, (Or you can move the entire obb folder and create an empty obb folder in sdcard/Android)
Create new script from SManager (or any other text editor and save it with .sh extension) and type the mount command in it
Lets say I moved the folders inside obb to storage/sdcard1/obbfolders, then command is:
busybox mount -o bind /storage/sdcard1/obbfolders/ storage/sdcard0/Android/obb
Save the file (in SManager you press back after typing and it asks if you want to save)
Click on the file you created and check the Su and Boot boxes and Save
Script should be good to go, click Run
I use FX File Explorer to verify it (obbfolders should be shown on the main page)
Reason I created this thread, I searched this for a quite good amount of time and couldn't find anything
All "mount folder android", "mount bind android" searches either come up dead or show me an app that doesn't work for me
Click to expand...
Click to collapse
Trying to follow your guide....can't get it to work ?
1: Moved the entire OBB folder to my SD
2: Installed busybox, started it, software says it is installed, there's a button to install again....don't know what else it does ? If I click install, well, it installs again
3: Created the new script, saved it, ran it. It seems OK
4: When I open FX File explorer, I don't know what I'm looking for, I don't see anything going on, no operations running ?
...I didn't want to delete the original OBB directory since I don't have confirmation of this working ?
Thanks for your help
almost there...
Hi there
Had the same problem and found your thread after quite some surfing. Following your instructions, all seemed to work fine, just had to inject an "su" before the busybox mount command, then the whole external_sd (/storage/sdcard1/) was mounted to an existing (empty) folder on the internal sd (/storage/emulated/legacy/External_SD)... at least that's how it looks in SManager. When checking the target folder via file explorer, it still looks empty.
My setup:
- Samsung S4 mini on Cyanogenmod 10.2
- phone is not fully rooted, but root is granted to SManager and Busybox
- external sd card has permissions "d---rwxr-x" and is owned by "system" whereas the internal storage has permissions "drwxrwxr-x" and is owned by "root"
do I face a permission issue?
If yes, how to solve that (tried to change permissions of the External_SD folder recursively using chmod -R under root... but didn't suceed)
If not, any ideas...???
Thanks for any hint!
cheers
I'm using Lucky Patcher to bind oob folder, you should try.
@needo2: Is it required to mount the folder? This could cause problems on rejecting sd card. Maybe it does work replaceing the source directory with a simple link ("ln -s") to sd?

Categories

Resources