[APP][ROOT] kz Torch - Brightness adjustable torch - G4 Themes and Apps

Hello everyone. Just as I was looking to find a way to make flashlight icon in quick toggles to work on Lineage OS 15.1, I found out a way that we can adjust the brightness of flashlight.
It is easy to use. Not complex. Just a seekbar which you can set the level of brightness with and that's all. kz Torch won't be listed in app drawer of launcher. You need to hold down the torch icon in quick toggles in order to go to its settings.
You can find the sourcecode on GitHub. See below for more project information.
I think that's all what I need to say. Go download it from Google Play Store: https://play.google.com/store/apps/details?id=io.github.berkantkz.kztorch
XDA:DevDB Information
kz Torch, App for the LG G4
Contributors
berkantkz, kessaras
Source Code: https://github.com/berkantkz/kzTorch
Version Information
Status: Stable
Current Stable Version: 1
Stable Release Date: 2018-05-17
Created 2018-07-08
Last Updated 2018-07-08

berkantkz said:
Hello everyone. Just as I was looking to find a way to make flashlight icon in quick toggles to work on Lineage OS 15.1, I found out a way that we can adjust the brightness of flashlight.
It is easy to use. Not complex. Just a seekbar which you can set the level of brightness with and that's all. kz Torch won't be listed in app drawer of launcher. You need to hold down the torch icon in quick toggles in order to go to its settings.
I think that's all what I need to say. Go download it from Google Play Store: https://play.google.com/store/apps/details?id=io.github.berkantkz.kztorch
Click to expand...
Click to collapse
it wont need root access if in init i set the files permissions to 777. what do you think ?
Since i cant find the fix for torch , until we fix it, do you like my idea ?
Remove root access and me change file permissions ?
Code:
chmod 0777 /sys/class/leds/led:flash_0/brightness
chmod 0777 /sys/class/leds/led:flash_1/brightness
chmod 0777 /sys/class/leds/flashlight_front/dual_brightness
chmod 0777 /sys/class/leds/led:torch_0/brightness
chmod 0777 /sys/class/leds/led:torch_1/brightness
chmod 0777 /sys/class/leds/red/brightness
chmod 0777 /sys/class/leds/blue/brightness
chmod 0777 /sys/class/leds/green/brightness
chmod 0777 /sys/class/leds/wled/brightness
chmod 0777 /sys/bus/platform/drivers/qcom,camera-flash/qcom,camera-flash.85/leds/torch-light0/brightness
chmod 0777 /sys/bus/platform/drivers/qcom,camera-flash/qcom,camera-flash.85/leds/torch-light1/brightness
These are all the leds. Wanna do it this way for now ?

kessaras said:
it wont need root access if in init i set the files permissions to 777. what do you think ?
Since i cant find the fix for torch , until we fix it, do you like my idea ?
Remove root access and me change file permissions ?
These are all the leds. Wanna do it this way for now ?
Click to expand...
Click to collapse
Seems possible but I think it still will require root access for those who do not use your boot image.
In addition, only
Code:
blabla/leds:torch_1/brightness
will be okay since I only used it to write the settings. Never tried the others if they work ?

berkantkz said:
Seems possible but I think it still will require root access for those who do not use your boot image.
In addition, only
Code:
blabla/leds:torch_1/brightness
will be okay since I only used it to write the settings. Never tried the others if they work
Click to expand...
Click to collapse
What others ?
It's LG g4 exclusive and I don't see any other development out there.
Me ThePiGuy and sfx we work together and we have a parallel equal development in our trees
Edit:
We have two LEDs on the back. You can improve this app more to use one of them or both
Also if you keep root , it will most likely work for other phones too.
But in our case , please make root not a must have. Let the app work without root and ask for root if it can't edit the file

kessaras said:
Seems possible but I think it still will require root access for those who do not use your boot image.
In addition, only
What others ?
It's LG g4 exclusive and I don't see any other development out there.
Me ThePiGuy and sfx we work together and we have a parallel equal development in our trees
Edit:
We have two LEDs on the back. You can improve this app more to use one of them or both
Also if you keep root , it will most likely work for other phones too.
But in our case , please make root not a must have. Let the app work without root and ask for root if it can't edit the file
Click to expand...
Click to collapse
I will test the other paths then ?
Yeah, I always appreciate your work. I wish I had enough space for LOS15.1 in order to work on the tree.
I guess root always will be must have. Yes, of course it can be unnecessary if the app can write the settings w/o having root access but otherwise, users would need to flash something in order to set permissions on boot up. Or they would need root access for first time in order to set permissions automatically right after boot up.

berkantkz said:
I will test the other paths then
Yeah, I always appreciate your work. I wish I had enough space for LOS15.1 in order to work on the tree.
I guess root always will be must have. Yes, of course it can be unnecessary if the app can write the settings w/o having root access but otherwise, users would need to flash something in order to set permissions on boot up. Or they would need root access for first time in order to set permissions automatically right after boot up.
Click to expand...
Click to collapse
perfect ! so without root, and if it gives error for file access, ask for root.
Have fun and if you need anything related , don't hesitate to ask

kessaras said:
it wont need root access if in init i set the files permissions to 777. what do you think ?
Since i cant find the fix for torch , until we fix it, do you like my idea ?
Remove root access and me change file permissions ?
Code:
chmod 0777 /sys/class/leds/led:flash_0/brightness
chmod 0777 /sys/class/leds/led:flash_1/brightness
chmod 0777 /sys/class/leds/flashlight_front/dual_brightness
chmod 0777 /sys/class/leds/led:torch_0/brightness
chmod 0777 /sys/class/leds/led:torch_1/brightness
chmod 0777 /sys/class/leds/red/brightness
chmod 0777 /sys/class/leds/blue/brightness
chmod 0777 /sys/class/leds/green/brightness
chmod 0777 /sys/class/leds/wled/brightness
chmod 0777 /sys/bus/platform/drivers/qcom,camera-flash/qcom,camera-flash.85/leds/torch-light0/brightness
chmod 0777 /sys/bus/platform/drivers/qcom,camera-flash/qcom,camera-flash.85/leds/torch-light1/brightness
These are all the leds. Wanna do it this way for now ?
Click to expand...
Click to collapse
Don't we only need to change the permissions for the rear led's - I'm assuming the red, green and blue ones are the notification led

ThePiGuy said:
Don't we only need to change the permissions for the rear led's - I'm assuming the red, green and blue ones are the notification led
Click to expand...
Click to collapse
i changed them all. and berk will use them any way he likes. whats the big deal with giving user access to all leds ?

kessaras said:
i changed them all. and berk will use them any way he likes. whats the big deal with giving user access to all leds ?
Click to expand...
Click to collapse
There's no problem
I was just wondering.

Can we find the source code somewhere?

Bleuzen said:
Can we find the source code somewhere?
Click to expand...
Click to collapse
As soon as I get rid of my laziness, I will upload the sources and will inform you.

kessaras said:
Edit:
We have two LEDs on the back. You can improve this app more to use one of them or both
Also if you keep root , it will most likely work for other phones too.
But in our case , please make root not a must have. Let the app work without root and ask for root if it can't edit the file
Click to expand...
Click to collapse
The thing at the bottom is a light sensor for getting the best colour balance - the G4 only has one LED

htr5 said:
The thing at the bottom is a light sensor for getting the best colour balance - the G4 only has one LED
Click to expand...
Click to collapse
That's exactly what I thought up until 2 days ago. We actually have two in the top part

Cihazımı rootlanak istiyorum
mod edit, please use English:
I want to root my device

So what happened does it still require root ? =)

ozukoc said:
So what happened does it still require root ? =)
Click to expand...
Click to collapse
Yes. Since I have switched my G4, I do not work to improve on this anymore.
Anyways, it works well as it is now.

berkantkz said:
Yes. Since I have switched my G4, I do not work to improve on this anymore.
Anyways, it works well as it is now.
Click to expand...
Click to collapse
Yes its working very well, i recently rooted my device and using it, thanks bro =) By the way i think its not relevant probably but i couldnt delete old torch symbol from that navigation menu ( its not working and im on LOS 15.1 with magisk ). Can it be relevant with this ?

ozukoc said:
Yes its working very well, i recently rooted my device and using it, thanks bro =) By the way i think its not relevant probably but i couldnt delete old torch symbol from that navigation menu ( its not working and im on LOS 15.1 with magisk ). Can it be relevant with this ?
Click to expand...
Click to collapse
Well, I have never tried to remove the original one, yet I cannot test since I do not own the device anymore. However, I don't think it can't be removed as the quick toggles layout can be customized. I do not think it might be due to my app as well.

berkantkz said:
Well, I have never tried to remove the original one, yet I cannot test since I do not own the device anymore. However, I don't think it can't be removed as the quick toggles layout can be customized. I do not think it might be due to my app as well.
Click to expand...
Click to collapse
Yes i forgot to tell that i couldnt delete from quick toggle layout. before i was customizing; deleting and adding but now i cant delete it from that layout. Whatever its not that important. Thanks again. =)
Edit: After reboot i managed it.

Wait, im o just dumb enough i cant install this? The google play doesnt have the button to open the app... So it just installs it but does nothing.

Related

[APP] CM7 alarm with moto blur alert screen (update)

I like the moto blur alert screen,
so I modify the CM7 alarm and add the blur alert screen.
In the setting page, you can choose what alert screen you want to use, classic or moto blur.
How to install:
Method 1:
1. Download alarm_update-signed.zip, and put it into sdcard
2. Reboot into recovery
3. Install from zip, and choose alarm_update-signed.zip
4. Reboot
Method 2:
1. Download DeskClock.apk
2. Use adb to push apk
adb push DeskClock.apk /data/local/tmp/
adb shell
# mount -o rw,remount /system
# cd /system/app
# mv DeskClock.apk DeskClock.apk.bak
# mv /data/local/tmp/DeskClock.apk .
# chown root.root DeskClock.apk
# chmod 644 DeskClock.apk
# mount -o ro,remount /system
(If you use rootExplorer, please make sure the permission of the apk file is correct)
3. Reboot your phone, then you will get the alarm with blur alert
* Tested on cm7-110608-0930-NIGHTLY-Jordan.
Thanks, I looked for this since CM7 installation. But it does not work with me. I followed the steps you quot but got a Force Close when launching the alarm.
I'm over cm7-110608-0930. Any idea for my problem?
zoomoki said:
Thanks, I looked for this since CM7 installation. But it does not work with me. I followed the steps you quot but got a Force Close when launching the alarm.
I'm over cm7-110608-0930. Any idea for my problem?
Click to expand...
Click to collapse
Hi, I had updated the install steps, please try to use recovery and install it again, thanks.
i've just tested both methods on cm7 rc0, no change, still the same alarm UI
It would be great having the motoblur stuff for this....
edit : oups, forgot to modify alarm settings, testing the snooze right now....
Great!....can you make a port of the PHONE and MMS apk from motoblur...to CM7?...
Or maybe someone can port the MIUI locksreen.....
I know...I ask to much...but would be awesome....
Thank for this.
Now it's good, thank you! But how can we select mp3?
Sent from my MB525 using XDA Premium App
thank you, its bealtiful
zoomoki said:
Now it's good, thank you! But how can we select mp3?
Sent from my MB525 using XDA Premium App
Click to expand...
Click to collapse
This is another good feature of blur alarm, and I will try to add this feature.
tested, it works fine, thanks for this app !
Thanks, it worked.. It would be great though if you can theme it to match MIUI default theme. I guess you can use the deskclock apk from MIUI ROM. Thanks anyway, much appreciated
Used Root Explorer...renamed existing deskclock.apk, copied in new deskclock.apk, and set permissions.
Rebooted, and the app does not show up...
CM7 on D2.
Any ideas? Double-checked permissions, they are correct.
Method 1 doesn't work for the Droid 2, but Method 2 does fine! Thanks, I thought I'd lost that alarm forever!
OK...redid it using ADB. Wasn't paying attention and realized after that I didn't execute the chown command in Root Explorer (long press and select change owner)...so using Root Explorer would have worked fine. Doh!
But it works now, and very nice.
One (small) request - is it possible to have a setting that allows the alarm volume to start low and increase, as in the Blur alarm? That is one feature I am missing very much on CM7.
Nice work, appreciate what you have done, and the help to get this going on my D2.
I'm still on 2.2.2 CEE, and don't have an idea about the alarm in CM7. Can someone please describe the differences or post a screenshot?
Thanks .
Redflea said:
One (small) request - is it possible to have a setting that allows the alarm volume to start low and increase, as in the Blur alarm? That is one feature I am missing very much on CM7.
Click to expand...
Click to collapse
+1 for that!
mp3 and incremental volume would be great!
vap_66 said:
I'm still on 2.2.2 CEE, and don't have an idea about the alarm in CM7. Can someone please describe the differences or post a screenshot?
Thanks .
Click to expand...
Click to collapse
take a look
It's not bad at all .
Thanks.
Awesome work, man! Was very surprised seeing German language working as well! Now there is just one thing left I'm missing from stock froyo: the integrated countdown timer I used quite often for pizza and the like Is there any chance we will see this integrated as well in the near future?
Keep up the good work!
diogo.sena said:
+1 for that!
mp3 and incremental volume whould be great!
Click to expand...
Click to collapse
I'd love those features too. A workaround for now is to move MP3s to system/media/audio/alarms using a root explorer (I use the root option on ES File Explorer). Then MP3s will be available after restarting the phone.
Thanks, duguschi, this app is just what I needed!
thanks just what i was looking for

[Q] Removing symbolic link

Before installing the new CM7 alpha I made a symbolic link from /data/media to /mnt/media.
Now I can't delete it. I tried rmdir, rm -d etc. I've tried Root Explorer which deletes it but when I refresh it's still there.
Any ideas?
Not a pro by any means but it sounds like you need to change the permissions on the files/folders.
pepi4 said:
Not a pro by any means but it sounds like you need to change the permissions on the files/folders.
Click to expand...
Click to collapse
I have all the permissions set to allow. Thanks anyway.

[Q] [sola]Illumination Bar isn't working with jelly bean

I've found this page.It's about Illumination Bar API.
What does it mean / make? Does it make changes about jb illumination bar issue? If not, what can we do to fix this issue?
JohnHK said:
I've found this page.It's about Illumination Bar API.
What does it mean / make? Does it make changes about jb illumination bar issue? If not, what can we do to fix this issue?
Click to expand...
Click to collapse
Originally posted by akkufix
For those who are interessted in a working illumination-bar...
Here it is.
Rename "hw_config.sh.txt" to "hw_config.sh", adb push it to /system/etc (overwrite original) and chmod it to 644 (rw_r__r__).
Maybe you need to give write-permitions on /system/etc to do it.
adb shell -> su -> mount -o rw,remount /system and if necessary chmod 777 to /etc.
Don't forget to re-set right permitions after you copied the file.
Reboot and illumination-bar will come up while device is booting.
This should work for most roms ported from Go.
Comparing hw_config.sh before overwrite the original file. If this is different, you could take out the "ALS" part from mine and put it in yours.
Should also work with Cyanogen-mod-rom, because directories are the same.
You also could change parameters in ALS-part to make bar flashing or react in another way.
But, pls. have a look in datasheet first, because you may get over-current your LED, if you change wrong register. So, be carefull with i.e. 0x0a
Changing parameters on $kblight path aren't dangerous, but may cause non-function of the bar. Just re-write "old" value then.
You can find datasheet for as3677 here, by clicking on "Download":
http://www.ams.com/eng/Products/Lighting-Management/Lighting-Management-Units/AS3677
Enjoy... 
Sent from my Sony Xperia™ sola using XDA Premium
---------- Post added at 10:34 PM ---------- Previous post was at 10:31 PM ----------
See here http://forum.xda-developers.com/showthread.php?t=2258416
Sent from my Sony Xperia™ sola using XDA Premium
Please explain more!!
Ben Ling said:
Here it is.
Rename "hw_config.sh.txt" to "hw_config.sh", adb push it to /system/etc (overwrite original) and chmod it to 644 (rw_r__r__).
Maybe you need to give write-permitions on /system/etc to do it.
adb shell -> su -> mount -o rw,remount /system and if necessary chmod 777 to /etc.
Don't forget to re-set right permitions after you copied the file.
Click to expand...
Click to collapse
You know that I need more discussion . Please give more details.
I've navigated to system/etc and I've found the file already with the name "hw_config.sh" not "hw_config.sh.txt"
1. What do you mean by "adb push" ?
2. How to set the right permissions?
3. What is "ALS" part?
Having looked in to it a bit for my XU I think the problem as it stands is that the Jelly Bean ports for XSola and XU don't have the correct libraries to use the hardware on those devices. The libraries from ICS don't appear to work so can't be used and the ones from the official XGo and XP Jelly Bean releases are specific to those devices and so don't work.
Using rundgong's IlluminationReceiver (available here, though you may already have it) you can get some functionality back but it's not perfect.
Also, I'm not sure about the XSola port of JB but on the XU versions they came with a library that was originally from CyanogenMod and it seems to use the led bar for standard android notifications rather than the power led. This means that if you have the Illumination Notification app (also from rundgong) the two can clash and you end up with both trying to control the led bar.
JohnHK said:
1. What do you mean by "adb push" ?
2. How to set the right permissions?
3. What is "ALS" part?
Click to expand...
Click to collapse
i'm not sure too...
Please remove the Xperia sola photo by me... @JohnHK
I have PM you twice but you didn't remove or reply me.
Thanks.

Fixing heating issue in ICSROM with script method by jeremywh7. Please help!

jeremywh7 has explained how to fix the issue with the ICSROM governor so that it runs with min 216Mhz and causes less heating - http://forum.xda-developers.com/showpost.php?p=58093061&postcount=1051
Here's the entire post -
Quote:
Originally Posted by jeremywh7
I just wanted to mention that I think I found the cause of ICSROM with the latest 3.1.10 kernel not running at 216MHz:
http://forum.xda-developers.com/show...postcount=1018
I have rebooted*, and its still working fine.
[*edit: forgot to update this post...a power off and cold boot does reset it. I've made an init.d script to fix it for now; will provide details later, as its now the wife's main phone.]
[...]
Better late than never, right? :-/ Here is the script I made as '/etc/init.d/01cpufreq' and set to chmod 755 (manually, using ES File Explorer, actually):
Code:
#!/system/bin/sh
#ramdisk cpu scaling min fix
chown root.root /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "216000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
I installed Universal Init.d (by Androguide.fr) to apply it at boot. I had to run the Test part w/ the tool set to Off, to enable SuperUser privileges. [Update: if you click a file to edit, it will also prompt for su, so that would be easier than running the test; K's July kernels don't support init.d obviously; I'm using kernel-2014_07_04_19_18_atrics.] After setting the tool On, and rebooting...voila, file permission fixed and min frequency 216 MHz.
Since I converted my old CM9-based Atrix to ICSROM (the reason I'm working on all this again), I recalled another mod, rain drop detect issue, for future reference:
http://forum.xda-developers.com/show...&postcount=117
Make sure to leave the extra character at the end the config line [ref: post 119].
Hope this helps...
Click to expand...
Click to collapse
Needless to say, I don't understand the instructions and I really want to be able to do this fix, so if anyone can help me, please let me know. How can I run this script?
aamil4u said:
jeremywh7 has explained how to fix the issue with the ICSROM governor so that it runs with min 216Mhz and causes less heating - http://forum.xda-developers.com/showpost.php?p=58093061&postcount=1051
Here's the entire post -
Needless to say, I don't understand the instructions and I really want to be able to do this fix, so if anyone can help me, please let me know. How can I run this script?
Click to expand...
Click to collapse
This is more like a how to use ES Explorer or Root Browser to put a script in a location and set permissions question and not what you asked
palmbeach05 said:
This is more like a how to use ES Explorer or Root Browser to put a script in a location and set permissions question and not what you asked
Click to expand...
Click to collapse
Thanks for the quick reply!
So basically I have to save this in a file and set permissions for it on a root explorer? I'm a bit of a noon in this, so I'd really appreciate if you could please explain this procedure in a noob-friendly way. What exactly should I do and what should the permissions be.
Thanks!
aamil4u said:
Thanks for the quick reply!
So basically I have to save this in a file and set permissions for it on a root explorer? I'm a bit of a noon in this, so I'd really appreciate if you could please explain this procedure in a noob-friendly way. What exactly should I do and what should the permissions be.
Thanks!
Click to expand...
Click to collapse
Actually you hit the nail on the head after i pointed out what i did in my last post. For permissions, i find it easier to manually change them instead of the chmod thing that it was talking about. For permissions, 755 the same as*rwxr-xr-x
Sent from my ATRIX HD using XDA Free mobile app
Okay. I got so far as that. But what should I name the file and what extension should I use? Am I supposed to replace a system file? Or is this a separate file I have to create? I'm not clear what he means by universal init.d, is it a file? What should I do with it?
Dude, you're seriously overcomplicating this. You're making it way more difficult than it needs to be, both for yourself and for XDA.
The post you quoted contains literally all the information you need, including all the questions you've asked in here. Just read it again.

Poco X3 Volume Boost mixer_paths

hey guys. I share my contribution to obtain better sound in headphones, speakers and microphones. the quality is smooth and good. remember to make a previous backup of the original file located in: vendor / etc / mixer_paths_wcd9375.xml
set root permissions CHMOD 0644 for replacement. In MIUI multiple users report poor quality in headphones. comment if it worked for you
how to set root permissions ?
i tried to find way to replace the file but not luck
xSairous said:
how to set root permissions ?
i tried to find way to replace the file but not luck
Click to expand...
Click to collapse
you need to root your phone
You only need custom recovery to do this. Having your device rooted is not necessary. I used Orange Fox to replace the files and permissions were already set properly (though you can change that as well if needed). Just go there first to make your vendor partition RW-able and then follow this guide using Orange Fox or TWRP file explorer. I'm on stock global 12.0.8 BTW.
Macxsico said:
hey guys. I share my contribution to obtain better sound in headphones, speakers and microphones. the quality is smooth and good. remember to make a previous backup of the original file located in: vendor / etc / mixer_paths_wcd9375.xml
set root permissions CHMOD 0644 for replacement. In MIUI multiple users report poor quality in headphones. comment if it worked for you
Click to expand...
Click to collapse
My phone is Poco X3 Pro. And this file is not in the root directory. I wonder which file corresponds to this file? Will it be valid if I change the name and overwrite it? Or is it possible for you to prepare a suitable file for my system? Thank you.

Categories

Resources