Ext4 (on sdcard) for OpenZio - Kyocera Zio M6000

As I seem to be repeatedly losing files (including my entire music library, recently), and I am tired of it taking so long to recognize new files that I put on the sdcard via USB; I am starting this thread in hopes of starting efforts to get ext4 support included (or patched to) the OpenZio rom.
I apologize, Spz0, if I am stepping on any toes. Just thought this should be a separate thread from the main build thread.
--Reasons for using Ext4:
1. Native Linux filesystem. Mounts instantaneously, reducing boot time.
2. Journaled filesystem. Corrupt / lost files virtually eliminated.
3. Major performance improvements over Fat32.
4. Large file support (not my thing, but some people want it)
--Problem(s) with Ext4 on sdcard:
1. Unable to natively read card with Windows.
(still able to mount via USB to phone)
2. Permissions may be difficult to work out.
Any thoughts?

From what I gather in my searches, the following will need to be done to accomplish this:
1. Kernel module (ext4.ko) needs to be installed.
2. Appropriate libraries also need to be installed.
3. init.rc needs to have mount options changed.
4. Permissions issues need to be addressed.

Id love to see ext4 support but that lies within the kernel
Sent from my Kyocera Zio M6000 using XDA Premium App

It isn't a monolithic kernel is it? If not, modules can be inserted on the fly
Sent from my Zio using XDA App

A what now?
Sent from my Kyocera Zio M6000 using XDA Premium App

before i switched over to openzio rom i ran ext3 on my sdcard, but did not try ext4. now my linux machine is dead and gone i have not tried either with openzio. with ext3 i did notice a small increase of speed, but never benchmarked to see how much.

Ext4 performs substanially better than ext3. The biggest improvement with ext3 was adding journaling support.
As for inserting kernel module on the fly, I am speaking as a Linux admin. I can't really speak about the Android kernel in particular. Typically linux kernels are dynamic, and allow for inserting of kernel modules as needed. Alternatively, kernels can be compiled as monolithic (or static), meaning that all required modules are compiled into the kernel.
I believe the required module is ext4.ko. I also read that there are some required libraries as well.

Well with android our kernel lies within our boot image. I'm sure ext4 can be added it's just a matter of taking the boot.img apart and adding ext4.ko then rebuilding the image and flashing it to the boot partition of the phone.
Sent from my Kyocera Zio M6000 using XDA Premium App

As my car is in the shop, and I can't work (contractor that travels to jobs with a ton of tools), I may get more motivated to look into this more.
BTW, loosing my entire music library wasn't due to the filesystem, it was an ID10T error. I accidentally put one of my other SD cards in my phone, then proceeded to run over my 16GB card with my chair. Oh well, I think it was a class 4. Getting a class 10 card tomorrow.

You'd have to hit up Adrynalyne for a kernel update.
Havent seen him around for months.
I won't be using ext4 for my ROM. Perhaps someone else who develops a ROM for the Zio may, but I just dont have the time right now, and the Zio is pretty maxed out as it is with all the work we've done on it thusfar.
A better more viable option would be to get someone to build CM6 for you all, so the zio can somewhat stay on the learning curve. This phone is getting a touch old with all the newer cricket phones that are coming on the market now. Unfortunately I dont (and havent) seen any new devs capable of producing CM6 hit the forums with a zio lately... But, you never know..
Good Luck!

I'll be getting my laptop back soon... And I need something to do on the free time to keep up on Linux, so I might just try building CM6 for the Zio.
Sent from my Kyocera Zio M6000 using XDA Premium App

Cool cool.
I have been pretty busy with my car and work
Mostly tho it's procrastination
Sent from my Zio using XDA App

Related

How to extract kernel config and firmware for ROM?

Title says it all. I can't figure out where all of this is stored on my phone so i can pull it. And what would i use to extract the guts of a zImage from a .tar i already have ?
I really want to finish developing my first ROM but i can't figure out how to create a whole META-INF folder or the update folder. Any uelp from our seasoned veterans would he greatly apprieciated.
Sent from my Cappy using mental telepathy, *****ezz.
The stock kernel does not offer any means by which to extract the configuration. My github has a config in the work branch based on the default configuration suggested by Samsung in their source release, as well as several initramfs directories intended to work with the Captivate Eclair releases, with additional features like user init scripts, Voodoo lagfix support, and Clockworkmod recovery in place of the standard recovery.
Sent from my SAMSUNG-SGH-I897 using XDA App
Thanks unhelpful.
Righ now i'm trying to figure out how to create a flashable kernel out of a tar
Sent from my Cappy using mental telepathy, *****ezz.
That depends on how you want to flash. Odin use GNU tar files, you can create or unpack these with GNU tar. They must not contain any directory structure, and may contain a file named zImage, which will be flashed as the new kernel, and a file named modem.bin, which will be flashed as the new phone/modem firmware. There are other recognized filenames, but these are compacted RFS filesystems, and we lack tools to create these.
Zip updates are entirely different, they contain a script that directs the unpacking of files from the zip archive. The unpacker doesn't support permissions or ownership, so the script needs to take care of that. You need to include special utilities to flash kernel or modem, or else use a modified update-binary that supports flashing these directly.
Sent from my SAMSUNG-SGH-I897 using XDA App
A flashing tool like redbend would work, right?
Sent from my Cappy using mental telepathy, *****ezz.
Yes, but newer versions don't support flashing a single partition, only an update image we don't know how to build, and older versions try to reboot on exit.
You might want to look in one of my update.zip files, the latest release includes an updater that can flash kernel and modem, as well as support for programs run from updater-script displaying text on the screen.
Sent from my SAMSUNG-SGH-I897 using XDA App
Alright, will do. How can i write it to wipe data if i used it to flash an entire ROM?
Sent from my Cappy using mental telepathy, *****ezz.
DOAlaboratories said:
Alright, will do. How can i write it to wipe data if i used it to flash an entire ROM?
Sent from my Cappy using mental telepathy, *****ezz.
Click to expand...
Click to collapse
There is update-script and the newer updater-script. They both use different syntax.
http://www.londatiga.net/it/how-to-create-android-update-zip-package/
http://forum.xda-developers.com/showthread.php?t=641223
http://android.modaco.com/content/h...list-for-update-script-commands/#entry1369582
my only problem now is i can't figure out how to flash the kernel with an update-script without redbend and how to flash an entire ROM and kernel with an updater-script so i can format data... dammit.
thanks for the patience guys.
It can be done with update-script, but it's probably easier to use my update-binary and an updater-script. You can also use a shell script, but you'll need to install a shelli yourself, and any utilities you want to use. My kernel installer contains an example of this as well.
Sent from my SAMSUNG-SGH-I897 using XD App
I was trying to figure the same thing. Unhelpful do you think the cappy froyo kernel can be fixed to use it in the vibrant? Audio is broken when making phone calls also home/back / volume keys are inverted
Sent from my SGH-T959 using XDA App
xalucardx said:
I was trying to figure the same thing. Unhelpful do you think the cappy froyo kernel can be fixed to use it in the vibrant? Audio is broken when making phone calls also home/back / volume keys are inverted
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Should be able to change the keylayouts in /system/usr/keylayout/
S3c-keypad.kl - Volume
melfas-touchkey.kl - Home and Back
Audio is due to a feature set in captivate stock kernel that in the end only works with captivate modems.
So it cant be fixed?
Sent from my SGH-T959 using XDA App
Not sure, you could try installing a Captivate modem with the Captivate kernel, that might work. You might be better off trying to get an i9000 froyo leak to run than the Captivate one.
Sent from my SAMSUNG-SGH-I897 using XDA App
Thanks for your answers gonna check it out
Sent from my SGH-T959 using XDA App

[Q] voodoo VS ULF

can anyone please elaborate on if there truly is any difference between the 2 lagfixes
i realize they are made by two different guys, and that it also depends on the actual rom , but isnt it just converting file systems to ext4 extnj or rfs.
Does one convert better or perform better, bc of a cleanup code ? i dunno just trying to pick a kernal and right now the only thing im weighing on is voodoo or ulf..
The newest voodoo is the best. Out converts the most stuff to ext4.
Sent from my Captivate.
MikeyMike01 said:
The newest voodoo is the best. Out converts the most stuff to ext4.
Sent from my Captivate.
Click to expand...
Click to collapse
Can you be more specific? Which file systems do not get converted using ULF?
heres what i do know ulf never auto enables on first boot,
vodoo converts everything to ext 4
ulf you literally have to go into recovery and convert every file system yourself,
i was looking more along the lines of actual
performance and cleanup,
like is there any ulf residue on boots and at startup bc you have to convert post boot,
just an example, looking for real differences
If memory serves me voodoo converts system while the other does not.
Sent from my Captivate.
seanzscreams said:
heres what i do know ulf never auto enables on first boot,
Click to expand...
Click to collapse
Completely untrue.
The ROM maker can enable or disable any lag fix at first boot if he chooses too.
Sent from my Captivate.
He's just humoring you. Everytime he uses serendipity, he gets so angry that he punches his cat in the face
As long as he's not punching someones salad.
Sent from my Captivate.

[APP] MakeUpdateZip-20110303 **Multi-file capable**

This is not only my first Android app, but this is also my first dive in Java. Please be gentle as I expect there are several uncaught / improperly handled exceptions.
This app will backup selected files to a zip file that can be restored via cwm. For now, that is all it does. It can be handy for the oc/uv crowd since it will allow you to keep a backup of a good S_volt_scheduler init file to flash in case your new setting are too aggressive. It does not currently restore permissions, nor does it assume root permissions.
todo:
Obtain root to copy any file
Integrate a file selector so read permissions will not be an issue.
Detect/Restore permissions
Possible feature additions:
Create a restore.zip from current files based on an update.zip you want to apply. Could save you from boot loops when messing with system files.
Create a restore.zip given a file, a target directory, and permissions.
I will probably add this to the market once I get through the todos and initial bugs.
Changelog:
20110303
Multi-file capable. OIFileManager does not yet support multi-select, so each file must be selected seperately
Exception caught for mission OIFileManager
_delete.zip file seems to work correctly in recovery
Since I am not yet using root and OIFileManager will not assume root, there are some directories that cannot be viewed, /data/app for example. There are also some files that can be selected but cannot be copied due to their permissions.
Requires OIFileManager
Nice, will be useful
This looks like it could be a useful/powerful app. It could definitely benefit from some features (more than one file/location would be great) but I can see myself using this.
Thanks!
gibson3659 said:
This is not only my first Android app, but this is also my first dive in Java. Please be gentle as I expect there are several uncaught / improperly handled exceptions.
This app will backup 1 file to a zip file that can be restored via cwm. For now, that is all it does. It can be handy for the oc/uv crowd since it will allow you to keep a backup of a good S_volt_scheduler init file to flash in case your new setting are too aggressive. It does not currently restore permissions, so the uses are currently limited.
todo:
Figure out why the _delete.zip does not delete the target file when run via cwm.
Detect/Restore permissions
Possible feature additions:
Enable backup/restore of multiple files
Create a restore.zip from current files based on an update.zip you want to apply. Could save you from boot loops when messing with system files.
Create a restore.zip given a file, a target directory, and permissions.
I will probably add this to the market once I get through the todos and initial bugs.
Requires oifilemanager.
Click to expand...
Click to collapse
Can u load the java app here? I can try to look into that and see if I can improve on the exception handling part.
fantastic idea
good job
Thanks for taking a look. Have anyone of you actually tried it?
It fc. On me... :'(
Sent from my SGH-I897 using XDA App
Do you have oifilemanager?
Sent from my SGH-I897 using XDA App
gibson3659 said:
Do you have oifilemanager?
Sent from my SGH-I897 using XDA App
Click to expand...
Click to collapse
Forgot that
Sent from my SGH-I897 using XDA App
Works like a charm! thank you so much! Perfect cause I love the stock music player and not all rims have it so this is great for installing it!
Sent from my SGH-I897 using XDA App
I am working on multiple file support, so look for a new version in a day or two.
Sent from my SGH-I897 using XDA App
just installed it, however it force closes as soon as I try to choose a source or destination file (happens as soon as I press the buttons.
Herp derp Captivate XDA app.
Make sure you install OIFilemanager from the market. I need to catch this exception and provide a link to OIFileManager.
Great App
Want to say thank you for making this. I've had all sorts of trouble getting apps from different roms to install to the system folder on my current rom. Now I can mix and match different apps easily without much pain. Thanks!
bpurkapi said:
Want to say thank you for making this. I've had all sorts of trouble getting apps from different roms to install to the system folder on my current rom. Now I can mix and match different apps easily without much pain. Thanks!
Click to expand...
Click to collapse
You are welcome. I actually have another app in mind to fully address that need, but I want to get further along with this one first. Since I am working on these on stolen time (I don't have any free time), it will take a while.
Since the apps seem to restore without permission issues, I may put that on the back burner. After I complete multi-file support, which of the future features from the op would you like to see first.
gibson3659 said:
Make sure you install OIFilemanager from the market. I need to catch this exception and provide a link to OIFileManager.
Click to expand...
Click to collapse
And I need to learn how to read through a thread for answers to my problems before I post about them.
New Version
Changelog:
20110303
Multi-file capable. OIFileManager does not yet support multi-select, so each file must be selected seperately
Exception caught for mission OIFileManager
_delete.zip file seems to work correctly in recovery
Since I am not yet using root and OIFileManager will not assume root, there are some directories that cannot be viewed, /data/app for example. There are also some files that can be selected but cannot be copied due to their permissions.
Can I get a gauge on the interest level for this app? Should I move this to the I9000 forum?
I think it's really useful when working whit OC/UV.
gibson3659 said:
Can I get a gauge on the interest level for this app? Should I move this to the I9000 forum?
Click to expand...
Click to collapse
I think you should get with rom devs, this should become an integrated feature for all rom upgrades, regardless of phone
at least get with the AIO dev, if you arent already

Interested in a better lagfix?

INTERESTED IN A BETTER LAGFIX?
Here is a small script which goes a little further than the Lagfix app in the PlayStore. This was originally posted in a different thread dedicated to a ROM so I'm trying to clean this post up as much as possible.
Caution!
A quick word of warning. Take the same safety precautions with this as you would the LagFix app. Both use the same utility which has been found to brick some devices. This was originally written for the VS980 (LG G2) and for a 4.2.2 ROM (fstrim support is native in 4.3+) though it should work fine as long as your device is compatible with the LagFix app (although you may need to tweak a few things)
Prerequisites
To begin with, you'll need a fstrim binary located in one of your device's PATH directories. A safe bet would be to drop it in /system/bin/ or /system/xbin/. Don't forget to change the permissions as well so it can run. If in doubt it's safe to give it full read/write/execute (I vouch for the one I link to at least...)
If you'd like the script to run on boot, then having init.d support on your ROM is ideal. If you don't have native init.d support, search xda as I've seen a "How to Enable init.d on Any Device Even Stock" how to floating around somewhere.
Finally, you'll need the filesystems-fstrim script that's also linked to at the end. The script basically performs three actions. First, it remounts all the filesystems (see note at the end if not on a LG G2) without the 'discard' flag. Since we will be running the fstrim utility on boot (or manually of you desire), having the OS clean up after deleted/moved files on the fly isn't necessary at all and just slows performance down noticeable. After that it attempts to trim each mounted volume oo your device (think defragment), then finally it writes all output to /$ANDROID_USER/logs/ (bytes trimmed from each mount, etc).
This script will trim other mounts besides /system, /cache, and /data. That and the fact that it removes the 'discard' flag is why I wrote it for personal use instead of using the app in the PlayStore (also nice having a record I'm /data/logs as well).
How to Run At Boot
With the fstrim utility in .../bin or .../xbin (with proper permission, and init.d support on your ROM and the 03-filesystems-fstrim script you're ready to go. Drop the 03-filesystems-fstrim script into your init.d directory and set permissions (it's safe to give it full read/write/execute access if unsure) and you're ready to go. Your init.d directory may vary depending on ROM. I'm used to always using /system/etc/init.d, but some ROMS (CyanogenMod for example) uses a different path. Ensure that it runs after any other scripts you may have in init.d which remount the filesystems to ensure that the filesystems aren't remounted elsewhere with the 'discard' flag. You can do this by appending a number to the beginning of the filename that's higher then the others (for example you could rename it 99-filesystem-fstrim and it will run after 01tweaks or whatever might be there already). More information on init.d can be found with a Google search as it's covered everywhere.
Now, at this point on next boot the script should run and if there are logs in /data/logs/ you can read them to determine if it succeeded or not. If successful, you won't see any error messages and on the mounts that were trimmed it will let you know how many bytes off each.
Notes
I wasn't expecting this post to get moved into its own thread and was sharing this to oothers using the same ROM I was. The section of code that remounts all the filesystems is hardcoded, so that section may fail on other devices that have a different structure {and having a filesystem mounted with 'discard' flag kind of defeats the purpose of trimming to begin with ), so you may need to change this section. If editing, use a text editor that allows you to turn word wrap off as for one, it can create nasty messes in the code with strange like breaks/etc and two, it's good habit anyways when dealing with any script or programming language. I used 920 Text Editor which is pretty decent but there are plenty other good ones in the Play Store. Running the 'mount' command with no arguments after it at the command prompt can help you map the filesystem on your device with the corresponding LG G2 one.
Files are currently hosted on my Drive until I find another browser that works or get on a PC. If you already have the fstrim binary you don't need this one..Feel free to PM Amy questions or ask here.
download ~ fstrim binary (rename to 'fstrim' without any extension
download ~ filesystems-fstrim script (again, strip off any extensions in the file name
MidnightHarvester said:
INTERESTED IN A BETTER LAGFIX?
Why would you want to use this (especially if using the LagFix in the PlayStore)? Good question!
Optimized Filesystem Mounts
If you use the lagfix app off the PlayStore (or any script/app/utility/etc that uses fstrim) then mounting the filesytems with the 'discard' option is not only redundant, but also gives a performance penalty since with 'discard', the file index AND OS are both made aware immediately when memory is free up to enable garbage collection. This sounds fine, except that doing this on the fly like this also slows things down a lot. Since we will he using fstrim ourselves we don't need this extra overhead. In the script is a good link to read that explains things better than I can.
More Thorough!
Every other method I've seen so far only trims /system, /data, and /cache. There are many other mounts that can be trimmed, and some are written to quite frequently (/persist as an example).
Maintains Lots of All Activity
All activity is logged and sent to $ANDROID_DATA/logs/ where it's then saved. That way you can tell if it's running on boot or on the schedule as it's supposed to he running.
OK well, there's not a lot going on here, just felt like being overly dramatic as it's boring over here at the moment. All of the above is true, and after deciding to post it in here I cleaned it up quite a bit so even the most novice at BASH (any language really) can understand what's going on and change it to suit your needs.
A few things to point out. You WILL need to have the fstrim binary located somewhere in one of your environment paths. A good spot for it is always /system/bin or /system/xbin of you are having trouble deciding where You will probably want to also ensure that the fstrim binary has the correct permissions. If you are unsure of what those are, just give it all read/write/execute.
Second, you will need the script and figure how out how you'll be using it. You need to keep in mind that in the /system/init.d/ directory there is a script there called 03filesystem (something like that) which also mounts the fileaystems. If you like, you can move that script to you sdcard (don't keep it in init.d though or it'll be run..I don't know if having a .bak file extension will stop it as I've never tried) and copy this script over. This script's mounts are EXACTLY the same (even includes the break lease at the end) as what Jake uses as default except without the 'discard' flag. Replacing the default 03filesystems with this one is a perfect place to run the script if you reboot your phone at least once every few days (can always run it manually as well if needed). If you leave Jake's in and still use this, then ensure this one is named appropriately so that it runs after his does, or his script will remount the filesystems again with 'discard'.
There are plenty of explanations in the script as well. Point is, just he aware that of it runs before Jake's filesystem mounts do his will overwrite this one's and you'll lose the advantage of trimming on startup (or a schedule).
Check the /data/logs/ directory for output from the script, and be sure to also give this script the correct permissions as well. If in doubt just give it all read/write/execute permissions (well that's what I've been using on both this and the fstrim binary. I've linked both of the files below. I couldn't upload as an attachment so I uploaded to my Drive. Enjoy.
Edit: This was written for and intended for the VS980 (Verizon G2). Other G2s should he perfectly fine and any device that is compatible to run LagFix off the Play Store (you don't need to use LagFix either BTW if using this). Just be sure that you device is on the compatible list before using, otherwise there is a possibility of bricking your device. If using a G2 you're fine, but I never know who else reads these threads.
download ~ fstrim binary
download ~ filesystems-fstrim script
Sorry everyone, I posted this late last night and didn't realize that the directory I uploaded the files to was private. The links should work now as I've set them to be Public.
If you have any questions, feel free to PM me.
Click to expand...
Click to collapse
Can someone chime in on what he's talking about in this very long winded post.
Sent from my VS980 4G using Tapatalk
friguy3 said:
Can someone chime in on what he's talking about in this very long winded post.
Sent from my VS980 4G using Tapatalk
Click to expand...
Click to collapse
If you can't be bothered to read it, it's probably not for you.
Dearborn1977 said:
If you can't be bothered to read it, it's probably not for you.
Click to expand...
Click to collapse
I did read it thank you very much sir. But, not all of us are devs or in the tech industry and understand this. Someone posts something, sometimes its nice to have others chime in or get a more simplified explanation. He posted it last night and nobody really commented on it (one maybe?)....makes you be cautious.
Sent from my VS980 4G using Tapatalk
The information is useful and should be in a thread of its own or maybe okibi can incorporate in 1.2.3
VS980 4G
friguy3 said:
Can someone chime in on what he's talking about in this very long winded post.
Sent from my VS980 4G using Tapatalk
Click to expand...
Click to collapse
It's a utility for trimming (defrafmenting) certain filesystems. This is built into 4.3+ and tries to run at least once every day or two, but we don't have it on 4.2.2 ROMs. The fstrim file is the binary that can run at the command prompt -
Code:
# usage
# fstrim [-v] {/mount-to-trim} // -v flag runs fstrim and sends output to stdout
#
# Example for trimming /data
fstrim -v "/data"
So fstrim goes into /system/bin or /system/xbin (set the permissions correctly so it can run. The other file is a script that I use to replace the /system/etc/init.d/03filesystems file that runs at boot that's included with the ROM (its named something like that, can't check at the moment). First it remounts all the filesystems just like the one in ROM does except they are mounted without 'discard' since we are trimming and don't need it. Then the script runs fstrim on all mounted volumes that it can run on and logs output to /$ANDROID_DATA/logs (/data/logs). Need to be sure to give this script the correct permmisions as well.
There's an app in the PlayStore that does the same thing except it doesn't tell all the filesystems or remount all your filesystems without the 'discard' flag which is really easy to use. This is just a more thorough method of trimming what that app doesn't and optimizing your mounts accordingly to take advantage of it (using trim on filesystems with 'discard' is redundant and using 'discard' slows performance down as the OS notifies in real time what files in the file index have been deleted/moved..
---------- Post added at 05:04 PM ---------- Previous post was at 05:01 PM ----------
smacklayer said:
What does this have to do with this ROM/Thread?
Click to expand...
Click to collapse
Well, it is meant (as is) to replace the 03filesystems script in the /system/etc/init.d folder. Or it can be noticed and set to run on a schedule. It was to written on a vs980 running this ROM, so that's where I'm sharing it.
Will the script trim on its own?
VS980 4G
veloct said:
The information is useful and should be in a thread of its own or maybe okibi can incorporate in 1.2.3
VS980 4G
Click to expand...
Click to collapse
Hopefully soon we won't have to worry about it since it's built into 4.3+. I might post it in the G2 (all) development area later this evening if it proves helpful to anyone.
This should really be the Themes and App thread not in a Rom thread.
Link to where it should be below.
http://forum.xda-developers.com/lg-g2/themes-apps
MidnightHarvester said:
INTERESTED IN A BETTER LAGFIX?
Why would you want to use this (especially if using the LagFix in the PlayStore)? Good question!
Optimized Filesystem Mounts
If you use the lagfix app off the PlayStore (or any script/app/utility/etc that uses fstrim) then mounting the filesytems with the 'discard' option is not only redundant, but also gives a performance penalty since with 'discard', the file index AND OS are both made aware immediately when memory is free up to enable garbage collection. This sounds fine, except that doing this on the fly like this also slows things down a lot. Since we will he using fstrim ourselves we don't need this extra overhead. In the script is a good link to read that explains things better than I can.
More Thorough!
Every other method I've seen so far only trims /system, /data, and /cache. There are many other mounts that can be trimmed, and some are written to quite frequently (/persist as an example).
Maintains Lots of All Activity
All activity is logged and sent to $ANDROID_DATA/logs/ where it's then saved. That way you can tell if it's running on boot or on the schedule as it's supposed to he running.
OK well, there's not a lot going on here, just felt like being overly dramatic as it's boring over here at the moment. All of the above is true, and after deciding to post it in here I cleaned it up quite a bit so even the most novice at BASH (any language really) can understand what's going on and change it to suit your needs.
A few things to point out. You WILL need to have the fstrim binary located somewhere in one of your environment paths. A good spot for it is always /system/bin or /system/xbin of you are having trouble deciding where You will probably want to also ensure that the fstrim binary has the correct permissions. If you are unsure of what those are, just give it all read/write/execute.
Second, you will need the script and figure how out how you'll be using it. You need to keep in mind that in the /system/init.d/ directory there is a script there called 03filesystem (something like that) which also mounts the fileaystems. If you like, you can move that script to you sdcard (don't keep it in init.d though or it'll be run..I don't know if having a .bak file extension will stop it as I've never tried) and copy this script over. This script's mounts are EXACTLY the same (even includes the break lease at the end) as what Jake uses as default except without the 'discard' flag. Replacing the default 03filesystems with this one is a perfect place to run the script if you reboot your phone at least once every few days (can always run it manually as well if needed). If you leave Jake's in and still use this, then ensure this one is named appropriately so that it runs after his does, or his script will remount the filesystems again with 'discard'.
There are plenty of explanations in the script as well. Point is, just he aware that of it runs before Jake's filesystem mounts do his will overwrite this one's and you'll lose the advantage of trimming on startup (or a schedule).
Check the /data/logs/ directory for output from the script, and be sure to also give this script the correct permissions as well. If in doubt just give it all read/write/execute permissions (well that's what I've been using on both this and the fstrim binary. I've linked both of the files below. I couldn't upload as an attachment so I uploaded to my Drive. Enjoy.
Edit: This was written for and intended for the VS980 (Verizon G2). Other G2s should he perfectly fine and any device that is compatible to run LagFix off the Play Store (you don't need to use LagFix either BTW if using this). Just be sure that you device is on the compatible list before using, otherwise there is a possibility of bricking your device. If using a G2 you're fine, but I never know who else reads these threads.
download ~ fstrim binary
download ~ filesystems-fstrim script
Sorry everyone, I posted this late last night and didn't realize that the directory I uploaded the files to was private. The links should work now as I've set them to be Public.
If you have any questions, feel free to PM me.
Click to expand...
Click to collapse
veloct said:
Will the script trim on its own?
VS980 4G
Click to expand...
Click to collapse
The script needs the fstrim binary, which you can grab elsewhere if worried about this one. I also went in and made the script as readable as I could. Without the fstrim binary, all this script does is remount all the filesystems without the 'discard' flag. If you are using the LagFix app then that's still useful as we don't need discard if manually trimming.
---------- Post added at 05:27 PM ---------- Previous post was at 05:14 PM ----------
Jimi Mack said:
This should really be the Themes and App thread not in a Rom thread.
Link to where it should be below.
http://forum.xda-developers.com/lg-g2/themes-apps
Click to expand...
Click to collapse
I need to clean it up in a proper text editor first before sharing to everybody. The built in text editor is not to useful when scripting because of the screen sizes and blocks of text often become mangled (especially in the comment). I'm going through it now and reediting with the proper text encoding. Won't take long but in the meantime I need to fix the encoding. I added the commenting in last night using the built in editor with Root Explorer which .. Well .. not too useful lol.
Once I'm sure the encoding will work across the board I'll post in that forum.
friguy3 said:
I did read it thank you very much sir. But, not all of us are devs or in the tech industry and understand this. Someone posts something, sometimes its nice to have others chime in or get a more simplified explanation. He posted it last night and nobody really commented on it (one maybe?)....makes you be cautious.
Sent from my VS980 4G using Tapatalk
Click to expand...
Click to collapse
I didn't mean to sound like a jerk, was just trying to say that given this mod has you replacing a script and adding a binary, if it's over your head I wouldn't mess with it.
Dearborn1977 said:
I didn't mean to sound like a jerk, was just trying to say that given this mod has you replacing a script and adding a binary, if it's over your head I wouldn't mess with it.
Click to expand...
Click to collapse
Went in and cleaned the formatting up using 920,l text editor and updated the original post I made with the updated link. If downloading, use the links on my posts and not any of the links from the quotes. If editing, it's best to use an editor that doesn't have word wrap enabled or at least an option to turn it off. That applies to any type of scripting or programming language. Otherwise, be careful that commented text doesn't get cut and interpreted code.
Anyways, he's right. If something looks like a foreign language to youz be sure to study up on it or bring along a good translator/guide before going to visit for a while. There's nothing complicated going on but the terminology obscufcates even the simplest of sentences. See? Malladus doesn't (I should say stock 4.2.2) doesn't include fstrim, a feature that's in 4.3+. You won't replacing any binaries unless you've already added fstrim yourself, in which case all you'd need is the script.
I think this is definitely a useful post for those interested, but has anyone actually verified that running fstrim on the G2 is 100% safe from the EMMC corruption issues that had plagued other devices in the past? Downloading Lagfix wouldn't be a good test as that program hasn't been updated since long before the G2 release (March 2013).
Just reporting back, I'm generally dubious of mods promising to smooth out the ui and have found things like entropy seeders to be more trouble than they're worth, but this mod works, plain and simple. Not that the G2 needs much smoothing out but if you've ever tried a CM based ROM on the G2, you can tell stock based ROMs aren't as smooth.
I was under the impression fstrim was only useful on older hardware.
Sent from my VS980 4G using Tapatalk
soapinmouth said:
I was under the impression fstrim was only useful on older hardware.
Sent from my VS980 4G using Tapatalk
Click to expand...
Click to collapse
The fstrim utility is built into Android 4.3/4.4 ROMs by way of baking it in the vold deamon. For more information you can read this page. Basically it's responsible for mounting the /system and /data, ... on start and running the init startup stuff (init.rc for example). They use analgorithm for fstrim as to attempt to have it run at least once every 24-48 hours.
On 4.2.2 we don't have fstrim and instead volumes are mounted so that the OS and disk are both kept up to date on which blocks of memory are free and that can be used. Doing this on the fly slows down performance, and that's why I remount the volumes without that option at the beginning of the script, so we can take advantage of the performance gains and run fstrim ourselves on all volumes (ffilesystem's that are able to be trimmed at least...if the file system doesn't support it then it won't be trimmed).
By placing this script in our init.d folder we can run keep our volumes 'defragmented' without having that extra process run all the time (simple way of pitting it). It should run at least once every 5 days or so at the least. Fstrim is relevent for ext4 volumes (and a handful of other types) and therefore relevant to any device where all filesystem layers support it. One other advantage of fstrim is that it returns a value whereby setting the 'discard' does not. If you run fstrim in verbose more or assign the result to a variable and it returns either "0 bytes were trimmed..." or "xxxx bytes were trimmed..." then you know it's supported and relevant. You can also check your mounts by typing 'mount' at a command prompt. There you can check and see if your filesystems are using discard or not.
Devices that mount their filesystems without discard and without the fstrim utility eventually can and will become intolerably slow or usable due to a process called "write amplification". Eventually it will become hard for the disk to find blocks of memory to erase. Only empty blocks of memory can be deleted. When writing to memory, the smallest is a page. A block holds many pages, so eventually space becomes a premium and it becomes difficult to find empty blocks to erase so that a page in the block can be used to write something do. The more complicated mappings and having to shuffle data around is a huge culprit of 'lagging' ones' device.
It gets confusing, especially when I'm deciding what's important enough to work on and use as there are a lot of tweaks out that don't actually do anything but are still used for some reason (probably out of habit over time). This is definitely one of the more useful tweaks to make on 4.2.x for improving performance (as long as the filesystem mount changes are used alongside it).
I'm not familiar with all the G2 ROMs (as in I've only used one and I use that as a base to build on), and this could possibly be built in in the form of init.d scripts or built into vold if on AOSP (though I haven't seen any AOSP 4.2.x ROMs for the G2 considering the newer versions). In that ca
xdabbeb said:
I think this is definitely a useful post for those interested, but has anyone actually verified that running fstrim on the G2 is 100% safe from the EMMC corruption issues that had plagued other devices in the past? Downloading Lagfix wouldn't be a good test as that program hasn't been updated since long before the G2 release (March 2013).
Click to expand...
Click to collapse
is just dared to try lagfix and it worked like a charm!
This is only good for Android 4.2.2 builds and older
Sent via Crossbreeded, 100% V6 Supercharged. KT747'd and Linaro Built Paranoid Android 3.10
I've been running LagFix Premium since the first day the G2 was rooted. Every morning at 5AM. Overkill, perhaps, but this is what kept me sane with the old Galaxy Nexus. When I first used LagFix on the GNex it changed my world.
luv2increase said:
This is only good for Android 4.2.2 builds and older
Click to expand...
Click to collapse
That's exactly what the OP said in the long post two above yours.
---------- Post added at 09:47 AM ---------- Previous post was at 09:45 AM ----------
MidnightHarvester said:
You can also check your mounts by typing 'mount' at a command prompt. There you can check and see if your filesystems are using discard or not.
Click to expand...
Click to collapse
What specifically should we see when we type "mount" if the filesystems are using discard?

[Q] Stock Nook HD+ Slowing to a Crawl?

I'll preface this with the fact that I flash my phones regularly (HTC One M8, One and Nexus before that) but have never bothered to mess around with my daughter's Nook HD+ 32GB. So I'm relatively savvy with ADB/Fastboot and flashing, but just not with this particular device.
Issue: My daughter's Nook has become so laggy as to be unusable. I did a little research and saw that there is a "trim" bug that affects certain chips used in the Nook, though mine - with an MBG4GA -11/2012- Rev 6 chip - doesn't seem to be one noted as an issue. However, I'm a bit confused on that front as my understanding is that the trim "issue" has to do with the application of trim to the ROM, which the stock Nook does not have anyway, so the above may be irrelevant. Just trying to figure out what may be causing this.
In any event, I'm trying to get to the bottom of this general slowdown which feel a lot like Windows after its been bogged down for awhile. Is this a known issue? Is there something that can be done short of factory resetting it and watching it progressively slow down again?
I haven't bothered to flash CM on it, because my daughter loves the Barnes and Noble aspects of the Nook - the book library and the ability for it to read the books out loud - and my understanding was that if I flash CM, I'd lose all that. Am I misinformed on this point?
Many, many thanks for any insight you can provide.
It is most likely a trim issue. Trim has to do with the condition of the emmc chip, not which rom it is running. So stock can be effected to. Best solution is to go to Play Store and download the app Lagfix and run it. The trim bug is not that devices need trimming, it is with certain chips the chip will brick when trying to run trim. Since you have the safe chip there should be not issue running it. You may need to go to my HD/HD+ CWM thread linked in my signature and root stock with my universal root. I think Lagfix requires root access.
Edit: and you are right about that last point.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar, thanks a bunch for that insightful response. I'll follow your instructions and report back. Mighty kind of you to have created and all-in-one root - makes things a whole lot easier!
So everything went smoothly. I'm rooted and applied the Unknown Sources mod and Lagfix works beautifully. However, I cannot, for the life of my remove the existing Adobe AIR - a file which needs to be updated in order to play some of the games my daughter has installed. When trying to update, I get an "application already exists" error, which, apart from getting Lagfix, is what prompted my desire to root in the first place (I've read tons of complaints on the BN board from the less savvy who are pissed at BN for not allowing this app to be updated by the Google Play store). Having root, I have manually renamed the APK, Frozen it through Titanium Backup, and attempted to uninstall it through Titanium Backup. No matter what I do, I still get this error.
On my phone, with root, a simple rename of an APK kills it. Here it seems this is not so simple. Any thoughts on how to successfully update Adobe Air? Or get the damned thing fully off the tablet so I can install it from the Play Store? Thanks a bunch.
godhamba said:
leapinlar, thanks a bunch for that insightful response. I'll follow your instructions and report back. Mighty kind of you to have created and all-in-one root - makes things a whole lot easier!
Click to expand...
Click to collapse
leapinlar said:
It is most likely a trim issue. Trim has to do with the condition of the emmc chip, not which rom it is running. So stock can be effected to. Best solution is to go to Play Store and download the app Lagfix and run it. The trim bug is not that devices need trimming, it is with certain chips the chip will brick when trying to run trim. Since you have the safe chip there should be not issue running it. You may need to go to my HD/HD+ CWM thread linked in my signature and root stock with my universal root. I think Lagfix requires root access.
Edit: and you are right about that last point.
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse
godhamba said:
So everything went smoothly. I'm rooted and applied the Unknown Sources mod and Lagfix works beautifully. However, I cannot, for the life of my remove the existing Adobe AIR - a file which needs to be updated in order to play some of the games my daughter has installed. When trying to update, I get an "application already exists" error, which, apart from getting Lagfix, is what prompted my desire to root in the first place (I've read tons of complaints on the BN board from the less savvy who are pissed at BN for not allowing this app to be updated by the Google Play store). Having root, I have manually renamed the APK, Frozen it through Titanium Backup, and attempted to uninstall it through Titanium Backup. No matter what I do, I still get this error.
On my phone, with root, a simple rename of an APK kills it. Here it seems this is not so simple. Any thoughts on how to successfully update Adobe Air? Or get the damned thing fully off the tablet so I can install it from the Play Store? Thanks a bunch.
Click to expand...
Click to collapse
Part of the problems with BN installed apps is they are automatically reinstalled online by BN when you try to remove them. Have heard of no way of defeating that.
Sent from my BN NookHD+ using XDA Premium HD app
leapinlar said:
Part of the problems with BN installed apps is they are automatically reinstalled online by BN when you try to remove them. Have heard of no way of defeating that.
Click to expand...
Click to collapse
That's a shame because BN's version of AIR is insufficient to run many different apps.
godhamba said:
That's a shame because BN's version of AIR is insufficient to run many different apps.
Click to expand...
Click to collapse
Part of the issue might be that Air is installed as a /system app by BN and Play Store tries to install it as a traditional /data app. Try getting the new version of the Air apk file from another device, renaming the apk exactly like it is named in /system/app on BN, and use your root file manager to replace the existing apk with the new one. You may have to clear the data in /data/data for Air before it operates properly. This may not work and may lock up the system so do a CWM backup of your device first so you can restore it if need be.
Sent from my BN NookHD+ using XDA Premium HD app
I came back to post that I had replaced the APK with the latest one that I found online, and it worked perfectly, only to see you had already posted the solution! I must have picked up on your brainwaves.
BN should be ashamed of themselves for, in essence, crippling this device by not allowing the update of core apps. Why they made this a system app is beyond me (perhaps to stop unsavvy folks from deleting it).
leapinlar said:
Part of the issue might be that Air is installed as a /system app by BN and Play Store tries to install it as a traditional /data app. Try getting the new version of the Air apk file from another device, renaming the apk exactly like it is named in /system/app on BN, and use your root file manager to replace the existing apk with the new one. You may have to clear the data in /data/data for Air before it operates properly. This may not work and may lock up the system so do a CWM backup of your device first so you can restore it if need be.
Sent from my BN NookHD+ using XDA Premium HD app
Click to expand...
Click to collapse

Categories

Resources