FORUMS
Remove All Ads from XDA

[RECOVERY] Carliv Touch Recovery v5.7 and v6.6

1,027 posts
Thanks Meter: 5,053
 
By bluefirebird, Senior Member on 30th May 2016, 09:30 PM
Thread Closed Email Thread
DISCLAIMER:
Rooting your phone and using custom Recoveries and ROMS have risks and may result in bricking your device, and has nothing to do with Google or the device manufacturers. In case of any mishap I am not responsible if you brick/ruin your phone in any way.
Basic computer skills are required and minimal knowledges about phones and phones utilities too.
Make sure that whatever you do, you are doing it at your own responsibility.



Carliv Touch Recovery

- version 5.7.2 is for Lollipop (cm 12.1, aicp lp or resurrection remix lp) and version 6.6 is for Marshmallow (cm 13, aicp-mm or resurrection remix mm).
The version starting number is related to android version.

This is a CWM based recovery and I did put up some work to update it to lollipop (cm 12.1) and marshmallow (cm-13) after official cwm development stopped at kitkat. It works with LOLLIPOP and MARSHMALLOW kernels and it builds with cm 12.1, aicp lp or resurrection remix lp (version 5.7) and with cm 13, aicp-mm or resurrection remix mm (version 6.5).
This is for those who want a lighter and simpler recovery or they just liked CWM before. It's not as good or complex as twrp, but it will do the job just fine.
For gui I ported PhilZ Recovery full touch module.
Because the vold in cm 12.1 and 13 doesn't support cwm anymore I had to use the old fstab1 type for functionality, although for building reason a valid recovery.fstab should be provided in device tree. In the third post there are some building hints to make it clear for those who want to try building it.

Features:
- EXT4 and F2FS support (for f2fs use the BoardConfig flag).
- full touch menu ported by me from PhilZ touch Recovery. The old Napstar-xda touch module was good but it's quite old and to update that was too much work. Actually There is a version 4 with that touch module, all working, but the touch doesn't work with some input drivers and I had to give up on it for the new and improved version from PhilZ.
- all cwm functionalities are up and working (adb, sideload, backup, restore, install, mass storage...). There is no mtp and if your phone doesn't have an external sdcard you can't connect it to PC while is in recovery mode. But there is usb-otg support, of course if your phone was shipped with that.
- added new menu for backup and restore advanced, to use it for backing or restoring only a specific partition and I also ported from PhilZ the multizip flashing function.
- in Carliv menu there is now a new section for flashing boot and recovery images. It is a feature that I needed during many recovery builds testing. I wanted an easier way to flash other image without booting to android and using an app like RashR. You can browse your storage locations for any image and after choose you will have to select on wich partition should that be flashed. I added multiple confirmations check to avoid flashing on wrong partition. This feature works only with boot and recovery images. I won't add other partitions to this because for other things there are multiple backup restore functions.
- for MTK phones (if the flag is used in Boardconfig) there is a new menu to backup and restore some important partitions like uboot, nvram an secro because they are involved in restoring a lost IMEI, and also the logo partition which may often get broken by bad ported ROMs.
- besides these all my old specific menus (aroma, rainbow...) are still in place.
- added support for dencrypting and mounting data partition using the builtin minivold from cyanogenmod with vdc commands (the ideea came from this post of Lekensteyn). Tested and working well with text ar hex passwords, and maybe will work with pin too but I don't think it will work with pattern .
- added support for dencrypting and mounting adopted storage in marshmallow. The solution is based on this article of nelenkov.
- there is no included root solution. I choose to do it this way because there is no universal root solution now and someone may end up messing things with a non-working root option. You can flash a zip installer from Chainfire's SuperSu or other solution that may work for your phone.

All screenshots are made with my old tool from here (still working well).

CREDITS:

The biggest thanks go to AP756 and DerTeufel1980, two friends from Germany, who sent me a new phone each, with lollipop OS and that helped me a lot to do this.

- Phil3759 for the touch code and many other things from his recovery;
- TWRP developers. I learned a lot from their work;
- Clockworkmod Team starting with Koushik Dutta and ending with all developers that made the CWM recovery what it was;
- Cyanogenmod Developers;
- Nikolay Elenkov;


In next post there are some links for built recoveries. I'll add more soon as I get a valid link (on a reliable webhost) from people who build it for other phones.

I worked alone on this, there is no team here, not because I don't want to , but probably because there was no one interested in this, and so there may be some unspotted bugs. If you find any please do tell me to help on fixing it.

XDA:DevDB Information
Carliv Touch Recovery, Tool/Utility for all devices (see above for details)

Contributors
carliv


Version Information
Status: Stable
Current Stable Version: 5.7.3 & 6.6.1
Stable Release Date: 2016-07-19

Created 2016-05-30
Last Updated 2016-07-19
The Following 26 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
 
 
30th May 2016, 09:30 PM |#2  
bluefirebird's Avatar
OP Senior Member
Thanks Meter: 5,053
 
More
Changelog and working builds
CHANGELOG 19-07-2016:
- fix backup for old mtk phones.

Lollipop
1. Jiayu S3+
2. Zopo Speed 7+
3. Zopo Speed 7
4. Mlais Mx Base
5. Alcatel Pop C2/C3
6. ZTE Blade L3 / Digicel DL910
7. Nous NS5511

Marshmallow
1. Zopo Speed 7+
2. Zopo Speed 7+ with adopted storage
3. Zopo Speed 7
4. Zopo Speed 7 with adopted storage
* NOTE: sadly the kernel source for zopo marshmallow isn't published so these two don't have touch in recovery, but you can use them as in CWM with phone buttons.

[*] QCOMM devices:
1. Huawei Honor 5x (kiwi)
2. Samsung Galaxy A5 (SM-A500FU)
Attached Files
File Type: zip AromaFM_Install.zip - [Click for QR Code] (1.61 MB, 1634 views)
The Following 14 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
30th May 2016, 09:30 PM |#3  
bluefirebird's Avatar
OP Senior Member
Thanks Meter: 5,053
 
More
Building Guide
To build you need a local repo of cm-12.1 or cm-13 and a proper device tree. To see how a buildable device tree looks check this one from my github.
It builds out of the box with aicp lp-5.1 and aicp mm-6.0 too, but like in cm you need a proper device tree.

Some things to be considered:

For BoardConfig:
- the most common thing in all BoardConfig I saw (you need this to use power button to select if you use physical buttons in some situations)
Code:
- BOARD_HAS_NO_SELECT_BUTTON
- for the graphical interface
Code:
- TARGET_RECOVERY_PIXEL_FORMAT
- for mass storage if your phone has an external sdcard, to connect it to PC (this one can be specified in fstab too) - and it has to be without any quotes or slashes
Code:
- TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/mt_usb/musb-hdrc.0.auto/gadget/lun%d/file
- for LCD backlight lights - and it has to be without any quotes or slashes
Code:
- TARGET_RECOVERY_LCD_BACKLIGHT_PATH := /sys/class/leds/lcd-backlight/brightness
- for vibrator feature - and it has to be without any quotes or slashes
Code:
- VIBRATOR_TIMEOUT_FILE := /sys/devices/virtual/timed_output/vibrator/enable

- with link to a valid recovery.fstab version 2 (it may work without it but it is better to be here)
Code:
- TARGET_RECOVERY_FSTAB
- for a better readability adapted to your screen (check the minui folder for more fonts)
Code:
- BOARD_USE_CUSTOM_RECOVERY_FONT
Carliv Touch Recovery specific flags:
- if you have the recovery on recovery-carliv folder under bootable directory in cm-12.1 source use this next flag.
Code:
- RECOVERY_VARIANT := carliv
NOTE: in cm 13, and other android 6 sources too, you can't build with this flag out of the box and so you have some things to do - the easy one is to rename recovery folder in [recovery-stock] and to place my recovery next to that with the name [recovery]. Other option is to open Android.mk from /sytem/core/healthd and find line 58 where you need to replace [LOCAL_C_INCLUDES := bootable/recovery] with [LOCAL_C_INCLUDES := $(call project-path-for,recovery)].

- with your phone resolution like this width x height
Code:
- DEVICE_RESOLUTION := 720x1280
- if you want to use it with encrypted phone (it work with a non encrypted phone too but it will be smaller if you don't need decrypting function)
Code:
- BOARD_INCLUDE_CRYPTO := true
- if your phone is MTK powered you need this for the MTK menu (it is not mandatory though with the mtk phones shipped with lollipop or marshmallow)
Code:
- BOARD_HAS_MTK_CPU := true
- for touch menu, if your phone has an input driver with PROTOCOL_TYPE_B (synaptic is an example, or many samsung devices); if you have access to, check your kernel input driver for something like this [#define PROTOCOL_TYPE_B] - google it if you want to know more about this
Code:
- BOARD_USE_PROTOCOL_TYPE_B := true
- to block an input device use
Code:
- TOUCH_INPUT_BLACKLIST := "devicename"
- if you use Adopted Storage
Code:
- BOARD_USE_ADOPTED_STORAGE := true
For system.prop from device tree:
Code:
#
# system.prop for mx
#
ro.ctr.crypto.passwd="64656661756c745f70617373776f7264"
ro.ctr.forbid_format=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.forbid_mount=/frp,/persistent,/lk,/uboot,/logo,/metadata,/nvdata,/nvram,/secro
ro.ctr.touch_accuracy=7
- to use decrypt data specify here your password (ro.ctr.crypto.passwd); I forgot to mention that if the phone uses encryption, the recovery will start with few seconds delay, because of the decrypting and mounting data process. If the message will tell you that couldn't be decrypted it is possible that your password was wrong or it uses an unsuported type of password. To be sure just restart the recovery from Power menu and if you still get the same message then you need to check your provided password from system.prop or to find a different solution (other recovery like twrp). If you want to decrypt your phone for good you need to format data and data media from Mount/Storage menu but you will loose your data (settings, preferences).
- ro.ctr.forbid_format and ro.ctr.forbid_mount are for partitions from fstab that you don't want to be shown in Mount/ Storage menu with mount and format option (coma separated, no spaces and with leading slash), like in my example above.
- ro.ctr.touch_accuracy to improve the touch handling (bigger lcd_density = bigger accuracy); the initial value is 7, just like in PhilZ Recovery, and I reccomend you to try different numbers to see what is right for you, but don't go over 19.
All these system.prop lines are not mandatory.

Carliv Touch Recovery uses a fstab version 1 named [ctr.fstab] and you have to create a folder recovery in your device tree, in that recovery folder create a new folder named root, in root folder another folder named etc and in that one place the ctr.fstab. Like this:
Code:
recovery/root/etc/ctr.fstab
That will be enough since the compiler will add it in recovery ramdisk and the recovery module will find it in etc folder.
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

# mount point	fstype    device    	[device2]    fs_options    [fs_options2]    lun

/boot			emmc	/dev/block/platform/mtk-msdc.0/by-name/boot
/cache			ext4	/dev/block/platform/mtk-msdc.0/by-name/cache
/recovery		emmc	/dev/block/platform/mtk-msdc.0/by-name/recovery
/system			ext4	/dev/block/platform/mtk-msdc.0/by-name/system  fs_options=rw
/data			ext4	/dev/block/platform/mtk-msdc.0/by-name/userdata  fs_options=rw
/internal_sd	datamedia	/dev/null
/sdcard			vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1   lun=sys/class/android_usb/android0/f_mass_storage/lun/file
Important here is how you define internal storage which is data media
Code:
/internal_sd	  datamedia	/dev/null
You can see It's used the old way with "datamedia" fstype and /dev/null device.
Important thing: if you have only internal storage define it as
Code:
/sdcard   datamedia	/dev/null
If you have also an external sdcard, use either way:
Code:
/internal_sd	   datamedia	/dev/null
/sdcard			vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1
or
Code:
/sdcard 	datamedia	/dev/null
/external_sd		vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1
If you are using the adopted storage feature for external sd card, define this
Code:
/data_sd ext4 /dev/block/mmcblk1p2 fs_options=adopted
and remove or comment out the line for external sd card.
You can see the internal storage can be sdcard or internal_sd and external sdcard can be sdcard or external_sd, but internal storage can't be external_sd or external sdcard internal_sd.
If your phone has OTG support you can use that too defining it like this
Code:
/usb-otg		vfat	/dev/block/sda1	/dev/block/sda
or this
Code:
/usbdisk		vfat	/dev/block/sda1	/dev/block/sda
-check with your phone booted up in Android and a OTG USB mounted to see in [/sys/class/block] or [dev/block] how to set device for this (the dev/block/sdx part).
The recovery has fat32, exfat and ntfs support builtin (also f2fs for file system). You can define your usb-otg and/or external sdcard as "auto" instead of "vfat" and it will work with any of these formats. I tested a portable HDD self powered and it works (120 GB) as usb-otg. Anyway that is available only for zip and image flashing. Maybe I'll make it to work for backup and restore too.
The Following 11 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
3rd June 2016, 08:29 PM |#4  
kirito9's Avatar
Recognized Contributor
Thanks Meter: 1,337
 
More
@carliv is back!!! Thanks a lot for this.

Should I port or should I build?
4th June 2016, 07:34 AM |#5  
bluefirebird's Avatar
OP Senior Member
Thanks Meter: 5,053
 
More
Quote:
Originally Posted by kirito9

@carliv is back!!! Thanks a lot for this.

Should I port or should I build?

You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.
The Following 7 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
4th June 2016, 08:34 AM |#6  
faizauthar12's Avatar
Recognized Developer / Contributor
Flag Jakarta
Thanks Meter: 2,641
 
Donate to Me
More
Quote:
Originally Posted by carliv

You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.

I will wait for cm13 support
Anyway this recovery support arm64?
4th June 2016, 08:35 AM |#7  
Member
Thanks Meter: 30
 
More
Sure. Look at the phones already supported

Gesendet von meinem HERO1 mit Tapatalk
The Following 2 Users Say Thank You to AP756 For This Useful Post: [ View ] Gift AP756 Ad-Free
4th June 2016, 02:55 PM |#8  
kirito9's Avatar
Recognized Contributor
Thanks Meter: 1,337
 
More
Quote:
Originally Posted by carliv

You should build it of course. I won't make porting recoveries anymore.
Actually wait for a day or two because I'm working on some improvements and I'll push them to github soon.
Also I have a working version for cm13 too. That also need some more tests before release.

Goood xD. No more complaints from users who "brick" their devices and blame you
4th June 2016, 08:41 PM |#9  
bluefirebird's Avatar
OP Senior Member
Thanks Meter: 5,053
 
More
All things are mostly done.
Just a little heads up: Added usb-otg support for install zip menu - should work with ntfs, fat, exfat and fat32 usb flash drives (I tested only with fat32). Other improvements too for both versions (lollipop and marshmallow).
I'll push the source tomorrow.

Attached a screenshot of the recovery for marshmallow (cm13).
Attached Thumbnails
Click image for larger version

Name:	recscreen_04_223340.png
Views:	730
Size:	48.5 KB
ID:	3772593  
The Following 6 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
4th June 2016, 09:09 PM |#10  
BouyaPK's Avatar
Member
Flag Phuket
Thanks Meter: 40
 
Donate to Me
More
Thanks to Master

Sent from my Lenovo A7010a48 using XDA-Developers mobile app
The Following User Says Thank You to BouyaPK For This Useful Post: [ View ] Gift BouyaPK Ad-Free
5th June 2016, 04:36 PM |#11  
bluefirebird's Avatar
OP Senior Member
Thanks Meter: 5,053
 
More
Thread updated with instruction and links for the new version for cm-13 and the version for lollipop is upgraded to 5.2.
If some of you build a working recovery and want to share here the link, just post a replay and I'll add it in post #2.
If you have a buildable device tree public on github and want a recovery built for it ask here and maybe I or someone else will do it in some free time.
The Following 2 Users Say Thank You to bluefirebird For This Useful Post: [ View ] Gift bluefirebird Ad-Free
Thread Closed Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes