[MOD] SD-EXT Boot MOD for CyanogenMod

ivanich

Senior Member
Nov 6, 2011
1,167
2,612
143
Odessa, Kyiv
Since cm13 use sdcard as internal storage option uses the entire SD card, I don't see how that is good, especially if you have a big SD card like 32 GB. You are forced to encrypt the entire card. If anything happens with rom or phone, you can kiss the data in SD goodbye.

Your mod is the only way we can still use part of the SD for internal and still have a workable SD storage for other use and still use encryption. Like taking sdcard out putting into computer or camera or TV etc. Please don't drop support.

Sent from my Sensation using XDA Free mobile app
Sdcard encryption is OFF for pyramid builds
 

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
Since cm13 use sdcard as internal storage option uses the entire SD card, I don't see how that is good, especially if you have a big SD card like 32 GB. You are forced to encrypt the entire card. If anything happens with rom or phone, you can kiss the data in SD goodbye.

Your mod is the only way we can still use part of the SD for internal and still have a workable SD storage for other use and still use encryption. Like taking sdcard out putting into computer or camera or TV etc. Please don't drop support.

Sent from my Sensation using XDA Free mobile app
ivanich
I lost a sd formatting for internal picked up new one , ivanich do you think if I format with sd.ext and use a older ver. of TWRP that mod plus will work.
I will update mod to work when I have sometime to rewrite it.
When chosen adopted storage, you need to format back to portable in android first before your able to partition sdcard again in TWRP.
When using adopted storage (I was calling it encrypted storage) it formats entire card, so isn't compatible with mod and you are not able to use in other such devices either, it will be formatted with ext4 file system and I think located on the second partition. First partition is used for Android system.
You can only move apps that have been flagged in the apps manifest to do so, like in previous versions of Android and the package manager is not forcing them either.
Edit: Updated.
 
Last edited:
  • Like
Reactions: devrruti and pbazw

ktxgio

Senior Member
Apr 1, 2015
60
3
28
Florence
what are changes in
"All Data excl. Dalvik-Cache - Data partition on sd-ext with internal dalvik-cache" release 2.3 and 2.2 compared with release 2.1?
used this mod (release 2.1) with cm11...when i upgraded to new cm11 release i used same mod but in release 2.2 (downloaded some days ago) with no success...so i used release 2.1 and worked perfectly; is a bug of release 2.2 or are there not compatible changes with old release 2.1?
release 2.3 not tested, but i download it now
 

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
what are changes in
"All Data excl. Dalvik-Cache - Data partition on sd-ext with internal dalvik-cache" release 2.3 and 2.2 compared with release 2.1?
used this mod (release 2.1) with cm11...when i upgraded to new cm11 release i used same mod but in release 2.2 (downloaded some days ago) with no success...so i used release 2.1 and worked perfectly; is a bug of release 2.2 or are there not compatible changes with old release 2.1?
release 2.3 not tested, but i download it now
Just updates for M, I just had look at the script and don't see why it shouldn’t work, the only difference is the command line with cm11 but don't think it would make a difference, I could always upload a version to test if your interested to rule out that command line. Otherwise it maybe the recovery version your using?
Also recovery.log may help if you upload it, as it produces some logs of the installation when flashing mod. The log is found in /cache/recovery or sdcard, if you choose the option to copy log to sdcard.
And how did mod fail? eg. In recovery, mounting data on sd-ext, encryption error or ?
Edit: if your getting boot loop from it, upload latest boot.img so I can check out the command line etc.
 
Last edited:

ktxgio

Senior Member
Apr 1, 2015
60
3
28
Florence
Hi, thanks for your answer, i'm not interested to try test releases... i write for know if incompatibility from 2.1 and 2.2 was a bug or not only. after rom update i used 2.1 mod without problems and now is all ok.

recovery used is TWRP-2.8.7.0-pyramid-f2fs-r8 and log of mod installation is referred to last 2.1 used (i have controlled and i don't see boot mod 2.2 string)

installed cm11 20151208 and then boot mod 2.2: cm11 and boot mod 2.2 installation was fine (no errors) but when i restart phone it show me optimization app 10 of 27 instead of 130 (numers haphazard: have 100+ app installed and during first boot system tell me 20+ only) and after 5 minutes it show me same messages... so i understand that something was wrong (maybe an incompatibility from 2.1 to 2.2 mod because have no error during flash-installation) with mod and i reboot into recovery, i reinstalled cm11 20151208 and then old boot mod 2.1 and during reboot all is go fine

i do not try-test 2.3 release
 
Last edited:

andy hall

Senior Member
Mar 3, 2011
959
276
83
BOOT MOD 1.1 and CM12... actually this happen few months ago..... when i am using my phone... suddenly it restarted and shows ENCRYPTION UNSUCCESSFUL.... from that time my micro sd couldnt be format..... any solution?
are you trying to format in twrp? will a pc read it?
I have had issues where the partition on the sd card has been corrupted but that was rare.
had to repartition and start again.
 

tom0769

Senior Member
Dec 15, 2010
1,232
460
103
@hinxnz
I tested your "Dalvik-Cache on SD-EXT" mod with @ivanich CM12.1 and my sd card got totally erased.
Luckily I made a backup before applying your mod.
I think the problem is in the modboot.sh.
The search for
Code:
grep "version=13"
finds the line
Code:
ro.opengles.version=131072
.
So the script assumes it's CM13 and executes
Code:
sed -i '/voldmanaged=sdcard0/s/auto,encryptable=p2,noemulatedsd/1,noemulatedsd/g' fstab.pyramid
and
Code:
rm -rf /sdcard/*
.
 
Last edited:
  • Like
Reactions: devrruti and hinxnz

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
@hinxnz
I tested your "Dalvik-Cache on SD-EXT" mod with @ivanich CM12.1 and my sd card got totally erased.
Luckily I made a backup before applying your mod.
I think the problem is in the modboot.sh.
The search for
Code:
grep "version=13"
finds the line
Code:
ro.opengles.version=131072
.
So the script assumes it's CM13 and executes
Code:
sed -i '/voldmanaged=sdcard0/s/auto,encryptable=p2,noemulatedsd/1,noemulatedsd/g' fstab.pyramid
and
Code:
rm -rf /sdcard/*
.
Thanks for the info, I wasn't aware of that :eek: I have removed all the links in first post until I fix them, hopefully tomorrow.

Edit: Ok I fixed all mods in first post as they might of all have had unexpecting results depending on there use.
What I did is replaced "version" with "ro.cm.version".
This possibly also may explain what @ktxgio experienced with a newer version.
Also updated the modified one for those who have a bad data partition - https://mega.nz/#!PYtAxKbR!0GEdXSbUim45Bmq1s67npa3r27O203lIsfW4Ne3R0eY
 
Last edited:

fufinoid

Senior Member
Apr 23, 2012
202
32
0
Porto
Don't know if this is an appropriate place to ask my question, but is it possible to make a RAM swap on sdcard if the card is fast enough (like samsung evo and others)?
 

tom0769

Senior Member
Dec 15, 2010
1,232
460
103
@hinxnz
Actually I screwed up my son's senny by formatting /data and /cache to f2fs with TWRP r8.
Did the same with my phone with no problems.
On my son's phone /data and /cache is no more formatable/mountable.
How should I edit the modboot.sh to bind /data and /cache to sdext1 and sdext2?
I understand that I have to delete the idata stuff.
Thanx in advance!
 

fufinoid

Senior Member
Apr 23, 2012
202
32
0
Porto
hi guys!
bought samsung pro card and want to move all that is possible to sd, including the swap (hard swap)
can I find here some clear instructions?
I should make first sd ext partition for swap (withought file system type), second sd ext for /data, and third partition fat32 for everything else and then install boot mod plus, is it correct?