Attempting to pull assets, images, and resources from an APK - Android Q&A, Help & Troubleshooting

I am attempting to extract the images from the game Summoners War to use for wallpapers and such.
I am able to get the APK file and have the image files in question in the assets folder, however they are not able to be opened in any image editor or photo viewer, I believe that they are encrypted. I do have access to the source code through Jadax, but I am not sure how to locate the key to decrypt them, or how exactly to decrypt them even if I had said key.
How does one go about extracting the images so I can use them for PC/phone wallpapers?

Solved.
Delete the first 16 bytes of hex data, then change the file extension to .jpg.

Related

Guide To Modifying SPB Mobile Shell 3.5

This thread will serve as a bottom-up guide to modifying SPB Mobile Shell 3.5. Any help and links is appreciated and will be incorporated.
Last updated: 10/24/09
*Basics of SPB Mobile Shell 3.5*
Areas of the program that can be modified are based on an XML architecture.
Entering the Program Files folder, one finds many files named *.dat. Many of these correspond to concepts or widgets that are easily familiar: clocks and etc., and several of them are responsible for the larger structure and feel (qa_layouts, for example). A more comprehensive listing of all the include files is:
[To come]
*.DAT Structure*
.dat files that can be modified are actually standard .zip archives. Simply copying them over to your PC, changing the file extension from .dat to .zip, then opening the archive and extracting the files inside, shows you all that comprises a given widget or layout.
assword: In extracting files from the .zip, one will be prompted for a password, which is universally b0fm18zq .
The files contained in an archive are generally a mix of .xml files (determination layout, composition and functionality) and .bmp (image files that correspond to the different looks a widget may have). The .xml files may be viewed and edited in any standard text editor, like Notepad++, and the .bmp files can be viewed and edited in anything from Photoshop to Microsoft Paint (though, for exactitude, Photoshop or similar is best).
*What Goes Into a Widget*
A widget is defined by three specific files (with filename containing the three prefixes qa_, va_, and ma_), as well as by XML references in files like qa_layouts.dat and qa_layouts_bup.dat.
*Simple Widget Appearance Modification*
Luiggi's 9 Icon Build Guide: http://rapidshare.com/files/101365258/9_Icon_Build_Guide.zip
Just making a quick link here to another forum thread for Vostradamus Mobile Shell Manager. Besides the app there's also a lot of information there on how to modify widgets:
http://forum.xda-developers.com/showthread.php?t=689087

Android's .so files

OK, So I've gotten to breaking down and recompiling those pesky .dex files, but I've run into a new problem.
This is a noob question, I'm sure, but .so files look like unformatted, binary files. How do I open then, edit them, etc? I need to read whats going on in my libs. :-(
Are these X11? I'm running ubuntu 10.04 x64 - so those could be difficult.
ie - unreliable 64 bit support.
$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so
Click to expand...
Click to collapse
They're native library files, so platform specific machine code I imagine. Look for an ARM disassembler. I'm not familiar with linux internals, so don't know how you find the entry points, but it obviously will be widely documented. Is it impossible to obtain the source code? Assuming most are written in C/C++, reverse engineering from the machine code is not something I'd describe as a pleasant experience. If the source was well written assembly language & not too big, it can be almost enjoyable I guess. But then TBH walking through a randomly selected programmer's source, let alone object, files scares me, in a Tim Burton inspired bad trip kinda way. If you can find the source, it will be an order of magnitude less painful.
Try IDA Decompiler, it should disassemble all so files!
Most of the libs are open source in the aosp. Some are proprietary blobs with the only solution to them being reverse engineering.
.so disassembly
i know how to disassemble it
you will need orion's easy apk disassembler and apk manager
i've tested it once and it worked, but there´s a problem, i dont know how to re-assemble
1- rename the file .so to .apk like "libtestlib.so" to "libtestlib.apk"
2- put in the folder "place-apk-here-for-modding" of apk manager
3- open script.bat (or something like this) from Apk manager
4- use extract apk option
in the beggining my images inside the lib was corrupted so i used step 5 to fix
5- use option optimise images inside to fix images
6- go to project folder and copy classes.dex file to the root of easy apk disassembler's folder
7- open EasyApkDisassembler.EN.bat and use the "DISASSEMBLY a classes.dex with smali" option
8- give a name to the folder (like "libtestlib")
9- it will create a folder (like "out_libtestlib") with the disassembled files
Orion's easy apk disassembler http://forum.xda-developers.com/showthread.php?p=5826401
Apk multi tool (almost the same as apk manager) http://forum.xda-developers.com/showthread.php?t=1310151
I've tried to open libsurfaceflinger.so from my device with 7zip, and it worked too
thats it
@gkillershots
not working
i renamed .so to .apk and used extract option but getted error :
Processing archive: C:\APKMultiTools\place-apk-here-for-modding\libnative-lib.apk
Error: Can not open file as archive
"An Error Occurred, Please Check The Log (option 26)"

[Q] How do I rename an image?

Hi,
I just read this on your site:
"26. Add Your Own Album Art to Music Folders
Make sure the image you wish to use is 256x256 pixels, 96dpi and save it to your PC. Rename the image to the following format: ~hTC_Album Name.vin. Please note that the change refers also to the file extension as it will now become a vin file. Copy this file to the folder of your specific album on your Storage Card. Example: If the album is called Abba Gold, then your vin file will be ~hTC_Abba Gold.vin."
Well. This might be a stupid question, but how do I do this?? When I rename the file to ~hTC_nameofthetrack.vin it stays an .JPG file.. and when I download it and use "save as" I can only choose between saving it as an .JPG or an .BMP file.. even when I just try saving it as ~hTC_filename.vin it becomes an .JPG with .vin at the end of the trackname..
I would really like to know and this probably is an easy answer so I hope someone can help me with this
are you renaming from the computer or the phone?
if you are doing it via the computer make sure that you have shown filename extensions enabled or it will not change the type of file
and how do I enable that?
[windows helpdesk mode]
Open explorer, goto tools, Folder options
Select the view tab
Under files and folders unselect following:
hide extensions for known file types
[/windows helpdesk mode]
I couldn't get this working no matter what I tried, gave up in the end....
even once the files were renamed and everything, the images wouldn't show....

[Q] ApplyRecovery.bat

this is gonna sounds stupid but i followed every step but i cant seem to get the file to be only ApplyRecovery.bat, thats how i named the files but it does only open notepad....like if it was reading ApplyRecovery.bat.txt
Step 5: create a text file using notepad, called ApplyRecovery.bat. Make sure it is not named "ApplyRecovery.bat.txt" . It will contain the following lines (copy/paste is fine)
i did it finally
For future reference, it might help others if you explained how you solved your problem. For example, given this issue where the file is opening in notepad, one of the following possibilities is apparent:
1. When saving the file, you did not enclose the file name in quotes, e.g. "ApplyRecovery.bat". Enclosing the file name in quotes overrides the automatic generation of extensions and saves the file exactly as you wish.
2. Batch files, files ending in .bat, were set to open in notepad instead of being ran when double-clicked. This would by necessity require you to delete the file association before the batch file would work.

how to view edit Smalli codes any android app hacking

hacking or cracking an android app is a easy part with XDA AUTO TOOL ..
search and download and install this tool ..
Process
Step One – Decompiling The APK File
Open the xdaAutoTool folder and run the program. It will prompt you to install a file called “framework-res.apk.” Ignore this. Close the program.
In the xdaAutoTool folder you we see a bunch of folders appear after the program ran. Look for one called “_INPUT_APK.” Put your APK file in the folder and run the program again. Press “Decompile All” located on the left side of the program window.
xdaAutoTool will decompile the APK file and create a new directory in the _INPUT_APK folder.
Step Two – Finding Your Target
Are you ready to be introduced to Smali code? Don’t worry! It isn’t too difficult once you realize what’s going on in the code. Java can’t be decompiled back into the original source code, it can, however, be decompiled into something called Smali code.
Navigate back to the _INPUT_APK directory and open the new folder (it will have the same name as the APK file). Once there, you will see a directory named “smali.” This is your target. Depending on your intentions, you will need to sift through the various files and folders in the smali directory until you locate the code you would like to modify.
For example, if you are trying to increase the firepower of a turret in an Android game, you will need to find the file for that turret. These directories are structured. You will probably see quite a few directories containing files used for advertisements, etc. One you discover the actual game directory, everything you need to alter will be in there.
How to change smalli code
now again open xda auto tool after edit changes and recompile and build your changes
You done ..........

Categories

Resources