Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

Use SD as primary storage


  • Please log in to reply
21 replies to this topic

#1 drmspidi

drmspidi
  • Donators
  • 10 posts
  • Country:
    br - Brazil
  • Location:
    Campinas, SP
  • Device Model:
    Atrix 4G
  • CM Version:
    Waiting for CM9
  • Recovery Image:
    Stock

Posted 18 June 2011 - 08:36 PM

There`s any way in CM7 to use SD Card ext partition as a primary partition ?? I`ve tested Rodruiguez Miui and he notice my 1gb ext4 partition on my SD card as my internal. After this I didnt have to worry about moving the apps.



Any one know how can I do this in Cm7 ??



Thanks, and sorry about my EN

#2 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 19 June 2011 - 12:21 AM

The two most popular ways are DarkTremor's a2sd or S2E (the first being a flashable zip, the latter being an app downloaded from the market).

#3 drmspidi

drmspidi
  • Donators
  • 10 posts
  • Country:
    br - Brazil
  • Location:
    Campinas, SP
  • Device Model:
    Atrix 4G
  • CM Version:
    Waiting for CM9
  • Recovery Image:
    Stock

Posted 19 June 2011 - 12:40 PM

View Postbassmadrigal, on 19 June 2011 - 12:21 AM, said:

The two most popular ways are DarkTremor's a2sd or S2E (the first being a flashable zip, the latter being an app downloaded from the market).


Great !!

Thanks a lot !!

#4 drmspidi

drmspidi
  • Donators
  • 10 posts
  • Country:
    br - Brazil
  • Location:
    Campinas, SP
  • Device Model:
    Atrix 4G
  • CM Version:
    Waiting for CM9
  • Recovery Image:
    Stock

Posted 19 June 2011 - 10:40 PM

View Postbassmadrigal, on 19 June 2011 - 12:21 AM, said:

The two most popular ways are DarkTremor's a2sd or S2E (the first being a flashable zip, the latter being an app downloaded from the market).


Do you know anything about D2SD ??

I think this is what I`m looking for in CM7

#5 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 20 June 2011 - 05:00 AM

I am not sure what you mean by D2SD. I haven't heard of it and a google search didn't really pull anything up. Unless you meant a2sd? If so, then yes. I have used both the apps I mentioned above. I used DT's a2sd for quite a while and only recently (in fact, on my last wipe) I switched to S2E. S2E does have a nice interface, but I am not sure about how it will fair the next time I have to do a wipe, so that is still up in the air.

#6 temasek

temasek
  • Donators
  • 3345 posts
  • Twitter:temasek71
  • Country:
    sg - Singapore
  • Device Model:
    Nexus One / O2X
  • CM Version:
    CM7.2.0 RC0 SelfKANG
  • Recovery Image:
    Amon_RA

Posted 20 June 2011 - 05:21 AM

D2SD is commonly known as data to sd. It basically move apps, dalvik-cache and apps'data to your sd-ext partition. There are apps and scripts able to do that, of which bass already mentioned.

#7 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 20 June 2011 - 06:34 AM

View Posttemasek, on 20 June 2011 - 05:21 AM, said:

D2SD is commonly known as data to sd. It basically move apps, dalvik-cache and apps'data to your sd-ext partition. There are apps and scripts able to do that, of which bass already mentioned.

Thanks T. Don't know how I forgot about that one.

As for D2SD, my personal feelings behind it is you shouldn't attempt it unless you are a. already comfortable with the app2sdext programs out there... especially the one you plan on using. This is so you can have the knowledge to fix possible problems that may arise. b. you have a fast sdcard (temasek in the past has recommended a Class 10 without noticing a slowdown).

I haven't done it on my phone because my 32GB card is more important than getting d2sd running. AFAIK, the highest you can get a class 10 is 16GB, and I have heard they are expensive. Plus once you move over all your apps and dalvik cache, it takes A LOT of programs to fill your remaining internal space. I have over 200 apps installed (user apps, not system apps), and I still have 40MB left (although, I did individually move some apps data over that use a TON of data space... like Google Earth at 16MB :blink: ).

#8 drmspidi

drmspidi
  • Donators
  • 10 posts
  • Country:
    br - Brazil
  • Location:
    Campinas, SP
  • Device Model:
    Atrix 4G
  • CM Version:
    Waiting for CM9
  • Recovery Image:
    Stock

Posted 20 June 2011 - 01:10 PM

Still... it's a lot easier the way that Rodriguez implemented on MIUI... once you install the rom there's already 1Gb of "internal" memory !!

#9 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 20 June 2011 - 06:53 PM

Yes, that is true. CyanogenMod used to include it back in the CM5 days, but phones are coming with more memory and no developer wanted to code it. Plus there were alternatives to doing it with these scripts and the dev team felt that they were advanced enough. So we are left to our own to do this.

I doubt we will ever see a native app2sdext implementation in CyanogenMod again. Especially seeing how the devices with limited internal memory are now the minority.

#10 SCM_Crash

SCM_Crash

    Directing Your Porn

  • Donators
  • 201 posts
  • Country:
    us - United States
  • Location:
    Los Angeles, CA
  • Device Model:
    Nexus One
  • CM Version:
    CM7 Nightlies
  • Recovery Image:
    Amon_RA

Posted 20 June 2011 - 08:55 PM

Correct. As well as if you have a Mac or Linux box, the EXT partition for A2SD is exported and mounted when you plug the phone in, so this becomes an issue right away. You can easily corrupt the SD card this way. If you're running a Windows machine, this isn't so much a problem, although the risk still exists.

I use DT for apps2ext and it works well. I also have my dalvik on the SD. But I also have a Windows machine. When I use my Linux box, plugging in my phone could cause my phone to go unstable, so I avoid it. I will no longer be using DT when I pick up my next phone, but considering 300MB of my 1GB ext partition is in use right now, it wouldn't be possible to keep all my apps (or even 1/4 of them) without DT on the Nexus 1.

#11 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 21 June 2011 - 05:21 AM

View PostSCM_Crash, on 20 June 2011 - 08:55 PM, said:

When I use my Linux box, plugging in my phone could cause my phone to go unstable, so I avoid it.

I guess this depends on your distro, because on my laptop running Slackware, it won't mount any partition unless I actually click on it to have it mounted.

In fact, I just checked, and even with me mounting it, I could still access my apps while I was accessing the ext partition partition on my laptop. I think the phone is capable to do multi-mount out of the box with the fat partition, but some google developer felt it should be disabled.

#12 Daniel Serodio

Daniel Serodio
  • Members
  • 23 posts
  • Country:
    br - Brazil
  • Location:
    São Paulo
  • Device Model:
    Nexus 5
  • CM Version:
    Stock KitKat at the moment
  • Recovery Image:
    ClockworkMod

Posted 13 July 2011 - 07:31 PM

View PostSCM_Crash, on 20 June 2011 - 08:55 PM, said:

Correct. As well as if you have a Mac or Linux box, the EXT partition for A2SD is exported and mounted when you plug the phone in, so this becomes an issue right away. You can easily corrupt the SD card this way. If you're running a Windows machine, this isn't so much a problem, although the risk still exists.

I use DT for apps2ext and it works well. I also have my dalvik on the SD. But I also have a Windows machine. When I use my Linux box, plugging in my phone could cause my phone to go unstable, so I avoid it. I will no longer be using DT when I pick up my next phone, but considering 300MB of my 1GB ext partition is in use right now, it wouldn't be possible to keep all my apps (or even 1/4 of them) without DT on the Nexus 1.
That's very useful, thanks. I was using Leedroid 3.0.7 which uses app2ext and the card got corrupted frequently (I use a Mac).
I have a question, thou: if all methods (except for Froyo default) use an ext partition, why doesn't this problem occur with link2sd or app2sd?

#13 thebigdudebowsk

thebigdudebowsk
  • Members
  • 6 posts
  • Device Model:
    htc hero cdma
  • CM Version:
    ?
  • Recovery Image:
    ClockworkMod

Posted 15 July 2011 - 11:36 AM

"I have a question, thou: if all methods (except for Froyo default) use an ext partition, why doesn't this problem occur with link2sd or app2sd?"

apps2sd is not same as apps2Ext

apps 2 sd doesn't utilize ext2/3/4, it tosses a modded .apk directly on the fat32 file system in a '.android' file. While this is much easier to set up, performance suffers because it's reading/writing from a 'separate' disk as opposed to having the ext partition which the ROM assumes as its own memory (until it gets corrupted by another unix system double-mounting it and tearing the bits in half)

I just dug into this whole apps2ext process last night... i wish there was a passmark benchmarking software for androids because hell if i can tell if this whole process was worth it or not.

Edited by thebigdudebowsk, 15 July 2011 - 11:37 AM.


#14 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 15 July 2011 - 12:00 PM

It won't do anything to increase speed since internal memory is substantially faster than the sdcard. And between the two, I think you would be hard-pressed to notice any speed difference from using Froyo's app2sd vs any app2sdext. The difference is space (since some phones like the G1 and N1 are EXTREMELY limited on internal space) and convenience. Froyo's leaves a lot to be desired. It doesn't move the whole app so some space is still taken in internal (and the amount varies wildly between apps). You lose the ability to use widgets or have system services. All apps become unavailable when you mount the sdcard (unless you use the multi-mount app).

app2sdext fixes those problems (although it is much more difficult to initially get up and running). And unlike SCM_Crash, I didn't have ANY issues with my ext partition when I mounted it in linux (maybe Macs are different?). While I was using the phone, I mounted the ext partition and tinkered around in it. I had no corruption, and no issues on the phone.

#15 thebigdudebowsk

thebigdudebowsk
  • Members
  • 6 posts
  • Device Model:
    htc hero cdma
  • CM Version:
    ?
  • Recovery Image:
    ClockworkMod

Posted 15 July 2011 - 12:13 PM

My bad, folks. I posted in this forum in a flyby, searching for any information about this issue. It worked out though, T H A N K  Y O U  bass~, that was exactly what I needed to hear. I have to make this heroC last a while, and in the end I think having the internal space and utilizing widgets/services through apps2ext will be worthwhile in the long run. I'm halfway there now, thankfully I found this post from icecreamisdrugs:

http://forum.cyanoge...dated-03312011/

shot in the dark, since we're here... any suggestions to improve memory capabilities of this thing? I guess I should learn how to solder 'RAMmicro' LOL

#16 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 15 July 2011 - 01:14 PM

Well... I use S2E currently on my phone (found on the market). It allows you to move the apps and dalvik cache over to the ext partition easily. It also allows you to move the app data over there as well, but that can cause a perfomance hit. Rather what I did is use Titanium Backup and move individual app's data over to the ext partition. Some apps really take up a ton of data space (like Firefox and Google Earth).

His post is really in depth, and to some points, I think it may be too in depth for most users. The easiest route would be to use an app2sdext program like Dark Tremor's a2sd or S2E to move apps and dalvik cache over to the sdcard. If you need additional space after that, I would move the individual apps data over manually on a per program basis. One way I have found to determine what apps are using a lot of space in data is to run these commands.

su
cd /data/data
du -hd 1 | grep M

This doesn't do any fancy sorting, but it does show everything in there that has a capital M in it (and the filesizes use something like 6.5M). It will throw some apps that have a capital M, but this should at least let you see the big culprits so you can move them manually over to the ext.

#17 thebigdudebowsk

thebigdudebowsk
  • Members
  • 6 posts
  • Device Model:
    htc hero cdma
  • CM Version:
    ?
  • Recovery Image:
    ClockworkMod

Posted 15 July 2011 - 02:10 PM

ok, a few more questions for you, kind sir... so flying by the seat of my pants on a razors edge before i found this and IceCream's posts, i went into amon-ra to partition the sd with 512+32, and then, without rebooting first(derp) told it to move my apps+dalvik+recovery.log to sd-ext. Then I mounted usb to PC and flashed my sd backup onto the fat32.


Depending on the source of what's reading the sd card's properties, the total memory denotes a reduction of fat32 space according to windoze, but s2d app doesn't recognize the partition, it just shows dashes where I'm assuming it would show the size of the sd-ext partition. All the apps except for odexed CM7 system apps that were sitting on internal storage are obviously not reporting for duty when LauncherPro looks for them.

Not sure if it makes a difference, but I went in again to amonRa and told it to fix apk uid mismatches and wiped the dalvik cache to see if it would fix the issue. Nope :/

did all my internal app data(of mild importance) and dalvik(oh well...) just get dumped into a black hole never to be recovered? Any other light to shed on this situation would be great.

Sorry for hijacking a thread here, though I am looking to accomplish the same thing as OP.

Edited by thebigdudebowsk, 15 July 2011 - 03:18 PM.


#18 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 15 July 2011 - 02:38 PM

First off, be careful when using swap (the 32MB partition) as it has been reported to cause slowdowns on 2.2+, although that might still be needed for your device as it doesn't have as much ram as others.

Second, what did you use to move your apps+dalvik+recovery.log to the sd-ext? As far as I knew, there wasn't anything in the recovery to do this (although, I have never used Amon_RA).

First, in terminal, run

su
mount | grep mmc

to see if it has even mounted your sdext partition. If it hasn't try this.

su
mount -t auto -o rw /dev/block/mmcblk0p2 /sd-ext

Once you have done one or the other, try

ls- l

What do you see? Or if any of those kick back errors, what are they?

#19 thebigdudebowsk

thebigdudebowsk
  • Members
  • 6 posts
  • Device Model:
    htc hero cdma
  • CM Version:
    ?
  • Recovery Image:
    ClockworkMod

Posted 15 July 2011 - 03:18 PM

Found all the missing apk's in /data/sdext2, all the appdata is still in data/data.

I just rootexplored and throw the misplaced apks back into their proper internal folders, all works again except for the partition.


ran the first command, returned
/dev/block/mmcblk0p1 on /data/sdext2 type ext2 (rw,errors=continue)

ls- 1
ls-: not found

Edited by thebigdudebowsk, 15 July 2011 - 03:30 PM.


#20 bassmadrigal

bassmadrigal
  • Administrators
  • 12912 posts
  • Country:
    us - United States
  • Location:
    Newport News, VA
  • Device Model:
    Nexus 4
  • CM Version:
    10.2 Nightlies
  • Recovery Image:
    TWRP

Posted 15 July 2011 - 03:37 PM

It was ls -l (lower case L with a space between the ls and the dash "-") ;)

Anyway, for some reason it is mounting it as sdext2 and under the data directory (it should mount it as /sd-ext). This doesn't seem right. I would re-partition it. Then install DT's a2sd (which is a flashable zip) or reboot and install S2E (from the market). Let these programs move the apks and dalvik to the right spot. Then everything should work wonderfully. (S2E is probably the easiest.)