PUBLIC.XML and smali file chaos. - Android Q&A, Help & Troubleshooting

Hi guys, pretty new to playing with android, I'm trying to edit some apk (really simple app), I removed an image
from the res/ folder and removed the entry from the value xml file, which then COMPLETELY jumbled up the resource codes of public.xml when it compiled with APKTool (deleted original public.xml because it was giving compile errors), which broke the application because the resource IDs do not match to the 'smali' codes in the source.
I've googled and searched around for AGES and people are saying smali files ARE rebuilt upon recompiling which didn't
in my case. How do I fix this issue?
THANK YOU!

bump!!
please help me!

Related

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

[Q] How can i regenerate public.xml after decompiling apk with apktool?

Hi,
I want to decompile Huawei Ascend Mate's settings.apk file and add some decompiled activities and classes from Samsung I9082 settings.apk (it is about dual sim functionality) and do the same with Mms.apk, Phone.apk and TelephonyProvider.apk. (With APKTOOL)
But the only problem is "public.xml"! because when an apk file is compiling from source, all of string names and plurals and etc. will convert to hexadecimal IDs that they are placed in public.xml and the keys of values in Java source will be replaced with hex IDs.
I need to regenerate "public.xml" to add new values with new IDs, but if I change IDs, I have to open all SMALI files and replace old value with new!
May somebody help me?

[Q] decompiling and compiling 4.4.2 .apk

Do you have to do some any different when decompiling and compiling android 4.4.2 apk's??? Trying to do some mod's to a Settings.apk. making the xml changes using notepad++. png changes with gimp. Added 3 lines of code to the settings_header.xml "showed no code errors" then saved. added 3 lines of code to the value.xml "showed no code errors" then saved, and add 2 48 x 48 png images to about 3 drawable folders. Now I use the same tool I decompliled with and try to recompile the Settings.apk and get all kinds of errors "I think" because i never get a compiled Settings.apk

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.

Where can I find files with button names in an .apk file?

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.

Categories

Resources