yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] u363840:
Hi,

I wanted to extract content from a cache.img.ext4 file, and the Cache Ripper wasn't working (it fails with non cache.img files and big files it seems, as what is does is seek for the zip header signature). I found jazzor's ext4_utils and ext4_unpacker but I wanted something simple, and they pointed to an Android python script that is able to give informations about thoses files, so I modified it to be able to output an "unsparsed" ext4 image you can open with 7zip for example.

The "fill" operation is not tested, it might fail.

Usage :

python sparse_img_to_ext4.py -x input_sparsed_cache.img.ext4 output_normal_cache.ext4

Download : Gist / Raw link (rev3)

Changelog :

- rev 1 : initial release

- rev 2&3 : restore -v to it's initial function, add -x to actually expand data, display dots for progress when not in verbose mode, py3 compatible

Nb : yes, this is just a small utility, just wanted to share ; don't know if it deserve to be "DevDB" ?

Nb2 : found informations about sparse image in samsung forums, but I guess it's used in other devices as it's in android repo

XDA:DevDB Information

PySImg2Ext4, Tool/Utility for all devices (see above for details)

Contributors

u363840

Source Code: https://gist.github.com/u1735067/bf51dcd70d96d4430d87451dec5ae6db

Version Information

Status: Beta

Created 2016-10-27

Last Updated 2016-11-14
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
Bad Marketing or a Honest mistake?

So I posted this over at the ZTE Z-Community Forums. So far no replies from someone at ZTE or a mod, I do believe this is a US Model.

Based on websites from official ZTE they all have Something quite interesting as battery is not 3250 mAh as advertised by ZTE on all their sites EU, USA and China.

ZTE Original Thread

Something quite interesting below;

Tho it is advertised as a 3250 mAh battery on their site.

Here is a link to the full video:

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

[YOUTUBE]s1uFZHSWU4c

[/YOUTUBE]

Update all sites on ZTE site which sell the device have the 3250 mAh pricing.
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
As i said back in Z-Community, yeah this is indeed either the A2017G or U (captive keys) , which in the first Tear Down (106 image base omly) is the Chinese one and have the same 3140mAh Battery, which is really bother me right now cuz what else is really not there and they are advertising qith the A7.
[ZTE Axon 7 Guides, News, & Discussion] shoman94:
Good signal.... Lmao
[ZTE Axon 7 Guides, News, & Discussion] awsomjgp:
They upped the size of the battery after the preproduction models. The first review samples had 3140, and the production models have 3250.
[ZTE Axon 7 Guides, News, & Discussion] `SBR`:
But all the application reading battery stats showing as 3100 only....

---------- Post added at 07:53 PM ---------- Previous post was at 07:52 PM ----------
[ZTE Axon 7 Guides, News, & Discussion] rczrider:
Which is even less than 3140. I take it with a grain of salt.
[ZTE Axon 7 Guides, News, & Discussion] DrakenFX:
well Physical Battery is 3140 mAh , apps showing 3100 mAh is 40 mAh different and acceptable, but ZTE advertising 3250 mAh battery capacity, which is 110 mAh different, i'll call that unacceptable on my book
[ZTE Axon 7 Guides, News, & Discussion] max1001:
Not this **** again. USA variant is different. Those pics are from early Chinese version but really, does it matter?
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
Yup that I agree

These are not from the Chinese variant its clearly not have you seen the video?
[ZTE Axon 7 Guides, News, & Discussion] code777:
Lets not fight guys, get the torches and the forks and we march to ZTE offices for 100mah !!!
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
Just checked with AIDA64 and it reports a 3100mAh battery... Real battery info, or...?
[ZTE Axon 7 Guides, News, & Discussion] xtermmin:
Just curious, but how do we tell? We didn't really get a good shot of the backside of the device in this repair video.
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
What really is the difference between 3100 and 3250 in terms of autonomy? I mean, I could change the phone, but it's gonna take days, and well, I'm in love with it, so...

Also, how can we/I be sure that the phone I would receive would have the 3250 battery? :(
[ZTE Axon 7 Guides, News, & Discussion] Bucatino:
My axon 7, A2017G has 3100 Mha....
[ZTE Axon 7 Guides, News, & Discussion] celoxocis:
to everyone complaining that device check apps such as DevCheck show only 3100mah.

that valua is actually read out from the framework which was defined in an XML file in the overlays.

it does not actually read the _actual_ mah value of the battery.

most OEM define that value to be lower because of the diversity in battery quality.

no battery OEM will ever give you a warrant that the battery will exactly be "3250mah". because they simply cant do that. it will always be 3-5% more or less.

so what _all_ OEM's do they write an lower value in that power-profile overlay for the battery manager.

there is an simple fix for that which requires root.

for those that are not pre-production phones and have a 3250mah (might be even more, we need a proper tear down of a newer model)

unpack framework-res.apk change the value in:

overlay/frameworks/base/core/res/res/xml/power_profile.xml

that shows

<item name="battery.capacity">3100</item>

to

<item name="battery.capacity">3250</item>

and here is the proof for the skeptical users:

https://github.com/Hax-on/android_d.../base/core/res/res/xml/power_profile.xml#L118
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
Hello celoxocis

What do you mean exactly? That programs like Aida64 or CPU-Z actually read data containted into an xml file, and that they don't probe the hardware?

Just asking, cuz I really really love my Axon, no matter what, and it would really sadden me to send it back and replace it. Knowing that I might get the same battery anyway...

Thanx for your reply :)
[ZTE Axon 7 Guides, News, & Discussion] paatha13:
Mine also saying 3100 A2017G from Amazon de.

Also at my S7 Edge Samsung said 3600 and it's 3600 according to AIDA or CPUz or Samsung phone info.

So something wrong with ZTE

Not big deal to me as I'm keeping the device as I do like the all package offering despite some software glitches that I don't like and hope being improved in software update.

Battery life is quite good overall and not having complaints about that 1.5 month I'm having the device.
[ZTE Axon 7 Guides, News, & Discussion] rczrider:
This. I'm betting they simply forgot to update the 3100mAh they wrote in for the original 3140mAh battery. I'm not sure why they would haven't just written in 3140 in the first place, though; it's not like anyone was going to know any better (though I understand what you're saying about batteries not being exact).
[ZTE Axon 7 Guides, News, & Discussion] Shipmate:
I ran same Device Info app on my UK ZTE Axon 7 A2017G phone.

Reported 3100ma.
[ZTE Axon 7 Guides, News, & Discussion] paatha13:
But also strange CPUz can not utilized the battery capacity at Axon 7 but on S7 Edge not that issue.

Only AIDA can do that at Axon device.

Well just ZTE give the same attention to G version as at U and for me I forgive them:p

That's matter most of all to me.

Optimizing/polishing the software and having better user experience.

It's already good level but needs some further works from them and eliminate the few glitches having right now.

Here's from 7 Edge

And here's from Axon 7
[ZTE Axon 7 Guides, News, & Discussion] celoxocis:
Not forgotten. Done on purpose by every OEM. Read explanation above.

---------- Post added at 15:13 ---------- Previous post was at 15:00 ----------

Yes exactly.

Apps=>Userspace

Apps=>Read XML file Value=>Done

There is no way to querying the battery because the battery has no interface (point of intersection) to make queries off. Its simply an battery.

The power_profile.xml helps app determine the battery usage.

The battery percentage values you see going down while your phone is powered on are actually calculated using this profiles they are not queries from the battery.

For kernel space its different.

The mah capacity itself is hard-coded into the kernel. Again not queried from the battery. (see above) Which is then used for kernel space battery calculations.

Like when you turn off your phone and charge. those values come from the kernel.

Ever wondered when you run the phone to the point that it powers down automatically. You are still able to turn on the phone even if its only for a few seconds?

Exactly because OEM's lower that value on purpose in the power_profile.xml
[ZTE Axon 7 Guides, News, & Discussion] Bucatino:
Do you think Zte with an update can fix this?
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
Totally get that my friend since I have modified the battery mAh on my V10 when I had a 10000 mAh installed from Zero lemon but it still doesn't explain why the label has a different size obviously this was an oversight in their part.

This is from the Samsung S7 Edge Official Site from Samsung;

and from a teardown from ifixit.com
[ZTE Axon 7 Guides, News, & Discussion] rczrider:
I read your explanation, I just don't agree that they intentionally wrote in 3100 instead of something closer to 3250. 3100 for 3140? Sure. Not for 3250.

Also, the 3 other phones I've checked (Moto E LTE, ZF2 Laser, Galaxy On5) that I have laying around all report the "correct" battery capacity. So while I understand your point, my experience is that it's not as widespread as you say.

Don't get me wrong; I don't care about this. They could say my battery has 100mAh, but if it lasts as long as it does, it makes no difference to me.
[ZTE Axon 7 Guides, News, & Discussion] `SBR`:
i agree to this..

if they have a fixed the battery for prod. process they should have the same in Rom/Kernel to represent the specs to match with what advertised, reducing the battery charging or controlling the amps in Rom/kernel is to make Phone for better Usability which is different than the reducing the actual capacity.

could be a chance last minute changes in Production and software is not updated to reflect may be reason.. but why we are stuck in 3 values (3250, 3140 & 3100). i think they have clear it out.
[ZTE Axon 7 Guides, News, & Discussion] celoxocis:
Every phone that I ported to CM it was like that on purpose. I just extracted the power_profile.xml of the Moto Z Play and it is off too from 3597 to actually 3510. If you use CM on your phones the devs usually correct that value. I know Luka does for the Asus Series of CM.

I have been told by more than one official CM dev that it is done on purpose by the OEMs because of the fluctuations of the batterys. Battery manufacturers can not produce exact mAh batterys they will always fluctuate at 3-5%.

I don't care about 100mah either. It's all about optimizations anyway. I've build my custom kernel today (very early alpha) for the Axon 7 and it already runs more responsive and with less battery drain than the stock kernel.
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
Well thanks for your input honestly bat life has been great not really complaining on that but they need to change advertisement on their sites to avoid an issue with people that do look for that and specifically choose the axon 7 because of the mAh.
[ZTE Axon 7 Guides, News, & Discussion] Aimara:
how about the rest of the hardware ?
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
I reached out to JerryRigEverything to see if he can do another teardown so well see what happens next week since he said that's when might do it.
[ZTE Axon 7 Guides, News, & Discussion] j4vier1:
I got an axon 7 from Amazon germany Two weeks ago. Out of curiosity i installed cpuz to check my battery. Something doesn't look right,it says 2470 mAh
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
weird really weird... Under Charge Capacity??
[ZTE Axon 7 Guides, News, & Discussion] j4vier1:
Not sure, Any other tool that i could use to check?
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
so not sure that the apps are doing a real probe or just checking XML files like said a couple of posts before.

I tried CPU-Z ans Aida64, they both tell me I have a 3100mAh battery.
[ZTE Axon 7 Guides, News, & Discussion] j4vier1:
Ok i Tried Aida, it says 3100. Must be cpuz acting weird
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
I guess no application is really probing the hardware...

j4vier1, how's the autonomy of your Axon so far?
[ZTE Axon 7 Guides, News, & Discussion] j4vier1:
Quite good. I unplug it in the morning and by 9 pm i still have approx 30-40%. Im not a very heavy user though
[ZTE Axon 7 Guides, News, & Discussion] rczrider:
Amend the poll to include a "don't care" option.
[ZTE Axon 7 Guides, News, & Discussion] jaseman:
We need to keep this in perspective... this is not about how long the battery lasts in normal use! Mine last a long time also.... but so has many other phones that I've owned. The real issue is

"WHY"

is this even happening? With all the strange quirks and verifiable issues that this phone is having, it makes me wonder what else they lied about? It may have been designed in the USA by top designers, but it was built in China. We all wondered how ZTE was able to provide such top notch specs for such a low price.... well now we may find out. Maybe, just maybe they skimped on other pieces of hardware that explains all the weird issues!
[ZTE Axon 7 Guides, News, & Discussion] rczrider:
We must get to the bottom of this! We WILL solve this mystery! To the Batmobile!
[ZTE Axon 7 Guides, News, & Discussion] tele_jas:
My AIDA64 report shows:

Capacity (Reported by Android) 3100 mAh

Capacity (From Database) 3140 mAh
[ZTE Axon 7 Guides, News, & Discussion] MrWilsonxD:
Battery life is amazing regardless..

I thought it was a 3000mA battery lol
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
hello, how did you get that result? Is your phone rooted? Or special version of Aida64?

---------- Post added at 07:04 AM ---------- Previous post was at 06:51 AM ----------

This thread states, again, that the readings are wrong and that the Axon does have a 3250mAh battery.

https://community.zteusa.com/thread/12081

I'd really really love to know the truth though...
[ZTE Axon 7 Guides, News, & Discussion] tele_jas:
My phone is rooted, but AIDA64 is just the free one from the playstore
[ZTE Axon 7 Guides, News, & Discussion] shoman94:
Did you not see the tear down? 3140 on the battery. The thread you quote was before the tear down and back in August.
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
You're right.

And the video I found on Youtube that's only a few days old shows a 3140mAh battery as well.

So I guess there are no 3250mAh battery in Europe at least :(

[IMG="Battery 3140 Axon 7"]http://reho.st/self/f8efbfb0fc9b5fb0ff9d053e10079cffa6d8596a.jpg[/IMG]

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

Now, are all the A7 sold with a 31X0mAh battery? Or just some batches?

Wondering if it's worthwhile to send it back to get a new one...
[ZTE Axon 7 Guides, News, & Discussion] Cyrus D.:
I seriously doubt ZTE would advertise 3250 instead of the pre-release model amount of 3140 unless it really was closer to 3250 than 3140. There's pretty much nothing to gain from it. I'm not concerned about some string somewhere stating it's 3140 or 3100, or even 3140 mAH being written on, there's really nothing to gain by lying about it. Regardless, the number on paper doesn't matter, the actual battery life does. It's not great, but it's certainly not bad either and can get most of us through the day.

If the thought of 110 mAH being lost bothers any of you then boy do I have some bad news for you; you're going to lose much more than that through natural use of the phone. Charge cycles/heat degrade the battery, which is why some recommend charging to only 80%. Or I figure you can charge in bursts up to around 80% to keep the temps lower rather than letting it stay heated up for an extended period.
[ZTE Axon 7 Guides, News, & Discussion] awsomjgp:
I usually have a period of time after I take my phone off of the charger where it stays at 100% for 10 or so minutes until it drops to 99%.
[ZTE Axon 7 Guides, News, & Discussion] paatha13:
You can check the battery capacity and battery wear with this app.

https://play.google.com/store/apps/details?id=com.digibites.accubattery

This is my result after 2.5 months continues using the device.

But I really don't know how reliable is.

You can check by yourself.

Just keep in mind that I got the results after a made the second full cycle charging and not immediately when installing the app.
[ZTE Axon 7 Guides, News, & Discussion] chanter100:
Here's mine..
[ZTE Axon 7 Guides, News, & Discussion] TEXASMADE1978:
As long as I keep getting the battery life I've been getting, I'm good. So far I'm getting on average around 30hrs & 7hrs 15mins SOT per charge, right now I'm right at 42hrs & 7hrs 25mins SOT with 22% left. So either 3250 mAh or 3140 mAh, I'm happy with the usage I'm getting. Just to be clear though, I don't agree with the false advertisement or the discrepancy being shown.
[ZTE Axon 7 Guides, News, & Discussion] TEXASMADE1978:
Here are some screenshots just to show the battery life I'm getting, for some reason GSam Battery Monitor is not computing the apps used correctly. Time to figure out why it isn't working right in the spa used section. If anyone has a hint a to why it isn't working correctly, TIA.
[ZTE Axon 7 Guides, News, & Discussion] xtermmin:
On removable batteries for other phones, I often see two battery sizes listed on the physical battery: a "Min" (I'm guessing Minimum) and a "Typ" (Typical?). On those devices, the Typ is what is advertised by the company, online retailers, etc. It might be the case that the size listed on the A7 battery is the "Min" size (3140), and the Typ size (3250) is just omitted.
[ZTE Axon 7 Guides, News, & Discussion] iNaruX:
EXACTLY! The LG G4 had the same thread. Some users had 2900mAh and other 3000mAh even if both versions were advertised as 3000mAh.

Due to different regulations in different countries sometimes you have to put the "typical" on the front and sometimes the minimum value.

Build tolerances will always be like that. Some of you guys may end up with a 3350mAh. others who are unlucky with a 3150mAh...
[ZTE Axon 7 Guides, News, & Discussion] Locklear308:
WHAT! THAT IS GOD LIKE!!!!! How?
[ZTE Axon 7 Guides, News, & Discussion] Cyrus D.:
Well, according to AccuBattery, the estimated 3250 mAH is roughly correct. I've had mine for almost 3 months, and it still estimates roughly 3250. I had more AccuBattery stats but I uninstalled the program at one point, those earlier stats also pointed to roughly 3250. Either they improved the battery from early prototypes or they later estimated their batteries were closer to 3250 than 3140. Either way it's such a tiny difference that it doesn't matter, 110 is such a small difference that some batteries are probably closer to 3100 while others are closer to 3300.

What I said earlier stands, if 110 mAH bothers you then don't let your battery heat up. If you don't want your battery to degrade then don't charge it at high temperatures. The easiest way to do that rather than letting it cool down then replugging (which would be a giant pain repeatedly doing while monitoring it) is to just slow charge it through a USB port. I only fast charged my phone the first month I had it. Now I only slow charge to 80%. For me that makes the difference between it hitting a maximum of 28-29C versus 38-39C, as far as battery degradation goes, that's a massive difference. The one spike on the graph in my screenshot is when I needed to head out and my battery was low, so I used Quick Charge to partially charge my battery.

And this is why Dash Charge is superior to Quick Charge, it keeps the heat in the charger rather than in your device (by doing the voltage conversion in the charger I assume, that's what causes power to be converted into heat). Too bad only OnePlus offer Dash Charge.
[ZTE Axon 7 Guides, News, & Discussion] gpz1100:
^^Does that app indicate actual charge rate? I use an asus charger on my phones. From various tests I've done, although the charger is 2amp capable (on the transformer tablet), phones still charge max at 1amp.
[ZTE Axon 7 Guides, News, & Discussion] Cyrus D.:
Yes it does under the first tab named "Charging". The app is free so give it a try and see for yourself, you only need to pay for it if you want extra options like theme/colour, I bought since I use it regularly.
[ZTE Axon 7 Guides, News, & Discussion] puremind:
I also have the 3250mAh battery size. It does matter, 24 min SoT more matters a lot to me because it is 24min fewer minutes away from my ideal SoT.

But that's not really the point, it should be obvious by now that there are 2 different battery capacities. My earlier 3 units were estimated at 3140 mAh whereas this last unit is estimated at 3250 mAh.

It is not a question of production tolerance, otherwise the estimates over so many devices would not be polarized around those 2 exact figures. It is a question of different batteries being built into different units - basically of equity: some people who think they purchase a phone with 3250 mAh battery effectively purchase one with 3140 mAh and ZTE purposely employ this strategy to reduce cost for everyone at the expense of some.
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
Not sure if it's "that" obvious... My phone is estimated at 3250mAh when the design capacity shows it's maybe a 3140.

Now the real question is: are you happy with the autonomy of your phone or not?

That's all that matters, IMOO.
[ZTE Axon 7 Guides, News, & Discussion] jonathan3579:
Well, Zack of JerryRigEverything finally did his teardown of the Axon 7 and it definitely was a 3140mAh battery in his phone.
[ZTE Axon 7 Guides, News, & Discussion] XblackdemonX:
https://youtu.be/wqivSM0NFsc?t=3m24s :highfive:
[ZTE Axon 7 Guides, News, & Discussion] gpz1100:
So the battery may or may not be capable of 3250mAh. Are we really going to lose sleep over 110 maH's?

They probably should of just marketed it as 3100 or 3000, then the added bonus will be a welcome benefit. Seems many are trying to stretch the marketing envelope these days.

The video does demonstrate the relative ease at which the battery can be replaced. Hopefully replacement plastic grill covers will be available just in case they're damaged during removal.
[ZTE Axon 7 Guides, News, & Discussion] jonathan3579:
What welcome bonus? My battery not only says 3100, but also only charges to 3100 unlike some other people's phones on this forum.
[ZTE Axon 7 Guides, News, & Discussion] gpz1100:
You took your phone apart? Your battery indicates 3100 mAh? Pics?
[ZTE Axon 7 Guides, News, & Discussion] puremind:
As I said I tested 4 devices, 3 of them had 3140mAh and the last one has 3250mAh. So there are definitely 2 battery sizes. Whether it says 3250mAh on my battery is possible: since so far more devices with measured 3140mAh capacity exist, it is possible that the few teardowns we have seen just were of the unlucky 3140mAh quality.

Not going to open my phone for you guys, but there are definitely two types of batteries built in, no matter what the labels say...
[ZTE Axon 7 Guides, News, & Discussion] maxmotos:
Yup I noticed that too but this is what one of the mods said regarding it.

still sounds a bit strange to me tho.
[ZTE Axon 7 Guides, News, & Discussion] xtermmin:
It's probably true though. I have batteries for other phones that list two capacities, and it's always the bigger one that gets advertised/listed in the specs.
[ZTE Axon 7 Guides, News, & Discussion] treehugger38294:
My battery is calculated to charge to 3270 mAH. Not sure if it's inaccurate or I got lucky.
[ZTE Axon 7 Guides, News, & Discussion] borijess:
They changed the battery on there website.
[ZTE Axon 7 Guides, News, & Discussion] LeKeiser:
I prefer it this way. But still happy with my A7 and its 3140mAh battery :)
[ZTE Axon 7 Guides, News, & Discussion] puremind:
My first 3 devices had 3140mAh. My fourth has over 3250, so I am very happy, I can feel the difference.