9

Due to my displeasure with the new SD card as internal storage of Marsmallow, I decided to switch back to Link2SD, something which I had been using on previous versions of Android. However, there's a problem. If I try to create the mount scripts for my partitioned SD card, I get the following error:

Mount script cannot be created

mount: '/dev/block/vold/179:66'->'/data/sdext2': No such file or directory

Does anybody know how to get Link2SD to work on the Marshmallow?

6

Marshmallow internal storage can be better used with a mixed-format SD card as I also explain in my blog here:

http://blog.sam.liddicott.com/2016/02/android-6-semi-adopted-storage.html

First, you need adb working.

  1. Have SD card inserted and formatted as portable.
  2. Eject your SD card from the Storage & USB menu
  3. Use "adb shell" to list your adoptable storage:

like this

$ adb shell sm list-disks adoptable

disk:179_64

disk:179_64 is my SD card that can be made adoptable, I want 75% as external SD:

$ adb shell sm partition disk:179_64 mixed 75

Note: Your card may be listed with a comma instead of an underscore, e.g. disk:179,64 in which case, that is what you type:

$ adb shell sm partition disk:179,64 mixed 75
  1. This will erase the entire SD card, giving 75% as portable storage and the rest as adopted internal storage.

  2. Reboot your phone.

  3. From Storage & USB menu, select the SD card (internal) and choose Migrate Data (so that apps, where possible, are installed there).

  4. From the Storage & USB rename the adopted storage to have some name like Adopted otherwise if it has the same name as the external storage partition, the USB MTP view may only show the internal

  • you should post your answer in this question too, it's a better match and would give your great solution more exposure – fernio Apr 19 '16 at 20:06
  • But this solution doesn't support Link2SD. The adopted partition's file system is "Other" when checking with a computer partition app, so Link2SD cannot recognize the partition to be adopted (hence the question). Without Link2SD, unmovable apps cannot be forced to move to SD card. – Ooker Mar 6 '17 at 18:05
2
#!/system/bin/sh
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
mount -t ext4 -o rw /dev/block/vold/179:66 /data/sdext2

You may have to make the vold line be:

mount -t ext4 -o rw /dev/block/vold/public:179:66 /data/sdext2

It all depends upon how you let Marshmallow format your card on first boot.

Use Apps2SD to make the script. Simply open the app, go to "Link apps to SD card", select your file system and you are done. It's still in active development and working. After script got created you can uninstall Apps2SD.

1

As others have hinted, you can use Apps2SD to create the mount script and simply uninstall it when you're done.

  • This worked for me. And I think this is the easiest method of all. – Preetesh Sep 19 '16 at 16:33
0

I solved the initial problem listed here with:

cd /dev/block/vold
ln public:179_66 179:66

and then Link2SD was able to do it's tricks; however it still was not useful, and in moving Google Play Music internal data (mp3's) to the SD card made it so that the music program kept crashing.

Removing Link2SD after de-installing is not easy,

mount -o remount,rw /system
mv /system/bin/debuggerd.bin /system/bin/debuggerd
rm /system/etc/init.d/11link2sd
mount -o remount,row /system

then reboot, otherwise the 2nd partition keeps getting mounted on /data/sdext2

(So I am frustrated that if I merge my SD card as internal memory, Google Play Music will store the mp3's in the limited internal memory instead of the SD card)

  • Pardon me for such a basic question. Should I write above script to file in init.d? Also, could please explain what above script does? – Ganesh Satpute Mar 6 '16 at 9:59
  • 1
    Don't bother, Link2SD still does nothing useful. See my better fix at: blog.sam.liddicott.com/2016/02/… which I will post as an answer – Sam Liddicott Mar 7 '16 at 16:04
  • "Nothing useful" is rather controversial and sweeping subjective statement, so it would be nicer if you could back it up with some informative facts. Thanks. – Adam Spiers Apr 22 '16 at 10:17
  • 1
    It is not controversial at all, unless you contradict my claim. But to answer your request: It doesn't work on android 6, it inserts incorrect mount commands in various startup scripts, and still fails when those mount commands are corrected. – Sam Liddicott Apr 23 '16 at 12:10
  • I didn't mean to be argumentative, I just meant that I've seen people say that it doesn't work and isn't supported, and not seen anyone say it is working. – Sam Liddicott Apr 23 '16 at 14:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.