yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] Santhosh M:
These two as well ( same result )
[Miscellaneous Android Development] bigrammy:
Just to confirm it's the same for me :eek:

Test 4 = boot to logo hangs and then reboots to system.

Test 5 = Same as above.
[Miscellaneous Android Development] xenonism:
Quick question, sorry if the answer is everywhere but I can't seem to find it. How do I enter fastboot mode? I only manage to get to Factory Mode (V+ + POW) or Recovery (V- + POW). Thanks!

Edit: Nevermind, I managed. My problem now is to actually write the Recovery: all methods I know failed hinting that they're not supported by the device. What is the working method, please? :)
[Miscellaneous Android Development] :
A last try today:

test6

test7

test8
[Miscellaneous Android Development] bigrammy:
Test 6 = Same as before :(

Test 7 = boot logo then black screen for a second or two then back to logo then reboot to system. :)

Test 8 = As above :confused:

I am trying to port a rom without much success either :laugh:
[Miscellaneous Android Development] HypoTurtle:
Same here - what I've tried with the above:- with 8 changed header (first 2k) with stock recovery - still black-screen/reboot,

changed header/kernel with 6,7,8 = gray screen for a few seconds then powered off (is that just a bad .img? - I split the stock recovery using a .bat rather than manually in HxD).

And just FYI, device encryption works at least after the latest OTA update.

Also FYI, inserting a microsd make it become /sdcard rather than the emulated fuse mounted /data/media; there is a switch in settings=>storage but that doesn't seem to switch it back.
[Miscellaneous Android Development] :
Sorry for late replay, but it took me few hours to realise what's the problem: it wasn't the recovery itself, it was the unpacking and repacking process. So I need to revise my ImageKitchen to correct this.

Now I switched to linux and used the manual method (commands in terminal), then I verified with bgcngm's tool. I think these will work both:

test9

test10
[Miscellaneous Android Development] bigrammy:
Test 9 = Boots fine no sign of life from the touch. Large font :laugh:

Test 10 = same as above

Mounts to pc etc all fine :good:
[Miscellaneous Android Development] Santhosh M:
Both of them boots. But as i said u some days back. Wipe data/dac reset stays and doesn't proceed. The same problem is still there. I made a change in the old recovery which u had built. ( not these builds which u provided from sday ). If you remove the wait they will proceed i suppose. That's what from what i experimented day before i found out. ( we need to remove wait flag )

Install zip from sdcard appears but on selecting no zip found comes.
[Miscellaneous Android Development] :
Ok, these are first builds from source (I finished the device tree). If these boot and work, at least as much as ported ones, I will push it on github and let Santhosh M and anyone else to start building too.

cwm-1

ctr-1

Test them as before, and please check what Santhosh M says about wipe cache, data and factory reset. Anyone else have same problem?

I changed also the sdcards settings - it should work fine now for zip install or backup. For CTR, if the touch doesn't work at start, press few times volume buttons and navigate through menus, and then check again the touch state - in some phones with same problem that was the trigger.
[Miscellaneous Android Development] bigrammy:
cwm-1 = Works same as the Port. (Wipes not tested due to lack of sleep at the end of my night shift :crying: )

ctr-1 = boots fine navigated menu searched through extenal_sd but then got stuck there because I had no back button :laugh:

No response from the touch screen at all. :(

I confirm that My port does hang when I tried to do a cache wipe while I was at work so I guess [MENTION=5480061]Santhosh M[/MENTION] is correct :eek:

I don't know how I missed that :rolleyes: I am actually using the phone on a daily basis and need it for work so I don't really do wipes that much anyway if Santhosh M can confirm the removal of wiat fixes the issue without any adverse effects I will gladly re edit it and upload P6000CWM5.img.

If someone else can do a more thorough testing of your compiled version (I am just too tired right now) and if all is working then bigrammy's Port will be gladly consigned to the history books :laugh: :highfive:
[Miscellaneous Android Development] :
Well, thanks [MENTION=3924647]bigrammy[/MENTION]. Not much activity here... Except from you, I didn't get any other feedback on these first builds, so you understand now why it's so hard to work for a device I don't have. And compared with the activity on zopo zp999 thread when I was helping, here I don't see much interest. :(

Anyway, here are a bunch of test builds:

Stock CWM

CWM Modded

Stock CM

CTR

PhilZ

TWRP

And here is the device tree I used for building. If [MENTION=5480061]Santhosh M[/MENTION] or anyone else wants to continue, that is a good start.

For touch it may need some additional flags on BoardConfig (TW_IGNORE_MAJOR_AXIS_0, TW_IGNORE_MT_POSITION_0, TW_INPUT_BLACKLIST, TW_WHITELIST_INPUT, BOARD_USES_BML_OVER_MTD, etc), but only testing them one by one it can be found the right one...

I think if it can be enabled the touch in twrp (which has the best touch code), then it can be extended to the other touch recoveries.
[Miscellaneous Android Development] Santhosh M:
Sry for the late reply. I checked the cwm build now. As usual wiping doesn't work and hangs on. ( also makes internal storage 0 bytes 0 bytes as i had conveyed some days back ). Install zip from sd card again says so zip file found. CTR i am yet to test. Will test out these builds also within some hours
[Miscellaneous Android Development] ac0935p:
Hi Bigrammy

Sorry been out of circulation for a few days. Just tried out the patch for the recent update and it solves the problem of losing cwm when you reboot. Thanks very much for your continued work.
[Miscellaneous Android Development] bigrammy:
Thanks Carliv :good:

Hmmm yes it's a little quiet but I originally started the thread for the spflashtool when I managed to manually make a scatter file before anything was available. Elephone then released their spflashtool Firmware a few days later which kind of made all my work redundant :rolleyes:

When I ported your CWM I just added the recovery to the thread so maybe I should of made a dedicated recovery thread instead :confused:

I am rushing just now bro as I have to go to work now :crying: but I will do more testing tomorrow hopefully some of the other guys will run some tests in the meantime :fingers-crossed:

Regards bigrammy.
[Miscellaneous Android Development] Santhosh M:
Review of recoveries

Stock CWM ( Both internal and external works. As usual wipe functions don't work. Just stays still and need to pull out battery. Ends up in internal storage being 0 bytes 0 bytes ) This problem mainly seems to be while wiping cache it seems as it stays at wiping cache stage only.

Modded CWM ( Both internal and external works. After booting it greets up with mess E: Can't mount /cache/recovery/command /cache/recovery/log /cache/recovery/last_log / last_install . I installed this recovery right after wiping functions failed in the stock cwm . So this maybe due to that.

Wiping functions completes in this recovery [took around 17-25 secs ] Phone factory resets perfectly. No issues on that. In fact the internal storage got restored after performing fac reset via this recovery. )

Philz ( Internal doesn't work and external works. Touch doesn't work. Wiping works ( took around 17-25 secs ). Phone factory resets properly )

TWRP Touch doesn't work. So not able to check anything on the recovery because of that.

The wiping cache part takes longer time in all the above i mentioned ( Why is that ? )

Backup & restore function

Tested only on CWM modded recovery so far. Backing up ends successfully [boot,recovery,system,data & cache are backed up]. Restored the backup and it worked perfectly. ( Here again restoring cache part took longer time )

Installing zips i am yet to check fully. But flashing a content into system folder ( example a text folder into system. After booting it you don't find it inside system folder ). We need to remove the system mounting line from updater script. Mount the system via recovery and then flash. only then it gets flashed. Why is that?

This is the mount line used mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system", "");

This review should give you a broad idea on what works and what can be improved ! I hope so :)
[Miscellaneous Android Development] :
Thanks [MENTION=5480061]Santhosh M[/MENTION]

Ok, the wipe took longer because of encryption. This phone has that enabled. For updater-script I saw other people replaced that mount system line ( mount("ext4", "EMMC", "/dev/block/platform/mtk-msdc.0/by-name/system", "/system", ""); ) with internal recovery mount option ( run_program("/sbin/mount", "-t", "auto", "/system"); ). Why? I'm not sure.. I didn't have time to study ROMs for kitkat, I'm working only on recoveries for a year now.

To check twrp can't you just use volume buttons and power? Doesn't work?

You didn't say anything about CM (Cyanogen Recovery). I added that only to check the touch state.

I made few changes, and here are second round of tests. I also pushed these changes to github too.

Stock CWM 2

CWM Modded 2

Stock CM 2

CTR 2

PhilZ 2

TWRP 2
[Miscellaneous Android Development] Santhosh M:
I missed out the CM recovery. Tested it now and touch doesn't work ( Internal and external works. Haven't checked wiping )

Yes in TWRP volume rockers didn't work and hence i came to the conclusion they have fully moved to touch based. So only i haven't mentioned any feedback above on that

The second round test of these recoveries which function i need to check in specific? ( Any info on any particular function you have tried on ? )

I was doubting on the system flashing because other mtk devices it works fine. I tried a cm ROM build and tested and found that i wasn't able to get log at all. Then after lots of research i found that it hasn't got flashed into system actually thought the installation completes. Can i replace that whole mount line with what you suggested or any more extra needs to be added ?
[Miscellaneous Android Development] :
Well, I built CM only to test the touch not other options...

I wasn't aware that twrp doesn't work without touch. :(

For second round, since sdcards and backup/restore worked, you have to check again wipe options (changed few things) and touch - try to use few times volume rockers up/down and touch the edges of display few times (all four) - then check if touch is started. Also in advanced menu access key test, and start touching different areas of screen to see if there is any movement.

A dmesg could shed some light on how the touch is initiated in Android.

And yes you can replace that line to see if it works that way. I saw that in few kitkat ROMs (aokp, carbon or something I can't remember now), but I'm not sure I remember it correct. I think the old mount doesn't work because the system path is not a "hard" path (/dev/block/platform/mtk-msdc.0/by-name/system is symlinked to a mmcblk). Probably if you find the right path it will work, but using the internal recovery mount instead of binary mount it will work always (is the way Superuser is installed from zip).
[Miscellaneous Android Development] Santhosh M:
Review of second round

Stock CWM : Wiping function works ( takes 50 secs though ). The slowest among all recoveries.

Philz : Touch doesn't work. Tried toggling volume rockers again and again. Tried touching screens pressing all over the phone.

( Key test : Volume up : 115 Vol down : 114 Power 116 )

Dmesg

CM recovery & TWRP

Touch doesn't work.

CWM modded recovery :

Wipe seems to be faster. Backup & restore works fine

Any other specific details needed let me know ! ( Dmesg needed for twrp & cm simple recovery ? )
[Miscellaneous Android Development] :
Thanks, that means there is only one well-functioning recovery for now: my CWM modded.

Unfortunately I couldn't figure out what's the problem with touch from dmesg. For some reason the recovery can't load the touch driver... may be an other driver that is conditionaly related to this one, I don't know.

I'll let you guys to dig further to find this.

I think my mission here is done.

And this is the CWM recovery for Elephone P6000:

CWM Modded Recovery P6000

:cool:
[Miscellaneous Android Development] xenonism:
Thanks a lot. Is it the same as P6000CWM4.img in the OP?
[Miscellaneous Android Development] ac0935p:
Many thanks

We all owe the key contributors to this thread a big thank you. A fully working CWM is a big step forward. TWRP would be great too - if there is any contribution that my meagre expertise can make just let me know.
[Miscellaneous Android Development] bigrammy:
Wow that moved along quickly :laugh:

I always seem to miss the action when I have to work :(

Many Thanks Carliv for your help and support with this project :angel:

I will add your compiled CWM recovery to the OP as the Official custom recovery for the P6000 :good:

Shame about the touch but there is something definitely strange about the way this works :confused:

None of the official/conventional ways seem to apply to touch screen or it's implementation :eek:

I will keep digging and see what comes to light :cowboy:

I am porting another ROM again so the recovery will get a thorough testing. :laugh:

Again Many Thanks Carliv :cool:
[Miscellaneous Android Development] yuweng:
Sharing my findings again . . . :o First come to know about blacklisting from here when dhinesh77 shared with me his ubifs patch, at that time i donno what the heck that was until further digging yesterday found varun.chitre15 sharing the same problem so i guess only those with the device in hand, try building from source then only it may solve this Touch problem or may be not . . . :fingers-crossed:
[Miscellaneous Android Development] yuweng:
A recovery log would tell alot like this one here with aromafm, log by varun.chitre15, full discussion here . . . :cowboy:
[Miscellaneous Android Development] HypoTurtle:
Not sure if it means anything; was also picking through the tpd stuff the other day:

At /sys/module/tpd_setting/parameters/tpd_calmat (and tpd_def_calmat); from ROM the value is 962,0,0,0,1600,0,0,0 while in recovery it's all zeroes.
[Miscellaneous Android Development] :
I also looked on that dmesg posted by Santhosh M, and I saw something strange when the device was on recovery: the touch module is turned off, I mean it opens, loads and after check the device is in recovery state it is turned off by kernel. I'm not sure though because I had not much time to look into this, and without the phone it will be very hard to fix this, but if that is true (what I think I saw), it will be hard to fix it even with the phone. I'm guessing the stock recovery is non-touch, isn't it? Well, for Lenovo P70-A that is not a problem, because lenovo uses a simplified version of miui recovery and that requires touch enabled, and so any other recovery with touch will work, but for this phone if they turned off the touch module for recovery, you need a new kernel.

I hope I'm wrong and I didn't see well.
[Miscellaneous Android Development] HypoTurtle:
Not sure if it matters, but bigrammy is using the boot kernel and so are you in you're recoveries afaik. The stock recovery is non-touch, but not the basic <3e> recovery ; you can verify root integrity, install from sdcard etc. with the controls being vol-up = enter; vol-down=scroll down and power=hide/show text/menus.

Edit. It is a <3e> recovery.
[Miscellaneous Android Development] :
The kernel is the same for both, boot and recovery, only ramdisk is different. What I said is about a check of phone state (boot, recovery, factory mode, etc), but also as I said I'm not sure about that and without the phone I can't do more.

Though today I realise that my first ports failed because of my unpack/repack tool (fixed now), and I didn't repeted those, but I had an atempt to fix the touch in them. So, here is that solution applied again for my second CTR build.
[Miscellaneous Android Development] bigrammy:
I just repacked all recoverys with the stock recovery kernel everything was as before with just one difference :confused:

While in Aroma FM I now got vibration when selecting things using the power button :confused:

Maybe I just did not notice before but I think I would of. :eek:

I just flashed this ctr carliv and the results are the same as above :o

I have flashed so many now I have lost track of just what I have flashed and what I have not :eek: :laugh:

I did use volume and power to navigate back and forward for a good amount of time but the touch function did not come to life :(

[MENTION=4478781]yuweng[/MENTION] Thanks for the info how did he get the Aroma FM log I see no option to get an in app one :confused: is it a edited dmessage
[Miscellaneous Android Development] yuweng:
Now that i recall correctly, Touch was working at recovery on my old A789, one of the tests i use an old release of kernel & Touch stop working completely . . . :o

While at recovery, install aromafm.zip, try triggering the proximity, light, accelerometer or whatever sensors then it should give some log if it interfere with the Touch but i guess this is not the case for your P6000 . . . :o Hmm, did you try holding Touch . . . :cowboy:
[Miscellaneous Android Development] bigrammy:
[MENTION=5186178]carliv[/MENTION]

It helps when I look in the right place for the logs :o /cache/recovery/ :laugh:

One log of any note was found.

This one from CWM with the Aroma entries :eek:

EDIT: It helps when you have had some sleep :laugh:

A simple adb shell command while in recovery gives the same results. ;)

No mtk-tpd it seems :mad:

cat /proc/bus/input/devices
I: Bus=0019 Vendor=2454 Product=6500 Version=0010
N: Name="mtk-kpd"
P: Phys=
S: Sysfs=/devices/bus.2/10010000.KP/input/input0
U: Uniq=
H: Handlers=gpufreq_ib event0
B: PROP=0
B: EV=3
B: KEY=80 180000 0 40000800 1c0840 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="hwmdata"
P: Phys=
S: Sysfs=/devices/virtual/input/input1
U: Uniq=
H: Handlers=gpufreq_ib event1
B: PROP=0
B: EV=5
B: REL=2

I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="ACCDET"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=gpufreq_ib event2
B: PROP=0
B: EV=3
B: KEY=80 0 78 0 40c0000 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="m_acc_input"
P: Phys=
S: Sysfs=/devices/virtual/input/input3
U: Uniq=
H: Handlers=gpufreq_ib event3
B: PROP=0
B: EV=9
B: ABS=107

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="m_alsps_input"
P: Phys=
S: Sysfs=/devices/virtual/input/input4
U: Uniq=
H: Handlers=gpufreq_ib event4
B: PROP=0
B: EV=d
B: REL=6
B: ABS=101

~ #
[Miscellaneous Android Development] yuweng:
Hmm, based on your earlier post before edit, there seems to be something interesting compared to mine . . . :cowboy:

Your P6000 . . .

aroma/s: Initializing Resource

DEVICE NAME: [COLOR="blue"]m_alsps_input[/COLOR] - /sys/board_properties/virtualkeys.m_alsps_input
EV ST: minX: [COLOR="blue"]-32768[/COLOR] maxX: [COLOR="blue"]32767[/COLOR] minY: [COLOR="Blue"]0[/COLOR] maxY: [COLOR="blue"]0[/COLOR]
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: [COLOR="blue"]m_acc_input[/COLOR] - /sys/board_properties/virtualkeys.m_acc_input
EV ST: minX: [COLOR="blue"]-32768[/COLOR] maxX: [COLOR="blue"]32767[/COLOR] minY: [COLOR="blue"]-32768[/COLOR] maxY: [COLOR="blue"]32767[/COLOR]
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: ACCDET - /sys/board_properties/virtualkeys.ACCDET
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: hwmdata - /sys/board_properties/virtualkeys.hwmdata
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: [COLOR="blue"]mtk-kpd[/COLOR] - /sys/board_properties/virtualkeys.mtk-kpd
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0
aroma/s: Input Initialized

Mine . . .

aroma/s: Initializing Resource

DEVICE NAME: [COLOR="Blue"]mtk-tpd[/COLOR] - /sys/board_properties/virtualkeys.mtk-tpd
EV ST: minX: 0 maxX: [COLOR="Blue"]480[/COLOR] minY: 0 maxY: [COLOR="blue"]854[/COLOR]
EV MT: minX: 0 maxX: [COLOR="blue"]480[/COLOR] minY: 0 maxY: [COLOR="blue"]854[/COLOR]

DEVICE NAME: hwmdata - /sys/board_properties/virtualkeys.hwmdata
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: ACCDET - /sys/board_properties/virtualkeys.ACCDET
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0

DEVICE NAME: mtk-kpd - /sys/board_properties/virtualkeys.mtk-kpd
EV ST: minX: 0 maxX: 0 minY: 0 maxY: 0
EV MT: minX: 0 maxX: 0 minY: 0 maxY: 0
aroma/s: Input Initialized

It seems aroma is detecting two input, the m_alsps_input & m_acc_input but not your mtk-kpd, so there might be some hope to blacklist those inputs . . . :cowboy:

Try identify these two input if there is changes at the recovery screen, as said, Eg. Try blocking the light/ proximity sensor, pan tilt your MTK for accelerometer & if there is changes then that means custom recovery is using those instead of Touch input . . . :fingers-crossed:

If it is really the kernel problem then case close, no Touch support on recovery for your P6000 . . . :laugh:

Updates

acc seems to be the accelerometer, i have no idea what is alsps, may be it is the light sensor . . . :o
[Miscellaneous Android Development] HypoTurtle:
The kernels look different to me in terms off hexdump - recovery kernel is larger, but I take you actually mean uboot/lk and/or preloader, in terms of the touch being switched off. I've looked through the hexdumps of those and couldn't see much (nothing touch related) of use - not that I knew exactly what I was looking for.
[Miscellaneous Android Development] :
The alsps is the proximity sensor my friend. ;)

I would look to see if there is a { /sys/board_properties/virtualkeys.mtk-tpd } in /sys/board_properties/ folder, in Android booted up. In that log you mention there is no reference to it, but in dmesg it appears.
[Miscellaneous Android Development] :
Probably you compare kernels from different builds or sources, or something because the kernel is only one for a build, integrated in boot and recovery. Look in attachment (these are stock images for p6000 sent to me by bigrammy).
[Miscellaneous Android Development] bigrammy:
Hi all,
[MENTION=4478781]yuweng[/MENTION]
[MENTION=5186178]carliv[/MENTION]
[MENTION=4056517]HypoTurtle[/MENTION]

carliv I can confirm the presence of the file

/sys/board_properties/virtualkeys.mtk-tpd

:good:

I notice in the TWRP code post by yuweng :good: very helpful to me :laugh:Here I notice he uses

dir = opendir("/dev/input");

but we can be more specific with

dir = opendir("/dev/input/event5");

as this is our mtk-tpd.

Also can we check if the

MAX_DEVICES ??

setting is not set and if it is that it's set for 9 devices as this is the amount of input devices we have.

I just thought It may be that our mtk-tpd is not activated until after the max device limit is reached :rolleyes:
[Miscellaneous Android Development] :
In CWM and CWM based recoveries MAX_DEVICES is 16, so that is not the problem. The problem is just what yuweng pointed out: your phone doesn't use touchpanel input in recovery, replacing it with those sensors.

NOTE:

I can confirm you now that for your phone the problem is the kernel. Probably Elephone didn't do a good job, or maybe that was their intention to not have touch in recovery.

I askend megthebest to test a ported CTR from your phone to his (a Ulephone Be Pro with same MTK platform mt6732) and he reported that is working flawless.

And to explain, the only difference is about internal sdcard (his phone has multiuser enabled) and the kernel, the rest is exactly the same as for your phone. Since the internal sdcard has nothing to do with touch, that leads us to kernel as the problem here.