yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace II Android Development] ChronoMonochrome:
It was about two years ago, I'm not sure now it has an exact relation to the incorrect behaviour of one RTC calls described in that post.

There are obvious issues with the RTC driver that causes some problems on 6.0+ ROMs. If it's that due to the change of the timestamp of file modification, there is one simple way to check it - just check file modification time before and after insertion of SDcard to the cardreader.

I wasn't considering fixing it so far, as I never had such an issue as I use a custom gallery app.
[Galaxy Ace II Android Development] AkosPaha:
How much is the chance of damage to the battery?:mad:
[Galaxy Ace II Android Development] ace2nutzer:
@up

if u don't know what u do, it can even explode and start to fire up !

But check my previous post, i've added software solution ... it's 100% safe.
[Galaxy Ace II Android Development] ace2nutzer:
Ok, the thing is that:

If i check the "details" of an photo from the stock gallery app, then it has 3 dates ... 2 are right ... and one is wrong with that 1970 :D .. But sometimes such wrong date gets automatically "fixed" with correct date (but still the same date from the other 2 timestamps) .... and the photo is sorted then logically different !

i was trying to hack it on kernel ... but i didn't succeed.
[Galaxy Ace II Android Development] AkosPaha:
In what applications do you need to see how much my phone is charging?
[Galaxy Ace II Android Development] ace2nutzer:
CurrentWidget
[Galaxy Ace II Android Development] lace_hvc:
Same here. Record time is 1970.

This also applies to newly taken images, but they are sorted the right way...until I remove the sd card and put it back into the phone. Then its chaos :D

I cant say for sure cause I dont remove the sd card very often. But I know that I noticed it the first time on ROM 20170522 & Kernel 20170522.

Previously I was on 20170323 & Kernel 20170426, but I cant remember if I removed the sd card that time.

ROM 20161122 & Kernel 20161117 didnt have that problem.
[Galaxy Ace II Android Development] AkosPaha:
This:
[Galaxy Ace II Android Development] ChronoMonochrome:
Then try checking another camera and/or gallery app. I've just checked some photos in DCIM folder, all of them has a proper timestamps. I'm using OpenCamera and QuickPic (don't know, though whether it's related to the different apps used or OS version).
[Galaxy Ace II Android Development] AkosPaha:
[MENTION=5840412]ace2nutzer[/MENTION]

Where do I find the scenario?
[Galaxy Ace II Android Development] :
[MENTION=5840412]ace2nutzer[/MENTION]

Should I throw my battery with 20% capacity to the fridge for 5 hours to recover my battery?! I am worried that will damage my battery instead of recover ny battery to nearly 90% of design capacity.

And more, does this ROM support F2FS?
[Galaxy Ace II Android Development] ace2nutzer:
Don't do that.

No f2fs support.
[Galaxy Ace II Android Development] msq2:
Try charging the battery with a current of 50-100mA outside the phone.

The trick with a freezer and refrigerator is a myth that has been repeated for 15 years, it was about old Ni-MH and Ni-Cd batteries.
[Galaxy Ace II Android Development] msq2:
Look voltages and % :cowboy:

The multimeter showed 3.19V

At this point I did the screenshot and took out the batteries because the screen blinked. When the battery inserted into the phone showed 0%

Edit: battery discharging by this app https://play.google.com/store/apps/details?id=com.stdev293.batterywasterdemo&hl=pl
[Galaxy Ace II Android Development] ace2nutzer:
I made i photo and checked directly the timestamps with the file manager app .. and they are all correct!

But if check the "details" of the photo with the stock gallery app then it shows recordtime 1970.

So that's likely exif data that accesses unfortunately the wrong RTC ... from kernel (the buggy one)

Don't know what's easier to fix ... adding an workaround to the exif lib in the ROM ... or maybe better to fix the RTC Driver in the kernel.
[Galaxy Ace II Android Development] lace_hvc:
Regarding the date/sorting in gallery app:

"Quickpic - Sort by date (not by date taken)" gives the right order. Also pressing 'fix date' in Quickpic and then opening the default gallery app gives the right order of the images.

Removing the sd card again ruins the sorting again. The 1970 recording time is added again.

File Manager always shows right dates in properties and file names.

Im sure that problem didnt occur on older ROMs (at least ROMs from last year, maybe until March this year).
[Galaxy Ace II Android Development] ace2nutzer:
@up [MENTION=5695278]ChronoMonochrome[/MENTION]

yes, so far i'm really wondering as i've here only one photo in gallery app that shows me all dates properly !

The date is from 28.02.2017 ! Can u guys maybe check if u've from the same day an photo and it shows the proper date if u click on "details" ?? that would be useful.

because i'm not sure why it's the only one with correct exif data.
[Galaxy Ace II Android Development] lace_hvc:
In the gallery app the title and time are always correct for me. Recording time is missing or it's 1970.

I don't have a picture from this specific date.

Btw. removing the SD card is enough to ruin the order, no need to plug into another device.

Can I simply dirty-install older ROMs and kernel to see whether the problem existed there?
[Galaxy Ace II Android Development] ace2nutzer:
Ok .. a picture taken a few days before or after that ... should be as well.

It think this bug was always present ...

Right now tested with latest chrono kernel = same problem.

Anyway, it's a kernel bug (rtc driver)

So no need to test older roms.

btw: i can't reproduce your issue with "removing sdcard"

if i connect my phone with UMS and accessing the pictures ... and then i disconnect and go back to the gallery app, everything is like before.

second test: i shutdown the phone, remove the sdcard .... and insert to PC .... back to the phone ... test gallery app = all OK.

i remember: if u are using sdcard_only kernel, then don't remove the sdcard on a running system!

Because u can't unmount it first!

Unmount sdcard, only works with the default kernel version.!
[Galaxy Ace II Android Development] lace_hvc:
Im on default kernel and I havent reparted.

So the order in the default gallery app is fine for u? For me its ruined once I unmount/remove sd card and plug it back in. I fix the order with quickpic's 'fix date'. Then everything is fine until I remove the sd card again. Then the exact same 'ruined' order is back. I never had this problem in the past. ROMs/kernel from 2016 were fine for sure because during that time I removed the sd card frequently. I cant say for sure if this happened after updating in March since I mostly used a USB cable instead of removing the sd card. That's why I wanted to install ROM 20170323 & Kernel 20170426 again and test.

After fixing the date with Quickpic, I copied the camera folder to microsd 0 and the order of these copied images was wrong again. Weird.
[Galaxy Ace II Android Development] ace2nutzer:
u can also move files from internal sdcard to your ext_sdcard and then simply install sdcard_only kernel.

it works as well!

Yes.

Yeah, i'm trying a few different RTC drivers ... so far no luck!

Right now compiling kernel with RTC Driver from Android Kernel 3.4.x

If that'll not work too, then i've to give up.
[Galaxy Ace II Android Development] lace_hvc:
I think I stick to Quickpic then. Or i might be curious and try an older ROM/kernel. Cant think of something I did that caused this.
[Galaxy Ace II Android Development] ace2nutzer:
ok i've to give up.

But maybe it's possible to fix it up on exif lib.

If somebody want to try it out:

https://android.googlesource.com/platform/external/libexif/+/android-4.4.4_r2

maybe [MENTION=5695278]ChronoMonochrome[/MENTION] ?
[Galaxy Ace II Android Development] lace_hvc:
I put the micro sd into a tablet. No problem there with the DCIM folder in the default gallery app. Everything sorted correctly.

Then I moved the camera folder to another micro sd, plugged into my phone, same sorting issue. So its something about the phone.

Maybe this gives you clue.
[Galaxy Ace II Android Development] :
But now many phone threads in vietnam say it is a trick that can recover the capacity in a battery to 100% if lower than 1 year old, nearly or equal 90% if longer than 1 year life. I asked some users and they said that they tested and works perfectly. But I am still worried.

But how can I charge my battery outside the phone? Which charger do I need to charge in 50-100mA current?

---------- Post added at 01:59 AM ---------- Previous post was at 01:56 AM ----------

Don't remove the sdcard when you don't ejected it or it is still reading! This could destroy the timestamp in some file, in the wrost case you have to recover the files in the computer because some files could be corrupted and moved to LOST.DIR folder, which can only be fixed using "chkdsk" command in Windows.
[Galaxy Ace II Android Development] ChronoMonochrome:
Sorry, I'm not very interested in it. I've, however, out of curiousity built the default gallery app (android 6.0.1) and checked some recently taken photos with it - they all appears to have the correct date. Enabling UMS USB mode doesn't seem to change anything. So maybe using another Gallery source might fix this bug. I'm using this one package:
[Galaxy Ace II Android Development] ace2nutzer:
and u're using different exif lib.

But thanks for the hint, i'll try with newer exif lib and or gallery app.
[Galaxy Ace II Android Development] lace_hvc:
I tried different ROMs from November, March, May and June.

cm-11-20161122 incl. kernel20161117 is the only one where the images in the default gallery app are always sorted correctly. The record time is still 1970, but that doesn't seem to matter. I removed the sd card, plugged it back in, rebooted, ... sorting is correct!

Thanks. I always unmount first, then remove the card.
[Galaxy Ace II Android Development] ace2nutzer:
Ok, now test if it's still ok with latest kernel.
[Galaxy Ace II Android Development] Moonly:
I did a wipe cache and dalvik, and for now it's working good. We now have 629MB of RAM. :)
[Galaxy Ace II Android Development] MrBlackCore:
Using latest F2FS kernel and sill cant use anything above 1000mhz freq. Just got a random reboot at 1100mhz
[Galaxy Ace II Android Development] BlueZ-:
Multitasking is not working properly...it doesn't keep apps in memory so everytime reloads every app even with 2 opened

Inviato dal mio GT-I8160 utilizzando Tapatalk
[Galaxy Ace II Android Development] RyxeL:
same
[Galaxy Ace II Android Development] MrBlackCore:
+1
[Galaxy Ace II Android Development] Glpcha:
I have the same problem. Reverted to earlier kernel until this gets fixed.
[Galaxy Ace II Android Development] werindam:
I have this same issue :c multi tasking dont work properly, i hope [MENTION=5840412]ace2nutzer[/MENTION] fix this soon
[Galaxy Ace II Android Development] ace2nutzer:
Is this the same for all ? Fully stable only with max freq 1000mhz?

@ Multitasking:

Open the file: /system/etc/init.d/01optimization and u'll see in the middle "Memory Management" then echo 2560, .... Just put an "#" befor echo and save and reboot the Phone ;)

Example:

# echo 2560, .... . .........
[Galaxy Ace II Android Development] Glpcha:
@ Multitasking:

Open the file: /system/etc/init.d/01optimization and u'll see in the middle "Memory Management" then echo 2560, .... Just put an "#" befor echo and save and reboot the Phone ;)

Example:

# echo 2560, .... . .........[/QUOTE]

Now it works [emoji1]

Wouldn't know about the reboots because I don't oc beyond 1GHz
[Galaxy Ace II Android Development] galaxypep:
I can't change that document. I tried it with many apps but I can't. To be more specific I can add # but I can't save it. Any solutions?
[Galaxy Ace II Android Development] ace2nutzer:
Try with the stock file manager.. Just enable root access in the app.. Then give root access and u can edit the file.

But otherwise.. U need to mount the system partition as rw
[Galaxy Ace II Android Development] galaxypep:
Sorry for silly Q but to mount system partition as rw....that has to be done in CWM am I right?

I got it now. Just want to say sorry for my stupidity and many thanks for new build. Works like a charm for me. No OC I'm using default freqs.
[Galaxy Ace II Android Development] chimaeragh:
Couldn't mount SD card with latest kernel. Both in Android and CWM. Filesystem is f2fs. Reverting back to previous kernel worked
[Galaxy Ace II Android Development] Moonly:
OK, I'm flashing the previous kernel then, since modifying files with root permissions never worked for me, always saying that "an error occured" or other bull****s.

I'll wait for new build, way easier and less "headlock" (I'm not very sure of the translation here lol).
[Galaxy Ace II Android Development] MrBlackCore:
Im also flashing the previous kernel. I dont care about freq and multitasking but in this one I have a really annoying lag in nova launcher. Its like every time I press the back button the launcher hangs for 2-3 sec before responding.
[Galaxy Ace II Android Development] Glpcha:
I don't know what you did but the phone is absolutely flying with the new kernel. Seems much more responsive than the last version. Thanks [MENTION=5840412]ace2nutzer[/MENTION]
[Galaxy Ace II Android Development] ace2nutzer:
:D too much improvements. But too much aggressive.. I'll release in neartime a new build with greatest Multitasking and less power consumption. And what i did can u all watch this on github :)
[Galaxy Ace II Android Development] soko3:
again not stable on oc over 1 ghz...

edit:

nova launcher feels a little bit laggy... Not too much, but...
[Galaxy Ace II Android Development] werindam:
how can I activate wakelock for bln ?
[Galaxy Ace II Android Development] ace2nutzer:
New Build is Up !!

Changelog:

20150107:

Fixed Multitasking issue from previous Build

Improved Multitasking

Re-calibrated interactive Governor (more powersave + smooth)

Updated 01optimization File

Build is smooth again, no lags on Nova Launcher etc...

Minor Kernel Fixes

echo bln > /sys/power/wake_lock

and to disable it:

echo bln > /sys/power/wake_unlock
[Galaxy Ace II Android Development] ChronoMonochrome:
Actually I don't think it's ever related to libexif. I did another test - copied some photo to another directory than DCIM/OpenCamera, then checked the creation date - and yes it was somehow incorrect (20.08.2018). After copying this photo back to DCIM/OpenCamera, gallery app showed the same incorrect date. Wouldn't it be easier to change gallery app to sort photos by file name, not creation date?

UPD. actually, the exif date is the one that still remains correct, while issuing stat results in smth like

UPD. This only tends to happen with X-plore file manager I was using. Using another app to copy photo (e.g. QuickPic or Terminal) doesn't result in the behaviour above. So that's not RTC driver or exif bug.
[Galaxy Ace II Android Development] lace_hvc:
Do you mean ROM from November with lastest kernel?

I'm currently on latest ROM and kernel. A2N Kernel 20170618 | ROM CM11 20170618. Not being sorted correctly.
[Galaxy Ace II Android Development] ace2nutzer:
Yes.

Yes.

[MENTION=5695278]ChronoMonochrome[/MENTION]

It's rtc bug, maybe changing from rtc0 to rtc1 can help.

I found out the photo i've with correct creation date was made with the stock rom and maybe with my kernel.

The creation date of the image is written by the exif lib which is obviously buggy on custom roms.

Check what's showing the exif toolkit app:
[Galaxy Ace II Android Development] lace_hvc:
Ok, with ROM from November and latest kernel, the sorting is fine too. So it's ROM related. But what exactly?! :D
[Galaxy Ace II Android Development] ChronoMonochrome:
Can it be that 1970 year timestamp is just the default base date that is showed because there was no date written to exif tags?

Well, in my case exif tags are written correctly (at least they seems to):
[Galaxy Ace II Android Development] ace2nutzer:
Yeah ... :)

So probably libexif from 4.4.x branch is buggy.

I hope if i compile the rom with an newer libexif version, that'll fix this annoying bug.

Then it's not needed to fix RTC Driver.

Really don't know why .. but from the 3 different RTC calls, only one is reporting wrong data.

Other than that, we've even 2 (!!) working RTC Drivers:

rtc0 = ab8500-rtc

rtc1 = pl031
[Galaxy Ace II Android Development] lace_hvc:
Anything you want me to do on that old ROM or can I install latest again?
[Galaxy Ace II Android Development] ace2nutzer:
Nothing so far ... thanks !

If it sucks with the bug, then u can stay on that older rom till we'll fix it.

Or if u don't care much, then update again to the latest rom for the best performance.

We're actually working on it.
[Galaxy Ace II Android Development] lace_hvc:
I will go back to the latest ROM and stick to Quickpic till it's fixed. Good luck :)
[Galaxy Ace II Android Development] ace2nutzer:
Yes, it seems to be a "default" date if there's nothing better xD.

I found it out because i've compiled kernel with only RTC Driver PL031 ... and then after a reboot the date was set to 01.01.1970.

So this also means that we don't have the PL031 on CPU at all !

[MENTION=5695278]ChronoMonochrome[/MENTION]

I believe it's camera bug :)

It looks like that the camera doesn't use the libexif.so properly.

I've grabbed the libexif* files from the stock rom ... (4.1.2 codinap MG2)

was 3 files ...

libexif.so = didn't work at all ... (messes up with System UI .. Apps FC etc..)

libexif_jni.so = same.

libexifa.so = worked normal like the CM11 lib !!

But i had to rename it of course to libexif.so

Unfortunately 1970 was still there after taking an new photo :(

So in Summary:

It's NOT:

- RTC Driver

- Gallery App

- Exif Lib (since it has the same result with the stock JB Lib)

Remains only:

- The Camera itself.

- The Android Version itself.

[MENTION=6710464]lace_hvc[/MENTION]

have u maybe the 20161126 ROM ??

If not, maybe someone have it, and can upload it for u ??

Because i really need to know on which build the problem started.

Then i can check here:

https://github.com/ace2nutzer?tab=repositories

which commit is the possible cause of that bug !

Otherwise we can forget about that, because i've already checked a few Repos from that time ... and i really can't imagine what's the reason .... it's simply to far in the back .... and from that time where it worked ... so: 22/11/2016 ... till today ... are just to much commits ....
[Galaxy Ace II Android Development] msq2:
[MENTION=5840412]ace2nutzer[/MENTION]

The problem with the wrong date in exif was already in 2015
[Galaxy Ace II Android Development] ace2nutzer:
It was even present in 2014 ... and it's probably related to the not very clean ported Camera Drivers.

(that's why also the camera sometimes still FC when switching too often between video and photo.)

But lace_hvc found out an other bug that messes it up with the order of the Pics.

So that's something else ;)

Maybe i'll try to fix it.
[Galaxy Ace II Android Development] :
Should I encrypt my device running this ROM? And if I update ROM do /data partition become corrupted? (When encrypted)

BetterBatteryStats logs now available!!! 100 -> 94% in 1 minute...

Please wait... now I am uploading Files...

[Wait!! I cannot upload file using XDA Labs app!!] Log file below
[Galaxy Ace II Android Development] :
Log files Online !! :good:
[Galaxy Ace II Android Development] msq2:
[MENTION=1534538]Bien[/MENTION]2044

Your battery is genuine (3.8V-4.35V)?

My battery is 4 years old and the phone has no problem charging up to 4.25V.

Now I am trying to regenerate by unloading to 3.0V and charging to the actual 4.35 off the phone. I will write after the finish whether it helped.

But in almost all cases, li ion regeneration is not possible.

I have seen that some people to recycle the 18650 battery use a 12v power supply but this is really dangerous and explode, I use a 3.6V 355mA

Do not use this.
[Galaxy Ace II Android Development] lace_hvc:
Unfortunately, I only kept cm-11-20161122 incl. kernel20161117 and cm-11-20170323 onwards.

I remember, in the past people complained about camera app not working after updating the ROM and u had to fix that. Maybe something went wrong there.
[Galaxy Ace II Android Development] ace2nutzer:
Stop the charging @ 4.35V.

Then after some minutes check battery voltage, it should have 4.25 - 4.30V in the best case.

I also don't think u can regenerate... But try it.

[MENTION=6710464]lace_hvc[/MENTION]

I'll check it, thanks.
[Galaxy Ace II Android Development] msq2:
When the maximum voltage is reached, the charging current must be reduced. I think when loading on the phone this happens too fast.

But I already finished loading (4.25V more will not give), I will check if there is a difference.

https://en.wikipedia.org/wiki/Lithium-ion_battery#Charge_and_discharge

upd:

After launch I have 96%, can still top up to 100% Using 200mA in A2N application
[Galaxy Ace II Android Development] :
It should be [MENTION=6973536]bien2004[/MENTION], not [MENTION=1534538]Bien[/MENTION]2044.

Your typing is really really GOOD :D

Yes it is, out of the box :good:

Mine up to 4.3V, but discharge is 4.096V :(

Let me see if it works. :)

What!? Too badly! :)

DANGEROUS .Do not do that.

But if you want, make sure you have a solder shield before doing anything! And make sure you don't damage your house! :laugh:

Ok, but what will happen if I use?
[Galaxy Ace II Android Development] msq2:
Wait for the battery to discharge to 10-20%, and I'll let you know and I will add a log with bbs

I do not remember what happened, but the encryption itself can affect the battery and the speed of the device

The original batteries have a circuit that cuts off the power when it reaches maximum voltage, the multimeter showed me in such a situation 5.53V and the disconnect the charger 4.25V :)
[Galaxy Ace II Android Development] :
Wow, please show me how to recover battery as you did if it works!!
[Galaxy Ace II Android Development] msq2:
It is simple, discharge the battery to 2.9-3V and charge with a weak charger (I used a nokia 3.6V-4.2V 355mA power adapter)

But to discharge you need something that will discharge the battery (I used a led light from an old flashlight) and a voltage meter.

And until now I do not know whether this method helped or not. Before this Battery Monitor Widget rated the actual battery capacity at ~ 1080mAh, Tonight or tomorrow morning I'll let you know how it looks now and log in with BBS
[Galaxy Ace II Android Development] lace_hvc:
When using Open Camera (saved location is same as for default camera app), the sorting is fine in the gallery app. But when I take a picture with the default camera app, this picture ends up in a wrong position. Even without removing the sd card.

After removing the sd card, the mess is even bigger.
[Galaxy Ace II Android Development] ace2nutzer:
And what about creation date with openCamera?
[Galaxy Ace II Android Development] lace_hvc:
Record time is still 1970.

I deleted all pictures, then took several with Open Camera only, removed sd card, plugged it back in, sorting still fine.
[Galaxy Ace II Android Development] :
My record time is still fine. I am running sdcard only kernel, with stock camera, without having this problem.

There are some tips to prevent this problem happens:

- For sdcard only kernel:

+ Prevent accidently removing the sdcard! So do instant rebooting.

+ If you want to transfer files, you can use UMS mode. If you want to remove sdcard, you must turn off the phone and then remove the sdcard.

- For normal kernel:

+ Prevent accidently removing the sdcard! So do instant rebooting.

+ If you want to transfer files, you can use UMS mode. If you want to remove sdcard, you must eject the sdcard first, then remove it.

I will share my battery saving tips at next answer.... But now is sleeping time... I must go to sleep Now!;)