yashsingh1/xdaforums huggingface dataset:
[T-Mobile myTouch 4G Slide] strapped365:
Its in the kernel source. Its in arch/arm/mach-msm/board-doubleshot.c ill find the line of code to change in a hot minute

this is how it looks in HTCs Source

static struct camera_flash_cfg msm_camera_sensor_flash_cfg = {

.low_temp_limit= 5,

.low_cap_limit= 30,

so if i had to guess to get it turned off it should look like this

static struct camera_flash_cfg msm_camera_sensor_flash_cfg = {

.low_temp_limit= 5,

.low_cap_limit= 0,

when i tried before i changed the 30 down to 15 and that did nothing, then the next time i compiled a evo shift kernel i just set that number to 0 and compiled it and used the camera flash all the way down to 2% what ROM are you running?

Blue would know more about this as he is the one who told me how to change it
[T-Mobile myTouch 4G Slide] figarofigaro:
That's some great information, man! I was way too tired last night to even check the kernel out... but that makes a lot of sense! (That might be the worst pun in history)

Ill open that bad boy up and fiddle around.

If I get anything going ill post a flashable zip or something!

I'm using that new modified CM9 that was released on the 29 (SEP), I forget the version number off hand, but it's a lovely jump. I was running an Alpha before, I haven't had much time for fiddling until now.
[T-Mobile myTouch 4G Slide] strapped365:
Any luck with this? When my drive got wiped I lost everything and the last known booting source of had wouldn't even boot so I think something in the split boots scripts I have is wrong :mad:
[T-Mobile myTouch 4G Slide] SKAm69:
Is there a camera app out there that supports auto focus light just like on digital cameras? For example, first flash for it to focus and then the other one to take a picture.
[T-Mobile myTouch 4G Slide] siani_8:
I would love to buy someone a drink that knows how and can make this happen for us.
[T-Mobile myTouch 4G Slide] strapped365:
For what Rom? Since its a kernel based mod its not a universal mod, but could be used by all kernel devs
[T-Mobile myTouch 4G Slide] siani_8:
Personally, I would like to see this mod for MikTouch 0.7 as I'm now sticking with that one as my DD and for when I want stock goodies like the Camera and TV Out.
[T-Mobile myTouch 4G Slide] Riyal:
Hmmm just noticed this thread. lol barely go to the "Themes and Apps" section :p

Anyways a quick workaround for this one is just edit the file in

/sys/camera_led_status/low_cap_limit

using any file manager with root permission and change it to whatever value you want. Like for example set it to 0 so you would be able to use the camera until 0% battery.

or make it 5% so it would disable using flash on 5% battery.

or perhaps you could add an init.d script like

#!/bin/sh
echo 0 > /sys/camera_led_status/low_cap_limit

to disable the flash limiter
[T-Mobile myTouch 4G Slide] siani_8:
OK using Root Explorer I navigated to sys/camera_led_status/low_cap_limit and then long pressed and opened with text editor and changed to 0. I then pressed save and exit through menu and it said it would create a backup file of the original but it didn't. I then opened the file again in text editor and it still said 30. Am I missing a step?
[T-Mobile myTouch 4G Slide] Riyal:
Well thats lame... I use to be able to edit it in my Sony Xperia device.

So I guess you have 2 options left. Let strapped recompile a new miktouch kernel for you or you could post the HTCCamera.apk and I'll edit it directly for you.
[T-Mobile myTouch 4G Slide] elpapagayo:
How to modify focus?

I'm thinking about manual focus, because- f.e put your finger a little bit from camera- first time focus make perfect sharpness, than is going outside finger; can't stop focusing at this right moment- that is the problem, anybody know how to modify that? It's make me really nervous...

B.R.

El.
[T-Mobile myTouch 4G Slide] siani_8:
Here is the Stock Camera App pulled from MikTouch 0.7. Thanks so much for your help!
[T-Mobile myTouch 4G Slide] siani_8:
In the meantime, maybe you could try tap to focus on one particular point in the picture on the screen and then hold the button down halfway before taking the picture and it will focus on that spot. I know that's not what you are looking for exactly but maybe it will help a little. Also, I think Camera360 in the market states they have Manual Focus but when I had it installed, I didn't try that feature.
[T-Mobile myTouch 4G Slide] Riyal:
Try this one.

For those eager to know what I modified. Here's the modified code.

private void initDisableFlash()
{
this.mIsLimitHotSpot = 0;
this.mIsLimitRIL = 0;
this.mIsLimitWimax = 0;
this.mIsLimitBatTemp = 0;
this.mIsLimitBatCap = 0;
if (isChecked("/sys/camera_led_status/led_hotspot_status") == true)
{
this.mIsLimitHotSpot = 16;
LOG.W("FlashRestriction", "enable hot spot, must disable flashlight");
}
if (isChecked("/sys/camera_led_status/led_ril_status") == true)
{
this.mIsLimitRIL = 8;
LOG.W("FlashRestriction", "phone incoming, must disable flashlight");
}
if (isChecked("/sys/camera_led_status/led_wimax_status") == true)
{
this.mIsLimitWimax = 4;
LOG.W("FlashRestriction", "use wimax, must disable flashlight");
}
if (isLower("/sys/class/power_supply/battery/batt_temp", BATTERY_TEMPERATURE_LIMIT) == true)
{
this.mIsLimitBatTemp = 2;
LOG.W("FlashRestriction", "battery temperature lower, must disable flashlight");
}
if (isLower("/sys/class/power_supply/battery/capacity", BATTERY_CAPACITY_LIMIT) == true)
{
this.mIsLimitBatCap = 1;
LOG.W("FlashRestriction", "battery capacity lower, must disable flashlight");
}
this.mDisableFlash = (this.mIsLimitHotSpot | this.mIsLimitRIL | this.mIsLimitWimax | this.mIsLimitBatTemp[B][U][COLOR="Red"] | this.mIsLimitBatCap[/COLOR][/U][/B]);
if (isDisableFlash() == true)
updateFlashState();
}

I removed the highlighted code.

code is located in
[T-Mobile myTouch 4G Slide] Riyal:
I'm not really sure about this one since I never really bothered with this issue but will try to take a look.
[T-Mobile myTouch 4G Slide] siani_8:
Wow that was fast!! Have a drink on me for the effort: 0GW53316PT619674C

I'll buy you another later after I try it...my phone is at 100% charge right now.
[T-Mobile myTouch 4G Slide] Riyal:
Wow! lol never thought that was the drink :p I thought it was just some smiley or whatever. Ok then hope it would work. Although it should but I never tested it.
[T-Mobile myTouch 4G Slide] siani_8:
Well I finally got my phone below 30% today. When using the camera below 30% it looks like I should be able to use the flash since the option to use flash is not "greyed out" like it usually is below 30% and I don't get an error message on the screen about the battery being too low to use flash. However, when i take a picture with the flash on below 30% the flash doen't actually activate when snapping a photo. It seems like you are on the right track but not quite there yet.

Edit: Also, when taking a picture below 30% now, I can only take one. After that, previous pic stays on the screen instead of being ready for the next shot.

I didn't load the app on a fresh install with the ROM. I deleted the previous camera apk then copied in yours and changed permissions. I then booted in recovery and cleared cache and dalvik before rebooting.
[T-Mobile myTouch 4G Slide] Riyal:
Hi! If you don't mind could you install a 3rd party camera and see if it's able to use flash even when below 30%?

Try lgcamera for instance.

https://play.google.com/store/apps/details?id=rubberbigpepper.lgCamera

just take a photo while flash set to on. And tell me the results.

Could you try it one more time? I don't think this issue is caused by what I edited. It just seems very unrelated. Or perhaps some files got corrupted when I recompiled the app. Just try it again and if possible do another wipe dalvik cache.

And also please delete /data/data/com.android.camera/

There might be leftover settings there from the previous camera while causes the issues.

---------- Post added at 11:55 AM ---------- Previous post was at 11:35 AM ----------

And oh another thing. Could you post also a logcat when you took a picture of the default camera and flash doesn't show up? This could help alot in tracking the issue.
[T-Mobile myTouch 4G Slide] Riyal:
Hello again! Try this one. I cleaned up some more filters
[T-Mobile myTouch 4G Slide] siani_8:
I will try a third party app but my phone is at 100% again so it will be a while.

I did delete /date/data/com.android.camera/ last night thinking the same thing as you that there might have been previous files causing an issue. I also cleared dalvik cache a second time too just in case.

Since I did have issues over 12 hours ago, will running a logcat now even show that or do I have to wait until I encounter the problem again and then run the log cat immediately afterwards?

I ran the camera all day yesterday testing with no problem. It wasn't until I dipped below the 30% that it started freezing up after taking picture. hitting the back button would sometimes get back to "ready to take picture" mode after it froze.

I see you posted and updated camera app. I will try that one today also and give results when I'm below 30% again

Thanks again for your efforts!!
[T-Mobile myTouch 4G Slide] Riyal:
Just try the updated one later when you're below 30% already. And just save a logcat so I could trace out if ever it still won't work. Although I doubt it won't :p
[T-Mobile myTouch 4G Slide] siani_8:
Ok I put my OEM battery in that was below 30% to test.

It doesn't seem to freeze as much after taking a picture but it still does some. I didn't notice it freezing at all above 30%.

Flash does work above 30% but doesn't activate below 30% even though it will allow me to select flash it doesn't use it

I installed LG Camera and I was not able to use flash with that one below 30% either.

I attached a logcat. I tried to delete everything before references to the Stock Camera when being used below 30% but I still probably left too much on there.
[T-Mobile myTouch 4G Slide] Riyal:
Just as I thought... The kernel also handles flash restriction on the backend.

So I guess the only option left is modifying the kernel.

Just a question thou... Does miktouch kernel have any modifications like overclocking support, vdd, additional governors/IOSchedulers? I'll create a kernel for you. Perhaps this would be of use for me in the future.
[T-Mobile myTouch 4G Slide] siani_8:
The kernel is bone stock...
[T-Mobile myTouch 4G Slide] Coug76:
There is also a 1.5gHz OC kernel IIRC. I have it in my DL folder on the SD card. Never played with it

Hastily spouted for your befuddlement
[T-Mobile myTouch 4G Slide] elpapagayo:
Hi

I found app like "Shot Control", for macro photos, or...zooming photos -much much better than stock app.

Look for pictures- both resized with irfan for 40% for uploading.

This is my cup with morning coffee:). One time, I want to make a full moon with photo with stock cam. app.- and it's made me nervous with zoom and focus- therefore I was looking for antoher app. Photo with 4:3 is form Shot Control and 16:9 from stock cam app.

Look:

B.R

El
[T-Mobile myTouch 4G Slide] siani_8:
Wow that's impressive!! I'm going to have to add that app to my collection for macro shots. Out of curiosity, was the second photo taken using the Macro setting of the stock camera?
[T-Mobile myTouch 4G Slide] elpapagayo:
Yep, macro settings of stock camera, all of you- if you want naturally - try to zoom at Moon (new, full) and make a shot with stock cam...yes, therefore I'm thinking about manuall focus.

B.R.

El.
[T-Mobile myTouch 4G Slide] strapped365:
I've done tried and its not a very good pic.
[T-Mobile myTouch 4G Slide] Riyal:
Hi! Just finished weekends thats why I just got online. Anyways here's a pure stock kernel with disabled flash restriction. Try this one :)

http://198.61.197.41/stock/kernel/stock-no-flash-restrict.img

Modules:

kineto

http://198.61.197.41/stock/kernel/kineto_gan.ko

wifi

http://198.61.197.41/stock/kernel/bcm4329.ko

not sure if this is also needed but here you go.

http://198.61.197.41/stock/kernel/lcd.ko

For now just flash the kernel without the modules and see if it works. If yes I'll make a flashable zip with all the modules for easy installation.
[T-Mobile myTouch 4G Slide] siani_8:
Unfortunately, the new kernel didn't seem to work for me with or without your modified camera app. I noticed there are no longer any camera zoom and shutter sounds though.

Can someone else using the mikTouch ROM give it a shot to eliminate human error on my part?

EDIT: Ignore what I wrote for now. I think I may have had a bad flash of the new kernel from my computer at home. I flashed it again at work and I'm already seeing different results (such as camera shutter and zoom sounds which were not present after the first flash) Let me run the batter down passed 30% again and give it another test.
[T-Mobile myTouch 4G Slide] siani_8:
I put my stock battery back in because it's too hard to kill the Mugen. I'm below 30% now with the new kernel and your second revised camera app and I can select flash but the camera doesn't use it when taking a picture. Something with the modified camera app makes the camera freeze after taking a picture as well. I can hit the back button to unfreeze the screen and get it ready for the next shot though. I notice this when using it below 30% Thank for your efforts in any event
[T-Mobile myTouch 4G Slide] Riyal:
Hi siani! Try using the stock camera app and the new kernel. Modified camera app isn't compatible with the new kernel.

And also please post another logcat if possible! :) If it still fails then I am assuming other flash restriction rules are disabling the camera flash. Like battery temperature or current or something.

Here's a better way of getting a logcat.

(Make sure you're using original/non modified camera app & new kernel)

1. Use a battery with lower than 30% capacity.

2. Restart your device.

3. Open camera app

4. Use flash while taking a picture.

5. get logcat
[T-Mobile myTouch 4G Slide] siani_8:
Hey Riyal!

Actually, I had the stock camera installed first yesterday but with that installed, I didn't even get the option to select flash below 30% and I still got the message popup about being unable to use flash because of low battery and so I tried your modified camera app thinking I might have a shot with that.

Anyway, I installed the stock camera app again and followed your steps to produce a logcat. I'm guessing it might not be much help since I'm not able to select flash below 30% though. I really really appreciate you taking this on. It's one of the things I thought a developer would have taken on when we first started this journey.
[T-Mobile myTouch 4G Slide] Riyal:
that's odd. With the new kernel installed could you tell me what's the value of

/sys/class/power_supply/battery/capacity

just open it using any file explorer.

And about the logcat it doesn't contain any info regarding camera at all.
[T-Mobile myTouch 4G Slide] siani_8:
I just started installing the ROM fresh tonight to give myself a solid fallback ROM again but I promise I'll put the kernel on again agter I get a good backup.

I didn't even look at the logcat this morning. I just ran it for a minute or two after using the camera. Usually I start the log before I try to recreate a problem but I noticed you told me to do it after so I gave that a shot.

EDIT: Ok I just opened /sys/class/power_supply/battery/capacity and it says 64. 64 is also my current battery life. I just waited until my battery got down to 62 and opened that location again. Now it says 62.
[T-Mobile myTouch 4G Slide] Riyal:
omg! Where did that come from. I was sure I pasted a different path when I posted this...

Anyways this is the correct one.

/sys/camera_led_status/low_cap_limit

this is not the correct one

/sys/class/power_supply/battery/capacity
[T-Mobile myTouch 4G Slide] siani_8:
Haha I thought that sounded odd. /sys/camera_led_status/low_cap_limit still say 30 when i open in text editor
[T-Mobile myTouch 4G Slide] Riyal:
30 on the new kernel I compiled? Or just plain stock?

if it's 30 then no wonder flash is still not working. It should be 1.

Anyways I'll try to compile another one. I might have changed something else.

---------- Post added at 04:18 PM ---------- Previous post was at 03:23 PM ----------

here's a new kernel. http://198.61.197.41/stock/kernel/newboot.img

please flash and take a look at

/sys/camera_led_status/low_cap_limit

again. If it's 1 then please try the stock/unmodified camera app.

if it worked tell me so I could upload the kernel's modules.
[T-Mobile myTouch 4G Slide] siani_8:
YES!!! It says 1 now :) I have a battery that is below 30% at work so as soon as I get there I can to the next test.
[T-Mobile myTouch 4G Slide] siani_8:
Success!!! I'm taking pictures using flash right now with battery at 12%. You rock!! Thank you so much!! I hope I'm not the only one that appreciates this because not being able to use flash below 30% was super annoying. Have another drink on me Conf #1KN30874BV432721G
[T-Mobile myTouch 4G Slide] Riyal:
Ok so here's the kernel with it's modules packaged in a flashable zip. Enjoy and thanks for another drink! :)
[T-Mobile myTouch 4G Slide] siani_8:
Thanks again Riyal!! This is working perfectly
[T-Mobile myTouch 4G Slide] figarofigaro:
Wow I have a lot of catching up to do! ahahaa I come back to this thread a week later and there's 40+ replies.

I see a few attachments... I asked, and you guys delivered..

Great community, as always. I remember the HTC Dream days
[T-Mobile myTouch 4G Slide] siani_8:
What ROM are you using? I only ask becuase the kernal with the fix that Riyal posted for this works with the MikTouch ROM which was giving camera flash restrictions below 30% and I just noticed that your OP said you wanted a camera fix to allow you to use flash below 15% making me think you were on a different ROM.

That said, if you are using the MikTouch ROM, then the very last attachment that Riyal posted in this thread is working great for me and I no longer have flash restrictions.
[T-Mobile myTouch 4G Slide] sino8r:
You can also find the fix here when R6 exp kernel drops. http://xdaforums.com/showthread.php?t=1912582
[T-Mobile myTouch 4G Slide] Riyal:
The kernel I compiled is fully compatible with all gingerbread stock ROMs.

sino8r's kernel should work with all ICS non-sense ROMs.

Only ROMs that don't have an available patch for this are the sense 4.* ICS ROMs but I'll try to make one on my next free time :D
[T-Mobile myTouch 4G Slide] Fuzi0719:
Now what I would love is the GB stock kernel modified to OC at 1512MHz with SmartassV2 or one of the hotplug governors added. :) I have a few of strapped365's modded stock kernels, but they are OC'ed at 1.7GHz which my phone just doesn't like for extended periods (I get black screen of death occasionally with them). I ran the CM9.1 ROM at 1512 and it was very stable, which makes sense as the processor in our phones is a 1512Mhz processor that HTC underclocked for our device.
[T-Mobile myTouch 4G Slide] strapped365:
i tried to mess around with both lulzacrive govs,hotplug and ondemandx and dint get anything but fails so i redownloaded the source,change teh clocktables to 1.5. took the low flash off and added smartass v2. im not sure if its going to work but its past building all the changes ive made and no errors

*edit*

Oh yeah the camera flash cut off is gone :D. I just used the flash when my battery showed only a red outline with a slanted line through the middle, i think that's about as low as possible the battery gets.

I'll post a tester message in my ROM thread.
[T-Mobile myTouch 4G Slide] Riyal:
I'm not familiar with the newer governors like lulzactive & hotplug so can't really help much but do tell me if you have any issues with them so at least I could take a look ;).

Also take note to disable perflock when creating a OC kernel. not disabling them will cause clock to poll to the maximum frequency everytime causing issues like what Fuzi said.

I don't know any GB kernel for doubleshot yet with proper OC implementation so I doubt you get some info on that but do tell me if your stuck somewhere so I could assist..

I'm pretty busy right now as I am trying to create from scratch a full featured ICS Sense kernel with full compatibility on doubleshot so can't have much spare time.(Hoping for wifi and camera bugs to be fixed by this one.)
[T-Mobile myTouch 4G Slide] strapped365:
Yeah their performance lock is the first thing I turn off when going into menuconfig. I was looking at one of fauxs source and his acpu clock table is very different from Romans but everyone loved Romans kernel so I went that route for now. I'm also thinking the issues I had with hot plug ect could have been due to a ransacked source
[T-Mobile myTouch 4G Slide] Jake of All Trades:
Oh no :( I flashed the zip, and now the viewfinder is all messed up. I don't know how to describe it, but it is all striped and weird. All the camera-based apps (barcode scanner, etc) are doing the same thing. Photos come out normal though. Any way to fix this or undo it? I can't figure out how to even get the stock app/kernel back. I'm on Bulletproof. Thank you all for any help, and thank you folks for making such a useful mod!
[T-Mobile myTouch 4G Slide] Coug76:
May flash bulletproof over your existing install. It'll put it back to the original camera and keep your data.

Hastily spouted for your befuddlement
[T-Mobile myTouch 4G Slide] palmwangja:
can we install this on CM(9 or 10.1)-based ROM??
[Galaxy 3 Android Development] useby:
I'm Building Oc module for s5p and s3c cpus But I'm noop at C language.....

/*

* Author: Useby Ported this module from zdzihu's module

* Adapted from doixanh's X8Undervolt module

* This program is free software; you can redistribute it and/or modify it

* under the terms of the GNU General Public License as published by the

* Free Software Foundation; either version 2 of the License, or (at your

* option) any later version.

*

*/

#include

#include

#include

#include

// defines

#define MODULE_NAME "Useby_oc"

#define MODULE_VER"001"

#define OFS_KALLSYMS_LOOKUP_NAME0xc0251e8c// kallsyms_lookup_name

//for future usage

static struct cpufreq_frequency_table freq_table_666_166MHz[] = {

{0, 1000000},

{1, (1000000)/2},

{2, (1000000)/3},

{3, (1000000)/4},

#ifdef SYSCLK_CHANGE

#ifdef USE_DVFS_AL1_LEVEL

{4, (1000000)/4},

{5, (1000000)/8},

{6, CPUFREQ_TABLE_END},

#else /* USE_DVFS_AL1_LEVEL */

{4, (1000000)/8},

{5, CPUFREQ_TABLE_END},

#endif /* USE_DVFS_AL1_LEVEL */

#else /* SYSCLK_CHANGE */

{4, CPUFREQ_TABLE_END},

#endif /* SYSCLK_CHANGE */

};

static struct cpufreq_policy *policy;

static struct cpufreq_frequency_table *freq_table;

// external variables / functions

typedef unsigned long (*kallsyms_lookup_name_type)(const char *name);

static kallsyms_lookup_name_type kallsyms_lookup_name_dx;

// init module

static int __init useby_oc_init(void)

{

printk(KERN_INFO MODULE_NAME ": module " MODULE_VER " loaded.\n");

// our 'GetProcAddress' :D

kallsyms_lookup_name_dx = (void*) OFS_KALLSYMS_LOOKUP_NAME;

// look for other offsets

freq_table = (void*) kallsyms_lookup_name_dx("s5p6442_freq_table");

policy = cpufreq_cpu_get(smp_processor_id());

freq_table = cpufreq_frequency_get_table(smp_processor_id());

freq_table[0].frequency = 1000000;

policy->cpuinfo.max_freq = 1000000;

policy->max = 1000000;

printk(KERN_INFO MODULE_NAME ": overclocking applied.\n");

return 0;

}

// exit module - will most likely not be called

static void __exit useby_oc_exit(void)

{

printk(KERN_INFO MODULE_NAME ": module unloaded\n");

}

module_init(useby_oc_init);

module_exit(useby_oc_exit);

MODULE_DESCRIPTION("Overclocking module for SG3");

MODULE_LICENSE("GPL");

When I first load Module Cpu master says It's 1000MHZ

But a Bit later It Says 667...again..

So Developers What about solving this quest? I think module is very useful!

1st picture must be 887 freq but as you see the Source i changed the value....
[Galaxy 3 Android Development] amarendar94:
What is the use of this module...because we already have overclock in our kernels.

Can u please explain