[MOD][CM11] Classic sdcard mount

Search This thread

andi_o

Member
May 2, 2010
17
1
patch does not work on nightlies anymore

patching the nightlies with patches from simons github does not work anymore. (endless bootloop)
it seems something changed in CM11's fstab since M12.
the patches worked for a while with nightlies released after M12, but not anymore

is anybody able to bring the classic sdcard mount back to current nighlies or has any idea what was changed exactly and how to fix this?

thanks!
 

S-I-M-O-N

Member
Feb 12, 2010
26
41
F(x)tec Pro1
it seems something changed in CM11's fstab since M12.
thanks!

Hello andi,
work keeps me quite occupied, so I was not very active recently.
But your post catched my attention. I had a quick look at the commits towards the three relevant files, and there were none since M12, so something else is wrong I guess.

Nevertheless I will try to put together the patch for the 16 Feb nightly. Nightlies seem to be longer available now, so this justifies to make the mod based on a nightly.

Stay tuned.
 

andi_o

Member
May 2, 2010
17
1
Hello andi,
work keeps me quite occupied, so I was not very active recently.
But your post catched my attention. I had a quick look at the commits towards the three relevant files, and there were none since M12, so something else is wrong I guess.

Nevertheless I will try to put together the patch for the 16 Feb nightly. Nightlies seem to be longer available now, so this justifies to make the mod based on a nightly.

Stay tuned.

thanks for your reply!

you said there were no recent changes, so i checked it again and found the error.
i made a really stupid mistake in my notes and copied one of the patches into the wrong folder!

now i can confirm that your patch still works with the latest nightlies, so don't worry, sorry!
 

dan.dior

Member
Feb 9, 2012
23
0
doesn't work and support?

It looks like, that there is no way...

And after a lot of testing... Android 5 is a get your data monster vs older firmware, and on its based CM12 is not stable.

Want to switch to the latest CM11.. But any short help with patching?
 

pizzulicchio

Member
Aug 3, 2005
31
1
Firenze
Is it planned a "classic sdcard mount" for Android 5 on the Photon Q or not ?

Installing from scratch is it suggested to use the latest classic sdcard mount patch or not ?

I'd like to install cm-12-20150315-NIGHTLY-xt897.zip ( the today's latest lollipop build ) but I'd like to have the classi sd card mount.
 

S-I-M-O-N

Member
Feb 12, 2010
26
41
F(x)tec Pro1
In principle the mod should work on CM12 as well. The problem is that it effects framework-res.apk which is needed to sign the apk. So the framework-res.apk from the installable patch needs to be compatible to the ROM. Nearly all nightlies or releases of a ROM change something inside framework-res.apk accordingly the patch will only work on the version of the ROM it was made for. This is why I sticked to the milestone releases of CM11.
Nevertheless I will try to make the patch for CM12, but currently I have troubles to make it even for the last CM11 nightly.
I suspect it is because I wiped my armel debian chroot and switched to armhf leading to nonworking patches. I have to further investigate.
 

tobby88

Senior Member
Jul 4, 2012
257
72
Hanover
OnePlus 5
In principle the mod should work on CM12 as well. The problem is that it effects framework-res.apk which is needed to sign the apk. So the framework-res.apk from the installable patch needs to be compatible to the ROM. Nearly all nightlies or releases of a ROM change something inside framework-res.apk accordingly the patch will only work on the version of the ROM it was made for. This is why I sticked to the milestone releases of CM11.
Nevertheless I will try to make the patch for CM12, but currently I have troubles to make it even for the last CM11 nightly.
I suspect it is because I wiped my armel debian chroot and switched to armhf leading to nonworking patches. I have to further investigate.

Did you already get it running on CM12(.1)? :)
 

tobby88

Senior Member
Jul 4, 2012
257
72
Hanover
OnePlus 5
So, here is one test build :)
Warning, there may be errors in it. Especially in this dirty-patched TWRP version.

CM12.1 with classic sdcard mount: http://tobby.eu/downloads/cm.html?f.../CM12.1/cm-12.1-20150424-UNOFFICIAL-xt897.zip
MD5: http://tobby.eu/downloads/cm.html?f.../cm-12.1-20150424-UNOFFICIAL-xt897.zip.md5sum
TWRP2.8.6.0 with classic sdcard mount: http://tobby.eu/downloads/cm.html?f...tonQ/TWRP/TWRP-2.8.6.0-xt897_no-datamedia.img

If everything works as expected and if users are interested in it, I will create a thread for it and post updates.
 

pizzulicchio

Member
Aug 3, 2005
31
1
Firenze
Fantastic!
i have reflashed my photon q using your UNOFFICIAL build and all is working great!
Thank you very very much!

Can you explain to me what is "TWRP2.8.6.0 with classic sdcard mount" ?
Is a sort of modded TWRP recovery?
Let me know
 

tobby88

Senior Member
Jul 4, 2012
257
72
Hanover
OnePlus 5
Fantastic!
i have reflashed my photon q using your UNOFFICIAL build and all is working great!
Thank you very very much!
Thank you, too, for testing it. I am now testing it since Friday :) Looks like it is running without any problems.

Can you explain to me what is "TWRP2.8.6.0 with classic sdcard mount" ?
Is a sort of modded TWRP recovery?
Let me know

Basically there are the same changes as in the CM-build. So it will not create a /data/media directory anymore and it will not mount this internal (emulated) mass storage. Instead it will set the external card as default (mounted on /sdcard instead of /external_sd like inside of this CM build).
A backup of /data will now include all directories and not exclude anything anymore. A wipe of /data will now not "rm -rf" all files on the filesystem but recreate (format) the filesystem in the same way it already does for all other wipes (/system, /cache, ...).

This makes it MUCH easier to backup and restore and especially to change between different filesystems (ext4 to f2fs or f2fs to ext4 p.e.), especially for those people who have problems with the filesystem-corruption in f2fs.
 

tobby88

Senior Member
Jul 4, 2012
257
72
Hanover
OnePlus 5
can i update using classic cyanogenmod update notification? or updatin will i lose the classic sdcard mount?

You will loose it. So you have to flash new "classic-sdcard-mount-builds". I sometimes compile new versions, because I am using this on my Photon Q as well. Take a look at this (crappy) page http://tobby.eu/downloads/cm.html :) New builds are available now (just uploaded them). But I didn't test the 21th and 22th builds - so make a backup before you flash them! :)
 
Last edited:

Ad1982

Senior Member
Jan 2, 2011
68
9
This mod for CM11 on moto_msm8960 brings back the classic sdcard mount we know from devices like the Nexus One.
No more cluttering of /data with files which should go to sdcard.

Features:
- External sdcard mounted as /sdcard
- Internal memory fully available for /data

Installation:
- Have a nandroid backup of /boot and /system at hand if something goes wrong
- Simply flash the zip over your existing CM11 installation
- Wipe data is not necessary but will help if you have problems.
Deleting only the data of the concerned apps should be sufficient. (Only apps storing data on sdcard are effected)
- Files which were on the emulated sdcard can be found at /data/media/0. This is also the location where you have to put your zip files to be able to flash them with OpenRecovery.

Method:
Adjusting of following CM11 files to be in line with Nexus One example configuration according to:
http://source.android.com/devices/tech/storage/config-example.html

boot.img
- init.qcom.rc
- fstab.qcom

framework-res.apk
- storage_list.xml

See my github for details: https://github.com/S-I-M-O-N/android_device_motorola_moto_msm8960

Disclaimer:
This was developed and tested on a Photon Q but should work on all moto_msm8960 devices with CM11.
I cannot be held responsible if anything goes wrong while using this mod.
Thank you to everyone this work is based on: Cyanogenmod team for providing CM11, Google for providing Android and everybody else

Download
I will try to keep this thread updated and provide a flashable zip for the latest CM11 snapshot.
See attachment at the bottom.


Regards,

Simon


Downloads for:
cm-11-20140609-SNAPSHOT-M7-moto_msm8960.zip
cm-11-20140708-SNAPSHOT-M8-moto_msm8960.zip
cm-11-20140916-SNAPSHOT-M10-moto_msm8960_jbbl.zip cm-11-20141008-SNAPSHOT-M11-moto_msm8960_jbbl.zip
cm-11-20141112-SNAPSHOT-M12-moto_msm8960_jbbl.zip

I'm running CM11 version 11-20140326-NIGHTLY-moto_msm8960, I'm guessing none of these would work for me without getting stuck in a bootloop, is that correct? Thanks for the help!
 

Loader009

Senior Member
Jul 6, 2012
716
198
It seems that the cm 12.1 snapshots do not support the SD-card with ext4/f2fs as a filesystem.
Have to go back to FAT32 >.<
(Hate this incompatibility of Android.)

The reason is probably the same as this: https://github.com/LegacyXperia/local_manifests/issues/75
The fc of an app is nearly the same, a few words at the end are different.:
java.lang.RuntimeException: Unable to get provider com.android.providers.media.MediaProvider: java.lang.IllegalArgumentException: can't obtain external volume ID even though it's mounted

(The error-message has been copied from the link and have been modified to the "remembered" error-message.)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    This mod for CM11 on moto_msm8960 brings back the classic sdcard mount we know from devices like the Nexus One.
    No more cluttering of /data with files which should go to sdcard.

    Features:
    - External sdcard mounted as /sdcard
    - Internal memory fully available for /data

    Installation:
    - Have a nandroid backup of /boot and /system at hand if something goes wrong
    - Simply flash the zip over your existing CM11 installation
    - Wipe data is not necessary but will help if you have problems.
    Deleting only the data of the concerned apps should be sufficient. (Only apps storing data on sdcard are effected)
    - Files which were on the emulated sdcard can be found at /data/media/0. This is also the location where you have to put your zip files to be able to flash them with OpenRecovery.

    Method:
    Adjusting of following CM11 files to be in line with Nexus One example configuration according to:
    http://source.android.com/devices/tech/storage/config-example.html

    boot.img
    - init.qcom.rc
    - fstab.qcom

    framework-res.apk
    - storage_list.xml

    See my github for details: https://github.com/S-I-M-O-N/android_device_motorola_moto_msm8960

    Disclaimer:
    This was developed and tested on a Photon Q but should work on all moto_msm8960 devices with CM11.
    I cannot be held responsible if anything goes wrong while using this mod.
    Thank you to everyone this work is based on: Cyanogenmod team for providing CM11, Google for providing Android and everybody else

    Download
    I will try to keep this thread updated and provide a flashable zip for the latest CM11 snapshot.
    See attachment at the bottom.


    Regards,

    Simon


    Downloads for:
    cm-11-20140609-SNAPSHOT-M7-moto_msm8960.zip
    cm-11-20140708-SNAPSHOT-M8-moto_msm8960.zip
    cm-11-20140916-SNAPSHOT-M10-moto_msm8960_jbbl.zip cm-11-20141008-SNAPSHOT-M11-moto_msm8960_jbbl.zip
    cm-11-20141112-SNAPSHOT-M12-moto_msm8960_jbbl.zip
    6
    Download for M11 added. Enjoy!
    4
    Download for M10 added. Have fun!
    3
    So, here is one test build :)
    Warning, there may be errors in it. Especially in this dirty-patched TWRP version.

    CM12.1 with classic sdcard mount: http://tobby.eu/downloads/cm.html?f.../CM12.1/cm-12.1-20150424-UNOFFICIAL-xt897.zip
    MD5: http://tobby.eu/downloads/cm.html?f.../cm-12.1-20150424-UNOFFICIAL-xt897.zip.md5sum
    TWRP2.8.6.0 with classic sdcard mount: http://tobby.eu/downloads/cm.html?f...tonQ/TWRP/TWRP-2.8.6.0-xt897_no-datamedia.img

    If everything works as expected and if users are interested in it, I will create a thread for it and post updates.
    3
    After reading that we won't get a M9 build I made an update for nightly 20140814.

    It seems the ramdisk is growing and abootimg was already complaining that it was too large. I had to delete copyrights and disclaimers to squeeze out some bytes. I hope that this trend does not continue, otherwise I need to find other means to bild the boot.img.

    Regards
    Simon