[SWAP] Swap on Internal * v0.5 alpha * - Desire Android Development

SWAP on internal
Extend your RAM with very quick internal SWAP
v0.5 alpha​
For the moment, the script is confirmed to work only on ROMs with the chinese x-part (or data2ext) by Atroy script only (read at the end of this post for alternative).
The only ROM I am aware of using this script out of the box is the excellent MIUI XJ x-part.
However, I intend to develop a non-loop based version shortly. It should will be compatible with most ROMs, so stay tuned.
What and Why
I decided to make a script that places the swap file on internal memory. Many people place it on SD card, but to me it seems somewhat pointless, as it hardly offers sufficient performance.
However, placing it on the internal memory makes it a much more interesting concept, because it has much better random read/write performance than even the fastest SD cards.
Warning: placing SWAP on internal memory will subject it to frequent read/write operations which in theory shortens lifespan of internal memory chip which you cannot replace. This is because flash memory has limited number of write/read cycles to it. So, consider yourself warned.
HOWEVER:
1 - although true, in reality I have been unable to find any case of this actually affecting anyone's phone. There is very limited amount of data documenting real-life effect of that process, but most likely your device will be long gone before the internal memory will show any signs of wear.
2 - the script recreates the swap file on each boot using different physical blocks of memory - this means not the same blocks are always used. More on this in 'Do it right' section.
Do It Right
1. 16-32 MB of swap should suffice. If you think you need more, you are probably wrong. NEVER use all available internal space. The larger the proportion difference between swap size and total free space on the internal data partition, the more breathing space your internal memory gets, as this allows the swap file to be moved around upon every reboot, which, in turn, will make it use the same blocks more rarely, and thus extending memory chip lifespan.
2. Get rid of bloat you don't use from the system partition, ie: ringtones, live wallpapers, useless system apps. Then create a custom
hboot with smaller system partition and larger data partition. You can do it using this (also attached to this post).
3. Play around with swappiness parameter. Still, the default set by the script should serve you well. But if you are paranoid, you can use it to further decrease how often system will write to swap.
Removal
Disable execution flag on the scipt in /system/etc/init.d and delete swap.img from internal data directory (on x-part scripts it is /mnt/asec/mtddata/ )
v0.5 alpha
* first public release
* loop device version only
Click to expand...
Click to collapse
x-part Impacted script (80% chance of rendering your ROM unbootable)
I attached a data2ext script which should offer better performance and battery life than some other a2sd scripts.
You are free to try and flash it on your ROM, but there is a good chance it won't boot any more - this is a very alpha version and I am not working on it at the moment.
Do not post complaints about it here. I only want to hear from you if it works!

So this allocates a part of your internal memory for random access? Nice.
I personally don't need more RAM, but this could be useful.

This sounds really good to my ears :good:
I will keep an eye on it.
Edit:
A small question:
So is it possible to use this for any rom if you are using data2ext for it?
Or atm only for miui xj?

Androidmarketuser said:
A small question:
So is it possible to use this for any rom if you are using data2ext for it?
Or atm only for miui xj?
Click to expand...
Click to collapse
You have to use Atroy's data2ext, which is virtually impossible to obtain because it was developed as part of chinese MIUI rom and never released as a separate script.
However, I have been working on it and I am attaching an alpha version of my adaptation of this script to the first post
Let me know if it works, but there is a good chance your ROM will not boot any more.

impactor said:
However, I have been working on it and I am attaching an alpha version of my adaptation of this script to the first post
Let me know if it works, but there is a good chance your ROM will not boot any more.
Click to expand...
Click to collapse
Thanks for your answer
I tried to install it on CM10 by vj but it didn't work. Here are my steps:
Wiped everything except sd
Installed rom, then data2ext script and finally the swap script.
I'm on a ext4 partition if it matters.
I think (not really sure) one script has created two folders: /data/ and /data-app/ on sdcard.
Or did I just install it the wrong way?
Edit: The problem was as you expected that it stucked at HTC bootlogo.

Androidmarketuser said:
Edit: The problem was as you expected that it stucked at HTC bootlogo.
Click to expand...
Click to collapse
If you want to try x-part script, then do not flash swap script until you confirm the x-part rom works.
Try with some GB rom. Maybe you'll have more luck.

impactor said:
If you want to try x-part script, then do not flash swap script until you confirm the x-part rom works.
Try with some GB rom. Maybe you'll have more luck.
Click to expand...
Click to collapse
I'll try it out that way on JB first (I am addicted to the new design, can't go back:crying, if it doesn't work I will try it out with 2.3 anyway.
---------- Post added at 08:45 PM ---------- Previous post was at 08:31 PM ----------
Ok on JB the data2ext script doesn't seem to work, I can't boot.
I will try it out later with a GB rom, propably EuroSkank

Hmm still doesn't work.
I tried MW7 on Redux2 but stucks at boot logo...

Custom hboot maker link from thalasmus blog is dead!
Can someone plz attach it here!
Sent from my HTC Desire using xda app-developers app

vasili_defy said:
Custom hboot maker link from thalasmus blog is dead!
Can someone plz attach it here!
Click to expand...
Click to collapse
Attached.

Don't have swap on internal! The number of read/writes will just kill your nand by creating loads of bad blocks.
Just my 2 cents
Kind Regards
Dave

topgeardave said:
Don't have swap on internal! The number of read/writes will just kill your nand by creating loads of bad blocks.
Just my 2 cents
Click to expand...
Click to collapse
And pray tell, apart from hearsay, what else do you have to support the claim that it will occur within foreseeable lifetime of the device?
I'd love to learn.

impactor said:
And pray tell, apart from hearsay, what else do you have to support the claim that it will occur within foreseeable lifetime of the device?
I'd love to learn.
Click to expand...
Click to collapse
After flashing ROMs on my Desire for nearly 2 years I'm starting to get bad blocks on my nand. Having a swap partition on internal would accelerate the process of getting more bad blocks. That's what I think anyway. Check your recovery.log for bad blocks next time you wipe your phone.
Kind Regards
Dave
Sent from my HTC Sensation using xda app-developers app

I tried this on Alex-V 1.8 and nothing happened
probably did something wrong
I'll try again later

topgeardave said:
After flashing ROMs on my Desire for nearly 2 years I'm starting to get bad blocks on my nand. Having a swap partition on internal would accelerate the process of getting more bad blocks. That's what I think anyway. Check your recovery.log for bad blocks next time you wipe your phone.
Kind Regards
Dave
Click to expand...
Click to collapse
Thanks for the heads-up. But I gave a clear warning about in the first post. After two years, my desire has 4 bad blocks, which amounts to less than 0.5mb of internal space (less than 0.1%). Everyone should make a concious decision about using internal swap.
It will degrade the memory chip, yes, but is the degradation significant enough to care? Everyone has to decide for himself.

impactor said:
Thanks for the heads-up. But I gave a clear warning about in the first post. After two years, my desire has 4 bad blocks, which amounts to less than 0.5mb of internal space (less than 0.1%). Everyone should make a concious decision about using internal swap.
It will degrade the memory chip, yes, but is the degradation significant enough to care? Everyone has to decide for himself.
Click to expand...
Click to collapse
how can I check if it's running on my rom...?

Balino said:
how can I check if it's running on my rom...?
Click to expand...
Click to collapse
Go into terminal and run "free"

impactor said:
Go into terminal and run "free"
Click to expand...
Click to collapse
It says swap 0... I think woh's roms doesn't support swap....

Related

[DEV] /cache converted to swap

So as we all know /cache is used for OTA updates which, when you have your phone rooted is useless.
What I'm wondering is why we can't use /dev/block/mtdblock4 (aka /cache) as a permanent onboard swap partition. Granted it will only give us an additional 30MB but the speed of this swap will be higher than that of our sdcard.
In order to test this we'll have to:
convert this partition to a linux-swap partition.
mkswap /dev/block/mtdblock4
update init.rc to no longer mount this as yaffs2
add this new swap space to the swap script
The issue is of course being able to run a partition utility on the phone. Second, if this doesn't work we don't have a way to format /cache back to yaffs2 (that I know of).
If you have experience with any of the issues I listed above please comment/post. If you don't have a clue please don't post so we can keep this thread clean. I would appreciate only experienced devs responding.
If this is possible it would benefit Hero/MotoBlur ROMS which are memory intensive.
For your second concern, why would we need to change it back to /cache? Just make it a disclaimer when people attempt this operation.
More importantly, I think the primary issue is that this is rom space is it not? Doesn't this portion of the memory have a limited amount of times that it could be written to?
Hmm why not trying "parted /dev/block/mtdblock4" in recovery? ;-)
rest would be easy.
Couldn't we use mkyaffs2img (in recovery /sbin) to turn it back into yaffs?
persiansown said:
For your second concern, why would we need to change it back to /cache? Just make it a disclaimer when people attempt this operation.
More importantly, I think the primary issue is that this is rom space is it not? Doesn't this portion of the memory have a limited amount of times that it could be written to?
Click to expand...
Click to collapse
Well my concern was if there was some adverse effect of removing /cache from the system we'd need a way to revert back.
I am not aware of any MAX amount of times that /cache can be written to.
*Edited*
Due to unintelligent comments and moronism prevalent in this thread, I removed a line from this post to keep us on track of what this thread was meant to discuss.
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
dumfuq said:
Couldn't we use mkyaffs2img (in recovery /sbin) to turn it back into yaffs?
Click to expand...
Click to collapse
I hadn't checked in the recovery img for any yaffs2 utilities. But if that indeed does exist then this will be possible.
So then the issue would be, is this safe to attempt long term with the amount of writes being done to internal flash?
maxisma said:
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
Click to expand...
Click to collapse
So I see recovery is using it but the only thing in it is the recovery logfile. Could we modify the recovery to read/write the logfile to system/sd/recovery or something, or is the cache used for other stuff as well?
Another idea:
Instead of using it as swap, what if we could find a way to use it as compcache space? That way we don't sacrifice any of the internal ram for compcache and still have compcache running
maxisma said:
There's another thing:
Recovery can't be used without /cache !
So we need to convert back each shutdown and convert to linux-swap each startup..
Click to expand...
Click to collapse
What part of recovery needs /cache ? Does the recovery img mount the /cache partition? I'm wondering if the recovery img could be modified to write to the ext2 partition such as /system/sd/cache .
persiansown said:
Another idea:
Instead of using it as swap, what if we could find a way to use it as compcache space? That way we don't sacrifice any of the internal ram for compcache and still have compcache running
Click to expand...
Click to collapse
This is actually a good idea and it'd be interesting to see which way would benefit us more.
shafty023 said:
What part of recovery needs /cache ? Does the recovery img mount the /cache partition? I'm wondering if the recovery img could be modified to write to the ext2 partition such as /system/sd/cache .
Click to expand...
Click to collapse
When you activate an option in recovery, for example install update.zip, it writes the command into /cache/recovery and does a "quick reboot", which reads out the command and does this.
ok first dont even try it would one
reduce life on nand
cause issues with flashing
slow down any thing accessing the nand.
to the person thinking the ram is using flash. you must have never been to high school cause even typing class explains what ram is. plus g1 has memory write speeds of about 120mb/sec thats sdram. swap will never replace ram 120mb/sec versus 6 is huge
if you want real improvements you must change the code to something more efficient.
less bloat
more native code
fewer clock cycles
improved app states(cache on sd that would save the state by dumping part of ram to load later reducing clock cycles and reducing ram)
and my favorite rewrite system libs and apps to include more native code and reducing ram usage.
btw native code is about 10-100x faster than android java. that means 10%-100% more speed(or less load)
you could make a swap file and put it on there and just mount the file...........
yeah what he said!
zenulator said:
you could make a swap file and put it on there and just mount the file...........
Click to expand...
Click to collapse
This sounds like a good idea, altho we would have to get compcache working with backing swap file.
do we know if the /cache speed is compaired to Class 6 microSD?
good luck hardheads
jokersax11 said:
ok first dont even try it would one
reduce life on nand
cause issues with flashing
slow down any thing accessing the nand.
to the person thinking the ram is using flash. you must have never been to high school cause even typing class explains what ram is. plus g1 has memory write speeds of about 120mb/sec thats sdram. swap will never replace ram 120mb/sec versus 6 is huge
Click to expand...
Click to collapse
Dude honestly get a life. I have a Bachelor's degree in Computer Science. And I could code in Intel Assembly accessing each and every register in memory while you're left googling what Intel Assembly code means. Maybe you should keep up with the latest technology. If you did you'd know there are all-in-one memory chips that support NOR, NAND flash, and RAM.
http://www.eetasia.com/ART_8800466798_499486_NT_ab9e537f.HTM
jokersax11 said:
if you want real improvements you must change the code to something more efficient.
less bloat
more native code
fewer clock cycles
improved app states(cache on sd that would save the state by dumping part of ram to load later reducing clock cycles and reducing ram)
and my favorite rewrite system libs and apps to include more native code and reducing ram usage.
btw native code is about 10-100x faster than android java. that means 10%-100% more speed(or less load)
Click to expand...
Click to collapse
Exactly what type of "native code" are you referring to? And do you have any idea what type of memory the G1 uses for RAM? Go back to your typing class.
Shafty did you see Zenulator's idea? That seems like it could work.. Does the phone ever format the cache partition?

[DEV] unCoRrUpTeD Dual Boot V1 (RELEASE:TBA)

unCoRrUpTeD Dual Boot V1​
COMING SOON
Head on over to the official thread for unCoRrUpTeD Dual Boot >>>>>>>> Dual Boot
Reserved for no reason at all.
Maybe i can find a use for it
unCoRrUpTeD said:
Reserved for future use
Click to expand...
Click to collapse
HELL YEA!!! been waiting for this man..you are awsome! look forward to the release with anticipation. I did want to ask..whats a sufficient Micro Sd card to you(size wise)? i currently have a 2gb with about 1gb left would that be enough or should i go buy a 4gb?
+1 on this, will be really useful! Thanks for your work!
t12icky0 said:
HELL YEA!!! been waiting for this man..you are awsome! look forward to the release with anticipation. I did want to ask..whats a sufficient Micro Sd card to you(size wise)? i currently have a 2gb with about 1gb left would that be enough or should i go buy a 4gb?
Click to expand...
Click to collapse
I currently have the partitions for /system and /data set as 200Mb. i am going to try and add on more for /cache, but I am looking into making it as small as possible, since many would not be installing a lot of extra apps. It could be as small as 330Mb total.
so will i need that APPS2SD thing for this?
t12icky0 said:
so will i need that APPS2SD thing for this?
Click to expand...
Click to collapse
No. I will have instructions on setting up your sdcard
Right now my script is linux based. I'm not sure how much can be done with a batch script, but it will direct you in what you will need to do.
unCoRrUpTeD said:
No. I will have instructions on setting up your sdcard
Right now my script is linux based. I'm not sure how much can be done with a batch script, but it will direct you in what you will need to do.
Click to expand...
Click to collapse
sweet..your the man..cant wait!
One important thing I would like to propose here for the developer is a "standard" location somewhere on the SD card which would keep all the common data such as contacts, recent sms, call logs, etc. so that multi boot environment can share data without loss or duplicates.
In other words, boot to CM6 tonight and in two days when you decide to go back to stock ROM, all your sms, phone calls and such are picked up right where you left them in CM6 and vice versa.
Other than that, this sounds like an awesome thing. Can't wait to have the phone boot one ROM for Monday, another for Tuesday, and another for Wednesday and another...
obsanity said:
One important thing I would like to propose here for the developer is a "standard" location somewhere on the SD card which would keep all the common data such as contacts, recent sms, call logs, etc. so that multi boot environment can share data without loss or duplicates.
In other words, boot to CM6 tonight and in two days when you decide to go back to stock ROM, all your sms, phone calls and such are picked up right where you left them in CM6 and vice versa.
Other than that, this sounds like an awesome thing. Can't wait to have the phone boot one ROM for Monday, another for Tuesday, and another for Wednesday and another...
Click to expand...
Click to collapse
Not really possible. Different rom versions (2.1 vs 2.2) store the data in different formats. You'll have to rely on something like titanium backup to handle it.
How exactly is the dual-booting done? Does the batch script need to be controlled from the computer, or have you made a custom bootloader for on-the-fly switching?
HeroMeng said:
How exactly is the dual-booting done? Does the batch script need to be controlled from the computer, or have you made a custom bootloader for on-the-fly switching?
Click to expand...
Click to collapse
very good question
It's pretty simple if you have ever extracted the ramdisk and kernel from boot.img
The recovery has not been modified and the only time a computer is used is to setup the ROM the first time. You have to modify the boot.img from the ROM you want to installed on the sdcard. Once it has been changed, all you do is flash the boot.img of the ROM you want. I have mine setup where everything for the ROM is stored on the sdcard (/system, /data, and /cache) but have not been able to test out cache yet.
The reason for a non modified recovery is so that it can be done on any android phone.
I may put up a way to do this while I look into the script.
that is awesome you got so far so quick. i was hoping the squashfs tip would help you out. cant wait to see what approach you took.
unCoRrUpTeD said:
It's pretty simple if you have ever extracted the ramdisk and kernel from boot.img
The recovery has not beenmodified and the only time a computer is used is to setup the ROM the first time. You have to modify the boot.img from the ROM you want to installed on the sdcard. Once it has been changed, all you do is flash the boot.img of the ROM you want. I have mine setup where everything for the ROM is stored on the sdcard (/system, /data, and /cache) but have not been able to test out cache yet.
The reason for a non modified recovery is so that it can be done on any android phone.
I may put up a way to do this while I look into the script.
Click to expand...
Click to collapse
Oh, I see how you do the dual boot now. But I have one more question. How exactly do you get the rom on the SD? Do you use an ext partition or just put it on the FAT partition? Or is there some other partition type that I haven't heard of?
Sent from my Hero. It has a mind of its own
HeroMeng said:
Oh, I see how you do the dual boot now. But I have one more question. How exactly do you get the rom on the SD? Do you use an ext partition or just put it on the FAT partition? Or is there some other partition type that I haven't heard of?
Sent from my Hero. It has a mind of its own
Click to expand...
Click to collapse
Since everyone has a different size sdcard and most do not want to format the sdcard completely I will provide instructions on how to partition it correctly.
t12icky0 said:
HELL YEA!!! been waiting for this man..you are awsome! look forward to the release with anticipation. I did want to ask..whats a sufficient Micro Sd card to you(size wise)? i currently have a 2gb with about 1gb left would that be enough or should i go buy a 4gb?
Click to expand...
Click to collapse
Go on buy.com and get a 16gb sdcard for about 35 bucks, jesus lol !!!
CrashV2010 said:
Go on buy.com and get a 16gb sdcard for about 35 bucks, jesus lol !!!
Click to expand...
Click to collapse
lol..i dont use that much space...as you can see i have 1gb left on my
2gb..LMAO! i would have like prolly 15gb left on it. So it would be pointless for me to get a 16gb.
t12icky0 said:
lol..i dont use that much space...as you can see i have 1gb left on my
2gb..LMAO! i would have like prolly 15gb left on it. So it would be pointless for me to get a 16gb.
Click to expand...
Click to collapse
I have an 8GB class6. I have used about 4GB.
Post #2 has steps on setting up the sdcard
Just wondering but whats the plus side to this as opposed to just having different nandriod backups to flash between? I know it would be faster to boot but imo that's not woth all the partitioning of the sd card and what not. Now if it allowed you to run Windows Mobile roms from the SD then that would be awesome. I had a dual boot on my old HTC diamond and thats where I first discovered Android

[Q] - Move to SD enabled for (almost) all apps by?

Noticed today I'm able to move almost all of my apps to SD and not just the supported ones without having done anything but installing a rooted stock ROM and some standard goodies (SU, BusyBox, ROM Manager and Titanium Backup). Wondering if it was enabled by any of the above? the rooted ROM? or the stock ROM?
any takers?
Titanium backup, in "batch", has option to move all apps to either sd or internal memory.
Sent from my myTouch_4G_Slide using xda premium
It's not true A2SD. Just a bunch of buggy symlinks in /data and incomprehensible files in /sdcard/.android-secure that Google is trying to pass off as A2SD.
Sent from a message in a bottle.
blackknightavalon said:
It's not true A2SD. Just a bunch of buggy symlinks in /data and incomprehensible files in /sdcard/.android-secure that Google is trying to pass off as A2SD.
Sent from a message in a bottle.
Click to expand...
Click to collapse
thanks. i rooted my phone right after the first stock boot so i couldn't tell if it came that way. It's just odd coming from 2.2 that everything all of a sudden is now movable, despite being not true a2sd.
psychedel!k said:
thanks. i rooted my phone right after the first stock boot so i couldn't tell if it came that way. It's just odd coming from 2.2 that everything all of a sudden is now movable, despite being not true a2sd.
Click to expand...
Click to collapse
I know. Just because a bunch of people find hitting "partition SD card" in ClockworkMod Recovery too difficult doesn't mean those of us who want the full potential of our phones unlocked should suffer, but we're stuck until someone finds us the mountpoint for sd-ext.
blackknightavalon said:
I know. Just because a bunch of people find hitting "partition SD card" in ClockworkMod Recovery too difficult doesn't mean those of us who want the full potential of our phones unlocked should suffer, but we're stuck until someone finds us the mountpoint for sd-ext.
Click to expand...
Click to collapse
you all need to check out link2sd (free app) it will let you install apps to ext partition. I myself use it and have a 8gb ext3 partition with over 550+ apps/games installed. It also lets you decide if you want to move dalvikcache and library files to ext to save more internal space. I used mini tool partition app on my pc to create a larger ext partition then cwm would allow.
Sent from my LG-P999 using xda premium
d12unk13astard said:
you all need to check out link2sd (free app) it will let you install apps to ext partition. I myself use it and have a 8gb ext3 partition with over 550+ apps/games installed. It also lets you decide if you want to move dalvikcache and library files to ext to save more internal space. I used mini tool partition app on my pc to create a larger ext partition then cwm would allow.
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
I'll try it on my days off. Thanks for the tip!
Sent from a message in a bottle.
blackknightavalon said:
..we're stuck until someone finds us the mountpoint for sd-ext.
Click to expand...
Click to collapse
sorry can you explain how and where we're stuck on and is that specific to our device?
blackknightavalon said:
I know. Just because a bunch of people find hitting "partition SD card" in ClockworkMod Recovery too difficult doesn't mean those of us who want the full potential of our phones unlocked should suffer, but we're stuck until someone finds us the mountpoint for sd-ext.
Click to expand...
Click to collapse
psychedel!k said:
sorry can you explain how and where we're stuck on and is that specific to our device?
Click to expand...
Click to collapse
WIP Memory Address Listing
You need to know where to put and access the data, explicitly, in order to be able to use that location.
Android does this by using mount-points, which translates to the memory address where it should be looking for the information.
The thread I linked to is one I started so that we can discover them all, and what mount points correspond to what memory address.
Please make sure to read post number 8 in the thread by dhkr234 which spells out a good caution about using memory addresses directly and why you should be using mount points instead.
If anyone makes any headway in learning anything we don't know so far, please post it in that thread so we can get a comprehensive listing of mount points and what memory addresses they correspond to.
I've been extremely busy on other projects, but if someone is going to come by and make A2SD available for us, having a road-map for them to follow already sitting here will make their life a lot easier. ( ...and maybe encourage someone to do it because the info is sitting there. )
...and yes, it is specific to our device. Every device addresses the internal memory differently and that makes the mount-points unique to each and every device.
gotcha, so...piecing this all together, does that mean that a true A2SD shouldn't rely on symlink at all and Link2SD (what d12unk13astard recommended) is essentially just another hack?
psychedel!k said:
gotcha, so...piecing this all together, does that mean that a true A2SD shouldn't rely on symlink at all and Link2SD (what d12unk13astard recommended) is essentially just another hack?
Click to expand...
Click to collapse
The real A2SD is not "just another hack," it's one of the ORIGINAL post-root hacks pioneers like JesusFreke came up with. It allows you to put your apps on an EXT partition of your SD card, and you can resize that partition if your computer runs a Linux distribution.
blackknightavalon said:
The real A2SD is not "just another hack," it's one of the ORIGINAL post-root hacks pioneers like JesusFreke came up with. It allows you to put your apps on an EXT partition of your SD card, and you can resize that partition if your computer runs a Linux distribution.
Click to expand...
Click to collapse
that i got, and sorry for being a pain..so then what difference does having a mountpoint or not make?
psychedel!k said:
that i got, and sorry for being a pain..so then what difference does having a mountpoint or not make?
Click to expand...
Click to collapse
Read the previous posts.
psychedel!k said:
that i got, and sorry for being a pain..so then what difference does having a mountpoint or not make?
Click to expand...
Click to collapse
Either:
blackknightavalon said:
Read the previous posts.
Click to expand...
Click to collapse
Or read this one again:
http://forum.xda-developers.com/showpost.php?p=19163237&postcount=8
dhkr234 said it good there.
I linked so someone who wants more of an explanation can follow and read up.
In short, you can very easily write to the wrong memory address.
This means:
Installing some silly game over parts of both your boot partition and recovery partition would give you a cool slide-paperweight.
Mount points prevent this from happening by ensuring the data is written to the proper memory addresses.

Partition resize help request.

Anybody wanna help me resize my data and system partitions? I can't figure out how to do it myself, the closest thing I found was for evo 4G, but I'd rather not take the risk of blocking my phone using that method. http://forum.xda-developers.com/showthread.php?t=1077426
Question I have to ask is why ?
Garridon said:
Anybody wanna help me resize my data and system partitions? I can't figure out how to do it myself, the closest thing I found was for evo 4G, but I'd rather not take the risk of blocking my phone using that method. http://forum.xda-developers.com/showthread.php?t=1077426
Click to expand...
Click to collapse
It can't be done with this method, it looks like that's firerats custom MTD partitions and the Shift is EMMC partitioned which means no one has even thought about that.
prboy1969 said:
Question I have to ask is why ?
Click to expand...
Click to collapse
The reason this mod came about was because the older phones like the hero and whatnot had very little system memory, but after running firerats script it would give the hero like 300mb of system memory on Sense, so its a major memory increase and it would most likely eliminate the need for a2sd
Sent from my myTouch_4G_Slide using Tapatalk 2
Might be a better idea to do use a sd-ext rom with a partition on your sdcard. The shift has so little internal space in general, it might be a better idea to do that if your looking to get space.
Also, the OG Evo has a MTD memory, and the Shift has EMMc, which I believe is a lot less flexable to being changed than MTD is. Tell me if I'm wrong though.
Thanks for the quick response guys, I was really hoping to increase my data partition. There's so much room left untouched in the system folder. So no hope in doing this I assume your saying?
Sd_ext or move trusted apps from /data to /system
Garridon said:
Thanks for the quick response guys, I was really hoping to increase my data partition. There's so much room left untouched in the system folder. So no hope in doing this I assume your saying?
Click to expand...
Click to collapse
You really wouldn't get much more outta system for data as you would a ext partition. Sd-ext is virtually unlimited depending on the size of your sdcard.
Not to mention you would have to revert back to the stock settings in order to install a sense rom for updating prl and such things. This could be very tedious.
Firerat's initial custom mtd was for the G1, which is a aosp phone stock and does not need tons of system/rom space.
Sent from my PG06100 using xda premium

[Q&A] [MOD] SD-EXT Boot MOD - CM12

Q&A for [MOD] SD-EXT Boot MOD - CM12
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [MOD] SD-EXT Boot MOD - CM12. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
I do not know how to use this mod who can help me ?
I do not know how to use this mod who can help me ?
Encryption Unsuccessful Message
I tried both mod1, 2, and 3. Each time I load my rom, load the BOOT-MOD-3.zip, and then my apps (PA Gapps).
I keep getting a Encryption unsuccessful message. Also to note, during the initial boot, it only preps/installs 12-14 apps and not the 70+ that usually need to be done when I don't run the move mod.
Any ideas?
bin8636 said:
I do not know how to use this mod who can help me ?
Click to expand...
Click to collapse
Use google to find how to create a sd-ext, there are many guides.
sillysuliman said:
I tried both mod1, 2, and 3. Each time I load my rom, load the BOOT-MOD-3.zip, and then my apps (PA Gapps).
I keep getting a Encryption unsuccessful message. Also to note, during the initial boot, it only preps/installs 12-14 apps and not the 70+ that usually need to be done when I don't run the move mod.
Any ideas?
Click to expand...
Click to collapse
You need to wipe all partitions except sdcard in recovery, flash rom, gapps, then mod.
When you update rom, flash rom then mod again, that's it.
SD-ext needs to be a second primary partition formatted in ext4 (or f2fs if using cm12/cm12.1).
Note: New versions uploaded. Now supports all ivanich's ROMs (cm11,cm12,cm12.1).
@hinxnz: great mod, thx!
Working great for me, but I got 2 questions:
1) I flashed the newest cm12.1 two days ago and flashed your mod (all in SD except dalvic) afterwards. Now you uploaded a New Version compatible with all ivanich Roms. Does your update make any differences for me with cm12.1? Should I reflash?
2) You just said that the mod should be flashed after gapps, I did it the other way round. Does it matter? Got no problems so far.
Sent from my Sensation using XDA Free mobile app
Tommyfirebird said:
@hinxnz : great mod, thx!
Working great for me, but I got 2 questions:
1) I flashed the newest cm12.1 two days ago and flashed your mod (all in SD except dalvic) afterwards. Now you uploaded a New Version compatible with all ivanich Roms. Does your update make any differences for me with cm12.1? Should I reflash?
2) You just said that the mod should be flashed after gapps, I did it the other way round. Does it matter? Got no problems so far.
Sent from my Sensation using XDA Free mobile app
Click to expand...
Click to collapse
It doesn't matter in what order, as long as the mod is flashed after ROM because it edits ramdisk in the kernel.
Your fine with the version you have, it will act the same. You can flash the newer version when you update your ROM.
Problem with storage size
Thanks very much for the mod.
I wanted to use "All Data excl. Dalvik-Cache" and ivanichs cm 12.1 with 4ext recovery.
I was using delta-roh method on my previous installation.
I wiped all partitions except SD card. clean install the rom, then pico gapps and then this mod. Then i install my backups with titanium backup and it started to say storage is full.
When I checked the storage it was still showin 1.15gb and it was full. But installed app size was showing 2gb. I wast able to get sms because of the storage was full.
Am I missing something with the installation method?
Thanks is advance for the replies.
How can I check free/used space on idata?
Sent from my Sensation using XDA Free mobile app
Same problem
Hey guys, I'm having the same problem than AKAndrew41. It gives me encryption unsuccessful screen after reboot. It keeps loading at bootloop and can't enter recovery neither. Can you help me?
Thank you!
sicko40 said:
Hey guys, I'm having the same problem than AKAndrew41. It gives me encryption unsuccessful screen after reboot. It keeps loading at bootloop and can't enter recovery neither. Can you help me?
Thank you!
Click to expand...
Click to collapse
Hi, I flashed boot.img (this file I unzipped from ivanich ROM 18.04.2015 ROM) from the computer with adb and flashed ivanich ROM 18.04.2015 from TWRP ivanich. It's helped.
Sent from my Sensation using XDA Free mobile app
Tommyfirebird said:
How can I check free/used space on idata?
Sent from my Sensation using XDA Free mobile app
Click to expand...
Click to collapse
You could use a root file explorer and check the properties of /idata or just enter code below into a terminal emulator. To enable terminal in cm12, goto developer options and enable local terminal.
Code:
df /idata
sicko40 said:
Hey guys, I'm having the same problem than AKAndrew41. It gives me encryption unsuccessful screen after reboot. It keeps loading at bootloop and can't enter recovery neither. Can you help me?
Thank you!
Click to expand...
Click to collapse
To enter recovery pull battery out, then reinsert it. Hold down volume down button while powering up device and it will enter bootloader, which then you can enter recovery by selecting recovery.
You must have a second primary partition (sd-ext) of your sdcard formatted as ext4 (or you can choose to use f2fs if using cm12 or cm12.1).
If your formatting your whole sdcard instead of shrinking your fat32 partition, then you need to create the first partition (fat32) first and then the second (ext4 or f2fs), otherwise they will be labelled wrong.
CM11 doesn't support f2fs, so if you format it as f2fs on CM11, you will get an encryption error and same goes I guess if you format a partition in ext2 or ext3 because it's not configured in fstab.
Did you try flashing ROM and then mod again, maybe it was a bad flash, it can happen.
I'm using your MOD Plus V3 with 2 f2fs partitions at the moment, which I created with GParted.
What does TWRP do when wiping sd-ext in recovery? If I need to wipe both is there any posibility without using GParted?
And similar, what is backuped by TWRP when doing a backup of sd-ext?
Multi swap
Hi there,
I love the work you've been doing on the sensation and I'm glad to still be using it 4 years on with the latest CM12.1. I have a problem with lagginess after multiple attempts to install CM12.1 and your boot mod v1.2. It seems to be an issue relating to the memory and swap, and I noticed running the cat /proc/swaps shows BOTH /dev/block/zram0 AND the data partition. Removing the zram0 by using the swapoff command speeds the phone up loads. Is there a permanent fix though to persist after reboots?
Thanks,
Keith
geekshow said:
Hi there,
I love the work you've been doing on the sensation and I'm glad to still be using it 4 years on with the latest CM12.1. I have a problem with lagginess after multiple attempts to install CM12.1 and your boot mod v1.2. It seems to be an issue relating to the memory and swap, and I noticed running the cat /proc/swaps shows BOTH /dev/block/zram0 AND the data partition. Removing the zram0 by using the swapoff command speeds the phone up loads. Is there a permanent fix though to persist after reboots?
Thanks,
Keith
Click to expand...
Click to collapse
Hi Keith, zram shouldn't be active, my mod disables it in fstab.pyramid, found in the root directory.
I don't know why it's activated on your side, maybe an app or init.d script.
To disable it, you could use an init.d script.
Code:
#!/sbin/sh
# Disable ZRAM
swapoff /dev/block/zram0
ZRAM sorted
Thanks for the reply mate. I installed TWRP (from 4ext) and used it to reformat everything and start from scratch which sorted out the ZRAM0 issue.
After reinstalling ivanich's CM12.1 and your boot mod v1.2 it was much better. I'm still having intermittent lag and slow network speeds so I reverted to CM11 this morning (with your boot mod) to see if it was any quicker. Seems to be much quicker but the lag persists. Weirdly I get the lag most in the settings, and it bombs out sometimes. I'm wondering if it could be to do with my SD card partitions which were created in GParted, not TWRP.
If you've got any ideas of things to check I'm all ears.
Thanks for the kind support!
geekshow said:
Thanks for the reply mate. I installed TWRP (from 4ext) and used it to reformat everything and start from scratch which sorted out the ZRAM0 issue.
After reinstalling ivanich's CM12.1 and your boot mod v1.2 it was much better. I'm still having intermittent lag and slow network speeds so I reverted to CM11 this morning (with your boot mod) to see if it was any quicker. Seems to be much quicker but the lag persists. Weirdly I get the lag most in the settings, and it bombs out sometimes. I'm wondering if it could be to do with my SD card partitions which were created in GParted, not TWRP.
If you've got any ideas of things to check I'm all ears.
Thanks for the kind support!
Click to expand...
Click to collapse
No worries, first try a lower swappiness value by lowering value in /cache/swap.conf, save it and then reboot.
Try 30 or 40, default is 60. See how it goes.
If you still have lag then your memory could be running very low, use an app or init.d script to raise minfree values slighty higher.
I don't think it has to do with your sd partitions, could be your sdcard is a little slow maybe.
You could probably check the partitions in twrp or gparted though.
If you sort it, post what you did :good:
hinxnz said:
No worries, first try a lower swappiness value by lowering value in /cache/swap.conf, save it and then reboot.
Try 30 or 40, default is 60. See how it goes.
If you still have lag then your memory could be running very low, use an app or init.d script to raise minfree values slighty higher.
I don't think it has to do with your sd partitions, could be your sdcard is a little slow maybe.
You could probably check the partitions in twrp or gparted though.
If you sort it, post what you did :good:
Click to expand...
Click to collapse
Update: Blew everything away again and installed cm12.1 fresh without the SD-EXT mod and it runs fast and lag-free. Installed the sd-ext and lagginess came back. :-/
I had previously tried a fresh install with another SD partitioned by TWRP, made no difference to lagginess. Lower swappiness values seemed to have a minor difference but still laggy.
The lagginess seemed to be mostly when loading from disk. Applications in RAM seemed to run fine until they needed to load something. Downloads very slow on WiFi or 3g, titanium backup very slow too. Strange...
It would be nice to get it working but this is a tad baffling. Thanks for your kind support!
Keith
geekshow said:
Update: Blew everything away again and installed cm12.1 fresh without the SD-EXT mod and it runs fast and lag-free. Installed the sd-ext and lagginess came back. :-/
I had previously tried a fresh install with another SD partitioned by TWRP, made no difference to lagginess. Lower swappiness values seemed to have a minor difference but still laggy.
The lagginess seemed to be mostly when loading from disk. Applications in RAM seemed to run fine until they needed to load something. Downloads very slow on WiFi or 3g, titanium backup very slow too. Strange...
It would be nice to get it working but this is a tad baffling. Thanks for your kind support!
Keith
Click to expand...
Click to collapse
Seems to me that your sdcard is not fast enough, what make and kind of card do you have?
SDHC or SDXC and UHS-I or UHS-II
I have a Sandisk Ultra SDHC UHS-I and it's only just fast enough for this mod, I need a faster one really.
I have no issues with download speeds with wifi, not really related to mod though, could be slow at writing to sdcard.
Titanium could be slow due to slower writing speeds on sdcard too as it has to build dalvik-caches on sdcard when restoring apps.
Edit: Can you try BOOT-MOD-1.1.zip, it's the non-plus version. It would be good to know if you still experience lags with it, if you do, then sdcard is not fast enough, otherwise could be something to do with the plus version, cheers.
hinxnz said:
Seems to me that your sdcard is not fast enough, what make and kind of card do you have?
SDHC or SDXC and UHS-I or UHS-II
I have a Sandisk Ultra SDHC UHS-I and it's only just fast enough for this mod, I need a faster one really.
I have no issues with download speeds with wifi, not really related to mod though, could be slow at writing to sdcard.
Titanium could be slow due to slower writing speeds on sdcard too as it has to build dalvik-caches on sdcard when restoring apps.
Edit: Can you try BOOT-MOD-1.1.zip, it's the non-plus version. It would be good to know if you still experience lags with it, if you do, then sdcard is not fast enough, otherwise could be something to do with the plus version, cheers.
Click to expand...
Click to collapse
I'm using a Lexar 32GB class 10 SDHC, had no issues with it. I ran the A1 SD card benchmarking tool and it measured reads of 17 and writes of 11 MB/s. The internal flash reported speeds of 25MB/s read and 7MB/s write by comparison.
I'll try the BOOT-MOD v1.1 and report back...

Categories

Resources