Monday, March 7, 2016

[DEV][KERNEL] TRIM for Galaxy Tab 10.1

TRIM for Galaxy Tab 10.1

These are kernels with TRIM enabled.


Backstory:

In 2011/2012 the eMMC DISCARD operation (aka TRIM) resulted in the SuperBrick bug on this device and many other Samsung devices. Samsung released a fix[1] back then but the Android community was not happy with the way Samsung had treated the them. So the fix was never merged for most devices. Instead the indie developers opted to disable the DISCARD operation all together. Since then every major ROM/kernel/recovery for this device has had DISCARD disabled.

Fast forward to the past year and a half or so some people began to try using the Samsung brickbug patches and renabling DISCARD. The buggy operation that resulted in bricking eMMC cards is the secure DISCARD operation. The plain DISCARD operation is safe. The patch from Samsung simply disables the buggy secure DISCARD.

I have been testing TRIM for this device on my own since shortly after[2] I first released the Lollipop ROM in November 2014. I have not run into any problems since then.

Developer @Lanchon has been publicly testing[3] it on the Galaxy S2 i9100 for a long time. Recently the DISCARD functionality was officially merged into the CM-13.0 kernel for that device. He also pointed out in a recent post that the lifespan of eMMC cards are adversely affected by write amplification[4] if TRIM is not being used.

So all things considered I think we are overdue for re-enabling the DISCARD operation and having TRIM working for this device.


Additional note:

Wiping in recovery is still safe. Some devices use the same kernel for the ROM and recovery. This device does not. This device has a seperate kernel for the ROM and recovery. So there is zero risk with using this kernel and any recovery that is also itself safe to use.

That was a major concern for devices that use a single kernel for the ROM and recovery but that does not apply to this device. Every recovery I have released to date still has DISCARD completely disabled.


You can find plenty of documentation/articles/threads about the SuperBrick bug saga so I won't write anymore than needs to be said.

[1] http://ift.tt/1R3Hd42
[2] http://ift.tt/1R3HfJi
[3] http://ift.tt/1R3HfJk
[4] http://ift.tt/1PsWLuO



Downloads:

I'm posting these as a separate project because I won't be re-enabling DISCARD in the kernel of my ROM releases until these kernels have been tested publicly for some time.

Standard disclaimer applies. Use this at your own risk!

p4wifi_kernel-aosp-5.1-20150305-TRIM.zip
p4_kernel-aosp-5.1-20150305-TRIM.zip
p4tmo_kernel-aosp-5.1-20150305-TRIM.zip

p4wifi_kernel-aosp-6.0-20160305-TRIM.zip
p4_kernel-aosp-6.0-20160305-TRIM.zip
p4tmo_kernel-aosp-6.0-20160305-TRIM.zip


Using TRIM:

Android runs TRIM automatically (since Lollipop) so you don't need to install any app to do it. You might want to run it manually once after you've installed this kernel since most of your devices probably have never been TRIMed before.

There is a command to do it manually from the terminal. It must be run as root.
Code:

$ fstrim -v /data
$ fstrim -v /system
$ fstrim -v /cache

XDA:DevDB Information
TRIM for Galaxy Tab 10.1, Kernel for the Samsung Galaxy Tab 10.1

Contributors
decatf
Kernel Special Features:

Version Information
Status: Testing

Created 2016-03-07
Last Updated 2016-03-07


from xda-developers http://ift.tt/1X7LSjP
via IFTTT

No comments:

Post a Comment