Remove All Ads from XDA

Camera patch for low battery

3 posts
Thanks Meter: 1
By kiniad, Junior Member on 29th April 2014, 10:31 AM
Post Reply Email Thread

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:

.line 537
const/4 v0, 0x5

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

.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?

The Following User Says Thank You to kiniad For This Useful Post: [ View ] Gift kiniad Ad-Free
10th June 2014, 03:34 PM |#2  
Thanks Meter: 38
i got the same feature using Wanam Exposed (after installing Xposed Installer and obtaining root).
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes