yashsingh1/xdaforums huggingface dataset:
[Android Software Development] bigrammy:
Wow Thanks for this carliv :D

I have done as you instructed but sadly everything remains the same as before with the exception that driver.iso is no longer loaded while booted in android.

I am going to try port a new rom to this phone very soon so I will see if this changes anything. :fingers-crossed:

Thanks once again carliv. :highfive:
[Android Software Development] :
Ah, too bad. Probably they turned off that when they built the kernel. Good luck with the port.
[Android Software Development] :
Update

CHANGELOG 23-06-2016:

- complete upgrade for the minimal ui (minui) graphics library;

- upgrade for adb to use fusesideload;

- added usb-otg for backup and restore;

- more cleaning up code;

- some other small fixes and improvements (you can check the github commits).

I know it was few days back the last update but I had some time and I upgraded the minui and adb to the latest sources from CM recovery (12.1 and 13), and I used twrp pixelflinger implementation in minui for fonts mostly, because I still use C header fonts.
[Android Software Development] :
Hi bigrammy,

This could be something interesting for you to read here and here. Maybe it will help you to find a solution to that problem.

:fingers-crossed:
[Android Software Development] kirito9:
[MENTION=5186178]carliv[/MENTION]

Hello carliv, I haven't had much time to do any more builds or even tests for new devices but someone ported the CTR 5.3 you made for me and it works. So my question is, is it okay to share/create a thread with the ported recovery?
[Android Software Development] globula_neagra:
[MENTION=5186178]carliv[/MENTION]

This is the device tree that I`ve edited till now.

https://github.com/globula/device_Archos_ac101cpl

I am not sure if I actually declared all the values properly, and some values in the recovery folder are not edited at all, same for Boardconfig.mk as I did not knew is I should use hex to numerical or not for the partition sizes.

I`ve included the stock boot/recovery to.

Have a look and let me know where I should polish more. Thx.
[Android Software Development] :
Sure :), you don't have to ask that. Anyone was always welcomed to port, to build and to post their result. The only thing I asked was to give the credits since I put a lot of work in this.
[Android Software Development] :
Almost ok :)

I made few changes and now it builds. I already initiated a pull request with the fix.

There are few things though to check with your device:

- I saw the device is a tablet and therefore I changed the resolution as 1280x800 to match the bootanimation, but I know some mtk tablets use portrait display in recovery (check stock recovery) and if this is the case you have to revert those changes;

- the partitions sizes in BoardConfig should be defined in decimals and if those values are right (from scatter or /proc/partinfo or dumchar_info) then it is correct as you did;

- the pixel format is [TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888"] as in my device but that may not be accurate because your device uses probably RGB_565. Test it and if it does not boot in recovery or you see just a black screen either remove that line or change it in [TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"] or [TARGET_RECOVERY_FORCE_PIXEL_FORMAT := "RGB_565"] - see which one works;

- in ctr.fstab I saw you changed blocks partitions paths and I assume they match your device, but sometimes for older mtk platforms (as it is mt8127) those won't work and you have to use linked versions as in fstab (emmc@android or /dev/bootimg and so on) - test and see to find the proper variant.

Since this device doesn't have an octacore CPU I eliminated those definitions from BoardConfig.

Now, as I said, it builds but I don't know if it works - that's your part to deal with from now on.

Cheers, ;)
[Android Software Development] globula_neagra:
Thx, I will have a look in my days off, will let you know how is going.

The tablet uses both ways in displaying the recovery, it just depends on how you hold it :), never seen this behaviour but i've been a while away from the android world so some things might have changed.
[Android Software Development] kirito9:
Thanks :D and I always give credit where it's due ;)
[Android Software Development] kirito9:
You can add these to the list of working devices ;)

[Recovery][LP] CTR v5.3 for Pop C2/C3

[RECOVERY] Carliv Touch Recovery v5.3 for ZTE Blade L3/Digicel DL910

Credits rightfully given.
[Android Software Development] berlin51:
Sweet work,Sir.

Applied to Zopo Speed 7, with latest Android 6 ROM 15 June, & then loaded Beta-superSU v2.71 zip to get root.

Thanks.
[Android Software Development] bigrammy:
Just for info:

I followed your links and did plenty of investigating carliv only to find you were correct with your first suspicion and it is indeed the Kernel :(

I tried a lot rudimentary hacks but to no avail and with no kernel source code I guess I am stuck for the moment unless they allow it in the next update :laugh:

Thanks for the pointers carliv I now know a little more than I did before :good:
[Android Software Development] goldchang:
Great work

Would try to port it to my device
[Android Software Development] globula_neagra:
I tried to build using cm12.0 and the first thing that I bashed in was the missing cm.mk file. Done that and tried to compile using the default recovery files but it fails at some point. On which point I tried with your resources so i renamed the recovery folder and copy pasted your variant.

Here are some logs

http://pastebin.com/w0SNSvSe

Now I am thinking that is something to do with the kernel (I hope) which I unpacked using the classic unpack of the boot images. which gives you a ramdisk and the zimage(renamed the zimage in kernel) Should I use the mtk variant and if yes, I just need to rename the file in kernel ?
[Android Software Development] :
I think it will be better to use cm-12.1, I didn't tested it in cm-12.0. And if your stock kernel is a lollipop 5.0 that doesn't matter it will work with cm-12.1.

The error is easy to solve, just don't delete the stock recovery replacing it with my recovery or other recovery. Add the custom recovery as "recovery-name" next to recovery folder, let's say [recovery-carliv] and make sure to have in BoardConfig the flag RECOVERY_VARIANT := carliv or twrp if you want to build twrp. The renaming folder is required only for cm-13.

And for those find 'src' errors check in my signature the link to my threads and there is one which will help you to get rid of those. In mtk is important to have the offsets arguments for building the recovery image or it won't boot. If those are correct in BoardConfig doesn't matter how you unpacked the boot image.
[Android Software Development] globula_neagra:
[MENTION=5186178]carliv[/MENTION] I finally managed to build a partially functional one, what is not working now:

-the mount points are not defined properly, I can't understand yet how to format the ctr.fstab properly but will have a more in depth look.

-the touch screen option is way of (can it be tweaked from that touch sensitivity option ?) though I can use the hardware buttons ok, is there like an option to disable the touch screen option ?

I tried to build the twrp version, but it stops after 2 min of compiling, the cwm builds ok but when I flash and boot in the recovery, nothing is displayed(the backlight is on)
[Android Software Development] :
For ctr.fstab you need to change the device blocks probably. They are like in my device but this is a 64bit platform and yours is an old 32bit one. I told you before, that you need to change these [/dev/block/platform/mtk-msdc.0/by-name/cache] with something more like this [/dev/block/mmcblk0px] or [emmc@cache] which one is working. I don't have a phone with old layout and CPU to test it so you need to figure out by yourself. Ah and also if the phone has the old layout for emmc partitions (like boot is /dev/bootimg, recovery /dev/recovery, and so on you need this flag too on BoardConfig: BOARD_NEEDS_MTK_GETSIZE := true).

For touch accuracy the minimal value is 3. Change it in system.prop and test to see what is the right value (probably a 5 or 6 will be ok).

I also noticed some changes in device tree you made. The RGB_565 is the right value not RGBA_565 (this rgb version doesn't have an alpha channel).
[Android Software Development] globula_neagra:
that's the thing, I tried in all the possible ways till now, I am running out of ideas :))

[/dev/block/mmcblk0px] or [emmc@cache] tried them both

but probably is something to do with

BOARD_NEEDS_MTK_GETSIZE := true

WIll try later on today

Thx for the help

LE:

Do you think that the rgba_565 option has something to do with the cwm not being visible ?

Starting recovery on Mon Jul 4 02:41:24 2016

setting DRM_FORMAT_RGB565 and GGL_PIXEL_FORMAT_RGB_565

fb0 reports (possibly inaccurate):

vi.bits_per_pixel = 32

vi.red.offset = 16 .length = 8

vi.green.offset = 8 .length = 8

vi.blue.offset = 0 .length = 8

setting GGL_PIXEL_FORMAT_BGRA_8888

double buffered

framebuffer: 0 (800 x 1280)

cannot open LCD backlight: No such file or directory

cannot open LCD backlight: No such file or directory

Using fbdev graphics.

Carliv Touch Recovery v5.6 ** Android 5.1.1

Compiled by globula@glob on: 2016-07-04

E:bad option "ro"

E:skipping malformed recovery.fstab line:

/emmc@android /system ext4 ro

This is how the recovery logs looks.

Le:2

Finally managed, the ctr.fstab looks like this now

/boot	emmc	/dev/block/mmcblk0p2

/cache	ext4	/dev/block/mmcblk0p6

/recovery	emmc	/dev/block/mmcblk0p3

/system	ext4	/dev/block/mmcblk0p5

/data	ext4	/dev/block/mmcblk0p7

/internal_sd	datamedia	/dev/null

/sdcard	vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1	lun=sys/class/android_usb/android0/f_mass_storage/lun/file

/usb-otg	auto	/dev/block/sda1	/dev/block/sda

# MTK partitions define

/uboot	emmc	/dev/block/platform/mtk-msdc.0/by-name/lk

/logo	emmc	/dev/block/platform/mtk-msdc.0/by-name/logo

/nvram	emmc	/dev/block/platform/mtk-msdc.0/by-name/nvram

/nvdata	ext4	/dev/block/platform/mtk-msdc.0/by-name/nvdata

/secro	emmc	/dev/block/platform/mtk-msdc.0/by-name/secro

/metadata	emmc	/dev/block/platform/mtk-msdc.0/by-name/metadata

I am still not sure if I should define the rest of the partitions (the secro/lk/logo/etc) as they normally don`t appear under /dev/block/platform/mtk-msdc.0/by-name, I do have them backed up using the SP flash tool.

The boot.img partition is not yet dumped correctly, tough by looking in the attempts to dump it, I found that in some moments I did managed to do it, just have to find out which combination :).
[Android Software Development] :
Well, your device has an old CPU layout and it doesn't have a 32bit framebuffer. You have to use either this flag TARGET_RECOVERY_FORCE_PIXEL_FORMAT := "RGB_565" or to not use a pixel flag at all and let the recovery detect it. For partitions you have to define them as they are in your phone. Check the /proc/dumchar_info file to see what are the partitions and also the /dev/block/ folder for links. If this is as I think you have the old /boot as /dev/bootimg type of layer and probably the lk is uboot, secro is sec_ro and you don't have a nvdata and metadata partition. I'm not sure because I don't have the device but if this is the case you won't be able to backup or restore with that fstab.

If you want to use some options you need to add them as fs_options=ro not just ro because this is a fstab version 1.

Maybe it is useful to study the lenovo p780 device and alcatel popc2 from my github. First is for kitkat but has the old layout cpu and it can give you some ideas about fstab and second is for lollipop also for an older CPU, modified by me, and it boots and works.

Also the BOARD_NEEDS_MTK_GETSIZE := true flag has to be used with BOARD_HAS_MTK_CPU := true.
[Android Software Development] globula_neagra:
Yesterday I managed to dump the files, the recovery works in terms of dumping the files, but not to restore them.

This is how the fstab looks now

/boot emmc /dev/bootimg

/ebr1 emmc /dev/ebr1

/cache	ext4	/dev/block/mmcblk0p6

/recovery emmc /dev/recovery

/system	ext4	/dev/block/mmcblk0p5

/data	ext4	/dev/block/mmcblk0p7

/internal_sd	datamedia /dev/null

/sdcard	vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1	lun=sys/class/android_usb/android0/f_mass_storage/lun/file

/usb-otg	auto	/dev/block/sda1	/dev/block/sda

This is the scatter file which does contain pretty much all the "classic" partitions that I've seen in other mtk`s phones except the nvram

PRELOADER 0x40000

MBR 0x0

EBR1 0x80000

PRO_INFO 0x100000

NVRAM 0x400000

PROTECT_F 0x900000

PROTECT_S 0x1300000

SECCFG 0x1d00000

UBOOT 0x1d20000

BOOTIMG 0x1d80000

RECOVERY 0x2d80000

SEC_RO 0x3d80000

MISC 0x4380000

LOGO 0x4400000

EXPDB 0x4700000

TEE1 0x5100000

TEE2 0x5600000

KB 0x5b00000

DKB 0x5c00000

FRP 0x5d00000

ANDROID 0x5e00000

CACHE 0xa5e00000

USRDATA 0xcde00000

I`ve added the line BOARD_NEEDS_MTK_GETSIZE := true, i don't remember if I actually updated it on the github. I will have a look in the next days over the the alcatel and lenovo stuff.

I was thinking that you could add a option in the recovery, where you can edit the prop and alter the sensitivity from the recovery, rather than recompile or unpack the recovery image to edit the value every time :)
[Android Software Development] :
I think for touch accuracy I explained everything on building instructions. If the device has a low lcd density the value should be lower. The precision is not that fine to make a difference if you use 5 or 7, so the value on system.prop can be set once or twice until it's found the right one. No need to write so much extra code for something that will be used only once per device.

About the other stuff I'm afraid you have to figure out by yourself how to fix the issues since I don't have the device and the recovery works for other similar devices.
[Android Software Development] DeadSquirrel01:
Anyone tested it on snapdragon?

---------- Post added at 12:13 PM ---------- Previous post was at 11:48 AM ----------

Hi carliv :),

first of all thanks for your magnific recovery and for your hard work. I don't know if u remember me, but i find the reason for the gui that doesn't start. Examining the log, i found this:

I:Checking for extendedcommand...

display_frame failed, no overlay

: No such file or directory

I:Skipping execution of extendedcommand, file not found...

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

Vibrate on touch: Enabled

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: No such file or directory

Rebooting...

display_frame failed, no overlay

: No such file or directory

display_frame failed, no overlay

: File exists

And i found I have to remove that line from BoardConfig .mk:

TARGET_USES_QCOM_BSP

EDIT: It doesn't work

I've read this: http://xdaforums.com/showthread.php?t=2599797&page=9, he had the same problem I had. Any ideas?
[Android Software Development] :
Update

CHANGELOG 05-07-2016:

- fix loading the graphical ui for qcomm devices;

- added cancel backup feature (use power button or select from virtual keys);

- fix display of progress while backup, restore or install;

- some other small fixes and improvements (you can check the github commits).
[Android Software Development] :
On my github there is a device tree for huawei kiwi which is also a qcomm device. It builds and boots with graphics UI so you should take a look what I changed for that in my commits, you don't have to remove any parts from recovery just to use some flags (like USE_NEW_ION_HEAP to get rid of that error). Also, for pixel format remove that line and let the recovery to detect it.
[Android Software Development] DeadSquirrel01:
OK, i'll take a look, and I tell you if I resolve the problem :)
[Android Software Development] :
I already told you to focus on building a functional twrp and after that you will be able to build this too. The huawei kiwi(qcomm) was having before a device tree that could build a functional twrp and I just added few things to build my recovery too.

If you can't build a functional twrp then your device tree is the problem (maybe the kernel, maybe something else). Another thing, until the JB the kernel in recovery wasn't in direct link with the building environment OS version, but starting with kitkat, because of selinux and healthd it is now. So if you have a kitkat kernel it won't start a lollipop or marshmallow recovery.

And the last thing, I see in you BoardConfig a custom ui file (don't know what's in it since you don't share your device tree on github), and that could breack the ui too because the recovery default one is important for it and is not recommendable to change it. I'll remove the option for custom ui file in next version since it's useless, to not mess with the ui.

This is the last answer to you. I won't help anymore people that don't share their source on github and expect only to take or receive from others.
[Android Software Development] globula_neagra:
[MENTION=5186178]carliv[/MENTION] finaly managed to sort the recovery it s functional on the side of zip install backup/restore. The touchscreen is still off. Will try to fix by creating 20 rec with the prop modified. I've used the files related with mtkboot.img and added some extra flags that you mentioned in the boardconfig.

I have updated most of the things on gihub in case you want to have a look.
[Android Software Development] :
Well, good for you :)

I noticed in your BoardConfig the flag Board has type B protocol. Your device has a synaptic touch panel and you saw in source code that flag defined? Because if it is not the case then that can cause the off touch issue. That flag shouldn't be used just "in case".
[Android Software Development] globula_neagra:
I added that in the last build just to see if it makes any diference but nothing changed. In the worst case is there a way to disable the touch?
[Android Software Development] DeadSquirrel01:
Hi [MENTION=5186178]carliv[/MENTION], I'm still here :D.

Probably you think I'm here because I need help, but I finally managed to get your recovery working and I'm here because I want to say you thanks for your very hard work (I know without a team is very difficult developing a recovery...) and for anyone who get the recovery that works but the UI won't start, symply comment out "TARGET_USES_QCOM_BSP" with "#TARGET_USES_QCOM_BSP" and if it doesn't work (such as in my case) remove qcom-common folder in device/samsung and all of his dependencies from BoardConfig.mk and other files in the device tree.

So, Carliv thank for your recovery and... for your help :highfive:

PS: Now that the recovery works, I can upload my device tree on github :D

PPS: can I remove compiled by "root@Kali" with another name?
[Android Software Development] globula_neagra:
Just change your name in ubuntu
[Android Software Development] globula_neagra:
You could try something like

/internal_sd	datamedia /dev/null

instead of

/sdcard	datamedia /dev/null

LE: actually I just noticed that you have a qualcomm, try to define the internal storage as it in the original recovery fstab and see if it works. What is above applies to mtk devices not qualcomm.

[MENTION=5186178]carliv[/MENTION] while was keep trying to investigate what is actually happening with the touch, I noticed that is inversed. So when I press on the top, the tablet seems to think that is actually the bottom (the recovery is in portrait mode). What can I do about it ?
[Android Software Development] DeadSquirrel01:
If I use internal_sd instead of sdcard, it doesn't work at all, but regarding your problem, maybe you set for example 777x888. Try changing to 888x777
[Android Software Development] globula_neagra:
Did that long ago. :)
[Android Software Development] DeadSquirrel01:
I don't know much about recoveries, but can u post you device tree sources?
[Android Software Development] globula_neagra:
It`s here

https://github.com/globula/device_Archos_ac101cpl
[Android Software Development] DeadSquirrel01:
It seems OK to me, maybe try to reduce touch accuracy in system.prop for example to 7-9 to see if it's the problem

EDIT:

Try to change "TARGET_CPU_VARIANT := cortex-a7" to "TARGET_CPU_VARIANT := generic" and remove the line "TARGET_ARCH_VARIANT_CPU := cortex-a7", too

EDIT 2:

If it doesn't work post the log (u can find it in cache/recovery)
[Android Software Development] :
The problem is not in your setup. It is correct as you formated the ctr.fstab assuming that the internal storage is linked to /data/media. There is a bug in recovery when you backup on internal storage. I fixed that but couldn't find time to push the fix on github. Stay tuned, maybe tomorrow I can do it.

Ah, for that you can play around with:

RECOVERY_TOUCHSCREEN_FLIP_X := true
RECOVERY_TOUCHSCREEN_FLIP_Y := true
RECOVERY_TOUCHSCREEN_SWAP_XY := true

I don't know the exact combination, but try first these two together:

RECOVERY_TOUCHSCREEN_SWAP_XY := true
RECOVERY_TOUCHSCREEN_FLIP_Y := true
[Android Software Development] DeadSquirrel01:
thanks carliv :)
[MENTION=1862539]globula_neagra[/MENTION] I hope you fix your problem :fingers-crossed:
[Android Software Development] kirito9:
Hey [MENTION=5186178]carliv[/MENTION]. I compiled CTR 5.7 with AICP sources and the same device tree but still no vibrate even though it's enabled.

VIBRATOR_TIMEOUT_FILE := /sys/devices/virtual/timed_output/vibrator/enable

Could it be the kernel/device preventing vibration from working in recovery? Vibration doesn't work in TWRP either. If you want my kernel source then say and I'll upload it. Thanks.

EDIT: I just found out that this boots on KK kernel which is strange. I can make a backup but the only thing is the mount points. I changed them in the fstab but it didn't work. Maybe it's because it's designed only to work with LP kernel?
[Android Software Development] :
For kk you have to change more things to make it work not just mountpoints: first all selinux related files then if still doesn't work ueventd (with some other files from a kitkat recovery). But I didn't tried ever that.

For vibration you have to check in dmesg why it's not working in recovery but in android does. And so you will see if it's the kernel or not.
[Android Software Development] kirito9:
Ok, thanks. I'll try that KK mod first then the vibration. Sorry but I'm not familiar with the dmesg command, but I'll search on google how to use.

---------- Post added at 01:31 AM ---------- Previous post was at 01:00 AM ----------

After replacing the following files ueventd.rc, sepolicy, seapp_contexts and file_contexts, recovery works as it should on KK kernel. Now I just have to edit mountpoints for internal and external sdcard.

This probably won't work with all KK kernels right? So no need to create a separate thread for it.

[MENTION=5186178]carliv[/MENTION]
[Android Software Development] globula_neagra:
I am brain dead after over 100 attempts to make the touch screen work. I even compiled twrp which compiles ok and everything seems to work fine except the touch, which works only if the tablet goes in standby (the screen wakes up upon touch but that's it, not other reaction besides that)

Any other suggestions ? :)
[Android Software Development] kirito9:
Hmm, maybe it's the kernel? Not all kernels work with touch. If you can navigate with buttons why use touch? :')
[Android Software Development] globula_neagra:
That's the thing, If I could I would disable the touch module, would be perfect.

It`s either working or not, I can't have it like this, and at some point while I am flashing something to get the whole system formated just because I pressed the screen by mistake.

I am thinking that I might need a custom graphics.c file that might address the touch problem.