Has anyone tried this? We have the hardware behind it (twl6040).
I compiled the driver for it, and found the firmware blobs it wanted to load.
Insmod dmesg logs:
Code:
<3>[ 3012.835601] init: no such service 'fm_dl'
<3>[ 3014.386718] init: untracked pid 2225 exited
<3>[ 3015.045623] init: untracked pid 2213 exited
<6>[ 3015.710144] (stc): st_register(8)
<6>[ 3015.710174] (stc): chnl_id list empty :8
<6>[ 3015.710205] (stk) : st_kim_start
<6>[ 3015.710205] Enable wl12xx power
<6>[ 3015.917175] (stk) :ldisc_install = 1
<6>[ 3015.968597] (stc): st_tty_open
<6>[ 3015.968627] (stk) :line discipline installed
<6>[ 3015.969879] (stk) :TIInit_7.6.15.bts
<6>[ 3016.060791] (stc): add_channel_to_table: id 8
<6>[ 3016.726562] (stc): remove_channel_from_table: id 8
<6>[ 3016.726623] (stc): all chnl_ids unregistered
<6>[ 3016.726684] (stk) :ldisc_install = 0
<6>[ 3016.727081] (stc): st_tty_close
<6>[ 3016.729278] Disable wl12xx power
<6>[ 3023.407836] (stc): st_register(8)
<6>[ 3023.407897] (stc): chnl_id list empty :8
<6>[ 3023.407928] (stk) : st_kim_start
<6>[ 3023.407958] Enable wl12xx power
<6>[ 3023.615295] (stk) :ldisc_install = 1
<6>[ 3023.666046] (stc): st_tty_open
<6>[ 3023.666107] (stk) :line discipline installed
<6>[ 3023.666595] (stk) :TIInit_7.6.15.bts
<6>[ 3023.755706] (stc): add_channel_to_table: id 8
The radio app, itself, seems to want to work.
logcat logs
Code:
D/fm_apln ( 2190): freq_set_dlg_shw: Frequency changing to : 106500 KHz
D/fm_srvc ( 2190): dhrdw_freq_set fd: 6 freq: 106500
D/fm_hrdw ( 2190): hrdw_so_freq_set api_hndl: 6 freq: 106500
D/fm_hrdw ( 2190): gen_freq_set freq: 106500 limited: 106500
D/fm_hrdw ( 2190): rds_reset
D/fm_hrdw ( 2190): v4_freq_set: 106500
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_pi_chngd
D/fm_srvc ( 2190): dhrdw_pi_get fd: 6
D/fm_hrdw ( 2190): hrdw_so_pi_get api_hndl: 6 pi: 0x0
D/fm_apln ( 2190): on_pi_chngd
D/fm_hrdw ( 2190): v4_freq_set VIDIOC_S_FREQUENCY success
D/fm_sttn ( 2190): pt_parse: 0
D/fm_apln ( 2190): run_on_pi_chngd run
D/fm_apln ( 2190): run_on_pi_chngd run pi: 0 cs: null
D/fm_apln ( 2190): run_on_pi_chngd run cs: 0000 m_just_pi: true m_just_pi_time: 1395133231826
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_freq_chngd: freq: 106500
D/fm_apln ( 2190): on_freq_chngd freq: 106500
D/fm_apln ( 2190): ui_sttn_info_reset m_freq: 106500 sttn_name: 106.5
D/fm_sttn ( 2190): pt_parse: 0
D/fm_apln ( 2190): sttn_id_tv_set m_station_id: 0 sttn_id: PI: 0
D/fm_apln ( 2190): prefs_set int: last_frequency = 106500
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): dhrdw_pt_get fd: 6
D/fm_hrdw ( 2190): hrdw_so_pt_get api_hndl: 6 pt: -1
D/fm_srvc ( 2190): evt_pt_chngd: -1
D/fm_apln ( 2190): cb_on_pt_chngd
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_ps_chngd:
D/fm_apln ( 2190): run_on_pt_chngd: -1
D/fm_sttn ( 2190): pt_parse: -1
D/fm_sttn ( 2190): pt_parse: -1
E/fm_hrdw ( 2190): iris_buf_display error: 22
E/fm_hrdw ( 2190): iris_buf_display error: 22
D/fm_srvc ( 2190): evt_rt_chngd:
D/fm_hrdw ( 2190): v4_rssi_get VIDIOC_G_TUNER success name: FM type: 1 cap: 0x91 lo: 1400000 hi: 1728000 sc: 3 am: 1 sig: 31097 afc: 0
No audio. I'm not sure if I just need to use a mixer to map it or if I have further driver problems.
Sometimes I get these errors?
Code:
<3>[ 3081.753814] fmdrv: Response SKB ptr not NULL
<3>[ 3081.754577] fmdrv: Response SKB is missing
<3>[ 3082.530303] fmdrv: Response SKB ptr not NULL
<3>[ 3082.531036] fmdrv: Response SKB is missing
Anyway, I'm thinking it's possible with some work.
Well I definitely know that it's going to be possible with a little bit of work.
I managed to get a split second of audio from radio station while I was messing with spirit radio settings and unplugged the headset.
Don't know what I did because I haven't managed to recreate, but it was enough to let me know that it was there and just needs to be mapped.
If anyone else would like to work with me on this, here's the files:
http://www.mediafire.com/download/6296mev66ydlb2y/fm_radio_files.zip
the *.bts files go in /system/etc/firmware
fm_drv.ko goes in /system/lib/modules
omap audio-tool (which I just compiled) goes in /system/xbin
You have to procure spirit FM unlocked (from market or elsewhere).
I'm not going to get involved but that's cool and unexpected. Good stuff.
Well at least I found a practical use for audio-tool. Apparently our sound chipset is normally configured for low-power operation. You can use audio-tool to change this to high performance.
Code:
[email protected]:/ # audio-tool mix
Number of controls: 71
ctl type num name value
0 ENUM 1 DL1 Equalizer Flat response
1 ENUM 1 Sidetone Equalizer Flat response
2 ENUM 1 AMIC Equalizer High-pass 0dB
3 ENUM 1 DMIC Equalizer High-pass 0dB
4 INT 1 DL1 Media Playback Volume 132
5 INT 1 DL1 Tones Playback Volume 0
6 INT 1 DL1 Voice Playback Volume 130
7 INT 1 DL1 Capture Playback Volume 0
8 INT 1 VXREC Media Volume 0
9 INT 1 VXREC Tones Volume 0
10 INT 1 VXREC Voice DL Volume 0
11 INT 1 VXREC Voice UL Volume 0
12 INT 1 AUDUL Media Volume 0
13 INT 1 AUDUL Tones Volume 0
14 INT 1 AUDUL Voice UL Volume 120
15 INT 1 AUDUL Voice DL Volume 0
16 INT 1 SDT UL Volume 101
17 INT 1 SDT DL Volume 120
18 INT 2 DMIC1 UL Volume 120 120
19 INT 2 DMIC2 UL Volume 120 120
20 INT 2 DMIC3 UL Volume 120 120
21 INT 2 AMIC UL Volume 120 120
22 INT 2 BT UL Volume 126 126
23 BOOL 1 DL1 Mono Mixer Off
24 BOOL 1 AUDUL Mono Mixer Off
25 BOOL 1 DL1 MM_EXT Switch Off
26 BOOL 1 DL1 BT_VX Switch Off
27 BOOL 1 DL1 PDM_DL2 Switch On
28 BOOL 1 DL1 PDM Switch Off
29 BOOL 1 Sidetone Mixer Capture Off
30 BOOL 1 Sidetone Mixer Playback On
31 BOOL 1 Capture Mixer Tones Off
32 BOOL 1 Capture Mixer Voice Playback Off
33 BOOL 1 Capture Mixer Voice Capture Off
34 BOOL 1 Capture Mixer Media Playback Off
35 BOOL 1 Voice Capture Mixer Tones Playback Off
36 BOOL 1 Voice Capture Mixer Media Playback Off
37 BOOL 1 Voice Capture Mixer Capture Off
38 BOOL 1 DL1 Mixer Tones Off
39 BOOL 1 DL1 Mixer Voice Off
40 BOOL 1 DL1 Mixer Capture Off
41 BOOL 1 DL1 Mixer Multimedia On
42 ENUM 1 MUX_VX1 None
43 ENUM 1 MUX_VX0 None
44 ENUM 1 MUX_UL11 None
45 ENUM 1 MUX_UL10 None
46 ENUM 1 MUX_UL07 None
47 ENUM 1 MUX_UL06 None
48 ENUM 1 MUX_UL05 None
49 ENUM 1 MUX_UL04 None
50 ENUM 1 MUX_UL03 None
51 ENUM 1 MUX_UL02 None
52 ENUM 1 MUX_UL01 None
53 ENUM 1 MUX_UL00 None
54 INT 2 Capture Preamplifier Volume 1 1
55 INT 2 Capture Volume 4 4
56 INT 2 Aux FM Volume 3 3
57 INT 2 Headset Playback Volume 7 7
58 INT 2 Handsfree Playback Volume 26 26
59 INT 1 Earphone Playback Volume 15
60 ENUM 1 Headset Power Mode Low-Power
61 BOOL 1 Earphone Playback Switch Off
62 BOOL 1 Spk Right Playback Switch On
63 BOOL 1 Spk Left Playback Switch On
64 ENUM 1 Headset Right Playback Off
65 ENUM 1 Headset Left Playback Off
66 ENUM 1 Handsfree Right Playback HF DAC
67 ENUM 1 Handsfree Left Playback HF DAC
68 ENUM 1 Analog Right Capture Route Off
69 ENUM 1 Analog Left Capture Route Off
70 ENUM 1 TWL6040 Power Mode Low-Power
[email protected]:/ # audio-tool mix 70 1
[email protected]:/ # audio-tool mix
Number of controls: 71
ctl type num name value
0 ENUM 1 DL1 Equalizer Flat response
1 ENUM 1 Sidetone Equalizer Flat response
2 ENUM 1 AMIC Equalizer High-pass 0dB
3 ENUM 1 DMIC Equalizer High-pass 0dB
4 INT 1 DL1 Media Playback Volume 132
5 INT 1 DL1 Tones Playback Volume 0
6 INT 1 DL1 Voice Playback Volume 130
7 INT 1 DL1 Capture Playback Volume 0
8 INT 1 VXREC Media Volume 0
9 INT 1 VXREC Tones Volume 0
10 INT 1 VXREC Voice DL Volume 0
11 INT 1 VXREC Voice UL Volume 0
12 INT 1 AUDUL Media Volume 0
13 INT 1 AUDUL Tones Volume 0
14 INT 1 AUDUL Voice UL Volume 120
15 INT 1 AUDUL Voice DL Volume 0
16 INT 1 SDT UL Volume 101
17 INT 1 SDT DL Volume 120
18 INT 2 DMIC1 UL Volume 120 120
19 INT 2 DMIC2 UL Volume 120 120
20 INT 2 DMIC3 UL Volume 120 120
21 INT 2 AMIC UL Volume 120 120
22 INT 2 BT UL Volume 126 126
23 BOOL 1 DL1 Mono Mixer Off
24 BOOL 1 AUDUL Mono Mixer Off
25 BOOL 1 DL1 MM_EXT Switch Off
26 BOOL 1 DL1 BT_VX Switch Off
27 BOOL 1 DL1 PDM_DL2 Switch On
28 BOOL 1 DL1 PDM Switch Off
29 BOOL 1 Sidetone Mixer Capture Off
30 BOOL 1 Sidetone Mixer Playback On
31 BOOL 1 Capture Mixer Tones Off
32 BOOL 1 Capture Mixer Voice Playback Off
33 BOOL 1 Capture Mixer Voice Capture Off
34 BOOL 1 Capture Mixer Media Playback Off
35 BOOL 1 Voice Capture Mixer Tones Playback Off
36 BOOL 1 Voice Capture Mixer Media Playback Off
37 BOOL 1 Voice Capture Mixer Capture Off
38 BOOL 1 DL1 Mixer Tones Off
39 BOOL 1 DL1 Mixer Voice Off
40 BOOL 1 DL1 Mixer Capture Off
41 BOOL 1 DL1 Mixer Multimedia On
42 ENUM 1 MUX_VX1 None
43 ENUM 1 MUX_VX0 None
44 ENUM 1 MUX_UL11 None
45 ENUM 1 MUX_UL10 None
46 ENUM 1 MUX_UL07 None
47 ENUM 1 MUX_UL06 None
48 ENUM 1 MUX_UL05 None
49 ENUM 1 MUX_UL04 None
50 ENUM 1 MUX_UL03 None
51 ENUM 1 MUX_UL02 None
52 ENUM 1 MUX_UL01 None
53 ENUM 1 MUX_UL00 None
54 INT 2 Capture Preamplifier Volume 1 1
55 INT 2 Capture Volume 4 4
56 INT 2 Aux FM Volume 3 3
57 INT 2 Headset Playback Volume 7 7
58 INT 2 Handsfree Playback Volume 26 26
59 INT 1 Earphone Playback Volume 15
60 ENUM 1 Headset Power Mode Low-Power
61 BOOL 1 Earphone Playback Switch Off
62 BOOL 1 Spk Right Playback Switch On
63 BOOL 1 Spk Left Playback Switch On
64 ENUM 1 Headset Right Playback Off
65 ENUM 1 Headset Left Playback Off
66 ENUM 1 Handsfree Right Playback HF DAC
67 ENUM 1 Handsfree Left Playback HF DAC
68 ENUM 1 Analog Right Capture Route Off
69 ENUM 1 Analog Left Capture Route Off
70 ENUM 1 TWL6040 Power Mode High-Performance
[email protected]:/ #
I'm not real sure where to start as far as mapping.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My device has met with QC issues and I've elected not to replace it. Development on this project may stagnate
LogoPlus is an Open Source Alternative to the stock Razer Chroma Configurator app and corresponding service
The latest version can be downloaded from GitHub (cant load XDAs upload plugin in my browser for some reason)
Demo video attached to post #2
The current feature set includes:
Select custom notification color per app
Set LED brightness
Up to 4 apps' colors on the logo at once
5 different passive effects
Animation for phone ringing, with different colors per contact
Pocket mode. Lights turn off if placed into a pocket or bag
Automation integration (Tasker/Locale)
Charging animation
Custom effect programs
Music visualizer (controllable via automation plugin)
In order to use the app correctly, please disable the "Chroma" system app
Currently notifications will only be displayed when the phone is locked (screen off or on lock screen)
Also please enable notification access for the app as it currently doesnt ask for it automatically
Also please disable battery optimisation for the app so Android doesn't kill the service
Also I haven't done apps for a while, so please excuse the very messy code
XDA:DevDB Information
LogoPlus, Device Specific App for the Razer Phone 2
Contributors
CurtisMJ
Source Code: https://github.com/CurtisMJ/LogoPlus
Version Information
Status: Stable
Current Stable Version: 1.0.13
Stable Release Date: 2020-04-09
Created 2019-01-26
Last Updated 2020-04-09
Reserved
Changelog:
v1.0:
- Initial release
v1.0.1:
- Improved service coordination
- Code cleanup
- Added passive effects
v1.0.2
- Bug fixes and code cleanup
- Service co-ordination improvements
v1.0.3
- Moved to Room DB for persistence
- Support libraries migrated to AndroidX
- Various threading and coordination improvements
v1.0.4
- Main service is now a proper state machine, allowing for functionality to be more easily added in future
- Notification listener caches settings in RAM for better performance and efficiency
- Various bug fixes
v1.0.5
- Tweaked microcode to be more efficient, as a result, 6 colors can now be displayed at once for app notifications.
- State machine paths improved
- Separation of concerns in state machine, allowing for more possible backends for controlling the lights (such as stock ROM system services)
- Phone ring animation! Complete with specific colors per contact!
Disclaimer:
This build contains dormant code for both the rootless mode and music visualizer, 'cause using feature branches would mean I have my life together. I'll activate them when they're stable enough to actually use.
v1.0.6
- Pocket mode! When the screen is switched off, the app will query various sensors for a few seconds afterwards and if it is determined the device is placed in a pocket or bag, the lights will be disabled, which can save battery.
- Some explanations added for the 2 toggles in the passive effect screen
- Service worker wakelock renamed to more accurately describe its source
- Code cleanup
v1.0.7
- First stable release
- New icon
- Automation integration (Tasker) first phase
- In order for automation to work, the "Allow Automation" switch must be turned on from the main drawer
- New "Roll" passive effect
- Code cleanup and optimization
v1.0.8
- Charging animation
- Various improvements to state machine
- Now asks for exemption from battery optimization
- Sped up fadeout effect
v1.0.9
- Dependency updates (newer libsuperuser)
- Added custom effects!
NOTE: Custom effect programs must be compiled with Texas Instruments' Lysti compiler which can be found on the support page of the LP5523 controller.
See my Chroma research thread on XDA for details:
https://forum.xda-developers.com/razer-phone-2/development/research-oss-chroma-service-t3890290
v1.0.10
- Limit of 6 apps on LEDs at once has been reduced to 4 in order to generate higher quality microcode, as there was an issue with timing before which could make it unclear what color the logo is flashing
- Now uses E164 format phone numbers internally for comparison. This should make number identification for ring animation more reliable.
- Notification preference for apps now previews the color on the logo while picking
v1.0.11
- Music Visualizer! Toggle the visualizer switch in the drawer and then play some music!
Side note: I'm pretty sure this is bad for the LEDs. Use sparingly
v1.0.12
Now asks for recording permissions!
Also BitDefender didn't mark it as malicious! I have literally no idea!
v1.0.13
Added ability to control visualizer state from automation plugin! (Tasker, Locale)
You may wish to disable the toggle for automatic visualization state control in the main UI as this may interfere with your custom logic in your automation application of choice.
Reserved
Creating custom effects
The app supports loading of custom microcode programs into an effect slot. This allows for many possible lighting effects for the passive effect.
Please note that creating custom effects is very advanced! One should have at least some knowledge of assembly, programming and integrated circuits in general. Reading Texa Instruments' literature on the controller is strongly advised, the LED controller is very constrained in it's abilities.
In order to begin, you will need the TI Lysti compiler. You can find a link to it in post #1 of my Chroma Research Thread under "Controller OEM support"
The compiler compiles an assembly style language called Lysti into a .hex file. Rename the .hex to .txt and place the file somewhere on your phone's internal storage, then click the "Load Custom" button from in the app and select the file. The program will be validated and you will see either a success or failure message. Once loaded, the program will play as the passive effect if you have the "Custom" effect selected as your passive effect. Only one program at a time is currently supported.
Below is a sample of the "Pinwheel" effect used by the app in Lysti:
Code:
ENG1: dw 0000000001011000b ; R G B
ENG2: dw 0000000010100001b ; G B R
ENG3: dw 0000000100000110b ; B R G
ALL: dw 0000000111111111b
.segment program1
mux_map_addr ALL
set_pwm 0
trigger s{2|3}
loop2: mux_map_addr ENG1
ramp 2, 255
ramp 2, -255
ramp 2, -255
branch 0, loop2
rst
.segment program2
trigger w{1}
loop3: mux_map_addr ENG2
ramp 2, -255
ramp 2, 255
ramp 2, -255
branch 0, loop3
rst
.segment program3
trigger w{1}
loop4: mux_map_addr ENG3
ramp 2, -255
ramp 2, -255
ramp 2, 255
branch 0, loop4
rst
This compiles into the following .hex
Code:
00 58 00 A1 01 06 01 FF 9F 83 40 00 E0 0C 9F 80
20 FF 21 FF 21 FF A0 03 00 00 E0 80 9F 81 21 FF
20 FF 21 FF A0 01 00 00 E0 80 9F 82 21 FF 21 FF
20 FF A0 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@ 04 program1
@ 0D program2
@ 14 program3
The first 12 lines consist of the compiled bytes of the program followed by the offsets for the 3 program counters (The controller is a triple core )
Wicked work mate!!! A music visualizer would be a great addition
Wicked work mate!!! A music visualizer would be a great addition. Are you able to compile it for as apk
DanXbix said:
Wicked work mate!!! A music visualizer would be a great addition. Are you able to compile it for as apk
Click to expand...
Click to collapse
Apk is available in the download tab. You might have to view the thread in a browser
CurtisMJ said:
Apk is available in the download tab. You might have to view the thread in a browser
Click to expand...
Click to collapse
yup worked it out was on phone lol
Update
New version v1.0.1 available in Downloads section!
amazing work!!!
working on phh-aosp
Awesome work! So glad someone has taken this on. Will definitely watch this thread and look forward to future updates, feature expansions, and bug fixes, etc. Good job so far.
Will it always be the case that the app requires root access?
I keep getting this when enabling the service
AbsoluteContingency said:
Will it always be the case that the app requires root access?
Click to expand...
Click to collapse
It might be possible to implement the functionality in a daemon, or even as a system service for custom ROMs where we can add source code (this is how Razer did it).
It's also probably possible to use Razer's own system service, but that's a lot of reverse engineering on the Chroma Configurator, and won't work for custom ROMs. Using root seems more aligned to the purpose of the app at the moment but I'll consider alternatives. Most of the magic was figuring out the microcode anyway
ctakah27 said:
I keep getting this when enabling the service
Click to expand...
Click to collapse
Just realized I have release builds up so the logs won't even be much use... Sorry about that, you can try clearing the app's data and see if it'll cooperate. I've got another version soon. I'll remember to enable debug build
Awesome work! This is functionality that should have shipped with the phone from the factory. Been running the pinwheel animation for the past 1.5 days and haven't noticed any increased battery usage.
CurtisMJ said:
... I've got another version soon. ...
Click to expand...
Click to collapse
Ok maybe not soon soon. But definitely this afternoon
OK, new build is up! v1.0.3
This is mostly just trying to stabilize the app. New features should come soon
If the release build gives issues, please switch to the debug build and capture some logcats. Only logcats for the application package is sufficient
Lastly, as I've changed the persistence system, unfortunately settings from v1.0.1 wont carry over
CurtisMJ said:
It might be possible to implement the functionality in a daemon, or even as a system service for custom ROMs where we can add source code (this is how Razer did it).
It's also probably possible to use Razer's own system service, but that's a lot of reverse engineering on the Chroma Configurator, and won't work for custom ROMs. Using root seems more aligned to the purpose of the app at the moment but I'll consider alternatives. Most of the magic was figuring out the microcode anyway
Click to expand...
Click to collapse
I'm gonna level with you man, I don't understand a lot of this. I was hoping it was as easy as having one that worked on custom ROMs and another that could be sideloaded as another app on the stock non-rooted RP2, but now that I'm thinking about it I suppose you are controlling a pretty odd piece of actual physical hardware that isn't exactly standard on phones.
I'll keep this thread around and check it every now and then to see if a non-root version ever comes around. It seems super cool, and I'm glad someone is tackling the logo, even if (at least right now) I can't take advantage of it. Keep up the cool work, dude.
For anyone that hasn't given this a go, try it! It's spectacular. Exactly what the Chroma app should be. The pinwheel effect is sexy af too! Good work, keep it up.
Briefly had a issue with it not turning off when screen was off, toggle seemed to do nothing, reinstall fixed it. No issues otherwise.
v1.0.4 has been uploaded
Still mostly a bugfix build
If the release build gives issues, please switch to the debug build and capture some logcats. Only logcats for the application package is sufficient
Hi guys,
My Nokia 8(NB1 TA1004) is hard bricked. No screen, fastboot or adb mode is available. My PC only detects it via 9008 port. I tried to flash via QFIL after days of trying. I finally flashed but, it didn't reboot. The flashing process was very short (less than 30 secs). So, I assume that wasn't completed properly. Below is the log. Could anyone advise what went wrong? Also it would be great if you could send links to good stock roms for QFIL.
18:46:05: INFO: FH_LOADER WAS CALLED EXACTLY LIKE THIS
************************************************
C:\Program Files (x86)\Qualcomm\QPST\bin\fh_loader.exe --port=\\.\COM4 --reset --noprompt --showpercentagecomplete --zlpawarehost=1 --memoryname=ufs
************************************************
18:46:05: DEBUG: Binary build date: Jun 25 2019 @ 03:16:10
18:46:05: DEBUG: Build Version: 19.06.25.03.16.10
18:46:05: INFO: Current working dir (cwd): C:\Users\jongp\AppData\Roaming\Qualcomm\QFIL\COMPORT_4\
18:46:05: INFO: Showing network mappings to allow debugging
18:46:05: DEBUG: User set ZLPAWAREHOST to 1
18:46:05: INFO: User wants to talk to port '\\.\COM4'
18:46:05: DEBUG: port_fd=0x110
18:46:05: INFO: Took 0.00000000 seconds to open port
18:46:05: INFO: Sorting TAGS to ensure order is <configure>,<erase>, others, <patch>,<power>
18:46:05: INFO: Sending <configure>
18:46:05: DEBUG: CHANNEL DATA (P0000) (H00202) ( 227 bytes) - HOST TO TARGET -->
===========================================================================================================
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<configure MemoryName="ufs" Verbose="0" AlwaysValidate="0" MaxDigestTableSizeInBytes="8192" MaxPayloadSizeToTargetInBytes="1048576" ZlpAwareHost="1" SkipStorageInit="0" />
</data>
============================================================================================================
18:46:05: DEBUG: CharsInBuffer=0 Trying to read from USB 8192 bytes
18:46:05: DEBUG: CHANNEL DATA (471 bytes) <-- TARGET to HOST
18:46:05: DEBUG: CharsInBuffer = 471
18:46:05: DEBUG: printBuffer:6017 PRETTYPRINT Buffer is 471 bytes
18:46:05: DEBUG: printBuffer:6094 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 <?xml version="1
18:46:05: DEBUG: printBuffer:6094 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54 .0" encoding="UT
18:46:05: DEBUG: printBuffer:6094 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 3E 0A 3C F-8" ?>.<data>.<
18:46:05: DEBUG: printBuffer:6094 6C 6F 67 20 76 61 6C 75 65 3D 22 43 61 6C 6C 69 log value="Calli
18:46:05: DEBUG: printBuffer:6094 6E 67 20 75 73 62 5F 61 6C 5F 62 75 6C 6B 5F 73 ng usb_al_bulk_s
18:46:05: DEBUG: printBuffer:6094 65 74 5F 7A 6C 70 5F 6D 6F 64 65 28 54 52 55 45 et_zlp_mode(TRUE
18:46:05: DEBUG: printBuffer:6094 29 20 73 69 6E 63 65 20 5A 6C 70 41 77 61 72 65 ) since ZlpAware
18:46:05: DEBUG: printBuffer:6094 48 6F 73 74 3D 27 31 27 22 2F 3E 0A 3C 2F 64 61 Host='1'"/>.</da
18:46:05: DEBUG: printBuffer:6094 74 61 3E 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E ta><?xml version
18:46:05: DEBUG: printBuffer:6094 3D 22 31 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D ="1.0" encoding=
18:46:05: DEBUG: printBuffer:6094 22 55 54 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 "UTF-8" ?>.<data
18:46:05: DEBUG: printBuffer:6094 3E 0A 3C 72 65 73 70 6F 6E 73 65 20 76 61 6C 75 >.<response valu
18:46:05: DEBUG: printBuffer:6094 65 3D 22 41 43 4B 22 20 4D 69 6E 56 65 72 73 69 e="ACK" MinVersi
18:46:05: DEBUG: printBuffer:6094 6F 6E 53 75 70 70 6F 72 74 65 64 3D 22 31 22 20 onSupported="1"
18:46:05: DEBUG: printBuffer:6094 4D 65 6D 6F 72 79 4E 61 6D 65 3D 22 55 46 53 22 MemoryName="UFS"
18:46:05: DEBUG: printBuffer:6094 20 4D 61 78 50 61 79 6C 6F 61 64 53 69 7A 65 46 MaxPayloadSizeF
18:46:05: DEBUG: printBuffer:6094 72 6F 6D 54 61 72 67 65 74 49 6E 42 79 74 65 73 romTargetInBytes
18:46:05: DEBUG: printBuffer:6094 3D 22 34 30 39 36 22 20 4D 61 78 50 61 79 6C 6F ="4096" MaxPaylo
18:46:05: DEBUG: printBuffer:6094 61 64 53 69 7A 65 54 6F 54 61 72 67 65 74 49 6E adSizeToTargetIn
18:46:05: DEBUG: printBuffer:6094 42 79 74 65 73 3D 22 31 30 34 38 35 37 36 22 20 Bytes="1048576"
18:46:05: DEBUG: printBuffer:6094 4D 61 78 50 61 79 6C 6F 61 64 53 69 7A 65 54 6F MaxPayloadSizeTo
18:46:05: DEBUG: printBuffer:6094 54 61 72 67 65 74 49 6E 42 79 74 65 73 53 75 70 TargetInBytesSup
18:46:05: DEBUG: printBuffer:6094 70 6F 72 74 65 64 3D 22 31 30 34 38 35 37 36 22 ported="1048576"
18:46:05: DEBUG: printBuffer:6094 20 4D 61 78 58 4D 4C 53 69 7A 65 49 6E 42 79 74 MaxXMLSizeInByt
18:46:05: DEBUG: printBuffer:6094 65 73 3D 22 34 30 39 36 22 20 56 65 72 73 69 6F es="4096" Versio
18:46:05: DEBUG: printBuffer:6094 6E 3D 22 31 22 20 54 61 72 67 65 74 4E 61 6D 65 n="1" TargetName
18:46:05: DEBUG: printBuffer:6094 3D 22 4D 53 4D 38 39 39 36 22 20 44 61 74 65 54 ="MSM8996" DateT
18:46:05: DEBUG: printBuffer:6094 69 6D 65 3D 22 53 65 70 20 32 30 20 32 30 31 37 ime="Sep 20 2017
18:46:05: DEBUG: printBuffer:6094 20 2D 20 32 30 3A 31 38 3A 34 30 22 20 2F 3E 0A - 20:18:40" />.
18:46:05: DEBUG: printBuffer:6094 3C 2F 64 61 74 61 3E </data>
18:46:05: DEBUG: printBuffer:6107
18:46:05: DEBUG: XML FILE (131 bytes): CharsInBuffer=471-131=340
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1'"/>
</data>
-------------------------------------------------------------------------------------------
18:46:05: INFO: TARGET SAID: 'Calling usb_al_bulk_set_zlp_mode(TRUE) since ZlpAwareHost='1''
18:46:05: DEBUG: XML FILE (340 bytes): CharsInBuffer=340-340=0
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<response value="ACK" MinVersionSupported="1" MemoryName="UFS" MaxPayloadSizeFromTargetInBytes="4096" MaxPayloadSizeToTargetInBytes="1048576" MaxPayloadSizeToTargetInBytesSupported="1048576" MaxXMLSizeInBytes="4096" Version="1" TargetName="MSM8996" DateTime="Sep 20 2017 - 20:18:40" />
</data>
-------------------------------------------------------------------------------------------
18:46:05: DEBUG: Response was 'ACK'
18:46:05: INFO: fh.attrs.MaxPayloadSizeToTargetInBytes = 1048576
18:46:05: INFO: fh.attrs.MaxPayloadSizeToTargetInBytesSupported = 1048576
18:46:05: DEBUG: Got the ACK for the <configure>
18:46:05: INFO: Sending <power>
18:46:05: DEBUG: CHANNEL DATA (P0001) (H00203) ( 99 bytes) - HOST TO TARGET -->
===========================================================================================================
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<power DelayInSeconds="10" value="reset" />
</data>
============================================================================================================
18:46:05: DEBUG: CharsInBuffer=0 Trying to read from USB 4096 bytes
18:46:05: DEBUG: CHANNEL DATA (352 bytes) <-- TARGET to HOST
18:46:05: DEBUG: CharsInBuffer = 352
18:46:05: DEBUG: printBuffer:6017 PRETTYPRINT Buffer is 352 bytes
18:46:05: DEBUG: printBuffer:6094 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 <?xml version="1
18:46:05: DEBUG: printBuffer:6094 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54 .0" encoding="UT
18:46:05: DEBUG: printBuffer:6094 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 3E 0A 3C F-8" ?>.<data>.<
18:46:05: DEBUG: printBuffer:6094 6C 6F 67 20 76 61 6C 75 65 3D 22 49 6E 73 69 64 log value="Insid
18:46:05: DEBUG: printBuffer:6094 65 20 68 61 6E 64 6C 65 50 6F 77 65 72 28 29 20 e handlePower()
18:46:05: DEBUG: printBuffer:6094 2D 20 52 65 71 75 65 73 74 65 64 20 50 4F 57 45 - Requested POWE
18:46:05: DEBUG: printBuffer:6094 52 5F 52 45 53 45 54 22 2F 3E 0A 3C 2F 64 61 74 R_RESET"/>.</dat
18:46:05: DEBUG: printBuffer:6094 61 3E 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D a><?xml version=
18:46:05: DEBUG: printBuffer:6094 22 31 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 "1.0" encoding="
18:46:05: DEBUG: printBuffer:6094 55 54 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 3E UTF-8" ?>.<data>
18:46:05: DEBUG: printBuffer:6094 0A 3C 6C 6F 67 20 76 61 6C 75 65 3D 22 49 73 73 .<log value="Iss
18:46:05: DEBUG: printBuffer:6094 75 69 6E 67 20 62 73 70 5F 74 61 72 67 65 74 5F uing bsp_target_
18:46:05: DEBUG: printBuffer:6094 72 65 73 65 74 28 29 20 61 66 74 65 72 20 31 30 reset() after 10
18:46:05: DEBUG: printBuffer:6094 20 73 65 63 6F 6E 64 73 2C 20 69 66 20 74 68 69 seconds, if thi
18:46:05: DEBUG: printBuffer:6094 73 20 68 61 6E 67 73 2C 20 64 6F 20 79 6F 75 20 s hangs, do you
18:46:05: DEBUG: printBuffer:6094 68 61 76 65 20 57 41 54 43 48 44 4F 47 20 65 6E have WATCHDOG en
18:46:05: DEBUG: printBuffer:6094 61 62 6C 65 64 3F 22 2F 3E 0A 3C 2F 64 61 74 61 abled?"/>.</data
18:46:05: DEBUG: printBuffer:6094 3E 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 ><?xml version="
18:46:05: DEBUG: printBuffer:6094 31 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 1.0" encoding="U
18:46:05: DEBUG: printBuffer:6094 54 46 2D 38 22 20 3F 3E 0A 3C 64 61 74 61 3E 0A TF-8" ?>.<data>.
18:46:05: DEBUG: printBuffer:6094 3C 72 65 73 70 6F 6E 73 65 20 76 61 6C 75 65 3D <response value=
18:46:05: DEBUG: printBuffer:6094 22 41 43 4B 22 20 2F 3E 0A 3C 2F 64 61 74 61 3E "ACK" />.</data>
18:46:05: DEBUG: printBuffer:6107
18:46:05: DEBUG: XML FILE (114 bytes): CharsInBuffer=352-114=238
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Inside handlePower() - Requested POWER_RESET"/>
</data>
-------------------------------------------------------------------------------------------
18:46:05: INFO: TARGET SAID: 'Inside handlePower() - Requested POWER_RESET'
18:46:05: DEBUG: XML FILE (159 bytes): CharsInBuffer=238-159=79
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<data>
<log value="Issuing bsp_target_reset() after 10 seconds, if this hangs, do you have WATCHDOG enabled?"/>
</data>
-------------------------------------------------------------------------------------------
18:46:05: INFO: TARGET SAID: 'Issuing bsp_target_reset() after 10 seconds, if this hangs, do you have WATCHDOG enabled?'
18:46:05: DEBUG: XML FILE (79 bytes): CharsInBuffer=79-79=0
-------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<data>
Many thanks,
Pil
<response value="ACK" />
</data>
-------------------------------------------------------------------------------------------
18:46:05: DEBUG: Response was 'ACK'
18:46:05: DEBUG: Got the ACK
18:46:05: INFO: ==============================================================
18:46:05: INFO: Files used and their paths
18:46:05: INFO: 1 'C:\Users\jongp\AppData\Roaming\Qualcomm\QFIL\COMPORT_4\port_trace.txt'
18:46:05: INFO: _ (done)
18:46:05: INFO: | |
18:46:05: INFO: __| | ___ _ __ ___
18:46:05: INFO: / _` |/ _ \| '_ \ / _ \
18:46:05: INFO: | (_| | (_) | | | | __/
18:46:05: INFO: \__,_|\___/|_| |_|\___|
18:46:05: INFO: {All Finished Successfully}
18:46:05: INFO: Overall to target 0.063 seconds (0.00 Bps)
Tear down the screen, remove the battery cable and then connect it again. Also connect the cable to the PC. Remember to install Qualcomm USB drivers.
Download 435J nb0 package and then flash it via NOST. That worked for me.
435J package:
NB1-435J-0-00WW-B01-OREO.zip | by Hikari Calyx for Nokia 8
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
NOST link:
Release NOST v0.6 · StollD/NOST
Fixed NOST running under user accounts with spaces in their name Fixed detection of .QLZ (i.e. uppercase) files. Removed the automated install of the USB Driver since it managed to crash the instal...
github.com
(Please delete my previous similar thread)
Most modern phones won't reach peak brightness unless they are in direct sunlight (by the light sensor). The slider at maximum brightness isn't really the phone's peak brightness. The slider is "capped" unless one modifies it somehow (the idea is to protect one's eyes, save battery life etc...).
For example, on gsmarena the specs for the S23's display are: "1200 nits (HBM), 1750 nits (peak)".
So, the slider only brings the phone's display to 1200 nits, while the display's full capacity is actually 1750 nits.
I don't want "daddy Samsung" to decide when my phone can reach maximum brightness or not [even if it is to protect my eyes or save battery etc..].
So, how do I enable my phone [in any way necessary] so that I can manually adjust it to maximum/peak brightness via the slider, without being in sunlight
You can just manually play with the settings:
Code:
$ settings list system|grep bright
screen_auto_brightness_adj=0.0
screen_brightness=22
screen_brightness_float=0.08333588
screen_brightness_for_vr=86
screen_brightness_mode=0
$ settings put system screen_brightness 100
Many LCD screens (and eInk screens) use the venerable TI LM3630A chip as LED driver.
Just find under /sys/devices/platform/<somewhere I²C>
I just looked and my Moto G is using a AW99703 instead.
Renate said:
You can just manually play with the settings:
Code:
$ settings list system|grep bright
screen_auto_brightness_adj=0.0
screen_brightness=22
screen_brightness_float=0.08333588
screen_brightness_for_vr=86
screen_brightness_mode=0
$ settings put system screen_brightness 100
Many LCD screens (and eInk screens) use the venerable TI LM3630A chip as LED driver.
Just find under /sys/devices/platform/<somewhere I²C>
I just looked and my Moto G is using a AW99703 instead.
Click to expand...
Click to collapse
Oh, interesting! But I'm in a bit over my head here...
Should I start by looking for a file named "TI LM3630A" somewhere within /sys/devices/platform/ ?
white-k said:
Should I start by looking for a file named "TI LM3630A" somewhere within /sys/devices/platform/ ?
Click to expand...
Click to collapse
It's not that complicated:
You can manually set the brightness with similar settings command (note: brightness could go to 100 or 255 or anything).
You could write a tiny app that just used the Android Java Settings.
Of course you'd have to have <uses-permission android:name="android.permission.WRITE_SETTINGS"/> in your AndroidManifest.xml
You could interact with the Linux driver. You have to enumerate:
Code:
# cd /sys/class/backlight/
# ls -l
lrwxrwxrwx 1 root root 0 1971-12-21 10:12 warm -> ../../devices/soc/c1b6000.i2c/i2c-6/6-0038/backlight/warm
lrwxrwxrwx 1 root root 0 1971-12-21 10:12 white -> ../../devices/soc/c1b6000.i2c/i2c-6/6-0038/backlight/white
# cd warm
# ls -l
-r--r--r-- 1 root root 4096 2023-06-17 09:04 actual_brightness
-rw-r--r-- 1 root root 4096 2023-06-17 09:04 bl_power
-rw-rw-rw- 1 root root 4096 2023-06-17 09:03 brightness
lrwxrwxrwx 1 root root 0 2023-06-17 09:04 device -> ../../../6-0038
-r--r--r-- 1 root root 4096 2023-06-17 09:04 max_brightness
drwxr-xr-x 2 root root 0 2023-06-17 09:04 power
lrwxrwxrwx 1 root root 0 2023-06-17 09:04 subsystem -> ../../../../../../../class/backlight
-r--r--r-- 1 root root 4096 2023-06-17 09:04 type
-rw-r--r-- 1 root root 4096 2023-06-17 09:04 uevent
If you alter this unilaterally you'll have to come up with some way to reconcile it with the settings.
You could interact directly over I²C to the chip itself, but you have to read the datasheet and know what all the numbers mean.
Code:
# ./lights
warm i2c-6 38
00 Control 06
01 Configuration 18
02 Boost Control 58
03 Brightness A 2f
04 Brightness B 6f
05 Current A 0a
06 Current B 0a
07 On/Off Ramp 0a
08 Run Ramp 0a
09 Interrupt Status 02
0a Interrupt Enable 00
0b Fault Status 00
0f Software Reset 00
12 PWM Out Low 00
13 PWM Out High 00
1f Revision 02
50 Filter Strength 00
white i2c-6 38
And you could fry stuff by writing the wrong numbers.
I did all this stuff for an app for my eInk device that uses two color temperatures of backlight. The stock controls were crap.
So I wrote my own that just used /sys/class/backlight/...
Oh, it could be that some limit is set in the DTB itself:
Code:
029260 [email protected] {
029270 compatible = "onyx,lm3630a";
02928c reg = < 0x38 >;
02929c status = "okay";
0292b0 lm3630-vdd-supply = < 0x18b >;
0292c0 lm3630,en_gpio = < 0xa1 0x4c 0x0 >;
0292d8 lm3630,bank_sel = < 0x6 >;
0292e8 lm3630,bank_swap = < 0x0 >;
0292f8 lm3630,linear_output = < 0x0 >;
029308 lm3630,max_current = < 0xa >;
029318 lm3630,default_brightness = < 0x0 >;
029328 lm3630,max_brightness = < 0xff >;
029338 lm3630,pwm_enable = < 0x0 >;
029348 }
Renate said:
It's not that complicated:
You can manually set the brightness with similar settings command (note: brightness could go to 100 or 255 or anything).
You could write a tiny app that just used the Android Java Settings.
Of course you'd have to have <uses-permission android:name="android.permission.WRITE_SETTINGS"/> in your AndroidManifest.xml
Click to expand...
Click to collapse
Wow, this is way beyond my comfort level. I'll ask my programmer friend if he can help me based on what you have written
Much appreciated!