yashsingh1/xdaforums huggingface dataset:
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
As an additional note, a repacked kernel init.rc script (or some other mechanism that runs a command line at startup) can write into /sys/class/leds/charging/trigger to enable the charging LED. This doesn't require any special kernel support or shared libs... It appears to work fine "out of the box" with the standard kernel. The following are listed as supported triggers:

none

usb-online

max170xx_battery-online

wireless-online

rfkill0

mmc0

backlight

default-on

battery-charging-or-full

battery-charging

battery-full

battery-charging-blink-full-solid

dc-online

rfkill1

rfkill2

Of these, I've only played with a couple battery related (they seem to work after a short delay), and mmc0 (which is like a disk activity light.) (Please don't ask me what each one of these does. It's more fun to try them out yourself.)

How to play? Here's an example:

adb shell
su
echo battery-charging-blink-full-solid > /sys/class/leds/charging/trigger

(The above example, as far as I can tell, does the obvious: the green LED blinks while it's charging and goes solid when the battery is charged.)
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
By the way... if someone decides they want to take some of this information and publish an app that basically does nothing but write to sysfs files, that's fine. However, please make it a free app.

Why? Because this community is about development and sharing ideas freely. Profiteering from those ideas (especially when they are as trivial as obvious sysfs writes) is despicable, and really goes against what I feel xda-developers is about.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
God, I HATE when I make stupid mistakes. I'm throwing together a kernel (to test some ideas with the LEDs) and forgot to change the fstab (so it doesn't force encrypt.) I didn't even install the "new" kernel, but just did a "fastboot boot kernel.img" (to see if it would boot.)

It booted.... and now it's encrypting my phone. (This is the bad thing. Encryption is one-way.. once your encrypted, the only way to decrypt is to basically factory reset the device.)

...and now for the "rookie mistake": I never bothered to make a backup of my userdata partitions. DUH!

(Actually, the reason I didn't back it up is that I'm running out of space on the phone.)

Damn.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
Damn, I just realized I don't have mod ability in this dev discussion section. If a moderator comes by, can you please clean up the thread?

Anyway...

As I'm working my way to defeat android's encryption, I'll report on what I've managed...

The only thing "blocking" this project from being successful and done is that I can't get the color LED's to blink on their own. I've tried adding a timer trigger to the LED code (LED_TRIGGER_TIMER or something) and that works.. kind of: I push "timer" into the trigger file, and then I can write to "delay_on" and "delay_off" files that magically appear in the sysfs.

The problem is that those are kernel timers, and not hardware timers. In other words, the kernel has to wake up the device to turn the LED on or off. So, if the delay on/off are set to 1000ms each, that likely means that the kernel will wake the device out of deep sleep every second to change the LED brightness. I suspect that would drain a battery...

On the other hand, I simply can't believe that there'd be any LED in any android device that doesn't have some kind of blinking control baked into the hardware. The problem is finding where it's baked in, as moto/google apparently doesn't want us to know... :laugh:
[Nexus 6 Developer Discussion [Developers Only]] Imoseyon:
I believe hardware timers are available here: https://github.com/imoseyon/leanKernel-shamu/blob/lk-lp/drivers/leds/leds-qpnp.c

I don't have time to dig into the code in detail but it coulb be tricky to enable them.

EDIT: nope i don't think hardware supports it :(
[Nexus 6 Developer Discussion [Developers Only]] itsmikeramsay:
Yeah I haven't seen anything hardware side either.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
I'm trying to unravel the mess of device trees.. Some random questions (to no one in particular... more just "typing out loud.")

It appears that the RGB LED's are GPIO controlled. However, moto/google isn't using leds-gpio, but instead they're using a GPIO mode within leds-qpnp.

Does leds-qpnp offer any functionality over leds-gpio? It appears that leds-qpnp treats GPIO based LED's in the most simple form.

Could the led's be controlled via leds-gpio instead of leds-qpnp? Would/Could that offer additional functionality (if possible)?

What other devices use leds-gpio? (hammerhead?) Do those devices support flashing LED's?

It's very possible that the hardware DOES support some type of blinking mode, but that moto never bothered to implement it as it was never needed.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
hammerhead uses rgb_pwm (not gpio, etc.)

leds-gpio.c isn't going to be any help without more knowledge.

Unless there's a gpio pin that allows hardware control of the LED flashing, and I can somehow discover that, the only "blinking" that the RGB LED will be doing will be "soft blink." (software turns it on, waits for a timer, turns it off, waits for a timer, etc.)

Which would be worse on an android device's battery that's idle/sleeping: a constant on LED, or a kernel that wakes up the device every couple of seconds to change the state of the LED?

(While charging, this doesn't matter because the device doesn't actually go into deep sleep while charging.)
[Nexus 6 Developer Discussion [Developers Only]] Imoseyon:
ah man I'm trying to remember what I did to probe for support for hardware accelerated blinking. I made some tweaks to arch/arm/boot/dts/apq8084-shamu/apq8084-shamu.dtsi to enable various different modes, but each time I tried to enable a mode other than QPNP_ID_LED_GPIO (default), the phone doesn't boot.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
I'm starting to think about reversing things: The charging LED has hardware blinking support, but the RGB doesn't... so I could just make the RGB cluster be the "charging LED" (with soft blinking) and the brighter green LED be the notification LED....

Extra "battery drain" used while software blinking wouldn't actually mean anything as the unit is being charged (and doesn't go into deep sleep while charging anyway.)

Of course, we'd then be forced to only GREEN notification lights. On the other hand, a single color LED notification with 0 excess battery drain is better than none at all. (My last phone was an HTC M8, and that only had orange and green.)

In fact, doing that, I could have some fun with the RGB LED while charging by changing the LED color based on the charge percentage. (I just need to figure out how to get the current battery percentage into liblights.so.)

Best of all, it's Friday, so I'll have some time to work on it over the weekend.

Sounds like fun.

notes:

liblights can access the current charge level (1-100) from sysfs /sys/class/power_supply/battery/capacity, and the charge status (Full/Charging) from /sys/class/power_supply/battery/status

edit for more notes:

For the 3 sysfs nodes representing the RGB LED, the "brightness" setting doesn't seem to have any impact. A brightness of "1" looks the same to me as a brightness of "20" (which is the max.) I'll have to retest that in a dark room.
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
Just a status update... I didn't get to work on thing as much as I'd wanted over the weekend. I did spend some time looking at the charging LED related code. It's attached to a "MPP" (multi-purpose pin) in the device. There's a MPP mode in the kernel code (leds-qpnp) for supporting hardware blinking, but it relies on using a PWM channel to control it.

I'm not familiar enough to PWM channels to know if I can just just assign one and it'll work, or if it requires hardware wiring in order to work. Obviously, if it requires hardware wiring that doesn't exist, there's nothing I can do there. I'd rather I had some idea what I was doing before I just randomly assigned a number as a pwm channel and booted it.

If anyone has a clue about this, I'd appreciate them chiming in. Despite the "developers only" tag on the subforum, that does NOT mean "recognized developers only." It means anyone who develops/engineers/creates/etc.
[Nexus 6 Developer Discussion [Developers Only]] upndwn4par:
Just thought I'd share something I found while cruising T&A.

By [MENTION=6221732]registered-user[/MENTION]

http://xdaforums.com/nexus-6/themes-apps/app-charging-led-mode-changer-t2963847
[Nexus 6 Developer Discussion [Developers Only]] plasticarmyman:
i took these screenshots using Tricksters LED Control settings.

When using

battery-charging-blink-full-solid

i get the light to blink while charging...
[Nexus 6 Developer Discussion [Developers Only]] Toledo_JAB:
the thread has been cleaned so I have opened it up.

Please keep in mind that this is a dev discussion and as long as the post is related the discussion it is OK.

As with any thread on XDA if you think a post is in the wrong place then REPORT IT!!!!! DO NOT REPLY!!!!

[MENTION=336863]garyd9[/MENTION] you should PM Sevitus to find if Mod permissions are available
[Nexus 6 Developer Discussion [Developers Only]] IceXcube84:
I have found out what some of the triggers is doing but the list is not complete yet.

none (default, LED does nothing)

usb-online (lights up when USB connected)

max170xx_battery-online

wireless-online

rfkill0 (Bluetooth enabled)

mmc0 (I/O triggered, lights when mmc0 is in use) Storage access

backlight (Backlight on the AMOLED display)

default-on (always on)

battery-charging-or-full (full time ON LED when charging or charged)

battery-charging (full time ON LED when charging)

battery-full (full time ON LED when charged)

battery-charging-blink-full-solid (blinks until charged)

dc-online

rfkill1

rfkill2

I found what the rfkill0 is doing on this page: https://github.com/ev3dev/ev3dev/wiki/Using-the-LEDs and the others is from this one: http://andrux-and-me.blogspot.com/2014/11/moto-g-play-with-led.html
[Nexus 6 Developer Discussion [Developers Only]] garyd9:
..and? I don't understand how this contributes to the development discussion concerning adding notification LED support with hardware blinking to the android device.

Are you suggesting that one of existing kernel triggers has code for enabling hardware blinking? I know that the "blink on charge" trigger uses software blinking (and that's discussed earlier.) However, I didn't dig into some of the other triggers (that are in modules outside of kernel/drivers/led/triggers)
[Nexus 6 Developer Discussion [Developers Only]] raiden:
Even if the LED lights have to be swapped if it can't be figured out is still ok.
[Nexus 6 Developer Discussion [Developers Only]] raiden:
Can we get a TWRP installable zip file to enable the charging + notification LED in CM12 or even stock image? The notification LED (even if swapped with charging LED) seriously needs to be added to CM12 builds or even stock images.
[Xiaomi Redmi 1S] Fap4k:
I dont know whats wrong with my device

I cant flash any rom in my device

TWRP error "unable to mount system"

"Unable to Mount Data" etc.

Plz help me to resolve this.

Done now flashed fastboot ROM and its done.
[Xiaomi Redmi 1S] Abhishek699:
If u have pc then install cwm recovery using fastboot then install any rom it will work definitely
[Xiaomi Redmi 1S] kumarsujitroy:
Recovery issue

problem with ur recovery try latest one or change ur recovery .

have u created Backup successfully with this recovery ?
[Xiaomi Redmi 1S] Fap4k:
Not Done

Tried all the things but problem still there..
[Xiaomi Redmi 1S] lost3:
try ro flash miui rom with fastboot (wipe everything) and then try to install again twrp
[Xiaomi Redmi 1S] dewri21:
Same happened with me, too. Try flashing philz recovery, that works well in flashing roms. And if you wanna stick to twrp, then from recovery menu, first wipe everything and then again reboot to recovery. Then flash the desired rom. It should work. :good:

And yea, this is a minor problem. You don't need to flash fastboot rom. Just do as i said or switch to philz revovery.
[Motorola Droid RAZR] crimsong19:
Around 3 hours ago, my Razr (Jelly Bean 4.1.2. on Verizon) froze and rebooted (as it sometimes does when I use the camera - except Instagram, processes.android.media, and the Homescreen all stopped first). The phone was holding on the opening animatic for too long, so I did a power+volume reboot, and now my phone is stuck in a boot loop. No matter what I select (Normal Powerup, Recovery, AP Flashboot), I get "Boot Failure" and "Device is LOCKED" and "Invalid CG HAB (CG: mbr, status: 0x0056)". I've been doing some searching in the background for ways to fix the problem and I've downloaded RSD Lite and I'm downloading the 1.1 GB ROM to flash with. Anything else I can do, or is there any walkthrough to help? This is all new to me - and I haven't backed up in a while, so I'm afraid files and such will be wiped clean, even though I've seen in some forum posts that some folks haven't had anything wiped.
[Motorola Droid RAZR] davidjumani:
Download RSDlite and flash it while in AP Fastboot mode

The roms should be around 500 mb. Check if you got the right rom for your device based on it's region then flash it
[Raspberry Pi Q&A, Help & Troubleshooting] finn.sta:
Hey guys,

at the moment I am running Samba on my Pi to sync files from my Nexus 5 with Foldersync to an external drive connected to the Pi. I'm getting ~700kb/s while syncing and I also tried setting up an ftp server which was at ~1,5MB/s. The problem with ftp is the risk of incomplete file transfers so I don't want to use that.. But I wonder if there are any good alternatives to my setup. I also tried WebDAV but the speed is similar to Samba. I read something about Bittorrent Sync, do you think it would be faster? Or do you have other recommendations?

Greetings
[Android Software Development] rogcontact:
Does anyone know if S-Memo or S-Note APK have access to the data through API content providers, or any other way?
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
@all the coders

The community has people with very good coding skills (we know them and they know them each-other), so why you(we) do not concentrate your(our) skills and work on one big open-source app. The synergetic (network) effects would make it possible to build and later host a stable and all included community-based-open-source-group-coded app!

We have so many pseudo-proprietary based tools:

ROM-Kitchen, Hermes ROM Koch, nbhextract, et cetera...

Is think the best would be, to set up something like an open-source-project. - we can host the codesnippets on a subversion or cvs directory or something else to manage the distributed progress.

The efforts would be much bigger and come much faster, that should be clear for everybody.

So please let me know and i will set up such a directory!

Maybe pof can set up a poll for this - so we can get a democracy-based decision!

AFAIK this would be the first joined forces XDA-Developers development and i think it is realy the time for it!
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Des:
And what are you waiting for ? Start development of this one big open-source app by yourself right now. And others would join if they find it interesting.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
I created a svn-repository,

please PM me with your email-adress to send you the account information!
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Des:
I've meant start development not creating svn res :)
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
I know but at first my programming skills are not as good as your skills are and at second why i should start a new app since we have a lot of lines already? :)

but as far as is see you won´t join, will you?
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Des:
why others should ?

join to what ?
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
Others started already, so they just have to put their code in there and others can modify it.

Join the svn... :rolleyes:

BTW: You know what a svn is, don´t you?
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Des:
There is sourceforge for it. And there was cvs rep on xda-developers. If you going to host another - that's good. But how it relates to starting of development of "a stable and all included community-based-open-source-group-coded app" ?

svn is in the first place code hosted there. No code == nothing to join.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
Well, e.g. dutty could host his code in there, if he wants; olipro could host his code in there, if he wants; like all the others.

that would be good start.

Then merge the code and bring up new features... like guis (i would do that e.g.)

And yes, i can not host any code because i did not wrote something and i do not want to decompile the versions we have, because of ip, the developer should agree with it first.

besides this is just an idea, but reading your posts it seems this idea is not very welcome. :(

i wrote something like this to a mod here 2 weeks ago, did not got an answer, so at all i think it could really be a bad idea - however maybe some others will say somthing about it.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] richy240:
I personally think it's a great idea! It's just too bad I'm not a developer; I wish I could help!

But yes, I believe that if everyone here worked together on a project, the results could be wonderful. I guess that doesn't mean much since I don't have the skills needed to contribute, but it still sounds ideal.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] mousey_:
Des I Think Apokryphus Is Main Aim Is An Open Source ROM Kitchen.

With The Issue That ahok_hk Had With Olipro About Him Releasing A Ported Version Of His Software, I Think He Sees The Coders Working Against Each Other (Or At Least Being Rivals). And Wants Everyone To Play Nice To Create One Kitchen That Is Fast And Simple. Which Means That It Has To Be Open Source So Everyone Can Make Reccomendations On How To Update The Software.

Cheers
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] apokryphus:
Exactly, but not only for recommendation also for modifying the software, thats the main goal - joined people can add their own lines of code to provide the stability or usability for instance.

i hope i did not got you wrong, what means that i think you meant with update not modifying. but in case of that is the meaning i totaly agree with your opinion.

sorry but i am not a native speaker and sometimes i have got some problem with the meaning of the translations.

see quine, in word and object, chapter 2 about the indeterminacy of translation. :o
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] ahlok_hk:
I must stress that everyone has their rights for their own intellectual property because the have created them using many many hours of effort. And I was not saying that I am not going to release the code. But just not right now coz it is still in beta and many fixes/function will be added. And there is not such "The Coders Working Against Each Other" in my mine at all. Coders should "respect" each other.

For the case of Olipro, he not only stole and released the code "without my prior agreement", but still releasing it after I suggested him to just put those code in his kitchen.

On the other hand, dutty is good. Why? because he also wanted to use the souce code of aChef, and he did ask me before he wants to put it in his kitchen.

BTW, originally I have successfully added many new functions to aChef that no one has done/thought before, but I see no point to release them or to continue my effort now.

Anyway every one has their own thoughts about intellectual proterty. And I am not going to discuss here anymore. Good luck and Good bye to all.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Olipro:
it's a port... it's not your code, you didn't license your code, and you did not say anywhere that anyone was forbidden from creating a derivative work, I made it to benefit the community, if you want to let ego get in the way, that's your problem buddy, not mine.
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] chymmylt:
while I reconize the merrits of open source, I think people should respect (an appreciate) the hard work that people have done. The people in this forum have made some wonderful software, provided it to us free of charge. If they want to put their hard work out there in an open source form, that's great, if not, that's also great - it should be their choice with no pressure.) I've not even seen anybody complain about their software being incorperated into other programs - they've just asked that you respect their IP which in my opinion is perfectly fair.

If you'd like something put into opensource, write a nice letter suggesting it with no pressure, and then leave it to the developer. If they want to they will, if not, simply thank them for their hard work an appreciate the product they've provided for you. If you push people who don't want to release it for whatever their reason, you'll alienate them and they'll cease development which would be a detrament to everybody!

<steps down off soapbox>Sorry for my pointless ramblings - please, continue ignoring me! :D
[8525, TyTN, MDA Vario II, JasJam Software Upgradin] Olipro:
*cough* VAPOURWARE *cough*

we all appreciate your effort including me... but if diddums wants to throw a tantrum the feel free
[XDA Assist] XDA Visitor:
I just switched from a iPhone 4s and am getting used to Android and the Turbo. I have had it for about a week, and on two of the mornings when I woke up it seems to stall and be unresponsive. I am not the most technology aware person so I am not sure of the cause. When it happens, I reboot the phone and it seems to work okay. Should I take it into the store and get a new one or is this a normal problem with Androids. I am not saying iPhone doesn't do it, but I just want to make sure it's not my phone that is defective before the window passes where I can exchange it.

Note: I do charge it all night, could it have something to do with being on the charger for too long?

Another issue, and it may just be the Pandora App. Pandora seems to be very slow and unresponsive and many times it asks me to send in a report. I am not familiar with this issue and again, do not know if it is the app or the phone.

Any suggestions?
[XDA Assist] Perseus:
There are cases and reasons when your phone might be slow to act in the morning. It happens some times. Pandora might be more of a symptom in that direction. Can you please specify your device details so we can get more accurate help ?
[Galaxy S 4 Active Q&A, Help & Troubleshooting] QuentinX5:
Alright, so I've enjoyed modding my Android devices since I got my first Android running on 2.2, especially because of the options to tweak CPU usage, and just (from what I have noticed) better general usage with all of my devices. I purchased this phone because of it's similar power usage to the S4 and it being water & dust resistant. However, most of the development that I have seen for this forum has been for the i9525, which is the international version. I have the i537, and have been going crazy with battery drainage issues, and I think only a custom kernel/new ROM can fix this. Could somebody point me in the right direction of where to go? I've heard talk that after MF2, installing Safestrap right now is essentially not possible, due to bootloader issues.

I'm running the Stock ROM v 4.2.2