[Magisk][Module] Xperia Z2 / Z3 / Z3c Torch Boost v1.2

Search This thread
D

Deleted member 9129634

Guest
The module only changes if_torch_vr (comment line: "# LED If setting for Torch or video recording (uA)"), so it just affects the brightness when using the torch or when using the flash LED as a lamp when doing a video recording (which is good, because you have a brighter video lamp).

On the other hand, flash brightness is controlled by max_if_flash (comment line: "# Flash LED_If max current (uA)") which is set to 1500000 by default and not altered by the module. Therefore the module doesn't change anything when taking pictures.

Is it safe to change the value of # Flash LED_If max current ? If yes, which value are recommend?
 

okij

Senior Member
Oct 24, 2012
2,028
3,934
Düsseldorf
Samsung Galaxy S10e
Is it safe to change the value of # Flash LED_If max current ? If yes, which value are recommend?

AFAIK the default 1500000 uA = 1,5 A is already the maximum value for the LED, so you could only lower the value for # Flash LED_If max current. This wouldn't make sense, because when taking flash pictures you want the LED to be as bright as possible.
 

@kitokit

Senior Member
Mar 15, 2017
364
70
My device is Xperia z2 LOS 17.1 , The module does not work. I tried to manually change it but it always change back to 25000 instead of 500000. It works perfectly well when I was running Aex pie rom. One thing I've noticed is that in this LOS17.1 ROM the file is located in system/vendor/etc while in AEX PIE the file is at system/etc.... Is there a reason for this? I really like this to work on my current ROM.
 
  • Like
Reactions: pawloland

t.Lancer

Senior Member
Jun 14, 2010
64
7
I've gone and made new modules for the latest Magisk version as of 26.10.2020, as the current version of the module won't install anymore (old template). It also works for LineageOS. Depending on the ROM and location of the config file.

Tested on Lineage 17.1

It should also work on stock based ROMs, but I haven't tested it yet. Install as normal Magisk module and reboot.
 

Attachments

  • Xperia_Z2_Z3_Z3c_Torch_Boost_Magisk_Module_1v2stock.zip
    19.7 KB · Views: 119
  • Xperia_Z2_Z3_Z3c_Torch_Boost_Magisk_Module_1v2customrom.zip
    19.9 KB · Views: 130

okij

Senior Member
Oct 24, 2012
2,028
3,934
Düsseldorf
Samsung Galaxy S10e
I've gone and made new modules for the latest Magisk version as of 26.10.2020, as the current version of the module won't install anymore (old template). It also works for LineageOS. Depending on the ROM and location of the config file.

Tested on Lineage 17.1

It should also work on stock based ROMs, but I haven't tested it yet. Install as normal Magisk module and reboot.

Hey, I just read your post. It's great that you are keeping this module alive and made a version with the new Magisk template. (y)

I'll add a link in the OP to your post so that users will be able to find your newer version of the module. Cheers! :)
 

hubert-bangol

Member
Jul 3, 2007
28
6
I've gone and made new modules for the latest Magisk version as of 26.10.2020, as the current version of the module won't install anymore (old template). It also works for LineageOS. Depending on the ROM and location of the config file.

Tested on Lineage 17.1

It should also work on stock based ROMs, but I haven't tested it yet. Install as normal Magisk module and reboot.

Thanks for this module, works good in LOS 17.1.
 

Brockhaus

Member
Jan 16, 2022
5
0
First of all: I only installed Magisk because of this ingenious module, and accordingly I have no experience with it.
But with the latest Magisk version (v23.0), the installation doesn't seem to work. In the last step, when I click on the zip file, it doesn't install, it just opens. Is it possible that the modules from t.Lancer are already out of date? And can someone offer me a solution?
Thanks!
 

Brockhaus

Member
Jan 16, 2022
5
0
Strange...
With Magisk v20.3 I was able to install the modules, but not by simply clicking them, but by selecting them and then clicking "Open". The same didn't work on version 23.0.

After all it works fine for me, but not as expected: I have a Z3 compact running Lineage 14.1 (7.1.2), and the working version is NOT the "custom" one, but the stock version.
Just wanted to mention it.
Thanks a lot for your great work!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    Here I present you my first Magisk module. :)

    Description:

    It boosts the torch on SONY Xperia Z2 / Z3 / Z3c devices by replacing system/etc/flashled_calc_parameters.cfg with a file that sets if_torch_vr = 500000 instead of just 25000, which is the default value by SONY.

    By doing this, the flash LED is operated at 500 mA instead of just 25 mA.

    In my experiences, 500 mA is a sweet spot which provides good brightness, but at the same time doesn't heat the LED too much. Still, I would advice you to not use the torch for more than about 5 minutes at a time. You use this module at your own risk. If you want to set a lower brightness, then you can edit system/etc/flashled_calc_parameters.cfg in the zip and change if_torch_vr to a value lower than 500000 before installing the module. Of course you can also use a higher value, but I wouldn't exceed 1000000 (this is also the value that SONY set in the line # Max current for Torch (uA) i_batt_max_torch of the flashled_calc_parameters.cfg file.)

    Background:

    The method I used was first described in a thread by @olokos which you can find here. For comparison: The extreme version you can download there (which is a flashable zip and not a Magisk module obviously) sets if_torch_vr to 1000000, which corresponds to 1000 mA or 1 A. As users reported, even at this setting the torch can be used for 5 minutes before temperature increases significantly, but I want to keep it safe by using just half of that value. If you want to know more about the user experience with different settings, I recommend you to read the above mentioned thread, as well as @antkalaitzakis96's thread, who uses the same method, which you can find here.

    Compatibility:

    This module should work on any SONY Xperia Z2 / Z3 / Z3c device running on Android 5.0 - 8.1.0, rooted with Magisk. I'm quite sure about this since I compared the flashled_calc_parameters.cfg files from Android 4.4 (SONY stock KitKat ROM) with Android 6.0.1 (SONY stock Marshmallow ROM) and also with Android 7.1.2 (LineageOS and Carbon Nougat ROMs) and the files were always completely identical! If you still want to check if the module will be compatible with your system before installing it, grab system/etc/flashled_calc_parameters.cfg from your system by using a root file explorer and then compare it with the flashled_calc_parameters.cfg file from the module zip file. The only difference between the two files should be the if_torch_vr line.

    Enjoy! :)

    Please leave some feedback if the module works for you.

    Thanks:

    Many thanks to @topjohnwu for the ingenious Magisk universal systemless interface and to @olokos for the initial torch boost mod.

    Changelog:

    v1.0 - Initial release
    v1.1 - Updated to Magisk Module Template 1500
    v1.2 - On Oct 26, 2020 @t.Lancer published an updated version in post #25 which works on newer Magisk versions. Thanks a lot!
    4
    I've gone and made new modules for the latest Magisk version as of 26.10.2020, as the current version of the module won't install anymore (old template). It also works for LineageOS. Depending on the ROM and location of the config file.

    Tested on Lineage 17.1

    It should also work on stock based ROMs, but I haven't tested it yet. Install as normal Magisk module and reboot.
    2
    Needed this. Thank you so much.
    2
    I love this module, I always wondered why my light was dinner than everyone else's. My light cuts through the darkness now!
    2
    Hello. This module didn't work for me. I tried to install it via Magisk and TWRP, but I get '' installation failed'' in Magsik and two red ''ERROR'' in TWRP. Do you know how to fix it?

    Since you don't provide any logs (installation or recovery) it's impossible to know for sure.

    But, a likely issue is that this module is old and hasn't been updated for later versions of Magisk. If you're on Magisk v14+, this module won't install...

    Yes, @Didgeridoohan is right, the module used an old template. I didn't notice that it doesn't install correctly anymore on newer Magisk versions because I only installed it once and then just updated Magisk to each newer version, which always kept the module installed.

    I now updated the module to v1.1 which uses the current Magisk Module Template 1500. You can find the download in the updated OP.

    Xperia Z2 / Z3 / Z3c Torch Boost v1.1 installed well on my Z3 Compact, running on Magisk v16.

    Please leave a note if it works for you too now. :)