New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
sparksco
Old
(Last edited by sparksco; 14th December 2011 at 02:48 PM.)
#1  
sparksco's Avatar
Recognized Developer - OP
Thanks Meter 5294
Posts: 7,289
Join Date: Feb 2010

 
DONATE TO ME
Default Cyanogenmod 7.x/CM7 Based Roms - Mods a2sd sd-ext Ext4 and Linux-swap Patch2

Update:
YOU MUST have a recovery that supports ext4 in order to use this patch. Currently there is only one recovery for G2 that I know of that is up-to-date that supports ext4 partitioning. That recovery is ext4 recovery. After you get ext4 recovery installed format and wipe everything before installing your rom of choice.

1. Format system
2. Format data
3. Format cache
4. Format sd-ext

----------

A lot of these scripts are based on the stock Cyanogenmod scripts to mount sd-ext partition and allow a2sd.

I've edited the stock system/etc/init.d/05mountsd to mount ext partition as ext4 instead of ext3. The system/etc/init.d/10apps2sd was made by Cyanogen himself and it can be found on the Cyanogenmod github. I've edited it to activate and utilize the sd-ext partition of the device. The swap patches and the cmparts source edits are all my own work. Please see the github for more details.

Required for swap: For swap you need a kernel that supports swap. E.G., Faux123, and may be others but it is your responability to find out which kernels support swap

Udate: this current patch is still working fine for me on the latest nightlies (deodex roms only). But there is a certain way that this patch needs to be installed.

It does not matter if you wipe or do not wipe before flashing.

1. If you are flashing this on cyanogenmod nightlies you need
to flash in this order, otherwise the permissions for your
rom will not be correct. Flash the rom first, then the
patch, then the gapps.

2. For flashing on other CM based roms (deodex only). As
many of you might know, Some roms already include
gapps. So because of this, we will need to flash a
compatible deodex Rom, since the patch sets
permissions for the system, and gapps will not work
correctly with the permissions if already installed in the
system. Flash in the same order you would for normal
cyanogenmod roms. Rom first, then patch, then gapps.
Yes even if the rom already includes
gapps you still must flash gapps.


This thread will only be discussion for Cyanogenmod These are AOSP Roms. DO NOT EVER ASK ABOUT SENSE ROM TWEAKS EVER, they just simply won't work with these mods.

Do not submit revised versions that are already posted, I will try to keep the patches as updated as possible. Do not distribute or modify any of the scripts without my given consent, or at least give me credit!

I am not responsible for you breaking something on your device. If you come and tell me that my mods messed up your phone, I will laugh at you.

I have been running these mods flawlessly with no issues. So let's get right into it.

Options:

WARNING: Before you do anything, do a nandroid
backup. If you need to partition your sdcard via recovery, back up your
entire sdcard to your pc before doing so as it will get formated.

If you want a2sd, then you will need a ext4 partition on your sdcard. I
recommend at least a 1GB+ partition. That's it, the scripts will do the
rest.
You can not have any other types of a2sd installed before applying the patch.
The patch doesn't remove, it installs If you have manually installed some
other type of a2sd, you will need to wipe and re-flash rom. The main
important thing is, make sure system gets wiped.

If you want Linux-swap, just simply add a swap partition to your sdcard when
you go to format it in recovery, simple.

Next download and flash the latest patch over your current rom. Be aware
that if you have a swap partition, that your phone will reboot itself once after
your initial boot. Don't freak out and come crying about how your phone is
boot looping, it only reboots once. This is all part of the initial setup to make
sure swap is working properly.

How to check if a2sd is active and working in terminal emulator from your
phone
Code:
$ su
    # df -h
    Filesystem                Size      Used Available Use% Mounted on
    tmpfs                   183.6M     32.0K    183.6M   0% /dev
    tmpfs                   183.6M         0    183.6M   0% /mnt/asec
    tmpfs                   183.6M         0    183.6M   0% /mnt/obb
    /dev/block/mmcblk0p26
                        487.8M    143.8M    318.9M  31% /system
    /dev/block/mmcblk0p27
                        430.0M    147.3M    260.5M  36% /data
    /dev/block/mmcblk0p28
                        149.6M     47.5M     94.4M  33% /cache
    /dev/block/mmcblk0p31
                         19.9M     17.2M      2.7M  86% /devlog
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /sd-ext
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/app
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/app-private
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/dalvik-    
    cache
If you see this part then you are golden
Code:
/dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /sd-ext
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/app
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/app-private
    /dev/block/mmcblk1p2      1.9G      1.0G    788.7M  57% /data/dalvik-cache
How to check if swap is active working from terminal emulator on your
phone
Code:
$su
    # free
                       total         used         free       shared      buffers
    Mem:        376008       353776        22232            0        15756
    -/+ buffers:             338020        37988
    Swap:       249544        36780       212764
Next, enjoy your new mods

CMParts (Cyanogenmod settings source): https://github.com/pbeeler/android_p...s_apps_CMParts
Changelog: https://github.com/pbeeler/android_p...ts/gingerbread

Attached Files
File Type: zip CM7-SparksCo-Patch2.zip - [Click for QR Code] (569.7 KB, 106 views)
HTC G1: Bricked
HTC G1 #2: Broke
HTC Evo Shift 4G: Active
ASUS Nexus 7: Active
LGE Nexus 4: Active


2-step unroot back to stock 2.3.4 from s-off-Evo Shift 4G
My Work-Evo Shift 4G

Lead Developer of SaberMod
Nexus 4 SaberMod
Nexus 7 SaberMod
Nexus 7 3G SaberMod
Nexus 10 SaberMod

If I've helped you in any way shape or form please hit the thanks button
 
Royalknight6190
Old
#2  
Royalknight6190's Avatar
Retired Forum Mod / Recognized Developer
Thanks Meter 1092
Posts: 1,755
Join Date: Aug 2009
Location: Chandler
Holy crap, its Sparksco. How are you doing bro. Looks good, I really don't use a2sd but other might.

Coming from the DARKSIDE.
 
sparksco
Old
#3  
sparksco's Avatar
Recognized Developer - OP
Thanks Meter 5294
Posts: 7,289
Join Date: Feb 2010

 
DONATE TO ME
Haha good man. Yeah this is only really usefull if you are a really heavy app user. That's why I recommend a 1GB ext partition. I'll also try to keep it updated for cm9 once it comes out. How the heck have you been?

Sent from my PG06100 using xda premium
HTC G1: Bricked
HTC G1 #2: Broke
HTC Evo Shift 4G: Active
ASUS Nexus 7: Active
LGE Nexus 4: Active


2-step unroot back to stock 2.3.4 from s-off-Evo Shift 4G
My Work-Evo Shift 4G

Lead Developer of SaberMod
Nexus 4 SaberMod
Nexus 7 SaberMod
Nexus 7 3G SaberMod
Nexus 10 SaberMod

If I've helped you in any way shape or form please hit the thanks button
 
Royalknight6190
Old
#4  
Royalknight6190's Avatar
Retired Forum Mod / Recognized Developer
Thanks Meter 1092
Posts: 1,755
Join Date: Aug 2009
Location: Chandler
Quote:
Originally Posted by sparksco View Post
Haha good man. Yeah this is only really usefull if you are a really heavy app user. That's why I recommend a 1GB ext partition. I'll also try to keep it updated for cm9 once it comes out. How the heck have you been?

Sent from my PG06100 using xda premium
I am good, Deving away with this great device. My old team pretty much jump started the dev community for the MT4G about a year ago, we released like 10 Roms, Now we all went are seperate ways and I joined up with TDJ and we are now DARKSIDE Dev Team. I am working on Sense 3.5 Rom, ICS Rom (built from source), and a CM7-Hybrid Rom. Besides that I am hanging in there. Thanks for the Mod. What are you up to?

Edit: Anybody wanting to try this, Do it, I completely support anything Sparksco offers, his Rom was legit back in the day of the G1, He is a great dev. There you go gave you some endorsement. lol
 
sparksco
Old
#5  
sparksco's Avatar
Recognized Developer - OP
Thanks Meter 5294
Posts: 7,289
Join Date: Feb 2010

 
DONATE TO ME
Quote:
Originally Posted by Royalknight6190 View Post
I am good, Deving away with this great device. My old team pretty much jump started the dev community for the MT4G about a year ago, we released like 10 Roms, Now we all went are seperate ways and I joined up with TDJ and we are now DARKSIDE Dev Team. I am working on Sense 3.5 Rom, ICS Rom (built from source), and a CM7-Hybrid Rom. Besides that I am hanging in there. Thanks for the Mod. What are you up to?

Edit: Anybody wanting to try this, Do it, I completely support anything Sparksco offers, his Rom was legit back in the day of the G1, He is a great dev. There you go gave you some endorsement. lol
Very nice. Glad to see your doing well with the deving. I'm accually just been making kernels most of the time, but these patches are my little side projects when I have time. Thanks for the endorsement. Still just tinkering around here and there, but have been using github and working with source code a lot more now.

Sent from my PG06100 using xda premium
HTC G1: Bricked
HTC G1 #2: Broke
HTC Evo Shift 4G: Active
ASUS Nexus 7: Active
LGE Nexus 4: Active


2-step unroot back to stock 2.3.4 from s-off-Evo Shift 4G
My Work-Evo Shift 4G

Lead Developer of SaberMod
Nexus 4 SaberMod
Nexus 7 SaberMod
Nexus 7 3G SaberMod
Nexus 10 SaberMod

If I've helped you in any way shape or form please hit the thanks button
 
cbetso
Old
#6  
Senior Member
Thanks Meter 42
Posts: 132
Join Date: Jul 2008
Damn I seen Sparksco name and got really happy. I miss your rom
 
estallings15
Old
#7  
estallings15's Avatar
Senior Member
Thanks Meter 2470
Posts: 5,748
Join Date: Apr 2011
Quote:
Originally Posted by sparksco View Post
Very nice. Glad to see your doing well with the deving. I'm accually just been making kernels most of the time, but these patches are my little side projects when I have time. Thanks for the endorsement. Still just tinkering around here and there, but have been using github and working with source code a lot more now.

Sent from my PG06100 using xda premium
If you want to drop some kernels on this forum no one would object. We already have some great ones to choose from but nothing wrong with more choices. I'll test! Lol.

Sent from my HTC Glacier using XDA App
If you've helped me I'll be sure and hit the "Thanks" button. Please do the same for me!

Proud owner of a Nexus 4
and a myTouch 4G
 
chukis13
Old
#8  
chukis13's Avatar
Senior Member
Thanks Meter 89
Posts: 770
Join Date: Oct 2010
Location: FL
Hell yeah! I used your roms all the time on the g1. Good to see you around!

Sent from my HTC Glacier using XDA App
My Phones:
HTC G1 - Retired
HTC Mytouch 4G - Sold
HTC Sensation 4G - Sold
Samsung Galaxy Nexus (Verizon) - Current
The Following User Says Thank You to chukis13 For This Useful Post: [ Click to Expand ]
 
sparksco
Old
(Last edited by sparksco; 25th November 2011 at 09:39 AM.)
#9  
sparksco's Avatar
Recognized Developer - OP
Thanks Meter 5294
Posts: 7,289
Join Date: Feb 2010

 
DONATE TO ME
Quote:
Originally Posted by estallings15 View Post
If you want to drop some kernels on this forum no one would object. We already have some great ones to choose from but nothing wrong with more choices. I'll test! Lol.

Sent from my HTC Glacier using XDA App
Now that you mention it I did try to build a kernel for glacier based on my own kernel but it did not work out very well. Hopefully more kernels will start to pop up once cm9 is available that support swap. The best way to tell if it's working is on the logcats

Sent from my PG06100 using xda premium
HTC G1: Bricked
HTC G1 #2: Broke
HTC Evo Shift 4G: Active
ASUS Nexus 7: Active
LGE Nexus 4: Active


2-step unroot back to stock 2.3.4 from s-off-Evo Shift 4G
My Work-Evo Shift 4G

Lead Developer of SaberMod
Nexus 4 SaberMod
Nexus 7 SaberMod
Nexus 7 3G SaberMod
Nexus 10 SaberMod

If I've helped you in any way shape or form please hit the thanks button
 
pimpsta08
Old
#10  
Junior Member
Thanks Meter 2
Posts: 25
Join Date: Jul 2009
Thanks man, I have been waiting for more mods like this. Don't know why devs haven't been incorporating this into all their roms. Appreciate the work, looking forward to seeing u more around here.
Phone: MyTouch 4G
ROM: meXdroidMod
SD: 32GB Class 4

Retired: T-Mobile "Black-on-Black" G1


XDA PORTAL POSTS

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more

Forum Added for the Samsung Galaxy Mega

What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more