[App Store] Get PNG images from App Store Apps (ipa)

Hi all,
here a trick to extract all images from App Store applications.

First of all, you need to syncronize your device with iTunes.
Next, go to Music/iTunes/iTunes Medi/App folder and copy your IPA apps to another folder.

– Rename .ipa to .zip and extract all contents.
– Navigate in your etracted zip, locate .app file and right-click -> View contents.
– Copy all images to another folder.

It’s not finished, because these images are not valid (optimize or encrypted, with size 0x0).


 
All images in ipa are optimized with a tool named pngcrush.
Wikipediahttp://en.wikipedia.org/wiki/Pngcrush

We can use pngcrush in reverse way to convert the invalid images in valid once.

PNGCRUSH generally is located in iPhoneOS.platform folder.
If you don’t know where is, open Terminal and type

[code lang=”bash” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]locate pngcrush ! more[/code]

I made up a stupid script that loop all the images in a specified folder and then revert it to a valid png images!

[code lang=”bash” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]#!/bin/bash

#create a folder to put reverted images in
mkdir RevertedImages

#looping for png files in . or $1 parameter
for png in `find . -name ‘*.png’`
do
name=`basename $png`
#echo $name

#pngcrush path with -revert-iphone-optimizations parameter
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/
pngcrush -revert-iphone-optimizations $name RevertedImages/$name[/code]

done.

Open Terminal, digit

[code lang=”bash” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]vi RevertedImages.sh[/code]

and paste code.

Save file and use

[code lang=”bash” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]chmod +x RevertedImages.sh[/code]

to execute file.

Execute file
[code lang=”bash” autolinks=”false” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]./RevertedImages.sh[/code]

Well done!

In your RevertedImages folder now you have all valid images!


enjoy!

Ref: albertopasca.it

Alberto Pasca
Latest posts by Alberto Pasca (see all)