Post Reply

Camera patch for low battery

29th April 2014, 09:31 AM   |  #1  
OP Junior Member
Flag Aschaffenburg
Thanks Meter: 1
 
1 posts
Join Date:Joined: Oct 2013
More
Hi,

the last months I've looked for a camera patch, to use the Zoom S4 camera with low battery.

I'ts very bad, you've brought the S4 Zoom mainly to take photos of cause. Otherwise you could choose another Galaxy.
But the only think what is no longer working on low battery (<5%) is the Camera!

Because I only find patched cameras for other Galaxy phones, I've done the patch by myself.
I spend the last week to break in deodexing, smali, baksmali etc. Finally I think I get it!
I't only one byte to patch.

If you want to to it by yourself, and you are common in modding apk's, look for the file "Camera.smali".

and patch this part:

before:
-----------------------------------------------
.line 537
const/4 v0, 0x5

sput v0, Lcom/sec/android/app/camera/Camera;->LOW_BATTERY_THRESHOLD_VALUE:I
------------------------------------------------

after:
-----------------------------------------------
.line 537
const/4 v0, 0x1

sput v0, Lcom/sec/android/app/camera/Camera;->LOW_BATTERY_THRESHOLD_VALUE:I
------------------------------------------------

Some more information:
I first tried to patch the "handleLowBattery(Z)V" to add a "return-void" as described in some other posts for the Galaxy S3 for example.
But this doesn't work: Yes, the camera app wouldn't close, but the camera lens doesn't move and stays inactivated, so you couldn't take any photos.
So I looked for the 5% LOW_BATTERY_THRESHOLD, and that's what I do: altering the threshold from 5% to 1%. And it's working


But the next bad thing, I'm not allowed to post it in the right section of the forum, because I didn't post enough.
So what should I do?


Cheers,
kinad.
The Following User Says Thank You to kiniad For This Useful Post: [ View ]
10th June 2014, 02:34 PM   |  #2  
Member
Thanks Meter: 31
 
86 posts
Join Date:Joined: Sep 2010
Hello!
i got the same feature using Wanam Exposed (after installing Xposed Installer and obtaining root).
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes