yashsingh1/xdaforums huggingface dataset:
[Nook HD, HD+ Android Development] swaaye:
I have been using it for months with the tablet UI patch I made for 10.1.3.
[Nook HD, HD+ Android Development] krsboimo0o0o:
Thanks but it didn't work for me, however, I did get it to work by making a tablet ui patch with the auto patcher gui. Got a weird permission denied error, had to ctrl-x and ch mod 777 the working dir, while it was making the restore zip during the second attempt, you got to be quick. I think its just a windows xp problem though. Found it searching the forums. I didn't try the v6supercharger, does it help this ROM? Its already pretty darn smooth.
[Nook HD, HD+ Android Development] Jon Lee:
I haven't tried the v6supercharger on this, but odexing the rom improves performance considerably.

http://xdaforums.com/showthread.php?t=2390162

I didn't actually flash the zip because it has an(other) terminal emulator and library in it, and I didn't want to copy over my originals. I just unzipped it and placed the three xbin binaries and the two /bin binaries in their respective folders, and gave them executable permissions, then ran a dexo -all

Worked like a charm for me.

Edit: If you do this, you might find 'fstrim' and a few other things broken.

The fix is to cd /system/xbin and mv bb1 busybox.

The odex script replaces busybox with its own version (busyodex) after making a backup (bb1). The above will reverse it.
[Nook HD, HD+ Android Development] JanSpatschek:
Can I flash your Kernel over cm10.1 stable official?

Gesendet von meinem BN NookHD+ mit Tapatalk
[Nook HD, HD+ Android Development] Jon Lee:
You should be able to, starting with v19- but I haven't tested it.
[Nook HD, HD+ Android Development] rhyang:
I'm interested in collaborating on an F2FS-enabled TWRP. The infrastructure seems to be already in place, if I'm not mistaken: 2.7.1.0 has f2fs support.

I've built cm11 from source for ovation and crespo (just submitted my first change to the slimroms gerrit last week), but have not yet built TWRP for a nook. Any tips or gotchas ?
[Nook HD, HD+ Android Development] JanSpatschek:
Could you share your CM11 Rom for ovation?
[Nook HD, HD+ Android Development] rhyang:
I could, but it isn't really different from the cm11 nightly -- that's what I mean by "built from source". It was really just an exercise; the long-term goal for me is to port slimkat to the Nook HD+, which I really prefer to CM11.

I have F2FS and slimkat on my 2012 Nexus 7 and like it. For the Nook HD+ I am guessing I (or someone) will need to take all those F2FS commits and apply them to the CM11 kernel. I'm getting the impression that creating an F2FS-enabled TWRP will require that first. But I want to build a "normal" TWRP for the Nook HD+ first. Baby steps :)
[Nook HD, HD+ Android Development] Jon Lee:
There's a decent guide to compiling TWRP here:

http://xdaforums.com/showthread.php?t=1943625

A guide to compiling CM is here:

http://wiki.cyanogenmod.org/w/Build_for_ovation

(This is a rather generic guide and I have seen better instructions somewhere).

F2FS backport patches are here:

https://github.com/nowcomputing/f2fs-backports

(I haven't tried these, they may be better or worse than what I'm using)

In recovery section of BoardConfig.mk wou will need to add:

TARGET_USERIMAGES_USE_EXT4 := true

TARGET_USERIMAGES_USE_F2FS := true

The _defconfig I have is a decent place to start but you will need to enable POSIX ACL's, EXT4 and F2FS security extensions, and selinux under security. You may have to edit fstab/cm.ovation.init and/or FS/partition details (probably not required for recovery but for CM to recognize F2FS).

I wish I could play with this, but I don't have the machine for it (neither the CPU, nor the memory, nor the hard drive).

If you're successful, and want to collaborate, I would love to have a Nook system compiled under a different set of ion memory settings/ducati blob (borrowed from another omap4 device). I can match the ion settings in the kernel to match the ducati addressing so that it loads fine, the next step is compiling the openmax drivers to match. That way we could have a larger secure ion tiler space.

Anyway, good luck! I'm tempted just to hack one together...
[Nook HD, HD+ Android Development] rhyang:
I haven't changed the kernel from the CM11 stock version, but I did manage to build TWRP with the F2FS flag turned on, as above.

(deleted, see next page for 8-August version)

I checked that it boots, and that it presents the option to change a partition's file system to F2FS.

Warning: Make a full backup and bootable SD before you try this -

To change the file system of a partition, you can do the following :

Wipe->Advanced Wipe

Check box for a partition (a single partition, selecting multiple will result in an error message)

Repair or Change File System->Change FIle System->F2FS

I haven't actually tried doing this with my HD+, mostly because I have yet to watch Continuum Season 3 on Netflix :) But I'm curious about how this works for anyone brave enough to give it a go.
[Nook HD, HD+ Android Development] Jon Lee:
OK. I took your recovery and gave it a full selinux/f2fs kernel, and then used it to convert my data partition to f2fs. It works well, from what I can tell so far. Much better touchscreen response than my previous twrp 2.6.3 recovery.

http://www.mediafire.com/download/33f8skzaxwk00u6/OVATION-TWRP-20140729-recovery-F2FS.zip

root@android:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ext4 ro,relatime,errors=panic,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,background_gc=off,discard,user_xattr,inline_xattr,active_logs=2 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data f2fs rw,nosuid,nodev,noatime,nodiratime,background_gc=off,discard,user_xattr,inline_xattr,active_logs=2 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/rom /rom vfat rw,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/bootdata /bootdata vfat rw,noatime,nodiratime,uid=1000,gid=1000,fmask=0117,dmask=0007,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

Good job! Thanks for that.
[Nook HD, HD+ Android Development] rhyang:
Awesome ! I rebuilt TWRP with one more change: the twrp.fstab in the ramdisk now lists system, data and cache as F2FS instead of ext4 and used your kernel instead of CM11's :

(deleted, see next page for 8-August version)

I'm pretty sure this is how the F2FS-All TWRP for the Nexus 7 is configured. I can ask legolas93 over on that subforum if need be though.

I also updated my device tree on github so anyone can build this : (well, the TWRP/ramdisk part anyway)

https://github.com/roberthyang/android_device_bn_ovation/tree/cm-11.0-twrp-f2fs

So assuming the pieces all fit together the way they should :) we should have an F2FS-enabled TWRP ! Here's the way it's being used in Nexus 7 land :

Step 1 will be an interesting exercise .. some discussion on these threads :

http://xdaforums.com/showthread.php?t=2678142&page=14

http://xdaforums.com/showthread.php?t=2694201
[Nook HD, HD+ Android Development] Jon Lee:
This is the kernel source used for the recovery kernel.

http://www.mediafire.com/download/oh3dqdfaabo5ato/android_kernel_bn_omap-cm-10.1_v13.tar.gz

It has some additional changes to previous versions.

1) Fixed compile problem with f2fs/acl.c (needed for full selinux support. From what I can tell, otter f2fs and nowcomputing f2fs backport patches both came with this broke)

2) Added cpufreq/cpu-boost.c

http://review.cyanogenmod.org/#/c/55104/

3) Major HDMI changes (edid audio).

4) Full implementation of gamma (includes HDMI). The sysfs control interface is here:

root@android:/ # cd /sys/devices/platform/omapdss/manager0
root@android:/sys/devices/platform/omapdss/manager0 # ls
alpha_blending_enabled
cpr_coef
cpr_enable
default_color
display
gamma
name
trans_key_enabled
trans_key_type
trans_key_value
root@android:/sys/devices/platform/omapdss/manager0 # echo 6 > gamma

5 is neutral/same as off (0), with 1, being the brightest, to 9, being the darkest.

HDMI interface would be under manager1.

It does have a bug that if you set gamma on the lcd, and then power the lcd off and then back on, it has lots of pretty colors (until you do an echo 0 > gamma).

I was hoping to find an app to use that could control gamma. Something like the Trickster mod app.

http://xdaforums.com/showthread.php?t=1768315

Which is a pretty cool app, but will only set gamma on select devices.

Here is a flashable system kernel. Cleaned up my packaging a little.

http://www.mediafire.com/download/rrp69938yjid902/ovation-kernel-cm10.1.3_v20.zip

I test flashed it with the new recovery. F2FS data partition certainly makes a difference on I/O benchmark scores.
[Nook HD, HD+ Android Development] antebr:
Guys

Can you please put all files in one post, and explain how to convert file system and how to install.

Thank you.
[Nook HD, HD+ Android Development] Jon Lee:
Follow one of the other threads on how to install cm 10.1.3. This will guide you through on how to make a bootable SD card recovery.

Use the bootable sdcard recovery to install the F2FS TWRP recovery a few posts above (I used fastboot to do this).

Install CM 10.1.3 (official is fine). If you want F2FS then install the F2FS kernel one post above.

To convert to F2FS, Go into the wipe/advanced wipe menu in the F2FS recovery you installed (boot, hold power + n key). For now, only data and cache can be converted at will back and forth between ext4/f2fs. I did not modify the kernel ramdisk to allow F2FS system partition. (I really have no intentions to until I'm comfortable with F2FS and no one has any problems with it). I see little benefit in it anyway.

BTW, those with the defective emmc chip may be interested in F2FS, since it is not capable of being "trimmed".
[Nook HD, HD+ Android Development] swaaye:
From what I've read about it, it does have TRIM support. That would seem integral to a modern filesystem designed for flash devices.
[Nook HD, HD+ Android Development] Maromi:
might be of some use. i have been using this for awhile.

http://review.cyanogenmod.org/#/c/65480/

PS

MAG2GA trim patch was the last patch commited to ovation cm 10.1.
[Nook HD, HD+ Android Development] Jon Lee:
I'm hardly an expert on these things, but here's how I understand it.

Vold has fstrim buit into it.

https://android.googlesource.com/platform/system/vold/+/b87937cdea689594a293979b30b13054e7455dee

Now I could be wrong, but I believe only data and cache are ever trimmed because system is normally read-only and therefor trim is not needed.

Now, if we try to issue a manual trim on a F2FS partition, we get:

root@android:/ # fstrim -v /data
fstrim: FITRIM: Not a typewriter

The developer had this to say about it on the F2FS mailing lists a month ago.

http://sourceforge.net/p/linux-f2fs/mailman/message/32515474/

As far as mount options, I just stole what everyone else is using.

mount f2fs /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data wait noatime nodiratime nosuid nodev discard,background_gc=off,inline_xattr,active_logs=2

Ok, so we have discard enabled.

https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt

discard Issue discard/TRIM commands when a segment is cleaned.

but we have cleaning operations turned off

background_gc=%s Turn on/off cleaning operations, namely garbage
collection, triggered in background when I/O subsystem is
idle. If background_gc=on, it will turn on the garbage
collection and if background_gc=off, garbage collection
will be turned off.

This effectively nullifies 'discard', and so nothing is ever "trimmed".

That said, you all do have me wondering if I should turn cleaning operations on for data and cache f2fs (background_gc=on).

FSTRIM man page has this snippet:

http://man7.org/linux/man-pages/man8/fstrim.8.html

Reading that backwords, it seems the discard option is safer than the fstrim option. Also our emmc is not a "poor quality" chip, the emmc bug is a very specific fault. Also, I alluded to this once before, I have a more complete mmc/core/quirks.c code than the typical nook kernel.

So I'm very tempted to experiment with turning on cleaning operations for F2FS. I believe we would be one of the first devices to do so...

But as for now, With kernel _v20, no trim operations are enabled (which is the safest option for emmc longevity).

(Edit: Of course fstrim should still continue to work for ext4 partitions.)
[Nook HD, HD+ Android Development] Jon Lee:
I've wanted to ask... any idea why you all have so much higher memory speeds than we do? I've been all through the Bowser/Tate/Jem source (and through the github commits as well), but haven't found the answer.
[Nook HD, HD+ Android Development] leapinlar:
What does this mean? Does it mean that trim is enabled in CM10.1? Or does it just mean that if trim is run manually that the kernel has the trim safety features for MAG2GA? And when was it commited? In other words, is this included in the kernel for CM10.1.3 stable?
[Nook HD, HD+ Android Development] Maromi:
almost a year ago.https://github.com/CyanogenMod/andr...mmit/20a4cb612b08185ed2bc75c3c1fdb05bee8b0691
[Nook HD, HD+ Android Development] Maromi:
kindle hd's are on 3.0.72

something in this post http://xdaforums.com/showpost.php?p=41972786&postcount=523
[Nook HD, HD+ Android Development] jpisini:
you say "TWRP can format cache and data to F2FS" but when I choose cache in TWRP it gives me an error. It will let me select dalvik cache but I didn't want to do that until I asked.
[Nook HD, HD+ Android Development] rhyang:
The error you saw was probably because the twrp.fstab in Jon's (and my earlier) TWRP specifies ext4 for cache and data instead of f2fs. Here is a version with Jon's F2FS kernel which specifies f2fs for the cache and data partitions :

http://rhysw.com/TWRP/OVATION-TWRP-20140808-recovery-F2FS.zip

Interestingly, my new Moto G LTE (still factory ROM) also uses F2FS, but apparently only for the data partition.

btw I still haven't gotten around to applying F2FS patches to the CM11 kernel ... but it's still on my to-do list :)
[Nook HD, HD+ Android Development] Maromi:
F2FS works best for data partition
[Nook HD, HD+ Android Development] swaaye:
I did a system, data, cache wipe and did a fresh 10.1.3 install with F2FS format and the v20 kernel. Everything seems good so far EXCEPT the tun.ko module causes a reboot during the VPN connection process.
[Nook HD, HD+ Android Development] Maromi:
root@tate:/ # free
total used free shared buffers
Mem: 802420 784352 18068 0 548
-/+ buffers: 783804 18616
Swap: 131068 32184 98884

root@tate:/ # cat /proc/meminfo
MemTotal: 802420 kB
MemFree: 21916 kB
Buffers: 440 kB
Cached: 122568 kB
SwapCached: 12480 kB
Active: 245156 kB
Inactive: 240732 kB
Active(anon): 184208 kB
Inactive(anon): 181044 kB
Active(file): 60948 kB
Inactive(file): 59688 kB
Unevictable: 768 kB
Mlocked: 0 kB
HighTotal: 40960 kB
HighFree: 744 kB
LowTotal: 761460 kB
LowFree: 21172 kB
SwapTotal: 131068 kB
SwapFree: 99244 kB
Dirty: 2128 kB
Writeback: 0 kB
AnonPages: 354980 kB
Mapped: 279956 kB
Shmem: 1604 kB
Slab: 25920 kB
SReclaimable: 8616 kB
SUnreclaim: 17304 kB
KernelStack: 6128 kB
PageTables: 9264 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 532276 kB
Committed_AS: 16256576 kB
VmallocTotal: 122880 kB
VmallocUsed: 63168 kB
VmallocChunk: 2780 kB
[Nook HD, HD+ Android Development] Jon Lee:
Meh. Totally my fault.

http://www.mediafire.com/download/7kdg6bcn7g7812a/ovation-kernel-cm10.1.3_v21.zip

Fixed and tested. (Tun in v19 worked, I'm pretty sure.)

Also changed the tiler1d slot size from 27M (CM 10.1.3 stock) to 34 (CM11, Hashcode, and everyone else).

Edit: BTW, I know of at least two different ways of reproducing this exact same error. The first is to force a custom kernel boot argument that passes/spoofs an invalid androidboot.serialno entry. The second is to disable ipv6. (That is if you remove the ipv6 code from ipv4/tcp.c first, actually one doesn't even have to disable ipv6- just remove the few lines of ipv6 code in tcp.c). I just find it curious because I can remember back before pre-android days, when tun was dependent on neither... (and also when one could compile ipv4 with ipv6 completely disabled).
[Nook HD, HD+ Android Development] swaaye:
Thanks. I will give it a try when I get a chance.
[Nook HD, HD+ Android Development] Jon Lee:
Also, I'm not real sure what I did to cause the tun module to break in v20, but I do know it took a recompile of the module. The old module would not work. After thinking about it, I had an incomplete "patch" of F2FS in v19. I somewhat followed the F2FS backport patches on v20. One of the files I had "missed" in v19, that the 'F2FS backport patches', patched (and v20 included), is security/security.c I bet the answer lies there.
[Nook HD, HD+ Android Development] swaaye:
Well your v21 kernel and tun.ko is working great.
[Nook HD, HD+ Android Development] jpisini:
V21 seems to be working well so far. Thanks.
[Nook HD, HD+ Android Development] Jon Lee:
Without experimentation there would never be any progress. So here's another to try:

http://www.mediafire.com/download/ecr7p588op4487n/ovation-kernel-cm10.1.3_v22.zip

1) Preliminary ramdisk support for f2fs system partition. The idea being, convert system partition to f2fs in recovery BEFORE flashing cyanogenmod to have a f2fs system partition. Completely untested ATM.

2) Turned on cleaning operations for data & cache.

3) Added a governor agnostic cpu boost control (not to be confused with the other cpu-boost patch). Changed path in power HAL to utilize the boost control. Changed kernel ramdisk to support this with abyssplug as well.

4) added an Abyssplug init.d settings file. Feel free to experiment and report what works best for you...

5) Tiler1D slot size is now 35 (Which I believe is the right spot for us).

6) Turned tiler direct allocation (back) off... (was causing an issue when the memory was fragmented/after several days of operation).

This one doesn't benchmark as well as the last few have but I believe the overall user experience may be improved.

I'll throw up source for it here a little later.

Edit:

This one is the same as above but WITHOUT the cpufreq patch.

Found here: https://android.googlesource.com/kernel/omap/+/1b7a4040657d87aadbc263b5c81aec6a51e9ede4^!/

I think it performs better without it.

http://www.mediafire.com/download/05qacxvr95v5xgr/ovation-kernel-cm10.1.3_v23.zip

Unless something major comes along, this will probably be the last and final version. It works well enough for me.

Source:

http://www.mediafire.com/download/9hg0t546cx88tf9/android_kernel_bn_omap-cm-10.1_v14.tar.gz
[Nook HD, HD+ Android Development] swaaye:
I ran v22 and now v23 for a few days without any problems. Seems solid to me. Thanks for all the time you've put into this effort to improve the HD+!
[Nook HD, HD+ Android Development] rhyang:
Awesome. I repackaged your SELinux/F2FS kernel from 7/30 in a TWRP where the fstab specifies f2fs for system, data and cache.

http://rhysw.com/TWRP/OVATION-TWRP-20140822-recovery-AllF2FS.zip

(I initially tried with v23, but then realized it didn't have SELinux support)
[Nook HD, HD+ Android Development] krsboimo0o0o:
[MENTION=1936285]john lee[/MENTION]

I like this ROM, although I haven't tested out the new file system. I have flashed every ROM for the nook. So far I keep falling back to either your ROM, Jamus' rom 10.2, or killer sloth carbon. I have nandroid backups of all 3. I only have one question. Have you given any thought to making any other 4.2.2 ROMs now that you are satisfied with this rom? Root box, aokp, pacman, or slim bean. My personal preference is slim bean. Just wanted to pick your brain a bit. Thanks for making this rom.
[Nook HD, HD+ Android Development] andtron:
Just wondering if this file system compatible with the cm11.
[Nook HD, HD+ Android Development] Jon Lee:
I'm certain this kernel source would work well in any rom compile project (as long as the PVR modules is explicitly compiled against it).

If anyone were to do it, the last area of improvement would be to change mach-omap2/omap4-ion.c to:

omap4_ion_heap_secure_input_size = (SZ_1M * 90);
omap4_ion_heap_secure_output_wfdhdcp_size = (SZ_1M * 16);
omap4_ducati_heap_size = (SZ_1M * 105);

(or at least 90M for ion heap secure input size)

And compile the rom around that change. This would resolve some residual performance issues.

I'm not sure what my next project will be.

This was my previous:

http://sourceforge.net/projects/slackjackstudiolinux/

(free advertising :)

If anyone noticed v14 source had the partial beginnings of CMA. I have completed a full port of that (including dma-mapping and the associated omap-common and sleep-4xxx memory barrier changes it required), but at this point it doesn't do us any good.

It drops benchmarks about 200 points from the get-go. I went so far as to apply this patch:

http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/131317.html

but then decided it wasn't worth it.

The PVR module and WL1273 modules both use DMA, so theoretically could benefit. I know it forces a recompile of both.
[Nook HD, HD+ Android Development] talha970:
I was wondering if any of you guys have successfully used a vpn with this kernel i am on cm 10.1.3 stable and I have just about tried almost every vpn on the playstore none of them seems to work any ideas? Btw thanks for the new kernel :)
[Nook HD, HD+ Android Development] Jon Lee:
First, let me say, I don't believe tunnels are either secure or anonymous, at least not on android.

With that said, I've used OpenVPN Settings successfully.

http://www.freewarelovers.com/android/app/openvpn-settings

After install go into advanced settings, check 'Load tun kernel module', go into TUN module settings, and set load module using 'insmod', and path to module /system/lib/modules/tun.ko.

In order to test go to:

http://www.vpngate.net/en/

and download a couple of *.ovpn configuration files. Place them in /sdcard/openvpn.

In OpenVPN settings, check OpenVPN and one of the OpenVPN configurations you downloaded and you should be good to go.
[Nook HD, HD+ Android Development] talha970:
Thanks for your detailed reply it works! Any idea why the usual vpns as in hotspot, hola etc arent working? Thanks again
[Nook HD, HD+ Android Development] infra_red_dude:
Want to give this a try, can some one please explain the whole process? So far I downloaded OVATION-TWRP-20140822-recovery-AllF2FS.zip and ovation-kernel-cm10.1.3_v23.zip

Updating the OP would be a good idea IMHO.

Thanks!

Edit: Current setup - Nook HD+, CWM 6.0.4.6, CM11 M9 on EMMC.
[Nook HD, HD+ Android Development] talha970:
First flash twrp recovery zip, boot into twrp recovery by using power+n go to advanced wipe format and change filesystem of data and cache to f2fs, flash cm 10.1.3 stable,kernel and gapps, reboot and you are good to go :)