[Android Software Development] Phil3759:
Developers info: ** New: you can now build full version from my git sources **

You can also try to get support on IRC on freenode: #PhilZ-Touch (thanks [MENTION=5165022]Bhargav97[/MENTION])

You can fetch source from this link (cm-11.0 branch):

https://github.com/PhilZ-cwm6/philz_touch_cwm6

I no longer maintain the older branches

Before you start, make sure you can build stock cwm from cm-11.0 source

Once you can build stock CWM, just replace your bootable/recovery folder with this one and lunch for your device

Device tree changes examples:

They are minimal and detailed below

You can see a few examples from here:

device tree

: https://github.com/PhilZ-cwm6/philz_touch_cwm6_device_vendor/tree/cm-11.0

vold exfat/ntfs/f2fs kernel support

: https://github.com/PhilZ-cwm6/android_system_vold/tree/cm-11.0

selinux extensions for extra partitions

: https://github.com/PhilZ-cwm6/android_external_sepolicy/tree/cm-11.0

To avoid modifying BoardConfig.mk and device.mk for all devices I support, I modified the build makefile:

https://github.com/PhilZ-cwm6/android_build/tree/cm-11.0

Those are the only optional changes to get all features of this recovery mod.

To use f2fs/exfat/ntfs kernel support, you should learn how to modify the kernel too. Else, skip the vold changes and flags (see below details)

Optional PhilZ Touch extra flags:

The below info are optional. You should still be able to build without editing anything in device tree

bootable/recovery/boardconfig/BoardConfig.mk

It is a quick mode to add device specific tags without altering device tree. That way I can spot needed changes easier.

# Info on some tags:

- KERNEL_EXFAT_MODULE_NAME: This will force minivold to use much faster kernel modules instead of slow fuse
it will only work if you have modified vold sources (contact me for info)
you'll also have to copy modules to ramdisk and load them in init.rc or a loader script
you need either an exfat enabled prebuilt kernel or to compile exfat modules along kernel
you also need to patch minivold: [url]https://github.com/PhilZ-cwm6/android_system_vold[/url]

- KERNEL_NTFS_MODULE_NAME:
Same as above, but for ntfs.

- TARGET_USERIMAGES_USE_F2FS := true
will enable f2fs support and ext4 <-> f2fs conversion and backup migration
obviously you need to add f2fs support into the kernel
read about the extra.fstab use to use specific and distinct f2fs and ext4 mount options
else, it will drop to bare minimal ext4 or f2fs mount options if not defined in recovery.fstab

- BOARD_USE_MTK_LAYOUT := true
will enable backup/restore of boot, recovery and uboot partitions on MTK devices

- BOARD_MTK_BOOT_LABEL := "/bootimg"
This flag is optional, it is used only if BOARD_USE_MTK_LAYOUT is defined
If not defined while previous flag is enabled, default boot label is assumed "/bootimg"
Else, it is assigned the defined value
In fstab.device used by recovery (recovery.fstab), boot mount point must be the same as what we
define in label
It is also mandatory that it is defined to real device label (cat /proc/dumchar_info)
Partition size is grabbed during backup/restore from /proc/dumchar_info
uboot label is defined as "/uboot". It is automatically backed-up/restored with boot and recovery
recovery label is always assumed to be "/recovery"

- BOARD_HAS_LOW_RESOLUTION:
(optional) for all devices below 1024x768 resolution.
it forces default touch sensitivity to a lower value. It can be altered in GUI Settings

- BOOTLOADER_CMD_ARG:
This will override ro.bootloader.mode. Mostly used for Samsung devices to access download mode

- TARGET_COMMON_NAME
The device name that will be displayed on recovery start and in About dialogue

- BRIGHTNESS_SYS_FILE:
Needed to be able to alter screen brightness

- ro.cwm.backup_partitions:
this can be set on boot or during compile into default.prop. exp in device.mk:
PRODUCT_PROPERTY_OVERRIDES += \
ro.cwm.backup_partitions=/modemst1,/modemst2,/devlog

it will add support to backup/restore those partitions in nandroid custom jobs provided they are also defined in recovery.fstab

device/brand/phone_name/device.mk

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/extra.fstab:recovery/root/etc/extra.fstab

extra.fstab documentation:

* Needed until fs_mgr_read_fstab() starts to parse blk_device2 entries

* extra.fstab sample:

# add here entries already existing in main device fstab, but for which you want a blk_device2, fs_type2 or fs_options2
# mount point must be the same, mmcblk device must be your device true path
# you can set the f2fs mount options for partitions you want to be able to toggle between f2fs/ext4
# it will enable faster transfer speed for devices supporting usb mount storage
# makes it possible to partition vold managed storage (sdcard/usb disks) and format it to ext2/ext3
# used also to stat for size of mtd/yaffs2 partitions

# blk_device2 # mount_point fs_type2 fs_options2 flags (not used in extra.fstab code)
/dev/block/mmcblk0p28 /storage/sdcard0	auto	defaults	defaults
/dev/block/mmcblk1p1	/storage/sdcard1	auto	defaults	defaults
/dev/block/sda1	/storage/usbdisk0	auto	defaults	defaults
/dev/block/mmcblk0p30	/data	f2fs [options]	[flags]

If it doesn't build or errors, post log/error here and I will help if I can

Adding

Full

PhilZ Touch version support for your device

Missing sources in my github:

none, it is all open source now

- all gui options, include touch code

- Create Update.zip from current ROM or from pre-existing backups

- However, they are all enabled through the new libtouch_gui library. Just set your flags and compile it

Will libtouch_gui sources published?

They are open source now

Not for now. Why?

Answer: in this post

Can I include and use your libtouch_gui in my recovery mod ?

You are welcome, but:

- do not reverse code

- do not binary edit it

- add credits in your code

- do not remove credits headers from sources and give proper credit in your thread site

- post a link to this thread on your site/thread

- push fixes to my github if you find bugs that you fix or if you add new features