[KERNEL][101111] Universal lagfix [EXT4,JFS] and tweak kernel [BLN2.2] {0.3} - Galaxy S I9000 Android Development

Development continues here: http://forum.xda-developers.com/showthread.php?t=881837
Universal lagfix kernel project.
This project is aimed at multiple audiences.
If you think you're an end user read on.
For lagfix and kernel developers check the second post.
Download, changelog, bugs and other links can be found at the third post.
Credits
ChainFire for the original cf-root initramfs
hardcore for the speedup hacks
nikademus for the compiled jfs utils
neldar for BackLightNotification
newmail for some kernel modules
RyanZA for OCLF and for being helpful
supercurio for Voodoo
ykk_five for being helpful (and for the memory tweaks)
z4ziggy for z4mod
and for everyone else I might have missed. (like myself - I'm an egoist you know... and for all the people that helped the guys I credited above. And for the people who helped the guys that helped the guys credited above. And for XDA of course.)
If you only care about points
OhmygodIcanget2kpointsatquadranttoobadI'vealreadysoldSGSbecauseitonlyhas300MBraminsteadof512asadvertisedandboughtadesirebecauseilikehowitcrapsatmultitouch.
For the rest of the people
What is this about?
This project has multiple aims:
A JPM based kernel with ext4, jfs, tun and BLN support
An init script which supports multiple lagfix schemes
Init.d support (without early script support)
A modified ClockWorkMod that
Has better support for some features of the SGS-I9000
Includes support for rooting the device
Includes support for switching the lagfix schemes
Has some tweaking options
Various additions that might help the other lagfix/kernel developers
How does this work?
Simply flash the kernel to any JPM/JP6 based, unlagfixed ROM. By default it won't apply any lagfix scheme, so you might use it as a simple ROM, with built in ClockworkMod + rooting support. If you have a complete ROM package (with dbdata.rfs and an older csc file (it won't work with some of the newer csc files) ) you can also flash it with the other parts, just replace the zImage in the PDA.tar with the one supplied. The ROM was tested with the original JP6 and JPM ROMs, and with my Multinational 3.0 ROM.
How can I use the extra features?
Reboot your phone to recovery mode. Under "Advanced ULK", there are some new options:
Reboot to download: switches to download mode
Run 2e recovery: Switches to 2e recovery
Install superuser: installs busybox and superuser to the phone
Lagfix options: switch between various lagfix schemes
Tweak options: switch between various startup tweaks
BLN options: Turns BackLightNotification on or off
Reset permissions: Resets permissions to the same state as init does
What are the lagfix schemes?
They are ways on how to format and bind the various filesystems. You can chose how you want to format the partitions (data,dbdata and cache), whether you want to use an extra loop device or not, and whether you want to bind some directories from /data to /dbdata.
There are also 8 included pre-defined schemes:
OCLF: /data stays at rfs, but has an ext2 loop device on top of it
Voodoo: /data is ext4, all others are kept at rfs
JFS Voodoo: /data is jfs, all others are still rfs
No-RFS Standard: /data is rfs+ext2, all other partitions are ext4
No-RFS Advanced: all partitions are ext4
No-RFS Advanced JFS: all partitions are jfs
No-RFS Overkill: turns on all options: everything is ext4+ext2 and /data/data is bound to /dbdata
No-RFS Overkill JFS: turns on all options: everything is jfs+ext2 and /data/data is bound to /dbdata
(If using the overkill scheme using the bind option is dangerous if using too much apps, so you should disable it in the advanced menu.)
Although I used the names OCLF and Voodoo, the ROM is not compatible with any of them, it's just a naming convention I used. Hope RyanZA and supercurio won't mind
Which one should I use?
You decide. OCLF or Voodoo might seem simple but they are actually working great (but for those you can actually use the originals, they are probably much more stable), while NO-RFS Overkill might seem cool, it is clearly an overkill.
What happens after I chose a lagfix scheme?
If the chosen one is different from the active one the kernel will reformat your device the next start. Before reformatting it will create a nandroid backup, reformats the device then restores the data from your backup.
Is this ROM safe
alpha 0.2 means no. Switching between lagfix schemes might break, and data loss (mostly database corruption) can happen if you're using a lot of loop devices. And this kernel isn't thorougly tested anyway.
How to switch to another kernel/ROM
After disabling the lagfix everything should be fine (except for the possible data corruption). You can always flash another complete ROM package over this using Odin, you'll lose all your data however.
I've found a bug
And you'll find more of them. I'll try to collect them and answers to them at post #3

Internal workings.
In this post I'll try to describe how this works, and how it might be useful for other people.
The Kernel uses both the pre-init trick and the bootlogos trick to load up, and do it's stuff. In the pre-init phase it does the following:
initializes the devices
checks the actual state of the partitions, and decides which lagfix scheme is active
checks the config (resides in /system/etc/lagfix.conf), and if they differ runs the converter application
if they don't differ then it starts to mount the devices, and let's init run.
if during the mounting a fatal error occurs, it prints the log, waits for a couple of seconds and reboots the device.
It does the filesystem checks by mounting and checking whether mounting succeded or not. To defend against samsung's init's reformatting, it simply removes the fat.format command.
In the post-init phase it removes some files (mainly the symlinks to busybox, so they won't interfere with the busybox installed on the system). It also reinstalls fat.format, because it might be needed later.
The lagfixer is built inside clockworkmod, which has the following advantages:
Can use nandroid backup
Can use the framebuffer to show the progress (this makes it much easier to debug problems)
Besides the lagfixer there is also a "graphsh" application, which will run a specified command and prints its output to the framebuffer (the reasons for this are the same: it's much easier to debug this way than to check a log file copied to the sdcard). If a fatal error occurs this command is run so the end-user can see some logs. (all of this is still pre-init). The only problem with using the framebuffer is that core android won't boot up properly if the framebuffer was initialized beforehand (it switches to QVGA with overlapped screens... it's actually quite fun to try using android that way). That's why I always reboot after using either 'graphsh' or 'lagfixer', except for recovery modes, because CWM is using the same framebuffer anyway.
The initramfs is "ro.debuggable=1" so if anything happens one can connect to the phone in adb root mode, to check for errors. Adb is enabled by default in both CWM and base android mode. I don't know the drawbacks of using debuggable=1.
CWM was modified in order to be able to handle the various lagfix schemes. If it tries to mount, unmount or format /data,/dbdata or /cache, it asks for the lagfixer to do the actual mount, unmount or format. Therefore if one saves or restores a backup it will always see and use the actual files, and not the loop device file.
There were some other minor modifications, like binding the home button too to the enter key, using /mnt/sdcard instead of /sdcard, and the ability to back up the efs partition too. (/efs won't be restored however).
There is also a small modification in how the updates work. If there is an update, the init will always run samsung's 2e recovery, if not it will use CWM (you can use CWM's menu to run an update using CWM if desired). This is to maximize compatibility with updates.
About the compiled files:
I had a hard time getting the binaries to work, even when compiling in static mode. All of the binaries are either compiled by me using bionic (AOSP), or used from other sources (but they seem to be using bionic too). The main advantage is that the recovery binary is actually only around 700k, but has a working busybox implementation, a working recovery and some other small stuff. The main problem is with the other binaries (mainly with e2fsprogs). If I could cut from the size the whole initramfs might fit into an official kernel, so it could be used by anyone.

Links
Da kernel 0.3 + BLN 2.2: http://forum.xda-developers.com/showpost.php?p=9157498&postcount=738
Da kernel 0.3: http://android.sztupy.hu/dl/Universal_lagfix_kernel_JPM_0.3.tar
Da kernel 0.2: http://android.sztupy.hu/dl/Universal_lagfix_kernel_JPM_0.2.tar
Da kernel 0.1: http://android.sztupy.hu/dl/Universal_lagfix_kernel_JPM_0.1.tar
Source of the modified CWM: http://github.com/sztupy/android_bootable_recovery
Source of vendor/samsung/galaxys: http://github.com/sztupy/android_vendor_samsung_galaxys
Kernel sources I'm using: http://github.com/sztupy/universal_lagfix_kernel
Bionic port of jfsutils: http://github.com/sztupy/android_external_jfsutils
The contents of the initramfs: http://github.com/sztupy/universal_lagfix_kernel_initramfs
Changelog
Version 0.3
- before the lagfix gets applied there are now multiple options to chose from:
-- backup+restore (the original way)
-- backup, but don't restore (this eventualy results in a factory reset)
-- no backup (this also results in a factory reset)
-- go to recovery mode (to debug)
-- erase config file (to get back to the old options)
- the screen glitch in the first screen is now gone (because the kernel got smaller)
- jfsutils are ported to bionic (takes less space)
- there is a new option that will do the same restore permissions run, as the init script does
- I also added a few fixes to the CWM fix_permissions script, although I don't tested them yet (so it might brick the phone)
- Added two more rooting option:
-- the old one simply copyes busybox, superuser and su to the phone and adds symlinks to busybox
-- the new ones will also remove some old toolbox commands, so if you use the shell a lot, they won't interfere. The first mode only removes the base utils, like ls,mkdir,rm or ln
-- the second mode removes every toolbox command that has an equivalent busybox command (like mount, lsmod, rmmod, etc.)
- Adeed an option to get back to 2e recovery from CWM
Remarks
It seems that formatting dbdata as rfs only works, if you use the 512 PIT file (more exacty it only works if you have used the 512 PIT file the last time you've ticked re-partition in odin). This is probably due to the fact thet the 512 and 803 pit files reserve different space for the dbdata and for the system partition (the 803 pit file reserves 40 units less for the dbdata than the 512 pit file)
Version 0.2
- efs is not backed up automatically during lagfixing (but it's still backed up during ordinary backups)
- added jfs support and some more lagfix schemes using jfs
- added backlightnotification support, with the option to turn it on and off
- added startup script tweaks support, with options to turn them on and off
- removed ext2 support for the base mounts (might be put back into later)
- bind now only binds /data/data (should use less space)
- some minor bugfixes relating
Remarks
- If Updating from 0.1 to 0.2: If binds were turned on you have to turn them off before updating. After the update has finished you can turn them back on if desired.
Known bugs
After the lagfix conversion is done the phone reboots and the lagfix conversion starts over again
This means that the conversion took place, but the result is not the same as was desired. You should reboot into recovery mode and remove the config file.
After rebooting I have a lot of FC's - After switching lagfix schemes I have a lot of FC's
This is probably because of a database corruption. Try loading an earllier backup.
Can't download anything from market
Some configurations might have this problem, I'm still trying to find out why this happens.
Can't download some apps, like angry birds from the market
Retry, it should work after a while. If it still fails remove the external sd.
Shutdown fails on some configurations
Until I find a way to hook onto the shutdown script this might happen on more complex configurations (like the NO-RFS overkill)
Can't get back to rfs on /dbdata
Reverting the lagfix on /dbdata only works if you used the 512 pit file the last time you checked re-partition in odin.

I for one am excited
Dan

Can't wait to see this.

I am waiting too ++++

Lol 100% teasing ^^

gingerbread?

shahadat said:
gingerbread?
Click to expand...
Click to collapse
would be a bit early

Fantastic
Testing now on a very stripped JP6...

very interresting i think i will give it a try hehehe

any feedback?

Would it be unsavory to say that I got a little motion in my pants after reading that first post?
Nah, I think we all did
Sounds great! And I'll wait for a few more version points on that alpha before I try it... but I'm tempted!

wonderful,i'll try it

Sztupy is this kernel and method usable with your multilingual rom v3.0?
Thanks

kurudisease said:
Sztupy is this kernel and method usable with your multilingual rom v3.0?
Thanks
Click to expand...
Click to collapse
check first post. Tested with JPM, JP6 and Multinational 3.0

Test drive
I just used it, I had no issue. Everything worked fine and there is no lag at all, still too soon to say it's faster than voodoo though(which I was very happy with). All data is still there and no problem! Im using JP6 with NO-RFS Extended. Quadrant score is ~1900 for anyone that want to know .

looks great! gonna try this

ist it possible to add in that also??
Startup script speed tweaks
http://forum.xda-developers.com/showthread.php?t=813309

I applied the no-rfs advanced fix and everything worked fine. No issues so far.
Thanks!

Related

[z4mod][ABANDONED/UNSUPPORTED] Breaking free from RFS [Stage II - version 0.3 Alpha]

WARNING:
Use this on your own risk! I will not be held responsible for any failure that might be caused by using this.
"How should I know if it works? That's what beta testers are for. I only coded it."
- Linus Torvalds
What:
Yet another attempt at breaking free from RFS on the SGS phone (ie, lagfix), for Eclair, Froyo, and hopefully Gingerbread...
Which:
Supported devices are I9000 ATM. Theoretically it should work on all SGS variants, but since I only have I9000 to test on, I can't confirm this. I'd appreciate if other model owners will give it a try and report back.
Why:
KISS. I don't want to compile my own kernel or use a specific kernel (see voodoo) for my lagfix. I'd like to have a lagfix for ANY kernel out there.
z4mod is the 1st attempt in achieving that.
Another issue is standards. We don't need multiple lagfixes, all doing the same thing. One method, easy to customize and implement - thats the way to go.
How:
1. Use the online z4mod patcher to patch your kernel.
2. Download and apply one of the following update.zip files to convert your /data partition to the filesystem of your choice.
z4mod update.zip variants:
z4mod.ext2.update.zip - convert to ext2 - works on ALL kernels.
z4mod.ext3.update.zip - convert to ext3 - works only on modified kernel which supports ext3.
z4mod.ext4.update.zip - convert to ext4 - works only on modified kernel which supports ext4.
z4mod.auto.update.zip - automatically find which fs are supported by the kernel and convert to best suited - works on ALL kernels.
z4mod.rfs.update.zip - convert back to RFS - works on ALL kernels..
These update.zip files can be applied only to kernels which has been patched with z4build - a shell script which patches zImage to allow the init scripts additional non-RFS mount to each RFS partition, or with our online z4mod patcher. If the ROM you wish to install wasn't originally patched with z4build already, you can run z4build yourself on the zImage from the ROM package and put the patched zImage back to the ROM package for flashing, or use the online z4mod patcher to do it for you. It is that easy.
[NOTE:] Kernels (zImage) patched by z4build supports both mounts - RFS and non-RFS. So it doesn't change anything for users who doesn't apply z4mod.
You can also patch your z4mod scripts to enhance it's functionality, add more filesystems support, etc.
Although z4mod allows converting all the partitions from RFS to ext2/3/4, our update.zip files only convert /data - since this is ment for the 'masses'. If you feel brave enough, feel free to experiment with converting more partitions. All the sources are well documented.
Who:
z4ziggy, aka Elia Yehuda.
___
Original post [for reference]:
Although this is a half-baked project and far from complete, im introducing it to the xda community so i might get more ideas, and fix/implement more functionality, as the project advances.
z4mod is the 1st step in breaking free from RFS death grip - or at least tries to achieve this. The project adds ext3 support to a given zImage's init scripts, and creates update.zip for converting all RFS partitions and flash the patched zImage.
...thats the idea anyway.
ext4 support is planned for future official release. for testings purposes ext3 is sufficient.
sources and information can be found on my blog here: http://z4ziggy.wordpress.com
And of course, I'm not the only one interested in your measurements and conclusions
This looks really awesome, I'm loving it!
As far as the kernel patch goes, though:
Does the same kernel patch work for both 2.1 and 2.2 kernels? They seem pretty different.
Instead of requiring a linux box to patch the kernel, do you see any problems with doing the actual patching on the stock device itself? I didn't see anything in the script that should make this too difficult.
At any rate, this looks like The Solution.
love the work all 3 of you are doing with the file system on the i9000!
awesome job.
the patch is for the initscripts only - doesn't mind which kernel version. im doing my testings on Froyo 2.2 but patching should work the same on 2.1 scripts.
I hope to have some time later tonight to update the updater-script to follow all RFS partitions, and test it. ATM it works with my /cache partition only since its easy for testings (or "crashes" should i say? ).
i will update soon.
[edit]
regarding the linux part - no can do. We patch the initramfs scripts (which resides in the zImage), and i don't know of an easy way todo so from recovery mode. The easiest way is to use linux (even in a WM - you don't even need a full blown desktop, just CLI and compile tools) and patch the zImage, but i saw some Windows tools who might be able to do the same - I don't really know since i hardly use windows.
Thanks for your efforts! Keeping a close watch on this thread
z4ziggy said:
the patch is for the initscripts only - doesn't mind which kernel version. im doing my testings on Froyo 2.2 but patching should work the same on 2.1 scripts.
I hope to have some time later tonight to update the updater-script to follow all RFS partitions, and test it. ATM it works with my /cache partition only since its easy for testings (or "crashes" should i say? ).
i will update soon.
[edit]
regarding the linux part - no can do. We patch the initramfs scripts (which resides in the zImage), and i don't know of an easy way todo so from recovery mode. The easiest way is to use linux (even in a WM - you don't even need a full blown desktop, just CLI and compile tools) and patch the zImage, but i saw some Windows tools who might be able to do the same - I don't really know since i hardly use windows.
Click to expand...
Click to collapse
That's what rooting your phone is for! Just root the device, copy over all of the required binaries (arm statically linked if required, but busybox should handle 99% of what you're using in the script) and the kernel itself can be easily exacted using dd, of course.
Whole thing can be wrapped in a UI using java without too much hassle as well.
Most users aren't gonna be up to installing linux in a VM to run the script!
just replacing those scripts on your system won't do. you need to patch the initramfs and flash zImage back.
repackaging zImage with a new initramfs is not that simple. I'm using kernel_repacker todo so.
im sure there must be a better way than kernel_repacker, but until then, this is what we use
and about the Linux usage - the user would probably never use z4build script. only the update.zip. Modders, ROM creators, etc, should use z4build (or similar method to add the appropriate "mount ext3..." command to the "mount rfs", as i showed in my blog) to allow their kernel to support ext3. Simply apply z4build on any rom's zImage, and it's users can now apply the update.zip to have this rom' work with ext3.
I hope this explanation is suffice.
z4ziggy said:
just replacing those scripts on your system won't do. you need to patch the initramfs and flash zImage back.
repackaging zImage with a new initramfs is not that simple. I'm using kernel_repacker todo so.
im sure there must be a better way than kernel_repacker, but until then, this is what we use
and about the Linux usage - the user would probably never use z4build script. only the update.zip. Modders, ROM creators, etc, should use z4build (or similar method to add the appropriate "mount ext3..." command to the "mount rfs", as i showed in my blog) to allow their kernel to support ext3. Simply apply z4build on any rom's zImage, and it's users can now apply the update.zip to have this rom' work with ext3.
I hope this explanation is suffice.
Click to expand...
Click to collapse
Ah... kernel_repacker uses GCC. That would be pretty hard to port over to the SGS's stock kernel I guess.
Guess you're right then - would have to be run externally to the device. Bit of a shame since it adds to the complexity of the whole thing, still.
This does make it nice and quick to patch up any kernel at all though, which should make it much easier to keep the kernel patching up with any leaked kernels that come out!
looks like a very promising project! i liked voodoo but sadly we can not use it for 2.2 until we get the sources and it only converts the /data partition...
thanks for your work and i will be sure to check back here & on your blog soon
z4ziggy said:
Although this is a half-baked project and far from complete, im introducing it to the xda community so i might get more ideas, and fix/implement more functionality, as the project advances.
z4mod is the 1st step in breaking free from RFS death grip - or at least tries to achieve this. The project adds ext3 support to a given zImage's init scripts, and creates update.zip for converting all RFS partitions and flash the patched zImage.
...thats the idea anyway.
ext4 support is planned for future official release. for testings purposes ext3 is sufficient.
sources and information can be found on my blog here: http://z4ziggy.wordpress.com
Click to expand...
Click to collapse
Did you manage to compile ext3 or ext4 support to Froyo kernels? I only found ext2 support in them. (At least in JPK)
Another thing I see that you mount the rfs file on the device, but for me it only got mounted as vfat, so the symlinks in /bin in factoryfs.rfs were gone. (I solved this issue by adding commands to the initramfs that restore these symlinks)
ext3 is built into 2.2 kernel, i assumed the same for 2.1.
ext4 module will have to be rebuilt for each kernel, unless we build a standard kernel with ext4 support built-in, but all this will have to wait until samsung releases the sources.
[EDIT:]
Don't use the method which mounts the rfs files on the device. It uses ext2 and its obsolete already. I've only used the rfs mount on the device since it is the only way to have RFS readable as RFS and not as FAT. if your device mounted the RFS images as FAT, either:
1. you didnt use busybox mount
2. you might need to supply "-t rfs" to your mount command
z4ziggy said:
ext3 is built into 2.2 kernel, i assumed the same for 2.1.
ext4 module will have to be rebuilt for each kernel, unless we build a standard kernel with ext4 support built-in, but all this will have to wait until samsung releases the sources.
[EDIT:]
Don't use the method which mounts the rfs files on the device. It uses ext2 and its obsolete already. I've only used the rfs mount on the device since it is the only way to have RFS readable as RFS and not as FAT. if your device mounted the RFS images as FAT, either:
1. you didnt use busybox mount
2. you might need to supply "-t rfs" to your mount command
Click to expand...
Click to collapse
I know ext4 is missing, but I couldn't even get ext3 to work on JPK. (ext2 works)
for the mounts:
1. I did use busybox mount (using toolbox mount I couldn't even mount it in vfat mode)
2. I did supply -t rfs, but it told me invalid parameter
Some additions:
When I try to mount factoryfs.rfs in rfs mode it won't work (invalid argument). in vfat mode it works, but no symlinks and other rfs stuff. I can also mount it in j4fs mode, where I get some files not available in vfat mode (like param.blk or charging.jpg), the strange thing is these files are actually the same as in /mnt/.lfs
RyanZA said:
Most users aren't gonna be up to installing linux in a VM to run the script!
Click to expand...
Click to collapse
There's an easier workaround for that.
Provide instructions to:
- Copy required files to USB stick
- Download Ubuntu Live CD
- Boot from CD
- Run scripts
If you wanted to get fancy it could be prepackaged into an existing bootable CD distro with the scripts included (checking for updates when they're launched).
From what I've read, Desire owners used bootable CDs to root their phones, so it's obviously a viable option for the standard user.
Alright, that's the extent of my expertise. I'll leave you guys to sort out the real issues now!
I'm also very interested in this so subing myself to this thread.
I quite like the fact you Windows users have to use a Linux install to do it, I get a bit fed up having to find a Windows box somewhere to use Odin and Kies all the time.
RyanZA said:
Most users aren't gonna be up to installing linux in a VM to run the script!
Click to expand...
Click to collapse
Why? Surely the people wanting to do this kind of thing will be the more technical users anyway and us Linux users have to do the more difficult task of installing Windows in a VM to use the normal tools.
my ct-ng seems to be broken, my binaries doesn't execute on my SGS for some reason, so this will have to wait for tomorrow so I can investigate this further.
I need to compile the mkfs.ext3 staticly (which seems to compile fine using several different toolchains, but none works) so i can execute it from z4mod/updater-script.
dirk1978 said:
Why? Surely the people wanting to do this kind of thing will be the more technical users anyway and us Linux users have to do the more difficult task of installing Windows in a VM to use the normal tools.
Click to expand...
Click to collapse
Not true at all!
z4ziggy said:
my ct-ng seems to be broken, my binaries doesn't execute on my SGS for some reason, so this will have to wait for tomorrow so I can investigate this further.
I need to compile the mkfs.ext3 staticly (which seems to compile fine using several different toolchains, but none works) so i can execute it from z4mod/updater-script.
Click to expand...
Click to collapse
I've had so much trouble with statically compiling stuff...
We really need some kind of complete guide on all the ins and outs of statically compiling these system utilities. For a lot of them it doesnt seem to be all that straight forward...
i've a question
i've tried to mount the partitions as ext2/3 before by replacing the rfs in init.rc and recomplied the kernel and pack the zimage, but the system wont boot. it seems it wont accept any other fs other than rfs, rootfs, etc. my init.rc looks like this:
mount ext2 /dev/block/stl9 /system
so how did u simply mount them as ext3 by just changing the init.rc and recompile the kernel?
EDIT: sorry, i just tried it again and it's ok now, but not with the "||" (or) in the middle

[KERNEL] z4mod kernels ** updated 2011-02-18

****** Information *****
I will no longer develop this kernel, for the lack of development on Z4Mod source.
If you like my work you can try this kernels:
DamianGTO Ultimate Kernel
DamianGTO Steam Kernel
You can also try my tweak program:
Damian tweak
I will continue to support this tread so long its needed.
If you want to change kernel you MUST remove all lagfix first.
*****************************************
The kernels I will post here is now based with Samsungs JPX source code.
The Froyo version is 2.2.1. in this source code.
This make a big change in performance on the samsung Galaxy S.
All this kernel I make will have Zmod in them so you can use Zmod app to convert the file system to ext2.
This will make the phone lagfree and the tweak I put in these kernels will improve things and add things that not supported in stock firmware.
The first kernels I have made(DamianGTO_JPX_1A) have this:
345MB Ram.
Optimized kernel tweaks
Alter minfree strict settings.
Deadline schedueler
Support for bootanimation.zip (custom boot animation)
Initramfs from JPY kernel( So it works on all new firmware)
The kernels has two versions. 256HZ and 500HZ versions.
File system:
Ext2
Rfs
The second kernel I have made(DamianGTO_JPX_2B) have this:
346MB Ram.
300HZ
Optimized kernel tweaks.
Cleaned the kernel from unused services.
Alter minfree strict settings.
Deadline schedueler( change some settings to balance it more)
Support for bootanimation.zip (custom boot animation)
Initramfs from JPY kernel( So it works on all new firmware)
File system:
Ext2
Rfs
This kernels is also an app so you can install it without ODIN.
Make sure you are rooted and you have Busybox 1.17 installed.
Always have a backup when you install other kernels if something happens that I cant predict.
If you come from other kernels then these kernels make sure you have flashed original kernel first so you know your phone is okey.
Do to restriction on file size I cant upload it here.
So I put it on freedrive. I hope it will work.
If any have a better way to do it for free i will look into that.
DamianGTO_JPX_1A.apk is the app with both 256HZ and 500HZ kernels.
DamianGTO_JPX_2B.apk is the app with 256Hz, 300Hz and 500Hz kernels.
I will put all kernels and program on my freedrive that i will make now.
All kernels and program I make from now I will put them on my Freedrive.
Downloading from there is easy. Works both on the computer or your phone.
************** OLD NEWS ***************
The base for these kernels is samsungs jpm source file.
So its NOT based on sztupy setup/kernel.
This kernel is NOT affected by the corruption bug that Supercurio did find.
The goal is to have a clean kernel so you can use z4mod app and change the file system. It will also have some tweaks thats useful for all.
It will always be close to stock kernel, so it will be an option to stock kernel.
If you want more tweak and other stuff there is allot of other kernels.
I will make different kernels with different things in them when I do have time to test them out and be sure they are good and stable.
Z4mod has changed they way to do things and I drop old kernels and use the new way.
I also drop all support for different file system.
Ext2 is a fast file system and its stable.
Most of the other file system use to much overhead and is slower or instable.
This make the kernel smaller to
To root the phone use Z4Root(included below)
To change file system use z4mod(included below)
If you have an old kernel from me and you want to upgrade you must
convert back to rtf first.
If you come from an other custom kernel undo all tweaks and lagfix.
Do also flash an original kernel to see your phone will boot up and work.
After that you can flash one of these kernels.
All zImage_z4mod kernels has this:
342MB Ram tweak.
Optimized kernel tweaks.
Hash 3.
File system:
Ext2
Rfs
The different in the zImage_z4mod kernels is the HZ value.
Lower HZ value can make the phone to drain battery less, but can make the phone less responsive.
Higher HZ value can make the phone drain battery more, but can make the phone more responsive.
DamianGTO_v3 kernel has this:
342MB Ram tweak.
Optimized kernel tweaks(more).
Hash 3.
Alter minfree strict settings.
I/O scheduler is deadline.
Support for bootanimation.zip (custom boot animation)
File system:
Ext2
Rfs
To use custom boot animations you need to download a bootanimation.zip and put that in your data/local folder.
you can find bootanimation.zip on this site or you can go to market and look for a program that help you with that.
If you don't want to use the bootanimation.zip you just remove it from the folder and the original boot animation will be used.
I also made a custom kernel for JPU firmware(DamianGTO_JPU_v1).
This IS JPU kernel with tweaks. Its NOT based on the old JPM kernel.
If you need to root you must use this SuperOneClick root.
This JPU kernel is also patched with Z4mod.
But you need to install the latest busybox from market if you want to convert to EXT2 file system.
This kernel also support boot animations.
DamianGTO_JPU_v1 kernel has this:
339MB Ram.
Optimized kernel tweaks(more).
Alter minfree strict settings.
Support for bootanimation.zip (custom boot animation)
File system:
Ext2
Rfs
DamianGTO_JPU_v2 kernel has this:
If you downloaded this then download V1 or V3. V2 dont work right.
DamianGTO_JPU_v3 kernel has this:
339MB Ram.
Optimized kernel tweaks(more).
Alter minfree strict settings.
Deadline schedueler.
Support for bootanimation.zip (custom boot animation)
Sdcard fix when mounting it in windows so you can write to it. It will not mount like a CD anymore
File system:
Ext2
Rfs
I have made an app for the DamianGTO_JPU_V4 kernel.
This will flash the kernel WITHOUT odin
Just make sure you are rooted before you use it.
Is you dont get superuser access, restart you phone and make sure you are rooted.
This DamianGTO_JPU_V4 kernel is little more tweak on deadline scheduler.
So it should be smother.
This kernel has:
339MB Ram.
Optimized kernel tweaks(more).
Alter minfree strict settings.
Deadline schedueler(More tweak).
Support for bootanimation.zip (custom boot animation)
Sdcard fix when mounting it in windows so you can write to it. It will not mount like a CD anymore
File system:
Ext2
Rfs
I have made an app for the DamianGTO_JPY_V1 kernel.
This DamianGTO_JPY_V1 kernel has:
339MB Ram.
Optimized kernel tweaks(more).
Alter minfree strict settings.
Deadline schedueler
Support for bootanimation.zip (custom boot animation)
File system:
Ext2
Rfs
z4root-1.3.0.apk is to root the phone. use that before you convert the file system.(NEW)
z4mod.0.9.3.apk is to convert file system.
zImage_z4mod_12_01_v1_500hz.zip Is the kernel with 500HZ value.
DamianGTO_v3_300hz.zip is the kernel with bootanimation and 300hz value.
DamianGTO_JPU_v1.zip is the JPU kernel with bootanimation and some tweaks.
DamianGTO_JPU_v3.zip is the JPU kernel with bootanimation, tweaks and usb storage fix.
DamianGTO_JPU_V4.apk is the new kernel with a installer.
DamianGTO_JPY_V1.apk is the new kernel with a installer.
Thanks all that has helped me to sort out problems.
Before you try this kernel out, make sure you have a backup on you system.
How to Install it? =)
borjaag said:
How to Install it? =)
Click to expand...
Click to collapse
Use Odin to flash the kernel. Use only PDA. no pit file and no re-pertion.
Then copy the update file to the sdcard. rename it to update.zip.
Start the phone in recoverymode and applay the update file.
Before do a backup and read about this things if you dont know what it is.
Edit: this was the old way, so read the first post.
why no EXT4?! Thanks.
hacksome said:
why no EXT4?! Thanks.
Click to expand...
Click to collapse
I think ext2 do work better and its faster then ext4.
I can compile a version with ext4 for you if you want that.
I will make support for most filsystem in the new z4mod system when it works good.
Sent from GT-I9000 jpm My own kernel for z4mod and with 341MB Ram
DamianGto said:
I think ext2 do work better and its faster then ext4.
I can compile a version with ext4 for you if you want that.
I will make support for most filsystem in the new z4mod system when it works good.
Sent from GT-I9000 jpm My own kernel for z4mod and with 341MB Ram
Click to expand...
Click to collapse
z4mod should work 100% with EXT2/EXT3/EXT4/JFS filesystems already, as long as support is compiled into the kernel.
So if you use a kernel with support, it should just work.
RyanZA said:
z4mod should work 100% with EXT2/EXT3/EXT4/JFS filesystems already, as long as support is compiled into the kernel.
So if you use a kernel with support, it should just work.
Click to expand...
Click to collapse
True. But i did not enable more support;-)
My point is that the new system is out and i have to make that work.
I have seen a couple of error on that. So i wait to realese that version. Z4ziggy is looking into the errors.
But i did this kernel and using it myself right now and it works great.
Ofcorce i want the new system to work. I spend my time to figure out what's wrong, but i guess i/we will solve that soon.
Sent from GT-I9000 jpm My own kernel for z4mod and with 341MB Ram
Thx for ur great work .
Just flashed it and it seems to work great. Before that I used a normal JPM Kernel with z4mod EXT2 without any kernel tweaks
DamianGto said:
I think ext2 do work better and its faster then ext4.
I can compile a version with ext4 for you if you want that.
Click to expand...
Click to collapse
Thanks!. I am trying out ext2 and it doesn't seem bad
Thanks.
I shall try to get it better and with more system support.
Sent from my GT-I9000 using XDA App
I would like a JPA kernel with ext4 on on all partitions also system. Thanks.
Sent from my GT-I9000 using XDA App
DamianGto said:
The goal is to have a clean kernel so you can use z4mod and use the filesystem you want.
Click to expand...
Click to collapse
Is anyone trying YAFFS/YAFFS2? As far as I know it would outperform EXT4...?
mclad said:
Is anyone trying YAFFS/YAFFS2? As far as I know it would outperform EXT4...?
Click to expand...
Click to collapse
Have not seen anybody use it.
Ext4 is not the fastest system either.
Its safe and better then stock system.
Sent from my GT-I9000 using XDA App
mclad said:
Is anyone trying YAFFS/YAFFS2? As far as I know it would outperform EXT4...?
Click to expand...
Click to collapse
YAFFS2 can't be used on /data since no interface is available. Doesn't seem like it can be done on BML either, because they're a bit freaky. (It probably can be done, I have no idea how you would though, they're non-standard.)
There is no real need though, as YAFFS2 is NOT a fast filesystem. It's filesystem designed to be safe for the underlying media, and performs decently, but it's not EXT2/HFS+/UFS speed. I think. It's hard to test since it is difficult (impossible maybe?) to port.
At any rate, since /data accounts for 99% of disk I/O, it's mostly waste of time...
As to converting over other partitions besides /data, the problem is that stock clockworkmod doesn't detect it then. Going to try work on making a 'smart' clockworkmod that can detect and mount the correct filesystems.
I' am happy with EXT2, its the most fast one and not really unsave. But would be great to have it on all partitions. Or just EXT2 on /data (for speed) and EXT4 on the other partitions
I may be (probably am) WAAAAAY out of my depth here, but you might want to grab sztupy's modified CWM - the one he uses for his ULK. I believe that would achieve the results you desire.
I think...
RyanZA said:
As to converting over other partitions besides /data, the problem is that stock clockworkmod doesn't detect it then. Going to try work on making a 'smart' clockworkmod that can detect and mount the correct filesystems.
Click to expand...
Click to collapse
Well, I will be short on this one:
Ext2 is NOT a good choice, why? No counselling, so in case of a crash, the chance of filesystem is just too big. Certainly since there is no filesystem checking utility... So this IS faster but very dangerous.
Jaffs or any other flash filesystem is a bad idea too, why? Sd does wear levelling in itself, double it and you will not benefit at all. So totally useless. More on this... On google
Sent from my GT-I9000 using XDA App
harrydg said:
Well, I will be short on this one:
Ext2 is NOT a good choice, why? No counselling, so in case of a crash, the chance of filesystem is just too big. Certainly since there is no filesystem checking utility... So this IS faster but very dangerous.
Jaffs or any other flash filesystem is a bad idea too, why? Sd does wear levelling in itself, double it and you will not benefit at all. So totally useless. More on this... On google
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
That is all very theoretical, but in practical usage of EXT2 on my day to day device for months now, I have not had any issues. And this is with deliberately pulling out the battery to try and break it.
The huge need for journaling on spinning media comes from just how unsafe spinning media can be. Flash storage is inherently a lot safer, since it writes in large chunks controlled by the disk controller, rather than playing with magnets. Not to say that it's 100% safe - and no filesystem is 100% safe when crashed - but it's really not a big issue in practice. The speed benefit makes up for any theoretical data safety issues many many times over for me, personally (and there really is a large speed benefit).
Also, e2fsck appears to do a decent job at checking for errors/metadata consistency.
Ahm,
Not really, journals are used to make writes safer, if you interrupt a write, your filesystem will be inconsistent, so you could loose your entire disk. But you are right, it's not as bad as with spinning disks, but I would never recommend it as safe... There is a reason that ext3 and 4 have been developed as successor..
Ps. Sent by my phone so my responses are short..
Sent from my GT-I9000 using XDA App
harrydg said:
Ahm,
Not really, journals are used to make writes safer, if you interrupt a write, your filesystem will be inconsistent, so you could loose your entire disk. But you are right, it's not as bad as with spinning disks, but I would never recommend it as safe... There is a reason that ext3 and 4 have been developed as successor..
Ps. Sent by my phone so my responses are short..
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Not really. Journals are just additional metadata such as 'I am about to write to block X' 'I have finished writing to block X', etc. When the system crashes, this helps the system recover and work out what it was busy doing - it's not a silver bullet that magically stops data loss. If a file was being resized, then without journals the metadata would show that the file had been resized - even though the data inside would be garbage as it wasn't written yet. In the journaled case, it's possible to tell that this has happened, and the file can be deleted instead.
So with journaling you'd end up with the old file, and without you'd end up with a corrupt file. In either case, try not to crash your system, since an out of date file can be bad too (but not as bad as a corrupt one).
At any rate, the actual chances of managing to hit the power at just the right time (between a metadata entry and actual file entry) is VERY slim on the SGS, because the MoviNAND has a capacitor backed operation queue which generally prevents this from happening in many cases.

[KERNEL] Steam Kernel 2.9.9.0

STEAM KERNEL v2.9.9.0 (it's not 3.0.0.0 because that would mean stable)
Steam Kernel is the successor of ULTK, so you can expect it to be mostly the same, except for a few things.
But first the Credits: anzo,ChainFire,DocRambone,hardcore,koush,nikademus,neldar,newmail,patience,PFC,RyanZA,tariattila,XDA,ykk_fice,ZAGE,z4ziggy
What is this about?
This project is the successof of ULTK, with many new features. The main points are (the new features are in bold):
- Convert filesystems to ext2, ext4 or jfs (data, dbdata, cache and system)
- Use fake /efs to get a completely-rfs free ROM (only works if /system is set to be mounted as rw)
- Startup tweaks
- Even more boot-time settings (adb security settings, mounting options, bootanimation chooser)
- BackLightNotification 2.2
- Includes Steam Recovery (with many new features too, like touch based input, file manager, improved SGS compatibility, read more here)
- Includes possibility of filesystem encryption (read more here)
- Includes boot-time log viewer applications (with the option of watching the logs go instead of a bootanimation)
- Superuser install function
- Afterburner support (read more here and here)
- Many more I might have forgotten...
How does this work?
Simply flash the kernel to any non JPU/JPX based ROM. It might work with them too, but expect problems (mainly with the sd card and wifi). Steam kernel no longer includes 2e recovery, so you cannot flash it during initial flash (unless using Steam ROM).
How can I use the extra features?
All features can be enabled inside Steam Recovery. On a how-to on Steam Recovery check it's thread. Lagfixes and boot settings can be found inside the "Steam options" menu item.
What are the lagfix schemes?
They are ways on how to format and bind the various filesystems. You can chose how you want to format the partitions (data,dbdata,cache and system), whether you want to use an extra loop device or not, whether you want to encrypt the partition or not, and two other options, like fake /efs mode (which is a bit buggy in certain cases), and /system rfs reconvert mode
About inconsistent /system partitions
If you are using an ULTK kernel, which mounts system as "check", Steam Kernel tries to identify your partition and let you reformat it. If you know that you have a bad /system partition, but the autodetect couldn't figure it out, there is an option in the filesystem (lagfix) menu, that will tell Steam to convert your /system partition from one settings to another.
Which Lagfix scheme / config should I use?
You decide. Ext4 base is usually enough, but you can convert /system too. If you dare use the overkill options. Now that there is also the filesystem encryption support, you can actually use a mega-overkill scheme (encrpytion+loop device+ext)
What happens after I chose a lagfix scheme?
If the chosen one is different from the active one the kernel will reformat your device the next start. Before reformatting it will create a nandroid backup, reformats the device then restores the data from your backup. You can chose between some other options too before the reformat.
Is this ROM safe
As usual: no. There are a lot of places where the conversion can break (like not enough free space on the device while restoring /system), and steam is not yet good at handling these errors. The 3.0.0.0 milestone is however there so be prepared
What are the new features?
Steam Kernel uses Steam Recovery for configuration (plan on creating a native Android app for that is on the way), which has an extensive on-line help system, and touch screen interface. Try checking the new options, or ask!
How to switch to another kernel/ROM
There is an uninstall feature (in the about box) which will disable all lagfixes, removes steam config from the system and makes sztupy very sad. You can always flash another complete ROM package over this using Odin, you'll lose all your data however.
I've found a bug
And you'll find more of them. Please report them, so I can try and fix them.
Does this kernel cause corruption?
Yes, it corrupts your mind!
Okay this is great bout you still didn't put in feature X
I know, there are still a few features I'd like to add (like the journal free ext4), but I didn't
want to hold the current release any longer
You bet, we're already on CM/Gingerbread/2.2.1 and this only works for 2.2
Yep. But work is on the way to make it injectable to stock kernels without too much fuzz!
DL link: http://android.sztupy.hu/dl/Steam_Kernel_2.9.9.0.tar
(flash with Odin as PDA)
Source: https://github.com/SteamMOD
Sound good. Will try.
Good work sztupy.
WOW, I successor to ULTK. I bet this will be as path-breaking as ULTK.
ragin said:
WOW, I successor to ULTK. I bet this will be as path-breaking as ULTK.
Click to expand...
Click to collapse
I thought sztupy has moved on, but no, he was preparing for this big release!
Congratulations and thank You sztupy
Omfg youre pure awesomeness!!!
OMFG DUDE, you have done it again, cant wait to try this out, im on 2.2.1 right now but will try it as soon as its compatible, keep up the good work.. Im so happy with guys like you...
WOW what a Christmas present!!! Thanks alot!!! Will start testing now....
Looking good! Will try this as soon as it works with 2.2.1.
good to see u r still working for i9000
btw, looks like u have mis-spell my name
exelent m8,exelent job done
good start for 2.3 firmware
awesome the master is back , looking forward to a JPY compatible build
Ahh bravo! Well done I'm pretty sure no one expected this keep up the good work!
Sent from my GT-I9000 using XDA App
1617 in meaningless Quadrant. 1400's in latest hardcore kernels (with same config?). You did something right
tonyjansen said:
1617 in meaningless Quadrant. 1400's in latest hardcore kernels (with same config?). You did something right
Click to expand...
Click to collapse
what is the result of the mount command?
@sztupy thanks for your attempt to fix the RFS corruption on /system.
Master sztupy returns...
WOW!!!!!!!!!!!!!!!!!!!
Keep 'em coming!!!
Sent from my Samsung Galaxy S using tapatalk
created cwm flashable kernel ( thx hardcore and trasig )
Steam_Kernel_2.9.9.0_CWM.zip
pls clear dalvik after flashing.
tested it and it work just fine.
thx again sztupy
wow good work, hopefully we can have 2.2.1 compatibility soon with the release of the 2.2.1 sourcecode
WOW great work, the Recovery Mode is Awesome
I am trying it right now with original JPX and JFS Base.
One question!!! it tells me if I really want to formate /system because this can be undone. BUT if I flash it back with Odin to Original one with re-partition on it should be everything like original, should it ?
TweetyPeety said:
WOW great work, the Recovery Mode is Awesome
I am trying it right now with original JPX and JFS Base.
One question!!! it tells me if I really want to formate /system because this can be undone. BUT if I flash it back with Odin to Original one with re-partition on it should be everything like original, should it ?
Click to expand...
Click to collapse
if you reflash a full rom ( like jpu, low level package ) with repartition enable it will reformat your device in rfs.
Ok tried it and it doesn't work for me. It runs ok, but not really smooth. Live Wallpaper is really slow and I don't get connection to my mobile phone provider and WLAN doesn't work.
maybe not JPX ready, so I will try szutyps Steam Rom I have time today to try some stuff

Clemsyn's Kaiser Kernel Corner for 2.6.32 with EXT4 for DATA (SD) install

**** EXT4 for DATA (SD) install on second post *****
I've been slowly working on our Kaiser Kernel hoping to get extra life from it. Here are the changes I made so far.
1. Updated to the latest initrd and made a few changed in the init file
2. Changed the default I/O scheduler to noop.
3. Added block data integrity support and v4 support
4. Updated the latest yaffs2 filesupport up to changes dated 1/14/2011
5. Added PM module for Qualcomm 7500 chip
Will try to add BFQ I/O scheduler and see how the performance is compared to noop.
1/29/11 ** UPDATED KERNEL for better YAFFS2 best suited for Kaiser Samsung Memory chip **
Here is the nbh. This is type2 screen and keyboard1.
Will release my latest changes and update to git (need help on this one) when stable.
Please reinstall ROM and wipe data after flashing the kernel. The changes in yaffs2 code might cause issues. You can restore your data from BACKUP after installing the ROM.
************ TO FORCE CHECKPOINT IN DATA PARTITION PLEASE DO THIS IN TERMINAL *******************
su
echo 6 > /sys/module/yaffs/parameters/yaffs_auto_checkpoint
sync
This will change auto checkpointing to 2 and create a checkpoint.
This is just temporary, the checkpoint is deleted in reboot so the commands have to be done before every reboot.
One solution is to use Gscript.apk and type the commands in Gscripts. Execute via Gscript before reboot
**** To verify if you have checkpoint in Data Partition Please do in Terminal ******
To verify if you have yaffs2 checkpoint in the data partition Type the following in terminal
su
cat /proc/yaffs
Scroll down to Device 2 "userdata"
scroll down and look for "blocks_in_checkpt" should be 1 or 2 (not 0, if it is zero then you have no checkpoint in data partition)
Update 2/7/2011
******************EXT4 FILESYSTEM FOR SD INSTALL***************
Because of bad blocks on my Kaiser, I have to give all NAND partition to install on system while installing data on SD with EXT4 filesystem. Here are the requirements:
1. An SD card with at least class 4
2. A way to partition and format your SD with FAT/ext2/Ext4 (ext2 should be as small as possible), I use Ubuntu for this.
3. Kernel with ext4 support (this will format your whole NAND partition to use system and use EXT4 on SD for Data)
Instructions:
1. FORMAT SD (I use Ubuntu DiskUtil) with FAT/ext2/EXT4, on my 8GB SD I use 7gb for FAT/8mb for ext2/1gb for EXT4 but it's your call. The most important part is that you only give the second partition (ext2) the least amount of size.
2. Download the KAISIMG.zip, extract and you will get a file KAISIMG.NBH
3. use Atools to edit accordingly with your Kaiser's screen type and keyboard (NBH is using screen 2 and keyboard 1)
4. Flash the KAISIMG.NBH
HERE IS WHERE IT GETS TRICKY!!! PLEASE FOLLOW THESE INSTRUCTIONS CAREFULLY!!!!
a. PRESS CENTER D PAD to enter ANDROID Installer
b. Choose (*) Sys on NAND
Choose (*) Data on SDCard Partition
c. Scroll Down to Install System and choose it
d. This will wipe your Existing system! Are you sure CHOOSE (YES)
e. Would you like to clear data too (Suggested) CHOOSE (NO) ***DO NOT CLEAR DATA OR THIS WILL CHANGE YOUR THIRD PARTITION TO EXT2 and will not work.
That's it. After installation reboot and you have an optimized ext4 on your SD for data. The mount options for ext4 in this kernel are:
data=writeback, barrier=0, nobh, noauto_da_alloc
Will use barrier=1 for better data security on next release, just enjoying the speed of barrier=0 for now
clemsyn said:
Will try to update our 2.6.25 kernel too if I get some space for my hard drive.
Click to expand...
Click to collapse
Yes, Clemsyn If it's not a big problem please update 2.6.25 too. Thank you.
updates kernel 2.6.25
clemsyn said:
Will try to update our 2.6.25 kernel too if I get some space for my hard drive.
Click to expand...
Click to collapse
This would be nice. Thank you
mt1976 said:
This would be nice. Thank you
Click to expand...
Click to collapse
It would take awhile though since I have to remove my 2.6.32 kernel to put 2.6.25 since I'm limited in space. Donations for a laptop HD would be appreciated
UPDATE:
1. I think one of the reasons of data failure is that YAFFS refuses to write a checkpoint for our data partition. It writes it in the system partition with no issues. The new yaffs2 (updated 1-27-11 which I will update shortly) allows forcing checkpoint so I'll try that one and see if I can create a checkpoint on our data partition.
Finally got a checkpoint in my userdata partition...instructions posted on first post, no update on yaffs needed
clemsyn said:
It would take awhile though since I have to remove my 2.6.32 kernel to put 2.6.25 since I'm limited in space. Donations for a laptop HD would be appreciated
UPDATE:
1. I think one of the reasons of data failure is that YAFFS refuses to write a checkpoint for our data partition. It writes it in the system partition with no issues. The new yaffs2 (updated 1-27-11 which I will update shortly) allows forcing checkpoint so I'll try that one and see if I can create a checkpoint on our data partition.
Click to expand...
Click to collapse
I have a 20 GB Sata laptop drive I could get to you. Used to be in a 360 and then broke the enclosure open for a hdd when the one in my laptop died. Drive works just fine, just small lol
aceoyame said:
I have a 20 GB Sata laptop drive I could get to you. Used to be in a 360 and then broke the enclosure open for a hdd when the one in my laptop died. Drive works just fine, just small lol
Click to expand...
Click to collapse
Sorry about your phone. I was hoping you could test out my new kernel. ANyways, I think yaffs2 was having issues creating a checkpoint on the data partition since yaffs was only creating a checkpoint on proper unmount (which was not done in our kaiser). The latest yaffs can make us force a checkpoint by simply typing the command in the first post and typing "Sync" on terminal automatically creates a checkpoint in data partition. I'm currently testing it now and seeing how it goes.
BTW, I'll take that donation re:HD since I can use it as an external HD and put the 2.6.25 kernel there and improve it (that is if wife permits).
clemsyn said:
Sorry about your phone. I was hoping you could test out my new kernel. ANyways, I think yaffs2 was having issues creating a checkpoint on the data partition since yaffs was only creating a checkpoint on proper unmount (which was not done in our kaiser). The latest yaffs can make us force a checkpoint by simply typing the command in the first post and typing "Sync" on terminal automatically creates a checkpoint in data partition. I'm currently testing it now and seeing how it goes.
BTW, I'll take that donation re:HD since I can use it as an external HD and put the 2.6.25 kernel there and improve it (that is if wife permits).
Click to expand...
Click to collapse
lol she's really not that strict, she just thinks my development for our devices is a waste of time. Just PM me where to send it and ill get it out to you.
aceoyame said:
lol she's really not that strict, she just thinks my development for our devices is a waste of time. Just PM me where to send it and ill get it out to you.
Click to expand...
Click to collapse
Agreed, that's what my wife thinks too I'll PM you my location
BTW, please make sure that the location of yaffs_auto_checkpoint is in /sys/module/yaffs/parameters (some ROM might have it on modules).
UPDATE:
Checkpointing is working great for me so far. Command on first post has to be executed in every reboot to create a checkpoint so typing the commands in first post before rebooting will create a checkpoint and save data partition (me thinks).
You can install Gscript and run the script before reboot
To verify if you have yaffs2 checkpoint in the data partition Type the following in terminal
su
cat /proc/yaffs
Scroll down to Device 2 "userdata"
blocks_in_checkpt should be 1 or 2 (not 0, if it is zero then you have no checkpoint in data partition)
Can anyone help adding this to the shutdown script?
I've done 5 restarts, 2 battery pulls and 2 resets, made sure data partition was checkpointed before doing so....So far data partition has been OK with no FC's or errors, no lost apps with 18mb's left in data partition The thing that surprises me is that Phone Storage size hardly changes in size in every reboots so it's good news I have a feeling we finally nailed down this data corruption issue, but only time can tell since I will shift to prolong use before doing any restarts...
I have sent a PM to scooter hoping he can help me with a shutdown script so we won't need a Gscript. So far, Gscript is doing it for me. Upong reboot, I run the script and make sure I have a checkpoint in data partiion
clemsyn said:
sent a PM to scooter hoping he can help me with a shutdown script so we won't need a Gscript. So far, Gscript is doing it for me. Upong reboot, I run the script and make sure I have a checkpoint in data partiion
Click to expand...
Click to collapse
I've got it working in a script, i have it in a script which is run on startup and then again on a successful shutdown. I'll upload a couple of updates in a bit
EDIT: I have attached 2 updates to the post, one is for cyanogenMod based builds and the other is for all other builds such as fresh froyo etc.
Clemsyn, i have the latest yaffs source compiled into the kernel, i will commit it to git in a bit. With the latest yaffs a checkpoint is created every time sync is executed which makes scripts easier!
scooter1556 said:
I've got it working in a script, i have it in a script which is run on startup and then again on a successful shutdown. I'll upload a couple of updates in a bit
EDIT: I have attached 2 updates to the post, one is for cyanogenMod based builds and the other is for all other builds such as fresh froyo etc.
Clemsyn, i have the latest yaffs source compiled into the kernel, i will commit it to git in a bit. With the latest yaffs a checkpoint is created every time sync is executed which makes scripts easier!
Click to expand...
Click to collapse
I downloaded the CM update, and it didn't enable the checkpoint, still had to enable it manually through terminal.
Testing the kernel right now however, and so far liking it.
scooter1556 said:
I've got it working in a script, i have it in a script which is run on startup and then again on a successful shutdown. I'll upload a couple of updates in a bit
EDIT: I have attached 2 updates to the post, one is for cyanogenMod based builds and the other is for all other builds such as fresh froyo etc.
Clemsyn, i have the latest yaffs source compiled into the kernel, i will commit it to git in a bit. With the latest yaffs a checkpoint is created every time sync is executed which makes scripts easier!
Click to expand...
Click to collapse
Thanks scooter, I'll try it out. I got stuck on a fake vsync and can't get out of it that I was unable to create a checkpoint and upon reboot without a checkpoint, everything was messed up. This is perfect, getting a checkpoint on startup and another in shutdown Thanks a lot.
Krazy-Killa said:
I downloaded the CM update, and it didn't enable the checkpoint, still had to enable it manually through terminal.
Testing the kernel right now however, and so far liking it.
Click to expand...
Click to collapse
That's weird! So it didn't make a checkpoint on startup? I'm running the same script and init.rc and it works fine. I did push the file with adb though, did you fix permissions after updating?
scooter1556 said:
That's weird! So it didn't make a checkpoint on startup? I'm running the same script and init.rc and it works fine. I did push the file with adb though, did you fix permissions after updating?
Click to expand...
Click to collapse
Ooooooh.... Probably not, lol. I'll do that, and edit this post with my results.
*EDIT* Ok, I feel stupid. I still had an old androidupdate.tgz file in my sdcard andboot folder, and the boot menu used it instead of the correct .tar file... Hm, that explained why my Market stopped working, lmao.
Krazy-Killa said:
Ooooooh.... Probably not, lol. I'll do that, and edit this post with my results.
*EDIT* Ok, I feel stupid. I still had an old androidupdate.tgz file in my sdcard andboot folder, and the boot menu used it instead of the correct .tar file... Hm, that explained why my Market stopped working, lmao.
Click to expand...
Click to collapse
lol, rookie error
OK, it works on boot up since I get a checkpoint 1 every boot not sure about shutdown but if scooter says it works, I bet you it works in shutdown too
Scoot, I'm going to try to do a git diff and post it here so all the changes I've made in the config will be there.
Even with that little debacle, I had 0 corruption of data, or missing apps in my /data partition, and had to reboot 4-5 times, each time I used GScript to execute the command manually before shutdown.
And camera still works. ^.^
Krazy-Killa said:
Even with that little debacle, I had 0 corruption of data, or missing apps in my /data partition, and had to reboot 4-5 times, each time I used GScript to execute the command manually before shutdown.
And camera still works. ^.^
Click to expand...
Click to collapse
That's great news and if my memory serves me right, you easily have data corruption in shutdowns and reboot. IMO, scooter's script is the best option we have for this issue and you don't have to remember to use gscript (especially from an old person like me with slight dementia Anyways, I'll continue on with my testing with this script. If it is still working after a few days, I'll try to add Namespace support, CIFFS, PPOE in our kernel.
BTW, here is my git diff and .config file. Please put it up in GIT. Thanks.

[DEV][24/Nov/2013]Extended TWRP|v2.6.3.4

Intro:
---------------------
Extended TWRP is based on official Team Win Recovery Project, but modified** to address some special methods & features found on The HD2,
a device which has 3 different android loaders (cLK, MAGLDR and Haret) and various Android Rom configurations (DataOnExt, NativeSD, SD, Nand).
** If you are just looking for an unmodified TWRP for the HD2, check here.
I take no credit for this. All the creative hard work was already done!
Credits to:
agrabren, Dees_Troy, ViViDboarder, and AssassinsLament - core twrp 2 development team.
Toastcfh – for his underappreciated dedication to the community.
s0up and kevank - for their hard work on the web side of things.
shift, onicrom, netarchy, kevank, myndwire, bigbiff, dkelle4, shinzul, spiicytuna, and eyeballer - the rest of Team Win.
Amon_RA - for his great Recovery.
Koush - for his dedication to the community and ClockworkMod.
Akmzero, arif-ali, Evil_DevNull, gus6464, Jesusice, _jmz_, NxtGenCowboy, ohshaith55, Pyrostic, [R], and Rootzwiki - for all the help with devices and testing.
Team's supporters and the Android Community.
However, if you think that this extended version is full of unnecessary cr*p or that something is not working as expected anymore,
Credits to:
me
Notice:
---------------------
For me, this thread is about learning while having fun. It would be ideal if it leads to something that is really useful.
So, as you may have already understood, This Is Not a release thread. If you have the time and interest to help in any way, please do. Cause together we can make sure that this project will benefit all of us.
The attached recovery image is provided for people who can't compile it from source, but want to either help in debugging or just experiment.
Have in mind that before attaching it here, it was only tested on one HTC-HD2(Eu) powered by (black) cLK bootloader.
The performance on devices powered by MAGLDR bootloader or running the good-old WM6.X should be considered untested.
In order to exploit the full potentials of this software, Black cLK bootloader is strongly recommended!
As usual, use at your own risk. TeamWin or kokotas is not responsible for anything bad that may occur from using Extended TWRP.
ReadMe
Features:
---------------------
**************Mainline**************
* Ability to save custom recovery settings
* Touchscreen driven with real buttons and drag-to-scroll
* XML-based GUI that allows full customization of the layout – true theming!
* Settings are saved to the sdcard and persist through reboots
* Ability to choose which partitions to back up and which to restore
* Ability to choose to compress backups – now with pigz (multi-core processor support for faster compression times)
* Ability to backup large partitions (size>1.5GB) by splitting the backup archive.
* Basic file manager (copy, move, delete, and chmod any file)
* OpenRecoveryScript scripting engine
* On-screen keyboard in recovery! -- supports long press, backspace repeat, and swipe left deletes everything left of the cursor
* ADB sideload functionality from AOSP
* Pseudo-terminal emulator
* Decryption support
* Ability to set a timeout for auto-turning off the screen
* exFAT support for sdcard's 1st partition
* Manual screen rotation
**************Extended**************
* Proper detection of bootloader(cLK/MAGLDR/haret)
* Support for cLK's extra boot partitions
* Tweaked off-mode charging for cLK (device can wake up by pressing any key)
* Direct rebooting to selected boot partition for cLK bootloader
* Direct rebooting with selected kernel from NativeSD folder for MAGLDR bootloader
* Ability to communicate with cLK in order to change partitions' size if needed
* Built-in NativeSD manager(Backup - Restore - Delete - Fix Permissions - Wipe Data - Wipe Dalvik-Cache - [cLK]Kernel-Restore)
* Option to skip any NativeSD Rom during sd-ext's partition backup
* Option to adjust backup/restore process for DataOnExt method
*
* Nilfs2 support for sdcard's ext(2nd/3rd primary) partition
* NTFS support for sdcard's 1st primary partition
* Option for converting file system [ext2 - ext3 - ext4 - nilfs2] of sdcard's ext partition (without losing any data if there is enough space on the /sdcard)
* Option for adding a 3rd primary partition(mmcblk0p3 as /sdext2)
* Option to skip dalvik-cache during backup
* Ability to restore backups that were made using a CWM Recovery
* Ability to check SD Card's filesystem(s)
* Ability to run shell scripts from your SD Card (script location: /sdcard/TWRP/scripts)
* Ability to "run" recovery (AROMA based) apps with one click (app location: /sdcard/TWRP/app)
* Ability to select current theme (example of theme file location /sdcard/TWRP/theme/MyTheme/ui.zip)
* Ability to check the size of the backup to be restored
* Ability to take screenshot (screenshots location: /sdcard/TWRP/screenshots)
* Configurable haptic feedback
* Configurable system tweaks (cpu gov, cpu freq, i/o sched, drop_caches)
Source:
---------------------
Extended-Team-Win-Recovery-Project
Looks:
---------------------
Screenshots
Compatible themes:
TWRP's Default Style Blue Theme for v2.5.0.5
Dark_Avenger's Holo Dark Theme for v2.6.3.0
Download:
---------------------
HD2_EXTENDED_TWRP_2.6.3.4.zip
md5: 5af088d200a00e0a3efb27860a5168c6
Info: You need to have a recovery partition at least 9 MB to fit the img
HD2_EXTENDED_SD_TWRP_2.6.3.4.zip
Info: Extract to the root of your SD Card
Frequent issues:
---------------------
If you report an issue without a log and/or without details, that's not very helpful in tracking down that issue, so, eventually, don't expect any assistance cause I am not a medium.
If you get a "status 2" error when installing a recovery-update-package(zip) that used to work with your old recovery, change the update-binary inside the zip file with a newer one (API 3).
DON'T FORGET to check the syntax in the updater-script and verify that format() and mount() commands have the correct amount of arguments, otherwise you'll end up having other errors like "status 7".
i.e. if you use the update-binary included in the attached file below, format takes 2: format("MTD", "boot").
If you occasionally can't boot into recovery, try increasing the size of its partition >= 10MB.
Installation:
---------------------
[Basic stuff before installing]
Make sure you have adb and fastboot working (required files here). Please don't ask here questions about this - a simple web search will be enough to help you.
Make sure that the size of the 'recovery' partition is enough for the image to fit.
Make sure the name of the recovery *.img file is the one you use in the commands or in flash.cfg
[Flashing occasions]
[cLK/MAGLDR]
Flashing the zip file from existing Recovery
Download zip file to your computer and copy to /sdcard.
Reboot phone into recovery.
Select to install the zip file from your /sdcard.
Reboot Phone into recovery as normal.
[cLK/MAGLDR]
Flashing the *.img file while booted in Android or in Recovery
Download the recovery file to your computer.
If it is a zip file, extract the *.img.
(Win) Open the folder you have the recovery, do a [Shift+RightClick] and select "Open command window here".
(Lnx) Open the folder you have the recovery, RigthClick and select "Open in Terminal".
Execute the commands:
Code:
adb push recovery.img /sdcard/recovery.img
adb shell erase_image recovery
adb shell flash_image recovery /sdcard/recovery.img
Reboot Phone into recovery as normal.
[cLK]
Flashing the *.img file while in fastboot mode(cLK menu)
Download the recovery file to your computer.
If it is a zip file, extract the *.img.
(Win) Open the folder you have the recovery, do a [Shift+RightClick] and select "Open command window here".
(Lnx) Open the folder you have the recovery, RigthClick and select "Open in Terminal".
Reboot phone into cLK menu (fastboot mode).
If needed, change the size of the 'recovery' partition on the fly (under SETTINGS/RESIZE PARTITIONS).
Execute the commands:
Code:
fastboot erase recovery
fastboot flash recovery recovery.img
fastboot oem boot-recovery
[MAGLDR]
Flashing the *.img file while in USB Flasher mode(using DAF.exe)
Code:
[B][COLOR="Red"]WARNING!!![/COLOR] This way of flashing will erase your current Rom on NAND too!
You will probably want to do this
[COLOR="Red"]ONLY IF[/COLOR] you need to increase the size of the 'recovery' partition![/B]
Download the recovery file to your computer.
If it is a zip file, extract the *.img.
Open the folder you have the recovery and place DAF.exe and flash.cfg in that same folder.
Edit flash.cfg according to required recovery partition size:
Make sure the .img file has the name that flash.cfg specifies!!
i.e. If the *.img file is named recovery.img and min-required-size = 8MB then the flash.cfg could be:
Code:
misc ya 1M
[U]recovery rrecov|ro|nospr 8M recovery.img[/U]
boot yboot|ro 5M
system ya 150M
cache ya 2M
userdata ya|asize|hr allsize
Check out the info about flash.cfg.
Connect the device to the computer via usb, enter MAGLDR and select USB Flasher option.
Right click on DAF.exe and select Run as Administrator.
Click [NEXT] when asked and wait to finish.
Post-Installation:
---------------------
Make sure you delete /sdcard/TWRP/.twrps.
If you're using a theme, update your theme file or temporarily switch to the default theme.
A big Thank-You for supporting/testing the ExtendedTWRP to:
---------------------
Dark_Avenger
NYLimited
DarrenNewsgroup
Nixda99
MarkAtHome
Robbie P
Timeline
Commit History
HD2_Extended_TWRP_2.6.3.4 @ 2013.11.24
Compiled tytung's jellybean kernel with CONFIG_YAFFS_XATTR=y
and replaced existing recovery kernel.
Attempt to fix curtain.jpg loading bug.
HD2_Extended_TWRP_2.6.3.3 @ 2013.11.20
Reverted to 2.x kernel (more stable and smaller size).
HD2_Extended_TWRP_2.6.3.2 @ 2013.11.20
Ported latest mainline commits.
Compiled without ntfs and exFat support (since no existing HD2 Rom really requires any of them).
Switched to 3.x kernel (github.com/TeamNightmare/android_kernel_htc_leo).
HD2_Extended_TWRP_2.6.3.0 @ 2013.09.19
Ported latest mainline commits (update to v2.6.3.0).
Disabled the ability to encrypt the backup of the data partition. Rolled back to old twrpTar code in an attempt to temporarily fix some backup/restore errors.
(The backups made by previous versions might not be good).
HD2_Extended_TWRP_2.6.1.2 @ 2013.09.09
Fix crashing when installing a recovery-package.
Added "bootloader=haret" to startup.txt for haret's case.
HD2_Extended_TWRP_2.6.1.1 @ 2013.09.06
Reverted a commit that messed up the rotation feature.
Attempt to improve bootloader detection.
HD2_Extended_TWRP_2.6.1.0 @ 2013.08.31
Ported latest mainline commits (update to v2.6.1.0).
HD2_Extended_TWRP_2.6.0.0 @ 2013.07.16
Ported (most of the) latest mainline commits (update to v2.6).
Ported Vojtech Bocek's screen rotation.
Old themes are not compatible!
Instead of one ui.xml file, the new theme requires two files portrait.xml and landscape.xml and the appropriate images.
Misc code cleanups/fixes.
HD2_Extended_TWRP_2.5.0.5 @ 2013.05.10
Try to fix libtar bug (present when creating sd-ext's backup).
Reboot options for "recovery" and "bootloader" will be available for cLK only.
Revised nativeSD manager.
HD2_Extended_TWRP_2.5.0.4 @ 2013.05.08
Made partitionlist's selection persist.
Added ability to load selected theme's curtain.jpg.
Fixed slider-touch.png, changed list's header separator color to red and reordered header info in built-in theme.
Revised how twrp handles 'userdata' partition when DataOnExt mode is.
Cause there is a chance 'DalvikOnNand' method is used.
Cleaned up unused code and added a flag for HD2-specific stuff so if anyone would try to build Extended TWRP for another device it would be easier.
HD2_Extended_TWRP_2.5.0.3 @ 2013.05.06
Added "View file" under filemanager options (it's more or less like 'cat /file').
Small fix to off-mode charging.
Attempt to fix progress bar issue.
Changed built-in theme. The new one is based on Dark_Avenger's Holo Dark.
Changed some log messages.
HD2_Extended_TWRP_2.5.0.2 @ 2013.04.22
Changed behavior of "Reset Defaults". Device will reboot after that.
Changed handling of extra boot partitions for cLK.
Now you can backup/restore/wipe any of those partitions just like the default ones!
(In the end this means that you can backup/restore EVERYTHING at once)
Changed versioning way (last digit will be used for the extended revision).
Changed screenshot function:
If the system is busy (perhaps doing something (?) to the sdcard) no screenshot will be taken if you press the top logo.
Otherwise, in order to notify the user that a screenshot was successfully taken the keys backlight will blink.
Reorganized/rewrote some of the code (backup/restore/wipe) around "partitionlist".
Removed sfdisk.
Recompiled tytung_jellybean_r2 kernel with increased MSM_MAX_PARTITIONS to 20 (this will fix the detection of cLK's extra boot partitions).
Misc fixes that I don't remember now...
HD2_Extended_TWRP_2.5.0.0_r1 @ 2013.04.17
Ported latest mainline commits (update to v2.5).
Fixed battery_thread().
Added ability to auto delete logs from cache to free up some space when needed (see Dark_Avenger's post).
Switched kernel to tytung_jellybean_r2.
Misc fixes.
Compiled img with TW_INCLUDE_CRYPTO = true & TW_INCLUDE_JB_CRYPTO = true.
Increased required min size to 9MB.
HD2_Extended_TWRP_2.4.4.0_r7 @ 2013.04.05
Attempt to fix /sdcard mounting issues in case of slow cards(thanks to Darren for helping).
Fixed restoring a tar that was made with a previous version that used busybox tar.
HD2_Extended_TWRP_2.4.4.0_r6 @ 2013.04.03
Attempt to fix archive extraction during restore.
Added separate option for excluding dalvik-cache from a NativeSD Rom's backup under NativeSD Manager Settings.
HD2_Extended_TWRP_2.4.4.0_r5 @ 2013.04.02
Attempt to fix timezone dst settings.
Revised extractTarFork() function.
HD2_Extended_TWRP_2.4.4.0_r4 @ 2013.03.31
3rd attempt to fix sdcard partitioning.
Added option for magldr users to select which NativeSD Rom to reboot to(jskenderi's idea).
Fixed cpu governor selection not getting applied at boot.
Removed "read_ahead_kb" tweaks from init.rc.
Revised LoadValues() function.
HD2_Extended_TWRP_2.4.4.0_r3 @ 2013.03.22
2nd attempt to fix sdcard partitioning.
Changed "Enable MD5 verification" to "Skip MD5 verification" - The default behavior is to verify md5s.
Fixed a bug regarding backing up with "Exclude NativeSD Roms..." option enabled.
HD2_Extended_TWRP_2.4.4.0_r2 @ 2013.03.20
First attempt to fix sdcard partitioning.
Ported latest mainline md5sum fix.
Fixed NativeSD dalvik wipe.
Replaced the option for the preboot scrict with an option to force TWRP to handle boot partition as 'mtd'.
Only MAGLDR users will be able to see it AND in case your "boot" is raw (rboot was used in flash.cfg), enable it!
HD2_Extended_TWRP_2.4.4.0_r1 @ 2013.03.14
Ported latest mainline commits.
Updated/fixed clkpartmgr (needs cLK v1.5.2.0 to work correctly) - partition size is passed in blocks.
Revised storage partitioning method.
Enabled ntfs and exFat formats for card's 1st primary partition.
Switched to libtar for archive handling.
Switched to libblkid for filesystem detection.
Added more options for haptic feedback.
Added option under "Settings" for the preboot scrict that sets the filesystem for "boot" partition before recovery loads recovery.fstab.
If your bootloader is MAGLDR and "boot" is raw, disable it. IN ANY OTHER CASE leave it enabled.
If you don't know what I'm talking about, leave it enabled.
Kernel is compiled with defaults: gov = performance, i/o scheduler = deadline, cpu freq = (245 - 998)MHz
SD Card read_ahead_kb set to 2048, NAND's partitions read_ahead_kb set to 128
Added system tweaks options (cpu gov, i/o scheduler, cpu max/min freq, available memory boost).
If we want to have a theme setting persisted there is a new function <action function="save"> instead of <action function="set">.
HD2_Extended_TWRP_2.4.3.0_r3 @ 2013.03.04
Reverted the way TWRP handles 'boot' partition's file-system.
Backup/restore for MAGLDR should work now.
Ported the dim effect before screen turns off from mainline.
Misc small changes in code.
HD2_Extended_TWRP_2.4.3.0_r2 @ 2013.03.02
Reverted fileselector to clear by default the data variable.
HD2_Extended_TWRP_2.4.3.0_r1 @ 2013.03.01
Ported mainline commits (update to 2.4.3.0).
One of them fixes the fileselector bug.
1st attempt to fix UI's bug (hot-rebooting after theme changing).
HD2_Extended_TWRP_2.4.2.0_r2 @ 2013.02.27
Fixed screen timeout not being loaded at boot (instead it was always 60 sec).
Added haptic feedback and an option to enable it under "Settings".
Fixed screenshot feature.
HD2_Extended_TWRP_2.4.2.0_r1 @ 2013.02.25
Added option for the root checking stuff. If you don't want TWRP messing with your system you have the option to disable it under "Settings".
Added option to select the clock-time format.
Cleaned up blanktimer.
HD2_Extended_TWRP_2.4.1.0_r3 @ 2013.02.24
Ported latest mainline commits.
Some of them were already in Extended TWRP(button highlight and 24h clock)
One of them added a "Screen" button under "Settings" which gives you the option to
(a)set the timeout for auto-turning-off the screen and
(b)set the level of screen brightness.
Created separate thread for monitoring battery capacity and usb status.
Led will work as normal. I've also set it to blink the amber led if battery < 10%.
Tweaked offmode-charging (this is for cLK users that don't use cLK's built-in offmode charging mode).
Fast charging is enabled in kernel and 'Powersave' settings will be used.
Also added the ability to wake up the device while offmode-charging by pressing ANY key.
Removed unused/duplicate options from "Settings".
When you skip dalvik-cache during a backup, a file named .nodalvikcache will be created in the backup folder with the size of dalvik-cache stored inside.
This will be used whenever you restore that backup in order to add that size to the calculations for minimum partition's size.
In case the '.nodalvikcache' file doesn't exist there is an option to set the increment(%) for the size of the partition to which a backup that doesn't contain dalvik-cache will be restored. Default value is 40%.
Changed the way TWRP handles 'boot' partition's file-system. It doesn't depend anymore on which bootloader we have (cause MAGLDR supports both yaffs2 and raw mtd).
Code:
Dropped the logic:
If cLK => mtd
else => yaffs2
Now it really checks the file-system.I think
Added the ability to restore a backup made with cLK as bootloader on MAGLDR.
...
HD2_Extended_TWRP_2.4.1.0_r2 @ 2013.02.11
Moved option for backing up nand's userdata to BACKUP page.
Instead of Data show DataOnExt or DataOnNand accordingly.
Added option under "SETTINGS" page to let TWRP check if a partition's size is enough for its backup to be restored before tar throws an error caused of insufficient space.
MAGLDR users: if the selected part of your backup is larger than the actual size of the partition, this part will be excluded from the restore process.
cLK users: Update to v1.5.1.9 and size mismatches will be no problem, since TWRP and cLK will automatically resize any partition that needs resizing.
Show progressbar during NativeSD backup.
Updated clkpartmgr (the args passed to it have changed too).
HD2_Extended_TWRP_2.4.1.0_r1 @ 2013.02.06
Port mainline commit(TWFuncc::Get_Folder_Size and MD5 checking).
Added function for finding a file on storage using the file's name and used it in OpenRecoveryScript.
Add clkpartmgr to TWRP.
HD2_Extended_TWRP_2.4.0.0_r8 @ 2013.02.01
When restoring a backup with DataOnExt show 'data' instead of 'sd-ext' under Restore page.
Always reset Use_unyaffs_To_Restore to false.
Fix Recreate_DataOnExt_Folder().
HD2_Extended_TWRP_2.4.0.0_r7 @ 2013.02.01
Created separate thread for updating time clock in order to avoid having it frozen.
Fix for sd-ext button disappearing after wiping.
Recreate folder for DataOnExt after wiping sd-ext.
Port last mailine commits.
HD2_Extended_TWRP_2.4.0.0_r6 @ 2013.01.31
Fixed backup part selection when there are split archives.
Corrected free space calculation in FS-converting and NativeSD-backup.
Time format changed to hh:mm:ss. (Sometimes seconds get frozen but it's nothing to worry about)
Misc NativeSD Manager fixes.
HD2_Extended_TWRP_2.4.0.0_r5 @ 2013.01.30
Added ability to select theme.
You must place the theme file(ui.zip) in a folder under /sdcard/TWRP/theme (eg /sdcard/TWRP/theme/Holo_Dark/ui.zip)
Added ability to select and load a recovery package like Aroma-File-Manager or NativeSD-Recovery.
You must place the files (*.zip) under /sdcard/TWRP/app.
Fixed NativeSD backup(tar arguments error).
Moved Update_Size() from Mount() function to Wipe().
HD2_Extended_TWRP_2.4.0.0_r4 @ 2013.01.29
Fixed a mounting issue:
Update_Size() function was called inside Mount().
However inside Update_Size() there was a call for Mount() and UnMount(!?) causing a mess.
Lets see if this could fix the problem with DataOnExt too.
HD2_Extended_TWRP_2.4.0.0_r3 @ 2013.01.29
Ported mainline commits till 29th of Jan.
Fixed boot partition's flag so that it can be wiped
Settings file (.twrps) is now read once at boot.
The TWRP folder structure on /sdcard will be auto-generated.
HD2_Extended_TWRP_2.4.0.0_r2 @ 2013.01.27
Updated to twrp2.4.
Ported all mainline commits till 26th of Jan.
Rewrote most of the extended functions.
Added option to format all main partitions except for /sdcard.
Added new feature in file manager: the size of the selected file or folder will be shown in the operation page.
HD2_Extended_TWRP_2.3.3.0_rev12 @ 2013.01.16
One&only purpose: Attempt to fix all issues for MAGLDR users.
Extensive logging is present in this rev.
HD2_Extended_TWRP_2.3.3.0_rev11 @ 2013.01.15
Second attempt to fix weird sdcard issues.
Added more logging output to help find the problem.
HD2_Extended_TWRP_2.3.3.0_rev10 @ 2013.01.14
Probably fixed the error during "Fix-Permissions" when DataOnExt is used.
Reverted changes in fstab as an attempt to fix weird sdcard issues.
HD2_Extended_TWRP_2.3.3.0_rev9 @ 2013.01.13
Another attempt to fix partitions' sizes for the backup process.
Added option (under "Backup" page) for the user to select if the NativeSD roms will be excluded or not from the sd-ext backup.
Added ability to run shell scripts that you might have on your sdcard (/sdcard/TWRP/scripts).
Added back the missing "Reload Theme" button under "Advanced" page.
HD2_Extended_TWRP_2.3.3.0_rev8 @ 2013.01.06
Changed the path where TWRP will save any taken screenshot to "/sdcard/TWRP/screenshots/".
The name of the png file will have this format "TWRPScr-001.png". The increment will be done automatically.
Unfortunately I haven't fixed the quality yet.
Added an option under "Settings" to "Enable path-checking for DataOnExt".
If enabled the path that will be used for the DataOnExt mode will be checked before any errors occur. Hopefully this will help non-experienced users to use DataOnExt function.
Added ability to automatically skip any NativeSD Rom folder from your sd-ext backup.
If you want to backup a NativeSD Rom do it from the NativeSD Manager.
Probably fixed the way TWRP calculates the partition sizes according to our extended settings(skip dalvik-cache - dataonext - skip nativesd roms).
So now the sizes (shown under "Backup" and) used during backup-process should be correct.
HD2_Extended_TWRP_2.3.3.0_rev7 @ 2013.01.04
Removed the second parsing of recovery.fstab (the one after "postrecoveryboot.sh" run). Instead the script "prerecoveryboot.sh" will run before TWRP parses the recovery.fstab file.
This should also eliminate any weird errors you've been seeing in the logs.
Attempt to resolve problems relevant to "Fix Permissions" when DataOnExt mode is ON.
Added a second step/check in UnMount() in case it fails the first time. Just like I did for the Mount() in previous rev.
Added option to skip saving "dalvik-cache" during backup (under "Backup" menu) in order to minimize the size of the backup file. After-all dalvik-cache is recreated. It will be like you've wiped it when you restore that backup.
Changed the way Backup & Restore work for DataOnExt:
If you have DataOnExt checked and you go ahead and start a backup process then
a (hidden) file called .dataonext will be created in the backup folder.
The path for your /data mount point will be stored inside that file.
Do not delete that file cause you'll have to recreate it manually!
Regardless of the settings you might have(DataOnExt checked or unchecked) if you go ahead and start a restore process of a backup with DataOnExt
(so it has the .dataonext file inside - if not it's easy to manually create it)
the option for "Setup recovery for DataOnExt" will be checked and
the path (DataOnExt button) will be reset to the path you had when the backup was done.
If you were using the entire /sd-ext for /data (original DataOnExt) when you made your backup then
when you restore that backup, the sd-ext will be formatted.
If you were using a subdir of /sd-ext for /data (modified DataOnExt like "/sdext/NexusHD2-JellyBean/data") when you made your backup then
when you restore that backup, the sd-ext will not be formatted - instead only that subdir will be deleted.
Ported Tasssadar's "clicked" effect to all buttons as feedback.
Been experimenting and added some code to be able to take a screenshot (will be saved as /sdcard/TWRPScr.png).
It is done by touching the top LOGO. To enable it, there is a relevant checkbox under "Settings".
It doesn't work as expected yet! The pics taken are crap but it's a wip...
HD2_Extended_TWRP_2.3.3.0_rev6 @ 2013.01.02
Fixed a problem when restoring an sd-ext backup that was made with CWM Recovery.
Added an option to run some filesystem checks on the sd-card under "Partition SD Card" button inside "Advanced".
Enabled power key to lock the screen.
HD2_Extended_TWRP_2.3.3.0_rev5 @ 2012.12.30
1st attempt to fix mounting problem(s) related to ext partition.
TWRP is now able to restore backups that were made using a CWM Recovery.
All you have to do is copy the entire backup folder (i.e. 2012-08-20.09.12.38) from /sdcard/clockworkmod/backup to /sdcard/TWRP/BACKUPS/htcleo
HD2_Extended_TWRP_2.3.3.0_rev4 @ 2012.12.28
1st attempt to fix TWRP's failure on file-system check when a partition has a label.
Changed how TWRP handles the ext partition(s) size while parsing recovery.fstab.
HD2_Extended_TWRP_2.3.3.0_rev3 @ 2012.12.27
3rd attempt to fix the .android_secure bug.
Added an SD version for testing.
HD2_Extended_TWRP_2.3.3.0_rev2 @ 2012.12.26
2nd attempt to fix the .android_secure bug.
1st attempt to fix the crash of sd card's partitioning when adding 2nd ext partition.
Reverted the logo to the default one.
New settings for fs-check and DataOnExt will be saved and not lost after a reset.
Switched the type of release from just an img-file to a flashable-zip with a script to check recovery's partition size before updating.
HD2_Extended_TWRP_2.3.3.0_rev1 @ 2012.12.24
Ported commits from mainline 2.3.3.0.
Changed how the DataOnExt will be handled.
Under "Settings" you'll find a checkbox with which you can "tell" recovery that you're using DataOnExt or not.
In case you're using a modified DataOnExt method you can set the actual path of your /data (i.e. /sd-ext/%RomName%/data) by hitting DataOnExt button.
Probably fixed the .android-secure bug.
Reverted the backup path(BACKUPS/htcleo/).
So you have to create an intermediate folder named "htcleo" under BACKUPS and move your backups inside.
Reverted the max size for splitting archive to 1.5GB.
1st attempt for saving the contents of your ext partition when you change the fs type (will need enough free space on your sdcard for this to work).
Added option to set the number of mounts that will trigger a filesystem check under "Settings".
Added option to wipe Data, Boot and (cLK)sBoot under "wipe" Menu.
Added necessary code for selecting fs type (vfat / ntfs) for /sdcard but since I can't make it function properly I've disabled it in the UI. (Also in case it will work using the ntfsprogs binaries, the size of the recovery will increase to ~ 8MB)
HD2_TWRP_2.3.2.X @ 2012.12.14
Detection of bootloader
Nilfs2 support for sdcard's ext partition
Option for converting file system(formatting) of sdcard's ext partition: [ext2 - ext3 - ext4 - nilfs2]
In-built NativeSD manager
Option for adding a 2nd ext partition(mmcblk0p3)
(cLK)Direct rebooting to selected boot partition
Option to adjust the backup process for DataOnExt case
1st attempt for archive splitting(also lowered the max size to 512MB)
1st attempt for MAGLDR boot restoring
Info
How to report a problem
Provide the log file.
In order to get it connect your device to pc via usb and run in terminal:
Code:
adb pull /tmp/recovery.log
If that fails for some strange reason then you could also try:
Code:
adb pull /cache/recovery/log
Or you could just use the "Copy Log" button under "Advanced" and have the log copied to the root of your card.
Give a short description of what triggered the problem.
If you don't have your device's setup in your signature, post that info too. For example:
Code:
HD2 ver.: EU
SDCard: Sandisk 32GB(c4)
SDCard's Partition Table: mmcblk0p1 [vfat,30GB], mmcblk0p2 [ext4,2GB]
Bootloader: cLK 1.5.1.6
NAND's Partition Table: recovery 8MB, misc 2MB, boot 4MB. userdata auto-size, system 200 MB, cache 2MB
Rom: HyperDroid 6.1 - NAND
Since this is a WIP, you could also use github to report any issue.
Theme related
Information on Official TWRP Theming.
Extended TWRP gives you the ability to choose between many themes.
When booting, it checks for a theme zip file on your card:
/sdcard/TWRP/theme is the location where you must create a folder named after the theme you will use and place the ui.zip inside it (i.e. /sdcard/TWRP/theme/Holo_Dark/ui.zip).
If none found then it will use the built-in theme.
For those who prefer the blue-ish TWRP default theme, I will be attaching it to this post every time something changes, so that you can use it as any external theme.
Since version 2.6.0.0, the theming engine of the Extended TWRP differs from the official.
Instead of one ui.xml file, the new theme requires two files portrait.xml and landscape.xml with the appropriate images.
Thanks for your work. Will try and report back.
Holo Dark theme for version 2.6.3.4 (portrait only).
Nice! will give this a shot
thanks.
Dark_Avenger said:
Updated Holo Dark theme for version 2.4.0.0 rev2
Click to expand...
Click to collapse
How is your theme applied? do you extract it and put it in a folder somewhere?
Re: [DEV][27/Jan/2013]Extended TWRP|v2.4.0.0.r2
Create a folder "/sdcard/TWRP/theme" and place the ui.zip there without unzipping it.
Sent from my HTC HD2 using Tapatalk 2
Re: [DEV][27/Jan/2013]Extended TWRP|v2.4.0.0.r2
v2.4.0.0r2 is not mounting my sd-ext at all, when I checkmark it manually, it vanishes after a short while.
Obviously, fix permissions don't work. Backups menu reports 0 size.
My log: http://ompldr.org/vaDk5aw/recovery.log
System setup:
Boot loader: Black cLK 1.5.1.6
Radio: 2.15.50.14
ROM: NexusHD2-JellyBean-1.3a
SD card: SanDisk class 4 30GB fat32 mmcblk0p1 and 2GB ext4 mmcblk0p2
Internal partitions: system 390M, user data auto, recovery 8M, rest cLK default.
TWRP v2.3.3.0rev7 was the last extended recovery that worked perfectly for me.
Thanks kokotas. =)
Sent with love from me to you via HTC HD2 with Tapatalk 2
sunitknandi said:
v2.4.0.0r2 is not mounting my sd-ext at all, when I checkmark it manually, it vanishes after a short while.
Obviously, fix permissions don't work. Backups menu reports 0 size.
My log: http://ompldr.org/vaDk5aw/recovery.log
System setup:
Boot loader: Black cLK 1.5.1.6
Radio: 2.15.50.14
ROM: NexusHD2-JellyBean-1.3a
SD card: SanDisk class 4 30GB fat32 mmcblk0p1 and 2GB ext4 mmcblk0p2
Internal partitions: system 390M, user data auto, recovery 8M, rest cLK default.
TWRP v2.3.3.0rev7 was the last extended recovery that worked perfectly for me.
Thanks kokotas. =)
Sent with love from me to you via HTC HD2 with Tapatalk 2
Click to expand...
Click to collapse
Did you try to run "Check SD Card" from "Advanced" menu?
Re: [DEV][27/Jan/2013]Extended TWRP|v2.4.0.0.r2
Dark_Avenger said:
Did you try to run "Check SD Card" from "Advanced" menu?
Click to expand...
Click to collapse
Yeah that works fine.
The recovery doesn't seem to function properly with DataOnEXT enabled.
In normal mode, all seems OK.
Log:
http://ompldr.org/vaDlubQ
Sent with love from me to you via HTC HD2 with Tapatalk 2
Re: [DEV][27/Jan/2013]Extended TWRP|v2.4.0.0.r2
Did you set the path properly in DataOnExt page?
Sent from my HTC HD2 using Tapatalk 2
sunitknandi said:
Yeah that works fine.
The recovery doesn't seem to function properly with DataOnEXT enabled.
In normal mode, all seems OK.
Log:
http://ompldr.org/vaDlubQ
Sent with love from me to you via HTC HD2 with Tapatalk 2
Click to expand...
Click to collapse
same here.
sd-ext is not getting mounted if DataOnEXT option enabled.
mounting via shell workes
if DataOnEXT option disabled sd-ext gets mounted vie GUI
Hi guys,
I don't currently use a Rom with the DataOnExt feature, so I can't really test this.
I'll try one tomorrow in order to be able to see what's the problem.
[EDIT]I found a nasty loop in Mount() function which I removed in r4. Try to see if this one solves this problem.[/EDIT]
Also I'd suggest that you either manually delete the /sdcard/TWRP/.twrps file or select to "Restore Defaults" after updating TWRP.
I've seen some really strange issues (like 'buttons disappearing') if I don't remove the previous settings file.
At last, I have ported the latest commits from official TWRP and fixed a couple of things in the r2.
But I didn't check out the problem you reported. Nevertheless I will upload the compiled files to keep things moving...
Regards!
PS:@Dark_Avenger
Just a suggestion: Keep using the 5th post for any updates of your theme so that it will be found easier. I already linked that post in the 3rd one.
kokotas said:
Hi guys,
I don't currently use a Rom with the DataOnExt feature, so I can't really test this.
I'll try one tomorrow in order to be able to see what's the problem.
Also I'd suggest that you either manually delete the /sdcard/TWRP/.twrps file or select to "Restore Defaults" after updating TWRP.
I've seen some really strange issues (like 'buttons disappearing') if I don't remove the previous settings file.
At last, I have ported the latest commits from official TWRP and fixed a couple of things in the r2.
But I didn't check out the problem you reported. Nevertheless I will upload the compiled files to keep things moving...
Regards!
Click to expand...
Click to collapse
FYI
deleting settings file did not help
issue still present in .rev3
kokotas said:
Hi guys,
I don't currently use a Rom with the DataOnExt feature, so I can't really test this.
I'll try one tomorrow in order to be able to see what's the problem.
[EDIT]I found a nasty loop in Mount() function which I removed in r4. Try to see if this one solves this problem.[/EDIT]
Also I'd suggest that you either manually delete the /sdcard/TWRP/.twrps file or select to "Restore Defaults" after updating TWRP.
I've seen some really strange issues (like 'buttons disappearing') if I don't remove the previous settings file.
At last, I have ported the latest commits from official TWRP and fixed a couple of things in the r2.
But I didn't check out the problem you reported. Nevertheless I will upload the compiled files to keep things moving...
Regards!
PS:@Dark_Avenger
Just a suggestion: Keep using the 5th post for any updates of your theme so that it will be found easier. I already linked that post in the 3rd one.
Click to expand...
Click to collapse
kokotas,
thanks for suggestion. I will use the 5th post to keep the Holo Dark theme in sync with the current extended version.
Without having a DataOnExt rom, I think that the problem with mounting the "sd-ext" is still there. You could reproduce it without a DataOnExt rom. Check the "DataOnExt" checkbox in "Settings" and try to mount the "sd-ext" from "Mount" page. The checkbox is selected for a second and then immediately deselected.
[EDIT]Deleting the .twrp settings file fixed it.[/EDIT]
Best
Dark_Avenger said:
kokotas,
thanks for suggestion. I will use the 5th post to keep the Holo Dark theme in sync with the current extended version.
Without having a DataOnExt rom, I think that the problem with mounting the "sd-ext" is still there. You could reproduce it without a DataOnExt rom. Check the "DataOnExt" checkbox in "Settings" and try to mount the "sd-ext" from "Mount" page. The checkbox is selected for a second and then immediately deselected.
Best
Click to expand...
Click to collapse
for me sd-ext mounting issue is fixed in .rev4
ratelutz said:
for me sd-ext mounting issue is fixed in .rev4
Click to expand...
Click to collapse
Yes... I can't reproduce it too after deleting the settings file ".twrp".
Re: [DEV][29/Jan/2013]Extended TWRP|v2.4.0.0.r4
kokotas said:
HD2_Extended_TWRP_2.4.0.0_r4 @ 2013.01.29
Click to expand...
Click to collapse
Looks like I am getting to the party a little late, sorry. Will be catching up soon as time permits.
---
If at first you don't succeed, skydiving is probably not for you... (via Tapatalk)
Re: [DEV][29/Jan/2013]Extended TWRP|v2.4.0.0.r4
kokotas said:
HD2_Extended_TWRP_2.4.0.0_r4 @ 2013.01.29
Click to expand...
Click to collapse
It certainly is better and probably functional now! You know, I used to have 'fun' with circular links and here you go introducing circular mounts!
Okay, let's see. I had some odd things happen after I flashed r4. I did delete the structure and started clean.
Sd-ext was found immediately. However, the xml path was not. I tried to use file explorer to look at the partition but it came up blank.
I tried to calculate partition sizes and it sat there for a long time before returning to the twrp splash screen and restarting. No boot - never saw Magldr.
I loaded Aroma fm which worked fine.
Back to twrp and checked the card. All went fine.
Not sure what else I may have touched but all of the sudden the correct path was populated and verified.
Not enough time to do a full backup but it was very close.
Should you want the log it is on dev-host: recovery.log - 230.13 KB <= Deleted
---
If at first you don't succeed, skydiving is probably not for you... (via Tapatalk)

Categories

Resources