yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] usui218:
I ran your command and this is the output:

app_133@android:/ $ export PATH=/data/local/bin:$PATH
app_133@android:/ $ su
app_133@android:/ # chown root:root /data/sdext2
No such user 'root:root'

This is the requested output:

10|app_133@android:/ # which mount
/system/bin/mount

app_133@android:/ # cat /system/etc/init.d/11link2sd
/system/etc/init.d/11link2sd: No such file or directory
1|app_133@android:/ # ls /system/etc/
NOTICE.html.gz
als_curve.conf
apns-conf.xml
audio_effects.conf
be_movie
be_photo
bluetooth
bluetooth_bdaddr
customization
dbus.conf
default-capability.xml
dhcpcd
dop.iso
event-log-tags
excluded-input-devices.xml
fallback_fonts.xml
firmware
gps.conf
hosts
hw_config.sh
iddd.conf
init.goldfish.sh
init.qcom.bt.sh
media_profiles.xml
mkshrc
permissions
ppp
pre_hw_config.sh
product
security
sensors.conf
system_fonts.xml
tiwlan.ini
updatecmds
vold.fstab
wifi

app_133@android:/ # cat /system/etc/install-recovery.sh
/system/etc/install-recovery.sh: No such file or directory
1|app_133@android:/ # ls /system/etc/
NOTICE.html.gz
als_curve.conf
apns-conf.xml
audio_effects.conf
be_movie
be_photo
bluetooth
bluetooth_bdaddr
customization
dbus.conf
default-capability.xml
dhcpcd
dop.iso
event-log-tags
excluded-input-devices.xml
fallback_fonts.xml
firmware
gps.conf
hosts
hw_config.sh
iddd.conf
init.goldfish.sh
init.qcom.bt.sh
media_profiles.xml
mkshrc
permissions
ppp
pre_hw_config.sh
product
security
sensors.conf
system_fonts.xml
tiwlan.ini
updatecmds
vold.fstab
wifi

app_133@android:/ # ls -al /system/bin/debug*
-rwxr-xr-x root shell 22380 2012-07-13 21:57 debuggerd

After doing this I removed link2SD, rebooted en reinstalled but the files remain absent.

Thank you for your efforts.

Regards,

Usui218
[Android Apps and Games] Kierrok:
Link2SD can't create the mounting scripts, that's for sure. Don't know if it doesn't obtain root access or your phone have that security mechanism I talked about. But let's worry about this later.

Now try this:

busybox chown root:root /data/sdext2
busybox mount -t vfat /dev/block/vold/179:2 /data/sdext2

You can also try this slightly different mount command:

busybox mount -t vfat /dev/block/mmcblk0p2 /data/sdext2
[Android Apps and Games] usui218:
This is the output you requested:

app_133@android:/ $ su
app_133@android:/ # busybox chown root:root /data/sdext2
app_133@android:/ # busybox mount -t vfat /dev/block/vold/179:2 /data/sdext2
mount: mounting /dev/block/vold/179:2 on /data/sdext2 failed: Invalid argument
255|app_133@android:/ # busybox mount -t vfat /dev/block/mmcblk0p2 /data/sdext2
mount: mounting /dev/block/mmcblk0p2 on /data/sdext2 failed: Invalid argument
255|app_133@android:/ #

Regards,

Usui218
[Android Apps and Games] Kierrok:
Damn! Which busybox installer do you use? I've found some mount applet bug reports with some versions of busybox. I use this one.

I also found some mount commands without the -t parameter, so try:

busybox mount vfat /dev/block/mmcblk0p2 /data/sdext2

I'm almost out of ideas...
[Android Apps and Games] flawedlegacy:
ok, so Create Link does what I want it do? I was thrown off when it didnt show any on the SD card.

Now does it matter what format I use?
[Android Apps and Games] GermainZ:
Create Link moves the apk file, dalvik cache and library files to the SD Card, then creates a symbolic link on your phone so it thinks it's still stored on the internal memory.

It only works with Ext2/Ext3/Ext4 partitions, which is why your SD card must be partitioned.

I believe your SD card currently has two partitions: ExtX and FAT32. The latter gets mounted when you connect your phone to PC, and is the one you see in the /mount folder. The ExtX partition is in the /data folder, probably something like /data/sd-extx.

There are many opinions about which Ext format to use. You can take a look at this thread: http://xdaforums.com/showthread.php?t=800353
[Android Apps and Games] usui218:
Unfortunatley I'm using the same busybox (v1.20.2-cm9).

This is the output you requested:

app_133@android:/ # busybox mount vfat /dev/block/mmcblk0p2 /data/sdext2
BusyBox v1.20.2-cm9 bionic (2012-07-14 01:52 +0200) multi-call binary.

Usage: mount [OPTIONS] [-o OPTS] DEVICE NODE

Mount a filesystem. Filesystem autodetection requires /proc.

-a Mount all filesystems in fstab
-f Dry run
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE[,...] Filesystem type(s)
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification time
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
[r]bind Bind a file or directory [recursively] to another location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing flags
ro/rw Same as -r/-w

There are filesystem-specific -o flags.

1|app_133@android:/ # busybox mount -t vfat /dev/block/mmcblk0p2 /data/sdext2
mount: mounting /dev/block/mmcblk0p2 on /data/sdext2 failed: Invalid argument

I find it very bizar that I am the only one having this problem.

However I do have a few ideas myself.

You should know that only a few days ago a new built became available so maybe it has

something to do with that? Unfortunaley I didn't have Link2SD before so I'm not certain that

this has anything to do with it. It would be interesting to know if other Xperia Pro users with the

latest built got this working...

Another possible source of issues is that I'm using a kernel which works for my

smartphone but isn't the official one (this is a consequence of the method I used to root my phone):

http://xdaforums.com/showthread.php?t=1865796

This is the interesting part:

The problem with both explanations above is that the main partition of the micro SD, which is also

fat32, gets mounted without issues. So it's weird that my phone wont mount the other filesystem

when we try manually.

Perhaps we should use another line of attack, instead of trying to fix whatever problem is blocking

Link2SD from making the required script I could just make them myself and see if the program works?

If you could post your files made by Link2SD I could adjust them for my system and see what happens ...

What do you think?

I've also hit your thanks button on the previous post just to show my gratitude ;).

Regards,

Usui218
[Android Apps and Games] tobbbie:
Why not link also the data parts of an application?

I am using link2SD on my Xperia Ray on stock 4.0.4 (rooted) and I wonder about the reasons why link2SD is not offering the option to also move the applications private data to SD as well? What is contradicting this on so general level that you could not even offer this as an option per application (just like .apk, .dex, libs)?

If an app is located on the device, it also keeps its data on the device. If the app supports to be moved to SD with APP2SD then it usually moves also its data to SD on \Android\data\. So the strategy to link the applications (all related files) makes it still "believe" to be on device and so also the data stays there.

Sadly this will outrule the link2sd method for all applications where the data part is growing bigger than the saving you get by moving/linking the application with link2SD.

Edited: ---

I noticed such drawbacks on various applications but the strategy to utilize the space on SD-Card depends fully on their own logic it seems. So if at least \data\data\<unique app name> could move just like the other items would surely help.

---

So you cannot by default tell "link2sd is always better" because only after some time of use you will see how much of \data\data has piled up for a certain application.

I really like the approach of link2SD deciding per application what to do and not link all data or all apps. So I much preferred if link2sd could at least provide an option to move/link data in a second step.
[Android Apps and Games] Kierrok:
That was what I planned... But the scripts just mount the partition and that's what you are being trying to do... First you have to find a working mount command.

Try with "-t auto" and "-t msdos".
[Android Apps and Games] bakpinar:
Thank you.

I really want to make a paid version but making a paid app on Android market proved to be not possible as Google Merchant does not support my country. It supports limited number of countries to sell from and Turkey is not one of them.
[Android Apps and Games] bakpinar:
P.S.

I decided not to link private data files to SD card for security reasons as Kierrok explained.

But I have been receiving a lot of mails asking this feature and I am reconsidering to add it at least only on ext filesystems. May be in a paid version :)
[Android Apps and Games] nscxp2005:
Hi bakpinar,

Would you be able to add a way for you script to be compatible that Titanium Backup sees the ext partition?

Would it be possible to add the following commands:

ln -s /data/sdext2 /data/sd

mkdir /data/sdext2/app

Thank you for your time.

All the best,

NSCXP2005
[Android Apps and Games] usui218:
This is the requested output:

255|app_133@android:/ # mount -t vfat /dev/block/vold/179:2 /data/sdext2
mount: Invalid argument
255|app_133@android:/ # mount -t auto /dev/block/vold/179:2 /data/sdext2
mount: No such device
255|app_133@android:/ # mount -t msdos /dev/block/vold/179:2 /data/sdext2
mount: No such device
255|app_133@android:/ # mount -t ext2 /dev/block/vold/179:2 /data/sdext2
mount: Invalid argument

Regards,

Usui218
[Android Apps and Games] GermainZ:
Does your kernel/ROM support ext partitions?
[Android Apps and Games] Kierrok:
Argh! Do you have any of the 2 partitions active? If the 1st one is, unflag it and try the 2nd.

And post the result of:

fdisk -l /dev/block/mmcblk0
[Android Apps and Games] usui218:
How can I check this?

I made the second partition active but this still gives the invalid argument error upon mounting.

app_133@android:/ $ export PATH=/data/local/bin:$PATH
app_133@android:/ $ su
app_133@android:/ # fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 33.5 GB, 33554432000 bytes
255 heads, 63 sectors/track, 4079 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 3955 31765504 b Win95 FAT32
/dev/block/mmcblk0p2 * 3955 4079 997376 b Win95 FAT32
app_133@android:/ #

Well the thing is, it does mount the first partition so I can't really explain it but the system is able to mount vfat just

not the way that we are trying to mount it. Perhaps if I place the necessary scripts in the right location my phone might try to

mount it like it does with the first partition. I'm not sure that this will work but perhaps it's worth a try?

Thank you all for your help and interest.

Regards,

Usui218
[Android Apps and Games] Kierrok:
Sure, you can try that but now the problem is to find a script that runs at boot time. For what I could see in your /system/etc directory your ROM doesn't have init.d support, which is strange because your busybox is from CM9 and CM9 supports it, so try to create a file named install-recovery.sh and place it in /system/etc with 755 permissions and root:root ownership. The contents of the file are:

#!/system/bin/sh
#added by link2sd
sleep 2
mount -t vfat -o rw /dev/block/vold/179:2 /data/sdext2

mount -t vfat -o rw /dev/block/mmcblk0p2 /data/sdext2

The -o parameter maybe is redundant because I think the default is rw. To be able to write into /system you have to remount it like this (I guess):

mount -o rw,remount /system

or:

mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system

Another thing you could try is to delete both partitions and create 2 new ones but smaller so both sizes doesn't exceed the 16GB boundary.
[Android Apps and Games] usui218:
Well I succesfully put the file in the correct location but initially this didn't change anything.

However when I changed the size of both partitions to just a little above 1GB the partition got

mounted without problems and when I did remake mount scripts it worked.

I played around with the partition sizes but I wasn't able to give my primary partition a decent size

(When I made it 5GB it didn't even work anymore). Seeing that I'm using a 32GB card I believe that

Link2SD isn't worth the sacrifice. So I think we can conclude that it was a partition related issue.

Thanks again for all your effort and good advice.

Regards,

Usui218
[Android Apps and Games] Kierrok:
You should test your SD card. Try to fill it up. There are many fake cards.
[Android Apps and Games] GermainZ:
Can't Link2SD only be used for <1GB partitions?
[Android Apps and Games] Kierrok:
No.
[Android Apps and Games] Muhammad_Qasim:
Apps stored on SD card not linking

Some app which are directly installed on the SD card, are not being automatically linked by the link2SD, why is that?

For example I downloaded a game named 100 gates, it has an apk file of 28.06 MB, dex of 1.36, lib of 307 KB, Total 29.72 MB, I can manually create the link, but why link2SD is not doing automatically, it was doing fine on many other.
[Android Apps and Games] GermainZ:
From the Link2SD FAQ:
[Android Apps and Games] Remcotjuuh:
After getting this app to work tonight, which was far easier than I expected, I'm happy with the result. My available internal memory went from 25MB to 60MB on my Galaxy Ace! Nice app. In the memory usage menu of an app, I still have the option to move apps to SD, but I guess this won't work to free even more space :p.

Edit: it even went up to 76MB :)
[Android Apps and Games] David3D:
I'm trying to use Link2SD on my HTC Legend but it doesn't work cause it is S-ON so the application is unable to write on the /system partition! I tried to make the phone S-OFF but it doean't work cause the HBOOT is 1.00.0000... there is any other way to make it work?!?

Thanks a lot
[Android Apps and Games] Oops...:
No need for 'real' S-OFF. Unlocking your bootloader is enough. See http://www.htcdev.com/bootloader

Edit: See here for a how-to http://xdaforums.com/showthread.php?t=1501618
[Android Apps and Games] .Ejekt:
Question.

I have two separate partitions on my SD card; Linux-Swap and ext3. Link2SD fails to recognize the ext3 partition (I'm assuming because there's two and the swap is the larger). Is there any way around this issue?
[Android Apps and Games] MikelFuchs:
Which device do you use?

What is the error message you are getting?

For my Vodafone 858 I formatted the partition as ext3 and it worked when configuring as ext4 in Link2sd.
[Android Apps and Games] Kierrok:
The ext3 partition must be primary (as the FAT one) and must be the 2nd one.
[Android Apps and Games] .Ejekt:
Still no luck. Hmm.
[Android Apps and Games] chainer323:
Used this on my lg e400. Kudos to the dev.
[Android Apps and Games] molitar:
Has anyone got this to work with the Samsung Galaxy S3? When I first installed it it mounted the ext SD card just fine and moved apps.. when I rebooted it failed to mount.. It took about a dozen attempts to get it to mount so it's not impossible to mount but sure is a pain.. I had to keep quick rebooting until it would mount. So it seems to me it has to be possible and read on other forums others have used it but I have not had any luck with FreeGS3 ROM.
[Android Apps and Games] rbgabriel:
Unable to mount 2nd partition

Hi all,

Can please anyone help me? Since I flashed a ICS Rom I'm unable to use Link2sd with a 2nd partition

I have 2 partitions on my SD card (32GB).

1) 28.25 GB. Fat32 Primary

2) 996.22 MB. Fat23 Primary

when I try recreating mount scripts I get the following message:

Mount script error

Mount script cannot be created

[4]: cannot create /system/etc/install-recovery.sh.ori: Out of memory

I've searched the entire forum and didn't find anything that could help me.
[Android Apps and Games] Oops...:
Sounds like you're S-ON; system partition could not be written.
[Android Apps and Games] rbgabriel:
I'm not S-ON. I own a Sony Ericson Xperia Play with unlocked bootloader

Thanks for the help.
[Android Apps and Games] Oops...:
Are you sure that you granted superuser rights then?
[Android Apps and Games] rbgabriel:
Yeah, pretty sure. I even uninstalled and re-installed to be sure of that.
[Android Apps and Games] terraterm:
Hi I had the same problem, I changed the partition to ext 3, everything was fine after that.
[Android Apps and Games] rbgabriel:
I had already read that and tried. Tried again now and same error. Please see the screenshot
[Android Apps and Games] terraterm:
have you tried different ext file types?
[Android Apps and Games] rbgabriel:
You mean for the 2nd partition? I tried ext3, ext2, FAT and FAT32. I don't remember if all these types gave me the same error message, but I'm assuming yes.

Let me get this right: Link2SD mounts the 2nd partition or Android mounts and Link2sd only recognizes the mounted partition and start working on it?

If it's Android that mounts it, can I mount this 2nd partition manually?

If it's Link2SD, does anyone has any clue of what's happening?

If I have some time today, I'll format and partition another SD card and see what happens...

Anyway, thanks for the help guys
[Android Apps and Games] tobbbie:
It is the Linux kernel underneath the Android layer that mounts the partition on request of a shell script run by the boot process. It seems that the script is actually not executing - so no mount. Subsequent start of Link2SD will detect the missing partition and complain. You need to fix the problem that the script is not executing.

Is it possible that the system partition is simply full to the limit (I doubt)? You can check with "Storage Analyser" (look up in the play store). Did the script creation from Link2SD ask for SuperUser rights? Which Super User manager are you using (Chainfire's SuperSU or Chainsdd Super User)? Try to reset the Link2SD application and restart.
[Android Apps and Games] rbgabriel:
Is it possible that the system partition is simply full to the limit (I doubt)? Please see image below to see SD capacity and usage

Sorry, I don't know what you mean by "Did the script creation from Link2SD ask for SuperUser rights?". But Link2SD has superuser rights, please look the image below, also showing which SuperUser manager I use (Chainfire's SuperSU)

I already tried to reset the Link2SD application. Even tried to uninstall e reinstall it, with no success
[Android Apps and Games] chainer323:
Also having sdext mount issues with link2sd on my lg e400 with cm9 nightly. Link2sd failed to mount the second partition but is still accessible via root explorer. I was able to mount it by first unmounting the sdcard in settings. Run link2sd. Generate script and quick reboot.
[Android Apps and Games] tobbbie:
If the script is not created and the partition has space (which your pictures prove) - then SU privileges may be the problem. Try to swap the SU manager to SuperSU and retry. Other problems in the past were also linked to SU manager - and since then I stayed with Chainfire's SuperSU.
[Android Apps and Games] Oops...:
Erm, the screenshots show the sdcard space, but not the /system. But I doubt that system is completely used. Just to be sure..
[Android Apps and Games] tobbbie:
...true I had my own picture in mind when writing :( You must enable both the "Expert Options" to get data about the System partition.
[Android Apps and Games] rbgabriel:
I don't know if this means something... but my system partition is full
[Android Apps and Games] tobbbie:
It DOES mean something - the additional script (or changed one) must be stored there. So no space - no script :( Not sure how accurate the "0" in this list is - but you may have to temporarily move out some item from the System partition (copy to SD) and move back later. Or you just clean up the system partition by removing some unused (bloatware) packages.

If you select the System partition and let it analyse with Storage analyser - you will get an accurate picture of free space on the bottom right.

I wonder about the System partition size - I have the Xperia Ray on ICS and this has a 400MB System partition.
[Android Apps and Games] rbgabriel:
The system partition size is 312.50 MB. Right now I have 11.29BM free space in this partition.

I'm sorry to ask such a simple question, but how can I move some stuff to the SD and move it back later? Root Explorer? Won't it affect my apps and stuff?
[Android Apps and Games] tobbbie:
We are back to start now. The script just needs a few bytes - if you really have 11.29MB free then there is plenty of space - no need for cleanup! It contradicts your picture however - were the 0 b free on \system in the summary only shown because analysis was not complete?

Go the path to check/replace the SU manager if there really is space on \system.
[Android Apps and Games] rbgabriel:
I don't know why it was shown that was no free space left. Anyway, here's a detailed picture of the system partition.

About the SuperUser manager, i uninstalled SuperSU (chainfire) and installed SuperUser (chainsdd). Now, none of the apps are asking for root rights and seem to work properly.

I uninstalled Titanium Backup and reinstalled to see if it would ask me again for root rights, but it didn't.

See some pictures below.

1st to show that there's no SuperSU installed (at least in this listing. Can I get a more accurate?)

2nd to show that there are no apps with root rights under SuperUser (chainfire) app

3rd to show that Titanium has root rights (as least it shows this way)
[Android Apps and Games] tobbbie:
Maybe you need to reactivate superuser settings to get the control back to Supersu. The superuser binary may just allow any requestor to be root now.

Can the script now be installed on system?
[Android Apps and Games] rbgabriel:
SOLVED! Actually, I don't know what I exactly did, but it now works. In the end, I reformatted my 2nd partition as ext3, reinstalled SuperSU and Link2SD. After that, opened Link2SD, granted root privileges again and recreated mount scripts (as ext2) and it worked.

Thank you all for the help!
[Android Apps and Games] molitar:
The new version seems to have fixed issues with the Samsung Galaxy S3.. Woot! I can now use an ext4 partition again reserved for storage of apps as there is no default move to SD Card on this phone but now with Link2SD working I now have that! I have a 32GB SD Card but only a 16GB phone so I really needed this feature! Thank you for fixing this!
[Android Apps and Games] d12unk13astard:
Glad u got it to work on the s3, so then it should be possible on the s2 as well..

Do you use mini tool partition and do you create the ext partition first or the fat32, I know they both need to be primary.
[Android Apps and Games] molitar:
Mini-Tool would not convert or resize properly for me. So what I did was used the Paragon Partition Manager Home Edition it will not create an EXT partition but it will convert and resize so I simply created a FAT32 the size I wanted it than converted to EXT4.
[Android Apps and Games] d12unk13astard:
Got ya, I think the problem on my side is the ROMs and kernel might not support ext partitions. I'm asking in my forum if there is any kernel or ROM that does support ext partition cuz every time I have tried, link2sd fails to see or mount my 2nd partition
[Android Apps and Games] pdario:
I guess one of them is mine! ;)

How's that progressing? My /data partition is almost full and it take minutes for the "disk full" message to disappear after switching the phone on.

Thank you for your great app!
[Android Apps and Games] HPeralta8:
Hi, i've got a Samsung Galaxy Ace (5830i) and at Play Store appears to me that Link2SD is not compatible with it. Is there a apk file i can have for installing please? Thanks in advance.
[Android Apps and Games] GermainZ:
I have a s5830I and it's compatible. The issue is with your country or your DPI if manually edited that.