[Nexus 5X Themes and Apps] enryea123:
Hey everyone!

As some of you might know, the nexus 5x and nexus 6p cameras have a maximum exposure time in manual mode of 1/4.3 seconds, which is a real shame. Somebody suggested that Google made this choice because of the bigger size of the pixels, nonetheless the resulting pictures in very low light are not satisfying and none of the apps on the play store overrides the limit of 1/4.3 seconds.

So, I managed to unlock longer exposure times (up to 5 seconds) on the nexus 5x camera to take some truly unbelievable night pictures. Since the sensor is the same, this app should work also on the nexus 6p and it might work even on other devices with at least android 5.0. It also probably works on the nexus 5, but doesn't appear to be working on the nexus 6.

A big thank to PkmX for developing the original app Lcamera and to CazeW for his suggestions.

Notice that the photos will be upside down, because the sensor is mounted upside down (at least in the nexus 5x). Just rotate them with your favorite photos editor. Also notice that the "screen refresh time" is the one of the exposure, so when you set an exposure of e.g. 3 seconds, the app will look like if it's stuck and refresh every 3s.

I am not responsible for any damage that your phone might report. I've been using this app for a long time and everything works fine.

You can download the .apk file and the source code at the bottom. To install the app you only need the .apk file, the source code is for developers who wish to improve the code.

Check the difference between a manual camera downloaded from the play store and my app (the pics are resized here).

Click on the images to enlarge.

View attachment 3963505View attachment 3963506

How did I do it?

I exploited the fact that the older versions of Lcamera by PkmX allowed up to 1/1.2 seconds of exposure time (probably because the nexus 5x wasn't supported yet), so I downloaded the source of lcamera 0.3 by PkmX, modified a few lines of code and compiled it.

The exposure times of my modded app are: 5s, 4s, 3s, 2s, 1.5s, 1s, 0.5s, 0.23 s, ... and so on, up to 1/120000 s (the default minimum value) and you can change them in the settings of the app.

Why not more than 5 seconds?

Because the app gets really unstable, since those exposure times are not officially "hardware" supported.

EDIT: a user suggested here that the app might be stable for even longer exposures with a longer kernel readahead.

Beware that the app can be unstable even with exposure times longer than 3 seconds: if it starts crashing, just terminate it in the settings. I usually set the exposure time back to 1/10 s every time I close the app, otherwise the following times it might just crash when entering in it.

Therefore, with this app you can get some beautiful night pictures, the drawback is that sometimes it might be unstable (because those exposures are not hardware supported).

What did I modify?

In src/pkmx/lcamera/MainActivity.scala I've modified lines 417, 419, 693 and deleted the line 1083. You can download my source code at the bottom, the original source code from github and compare them, to see in more detail which are the differences.

I've also modified the app icon with one that I've personally designed.

Thank you and have fun :)