This converter *MUST* be used on device originally supporting QMG, ASTC, etc.. pictures in resources such as: SM-N910, SM-G901, GT-I9305 (only 4.4.4 ROMs) and may be some others recently released.
This converter has neither QMG nor ASTC decoder, it uses the one integrated in the ROM. That's why you can use it only on device originally supporting QMG/ASTC images. Treat it as temporary solution till someone create independent QMG/ASTC decoder.
This is for developers who has experience in linux shell and adb. If you are generic curious user then simply skip it.
You need to extract picconv.zip and push 2 files (picconv and picconv.dex) into /system/bin. Then set 755 permission to picconv (chmod 755 /system/picconv).
how to use:
1) copy whole res folder of desired apk to device. For example /sdcard/tmp/res
2) start adb shell
3) execute: picconv /sdcard/tmp/res /sdcard/tmp/out
Tool will print out converted pictures. In /sdcard/tmp/out you will find all pictures converted to png with the same folder structure. 9.qmg (images with 9patches) will be converted to 9.png with stripes on the edges (same as apktool does), so they are ready to use in apk creation in apktool.
Current version of apktool wrongly strips 9. from 9.qmg images. My tool detects it and correctly convert to 9.png. Tool also converts 9pathes 9.png (if you directly unzip apk) to 9.png with stripes. Thus you may provide res folder with qmg, astc and png pictures. All of them will be converted to images ready to use in apktool. Other files in res folder won't be touched (and won't be copied to destination folder).
Update 1.1:
- add support for .astc extension.
Update 2.0:
- now it's possible to add any extension.
Check picconv script, you can add any extension after -t option. (default set of extensions: png qmg astc webp).
Update 2.1:
- .9. won't be stripped from png if it has been extracted by apktool.
- png will be simply copied if no re-compress required (like .png and .9.png from apktool). You can use option -r if you want to re-compress all png images (useful if some proprietary png format used).
Known issues (up to v2.1):
- if some files produce errors (or warnings, which are actually errors) in decoding, then tool doesn't exit after finish. You can press <ctrl+c> to force finish.
NOTE 1: Even if your ROM supports QMG/ASTC resources, it doesn't mean it can handle APK resources from other device using QMG/ASTC. For example my S3 (I9305 4.4.4 ROM) cannot load some (but some are ok) ASTC pictures. So, for best result, you need to convert such images on device from which you get APK.
NOTE 2: After conversion, you have to use APKTool to assemble APK. You cannot just zip images back to APK! (because all .9.png files must be converted by APKTool to format used in APK).
Tool is intentionally was created as console tool to use it in scripts. I have no plan to create GUI version.
This converter has neither QMG nor ASTC decoder, it uses the one integrated in the ROM. That's why you can use it only on device originally supporting QMG/ASTC images. Treat it as temporary solution till someone create independent QMG/ASTC decoder.
This is for developers who has experience in linux shell and adb. If you are generic curious user then simply skip it.
You need to extract picconv.zip and push 2 files (picconv and picconv.dex) into /system/bin. Then set 755 permission to picconv (chmod 755 /system/picconv).
how to use:
1) copy whole res folder of desired apk to device. For example /sdcard/tmp/res
2) start adb shell
3) execute: picconv /sdcard/tmp/res /sdcard/tmp/out
Tool will print out converted pictures. In /sdcard/tmp/out you will find all pictures converted to png with the same folder structure. 9.qmg (images with 9patches) will be converted to 9.png with stripes on the edges (same as apktool does), so they are ready to use in apk creation in apktool.
Current version of apktool wrongly strips 9. from 9.qmg images. My tool detects it and correctly convert to 9.png. Tool also converts 9pathes 9.png (if you directly unzip apk) to 9.png with stripes. Thus you may provide res folder with qmg, astc and png pictures. All of them will be converted to images ready to use in apktool. Other files in res folder won't be touched (and won't be copied to destination folder).
Update 1.1:
- add support for .astc extension.
Update 2.0:
- now it's possible to add any extension.
Check picconv script, you can add any extension after -t option. (default set of extensions: png qmg astc webp).
Update 2.1:
- .9. won't be stripped from png if it has been extracted by apktool.
- png will be simply copied if no re-compress required (like .png and .9.png from apktool). You can use option -r if you want to re-compress all png images (useful if some proprietary png format used).
Known issues (up to v2.1):
- if some files produce errors (or warnings, which are actually errors) in decoding, then tool doesn't exit after finish. You can press <ctrl+c> to force finish.
NOTE 1: Even if your ROM supports QMG/ASTC resources, it doesn't mean it can handle APK resources from other device using QMG/ASTC. For example my S3 (I9305 4.4.4 ROM) cannot load some (but some are ok) ASTC pictures. So, for best result, you need to convert such images on device from which you get APK.
NOTE 2: After conversion, you have to use APKTool to assemble APK. You cannot just zip images back to APK! (because all .9.png files must be converted by APKTool to format used in APK).
Tool is intentionally was created as console tool to use it in scripts. I have no plan to create GUI version.
Attachments
Last edited: