• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [MOD] CM7 data to ext

Status
Not open for further replies.
@hroark

I know this isnt the right thread to ask, but how exactly did you port cwm to the prevail, i am having trouble porting it to the zte warp, and could use your advice/help. You dont accept PM's so I couldnt get a hold of you that way.
 
@hroark

I know this isnt the right thread to ask, but how exactly did you port cwm to the prevail, i am having trouble porting it to the zte warp, and could use your advice/help. You dont accept PM's so I couldnt get a hold of you that way.


Well first it helped that we had an easy way to flash the recovery partition with Odin, so if you dont have a way to do that on the Warp you need to find a way.


I used Koush's guide to get going
My Brain Hurts: Porting Clockwork Recovery to New Devices

I then copied and modified the source code for the Galaxy Ace and changed all the settings in the boardconfig file to match what are phone has


Some important info you will need is the partition layout and partition sizes.
 
Well first it helped that we had an easy way to flash the recovery partition with Odin, so if you dont have a way to do that on the Warp you need to find a way.


I used Koush's guide to get going
My Brain Hurts: Porting Clockwork Recovery to New Devices

I then copied and modified the source code for the Galaxy Ace and changed all the settings in the boardconfig file to match what are phone has


Some important info you will need is the partition layout and partition sizes.

thanks man, I got the partition sizes, and also used koush's guide, we also have a way to flash using fastboot. I got one built but it's having issues with doing nandroid backups, such as freezing for 10+ mins.. dunno what it is..
 
thanks man, I got the partition sizes, and also used koush's guide, we also have a way to flash using fastboot. I got one built but it's having issues with doing nandroid backups, such as freezing for 10+ mins.. dunno what it is..


did you check your recovery.fstab file to make sure it was correct
 
did you check your recovery.fstab file to make sure it was correct


yea I did, Its bothering me a bit, cuz I tried checking and rechecking everything... idk what it could be...

it freezes when trying to do a nandroid of data partition

[edit]

btw hroark, thanks for helpin me out bro, u = pure awesomeness
 
I love the way my phone has run since switching to this. And I think my SD is nowhere near a 10.

Not to beat a dead horse to death, but just to clarify in my mind.

If I want to go back to CTMOD to flash PRL. (I know that Optimus has found a way to do it with CM7), I need to:

CWM backup (all data on SD)
Flash CM7 kernel
(here is where I am unclear and probably wrong)
Reboot this will move /data from SD back to /data partition
If not, I need a zip to do this before I reboot.
CWM backup. For backup of data
Factory Reset. Format SD-EXT. I think it does it anyway.

Restore my ancient CWM backup of CTMOD. This backup has no A2SD. Everything internal. Also got a Kouma pack of this.
Optionally restore /data partition from CM7 backup. clear Dalvik. May cause problems.
Do the PRL dance of death or whatever.

To get back to where I am now:
Factory reset. Prob unnecessary
Flash newest CM7 and hotfix.
Flash zip to move data to SD
Restore data or whole backup from first CM7 backup when data was on SD.

Please correct my faulty logic. Probably don't need my CM7 apps on CTMOD. Especially just to change PRL. But, if it would work. It might be interesting. Or catastrophic.

Also, still unclear if I can use CWM to clear Dalvik and have it rebuild it on the SD.

Can I use Root Explorer and go to the SD-EXT folder in /data and delete everything from /Dalvik folder and reboot? Will that work too?
 
I love the way my phone has run since switching to this. And I think my SD is nowhere near a 10.

Not to beat a dead horse to death, but just to clarify in my mind.

If I want to go back to CTMOD to flash PRL. (I know that Optimus has found a way to do it with CM7), I need to:

CWM backup (all data on SD)
Flash CM7 kernel
Reboot this will move /data from SD back to /data partition
CWM backup. For backup of data
Factory Reset. Format SD-EXT. I think it does it anyway.

Restore my ancient CWM backup of CTMOD. This backup has no A2SD. Everything internal. Also got a Kouma pack of this.
Optionally restore /data partition from CM7 backup. clear Dalvik. May cause problems.
Do the PRL dance of death or whatever.

To get back to where I am now:
Factory reset. Prob unnecessary
Flash newest CM7 and hotfix.
Flash zip to move data to SD
Restore data or whole backup from first CM7 backup when data was on SD.

Please correct my faulty logic. Probably don't need my CM7 apps on CTMOD. Especially just to change PRL. But, if it would work. It might be interesting. Or catastrophic.

Also, still unclear if I can use CWM to clear Dalvik and have it rebuild it on the SD.

Can I use Root Explorer and go to the SD-EXT folder in /data and delete everything from /Dalvik folder and reboot? Will that work too?


Don't know if this'll help ya any but I was running ap2sd on CTMOD and S2E on CM7 . You just need to do a current backup of your CM7 . That will save the way your card is partitioned and put it back like that when you reinstall your backup . I switched back to CTMOD using backup , changed PRL then switched back to my backup of CM7 . You may wanna clear the Dalvik , I did not and it worked fine !!
One more thing , I just tried Optimus' way and it works fine . Just go to Term. Emultr , type su then enter .. you'll get a # sign . Just enter the info given in the thread " the entire echo 1 cmd " then press enter . After you do that , It'll make a sound on the PC that your device is connecting . Hook to CDMA , do ur bizzness and go back in to Term Emutr . Type su the enter . You'll get the # again . Then enter then entire" echo 0 cmd " , then press enter . Works like a charm bro . :D:D:D:D

EDIT : Added n to the to make then . LOL . Yeah ..... it was bothering me ! :p
 
Thanks, Biker. That all makes sense. I will definitely do that instead.

The PRL was just an example of a reason to switch back. I really have no reason to switch back now.

But, purely as an experiment. I was curious. If I don't care about my data and an willing to rebuild from TB and Market, no problem.

Hroarks elegant solution is a little different than S2E and A2SD. It moves the entire data partition to SD. Dalvik included. No pointers like the others. No GUI to move stuff back and forth. I may just need another zip to move the data back. Maybe, I can look at the zip, reverse the commands and save it with a different name.

If I don't care about data, I can probably just flash his kernel and reboot. Don't worry about what is or isn't on SD-EXT, and run everything internal to rebuild from scratch. Then reformat sd-ext before I install A2SD or S2E.

Just trying to get it in my head how to restore my data to internal, even if I stay with CM7 as the ROM. I think it will go to where it thinks the data partition is or from where it was originally backed up.

And again, let me stress, I love the way everything is running right now. Just mostly, a thought experiment to help me grasp what is really going on here.
 
Thanks, Biker. That all makes sense. I will definitely do that instead.

The PRL was just an example of a reason to switch back. I really have no reason to switch back now.

But, purely as an experiment. I was curious. If I don't care about my data and an willing to rebuild from TB and Market, no problem.

Hroarks solution is a little different than S2E and A2SD. It moves the entire data partition to SD. Dalvik included. No pointers like the others. No GUI to move stuff back and forth. I may just need another zip to move the data back.

If I don't care about data, I can probably just flash his kernel and reboot. Don't worry about what is or isn't on SD-EXT, and run everything internal to rebuild from scratch. Then reformat sd-ext before I install A2SD or S2E.

Just trying to get it in my head how to restore my data. I think it will go to where it thinks the data partition is or from where it was originally backed up.

Lemme know how it goes . You've got me curious now . :p
 
Thanks, Biker. That all makes sense. I will definitely do that instead.

The PRL was just an example of a reason to switch back. I really have no reason to switch back now.

But, purely as an experiment. I was curious. If I don't care about my data and an willing to rebuild from TB and Market, no problem.

Hroarks elegant solution is a little different than S2E and A2SD. It moves the entire data partition to SD. Dalvik included. No pointers like the others. No GUI to move stuff back and forth. I may just need another zip to move the data back. Maybe, I can look at the zip, reverse the commands and save it with a different name.

If I don't care about data, I can probably just flash his kernel and reboot. Don't worry about what is or isn't on SD-EXT, and run everything internal to rebuild from scratch. Then reformat sd-ext before I install A2SD or S2E.

Just trying to get it in my head how to restore my data to internal, even if I stay with CM7 as the ROM. I think it will go to where it thinks the data partition is or from where it was originally backed up.
This is just my guess, going of what has been said about everything.

You make your backup in cm7, with this solution then you can flash ctmod with no a2sd and your ctmod will work from internal.

you could even use a2sd and when you restore the cm7 it will replace everything.
or thats the theory
 
This is just my guess, going of what has been said about everything.

You make your backup in cm7, with this solution then you can flash ctmod with no a2sd and your ctmod will work from internal.

you could even use a2sd and when you restore the cm7 it will replace everything.
or thats the theory

Thanks, Optimus. I always respect your logic. The bugaboo in my head is that this does not use scripts or pointers. /data partition is moved and the entire thing is somehow remapped to SD, not each app. I don't know if A2SD would know what to do with the data in this form. Who knows about Dalvik. Probably trash.

I may be overcomplicating things.

Probably gonna need a ruling from the Author of the thread and the solution.
 
Boy, I feel stupid. Hroark explained it all in the OP.

I looked at both the CM7 Kernel Zip and the Zip in this thread. The one in this thread is basically an alternate kernel itself with the change he outlines.

So, that is why you flash the Original Kernel to get everything back. But, I do not think that anything will get moved back from sd-ext to the data partition. And I know that CWM will not restore the sd-ext to the data partition either.

Oh, well. No big deal. Like Optimus said, I could leave sd-ext alone and restore an internal memory only version of CTMOD. Do my thing and then flash back to CM7 and my apps would still be there from before I did the ROM switch.

That is, if I still had any reason to flash back to CTMOD now that Optimus has cracked the PRL problem with CM7. I loved CTMOD, but I love CM7 more. And I like this internal memory extension solution too. Still better than A2SD and S2E, just no utilities to go with it. No scripts, no pointers. Elegant straight from the kernel.

I am sure that a utility could be written to move the data from sd-ext to data and vice versa but definitely not by me at this time. And like Hroark said, I am sure that Kouma could implement this same scheme in his kernel in minutes, so that it would also work with CTMOD. Then I could switch between the two ROMS and kernels and have the same data partition on my SD. Probably more complicated then just rebuilding the Dalvik, in that case, I guess. But, most folks might would rather stay with the methods that have GUI based utilities to move stuff around, like S2E and A2SD.

Awesome, Hroark. It is kind of like the opposite of a magic trick. It is actually more elegant the more you understand how it works.
 
Boy, I feel stupid. Hroark explained it all in the OP.

I looked at both the CM7 Kernel Zip and the Zip in this thread. The one in this thread is basically an alternate kernel itself with the change he outlines.

So, that is why you flash the Original Kernel to get everything back. But, I do not think that anything will get moved back from sd-ext to the data partition. And I know that CWM will not restore the sd-ext to the data partition either.

Oh, well. No big deal. Like Optimus said, I could leave sd-ext alone and restore an internal memory only version of CTMOD. Do my thing and then flash back to CM7 and my apps would still be there from before I did the ROM switch.

That is, if I still had any reason to flash back to CTMOD now that Optimus has cracked the PRL problem with CM7. I loved CTMOD, but I love CM7 more. And I like this internal memory extension solution too. Still better than A2SD and S2E, just no utilities to go with it. No scripts, no pointers. Elegant straight from the kernel.

I am sure that a utility could be written to move the data from sd-ext to data and vice versa but definitely not by me at this time. And like Hroark said, I am sure that Kouma could implement this same scheme in his kernel in minutes, so that it would also work with CTMOD. Then I could switch between the two ROMS and kernels and have the same data partition on my SD. Probably more complicated then just rebuilding the Dalvik, in that case, I guess. But, most folks might would rather stay with the methods that have GUI based utilities to move stuff around, like S2E and A2SD.

Awesome, Hroark. It is kind of like the opposite of a magic trick. It is actually more elegant the more you understand how it works.
ok my last post was the result of way too little sleep, been working on a project that has me up all night and day. :p

Ok this is what I am seeing, the kernel modification is forcing the rom to see the ext partition as /data. It is literally changing the location. As has been mentioned in the first post what we call /data the rom sees as /dev/block/stl13 which is a fancy way of saying at a certain internal location.
Now after that the location for /data points to /dev/block/mmcblk0p2 which is the mount point for the ext.
From what I am seeing this is a very great way to do this, and I am surprised more people/ scripts have not implemented something like this. There is only 2 major problems that I can see with widespread use of this.
First this absolutely requires that ext partition to be there if it is not it will break the install. And 2 you better have a fast card or it will cause glitchiness and possible worse problems.

I believe if you use hroarks kernel with ctmod it may use the same locations. I am unsure if a call from the rom will be required to also put that location as the /data.

So you would flash ctmod then flash hroarks kernel that would overwrite the kuma kernal ctmod comes with.
 
So you would flash ctmod then flash hroarks kernel that would overwrite the kuma kernal ctmod comes with.

i think that may break wifi

it would be better for Kouma to release a kernel with this mod

I would do it, but I dont want to step on Kouma's toes
 
i think that may break wifi

it would be better for Kouma to release a kernel with this mod

I would do it, but I dont want to step on Kouma's toes
ah yes I forgot about the wifi modifications.

any testers want to try it go for it, just remember what hroark said it may break wifi.
 
This is why I have been trying to "sell" this thing like a televangelist. It is awesome people! Move towards the light!

Now to take a slight swerve on this thread.

I really want to know the rating of my SD card. I found the receipt from Radio Shack.

Sku 4400211 SanDisk 16GB regular price $49.99 on sale for $24.99

I called the Shack. The girl said that it was class 2. Their scale goes from 1-4. Middle of the road

Anyone familiar with this scale? How does it equate to the one that goes up to 10? 5 or 6?

Swerving back, WOW. I would love to see how this would perform on a sho nuff class 10!
 
I am sure this would be a trivial task for a Dev to write a utility to move the actual data back and forth, but could someone decompile S2E and gut out the pointer stuff and use the shell of what is left to modify it to work with this.

S2E does not have as many options as A2SD, so seems easier.

Also no need to split out Dalvik as separate option since it is part of data. Just copy the bytes if the partition back and forth. They can stay in both places, I guess.

Also, it would be a small APK I am sure but it could be uninstalled most of the time unless you needed it.

What is that physical data partition memory used for with this modified ROM? Nothing? Can it be used for something productive too?
 
What is that physical data partition memory used for with this modified ROM? Nothing? Can it be used for something productive too?

this is not a ROM it is just a modded kernel init.rc

the actual real data partition which is stl13 will not be used for anything when your running this
 
this is not a ROM it is just a modded kernel init.rc

the actual real data partition which is stl13 stl13 will not be used for anything when your running this

So...this all means that the phone will not boot without a mounted SD with an EXT4 formatted sd-ext.

Can idiot checks be put in to check for this at boot and revert to stl13?
 
So...this all means that the phone will not boot without a mounted SD with an EXT4 formatted sd-ext.

Can idiot checks be put in to check for this at boot and revert to /data or something similar?

It wont boot if no sd-ext has been setup

the init.rc file does not support enhanced commands, so i dont know how to do this without using extra scripts

i dont want to make it complicated with extra scripts

if there phone dont boot, they just need to flash back standard kernel with CWM or Odin

so my solution is not perfect, but it is simple
 
CM7 data to ext

ive tryed the zip following the directions step by step.... i now have a phone that is so slow 10 to 12 sec to open apps. also go launcher fc's leaving me a black screen i set the ext partion to 1gb. hope there maybe an easy expaination for this problem
 
CM7 data to ext

ive tryed the zip following the directions step by step.... i now have a phone that is so slow 10 to 12 sec to open apps. also go launcher fc's leaving me a black screen i set the ext partion to 1gb. hope there maybe an easy expaination for this problem

I don't have an answer for you for sure, but can you tell me what speed (class) your sd card is? I have a class 6 card and I noticed that the Gmail app takes forever to sync now as well as Google reader. They're not as bad in the Dolphin Browser though.

I have noticed other things are a bit slower but nothing else too drastic yet. I may just have to upgrade to a class 10 card as soon as I can afford it.
 
here is Kouma Kernel Gb with this MOD, I dont think Kouma will mind that I made it

KoumaKernelGBwithsd-extmod.zip

I have ctmod 2.4 and I am giving this a go...

I have a pny 8gb card class 10 and everything seems to be running smoothly. No appreciable lag and it seems quite as snappy as ever, if not more so.

Internal storage (stock storage settings) went from 127mb with stock to 117mb with just ctmod to .89GB with this added.

After the fresh install Titanium reports:
system rom 168mb (74.8mb free)
internal 1.00GB (937mb free)
sd card 6.93 GB (6.18 GB free)

I know I will have to keep the card in, but I never really take it out anyway. And make frequent backups and copy them to the 'puter.

Thanks Hroark!
 
I don't have an answer for you for sure, but can you tell me what speed (class) your sd card is? I have a class 6 card and I noticed that the Gmail app takes forever to sync now as well as Google reader. They're not as bad in the Dolphin Browser though.

I have noticed other things are a bit slower but nothing else too drastic yet. I may just have to upgrade to a class 10 card as soon as I can afford it.



its the same card that came with phone im going to upgrade and see if this helps. thanx for the reply
 
Status
Not open for further replies.
Back
Top Bottom