Closed GoogleCodeExporter closed 9 years ago
Can you attach a a single apk from that build (frameworks too)?
---
Are these 9.qmg files in the regular res/drawable* folders? If so, are they
just modified 9 patch files?
I can take a look then and patch it, but not sure the extent of the problem.
Usually when an OEM adds their own 9patch, they add their own images too. So
maybe we are dealing with .9.qmg and .qmg.
Original comment by connor.tumbleson
on 22 Oct 2014 at 1:40
yes, it's in drawable. Both qmg and 9.qmg are exist (similar to png and 9.png).
I've attached framework resources which contains 9.png itself.
Original comment by pour.gar...@gmail.com
on 22 Oct 2014 at 2:39
Attachments:
https://github.com/iBotPeaches/Apktool/commit/986b585f261a74c8c48fdcd4107e84d967
721a3c
Fixed.
Original comment by connor.tumbleson
on 22 Oct 2014 at 9:33
I didn't try this fix yet, but according to this logic, apktool will try to
decode 9.qmg as 9.png and obviously will fail because there is no qmg decoder
yet.
i propose another way to fix:
---
a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecode
r.java
+++
b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ResFileDecode
r.java
@@ -83,6 +83,9 @@ public class ResFileDecoder {
}
}
if (!".xml".equals(ext)) {
+ if
(inFileName.toLowerCase().endsWith(".9.qmg")) {
+ outFileName = outResName + ".9"
+ ext;
+ }
decode(inDir, inFileName, outDir, outFileName, "raw");
return;
}
-------------------
This way, 9.qmg will be simply copied as-is.
Original comment by pour.gar...@gmail.com
on 23 Oct 2014 at 1:45
Ok, checked. Your fix doesn't work. Apktool still renames 9.qmg to qmg.
Please use my patch above - it produces correct 9.qmg. We can use this method
till someone create QMG decoder.
Original comment by pour.gar...@gmail.com
on 23 Oct 2014 at 2:40
If you'd like to submit patches, you can do so via Googlecode / Bitbucket /
Github so unit-tests can be automated.
Your method is not right. You just said QMG has no known decoder, so the
decode() method won't work.
Please attach a whitepaper or some format of QMG. Until then it is passed on
raw without being touched.
https://github.com/iBotPeaches/Apktool/commit/3e6fc8c5ef25cf1421732abd3d03cd529a
476df3
Original comment by connor.tumbleson
on 23 Oct 2014 at 3:05
There is no known public implementation of decoder for QMG. It's proprietary
Quram image format http://quramsoft.com/solution_e/qmage.asp
It's used in recent Samsung firmwares for GT-I9305, SM-G901, SM-N910 and other
devices. Currently, you can decode QMG images only directly on one of mentioned
phone. There is no known decoder for PC.
Thus only raw copy is possible (as i've mentioned in previous post) - that's
what my patch was for. Your new patch looks OK now.
Original comment by pour.gar...@gmail.com
on 23 Oct 2014 at 4:28
By the way, to be a more precise: 9.qmg is a 9patches qmg just like 9.png. It
uses exactly the same 9patches header as 9.png. So, when QMG decoder will
become available, you can use existing 9patches procedures to re-create picture
with black lines on the edges.
Original comment by pour.gar...@gmail.com
on 23 Oct 2014 at 4:34
Original issue reported on code.google.com by
pour.gar...@gmail.com
on 22 Oct 2014 at 1:26