[Android Q&A, Help & Troubleshooting] SourceSeeker:
2nd try

("Sorry, your IP address has already been used to register an account today. Please try again later. ")

Hi xda-guys,

after learning a lot from this nice forum, it seems im stuck, so i finally decided to register & ask my question.

situation:

i own a "Samsung Galaxy S4 Mini LTE (GT-I9195)" & with latest official german firmware (I9195XXUCOA2-DBT).

the phone isnt rooted, knox is 0x0, it was never flashed.

phone was in use by a friend for 1,5 years & now he gave it to me as a gift.

i changed the white front glas to a black front glas like shown here (german language):

https://www.youtube.com/watch?v=wUNd5X0WbRg

after several attempts luckily i finally succeeded in this challenging test, time for the next challenge i thought ;)

the original battery of said phone has a capacity of 1.900 mah.

i bought a new one with 6.500 mah, this one:

http://www.amazon.de/Mbuynow®-6500mAh-Ersatzakku-Ersatzbatterie-Batterie/dp/B00IDZYGZ4

problem:

it seems that the android kernel for this phone doesnt look (or isnt asking) for battery capacity if a new battery is used.

it just has a fixed predefined capacity for 1.900 mah.

however, in the purchase link from above, theres a comment from a guy called Scrabbledo "scrabbledo" who shows how to adjust the capacity value in the kernel source (german language again, sry):

http://www.amazon.de/review/R20RAZS...annel=detail-glance&nodeID=562066&store=ce-de

to come to the end now:

i already have been able to build a kernel with customized "drivers/power/pm8921-bms.c",

but the problem now is, that i need the source code for my current firmware to be able to customize the kernel.

my current firmware: I9195XXUCOA2-DBT from March, 6th 2015:

http://www.sammobile.com/firmwares/database/gt-i9195/dbt/

samsung however still isnt offering the current one, their latest source for the GT-I9195 still is the I9195XXUCNJ4 from January, 26th 2015:

http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=i9195

already searched the forums where i found a nice overview, but it didnt took me further than the samsung source website:

http://xdaforums.com/showthread.php?t=1808167

question:

how can i use latest android firmware for I9195 with modified battery capacity kernel (in older kernel source: "drivers/power/pm8921-bms.c")?

1. are there other websites which offer official android kernel source codes more regularly than the delayed ones from samsung?

edit (2015_06_20, 13:35):

wrote an email to samsung, asking for the european source code of the firmware "I9195XXUCOA2" like suggested in thread "[KITCHEN] ArchiKitchen - Android Kitchen (WIP) [Linux]", post #805:

http://xdaforums.com/showthread.php?t=2597220&page=81

i will keep you updated about samsungs answer as soon as they reply

2. can i extract, modify & repack original binary firmware packages like the "I9195XXUCOA2" to customize appropriate battery file like in the source code?

what i have so far:

i was able to unpack the kernel of my current firmware I9195XXUCOA2-DBT (of course i got the official firmware package from sammobile.com, not from delaying samsung...).

however, 1st problem seems to be a popup from 7-zip when trying to start extracting "I9195XXUCOA2_I9195OXACOA2_I9195XXUCOA2_HOME.tar.md5":

"[tar] Error: There is no correct record at the end of archive".

instead of 7-zip I tried WinRar & there was no warning, still im not feeling confident that extraction went well, also because of DivinityCycle's thread investigating in the same problem:

http://xdaforums.com/showthread.php?t=1929222

with the help of cygwin on windows i was able to unpack the "boot.img" & in the next step the "boot.img-ramdisk.gz", but all folders, but "sbin" & root "boot", are empty.

i have no clue where to look for the "drivers/power/pm8921-bms.c" to modify the capacity value. i dont even know if this is possible. is it possible? where do i have to look?

edit (2015_06_20, 00:42):

searched through all extracted files from "boot.img-ramdisk.gz" (1,00 MB) for "pm8921".

found 2 files with matching entries:

in "C:\cygwin-script\bootimg-tools\boot\init.qcom.class_core.sh":
line #179: echo "$fake_batt_capacity" > /sys/module/pm8921_bms/parameters/bms_fake_battery
in "C:\cygwin-script\bootimg-tools\boot\init.qcom.sh":
line #57: chown -h root.system /sys/module/pm8921_bms/parameters/*
line #58: chmod -h 0660 /sys/module/pm8921_bms/parameters/*

i guess i need the files in folder "/sys/module/pm8921_bms/", but my whole "sys"-folder is empty...

are those files in the "boot.img-zImage" (6,38 MB)?

answer from "Dhasneem" from following link seems to confirm this by saying:

* boot.img-zImage ----> kernel

* boot.img-ramdisk.gz ----> ramdisk

http://unix.stackexchange.com/questions/64628/how-to-extract-boot-img

if so, is it possible to read, modify & save the "boot.img-zImage"?

thats it so far!

hope its the right place where i posted my 1st question thread & post...

regards,

Source