[Q] How to control the camera flash - Galaxy S Advance I9070 Q&A, Help & Troubleshooting

I'm testing the camera flash of my galaxy s advance, but I can only turn the flash in a single brightness level, regardless of the value entered in the command:
# echo 1 / sys/class/camera/flash/rear_flash
# echo 1 / sys/class/camera/rear/rear_flash
I want to know is how the app controls the camera's LED flash to it lights with full power, and if you can do this by controlling terminal emulator. No problem as the burning of the LED, because I have to replace it easily. I am using a CM10 rom, but I can switch to the official 4.1.2 if necessary.
I searched other topics but no topic was answered.
Sorry for my Google Translate english

Related

I need some help from someone with a BLN kernel.

Long story short, I'm trying to port BLN to a CM7 based (and hence, Nexus S based) kernel. I need someone to provide the output of the following commands:
Code:
ls /sys/class/misc/backlightnotification
cat /sys/class/misc/backlightnotification/notification_led (with no notifications)
cat /sys/class/misc/backlightnotification/notification_led (with a notification)
EDIT: Just to make it clear, this is adb shell with root privileges.
Since noone has responded... here is the data from my terminal emulator... I'm at work
Code:
uevent
dev
subsystem
power
blink_control
enabled
notification_led
version
0
I could not get the data with a notification. It turns the notification off when I log on. Looks like 0 means off and 1 means on.
AdamOutler said:
Since noone has responded... here is the data from my terminal emulator... I'm at work
Code:
uevent
dev
subsystem
power
blink_control
enabled
notification_led
version
0
I could not get the data with a notification. It turns the notification off when I log on. Looks like 0 means off and 1 means on.
Click to expand...
Click to collapse
Thank you, that's perfect.
Hi
I trying to play with BLN from console.
echo 1 > notification_led
and
echo 0 > notification_led
works both great, but how use
blink_control ?
I try to put a 1 inside but nothing change :/
Is there some doc somewhere ?
Kytrix.
edit: I just see I'm on the samsung captivate forum, In my case I run on a Nexus S.

[Q] solving keybord freeze on honeycomb froyo v3

I have to open a new thread here because I can't still post in the android section, by the way I've tried to follow the instruction found in this post for solve the keyboard freezing problem but I when I launch the script it says that he can't find the 2 files it have to launch, and opening the folder by the terminal or by my ubuntu I can't found the 2 files
/lib/modules/microp-ksc.ko
/lib/modules/microp-keypad.ko
anyone knows why?
a member wrote on the same post that he had the same problem, so he have deleted some files and have run the new kernel...how can I launch the device with another kernel?
thank you
Hi,
answer is easy (well, for those who looked behind the scenes), at boot, the system checks if the kernel-modules on the sdcard are different from the installed in /lib/modules ... and due to the fact that the kernel version is the same (just with the keypad drivers optional as modules), the unpacking of the tar.gz-archive is skipped.
You have two options now, use the 'Terminal Emulator' and do a:
su
rm /lib/modules/*
and reboot your phone, or copy the two modules from the tar.gz in ubuntu.
Ciao
Kurt
I have tried the first before opening this thread without any result, now I'm retrying
ehm...now the script runs...but I can't use the onscreen keyboard and everytime I enter an app the screen rotates...is it normal?
and if I press camera button it doesn't return to the home
Hm, rotating the screen is not normal ... just if he thinks you pulled out the 'real' keyboad.
I think, the camera button of Honeycomb froyo is prepared for camera usage ;-).
Hm, perhaps, best solution at the moment would be, to run the unload-load-script when the phone is waking up from sleep mode. So, when keypad is lost, the user can send to sleep with the power button an immediately switch it on again ... and additionally, the script can run when a call comes in ... don't know if these events can get picked up and the event-handlers can be changed, just thinking ...
Ciao
Klaus

[Q] Led Lights Blinking

Well, a couple days ago I installed the Cyanogen Mod RC 2 via this topic. So, i found some problems (common bugs) such as wi-fi dont conecting, the led that lighs the screen blinking, proximity sensor and etc.
To fix these problems, i got this video from this tutorial and flashed the package from the tutorial. The problems were solved, except the led, that some times blinks and turns off randomly. What should I do? Is there any way to "format" and install an official firmware, or original files related to the LED lights to solve it?
Since now thanks!
estevaoem said:
Well, a couple days ago I installed the Cyanogen Mod RC 2 via this topic. So, i found some problems (common bugs) such as wi-fi dont conecting, the led that lighs the screen blinking, proximity sensor and etc.
To fix these problems, i got this video from this tutorial and flashed the package from the tutorial. The problems were solved, except the led, that some times blinks and turns off randomly. What should I do? Is there any way to "format" and install an official firmware, or original files related to the LED lights to solve it?
Since now thanks!
Click to expand...
Click to collapse
I have the same problem, actually I'm using the DDKQ6 2.3.4 ROM, I've installed a lot of other ROMS and i'm still trying to install one to fix the problem...
Any idea if it is a factory issue or it is a rom issue?
"My english is not so good because my default languaje is Spanish"
Just turn it off:
https://market.android.com/details?id=com.deskangel.kblight
Just flashed to CM7.2 by vo1 last night..
before that, I've been using BehradGH's Cm RC 2.2 without any bugs, all wi-fi and LED screen works just fine...
Brajano95 said:
Just turn it off:
https://market.android.com/details?id=com.deskangel.kblight
Click to expand...
Click to collapse
You need to turn off the LED lights to solve the problem. This ROM is known for this problem. Secondary solution is to flash another ROM such as ICS Sunday Final by jusada, which is one the best ROMs ever made.
Brajano95 said:
Just turn it off:
https://market.android.com/details?id=com.deskangel.kblight
Click to expand...
Click to collapse
Turn it off without any application:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Copy above script to /system/etc/init.d as 98button-backlight, set the permission to 755.
This is old CM7 issue and already solved. But feel free to use my above script, to save battery for an example. Latest stock firmware just have a annoying update, turning on the button light every time you touch the screen
ketut.kumajaya said:
Turn it off without any application:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Copy above script to /system/etc/init.d as 98button-backlight, set the permission to 755.
This is old CM7 issue and already solved. But feel free to use my above script, to save battery for an example. Latest stock firmware just have a annoying update, turning on the button light every time you touch the screen
Click to expand...
Click to collapse
1 more to go Ketut sir XD
EmoBoiix3 said:
1 more to go Ketut sir XD
Click to expand...
Click to collapse
I got 999 because of you
Edit 1: 1000 after a refresh
Edit 2: 1001 after the second refresh
ketut.kumajaya said:
I got 999 because of you
Edit 1: 1000 after a refresh
Edit 2: 1001 after the second refresh
Click to expand...
Click to collapse
I thanked you 4 times in a row LOL (making it 1002)
EmoBoiix3 said:
I thanked you 4 times in a row LOL (making it 1002)
Click to expand...
Click to collapse
LOL. Thanks friend.
ketut.kumajaya said:
LOL. Thanks friend.
Click to expand...
Click to collapse
All you have to do for me is to apply to be a recognised developer
Herpderp Adreno + Tegra.
ketut.kumajaya said:
Turn it off without any application:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Copy above script to /system/etc/init.d as 98button-backlight, set the permission to 755.
This is old CM7 issue and already solved. But feel free to use my above script, to save battery for an example. Latest stock firmware just have a annoying update, turning on the button light every time you touch the screen
Click to expand...
Click to collapse
Set permission to 755, what did you mean?
__________________________________________
http://forum.xda-developers.com/showthread.php?t=1387227
ahh
__________________________________________
Anyway, it doesn't work to me, I did exactly what you said. Wth?
__________________________________________
Why always something must not working for me? Yesterday I had The End 2.5, I applied transparent statusbar patch by zdunes (did exactly what was said in tutorial), and statusbar was black, and still had ghosting issue. After every reboot my theme (in theme chooser) was default, not miuiv4 (what was really annoying). Now I'm back to CM7.2 by vo-1 (signature) and after every reboot I must go to keyboard options to 'turn it on' cause if I don't do that my keyboard won't appear. AND NOW THIS. Backlight script isn't working. I think my phone doesn't like me.
thx
Thank you very much.
I solved the problem doing a factory reset and installing the OXFKT1 ROM. The wifi problem, blinking and black screen were solved.
ace_viknesh said:
You need to turn off the LED lights to solve the problem. This ROM is known for this problem. Secondary solution is to flash another ROM such as ICS Sunday Final by jusada, which is one the best ROMs ever made.
Click to expand...
Click to collapse
I just put carbon Sunday beta (by jusada) to my wife's ace. It is even better in my opinion. Also updated lagfree v3 to it. No problems and boy its smooth.
Sent from my GT-I9000 using xda premium
ketut.kumajaya said:
Turn it off without any application:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Copy above script to /system/etc/init.d as 98button-backlight, set the permission to 755.
This is old CM7 issue and already solved. But feel free to use my above script, to save battery for an example. Latest stock firmware just have a annoying update, turning on the button light every time you touch the screen
Click to expand...
Click to collapse
I tried doing it but..i think there is some problem in permissions as this script does'nt gets executed automatically while booting(restarting).
My permissions are rwxr-xr-x
But when i open with linux script handler in root explorer and execute it does its job.
so it means script is ok but it has some permissions problem.
plz reply
edit: got it fixed. permissions are correct.
dont knw why tht particular script file was not workin so i copied the two lines and pasted in some other working script kept thr in the same folder which finally worked.
ketut.kumajaya said:
Turn it off without any application:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness
chmod 444 /sys/class/leds/button-backlight/brightness
Copy above script to /system/etc/init.d as 98button-backlight, set the permission to 755.
This is old CM7 issue and already solved. But feel free to use my above script, to save battery for an example. Latest stock firmware just have a annoying update, turning on the button light every time you touch the screen
Click to expand...
Click to collapse
man you forgot the semicolons hahaahha here's the right code:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness;
chmod 444 /sys/class/leds/button-backlight/brightness;
seanwlk said:
man you forgot the semicolons hahaahha here's the right code:
Code:
#!/system/bin/sh
echo 0 > /sys/class/leds/button-backlight/brightness;
chmod 444 /sys/class/leds/button-backlight/brightness;
Click to expand...
Click to collapse
Really? :laugh: :laugh: :laugh: My S5830 still lying around, thinking to update it to the latest official ROM after you inviting me here :laugh: :laugh: :laugh:
Please update your comment, please learn more about bash scripting
ketut.kumajaya said:
Really? :laugh: :laugh: :laugh: My S5830 still lying around, thinking to update it to the latest official ROM after you inviting me here :laugh: :laugh: :laugh:
Please update your comment, please learn more about bash scripting
Click to expand...
Click to collapse
this is the only way that works... i'm running touchwiz resurrection v9.5 and i checked up the already existing scripts and they all have the semicolons.... after put them the script started work
seanwlk said:
this is the only way that works... i'm running touchwiz resurrection v9.5 and i checked up the already existing scripts and they all have the semicolons.... after put them the script started work
Click to expand...
Click to collapse
No, no, no. My script is correct from the beginning. The most likely cause is Windows EOL (end of line). Windows uses carriage return and line feed as a line ending, which Unix uses just line feed. ROM modder mostly use Windows OS to create a modified ROM for Android and often unaware about this EOL derp

[GUIDE][Difficulty: Intermediate] Disable Pattern/Pin/Password Lock using Shell

Since Marshmallow, I haven't been able to disable Pattern/PIN/Password (P3) using Secure Setting. I'm sure many others might be facing the same issue. So here's a guide on how to disable P3 using Shell commands.
Step 1. Set a P3 and remember it.​Step 2. Create a new Task named Disable Lock. Add Run Shell and under it type the following command​
Code:
mv /data/system/gatekeeper.pattern.key /data/system/gatekeeper.pattern.key.disabled;
mv /data/system/gatekeeper.password.key /data/system/gatekeeper.password.key.disabled;
mv /data/system/locksettings.db-wal /data/system/locksettings.db-wal.disabled;
mv /data/system/locksettings.db-shm /data/system/locksettings.db-shm.disabled;
mv /data/system/locksettings.db /data/system/locksettings.db.disabled;
reboot
Tick Use Root​Step 3. Create a new Task named Lock. Add Run Shell and under it type the following command​
Code:
mv /data/system/gatekeeper.pattern.key.disabled /data/system/gatekeeper.pattern.key;
mv /data/system/gatekeeper.password.key.disabled /data/system/gatekeeper.password.key;
mv /data/system/locksettings.db-wal.disabled /data/system/locksettings.db-wal;
mv /data/system/locksettings.db-shm.disabled /data/system/locksettings.db-shm;
mv /data/system/locksettings.db.disabled /data/system/locksettings.db;
reboot
Tick Use Root​Step 4. Now if you want to disable P3 just run Disable Lock Task and when your privacy is under danger, run Lock Task.​
Explanation: In Step 2 you rename files which store P3 data into ".disabled" which makes the files unreadable and thus your P3 is disabled. And in Step 3 we effectively nullify Step 2 restoring our old P3
PS: Run Disable Lock Task only if you have locked your phone using P3
PPS: Run Lock Task only if you have run Disable Lock Task
PPPS: I have personally used Pattern, PIN, and Password, so let me know in the comment section if you are able to successfully disable Fingerprint and Iris Scanner using above technique.
this is a very interesting approach.If I understand it correctly, you will have to reboot each time, right? is there anyway to bypass that, resulting a simple with on/off like the way secure setting works? maybe a kind of system force refresh?
alienyd said:
this is a very interesting approach.If I understand it correctly, you will have to reboot each time, right? is there anyway to bypass that, resulting a simple with on/off like the way secure setting works? maybe a kind of system force refresh?
Click to expand...
Click to collapse
Yeah, you have to reboot everytime you want to disable/enable lock. And I honestly don't know if there's any simple ON/OFF like in Secure Setting, I just discovered this method on an random forum. And I thought of posting the ideology here, since I'm sure many are not able to use Secure Setting to disable lock the same since Marshmallow.
I accidentally deleted those files , how to restore them ?
Midhun3! said:
I accidentally deleted those files , how to restore them ?
Click to expand...
Click to collapse
Are you using a custom ROM?
Yes
Midhun3! said:
Yes
Click to expand...
Click to collapse
Ok, try flashing your custom ROM. If that doesn't work, extract your custom ROM and copy pasting those deleted files to your phone.
this would have been great if not for the reboot. It just takes to long to reboot today's phones.
Sent from my LG-H815 using Tapatalk
I confirm the procedure works on rooted N LG VPad.
I will test on O LG G3 and report back.
I confirm that it works on android Oreo.
Now I would like to know where exactly did you find these commands. You said it was on anther forum. Please provide more info, maybe it proves to be a source of more interesting profiles and tasks.
Sent from my crDroid "O" powered LG-D855 using Tapatalk
I just checked one need not reboot, even a soft reboot does the job. Remove the "reboot" from the above commands. Create new shell task with "killall zygote" . Soft reboot is faster
My setup is
Honor 9 Lite
LineageOS 15.1
My intention is to
Set Fingerprint+PIN
Then, remove PIN and let Fingerprint remain.
Following KiranGadge911's instructions, I enter the following
Code:
adb shell
su
mv /data/system/locksettings.db /data/system/locksettings.db.disabled
reboot
The other files don't exist
/data/system/gatekeeper.password.key
/data/system/gatekeeper.pattern.key
/data/system/locksettings.db-shm
/data/system/locksettings.db-wal
I entered my fingerprint, after that it stayed stuck on "Android is starting..." message, indefinitely.
I've tried this twice, and had to Factory Reset twice. :silly:
If you have the same setup, let me know how you remove pin/password, in order to have fingerprint only.
@KiranGadge911 can this only be done if you have root? I have been looking for this exact approach, except not reboot but shutdown. However, I dont have root and I dont know if rooting my phone (OnePlus 6) violates any warranty.
Reason why I need this is that the phone (maybe others too) has a function that starts the phone based on schedule. I think it's great to be able to shut down the phone and let it start automatically at a given point.
However, if I haven't disabled any pin/password, I won't be reachable by phone.
This is where your solution comes in handy (although I think it would need to disable the SIM pin as well).

[No Root]Replace stock camera completely with google camera (without disabling)

NOTE: Tutorial UPDATED to 30/9/19
HOPE IT'LL BE USEFUL [GUIDE]
On your PC Download these Files
1.ADB: Download ADB
2.Google camera apk (Select any one of your Choice):
> MOST STABLE (arnova_V8)(least feature)
> MINIMIAL AND STABLE (MGC_6.2.024_BSG)
> LATEST AND ADVANCED (I personally use 6.3.017)
OR choose from Gcam port XDA
[Process is below complete serially all the steps]
Step1:Installing ADB:
1.Install ADB (links provided above)
Step2:Enabling camera 2 api:
1.Go to folder C:\adb\ and type cmd on the adress bar and hit enter.(it will open up cmd prompt inside that folder)
2.Go to fastboot mode on your device (Click and hold power button to bring side menu after that click and hold the volume UP and click restart while holding the vol down until it comes to fastboot mode screen)
3.Connect your phone to PC.
4.On cmd prompt type:
Code:
fastboot devices
and then enter.
5.if your device is listed then copy the code and hit enter.
Code:
fastboot oem enable_camera_hal3 true
6.Then type fastboot reboot and hit enter. [your phone will reboot]
7. After success meassage disconnect phone from pc.
Step3:Enable Developer option and USB Debugging:
1.Go to settings>system>about phone> then tap on build number continuously for atleast 7 times until it shows developer option enabled.
2.Now go to settings>system>developer options> scroll down and turn on USB debugging
3.Now connect your phone to pc and allow access for usb debugging.
Step4:Removing Stock camera:
1.Go to folder C:\adb\ and type cmd on the adress bar and hit enter.(it will open up cmd prompt inside that folder) Then type the code below.
Code:
adb shell pm uninstall -k --user 0 org.codeaurora.snapcam
Step5:Installing google camera:
You can directly install the Google camera apk on your phone by downloading on your phone and just install as usual.
(OR) You may do it from PC as:
1.Copy and paste the google camera apk you downloaded to the adb folder C:\adb\
2.Copy the full apk name of the google camera apk (e.g: MGC_6.2.024_BSG-based_TlnNeun.apk)
2.Open cmd there (by typing cmd on the adress bar inside the adb folder and hit enter) and copy and paste the code and hit enter:
Code:
adb install <apkname> (e.g: adb install MGC_6.2.024_BSG-based_TlnNeun.apk)
3.It will show success and you are done disconnect from pc.
[RECOMMENDED SETTINGS FOR BEST RESULTS IN (LATEST AND ADVANCED) 6.3.017]
settings>advanced> Base settings > HDR+ Control ON (others OFF)
settings>advanced> HDR+ Settings > Quality HDR+ (Maximum available ;36)
settings>advanced> Portrait > Disable zoom in portrait mode (ON) and Advanced HDR+ in portrait mode (ON)
Keep motion OFF
LEAVE ALL OTHERS AS IT IS
[ TIME FOR SHOW OFF ]
Results produced No edit : My google photos
[CONGRATULATIONS YOU HAVE REPLACED YOUR STOCK BUGGY CAMERA WITH FANTASTIC GOOGLE CAMERA , ENJOY CLICKING PHOTOS.]
<Mod edit>
Problem on Asus Zenfone Max pro m1
I have installed gcam v6.2 on my asus zenfone max pro m1 and everything was working fine until one day i realised that the night sight worked fine on my device and it produced some really clear pictures but whenever i try to take some pictures using the flash light in some dark areas, the flash glows no doubt, but when the picture is taken it is always dark as if the flash didn't work at all...I really liked google cam but this problem is awful and please fix this as soon as possible
S3NSOR said:
I have installed gcam v6.2 on my asus zenfone max pro m1 and everything was working fine until one day i realised that the night sight worked fine on my device and it produced some really clear pictures but whenever i try to take some pictures using the flash light in some dark areas, the flash glows no doubt, but when the picture is taken it is always dark as if the flash didn't work at all...I really liked google cam but this problem is awful and please fix this as soon as possible
Click to expand...
Click to collapse
Try disabling the hdr modes.
Update in the POST
s3nsor said:
i have installed gcam v6.2 on my asus zenfone max pro m1 and everything was working fine until one day i realised that the night sight worked fine on my device and it produced some really clear pictures but whenever i try to take some pictures using the flash light in some dark areas, the flash glows no doubt, but when the picture is taken it is always dark as if the flash didn't work at all...i really liked google cam but this problem is awful and please fix this as soon as possible
Click to expand...
Click to collapse
guide is updated please go through
Tried the minimal version with stock settings (didn't change anything). The focus and exposure on stock camera app seems better.
Is there any chance to reverse Step 4 : Removing Stock camera. I would like to keep the original camera app (but already uninstall the camera app). Thanks.
Here's the way out.
straldin said:
Is there any chance to reverse Step 4 : Removing Stock camera. I would like to keep the original camera app (but already uninstall the camera app). Thanks.
Click to expand...
Click to collapse
simple, just open adb see if your device is listed and then paste the code and hit enter.
Code:
adb shell cmd package install-existing org.codeaurora.snapcam
Peace :highfive:
Thanx
thnx not yet tried

Categories

Resources