Where can I find files with button names in an .apk file? - Android Q&A, Help & Troubleshooting

Hi, let me explain.
I'm translating a gamebook app for Android. So far I've managed to decompile the .apk file, find and edit the .xml files with storyline, but I cannot find the files that contain the data about the app menu buttons (options, settings, save/load etc.). The decompiled game folder contains following folders:
- assets (.xml files with story)
- original
- smali
- smali_classes2
- unknown
- AndroidManifest XML document and apktool YML file
I tried opening random smali files with EditPlus, but couldn't find anything. Any tips how can I edit those buttons? Where to find the code? I just want to change the text to another language.

Related

[TUT] Advance Framework Edit

things you'll need
APK MANAGER
7zip
DESCRIPTION :
Q : Basic
A : The icons are stored in the Drawable-mdpi folder in the framework.
these icons are linked to XML's in Drawable folder
if you just add the icons and don't change the xml, you'll get nothing.
Q : Why Cant we just Edit the XML files?
A : The XML files are encrypted. if you try to edit it you will get weird characters.
Q : No XML No Edits, Are we Done?
A : Yes, No XML No Edits. But we've a walkaround. The APK MANAGER
it decompiles the apk and unencrypts the xml file.
BASIC :
Extract the contents of APK MANAGER to any folder
you'll have few folders
place your apk in the place-apk-here-for-modding folder
open Script.bat
and chose option to decompile and minimize
it will create a folder namely PROJECTS
now you can edit the xml files
after your done, maximize the apkmanager window and choose comiple apk
HOW TO ADD MORE PNGS :
if you want to add pngs like the battery percentage you'll need to link the png to the xml file
this can be done by two ways
1. assigning resource_id
&
2. directly putting in the names
the 1st method is easy but complex so forget it
the second method is simpler.
just find the xml file corresponding to the png and than simply add the name.
for eg.
stat_sys_battery.xml is the battery status xml.
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="0" />
Click to expand...
Click to collapse
here the
android:drawable is the android code
and
@drawable/stat_sys_battery_* is the file location
check the attachment for better understanding
Click to expand...
Click to collapse
THE PROBLEM & THE SOLUTION :
if you try to edit any modded framework file you'll get error while compiling.
and your phone will hang if you use that file.
SOLUTION
instead of using modded file. use the STOCK framework. Edit your files and compile your apk
now when you compile it, it will give you few options
1. is it a system file [y/n]
choose yes
2. (...blah blah.. do you wish to keep files)
choose yes
now it will extract the stock (unedited) framework in a KEEP folder
minimize the window
open the folder and delete all the files you modified.
if you had modified xml file you'll also need to delete resources.asrc
now maximize the apkmanager window and press any key.
your modded apk will be compiled in the place-apk-here-for-modding folder
PS : IT WOULD BE UNSIGNED
LAST STEP :
open the compiled unsigned apk and extract all the files you edited (including resources.asrc)
simply replace these files in the framework-res.apk you wanted to mod
only part to take care is the resources.asrc file you don't have to replace it directly
do this steps for replacing resources.asrc
1. right click the resources.asrc
2. select add to archive
3. archive format zip
4. compression method Store
5. select the path of your framework-res.apk
I know this all seems way to complex but if you read carefully and do it step by step, its all easy as a PIE

Open XML file

I had extract surces files from an .apk application and I'd like to open XML files in the folder "res"
I import it in eclipse but i obtain this message:
"No XML content. Please add a root view or layout to your document."
you're right !
xml files in res folder doesn't seem to be real xml but "DBase 3 data file"
-> using the "file" command (on linux)
res/layout$ file main.xml
main.xml: DBase 3 data file (864 records)
Why not just use Notepad++ or Geany(Linux) ? That how i edit xml files.
smokin1337 said:
Why not just use Notepad++ or Geany(Linux) ? That how i edit xml files.
Click to expand...
Click to collapse
If anybody want to edit an xml inside an apk, he must decompile with proper decompiler (apktool) . Then only he can edit the xml with notepad or gedit or Geany .
Simple extracting of xml file will that suffice. XML extracted from apk with a zip manager , may not even viewed properly with notepad gedit or Geany .
yeah, you must decompile the .apk , then you can edit the xml file by a text editor.
Yes, you cannot just unzip the .apk and edit the files. You must de compile the apk first:
http://code.google.com/p/android-apktool/
It is easy, then you can edit all you want.
Then: compile, zip, sign.

[Q] APK modding Deskclock - Please Help

So i have this Deskclock.apk and i want to add this.
No Problem with the ".xml" Files. I can edit them easily after i decompile the apk with the "apkTool". But where will i find the ".java" Files? After decompiling the apk i only see ".smali".
So i found out that the ".java" files are in "classes.dex" from the apk.
I use "dex2jar" to get a ".jar" File.
Then i use "jd-gui" to get ".java" Files.
So i can edit it and put the needed Strings in the .java files.
But how to put them back to a "classes.dex" File which i can put back to the apk??
I hope i get a bit help here.
You can use APKTool. It will automaticly extract all the classes (.dex), resources (.asrc), then it will convert binary XML to human-readable XML, and it will also dissassemble the classes for you.
Just tell APKTool to decode the APK into a directory, then modify what you want, and finally encode it back to an APK. That's all.
Important: APKTool dissassembles. It doesn't decompile. The generated code won't be Java source. But you should be able to read it, and even edit it if you're familiar with jasmin. If you want Java source, please go over the Manual way.
Sent from my VS910 4G using XDA
Thx...I know how to use APKTool but i need to put the ".java" Files back into the "classes.dex". Thats my Problem.
There's info on the process here: http://stackoverflow.com/questions/10261147/converting-java-back-to-classes-dex
Essentially it looks like you need to compile the .java to .class files with javac and then create classes.dex with dx. Hope this link is helpful.

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 ..........

Edit xml file from existing apk / recompiling apk

Hey
I am currently struggeling at editing a xml file in an .apk that i got.
I've used this Jadx decompiler (wwwDOTjavadecompilersDOTcom) to decompile the apk, which gave me the following files and folders:
fs5.directuploadDOTnet/images/160129/ypnqz7xuDOTpng
All the files are human readable.
But how do I recompile it? Can I load it into the Android Studio?
fs5DOTdirectupload.net/images/160129/ho4vszubDOTpng
As you can see importing into android studio did not really work. The app couldn't be run.
Search for apktool here. It is what is used for decompiling and recompiling apks.

Categories

Resources