The South Korean technology giant LG Electronics is best known by Android enthusiasts for its flagship LG G series of smartphones, but the company also offers the V series of smartphones which is best known for its signature Second Screen. Though many users are hotly anticipating this year’s upcoming V30 model, fans of last year’s model should not feel left out thanks to some recent developments. Developers on our LG V20 forums have been hard at work getting the Second Screen to work with AOSP-based custom ROMs, and they have finally done it. After months of effort, the LG V20 Second Screen can now show custom Second Screen, third-party widgets on both rooted and unrooted, stock-based or AOSP-based, devices.
An Overview of LG V20’s Second Screen
Owners of the LG V20 are familiar with the existing Second Screen features in LG’s software. The Second Screen can show notifications while the main display is on, and it also offers a few enhancements to some stock apps such as the browser or video app. In addition, there are a few widgets you can select from in the Second Screen settings:
While the existing features certainly have their uses, it’s disappointing that the available options to customize the LG V20 Second Screen are so limited. Users have been clamoring for LG to release an official API that developers could use to create their own widgets, but thus far there’s been no indication that the company is open to anything of the sort. LG V20 customization without a Second Screen API is fairly limited.
While that means most owners of the latest LG V flagship have to live with only the stock options available to them, the lack of an API was an even greater issue for those users who prefer using a custom ROM based on the Android Open Source Project (AOSP).
A Second Screen-less LG V20 on AOSP ROMs
There’s a lot to love about the LG V20. It is one of the few remaining flagship smartphones with a removable battery, after all. But some users aren’t big fans of the LG UX, which leaves a lot to be desired in terms of LG V20 customization. As with any other device, these same users have the option to unlock the bootloader (either officially or unofficially for some models) and then flash a ROM such as LineageOS. But in doing so, they lose the use of the phone’s signature feature – its Second Screen.
Physically, the Second Screen isn’t actually a secondary display. What is marketed as a Second Screen is actually the same physical display panel (with a resolution of 1040×160, it doesn’t span the entire width of the device because it is cut off by the front-facing camera and other sensors). LG’s engineering team was able to create its pseudo-secondary display feature through framework and kernel modifications. As mentioned previously, how exactly they achieved this is unknown to us because it’s all closed source.
Early builds of ROMs based on AOSP were quite buggy, with the main display image extending into what was the Second Screen area. This is obviously undesirable behavior, so the V20’s LineageOS maintainer understandably disabled the Second Screen entirely by offsetting the area where the display draws pixels as well as where the active touch panel area.
Hence, any V20 user who wanted to flash a custom ROM like LineageOS would have to deal with losing the phone’s most visible feature. Since the official code to get the Second Screen working isn’t available for public use, there hasn’t been an easy way to get it working on these ROMs. Even something like ripping the binaries from the stock ROM isn’t enough because reverse engineering the binaries and reading the assembly code would require an incredible amount of effort that most hobbyist developers simply can’t afford. The movement to open up the official Second Screen implementation seemed an impossible task.
Open Source Second Screen API
While many developers who initially purchased the LG V20 eventually moved on to other devices, not everyone gave up on this effort. A thread was started on our forums in February dedicated to the effort to bring LG’s Second Screen feature to AOSP ROMs. Most importantly, the developers prioritized making an API that was both open source and extensible by third parties. This means that the API they would create would not infringe on LG’s proprietary technology and it would also allow any developer to make their own custom widgets for the Second Screen.
Progress was slow, but thanks to the arduous work over many months by several developers including XDA Senior Members Zacharee1, USA-RedDragon, me2151, and jthrasher47 as well as XDA Recognized Developers Dameon87, albinoman887, and bigrushdog, progress was being made. 2 weeks ago, Zacharee1 shared the following images proving that an AOSP implementation of LG’s Second Screen widgets was possible:
While these images only showed the same stock widgets found on the stock LG V20 UX, it was still a major development. And only a few days later, USA-RedDragon made a breakthrough in how to get the Second Screen working on AOSP without the overflow display issues of old. To quote the developer:
I accidentally came across some code while trying to make the second screen act like a literal second display instead of an extension that played with offsets and managed to make it offset all apps except for the second screen service I’ve been making. The second breakthrough came when I realized it was impossible to blank out some of the display in AOSP, so it had to be in the kernel. With help from Rashed(the LineageOS maintainer for the LG G5, G6, and the TMO V20) I managed to identify existing code in the kernel to keep the second screen on, while the main panel was blanked. Once these two breakthroughs worked as expected, I knew it was nearing completion and decided to start teasing the community.
After a lot of help from XDA Members me2151, Zacharee1, albinoman887, and bigrushdog, the project kept being pushed forwards until it was finally in a usable state. Now, the work that these developers have done is able to be packaged into any ROM based on the AOSP source code, and the open source API that they’ve made means that any third-party developer can now make Second Screen widgets to be uploaded to the Play Store. This opens up a whole new avenue for LG V20 customization.
Around the end of this week (tentative release date of August 18th), the developers will release a patch for custom ROM developers, the open source API as well as a template for third-party developers to use, and a few sample apps replicating the original features. USA-RedDragon states that the widgets based on LG’s stock set will be free for download, while he will also release a few premium widgets for $0.99.
I asked USA-RedDragon what kinds of features we might expect out of this new API, and he suggested that the following is in the works:
- Stock-like apps such as a music player, notifications, and quick settings. Quick settings will be incorporated into Android’s stock Quick Setting tile implementation, meaning any tile can be added to the Second Screen. The signature and clock feature will all be built into the ROM.
- Other non-stock features will be added such as an LED-like color display (so if you get a notification while the phone’s display is off, and the LED would normally light up blue and blink, the second screen will emulate that). The Pulse equalizer can also be shown in the second screen area while playing music or watching videos.
- A few premium second screen apps such as charging statistics while the display is off, an RSS ticker feed, customizable buttons for user-specific actions (such as launching Tasker tasks). The possibilities now are endless!
It should be noted that this work was all done by hobbyist developers in their spare time. Compared to the professional work done by engineers on LG’s payroll, this API can be considered to be a dirty hack. The work done by these developers is not “superior” to LG’s implementation, but it is far more open. And thanks to that, users can finally unlock the true potential of the V20’s Second Screen with whatever custom Second Screen widgets that they want to have – broadly enhancing LG V20 customization.
Custom Second Screen Widgets for Stock, Unrooted Devices
As if the above developments aren’t exciting enough already, it’s also been discovered that apps made using this API also work on LG’s stock software. This means that any Second Screen widgets that developers make can be used by both users of an unrooted, completely stock LG V20 as well as an unrooted/rooted device on a custom ROM.
This breakthrough was made by Zacharee1 while he was in the process of making widgets based on the new open source API. He found the AppWidget custom category that LG uses by decompiling LG QuickTools, and by using that he was able to get his own custom Second Screen widgets to show up in the settings.
He made an open source application called LG V20 Custom SignBoard Widgets that is currently in beta testing. Several users on the app’s forum thread have noted that it works on their unrooted LG V20 devices after granting the application the WRITE_SECURE_SETTINGS and BATTERY_STATS permissions via ADB. Right now, the app mostly just allows you to use colored versions of the stock information display and music controller, but as it was quickly released as a proof of concept to test functionality on unrooted devices, it has definitely done its job.
LG V20 Custom SignBoard Widgets (Unreleased) (Free, Google Play) →
Fully Custom LG V20 Second Screen, Coming Soon
Months and months of hard work has finally paid off. Custom Second Screen functionality is now finally possible on the LG V20. For the average user to take advantage of custom widgets, you’ll have to wait just a few days longer for developers to get their hands on the open sourced API. But the long wait is finally over, so if you’ve been hungering to customize the LG V20, then keep a close eye out on our XDA V20 forums for all of the latest information about this development as it continues.
from xda-developers http://ift.tt/2x44Tx3
via IFTTT
Aucun commentaire:
Enregistrer un commentaire