[Galaxy Tab 3 8.0 Android Development] ketut.kumajaya:
Extended PhilZ Touch Recovery

This is Extended PhilZ Touch Recovery previously known as blackhawk repack but now compiled from source, extend PhilZ Touch features mainly for dual boot.

Extended Features:

Integrated dual boot tool, only visible on 1st recovery's Andvaced menu

Show nice looking AROMA based dual boot menu if 2nd ROM exist. Completely separate 1st and 2nd ROM's recovery, without different recovery commands.

Using patched reboot function to make boot menu's reboot options work properly, direct access to Android reboot routine without property server

Auto detect filesystem type using patched busybox's blkid but still use fstab as a fallback. A nice feature to adapt a new filesystem, i.e. f2fs

Complete Flash-Friendly File System (f2fs) support for /system, /cache, /data and external SD card. Need a compatible kernel and ROM (with patched vold and e2fsprogs's blkid for f2fs formatted SD card) for normal boot

User selectable device format, ext4 or f2fs

Disable nandroid restore re-format /system and /cache. Solution for easly convert filesystem to/from f2fs from/to ext4.

Commits history: https://github.com/kumajaya/philz_touch_cwm6/commits/cm-11.0

IMPORTANT INFO:

For a brand new Tab 3 8.0, [MENTION=4666971]Phil3759[/MENTION] has made Odin flashable *tar.md5 package:

For WiFi version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt01wifi

For 3G version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt013g

For LTE version: http://goo.im/devs/philz_touch/CWM_Advanced_Edition/lt01lte

You can update to the latest version using PhilZ Touch recovery itself later.

UPDATE 07/04/2014:

PhilZ Touch 6.26.1

Updated NEXT dual boot tool, now we can expand system.img without loosing user data:

Boot into 2nd recovery, nandroid backup /system

Boot into 1st recovery, run dual boot tool from Advanced menu, create larger system.img (2GB, 750MB, or 1GB)

Boot into 2nd recovery, you can reformat /system as ext4 or f2fs filesystem, nandroid restore /system

Only "DELETE 2ND ROM" option completely delete 2nd ROM's system.img and user data.

Credits:

[MENTION=4666971]Phil3759[/MENTION] for PhilZ Touch source and all sources contributors, koush for CWM, CyanogenMod etc

[MENTION=402300]amarullz[/MENTION] for AROMA Installer source and all sources contributors

[MENTION=4196889]DerTeufel1980[/MENTION] for working f2fs backport patch set and all sources contributors, also thanks for Samsung, nowcomputing, etc

[MENTION=5153662]Android-Andi[/MENTION] for initial device tree dual boot recovery integration

[MENTION=3034891]gr8nole[/MENTION] for initial guide how to build Android from source

PhilZ Touch user for feedback, review, donation, etc

Sources:

https://github.com/kumajaya/philz_touch_cwm6/

https://github.com/kumajaya/android_device_samsung_lt01-common/tree/cm-11.0-philz

https://github.com/kumajaya/android_device_samsung_lt01wifi

https://github.com/kumajaya/android_device_samsung_lt013g

https://github.com/kumajaya/android_device_samsung_lt01lte

busybox: blkid: Add Flash-Friendly File System (f2fs) support

e2fsprogs: blkid: Add Flash-Friendly File System (f2fs) support

https://github.com/kumajaya/android_system_vold

How to convert your internal storage to f2fs filesystem:

Make sure your external SD card free space larger than internal storage contents

Full charge your device for safety

Boot into 1st recovery

Select "Backup and Restore" menu

Select "Custom Backup to /storage/sdcard1" menu

Select "Backup data" and "Backup /data/media" only, and then select "Start Custom Backup Job"

Back to main menu and select "Mounts and Storage" menu

Select "format /data and /data/media", select "f2fs" and confirm

Select "format /cache", select "f2fs" and confirm

Back to "Backup and Restore" menu, and then select "Custom Restore from to /storage/sdcard1"

Select "Restore data" and "Restore /data/media" only, and then select "Start Custom Restore Job"

Flash latest NEXT kernel, the only f2fs compatible kernel for now

Back to main menu and select "Power Options" menu, "Reboot recovery"

Boot into 2nd recovery, recovery auto detect /data filesystem format and reformat /cache

Reboot

Above guide also applicable to convert your /system filesystem to f2fs. To keep your /system as f2fs even after a nightly update, reuse attached PhilZ Touch flashable zip's update-binary to replace CM flashable zip's update-binary and change updater-script mount and format command:

mount("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "/system");
package_extract_file("system/bin/backuptool.sh", "/tmp/backuptool.sh");
package_extract_file("system/bin/backuptool.functions", "/tmp/backuptool.functions");
set_perm(0, 0, 0777, "/tmp/backuptool.sh");
set_perm(0, 0, 0644, "/tmp/backuptool.functions");
run_program("/tmp/backuptool.sh", "backup");
unmount("/system");
show_progress(0.500000, 0);
format("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "0", "/system");
mount("f2fs", "EMMC", "/dev/block/platform/dw_mmc/by-name/SYSTEM", "/system");

NOTE:

Non-journaling exFAT filesystem still faster (and widely compatible) than f2fs for SD card. By utilize in-kernel exFAT support, exFAT performance even better than standard CM's exFAT in user space (fuse). For your reference:

https://github.com/kumajaya/android_system_vold/commit/5e70bb7ff266a234891d01ed44661ce75c1e8a25

https://github.com/kumajaya/android_system_vold/commit/20c1f8bbb70ca9ba9266c39689e6ef79b94c9969

https://github.com/kumajaya/android...mmit/7afb06edfbfc71b38b9d81cec3f58c5bf4d17b67

https://github.com/kumajaya/android...mmit/f088a8310b9f5554a75470afbe564cf8a870ae91