yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] jsgraphicart:
I attempted to give a ROM a second chance after trying it out once and didnt have 4G. This second time, I booted up and didnt have 4G again. But instead of toggling the data mode in the settings, I just toggled airplane mode and 4G came on. I have read people say that if you go straight to the settings and change the data mode from 3G to 4G then you are screwed. I have also read that after flashing for the first time and boot up, immediately reboot and 4G should come up. Maybe I just got lucky but those are some things to try out.
[Samsung Captivate Glide] spyke555:
Hi all,

Just a quick note to let you all know that my Glide hardware has died a horrible death. Screen flickers, color inversions and eventually a blank screen.

Replaced it with a Galaxy S4 mini which is the same size and an upgrade all around at a reasonable price.

Had fun here and time to move on. I see you guys are in capable hands tough. Take care!

Spyke555
[Samsung Captivate Glide] AndyYan:
Good for you, also thanks for the previous CM10.1s you brought to us. Quick reminder: don't forget a custom ROM (official CM is available), TouchWiz will instantly bog the phone down.

Sent from Google Nexus 4 @ Android 4.4 KRT16M
[Samsung Captivate Glide] xtacb4:
You will be missed here. Farewell Sir *tips fedora*
[Samsung Captivate Glide] spyke555:
Don't worry... Had this thing rooted with CM 10.2-M1 on here in less than 6 hours of it showing up at my door!

Spyke555
[Sprint Samsung Galaxy Note II] RedNight69:
Hi, anyone know how I can get rid of the error saying " E: Unable to mount '/preload' " my phone refuses to let me change the rom to anything, it'll only let me reset it with this rom http://xdaforums.com/showthread.php?t=2086769 but if I try to flash it with anything else, it refuses to install and never leave the whole samsung boot screen. Help please?
[Sprint Samsung Galaxy Note II] RedNight69:
so, any help on this or am I screwed?
[Sprint Samsung Galaxy Note II] bleyten:
Read your post on the other thread. My phone wouldn't see the sd card sometimes either. Try going into mount in TWRP and uncheck then recheck the mount sd card option. That made my files show up. Hope this helps!!
[Sprint Samsung Galaxy Note II] jocarog:
Flash CWM recovery, in the advanced tab there's an option to format the preload, then reboot to Android use goo manager to get twrp back if you prefer, I had the same issue and this solved it, good luck!
[Sprint Samsung Galaxy Note II] wwjoshdew:
For some reason that was removed in the latest 6.0.4.3. Luckily Recovery Tools is always behind, and doesn't have the latest version. It flashed 6.0.3.1 which had the format preload option under "mounts and storage". I downgraded CWM, formatted the preload, and then upgraded CWM.

Thank you very much!

Now I'm curious as to why that option was removed in the newer recovery.
[Sprint Samsung Galaxy Note II] jocarog:
Philz CWM has it available, give that one a try and if you can't find it let me know and I'll upload it to my drop box just to have as a backup
[Nexus 5 Original Android Development] arararagi:
Screen Dimmer

The minimum screen brightness is too damn bright to use in the dark.

Run the app, click "Load" next to "n5dim", change your brightness to the minimum (and then up a bit and back down) and notice how much dimmer it is.

The brightness at all other levels stay the same.

Source: https://github.com/mzhou/n5dim

Fast Charge

This works by setting the registers on the bq24192 charger chip to allow as much input current (from USB/AC) as possible, as well as allowing as high a charge current as possible (to the battery).

From limited tests I've performed in the past, this actually isn't enough to get faster charging, so further investigation will be needed, though your testing will be much appreciated.

It will take effect on the first time you plug in after clicking "Load". If you're already plugged in, you need to unplug and replug for it to take effect.

Source: https://github.com/mzhou/n5charge

General

To use either of these, you need any kernel which supports modules (CONFIG_MODULES=y).

I've attached (modules_boot.img) a stock kernel with the config changed to support modules.

modules_441_boot.img is for 4.4.1, while modules_boot.img is for 4.4.0.
[Nexus 5 Original Android Development] Cyb3rGlitch:
Does this dim further than setting '1' in /sys/devices/mdp.0/qcom,mdss_fb_primary.160/leds/lcd-backlight?

(Also I noticed your CSE email, a fellow UNSW student?)
[Nexus 5 Original Android Development] arararagi:
Yes. Dragging the brightness slider to the minimum already sets 1 there.

There's values hard coded in the platform data to internally restrict the value to a minimum of 5 (but that's of little consequence).

The main gain is is from the "full scale current" (you can find an explanation in the datasheet for lm3630) which has been hard coded to 18 in the platform data. Bringing it down to 0 makes a huge difference.

(sup)
[Nexus 5 Original Android Development] Cyb3rGlitch:
Nice work! I wonder why they limited it. Possibly to stop people putting their phone into an unusable state during the day?
[Nexus 5 Original Android Development] arararagi:
I've done it to myself many times when I did this to my old phone.

Also updated the attachment in the OP to be compatible with more kernels.

Tested working on Franco.
[Nexus 5 Original Android Development] CDeviant:
Very cool! :good:
[Nexus 5 Original Android Development] iNaruX:
AWESOME! Is there maybe a mod like this for the NN7 (new nexus 7 :D)
[Nexus 5 Original Android Development] adzjwarner:
Is there any advantage to this method over using an app like lux?
[Nexus 5 Original Android Development] arararagi:
No app will be able to get the backlight this dark.

I'm not sure what Lux does, but if it modifies the colours to produce a darkening effect, then the contrast will be very bad.
[Nexus 5 Original Android Development] Cyb3rGlitch:
Hey there, I'm actually the developer of Lux. The main purpose of Lux is to replace your auto brightness system without the need for root access. That being said, there's no reason why this neat kernel module couldn't be added to a root plugin for Lux.
[Nexus 5 Original Android Development] arararagi:
Ah cool. :)

I tried out Lux and I'm not sure if it's a limitation in the free version, but it only sets the backlight brightness (/sys/class/leds/lcd-backlight/brightness) to a minimum of 10 before it starts doing colour adjustment instead.

My module treats the value 1 as special for making the backlight super dark. Dragging Android's built in brightness slider uses the full range of values 1-225 inclusive.

There's no reason it couldn't just map the full 1-255 to a wider range, but I initially wanted to lean towards keeping things as stock as possible.
[Nexus 5 Original Android Development] Cyb3rGlitch:
It does that because some devices do silly things near 0 like putting the device to sleep. You can change the minimum brightness in settings to 1 which should fix this (although I suspect it might round 0.01*255 to 2. I'll have to check my codebase).
[Nexus 5 Original Android Development] arararagi:
Somehow overlooked that when I was skimming the settings. (And it does round to 2 ;) ).

I could make 2 or anything less than 5 special so that Lux users can benefit. Or maybe just make it configurable with a parameter at insmod time...
[Nexus 5 Original Android Development] Cyb3rGlitch:
Whatever you feel works best. A parameter sounds like the most flexible solution though.
[Nexus 5 Original Android Development] Nelsocracy:
This is exactly what I was looking for!

Could I get a bit more explanation of how to install this though? Do I flash the kernel in recovery and then run the command from a shell on my phone, or on my computer?

Thanks for making this.
[Nexus 5 Original Android Development] rockingondrums:
I'll be watching this thread intently. I currently use lux as well.
[Nexus 5 Original Android Development] 02busa:
Ditto!
[Nexus 5 Original Android Development] arararagi:
Flash the kernel in whatever normal way you choose.

Extract and copy n5din.ko to your phone.

Use root and put it in /data so that apps with SD card access can't mess with it.

Run "insmod /data/n5dim.ko" on your phone. This can be with a terminal emulator or adb or script manager.

I'm probably gonna be making more modules so I might make an app to simplify the process.
[Nexus 5 Original Android Development] adzjwarner:
OhHai! Big fan of the app, it's saved my eyes when internetting in bed for many many months now! (Though I probably should just not internet at night)

I'll leave the plugin stuff to somebody who knows how to do that and rejoice when(if) it happens. :good:
[Nexus 5 Original Android Development] Nelsocracy:
That worked perfectly, thanks.

This is really dim! I'm impressed. If you ever decide to modify it like you mentioned earlier so that the full brightness adjustment was available I'd be interested. It would be useful to have access to all the brightness levels between yours and the ordinary minimum brightness.
[Nexus 5 Original Android Development] arararagi:
Thanks for the feedback.

I've uploaded a new version that will work with Lux (need to set the minimum backlight value to 1 in the settings).

Later I'll try one that expands the range.
[Nexus 5 Original Android Development] Cyb3rGlitch:
I was going to wait for a kernel with RGB control before releasing a Nexus 5 plugin, but I have no idea when that'll happen. I'll have to modify my plug-in framework to not assume RGB control is present.
[Nexus 5 Original Android Development] adzjwarner:
Downloaded as soona s I read this, however I seem to be having troubles with the last stage, I'm getting a permission denied when i run insmod. Tried leading the command with SU too.

OK Managed to get one step further, I was running SU wrong, I'm used to preceding every command in linux with sudo.

So I do SU and run insmon /Data/n5dim.ko and get "failed (Exec format error)"
[Nexus 5 Original Android Development] renaud:
Why don't you just release a kernel patch instead of a module? It's a little bit weird from a security point of view to allow modules, hence why google removed them.

Anyway, as you need a custom kernel to insert the module, you might as well just make a kernel patch so people making kernels will incorporate the mod in their kernels.

Just my 2¢

note: I didn't read your code, so I didn't check if it could be compiled in the kernel, but as you didn't do it, I would expect that no.
[Nexus 5 Original Android Development] jbmc83:
noob question to the lux dev: does lux have to be running as an opened app (visible when pressing menu softkey) or can u swipe it away with it still working as a process or smth? just wondering :)
[Nexus 5 Original Android Development] Warrimonk:
edit: nvm i had it in the wrong folder

The bottom brightness level feels like a huge drop-off from the next level up. Could it be possible to have one made that is a take a smoother transitions from the new minimum brightness to maximum.

I feel like stock ramps up brightness way too quickly near the beginning of the bar. I always have it near 5-10%.
[Nexus 5 Original Android Development] TToivanen:
Would it be possible to compile this module for the nexus 4?
[Nexus 5 Original Android Development] arararagi:
Straight after running the command, can you run "dmesg | tail -n 100" and post the output? Which kernel are you using?

EDIT: Don't worry. I know what the problem is. Fix will be coming soon. In the mean time it'll work with Franco kernel.

I chose to do a module so that it would immediately be accessible to the vast majority of kernels without every dev needing to incorporate the patch.

It was actually a lot more effort to make it work as a module, but it should avoid the problem with my last phone where every kernel thread had "does this support arararagi's light thing?".

If you maintain a kernel without module support, you can look at the commit log and get an approximate patch. It's quite simple with only changes to 1 function.

From a security viewpoint, I think if someone gets root, you're already screwed.

Maybe. I'm not sure what backlight controller the nexus 4 uses.

Can you run "find /sys", put the output in a text file and attach it here?
[Nexus 5 Original Android Development] TToivanen:
Here you go. https://db.tt/rlLYRy4h

Thanks for looking into it.
[Nexus 5 Original Android Development] arararagi:
Now with an app, because doing stuff on command line is too annoying.

Also with better magic to make the same binary module load across different kernels.

If you want to use the module manually, look in the libs directory in the apk or /data/app-lib/arararagi.kernelmodulemanager-1 after you've installed the app.
[Nexus 5 Original Android Development] Tung_meister:
Is this defiantly safe for the backlight? when it's on or close to minimum I can see the brightness flickering as thought it's struggling to maintain such a low level.
[Nexus 5 Original Android Development] renaud:
Actually, given that stock kernel is without module support, it would take a very weird dev to add modules support, so, on the contrary, by doing a module, you just prevent most kernel devs to incorporate your feature.

Also, perhaps people asking "does this support arararagi's light thing?" is a good thing because it makes the kernel dev aware that your mod even exists and is something people want.

From a security point of view, if a malicious app can get root once and insert a module, the cracker is granted full powers for all the lifetime even if the app is removed or if the app cannot get root again and probably also after an OTA upgrade of the ROM.

But OK, I understand your point of view.
[Nexus 5 Original Android Development] GSLEON3:
[MENTION=3944423]Cyb3rGlitch[/MENTION] & [MENTION=5064727]arararagi[/MENTION]

+100 on the Lux plugin! That would be awesome! Personally I liked the way Lux worked & the GUI design better than the rest, so as usual, I purchased it. However, I use it for reading, since no device, aside from a few AMOLED's, get dark enough for my comfort. I can only get so far with Lux on LCD's like the Nexus 7, so I would LOVE this as a plugin for the N7 & the N5.

Cyb3r, I keep meaning to ask this (yeah I know, off-topic :-p ) but I always forget until 11pm when I lay down to read before bed, in the N7, Lux now makes the N7 lose it's wallpaper. It shows up & drops out as the screen changes to different apps for a second, then it is gone & only a black screen is left (widgets are there, just black in place of wallpaper). You know what that is from?
[Nexus 5 Original Android Development] sturmeh:
Using this now with Lux. (Stock won't transition brightness smoothly.)

You don't even need sub-brightness anymore!

This is awesome. :)
[Nexus 5 Original Android Development] emerica243:
What lux settings do you use? I just started using it laast night. Also im kind of confused. How does using this module differ from using the lux app? And how does it differ from using this AND the lux app?
[Nexus 5 Original Android Development] arararagi:
lux only: when going below 0% it will adjust colours to make the screen appear darker

this: reduces the minimum backlight brightness without affecting colours

lux + this: when you go to 0% (assuming you correctly set the minimum backlight level in the lux settings), it will use the new minimum backlight brightness. when you go below, it will use colour adjustment on top of that

Throughout using it yesterday, I found that the step between this minimum and the stock minimum is pretty large and it should be useful to access the steps in between as well, so I'm going to implement that and test it out.

I also found out the LG G2 has the same backlight controller, so with some minor tweaking this should work there as well.
[Nexus 5 Original Android Development] Zenoran:
wow. This totally made the screen less annoying. It looked awesome in the sunlight but crappy at night. Now it looks awesome in both situations. :)
[Nexus 5 Original Android Development] sturmeh:
Lux does not reduce the backlight below the zero level, as it has no kernel access to do so.

This kernel module allows the hardware to reduce the backlight by a good amount, which Lux can then harness (without even knowing about it) because there is a new 1% level. (Lux will bring the brightness down to 1% before using an overlay to darken the screen.)

The result is a more uniform and colour rich level of darkness. :)

You'll notice if you use Screen Filter or Lux the screen would otherwise wash out and still bleed.

It's worth a try, test it before and after, the difference is about 20% of Lux sub-brightness. (I was using -35% and now I'm using -15%)
[Nexus 5 Original Android Development] emerica243:
Thanks guys, i may just have to load it up. However i dont go lower then Lux's 1% anyway, so this probably wont benefit me in anyway?

Sturmeh, what lux brightness mode do you use? I would like to use adaptive, but it seems like it doesnt transition it smooth enough, unless i havent tweaked the settings correctly. Ive been using Ascendingly lately, but hate that it wont dim down until i turn off the screen and bring it back on. Which sucks when im inside, turn on the phone, it sets the brightness, then i still have it on and walk outside, and hten its unreadable cause its using the same set brightnes.
[Nexus 5 Original Android Development] arararagi:
Uploaded new version that includes some levels between absolute minimum and stock minimum for a smoother transition.

Why not? If it's already dark enough for you, then you won't benefit. If you don't go lower because you don't like the contrast reduction, then it'll benefit you.
[Nexus 5 Original Android Development] Nelsocracy:
I'm loving the new steps! The original mod made it so dim that I had trouble reading some screens, this is perfect.
[Nexus 5 Original Android Development] Michealtbh:
Will this affect the stock auto brightness levels at all?
[Nexus 5 Original Android Development] Nelsocracy:
Looks to be like it does (which I like). But if you want to tweak the auto brightness levels Lux works great for that.
[Nexus 5 Original Android Development] arararagi:
Yes. Everything will be darker, though it'll only be noticeable at the low end.
[Nexus 5 Original Android Development] notbrodie:
[MENTION=5064727]arararagi[/MENTION]

so, any chance you'll add set on boot to your module manager?
[Nexus 5 Original Android Development] arararagi:
Yes
[Nexus 5 Original Android Development] teshxx:
Ok so to use lux...all I have to do is install the kernel and then set lux to 1 right ? Nothing else ?
[Nexus 5 Original Android Development] arararagi:
You need to change "backlight zero point" in the settings.
[Nexus 5 Original Android Development] teshxx:
Thank you!
[Nexus 5 Original Android Development] ihatelolcats:
is this meant to be used with auto brightness? or manual only? my screen gets noticeably dimmer when i turn off auto even though the slider doesnt move
[Nexus 5 Original Android Development] creator2456:
My backlight goes completely dark when sliding brightness bar to '0' after I run the app. Is this normal? Running Stock Rooted + Faux
[Nexus 5 Original Android Development] arararagi:
It will work with auto, but the screen will be darker than on stock.

Version 1 works identical to stock except on minimum brightness.

That's stock behaviour.
[Nexus 5 Original Android Development] arararagi:
If the screen completely turns off, then it's not normal, but it's normal for it to be very dark.

It's dark enough to appear off in sunlight or a bright room.

Make sure you only turn it to minimum brightness in a dark room.
[Nexus 5 Original Android Development] Ecf17:
Will this work with faux123's mainline build? http://xdaforums.com/showthread.php?t=2509655
[Nexus 5 Original Android Development] ihatelolcats:
ok, its not working for me. i have faux kernel (modules ok) and art enabled and im rooted. yesterday i installed v2 and loaded it in kmm but couldnt tell that it worked. i uninstalled and tried v1 and it wont install, and now v2 installs but gives an error "not rooted or kernel does not support modules"
[Nexus 5 Original Android Development] h4m74ro:
With this mod the left part of the screen is much darker for me. It cannot be unseen on low brightness values :(
[Nexus 5 Original Android Development] arararagi:
I just grabbed hammerhead-faux123-002b02, extracted the boot.img and flashed using Flashify and it works.

If it says loaded in KMM, then it's working. You just need to change your brightness and you will notice it's darker.

Weird. It could be a hardware issue or there might be different hardware configurations.

Can you reboot (DON'T load the module) and run the following in a root shell on your phone:

cd /sys/kernel/debug/lm3630

grep . *

and then copy and paste the result here?
[Nexus 5 Original Android Development] h4m74ro:
Sure. I had brightness at minimum.

u0_a110@hammerhead:/ $ cd /sys/kernel/debug/lm3630
u0_a110@hammerhead:/sys/kernel/debug/lm3630 $ grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0x05
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x02
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00
u0_a110@hammerhead:/sys/kernel/debug/lm3630 $
[Nexus 5 Original Android Development] creator2456:
Tried this again and still getting a completely dark screen.

Had to use a bright flashlight to help me see the screen to get the backlight back on :eek:

I'll try to post a video, but is there any log I can pull for you that might help?
[Nexus 5 Original Android Development] arararagi:
Run the same commands that I asked h4m74ro for.

I'll investigate soon.
[Nexus 5 Original Android Development] ihatelolcats:
now it does not say its loaded though :confused:
[Nexus 5 Original Android Development] arararagi:
What you quoted wasn't directed at you.

What you need to do is:

- Go to your Superuser app and make sure KMM isn't there

- Uninstall KMM

- Reboot

- Install KMM

- Open it, grant it root access

- Click load

- Change your brightness
[Nexus 5 Original Android Development] creator2456:
Not Loaded

[I]Full Brightness[/I]
[code]
root@hammerhead:/ # cd /sys/kernel/debug/lm3630
root@hammerhead:/sys/kernel/debug/lm3630 # grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0xff
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x02
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00
root@hammerhead:/sys/kernel/debug/lm3630 #

Dimmest

root@hammerhead:/ # cd /sys/kernel/debug/lm3630
root@hammerhead:/sys/kernel/debug/lm3630 # grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0x05
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x06
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00
root@hammerhead:/sys/kernel/debug/lm3630 #

[/code]

Loaded

[I]Full Brightness[/I]
[code]
root@hammerhead:/sys/kernel/debug/lm3630 # grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0xff
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x12
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x00
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00
root@hammerhead:/sys/kernel/debug/lm3630 #

Dimmest

root@hammerhead:/sys/kernel/debug/lm3630 # grep . *
BOOST_CTL:0x30
BRIGHTNESS_A:0x01
BRIGHTNESS_B:0x00
CONFIG:0x08
CONTROL:0x15
CURRENT_A:0x00
CURRENT_B:0x1f
FAULT_STAT:0x00
IRQ_ENABLE:0x00
IRQ_STATUS:0x00
ON_OFF_RAMP:0x00
PWM_OUT:0x00
REVISION:0x02
RUN_RAMP:0x00
SOFT_RESET:0x00
root@hammerhead:/sys/kernel/debug/lm3630 #

[/code]
[Nexus 5 Original Android Development] GSLEON3:
[MENTION=5064727]arararagi[/MENTION] is there any way you can do this for the Nexus 7 2013? It suffers the same harsh brightness & is killing my eyes during bedtime reading. I am more than willing to lend a hand in testing & while I am not a developer, I have been around a long time & I am knowledgeable enough to pull logs, edit smali, etc. This would be awesome for the N7 2013.
[Nexus 5 Original Android Development] adzjwarner:
This. I've not even rooted that one yet! But this would give me a very good reason too. Thanks for all your hard work OP, it's much appreciated!