yashsingh1/xdaforums huggingface dataset:
[Elephone P8000] BlueFlame4:
Funny thing is the first P8000 I had had a freaking bright LED that made me nearly blind at nights whereas I can hardly see the one from my second and current P8000. Elephone has also multiple batches with different LEDS there so while it might be too dark for you, some people want to have it even darker. I still agree that an option to set it would be nice.

[MENTION=218404]Stefan[/MENTION], what did you cherry pick from me? :)
[Elephone P8000] Damoedge:
Thanks Blue...;)

Well I guess if there was a choice there to make the led brighter the people who want their leds brighter would use it and the people who don't wouldn't use it..;)

But seeing that there was two different batches made I'm sure that I'm not the only one who would like this....really this is the only fault that I have with this amazing phone and if I could make my led brighter I would keep this phone forever...and a gratitude of a night out donation would be on its way!

Thanks again.
[Elephone P8000] Stefan Gündhör:
I cherry-picked a small change in defconfig from [MENTION=382340]walter79[/MENTION] https://github.com/visi0nary/androi...mmit/0c6a5409cdf33f4d750a1472e66784d77637dd47

Only two lines changed, so I didn't mention it explicitely.

@ all: Concerning power consumption I've occasionally mentioned that for me the email-app (the default yellow one) seems to be problematic. I changed the setting to push notifications, but from time to time it still caused the phone to stay active while it should have been sleeping, which resulted in a drain.

I've attached two screenshots, there you can see that the email app caused my phone to stay active and the battery to drain faster than without the email app.

I noticed that while it was draining there always were one or more Emails in the outgoing messages folder, that for some reason wouldn't be sent. I guess that it kept retrying to send those messages (and kept failing to do so), which caused the phone never to be able to sleep.

After a fresh start of the email app or the phone the messages of the outgoing messages folder would be sent in most cases, which would cause the drain to stop until sending a new email directly from the phone.

So, all of you that are having problems with increased power consumption, keep a close eye on the default email app! I now replaced it with a different app from the app store and removed the default one completely.
[Elephone P8000] Stefan Gündhör:
Sorry that I didn't respond yet - it would be definitely possible. As far as I know the correct values should already be exposed to the sysfs. Anyway I will look into it. My own LED is very bright, there really seem to be differences in the P8000 batches.
[Elephone P8000] Stefan Gündhör:
Well, it doesn't look good on my phone. The correct file to write the brightness setting to is

/sys/class/leds/button-backlight/brightness

In root mode in a termial app you can do

chmod 777 /sys/class/leds/button-backlight/brightness
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness

and the button backlight will be completely disabled.

The maximum value you can set is 255, which should be the brightest setting. So

echo 255 > /sys/class/leds/button-backlight/brightness

in between the chmods will enable the LED again on the brightest level.

But now the interesting part:

echo 5 > /sys/class/leds/button-backlight/brightness

(or any other low value) will also cause the LED to be enabled on the highest possible brightness level. On my phone.

So, in my case it makes no difference, which level of brightness I set - the button LED can either be ON or OFF.

But, maybe in your case (as your P8000 is from a different batch), you can indeed change the brightness level.

Please open the file

/sys/class/leds/button-backlight/brightness

with a root file manager and look at the content. If you see 255 in there, your LED is already at the brightest possible level. If there is not 255 in there, you might have a chance to increase the brightness - you can try it first with a terminal emulator in root mode, and if it works, you can make the setting permanent with a small startup-script that runs everytime the phone boots. But before making such a script, just take a look at the mentioned file first.
[Elephone P8000] Damoedge:
Ahhh yes it brings me back to the days of the Xperia S, Yes it was the exact same and probably the same for any android phone with a led

So I've checked it and as I guessed it is set at 255 just like it was in the Xperia but I could make that brighter by increasing the Max current value in the same folder at that time but here we don't have such a value to increase...that's why I thought we could add that value in the kernel somehow? ?
[Elephone P8000] Stefan Gündhör:
There is the max_brightness file, which is also set to 255. There are only 256 brightness levels (including 0). I don't have an idea for a solution, but maybe [MENTION=3784300]BlueFlame4[/MENTION] does.

The related files in the kernel are

led.c in /drivers/misc/mediatek/leds/mt6735

the files in /drivers/misc/mediatek/mach/mt6735/k05ts_a/leds/mt65xx

In theory the LEDs should support 256 brightness levels, but ours obviously doesn't, which makes me think there might be something wrong with the Mediatek driver.

On the other hand, if your LED is already on level 255, it might just not be able to be any brighter than it is currently.

EDIT: I take everything back, I found out how to decrease button LED brightness on my own phone. I will update the posting shortly.
[Elephone P8000] Damoedge:
What do you think about the idea of the Max current value? Would there be away to introduce into the kernel or system itself...?

I think if it's predetermined that 0 = off and 255 = max brightness then maybe the only other way is to give it more/extra power (max current) so that 0 still = off but all other values will be brighter...

I'll have a look at my old Xperia values and see what the standard current was....

Thanks again for your time on this...
[Elephone P8000] pat7:
Hello.

After 3 days of test, V2.3.3 for me is not bad at all.:good:

What bothered me was this loss before full discharge.

In use, the v2.3.3 does not lengthen the battery life, but corrects this loss we had.

*I have less outages and wireless networks 3, 4G. From then yesterday I changed mobile operator where I find a true 4G network.

I attached screenshots, who watches the 100% load, then a screen every twenty minutes between 7 and 1% remaining battery charge.

Stefan and BlueFlame, great job !!:highfive:
[Elephone P8000] BlueFlame4:
[MENTION=4311614]Stefan Gündhör[/MENTION] Have you heard about kexec hardboot and MultiROM? I am thinking of getting it running on the P8000 for CM 13 development so I can boot multiple ROMs from my internal storage. Always doing a Nandroid from my daily CM 12.1 and restoring it afterwards it crappy and time consuming ;)
[Elephone P8000] kivulallo:
This is interesting...

You see the else section when "every else value is 90%" executes?

What if you write something like

pmic_set_register_value(PMIC_ISINK_DIM0_DUTY,28*(level/255));

So this could mean if the phone is not notifying you with 128 (pulsate) then it will set the led to an appropriate brightness according to the set value. (Where level 28 is currently the max, so max brightness will be 90%. You can modify this to 31*(level/255) to get the 100% brightness.)

That means apps or written scripts can really alter the brightness as they want. (Or as WE want :p)

I don't speak C so I don't really know the method and the syntax to write this. It's just an idea. Hope it's understandable XD
[Elephone P8000] Stefan Gündhör:
Yes you wrote exactly what I was saying/thinking :)

Something similar to this will work for sure - the problem will be the part with remembering the last level. Also, after pulsation (which means after any notification) it wouldn't remember the last level that has been set by the user, if the current code isn't changed, as far as I have seen. We will see :)

Not in detail, but sounds interesting :) But two ROMs on a single phone are too much for a simple guy like me :D
[Elephone P8000] bjbirch:
You could try here:https://github.com/Tasssadar/multirom/wiki/Porting-MultiROM
[Elephone P8000] kivulallo:
oh i understand now! :D well there's nothing i can say just as you: we will see... i will check the driver files in the next days but i don't think i could do anything with them :D
[Elephone P8000] kivulallo:
int mt_mt65xx_blink_set(struct led_classdev *led_cdev,

unsigned long *delay_on,

unsigned long *delay_off)

{

struct mt65xx_led_data *led_data =

container_of(led_cdev, struct mt65xx_led_data, cdev);

static int got_wake_lock = 0;

struct nled_setting nled_tmp_setting = {0,0,0};

// only allow software blink when delay_on or delay_off changed

if (*delay_on != led_data->delay_on || *delay_off != led_data->delay_off) {

led_data->delay_on = *delay_on;

led_data->delay_off = *delay_off;

if (led_data->delay_on && led_data->delay_off) { // enable blink

led_data->level = 255; // when enable blink then to set the level (255)

//AP PWM all support OLD mode

if(led_data->cust.mode == MT65XX_LED_MODE_PWM)

{

nled_tmp_setting.nled_mode = NLED_BLINK;

nled_tmp_setting.blink_off_time = led_data->delay_off;

nled_tmp_setting.blink_on_time = led_data->delay_on;

mt_led_set_pwm(led_data->cust.data,&nled_tmp_setting);

return 0;

}

else if((led_data->cust.mode == MT65XX_LED_MODE_PMIC) && (led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK0

|| led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK1 || led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK2

|| led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK3))

{

nled_tmp_setting.nled_mode = NLED_BLINK;

nled_tmp_setting.blink_off_time = led_data->delay_off;

nled_tmp_setting.blink_on_time = led_data->delay_on;

mt_led_blink_pmic(led_data->cust.data, &nled_tmp_setting);

return 0;

}

else if (!got_wake_lock) {

wake_lock(&leds_suspend_lock);

got_wake_lock = 1;

}

}

else if (!led_data->delay_on && !led_data->delay_off) { // disable blink

//AP PWM all support OLD mode

if(led_data->cust.mode == MT65XX_LED_MODE_PWM)

{

nled_tmp_setting.nled_mode = NLED_OFF;

mt_led_set_pwm(led_data->cust.data,&nled_tmp_setting);

return 0;

}

else if((led_data->cust.mode == MT65XX_LED_MODE_PMIC) && (led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK0

|| led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK1 || led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK2

|| led_data->cust.data == MT65XX_LED_PMIC_NLED_ISINK3))

{

mt_brightness_set_pmic(led_data->cust.data, 0, 0);

return 0;

}

else if (got_wake_lock) {

wake_unlock(&leds_suspend_lock);

got_wake_lock = 0;

}

}

return -1;

}

// delay_on and delay_off are not changed

return 0;

}

is this where we can modify the on-off delay or the breath delay?

or is it above somewhere at breath/blink functions?
[Elephone P8000] kivulallo:
3rd post in a row from me...

so. i done a lot of cycles and inspections of the battery, apps and things...

note: i tried to do the tests same, however, one or two times i had to let my phone on at night... i always turn it off by the way.

as you see there was one time i had to charge it to keep up till the end of the day.

here are my screenshots:

-kernel 2.3.2: with L Speed + with standby power saving

-kernel 2.3.2: only with Standby power saving (LSpeed setting were battery saving, sd tweak, cpu improvements nothing more, drained the battery...)

-kernel 2.3.2: nothing (Standby power saving turned off also, LSpeed uninstalled)

-kernel 2.3.3: Standby power saving turned on (SPS seemed to be draining more, but turned on for the test of new kernel)

-kernel 2.3.3: nothing (SPS off, no thoughts of LSpeed)

right now i'm inspecting my battery behaviour with battery meter widget which i saw on your screenshots guys, and it's its really good!

as you see, most of the cases my phone was awake despite the display was off. i tried to find the app or process which causes this and i found that Google Chrome was one of these processes (and it also eats mobile data...) and the other is mediaserver.

Now i use Yandex and watching the statistics. The mobile data use is drastically decreased. (One week Chrome: 186MB, one week Yandex: 48MB, with similar or same usage)

As for the battery, the awake time is less now, but i'm working on my phone and i'm not in school so nowadays i can't really test the battery...

Right now i'm playing with auto-start and trying to find the app which keeps the phone awake when running.

That's it for now, sorry for the delay and thank you for your patience. I hope this helps somebody...
[Elephone P8000] stefano91av:
Hi @ Stefan Gündhör, this might be useful for optimizing even more the kernel for our beloved P8000 ? :)

http://xdaforums.com/showthread.php?t=2754997

Regards ;)
[Elephone P8000] kivulallo:
in reply to this, just to finish my post-mania :D

this is what i don't like and don't understand and can't figure out:

in the last day i used my phone in the morning and in the evening only... you can see the screen time, wifi time... but it is always awake. also today, i only used my phone in the morning to check essential things like messengers, package tracking, a bit of ssh and weather... and you can see it's around 50%.

just to show you.
[Elephone P8000] Stefan Gündhör:
Dear guys (& girls),

the past weeks were busy ones for me, so I didn't have time to look into the notification light topic.

Additionally, a new private project has come up, which I will be focusing on in future, which means less time for XDA ;)

However, apart from feature-requests, the kernel is "completed" from my point of view.

To quote my initial posting of this thread:

Concerning the first two points we have reached a near-optimum, I believe. The linux base still is the latest one from March 2016, so nothing to do here either.

Feature-requests are another story, there would always be plenty to do, of course.

Personally, I am still using Cyanogenmod and v2.3.3 on my personal phone and it is working flawlessly - I just use my phone without much more playing around. I'm not even sure, if I'd switch to Android 6 (if it arrives someday) - maybe it's not even worth the hassle. I've seen and testet Android 6 and the difference to 5.1 isn't that big for everyday use.

So, for now I'll be pausing my XDA activities and wish you all the best of luck! Also, I'm grateful for all the responses in this thread and the general helpfulness of the community :highfive:

I'll keep an eye on the linux base (for updates) and still might drop by for important events like Android 6 :fingers-crossed:

Regards,

Stefan
[Elephone P8000] :
Whats about the new P8000 camera-drivers? Are they implemented?
[Elephone P8000] BlueFlame4:
I removed them some time ago because I thought they are not needed. Thus reverting this should be enough :)
[Elephone P8000] Trashware:
Could you please adjust it to the new Cam? I would really appreciate to use Guestekrnl on my second P8000 w/ the new Cam chip.
[Elephone P8000] walter79:
Back Camera: ar1335 13 MP Back Cam - [more information] 4K 30fps, 1080P 60fps and 720P 120fps

Front Camera: s5k5e2 Samsung 2560x1920 (5M) - [more-formation] maybe sensor is 180° placed rotated on mainboard

**old P8000**

cat /proc/driver/camera_info

Back Camera: s5k3l2 Samsung 4208x3120 (13M) - [more information]

Front Camera: s5k5e2 Samsung 2560x1920 (5M) - [more information]

kernel source für den ar1335 chip.

https://github.com/avionic-design/l...3683799#diff-cb868120fb030301d790a6359d595141

thanks to visi0nary
[Elephone P8000] BlueFlame4:
[MENTION=4311614]Stefan Gündhör[/MENTION] I just merged the ar1335 driver into my upstream, feel free to cherry pick :) It is tested and working!
[Elephone P8000] Stefan Gündhör:
New kernel v2.4 is out

Here we go :cowboy:

v2.4

upgraded linux base from 3.10.101 to 3.10.102 ("Linux kernel 3.10.102 LTS is a pretty big maintenance update that changes a total of 153 files, with 1,194 insertions and 608 deletions.")

cherry-picked new camera driver from visi0nary upstream ( thanks to [MENTION=3784300]BlueFlame4[/MENTION] and [MENTION=382340]walter79[/MENTION] ) to support new P8000 models

cherry-picked a read/write persmissions change for doubleTap2Wake from visi0nary upstream ( thanks to [MENTION=3784300]BlueFlame4[/MENTION] )

Please wipe cache & dalvik cache along with install :good:

Enjoy & thanks a lot to BlueFlame4 and walter79 for the cam driver :highfive:

You can find the new kernel attached to the first posting of this thread!

Update: [MENTION=3784300]BlueFlame4[/MENTION] : there are reports in the German AndroidHilfe forum that are saying the new camera driver still does not work for the new P8000 models ... :crying:
[Elephone P8000] skeleton1911:
Thank you very much guys!

Gesendet von meinem P9000 mit Tapatalk
[Elephone P8000] :
Thank you for your kernel - how strong is the charge-power in this kernel? 1A? 1,5A? 2A?

Edit: The commit says "only" 1A, why not 1,5 like Stock?
[Elephone P8000] Stefan Gündhör:
Which commit are you referring to?

Only change is this https://github.com/gueste/android_k...mmit/6bdd71f2254d0b8779f5225e5468df42728596e8 (cherry-picked from visi0nary upstream). Afaik visi0nary has some more changes, but this is the only change for guestekrnl, rest should equal stock.
[Elephone P8000] walter79:
ar1335 cam is fixed finaly. checkout visi0nary git.
[Elephone P8000] Trashware:
Thank you, walter79 and blue8!
[Elephone P8000] Stefan Gündhör:
Cool thing - I will merge it asap.
[Elephone P8000] Stefan Gündhör:
New kernel v2.4.1 is out

v2.4.1

merged fix for new camera driver from visi0nary upstream ( thanks to [MENTION=3784300]BlueFlame4[/MENTION] and [MENTION=382340]walter79[/MENTION] ) to support new P8000 model's camera

if your camera still does not work with your new P8000 model and this kernel, your ROM might be lacking some drivers - try those by [MENTION=4626501]skeleton1911[/MENTION] for Android 5.1.x ROMs https://www.androidfilehost.com/?fid=24591000424939670

Download is attached to the first posting of this thread :fingers-crossed:
[Elephone P8000] Trashware:
Works fine on new P8000 together with Skeleton1911 provided libraries.

Edit: We need some fine tuning here. Front Cam works, but a snapshot from the Back Cam causes on external apps a freeze.

Edit: Freeze is caused by camera zoom Fx when zoom on startup is activated. Everything else works fine here
[Elephone P8000] stefano91av:
Hello , I have a big problem with my P8000 bought at the end of November 2015 .

When I try to drag something on the screen or just select a check , take it seems that the touch screen in the horizontal part just below the center.

The rest of the screen works perfectly .

Only that strip below the center .

How can I fix ?
[Elephone P8000] Stefan Gündhör:
Sounds like a hardware problem, especially if it occurs on stock with stock kernel as well. Have you tried it with a full wipe and stock rom?
[Elephone P8000] Memonick2431:
Can I use on Resurrection Remix
[Elephone P8000] Stefan Gündhör:
You will have to try - I haven't tested this ROM. But I believe I read in a russian forum that it didn't work - so make sure, you backup your data and / or keep a flashable ZIP of the resurrection remix default kernel at hand, so you can revert to a working state, in case this kernel does not work for you.
[Elephone P8000] DJ-AIS:
It works great (stock rom)!

One moment: default kernel shuting down the phone on 3400mV. This kernel - 3300mV.

3400mV is 1%, but must be 0% (I think). Or so was developed? Thanks!
[Elephone P8000] boka18:
[MENTION=4311614]Stefan Gündhör[/MENTION] can you please fix the current android6 kernel wake up bug? (the same bug was with the 5.1, when u press the start button, it wakes up after 1-3 sec)
[Elephone P8000] Stefan Gündhör:
No can do, without any kernel sources, my good sir :crying: :cowboy:
[Elephone P8000] boka18:
ohhh snap! :crying:
[Elephone P8000] skeleton1911:
made a philz recovery for android 6

http://xdaforums.com/showpost.php?p=67730959&postcount=6558

so you can root it
[Elephone P8000] Hugdon:
Yes u can, I use v2.4 without Problems.
[Elephone P8000] BlueFlame4:
[MENTION=4311614]Stefan Gündhör[/MENTION]: I just merged several security fixes related to MediaTek drivers into my kernel, feel free to cherry-pick! Thanks to [MENTION=4761533]fire855[/MENTION]'s, [MENTION=4196889]DerTeufel1980[/MENTION]'s and [MENTION=5238428]superdragonpt[/MENTION]'s source release this was possible and our device is again more secure :)
[Elephone P8000] superdragonpt:
cool ;)

cheers
[Elephone P8000] Teblakuda4o4:
What is the requirement for using this kernel? Or can I use it on any phone that originally had 3.10.xx?
[Elephone P8000] valascus:
Only for Elephone P8000, with Android 5.1
[Elephone P8000] BlueFlame4:
Vernee was so kind to release their complete 6.0 ROM and the P8000 6.0 kernel was (accidently?) included there.

So I just pushed the kernel source for the new P8000 that ships with 6.0 to my GitHub. Feel free to fork, build, spread and whatnot :)

Also here is a test build which is known to boot and work properly: https://ota.cm.mkoas.de/builds/testing/boot_new_p8000_122020.img

Happy hacking!
[Elephone P8000] Trashware:
Is there a chance to pull out an ar1335 driver and port it to LP for the old P8000 with the cam issue on guestekrnl?
[Elephone P8000] walter79:
Kernel source: https://github.com/visi0nary/android_kernel_elephone_p80002016/

K06TE_A = p8000 (2016)
[Elephone P8000] walter79:
:D

/home/walter79/git/android_kernel_elephone_p80002016/drivers/misc/mediatek/imgsensor/src/mt6753/ar1335_mipi_raw_k506/ar1335mipi_Sensor.c
[Elephone P8000] Trashware:
Wow !!! Great, greater, greatest. Good opportunity to finally fix the cam issue.

??????????
[Elephone P8000] BlueFlame4:
IIRC I used these exact same sources for the ar1335 attempt but feel free :) Maybe I forgot something.
[Elephone P8000] Trashware:
Can't believe. There has to be something different because it didn't completely work.
[Elephone P8000] Proteg1:
Es compatible con la version android 6 del p8000???
[Elephone P8000] Trashware:
English please.
[Elephone P8000] BlueFlame4:
Nope.
[Elephone P8000] Garyg124:
Is the 2.4.1 ok with Eragon v9.9 On P8000 older model? Thanks
[Elephone P8000] kivulallo:
yes it is. I'm also using that combination :D
[Elephone P8000] micbanand:
Will this kernel get the zen and other optimations

The CM 2.1 kernel did?

Thanks :)
[Elephone P8000] boka18:
i think not :( i need it too since im using nexus, but..it is what it is
[Elephone P8000] TeaCup215:
So is there any possibility, that elephone p8000 batch 2 cam will work with guestekrnl in the future?
[Elephone P8000] Da-Fied:
For me to ??
[Elephone P8000] BlueFlame4:
Is that one working? http://xdaforums.com/showpost.php?p=69220184&postcount=6999
[Elephone P8000] Da-Fied:
No, unfortunately, it does not work.

I can start the camera and it shows me the motive, but when I press the shutter button it hangs up and the flashes constantly.

After a while the camera app crashes and I can not restart it.

Also the flashlight is gone
[Elephone P8000] kosue:
Can this kernel be implemented on Cm12.1 lenovo k3 note? Thx
[Elephone P8000] MacLaughlin:
Seriously? All out of the sudden.
[Elephone P8000] Stefan Gündhör:
He wrote later that

I think battery problem still exists in all existing kernels.
[Elephone P8000] skeleton1911:
Yep. Its a source bug. Only elephone or Google can fix.
[Elephone P8000] boka18:
That sucks
[Elephone P8000] Rizera:
Guys, do you know whether this is a Elephone brand problem? Because I know the P7000 and P6000 also have it.

I never heard of this same bug on other MT6753 phones though, only Elephones. I find it hard to understand why this bug is "unsolvable".
[Elephone P8000] Stefan Gündhör:
New kernel v2.0.2 is out

v2.0.2

upgraded linux base from 3.10.90 to 3.10.94 (12/2015) - this includes dozens of improvements over the old linux base

switched to toolchain "ubertc" gcc 4.9 (01/2016)

... download can be found in first posting :highfive:
[Elephone P8000] jknarf:
Thanks for your awesome work.

This kernel is getting better and better. :D

Cheers
[Elephone P8000] Stefan Gündhör:
Thanks, your happiness is my business - or something similar a random insurance company would say ;)