Optimizing apks - Hero CDMA Themes and Apps

Doing a bit of this lately specifically on rosie. My res folder is like 36 KB (952.5 total) less than the rosie found in the gutted Rom thread (988.3). However my total apk is 1.2 mb while the gutted is only 1. Sup with that?

Are you sure mine is 1 MB? I double checked and I was only able to get mine down to 1.2MB.

Pic! Http://twitter.com/theresthatguy/status/6906940286
Edit: not talking about yours but the one posted in the attachment of rosiesmall3.zip sorry for confusion. Hope you can still help me.

I got mine down to roughly 930-ish k if i remember correctly and I can pare it down even more I just got tired of changing all of the images around. It takes forever. Also make sure you use the highest compression setting for zip files in 7-zip

obelisk79 said:
I got mine down to roughly 930-ish k if i remember correctly and I can pare it down even more I just got tired of changing all of the images around. It takes forever. Also make sure you use the highest compression setting for zip files in 7-zip
Click to expand...
Click to collapse
what programs are are you using on the pngs and also jpegs? Thanks for the 7-zip tip.

A good app for pngs is optipng. Im on linux and that's what I use. For jpegs I usually change the quality to be pretty low because for the most part it is not noticeable. Also remember to find an app that will remove all of the exif data and so forth on jpgs.

gimp and pngout
I changed the jpgs to white
google the best commandline options for pngout I have them written down at home but I'm 300+ miles away from home right now, and I don't have a laptop.
I've considered trying to convert the jpgs to png and changing the xml files to recognize them, but I have too many projects on my plate already. I imagine it should be doable.

obelisk79 said:
gimp and pngout
I changed the jpgs to white
google the best commandline options for pngout I have them written down at home but I'm 300+ miles away from home right now, and I don't have a laptop.
I've considered trying to convert the jpgs to png and changing the xml files to recognize them, but I have too many projects on my plate already. I imagine it should be doable.
Click to expand...
Click to collapse
one last thing: I'm using ubuntu box with no internet. I downloaded the p7zip and I believe I installed it correctly. Cd into the extracted contents did sudo make install command but having trouble finding documentation on actually creating a zip file. I keep finding how make 7z archives.

use wine and 7-zip for win? I dual boot so I actually do that kind of work in windows. I use linux for most everything else.

Related

[DEVS] Optimize all APKs automatically, Reduce memory footprint! [Now with Zipalign]

Update 9/28: Now contains the SDK 1.6 zipalign binary and routine to align each APK after optimization. This results in slightly larger file sizes but a smaller RAM footprint and faster performance. For more information about zipalign, see http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html
Update 9/16: new zip defaults to mx5 zip compression, creates "original" and "optimized" folder for apks.
This is a very simple batch file that makes use of command line 7-zip and a special build of optipng (supporting recursive optimizing) to reduce the size of the PNGs in your APKs. This would reduce the overall memory footprint of your apps, and allow you to fit more on the phone's puny internal memory.
As for how much this helps, here's a test run on the latest JACxHeroSki:
Size of uncompressed folder of data/app_s before optimization: 57.3 MB
Size of uncompressed folder of data/app_s after optimization: 43.1 MB
To use it, simply copy all the APKs you want optimized into the batch files' directory and run "apkopt_all.bat" This will take a while but it's all automated! This will then create two folders, optimized and original.
To make the optimization process faster, reduce the "-o99" parameter in apkopt.bat - however, this will result in larger PNGs so best to leave it at o99 and wait. You can also tweak the compression level of the ZIP itself - I left it at "normal" (-mx5) because higher compression levels have reported problems with some APKs.
Once done, the APKs will not be signed but that should not be an issue if you're bundling the APK with a ROM or pushing it through adb.
Optimization has no negative effects, it just makes the PNGs smaller.
Windows only for now - the variant of optipng that this depends on only has a Windows binary available.
It definitely makes a difference!
This distribution includes 7-zip and a variant of optipng called roptipng. Sources can be found:
http://www.7-zip.org/
http://code.google.com/p/roptipng/
I apologize for my noobish Windows command line knowledge. Many devs (like Cyanogen) already seems to have been doing this long ago! His builds are so optimized you can't optimize them more. Any size difference will be due to different compression methods/levels on the ZIP.
sweet, will you do it so I can test it on jacheroskiv2.1 and 2.2? i have a mac w/ ubuntu. no windows!
Is this even necessary when pretty much every ROM uses app2sd?
And wouldn't zipping the png slow things down because the OS now needs to unzip before running?
dwang said:
Is this even necessary when pretty much every ROM uses app2sd?
And wouldn't zipping the png slow things down because the OS now needs to unzip before running?
Click to expand...
Click to collapse
not everyone needs to have hundreds of apps and therefore no need to run apps2sd.
ccyrowski said:
sweet, will you do it so I can test it on jacheroskiv2.1 and 2.2? i have a mac w/ ubuntu. no windows!
Click to expand...
Click to collapse
I'm in the process of making/uploading a pack of APKs of javheroski 2.1.
dwang said:
Is this even necessary when pretty much every ROM uses app2sd?
And wouldn't zipping the png slow things down because the OS now needs to unzip before running?
Click to expand...
Click to collapse
No, this isn't actually zipping the PNGs themselves - the only purpose 7-zip serves is to unpack and repack the APKs.
coolbho3000 said:
I'm in the process of making/uploading a pack of APKs of javheroski 2.1.
No, this isn't actually zipping the PNGs themselves - the only purpose 7-zip serves is to unpack and repack the APKs.
Click to expand...
Click to collapse
Oh cool... I can see the usefulness of having smaller pngs..
I have a similar script that I used for my build, but i used the regular optipng at -o7 for all files. This should help me cram more stuff on my rom, thanks bunches. I have a question, though, I've yet to test this, but is there any adverse effect from running 9-patched pngs through optipng? They're encoded with extra instructions for stretching and padding. In my build, I only ran regular pngs, but if I were able to run the whole thing... I have to try this but I'm at work... Oh, wait, I'm the boss!, I'll try this later today.
---edit---
Oh, cool, I guess I didn't read right. I was trying to modify the thing so that it would recursively optimize extracted pngs in windows folders, but I read the bats and it actually opens up the zips and does all this itself, great! I should have read the post more closely.
dwang said:
Is this even necessary when pretty much every ROM uses app2sd?
And wouldn't zipping the png slow things down because the OS now needs to unzip before running?
Click to expand...
Click to collapse
my builds run pretty quick... I was doing this manually app by app. Check the new version I release and ask again cuz I only got half through them.
uhm i cant seen to get this to work. download your zip and extracted it to a folder. four files in it. placed all my apks into this same folder. ran the batch file but it just opened up and closed and outputted a 1kb file called "and"
NguyenHuu said:
uhm i cant seen to get this to work. download your zip and extracted it to a folder. four files in it. placed all my apks into this same folder. ran the batch file but it just opened up and closed and outputted a 1kb file called "and"
Click to expand...
Click to collapse
Need to be on your c drive or local.
drieves1 said:
Need to be on your c drive or local.
Click to expand...
Click to collapse
ok got it thanks! it was on my secondary drive not C drive. i tried it on cyanogen's system apps and it went from 14.2MB to 13.7MB, not a huge improvement but an improvement nonetheless. this app has a lot of potential for hero roms that really need those extra MBs haha.
if only the batch file can be edited to automatically create duplicate apk instead of overwriting just in case forget to backup. happens sometimes haha. maybe signing can be added to the batch script as well for market apps that need to be resigned since you cant just push them through like you can with system apps that are apart of the rom, they need to be installed.
dont try this on your framework though >.<. I did and it wouldn't boot, seems compression was too aggressive (something about 2XXXXXX to 1XXXXX something, dont remember what it was, but I think bringing o-49 should probably fix it for framework)
UNCOMPRESS_DATA_MAX (XXXXXXX vs 1048576). Causes errors on APKs that are over compressed. Any idea what setting it could be to keep it under that threshold?
hrmm.... I saw what's going on.... For some reason, the script is also processing resources.arsc. This file has to be left alone or it causes problems. I used the script to optimize all pngs, then i extracted all apks, and then i used the optimized pngs and put them back on the regular apks and it worked perfectly, though the gain is much, much more modest, about ~300KB coming from my previous -o7 optimization, and I guess I can attribute that to the 9 patch pngs I hadn't processed the first time around. Am I wrong that resources.arsc should be left untouched? a 10 MB gain is just what I needed to make all of hero fit in death spl's /system (and light hero on a regular spl).
ok, i see, the problem is the re-compression of the apk. I think it's not using the same zip format, so when dalvik tries to expand it causes a problem. roptipng should still save me A LOT of time though...
I'm not home now but try making the -mx9 parameter for 7-zip in apkopt.bat lower as well.
cool stuff, thanks man!
First, thanks for doing this. I have a suggestion. I think you should create an "original" folder and an "optimized" folder (or whatever names you like). So that you can drop the files into the original folder rather than copying them into the same directory. It would just be cleaner that way. Also, you could keep the orginal files in that folder and put the new ones into the optimized folder so people don't need to back them up. They would have both the original and optimized files when the process is finished.
Uploaded a new one with that. Thanks
Have you investigated into why some apks don't work after being compressed? or am I the only one having problems? Some apps compress at best compression and still work, but other apps have to be compressed less in order to work. I tried compressing the whole batch, and then trying to see which ones failed and then try compressing again with a lower setting, etc etc, but it's hard to do for services and non-launcher apps because you don't notice they don't work until you need them. I've seen other people use these scripts and produce working roms, so it might be something different with my setup (win7 64)

AOSP lockscreen in sprint builds... ideas

I dabble in some programming, taking it in college now, but have little experience with linux and the like, so I don't know where to go from here. I found the files, I think, to modify so that the AOSP lockscreen will work. Found keyguard xml files in \system\framework\framework-res.apk\res\layout. Pretty sure these are the right files, as the images for the sliders is in this apk as well. And I know from a logcat that keyguard is what it's opening for the lockscreen. Only problem is, can't seem to view or edit these xml's in a readable format... tried three different editors. About to reboot into linux and try it there, maybe I'll have better luck. But thought I would ask here where there are people FAR more knowledgeable than I.
danaff37 said:
I dabble in some programming, taking it in college now, but have little experience with linux and the like, so I don't know where to go from here. I found the files, I think, to modify so that the AOSP lockscreen will work. Found keyguard xml files in \system\framework\framework-res.apk\res\layout. Pretty sure these are the right files, as the images for the sliders is in this apk as well. And I know from a logcat that keyguard is what it's opening for the lockscreen. Only problem is, can't seem to view or edit these xml's in a readable format... tried three different editors. About to reboot into linux and try it there, maybe I'll have better luck. But thought I would ask here where there are people FAR more knowledgeable than I.
Click to expand...
Click to collapse
They are in a binary format. I opened them in dreamweaver, and it still wasn't fully readable/able to be edited. you can use this to decode them to readable format, but I have NO CLUE how to get them back.
http://forum.xda-developers.com/showthread.php?t=514412
regaw_leinad said:
They are in a binary format. I opened them in dreamweaver, and it still wasn't fully readable/able to be edited. you can use this to decode them to readable format, but I have NO CLUE how to get them back.
http://forum.xda-developers.com/showthread.php?t=514412
Click to expand...
Click to collapse
Use the AXMLPrinter2.jar to convert the XML files to a Text Readable format. Unfortunately, to modify the files, you need to use a Hex Editor to do any updates. I havn't seen any utilities that will read/write the binary XMLs, just read.
-Daryel
I haven't had the time to look into this yet, but... Since the lock screen works fine in Darch's AOSP build, could it just be a matter of switching out the xmls?
Just an idea.
thematrixkid17 said:
I haven't had the time to look into this yet, but... Since the lock screen works fine in Darch's AOSP build, could it just be a matter of switching out the xmls?
Just an idea.
Click to expand...
Click to collapse
WOW, if that's all it takes, someone should try it lol
I mean, it couldn't be thaat easy, could it?
Doesn't it work on the Eris leak?
let me see what's there under the eris builds
Well I'm headed to class now, and have to study for a big big test tomorrow later, but I might find time, if someone doesn't beat me to it. Now I'm not all that familiar with the framework, but its just a brainstorm. And if the one in the eris leak works, then that xml probably has an even better chance playing well with the sprint build, I assume.
hey... you can view and edit the xml on the phone with root explorer after you extract them. Then just copy to pc to rezip
also, when rezipping an apk, using 7zip, is there a particular setting? compression level, method, etc.

APK Batch Rename Tool (for Windows and Linux)

Hi guys!
This is a quick tool I jotted together for myself in the past couple days and found it very useful. So I decided to clean it up and share it. Hope you will like it! Do comment and ask!
APK Batch Rename Tool
* for Windows and Linux for now.
APK Batch Rename Tool recursively crawls input folder and all of its subfolders looking for Android Package files (.apk's). It reads Label and Version info from apk's found and creates a copy for each apk under the output folder but using the Label and Version info acquired.
For example a com.example.hw.apk will make Hello World! 1.21.apk provided that the label inside the package was set to Hello World! and version is 1.21.
The old and the new apk files are 100% the same in terms of content and are unchanged. Only the new copies are given new filenames. Input files are left completely intact.
Why?
Have you ever wondered what are your 1500+ apk files with wierd names nested to different wierd folders on your harddrive? Have you ever wanted to find an app but you were unable to because it had some undescriptive javaish name that made no sense reflected no version and your apps were swept across a hundred junk folders anyway? Then APK Batch Rename is the tool for you! And me!
APK Batch Rename will set a human readable name for all your Android apps, and drop such a copy into a folder. You will finally be able to browse them, sort them alphabetically and be able to pick from versions available.
How?
1. Copy all your apk files (or folders with apk files in them) into the input folder. You may copy folders of any depth. APK Batch Rename Tool will recurse all subfolders of the input folder anyway.
2. Hit or click ApkBatchRename.bat . (For Linux users it's: apkbatchrename, or on a terminal enter: ./apkbatchrename ) Wait until it finishes the job.
3. Find your freshly named files in the output folder.
Simple as that!
Have fun! & Comment!
phsorx
great work, just like reading mp3 tag then rename to "song - artist.mp3"
thanks!
Cool. I use to do it manually. Time saver app.
Thanks.
This is awesome! Thank you very much, situation you described in first post is just like mine, I find your tool very useful!
Folks,
Let me join you crediting phsorx's job, that app is just great!
Thanks and congrats!
Very cool, Works well. Always wanted to do this but was too lazy to try aapt.
I just checked:
aapt said:
badging Print the label and icon for the app declared in APK.
Click to expand...
Click to collapse
Code:
> aapt d badging Talk.apk
[B]package: name='com.google.android.talk' [/B]versionCode='130' [B]versionName[/B]='1.3'
sdkVersion:'8'
targetSdkVersion:'8'
uses-permission: **truncated***
application: [B]label='Talk'[/B] icon='res/drawable-hdpi/ic_launcher_google_talk.png'
uses-feature:'android.hardware.touchscreen'
main
other-activities
search
other-receivers
supports-screens: 'small' 'normal' 'large'
locales: '--_--' 'es' 'es_US'
densities: '160' '240'
I'll definitely use your script but with a small change to show the package name as well as its valuable for when you need to uninstall the package.
i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk
Attached a slightly modified batch file and screenshot
For single file one-off renames (right-click->open with->rename single) you can use the script here.
De jo! Honfitars. Hajra Magyarok!
Customizable naming planned in future version
britoso said:
Very cool, Works well. Always wanted to do this but was too lazy to try appt.
i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk
Click to expand...
Click to collapse
Hi Britoso,
Yeah! That's a neat way to do it too!
Eventually I want to make naming and spacing fully customizable! Including what attributes to pick (name, label, versionName) to constitute the filename, and what separators (_,-,(,),space) should go where.
In the howto.txt I have a little road-map for the project. Will add customizable naming too.
Will keep you guys posted.
EOF
phsorx
Ps: Anyone who has another naming suggestion drop a post! I'd be interested.
great job...bravo..
thanks
Very nice tool, thanks for sharing this .
Using it with britoso's edited script.
Edit: I would appreciate it if a log of the conversion would be saved in a \logs\ subfolder, so I can check which files were not converted properly and see if I have to do those manually.
Handy ! Thanks...
deleted
For one-off renames you can use the below batch file.
1) create the below batch file in the same folder as apkrename.bat (its attached too)
Name: rename-single.bat (change this if you want)
content:
Code:
cd "C:\change_me\ApkRename\"
apkrename.bat %1 %~dp1
Change the path(change_me) as needed.
2)Associate it with apks by right clicking on the apk and choosing "choose default program", browse and select the batch file "rename-single.bat".
Uncheck "make this the default operation"
Screenshot and batch file attached. Enjoy.
update:
-12/8 uploaded a new version that fixed a bug involving long path names with spaces.
Also added a check for success and then delete the original apk. (backup your apks just in case).
Remember to set the path to the ApkRename folder in rename_single.bat once before using it.
Really gd job )
APK Batch Rename Tool for Linux is on the way
luvgirl12345 said:
would like a linux version...
Click to expand...
Click to collapse
Hi luvgirl12345,
The Linux port is on the way & will be posted here soon!
Actually, the Windows release is running on win32 ports of a few common Linux tools. And that's so, because I am lazy. Having Linux's much better support for shell scripting plus the same tool set always at hand, porting is a breeze.
Ciao,
phsorx
Sounds very useful, thank you!
Looks nice for massive apk renaming.
Found a similar tool called APKInfo some month ago which i am using for single apk files for a while now.
But finally something for batch renaming.
Thanks
your the man!, works like a charm. Thanks!
Any plans for making an Android version of this to run on our devices?
Future plans for an on-phone version of the APK Rename Tool
del4 said:
Any plans for making an Android version of this to run on our devices?
Click to expand...
Click to collapse
Yes! Certainly. Its in the plans.
But firstly there are a few things to be fixed on the desktop version first. See road map section of the howto.txt file in the archive. The most burning issue is the so called overwrite issue that I want to be sorted out next. Say you have two copies of the same app (same name, label, versionName) but one of them has a patch against it (because its been modded by a reverser) than one of the copies will overwrite the other (ApkRename 1.10).
Secondly on a mobile device's SD card there is usually less space than on a desktop's hard drive. This implies that APK Renamer will actually have to rename the files in place instead of creating a copy of each in a separate folder. Or at least it will need to figure out the empty space left on the device, and if its not enough to hold the copies, it should offer in-place renaming instead. Not a lot of logic to add but still...
Having all the outstanding questions be figured out on the desktop still, will allow me to implement a more established version for the phone right from start. But hold still its not going to take very long
Bests,
phsorx

Comprehensive theming links/guides?

I've just kind of gotten into theming a lil bit and I was hoping to find more information. I've checked out the "Ultimate Theming Guide" and many other links and I've got a fairly good idea until you get into the xml (I'm reading up on this now) I was wondering if some of you could save me some google time and post links etc. to useful information. I've already got something to extract, repack and sign apks. I'm mostly looking for the actually theming itself, identifying the portions of the ui to tweak, particular xmls to edit etc. I'm still relatively new to this but if any of you ever played WoW there used to be an addon that would identify the frame/scripts responsible for whatever item you moused over.
jvegastn said:
I've just kind of gotten into theming a lil bit and I was hoping to find more information. I've checked out the "Ultimate Theming Guide" and many other links and I've got a fairly good idea until you get into the xml (I'm reading up on this now) I was wondering if some of you could save me some google time and post links etc. to useful information. I've already got something to extract, repack and sign apks. I'm mostly looking for the actually theming itself, identifying the portions of the ui to tweak, particular xmls to edit etc. I'm still relatively new to this but if any of you ever played WoW there used to be an addon that would identify the frame/scripts responsible for whatever item you moused over.
Click to expand...
Click to collapse
If I werent on my phone I would point you at the link... Search xda for apkmanager. This will allow you to decompile and recompile apk's easily after modifying xml filea. It utilizes apktool (smali and baksmali) to format the xml files to a usable format in a text editor such as notepad or notepad++
One catch with apkmanager is that it doesnt interpret 9.png files correctly. You will need to read tge log to see which of those files catch it up. Then cut these and just dip them back into the finished apk using 7zip. When I get back to my desktop I can look up links and try to post the steps I take.
Sent from my DROIDX using XDA App
Apkmanager is very helpful, I'm looking for more info on what images correspond to what. Quick easy xml alteration with being a code guru. Hope that makes sense.

Working With .pkm and .atc Files

Hello XDA,
Today I'm going to show you how to work with/convert the .pkm and .atc image files that are included in system apks on recent devices. It's been about a month since I've looked into these formats, so if anybody has since come up with any better/alternative methods, please share them here.
Let's begin...
.pkm
.pkm files are actually a type of ETC1_RGB8 textures. The reason manufacturers are starting to use them, is because they are fully supported by Android, and with the OpenGL ES platform that Android runs, they offer significant overhead savings vs conventional image formats. A lot of people (devs included) probably haven't realized it, but there is actually a tool that comes bundled with the Android SDK for creating .pkm textures. It's called etc1tool, and is a command line utility. Etc1tool is capable itself of converting .pkm files to .png, but unfortunately all the ones I've come across in pre-existing apks are not able to be converted this way. That would be too easy, right? So, here's what we do instead:
-First, you're going to need to download and install Mali GPU Texture Compression Tool from HERE.
-Once you've got it all set up, open it up, go to File > Open, and open up a .pkm file (or several, as it can do batch processing).
-Now, click on the .pkm file you just opened, in the left-hand pane to select it. You should see the image.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
-Next, click on the yellow icon towards the upper right of the screen.
-In the window that pops up, copy the settings I have here. You can change the directory (it's only going to store a temp file anyway), but everything else must match.
-Click OK, let it do its' thing, and you should see a screen similar to this:
-Now, you're going to click on your image(s) in the left-hand pane to select them again, then click on the blue save icon towards the upper right.
-Save them to whatever directory, and with whatever extension you'd like (most likely .png). Now, the standard ETC1 format doesn't handle alpha values, and the existing .pkms seem to have been encoded using some proprietary method that preserves the alpha channel. When you save your image from Mali, it will not save the alpha values, despite the preview having them. As a result, your .png will have a black background, similar to this:
From here, though, you at least have a standard .png image, which you can then open with Photoshop or Gimp and easily remove the black background.
-If for some reason you'd like to create your own .pkm file(s) from existing images, navigate in command prompt to the your Android SDK > Tools directory, then use the following:
Code:
etc1tool pathtoinputfile.png --encode -o pathtooutputfile.pkm
.atc
.atc files aren't going to be as common as .pkm, as they are a proprietary format and can only be used on device with a Qualcomm Adreno chipset. Just like .pkm files, they offer significant gains in overhead performance compared to standard image formats, but they are a pain when you're trying to theme an app that's full of them. Let's begin...
-Start off by downloading the ASTC Evaluation Codec found HERE. This one is going to be a zip, rather than an installable program, so download it and extract it wherever you wish. Once extracted, find the location of 'astcenc' (the folder names are odd, and differ depending on your OS).
-Once you've located it, open up command prompt, and navigate to that folder.
-Like etc1tool, the ASTC Codec is capable of converting directly to .png, but also like the .pkm files, it doesn't work in this case. You can try, but the result will be unusable, so don't waste your time. Instead, we're going to convert to .tga.
-So, in command prompt, use the following to decode the .atc to a more usable .tga:
Code:
astcenc -d pathtoinputfile.atc pathtooutputfile.tga
-Unlike .pkm files and Mali, this will preserve any existing transparency, but there's a catch (there's always a catch). The resulting .tga file will be upside down.
-Fortunately, this is nothing more than a minor inconvenience lol. So, once you have your .tga file, open it up in Photoshop or Gimp, flip it, and save as .png, and you should be all set.
-If for some reason you wanted to create a new .atc file, the codec can be used for that as well. I forget the command, and documentation is very hard to find, but if you use the following, you should be able to go from there:
Code:
astcenc -help
Be aware, that there is absolutely no need to recreate any of these special formats. You can simply delete the originals and replace them with .png files of the same name, and they'll work just fine in any apk, and then you won't have to worry about it in the future. Anyway, I hope some of you learned something and find this useful....
~morningstar
hi Morningstar , thanks a lot for this work
do you think it is possible to make an apk like qmg2png ?
Carotix said:
hi Morningstar , thanks a lot for this work
do you think it is possible to make an apk like qmg2png ?
Click to expand...
Click to collapse
Unfortunately, I don't believe so. At least I couldn't. Perhaps someone more knowledgeable might be able to do something like that.
I am not able to convert .atc extension files with your guide it creates a new .tga files but when i open it with Photoshop it gives me error "Could not complete your request because of a problem with the file-format module interface."
manikant_009 said:
I am not able to convert .atc extension files with your guide it creates a new .tga files but when i open it with Photoshop it gives me error "Could not complete your request because of a problem with the file-format module interface."
Click to expand...
Click to collapse
Interesting. I don't use PhotoShop personally, so I wasn't aware of the issue. What version of PS are you using? I'll see if I can figure out a solution. In the meantime, I guess I'd have to recommend Gimp, as it's what I generally use, and doesn't seem to have any issues opening the resulting .tga files.
Morningstar said:
Interesting. I don't use PhotoShop personally, so I wasn't aware of the issue. What version of PS are you using? I'll see if I can figure out a solution. In the meantime, I guess I'd have to recommend Gimp, as it's what I generally use, and doesn't seem to have any issues opening the resulting .tga files.
Click to expand...
Click to collapse
I Succeeded in Converting .atc files. What I did is just renamed all .atc files to .astc extension and then used Picconv 2.1 to covert it to .png files
manikant_009 said:
I Succeeded in Converting .atc files. What I did is just renamed all .atc files to .astc extension and then used Picconv 2.1 to covert it to .png files
Click to expand...
Click to collapse
Picconv, huh? Never heard of it, but I'll definitely check it out, because the current method is rather convoluted and annoying lol.
hey @Morningstar...i reworked my batch file i made that resizes a folder full of xxhdpi images to xhdpi and hdpi sizes to now also convert a folder full of atc images to tga, flip them, and convert them all to png images all in one step. maybe it'll help y'all out a little...ionno...maybe.
folder structure must be exactly as shown and explained in the setup.txt file.
Image Converter
EDIT: use V2 edition on page 2 of this thread as i made it to convert .wbp images too now (HERE)
mikeymopar said:
hey @Morningstar...i reworked my batch file i made that resizes a folder full of xxhdpi images to xhdpi and hdpi sizes to now also convert a folder full of atc images to tga, flip them, and convert them all to png images all in one step. maybe it'll help y'all out a little...ionno...maybe.
Click to expand...
Click to collapse
Great work Mikey.. Just tested. Full disclosure. ......... I'm lazy. I copied all images over. .9s,qmg, and atc. It ignored other formats, and hit every atc. Perfect!!!
Sent from my SM-N910P using XDA Free mobile app
kevinoliva113 said:
Great work Mikey.. Just tested. Full disclosure. ......... I'm lazy. I copied all images over. .9s,qmg, and atc. It ignored other formats, and hit every atc. Perfect!!!
Click to expand...
Click to collapse
big thx @kevinoliva113 for the feedback. i'm a bit out of the loop now (haven't dealt with atc before; still on kk with att) and by pure chance noticed someone mentioning how it was so time consuming converting atc images one at a time and yearning for a way to batch convert a bunch of them. so hopefully, at least for the time being, this meets the requirements for those that can use it
mikeymopar said:
hey @Morningstar...i reworked my batch file i made that resizes a folder full of xxhdpi images to xhdpi and hdpi sizes to now also convert a folder full of atc images to tga, flip them, and convert them all to png images all in one step. maybe it'll help y'all out a little...ionno...maybe.
folder structure must be exactly as shown and explained in the setup.txt file.
Image Converter
Click to expand...
Click to collapse
Wow, Mikey, excellent work! Fortunately, I haven't had to deal with too many .atc files, but I know some devices have a ton of them, and that'll be a great time saver.
Fantastic job!
[emoji106]
Morningstar said:
Wow, Mikey, excellent work! Fortunately, I haven't had to deal with too many .atc files, but I know some devices have a ton of them, and that'll be a great time saver.
Fantastic job!
Click to expand...
Click to collapse
i only expanded on your solution by adding it to my simple script. all credit goes to you - awesome work as usual...much respect
mikeymopar said:
i only expanded on your solution by adding it to my simple script. all credit goes to you - awesome work as usual...much respect
Click to expand...
Click to collapse
Ditto.
[emoji8]
New tool/script for batch conversion of .wbp files HERE.
Morningstar said:
New tool/script for batch conversion of .wbp files HERE.
Click to expand...
Click to collapse
nice. also added this new feature to my image converter (as long as you don't mind). now it BATCH resizes xxhdpi and converts .atc and .wbp images to png images
IMAGE RESIZERv2
mikeymopar said:
nice. also added this new feature to my image converter (as long as you don't mind). now it BATCH resizes xxhdpi and converts .atc and .wbp images to png images
IMAGE RESIZERv2
Click to expand...
Click to collapse
Nice work, Mikey! ...And you know I don't mind lol. Er....if you didn't notice already, there was a slight error in my script. When converting from .wbp to .png, it renamed the files like this: file_name.wbp.png. It doesn't affect recompiling or anything, but if you're OCD it'll drive you nuts. I just haven't gotten around to fixing it yet. Lol.
Excellent work. It's nice as hell to have everything in one easy to use package, rather than mucking about with a bunch of different programs and scripts and codecs
[emoji106]
I put a pkm into the "Original_Images_to_convert" folder ran the bat it said it was complete but where does it save it to?
---------- Post added at 03:32 PM ---------- Previous post was at 03:29 PM ----------
parkerj7uc said:
I put a pkm into the "Original_Images_to_convert" folder ran the bat it said it was complete but where does it save it to?
Click to expand...
Click to collapse
Ok I see that after doing it a folder appears as "Images_converted_to_png" but the folder is empty.
parkerj7uc said:
I put a pkm into the "Original_Images_to_convert" folder ran the bat it said it was complete but where does it save it to?
---------- Post added at 03:32 PM ---------- Previous post was at 03:29 PM ----------
Ok I see that after doing it a folder appears as "Images_converted_to_png" but the folder is empty.
Click to expand...
Click to collapse
Ummm....I don't think @mikeymopar's script does .pkm files?
Morningstar said:
Ummm....I don't think @mikeymopar's script does .pkm files?
Click to expand...
Click to collapse
Correct as far as i know theres no tool out yet for converting pkm image format
willowmaker420 said:
Correct as far as i know theres no tool out yet for converting pkm image format
Click to expand...
Click to collapse
Read the OP. I found a way of converting them, it's just somewhat clunky.

Categories

Resources