I've rooted and S-OFFed my desire GSM and i'm running CM7.0.2.1. i want to use the alpha-rev internal memory partition table for cm7 but i saw that it only has 5mb of cache.
I read somewhere that the cache limits the size of apps you can download (if you have a 5mb cache, you can't download things more than 5mb from the market). Is that true? I guess there'll be a drop in performance if you come from a 40mb cache system, correct?
*EDIT just found that thread about making your own custom partition sizes: http://forum.xda-developers.com/showthread.php?t=806321*
I'm also thinking of making a custom partition with 130mb system, 40mb cache (same as stock), the rest for storage.
in that post, it says, "Create mtdpartmap.txt on SD card with size of system & cache, the example provided sets system to 125MB and cache to 5MB, this will depend on your ROM: echo "mtd 125 5" > /sdcard/mtdpartmap.txt"
does that mean just make a .txt file and inside just write a line that reads "mtd 125 5" ?
Thanks in advance!
I have cm7 hboot and download big apps like angrybirds (over 10mb) without problem despite the 5mb cache, only limitation connected to small cache i know is inability to flash radio from Recovery(you must do it from fastboot)
Sent from my HTC Desire using XDA App
Have a look at the partitioning using CM-7.0.2.1 and cm7 partitioning:
--- cut here ---
# df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 207632 32 207600 0% /dev
tmpfs 207632 0 207632 0% /mnt/asec
tmpfs 207632 0 207632 0% /mnt/obb
/dev/block/mtdblock3 133120 132948 172 100% /system
/dev/block/mtdblock5 313088 114740 198348 37% /data
/dev/block/mtdblock4 5120 1564 3556 31% /cache
/dev/block/mtdblock5 313088 114740 198348 37% /cache/download
/dev/block/vold/179:1
31154688 23073632 8081056 74% /mnt/sdcard
...
--- cut here ---
as you can see: if you use cm7 partitioning it uses the same partition for download cache and data - so there is enough space.
thank you!
Is there any noticeable performance drop when you are going from a 40mb cache to a 5mb cache?
helpmeroot said:
thank you!
Is there any noticeable performance drop when you are going from a 40mb cache to a 5mb cache?
Click to expand...
Click to collapse
I went from stock (40) to oxygen (10) - there isn't any change to performance, if you mean speed, responsiveness etc. because of the partition itself.
My phone is faster because of the rom and kernel though!
thanks. I'll flash the CM7 partition tonight
*edit*
i feel that the alpharev's way is too complicated (installing fastboot and things) and i end up doing the custom partition size way
now i have:
130mb system
40mb cache
267mb data
restored my nandroid backup, and everything's working. HURRAY!!!
thanks again everyone!
Perhaps I don't understand the purpose of sd-ext/4ext/a2sd etc [I'm sure this is the case!]
I'm running the Aurora v3 rom - basically a sense2.1 with an ext partition. I cannot understand why I've 128mb free in /data after installing pretty much all my apps yet I'm getting insufficient storage errors; I can't install anything despite having a lot of /data free- it seems if my sd-ext if nearly full I can't use my /data?
1. The rom's files flash to /system, and a few to /data. As it's large, we partition the sd card with a 4ext part of say 342mb for overspill of the system/data files.
2. If we change the hboot (to cm7) such that the /system is smaller - overflowing into sd-ext - we get a larger /data partition for apps on the internal memory. (I've done this for for Oxygen/Redux roms and had over 340mb /data with no sd-ext.) Thus alpharev say's we'd get 287mb /data.
3. This rom installs apps to /sd-ext, and/or /data[?]; in Android's App usage I'm reporting 152mb used, 135mb free (the 287mb /data?); and 128mb free storage.
4. 4ext recovery reports 1.7mb free of 342mb for sd-ext - it's full. Which makes sense if apps install to /sd-ext, but why not fill the internal /data first? adb shell df -h gives:
Code:
Filesystem Size Used Available Use% Mounted on
/dev/block/mtdblock4 5.0M 796.0K 4.2M 16% /cache
/dev/block/mmcblk0p1 7.1G 4.5G 2.6G 63% /sdcard
/dev/block/mtdblock5 287.6M 159.3M 128.3M 55% /data
/dev/block/mmcblk0p2 331.3M 329.6M 1.7M 99% /sd-ext
/dev/block/mtdblock3 145.0M 122.8M 22.2M 85% /system
5. To me this means /data has 128mb free for apps; sd-ext is full with system files and apps - seeming to me that apps take space up on both /data and /sd-ext, duplicating space usage. Obviously I'm wrong on this but that's how I see my space disappearing lol Yet I cannot install any apps as I've insufficient storage.
6. Clearly I'm misunderstanding things after installing just 150mb apps and thinking I'd have 287mb of apps /data, not just /sd-ext: why shrink hboot's /system to make a large /data if the apps go to sd-ext?
7. I've not moved dalvik cache to sd as I thought I'd not need to given the seemingly large /data, and it's free amount. Clearly I can do so but why isn't my /data space available?
Sorry for long post and sounding dumb, I'm really trying not to be!
These Roms use sdext for both Rom and part of the apps and possibly dalvik too. Traditionally it would just be apps and maybe dalvik.
With these bigger roms, you need bigger ext to get the same. Yes when ext is full, you can't install anything. Maybe you need a bigger ext partition
Sent from my HTC Desire using XDA App
Thanks for the reply.
That's what I thought - I just cannot understand why I cannot use the free /data though; what's the point of changing to the CM7 hboot when your /data is limited to that of the sd-ext? Isn't it doubling up on storage use by apps, placing them in sd-ext and /data, and when one is full you can't utilise the other?
Sorry for sounding stupid, it just makes no sense to me.
btw I checked out your dGB, looks great. I do love miinimalist roms but also prize my Sense-720p'd camera!
No its not doubling up. The point is that /data/app and /data/dalvik-cache are symlinked to /sd-ext/app and /sd-ext/dalvik-cache.
However, /data/data where the libs, preferences and databases are, remain on /data/data
So when you install an .apk, it installs the app to /sd-ext/app, the dalvik is created on /sd-ext/dalvik-cache and the libs & db's etc will install to /data/data
If sd-ext is full, there is no where for the apk to go.
Thanks for clearing that up for me, I feel kinda stupid - I just couldn't get my head around it: why the nand wasn't being used for apk placement but I see they are split up and components spread over the combined sd-ext and /data. Thanks!
No probs. Not seen you on AF for a while?
OT
Android Forum? = xda? I've been offline a lot recently as this Indian Summer has made for some prime ultrarunning weather, but also takes a ton of time (by definition) although I've been rocking Redux/Aurora roms recently. Just been perusing the Desire forum today and there's been a ton of awesome rom progress since my last visit. I remember your help and work on Redux/thread/pm, great stuff. Still a beginner but it's very interesting learning this stuff, just also takes a lot of time for a non programmer!
Of potential note, 'found' a bug in gnu parted trying to partition out a 512mb 4ext sd-ext via 4EXTRecovery (madmaxx82 located it, I merely experienced it!) Always feels good to in a tiny way contribute
Apologies if this has already been asked elsewhere, but I got no search results on it...
I was checking partition sizes using Root Explorer yesterday, and the following is what I was seeing:
Data: 380MB, 65.11MB free
System: 312.5MB, 83.02MB free
Cache: 225MB, 1.31MB used
This works out at around 1GB of internal storage, and on my phone, over 300MB wasted between system and cache partitions. Is the large cache partition there for downloading all that extra game data, because it seems needlessly large otherwise?
The big question though - is there any way to repartition the internal storage?
Yes there is but you would need some way to instruct s1 boot to use the new partition table, even with an unlocked bootloader we can't do this. Also in the 2.3.4 update /cache/ has been reduced to 100mb.
Sent from my R800i using Tapatalk
AndroHero said:
Yes there is but you would need some way to instruct s1 boot to use the new partition table, even with an unlocked bootloader we can't do this. Also in the 2.3.4 update /cache/ has been reduced to 100mb.
Sent from my R800i using Tapatalk
Click to expand...
Click to collapse
Thanks So if I flash any of the 2.3.4 ROMs, I'll have an extra 100MB on my data partition? I'd be happy enough with that...
As for instructing s1 boot to use the new partition table, do you mean there's no way to do this, full stop, or no way to do it YET? Because obviously the 2.3.4 ROMs can do it, so just wondering if it's something the devs may be able to figure out and do in future...
drunkenfcuk said:
Thanks So if I flash any of the 2.3.4 ROMs, I'll have an extra 100MB on my data partition? I'd be happy enough with that...
As for instructing s1 boot to use the new partition table, do you mean there's no way to do this, full stop, or no way to do it YET? Because obviously the 2.3.4 ROMs can do it, so just wondering if it's something the devs may be able to figure out and do in future...
Click to expand...
Click to collapse
Thats the thing, it's just disapeared this other 100mb, they didnt add it to /data/ or /system/ just hid it on a seperate partiton
Afaik there is no way full stop, although we have unlocked bootloaders, we dont have s-off like HTC devices, were unable to modify bootloader Sony on the other hand add diffrent bootloader versions to there stock roms, so it's the latest bootloader that comes with the 2.3.4 roms that has repartitioned /cache/
If you want to free up some space, you may want to try link2sd on the market, it works simlar to apps2sd+ i have over 300 apps on my phone and still have 235mb free thanks to link2sd
https://market.android.com/details?id=com.buak.Link2SD&hl=en
AndroHero said:
Thats the thing, it's just disapeared this other 100mb, they didnt add it to /data/ or /system/ just hid it on a seperate partiton
Afaik there is no way full stop, although we have unlocked bootloaders, we dont have s-off like HTC devices, were unable to modify bootloader Sony on the other hand add diffrent bootloader versions to there stock roms, so it's the latest bootloader that comes with the 2.3.4 roms that has repartitioned /cache/
If you want to free up some space, you may want to try link2sd on the market, it works simlar to apps2sd+ i have over 300 apps on my phone and still have 235mb free thanks to link2sd
https://market.android.com/details?id=com.buak.Link2SD&hl=en
Click to expand...
Click to collapse
maybe they added it into an ext recovery, so maybe we could use CWM with 2.3.4?
AndroHero said:
Thats the thing, it's just disapeared this other 100mb, they didnt add it to /data/ or /system/ just hid it on a seperate partiton
Afaik there is no way full stop, although we have unlocked bootloaders, we dont have s-off like HTC devices, were unable to modify bootloader Sony on the other hand add diffrent bootloader versions to there stock roms, so it's the latest bootloader that comes with the 2.3.4 roms that has repartitioned /cache/
If you want to free up some space, you may want to try link2sd on the market, it works simlar to apps2sd+ i have over 300 apps on my phone and still have 235mb free thanks to link2sd
https://market.android.com/details?id=com.buak.Link2SD&hl=en
Click to expand...
Click to collapse
Thanks, I'll take a look
Do you have 2.3.4? You can use ADB to list the partitions, so you might be able to see where that 100MB has gone...
adb shell
df -h
I get the following:
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 199.0M 76.0K 198.9M 0% /dev
tmpfs 199.0M 0 199.0M 0% /mnt/asec
tmpfs 199.0M 0 199.0M 0% /mnt/obb
/dev/block/mtdblock0 312.5M 190.8M 121.7M 61% /system
/dev/block/mtdblock3 380.0M 296.4M 83.6M 78% /data
/dev/block/mtdblock2 225.0M 1.3M 223.7M 1% /cache
/dev/block/mtdblock1 10.0M 1.5M 8.5M 15% /data/idd
Or just 'df -h' from a terminal window on your phone...
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 177.3M 44.0K 177.3M 0% /dev
tmpfs 177.3M 0 177.3M 0% /mnt/asec
tmpfs 177.3M 0 177.3M 0% /mnt/obb
/dev/block/mtdblock0 312.5M 137.4M 175.1M 44% /system
/dev/block/mtdblock2 380.0M 123.3M 256.7M 32% /data
/dev/block/mtdblock1 101.5M 18.0M 83.5M 18% /cache
/dev/block/vold/179:1
1.9G 1.1G 773.4M 59% /mnt/sdcard
/dev/block/vold/179:1
1.9G 1.1G 773.4M 59% /mnt/secure/asec
/dev/block/dm-0 5.1M 3.6M 1.4M 71% /mnt/asec/com.mojang.miecraftpe.demo-1
This is from my phone running the latest CM.
I cant find the 100 MB here
Azeazezar said:
Code:
df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 177.3M 44.0K 177.3M 0% /dev
tmpfs 177.3M 0 177.3M 0% /mnt/asec
tmpfs 177.3M 0 177.3M 0% /mnt/obb
/dev/block/mtdblock0 312.5M 137.4M 175.1M 44% /system
/dev/block/mtdblock2 380.0M 123.3M 256.7M 32% /data
/dev/block/mtdblock1 101.5M 18.0M 83.5M 18% /cache
/dev/block/vold/179:1
1.9G 1.1G 773.4M 59% /mnt/sdcard
/dev/block/vold/179:1
1.9G 1.1G 773.4M 59% /mnt/secure/asec
/dev/block/dm-0 5.1M 3.6M 1.4M 71% /mnt/asec/com.mojang.miecraftpe.demo-1
This is from my phone running the latest CM.
I cant find the 100 MB here
Click to expand...
Click to collapse
I suppose if it's hidden from Android, then ADB wouldn't see it anyway. And it's actually more than 100MB. More like 123.5MB. Would love to know where it's gone!
Tested Roms (will not test SD-SWAP on most)
These are some roms I've tried the enabler on, since I don't use a swap partition on my SD card I don't bother testing it and usually don't advise using SD-Swap. It's only in the enabler for sake of completeness. All sd-ext tests are done as ext4 unless otherwise specified.
Andromadus Slim Bean Build 6 (JB 4.2.2)
DataSwap - OK
SD-EXT - OK
SD-Swap - Untested
Andromadus Mimicry 1.3+ (CM9 ICS)
DataSwap - OK
SD-EXT - OK
SD-SWAP - Not Tested
Andromadus Test builds - Jelly Bean(CM10) - Build #61+
DataSwap - OK
SD-EXT - OK
SD-SWAP - Not Tested
Virtuous Infinity 1.31.0 Alpha3 (Full Sense 4.0)
DataSwap - ISSUES*
SD-EXT - OK
SD-SWAP - Not Tested
*The init script in /system/init.d/80dataswap didn't automatically execute upon boot. However when running it manually it worked fine. (might be fixed in 1.3, have not tested yet).
ILWT CM7 (Build 471) with ILWT CM7 Kernel
DataSwap - OK
SD-EXT (as ext4) - Not Working *
SD-EXT (as ext3) - OK
SD-SWAP - Not Tested
* When /sd-ext formated as ext4 was not working, I used 4EXT recovery to format it to ext3 under tools -> wipe/format => ext3, rebooted and it worked.
Gen.Y VisionX B4
DataSwap - FIXED*
SD-EXT - OK
SD-SWAP - Not Tested
*Fixed in 1.3 to include the busybox prefix, 1.4 to include shebang (#!) string.
UPDATED Aug 19th 2012
v1.4 Changes from 1.3
Added shebang (#!) string to dataswap scripts
Changed init script permissions from 750 to 755
v1.3 Changes from 1.2
Updated dataswap script to use busybox prefix for swapon/mkswap
Updated SD-Swap to use busybox prefix
v1.2 Changes from 1.1
Added addon.d support for supporting Roms
v1.1 Changes from 1.0
Fixed a bug where 96MB option installed 64MB
Added 128MB DataSwap Option
Added ability to enable SD-Swap (choose w/ Sd-Ext if SD-Ext partition exists, without w/o)
Changes from previous version (1.0):
Migrated to Aroma 2.50 Installer
Removed SD-Swap activation from SD-Ext Enabler Script
SD-Ext Init Script made smaller (Specific to HTC Vision/G2/Desire-Z now)
Now with the Aroma installer allowing for an easier selection of mods to be applied.
DataSwap Enabler
64MB DataSwap (Recommended for some Roms)
96MB Option (heavier multitasking)
Skip/Off (do nothing, skip to next mod)
Remove (removes the swap file and swap script)
SD-Ext Enabler
Enabled (detects and migrates /data/app and /data/app-private to /sd-ext)
Skip/Off (Do nothing, leaves as-is)
Revert (Moves all apps from sd-ext back to /data and removes script)
SD-Swap Enabler
Enabled w/ SD-Ext - does not enable Sd-EXT, simply enables SD-Swap correctly if SD-Ext partition also exists
Enabled w/o SD-Ext - enables SD-Swap when no SD-Ext partition exists on the SD card
Skip/Ignore - Does nothing/skips
Remove - Removes the SD-Swap enabling script
Do not enable SD-Swap if your Rom Already supports SD-Swap out of the box (elitemod, etc), so double check first.
If you don't have an SD-Ext partition, then Swap partition will be the 2nd partition on the SD Card, otherwise it's the 3rd. Thus why the installer makes the distinction for with and without SD-Ext when it comes to SD-Swap options.
Regarding addon.d support
In roms that support /system/addon.d, during an upgrade (flashing a new rom) shell scripts in /system/addon.d would be utilized by the backuptool allowing the ability to upgrade the rom without having to re-flash the extra roms.
For example in my /system/addon.d/ folder there will be a 60-kbeezie.sh script when flashing version 1.2. If you were to upgrade your rom (for example Mimicry 1.3.2 to 1.3.3), the dataswap, sd-ext, sd-swap init scripts will be backed up, and then restored after the new rom has been upgraded (the same way google apps is preserved in the 1.3.3 upgrade, so no need to re-flash google apps).
So on any roms that support addon.d, you'll be able to upgrade your rom to the next version without having to reflash the dataswap/sd-ext enabler.
What is DataSwap
Dramatically improves multitasking. (Can be used with or without SuperChargerV6).
In layman's terms it's a swapfile placed in the /data partition, where it should be faster than using a swap partition on the SD card. Unlike SDSwap repartitioning is not needed. Every reboot removes and re-adds the file so that the file isn't working on one specific part of the emmc chip all the time (one of the downsides to SD Swap).
More information can be found on the original DataSwap post by Nik3r
http://forum.xda-developers.com/showpost.php?p=27608489&postcount=153
What is SD-EXT
The /sd-ext mount is a partition on the SD card formatted as ext4 allowing you more app storage space. Unlike other means of running apps off an /sd-ext partition, this mod/script only maps /data/app and /data/app-private to the /sd-ext leaving caching and other features on the internal memory where it is most efficient.
Because SD-EXT in this case is replacing your /data/app and /data/app-private you want to ideally make it bigger than your /data partition (no less than 1.5GB, 2GB is a good fit). However bear in mind that if you wish to revert back to using only internal storage, you'll want to make sure that your /data partition has enough room for the applications to be moved back.
Why Both Together?
When all the user apps are placed on /sd-ext you are typically freed of roughly 600-700MB of storage on your /data partition. Doing so gives the swap file more room to move about the /data partition, but also splits the I/O (input/output traffic) between your SD card for apps, and internal memory for swap/cache, which may improve the overall experience (and may also prolong the life of your device... in theory).
Also You are not as likely to run the risk of /data suddenly running out of memory because a 64MB swap file is created on top of your app space. (i.e.: say you only have 70MB free in /data from all your apps, and you reboot to apply DataSwap but not SD-EXT, your /data would become dangerously close to being full when the swapfile is created). Hence DataSwap should be used in conjunction with SD-Ext.
Tips
If you currently use EliteMod ICS, you should be able to use this zip to revert a SD-Ext installation back to internal memory. Just make sure you re-partition the SD card after reverting so that EliteMod's init script doesn't automatically move the applications back to sd-ext upon the next reboot.
The effect of DataSwap will greatly depend on how your rom handles memory. For example on Mimicry with SuperChargerV6 option selected, the DataSwap will rarely be used, but it is handy for rapid burst of memory when apps need it. Without SuperChargerV6 the dataswap does get used a bit more often with more apps active in memory, but the extent of it varies on your rom's configuration.
If you're considering reverting SD-EXT apps back to the internal memory the following command will show you partition usage (can be run in either terminal emulator, or adb shell):
Code:
busybox df -hm
With an output similar to this:
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 236.1M 313.1M 43% /system
/dev/block/mmcblk0p26
1.0G 239.8M 834.1M 22% /data
/dev/block/mmcblk0p27
295.3M 25.5M 269.7M 9% /cache
/dev/block/mmcblk0p28
20.6M 14.7M 5.9M 71% /devlog
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /sd-ext
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app
/dev/block/mmcblk1p2 2.0G 374.4M 1.6G 19% /data/app-private
Note how above /data has 834MB available, and /sd-ext is using 374MB, meaning /data will have enough room for the apps if you wish to revert.
DISCLAIMER
There is no guarantee this will work with all Roms, I've only tested it on a small handful of ICS roms (mimicry 1.3.1, EliteMod ICS). It is known to be skittish/non-working with most GB roms.
Do not ask if this would work on JellyBean, there's quite a bit of work that still needs to be done with JellyBean, and trying this on an alpha/preview JB rom will not likely work, plus I won't provide any support for someone complaining that it doesn't work on JellyBean as I'm not using JB right now.
Credits and Thanks
Thanks to Nik3r who originally wrote both scripts for his own EliteMod ICS Rom which provides both of these features natively to the rom (DataSwap is a seperate zip, but the rom itself already has SD-Ext/Swap support built in).
Thanks to blk_jack for providing support and information regarding the Aroma installer and assistance in testing swap on mimicry.
Checking if it worked
Typing free in either Terminal Emulator or adb shell, should show the approximate dataswap size on the swap line:
Code:
total used free shared buffers
Mem: 375916 372156 3760 0 4352
-/+ buffers: 367804 8112
Swap: 65532 17132 48400
For checking to see if SD-EXT is active, you can use the following command in terminal emulator or adb shell
Code:
adb shell busybox df -hm
Code:
Filesystem Size Used Available Use% Mounted on
tmpfs 183.6M 60.0K 183.5M 0% /dev
tmpfs 183.6M 0 183.6M 0% /mnt/asec
tmpfs 183.6M 0 183.6M 0% /mnt/obb
/dev/block/mmcblk0p25
549.2M 235.9M 313.3M 43% /system
/dev/block/mmcblk0p26
1.0G 287.8M 786.1M 27% /data
/dev/block/mmcblk0p27
295.3M 73.9M 221.3M 25% /cache
/dev/block/mmcblk0p28
20.6M 8.8M 11.8M 43% /devlog
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /sd-ext
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app
/dev/block/mmcblk1p2 2.0G 362.5M 1.6G 18% /data/app-private
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/sdcard
/dev/block/vold/179:65
12.8G 7.8G 5.1G 61% /mnt/secure/asec
You'll see that /sd-ext /data/app /data/app-private are identical in their capacity, usage and free space.
AGAIN there is no garantee it will work in every rom, if you do find success with it, post what rom and version you are using.
ALWAYS PERFORM A NANDROID BACKUP BEFORE APPLYING MODS JUST IN CASE
MD5 Checksum for kbeezie_dsext_enablerv1.4.zip: b0d00d89f265c57ba2aee0d7dc5ead24
you've moved really fast i can't keep up
great job.
any support for GB? did anyone try that on GB? or is it impossible?
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
you've moved really fast i can't keep up
great job.
any support for GB? did anyone try that on GB? or is it impossible?
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
I supposed its possible both features are just init.d scripts. But I don't know enough about the shell scripting differences between GB and ICS to know whether or not there will be conflicts. In theory you could take the sdparts init from elitmod cm7 and replace it in the zip (or I can when I get home)
The data swap one is very simple and may work without a problem, I'm more concerned about the sdext part.
Sent from my T-Mobile G2
kbeezie said:
I supposed its possible both features are just init.d scripts. But I don't know enough about the shell scripting differences between GB and ICS to know whether or not there will be conflicts. In theory you could take the sdparts init from elitmod cm7 and replace it in the zip (or I can when I get home)
The data swap one is very simple and may work without a problem, I'm more concerned about the sdext part.
Sent from my T-Mobile G2
Click to expand...
Click to collapse
it's currently 2:07am here so you'll do it when you get home
at first try the data swap (since you have high hopes, and since i'm more interested in it), then try the sdext...
data swap can be used without sdext, but as you mentioned, using both allows the data swap file to have more physical space to move around on every reboot...
but if everything woked out, i'll be using the data swap without sdext... cuz i really don't have sd space (i dunno why)
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
it's currently 2:07am here so you'll do it when you get home
at first try the data swap (since you have high hopes, and since i'm more interested in it), then try the sdext...
data swap can be used without sdext, but as you mentioned, using both allows the data swap file to have more physical space to move around on every reboot...
but if everything woked out, i'll be using the data swap without sdext... cuz i really don't have sd space (i dunno why)
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
Yea I mean if you flash the zip and don't have an sd-ext partition, nothing should happen, since it'll only activate if it see's an sd-ext partition.
And to see what I mean about the dataswap init script, this is all it is:
Code:
# Enables swap on data partition
# file is /data/local/swap
# POI: this can be used along with sdcard swap partition
# the load will be automatically evenly divided between the two locations
mv /data/local/swap /data/local/swap.old
busybox dd if=/dev/zero of=/data/local/swap bs=1M count=64
chmod 0600 /data/local/swap
mkswap /data/local/swap
swapon /data/local/swap
rm -f /data/local/swap.old
All it does is move the swap file to old (which course only does it if it exists), create a file of 64MB, make it a swap file, and turn it on. Rinse and repeat every time you boot up the phone.
I doubt those commands changed much from GB to ICS. The 04sdcardparts file on the other hand is around 240 lines. I'll unpack the one from EliteMod CM7 and run a diff on them to see if they're any different (if not, its because he simply migrated his latest work from ICS that he's currently on, to CM7 to fix the bug, which I think you were the one to report initially).
But yea as long as you understand the caveats of using DataSwap without an sd-ext I don't think it would be a major problem (just probably wouldn't perform as well in my opinion since you're accessing the same device for both swap and standard apps).
kbeezie said:
Yea I mean if you flash the zip and don't have an sd-ext partition, nothing should happen, since it'll only activate if it see's an sd-ext partition.
And to see what I mean about the dataswap init script, this is all it is:
Code:
# Enables swap on data partition
# file is /data/local/swap
# POI: this can be used along with sdcard swap partition
# the load will be automatically evenly divided between the two locations
mv /data/local/swap /data/local/swap.old
busybox dd if=/dev/zero of=/data/local/swap bs=1M count=64
chmod 0600 /data/local/swap
mkswap /data/local/swap
swapon /data/local/swap
rm -f /data/local/swap.old
All it does is move the swap file to old (which course only does it if it exists), create a file of 64MB, make it a swap file, and turn it on. Rinse and repeat every time you boot up the phone.
I doubt those commands changed much from GB to ICS. The 04sdcardparts file on the other hand is around 240 lines. I'll unpack the one from EliteMod CM7 and run a diff on them to see if they're any different (if not, its because he simply migrated his latest work from ICS that he's currently on, to CM7 to fix the bug, which I think you were the one to report initially).
But yea as long as you understand the caveats of using DataSwap without an sd-ext I don't think it would be a major problem (just probably wouldn't perform as well in my opinion since you're accessing the same device for both swap and standard apps).
Click to expand...
Click to collapse
well, i have sdswap that is on too so this might increase multitasking and swap speed a little more...
the data swap commands, is this it? all of it? cuz i can just copy past them into a .sh file and execute the script at boot... is it legit if i do that?
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
well, i have sdswap that is on too so this might increase multitasking and swap speed a little more...
the data swap commands, is this it? all of it? cuz i can just copy past them into a .sh file and execute the script at boot... is it legit if i do that?
Click to expand...
Click to collapse
Yea that's all of it, the zip basically installs it by doing:
Code:
...
package_extract_file("system/etc/init.d/80dataswap", "/system/etc/init.d/80dataswap");
package_extract_file("system/etc/init.d/04sdcardparts", "/system/etc/init.d/04sdcardparts");
ui_print("Modifying permissions...");
set_perm(0, 0, 0775, "/system/etc/init.d/80dataswap");
set_perm(0, 0, 0775, "/system/etc/init.d/04sdcardparts");
unmount("/system");
...
So technically if you want to do it manually all you have to do is save that as 80dataswap in /system/etc/init.d and make sure to set chmod 0775 on it, and reboot.
I just took a look at the one on EliteMod CM7, it's different and a heck of a lot smaller. It's a file called 10apps2sd and only 39 lines. I'm almost wondering though if other aspects of the /sd-ext partition are in other init scripts (i.e.: initialized variables and such set before reaching that level of the init).
Also the EliteMod CM7 thread doesn't seem to make any mentions of DataSwap, was probably only created for his ICS rom (though the script seems like it'd work on just about any rom supporting those commands and had enough free space to work with).
In fact because nothing has changed dataswap wise from his own dataswap zip you could just grab it from his thread whichever size you want and flash it. It'd be identical to this bundled one without the sd-ext.
well init.d commands are supported for all Vision ROMs, and i'm sure they are supported on CM builds. so now the problem only lies on auto-sdext for GB.
EDIT: ok, before i reboot:
i have a 128MB sd swap already active... how do i know that the 64MB data swap is active too?
you knew that by noticing the 64MB in "free"command ... but i already have a 128MB swap in "free" command
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
well init.d commands are supported for all Vision ROMs, and i'm sure they are supported on CM builds. so now the problem only lies on auto-sdext for GB
Click to expand...
Click to collapse
Got a suggestion for a good GB-based rom you were thinking of?
kbeezie said:
Got a suggestion for a good GB-based rom you were thinking of?
Click to expand...
Click to collapse
lol, tsubus in his ILWT thread was talking about it 2 days ago... if it works, i might switch back to his ROM
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
lol, tsubus in his ILWT thread was talking about it 2 days ago... if it works, i might switch back to his ROM
Click to expand...
Click to collapse
Well later tonight (i.e.: after the hours someone might likely call/text), I'll give ILWT a try. Will install it clean, install some apps, then apply the mod, then install some more apps so that I know 1) already installed apps get moved, and 2) it continues to work even if you reboot.
kbeezie said:
Well later tonight (i.e.: after the hours someone might likely call/text), I'll give ILWT a try. Will install it clean, install some apps, then apply the mod, then install some more apps so that I know 1) already installed apps get moved, and 2) it continues to work even if you reboot.
Click to expand...
Click to collapse
i've configured the dataswap script... i'll reboot and report now
EDIT: ready for the big news? IT WORKS!
before the reboot, i had about 128MB sdswap on, and 166MB free in the /data partition.
afterr reboot, i now have 197MB swap (which is 128MB + 64MB... + the extra numbers ) and 95MB free in /data...
now with the deletion of some bloat apps (i have about 210 apps) i might get over 100MB free in /data, that way the file could have some space to physically move...
i'll throw my 5 thanks of the day to you now
EDIT: whoa! now with that much extra RAM, i think i should bump up my VM heap size.
EDIT: something weirrd just happened:
while i uninstalled 2 apps (100 floors and its official cheats) i went to check /data's free memory and it showed me 163MB, that's only 3MB "eaten" by the dataswap. so i went to terminal and saw that the total is still 197MB... is it because the file has a "dynamic" size? (meaning it gets larger when it needs to) or is it a constant size... and if it has a constant (64MB) size, what just happened with my /data partition?
———————————————————
i didn't mean to mock you or to offend you in any kind of way
The dataswap file would be a prefixed size, i.e.: if it was created as 64MB it stays as 64MB, what it consumes internally may vary, but its always eating least 64MB of the /data partition.
You could always run something like du -hs /data/*
to see what is using what space.
In other news the swap seems to be maxing out on mimicry (but I wonder if it's because a 1.3GB app is being installed from the play store and is using all the ram and then some), on elitemod it normally wouldn't get higher than 40mb or so.
ok, i confirmed this, no need to test it yourself... it practically works on ILWT as there is not much difference between EMCM7 and ILWTCM7...so you might wanna change OP and put that data swap works on GB... although never tested on sense or MIUI.
i can see it's using it a little bit... i mean i opened root explorer, play store, settings, then tapatalk. and when going back to root explorer it restarted... it didn't keep root explorer cached... is there a way to increase swap caching? i mean if i were android i would start caching in swap until i at least use 75% of it
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Riro Zizo said:
ok, i confirmed this, no need to test it yourself... it practically works on ILWT as there is not much difference between EMCM7 and ILWTCM7...so you might wanna change OP and put that data swap works on GB... although never tested on sense or MIUI.
i can see it's using it a little bit... i mean i opened root explorer, play store, settings, then tapatalk. and when going back to root explorer it restarted... it didn't keep root explorer cached... is there a way to increase swap caching? i mean if i were android i would start caching in swap until i at least use 75% of it
———————————————————
i didn't mean to mock you or to offend you in any kind of way
Click to expand...
Click to collapse
I think it's going to vary by the app, the swap is only used when memory is being run out of which is the way you want it to work. Swap shouldn't be used as caching per-se, just mainly as a ceiling for when ram is being used up.
I noticed that when using SuperChargerV6 the swap usage is almost nil, but course SuperCharger may prevent apps from multitasking as much.
I think it's a good idea to use the init.d scripts from the CM9 compatible kernel if you didn't. It basically just removes the support for async init.d ordering but should work everywhere even on AOKP. I had to make sure the scripts run in an order for the ROM installation but alone they don't need the syncing code and it reportedly freezes on CM9.
(EDIT, nevermind, it doesn't really matter since this script is the first of the sequence. Still the extra lines are unnecessary)
Also an "OFF" package may be a good idea
The swap usage is due to the tweaks in elitemod_kernel.sh, when the swap gets full it will slow the phone down to a crawl. That's why supercharger causes problems with swap, it overrides something in there.
nik3r said:
Also an "OFF" package may be a good idea
Click to expand...
Click to collapse
I'd imagine off for dataswap would simply be your original OFF mod zip, since int wouldn't do anything differently. What would be interesting would be an "off" for sd-ext, which I guess would just be a edify script to move /sd-ext/app and /sd-ext/app-private back to /data and then the removal of the init script.
But yea not all roms are designed to be used with swap storage, those that don't normally have a means of using swap on their own may behave differently when that's introduced into the mix, where as your rom actually has been tweaked with the possibility of using swap in mind.
I still get the best battery life and smoothest swap transfer with EliteMod though. (on mimify for example ,the CPU steps are not as frequent, and is a minimum of 245mhz, with no vdd_levels exposed for undervolting).
Well I wonder if it can be done entirely in recovery. I suppose it's as simple as mounting /data and /sd-ext and copying the data, then wiping /sd-ext. All in one neat flashable package. I guess 4EXT is pretty smart about mount points so it may be as simple as
Code:
run_program("/sbin/busybox", "mount", "/sd-ext");
and maybe not
nik3r said:
Well I wonder if it can be done entirely in recovery. I suppose it's as simple as mounting /data and /sd-ext and copying the data, then wiping /sd-ext. All in one neat flashable package. I guess 4EXT is pretty smart about mount points so it may be as simple as
Code:
run_program("/sbin/busybox", "mount", "/sd-ext");
and maybe not
Click to expand...
Click to collapse
I would think so too, but course I'd be more concerned about checking to see if /data will be able to contain the apps stored in /sd-ext if someone went past the 1GB size. But ya I was thinking bout it being done completely in recovery, and just removing the init script from /system after the move and wipe has been done to sd-ext.
Could probably even run_program () a small shell script copied to /tmp.
Well even if it was impossible to check free space and filesizes directly from recovery you can still invoke shell scripts and use busybox. Something like
Code:
run_program("/sbin/su", "/tmp/script.sh");
Even do the move from there. And then share the flashable zip
I admit you are most likely better at shell than I am, I don't use desktop linux outside VM.