Decompiling MMS apk? - General Questions and Answers

Hey guys, running into some trouble on this one. I'm running the 4.2.2 illusion ROM on my GS3 and was attempting to decompile the mms app to make some changes.
I'm using apktool, I've loaded the framework-res.apk, but when attempting to recompile, I get a bunch of errors like this:
"Public entry identifier enter index is larger than available symbols. Public symbol declared here is not defined." etc...
I've tried just doing a straight decompile/recompile without making any changes and I still get this result. decompiling seems to complete ok from what I can tell.
Any suggestions? thanks!
also, if this thread doesn't belong here please forgive me and move it. I wasn't sure where to ask.

Related

[Q] Compiling services.jar from source?

I've got an idea for a mod I want to make. I know where to find the Java code in the AOSP. This afternoon I spent some time futzing around with framework-res.apk; I used apktool to uncompress/decompile it, made some goofy changes, rebuilt the .apk, then signed and pushed back to my phone successfully.
Now, I want to make programmatic changes. So I pulled services.jar, decompiled with apktool again, and got my .smali files. Unfortunately, I don't understand the format whatsoever. I'm trying to do something more complicated than simply changing colors/graphics.
I want to know whether I can download the Android source, make my modification to the Java file I need, and recreate a services.jar out of it all. Is that possible? If so, is there a tutorial somewhere?

[Q] ADW Theme Errors - Eclipse

I have downloaded the most recent Theme Template from AnderWeb and I am (trying) to follow the instructions posted ... unfortunately I am not getting very far.
Fire up Eclipse and create a new Android project. I point it to the downloaded Theme Template directory as an existing project to use and click "Finish" (this is all per the instructions) and I end up getting the error:
Error: Invalid Project Description
Invalid project description.
/Users/me/Documents/eclipse_projects/AnderWeb-ADW.Theme-Template-d8491c4 overlaps the location of another project: 'AnderWeb-ADW.Theme-Template-d8491c4'
The first time I tried to point to this project, Eclipse didn't seem to be picking up the right info from the manifest ... it would only display 1.5 for the Build Target. Looking in the manifest, it declares SDK Ver. 4
If I go back and then repoint to the location again, everything seems to be ok but it still gives me the same error.
Is something up with the manifest?
I know there are a few other themers here that have played with ADW, so I am hoping someone else might be able to shed some light on this for me.
thanks in advance.
When I first was trying to make themes for ADW, I had errors building the theme if it wasn't in the sdk/platforms/android-8 folder. I don't know if this will help you, but you could try that.
david1171 said:
When I first was trying to make themes for ADW, I had errors building the theme if it wasn't in the sdk/platforms/android-8 folder. I don't know if this will help you, but you could try that.
Click to expand...
Click to collapse
Yep, I moved the project folder to the Android-8 directory and it loaded right up! Thanks a ton, David ... I mashed the Thanks button for you
Now let's hope the rest of it goes smoothly...
Just ran into the same problem, and in case anyone else is having it, all you need to do is make sure your unpacked ZIP file isn't in your eclipse_projects folder. Placing it anywhere else (including the android-8 folder mentioned above) will fix the problem.

[Q] I Need Help Compiling apk's to use with CM7 theme chooser

Hi,
I'm having issues compiling a new apk to use with the tmobile theme chooser and could really use some help.
I started by creating a new project in eclipse using the information from the Cyanbread theme to get the right androidManifest.xml, package format, and xml files. The problem I've run into is that, when I try to apply the theme (through CM7 emulator or my own phone), I get an error saying the package is improperly compiled and cannot be applied.
I looked into the source code for the theme chooser and found that "DIALOG_MISSING_THEME_PACKAGE_SCOPE" is what generates that text string. I found tmobile's theme wiki at hxxp://code.google.com/p/tmobile-themes/wiki/NewGlobalThemeEngineDesign (sorry, I cannot post links yet). On that page, I found this:
Resources are generated in the 0x0a package scope. This is designed to separate them in the AssetManager's ResTable. The framework currently uses 0x01 while application packages normally use 0x7f. The aapt tool was modified to support assigning arbitrary package scopes and so you must use the aapt tool found in the themes tree for building your own themes.
Click to expand...
Click to collapse
I installed the repository on my system and found the aapt at ~/prebuilt/sdk/tools/linux/aapt. I tried renaming my "standard" aapt to aapt.old in my android sdk platform-tools folder and putting the modified aapt in its place. I deleted my gen folder in eclipse and made it rebuild it using the modified aapt.
Having done all that, I still get the same error saying the package is improperly compiled. This is all pretty new, and I haven't been able to find any info here on xda or elsewhere that helps. Any help that anyone can give would be really appreciated. Thanks!
UPDATE:
A guide was just posted at forum.xda-developers.com/showthread.php?t=942203 that gave me all the other info I needed to make this happy. If your searching and found this thread, hopefully the guide can help you.
UpwardSpiral said:
UPDATE:
A guide was just posted at forum.xda-developers.com/showthread.php?t=942203 that gave me all the other info I needed to make this happy. If your searching and found this thread, hopefully the guide can help you.
Click to expand...
Click to collapse
Thanks a lot! I've been having the same problem

[Resolved] Help needed! public.xml drawable symbol declared but not defined...

Hello dear devs
I'm trying for 2 weeks now, without luck, to find a way to decompile, add resources and recompile Erikmm's MIUI v4 :
settings.apk
framework-miui-res.apk
as part of my HebMIUI project.
I downloaded an ICS aimed APKtool and used the original as well.
the original fails to even decompile, the other one fails to recompile, giving public.xml drawable symbol declared but not defined error:
For example for settings.apk I get this
I managed to recompile all the system and framework apps besides settings and framework-miui-res so it's really frustrating to not being able to finish this work.
If someone here has a working environment or some issue pointing I missed, I'd greatly appreciate it if you share it with me.
Thanks.
I fixed the 9.png error at the start of the pastebin, it's not related to this issue. Still getting all those declared but not defined errors.
I get them even if I decompile recompile without changing anything...
I'll try to decompile with dependencies. If that won't work I'll try to remove the declared objects from xml.
sent from me
WARNING: The pastebin link totally had a virus waiting. Sorry itskit2sh.
Not much help at the moment, but apktool is going to receive updates (supposedly)
https://www.xda-developers.com/android/apktool-to-receive-updates-once-again/
For settings try and use the apktool from developer.android. As for how you are recompiling miui uses framework-res and framework-miui-res as dependencies. Lastly the miui_logo thing might be because I added my Darth Vader one for when booting shutting down lol. Ill upload my update today to dropbox and have u try with the newest one
----------------------------------------------
If helped don't be afraid to hit the thanks button it doesn't bite lol
Thanks for your replies guys, unfortunately no luck yet.
I copied aapt ver 1.4.3 to both old apktool and ics apktool.
still I get "bad magic value" on old apktool decompilation
and like gazilion rows "declared but not defined" for public.xml objects on ics apktool compilation.
Also decompilation with dependencies did not quite work as it did not get my depended apk suggestions (framework-miui-res/framework-res/settings).
are there any alternatives to this method ? thanks.
Resolved (!) using these files of the newest WIP apktool files (ver. 1.4.9)
once again thanks for all your help guys !!!

[Q] Problem Modding APK

Hello guys,
I am modding an apk to bypass an update check.
I have this outdated APK that functions fine since the URL and query and site address remains same but whenever it checks for and update it crashes. The thing is the developer made it topnotch but since then left and his site was recently taken down so check update query crashes it totally. What I need to do is update just the one function where it brings up the GUI after start. Otherwise it keeps saying download update or crashes randomly at time of starting up.
Now I have been browsing for a day or two for all the tutorials and right now I`m hell lot of confused. I have downloaded many tools and dependencies but I dont know how to proceed. I will tell you guys what I have and what I need.
I have de-compiled the APK using "dex2jar", I had a .JAR file which I decomplied using JD-GUI-Windows now after saving source I have .ZIP file in which I made the necessary editing. Next I downlaoded APKTool.JAR and extracted resource files and XML files that can be read in text editor. Along with some .SMALI files.
Now I am not familier with SMALI language at all and editing in it seems rather complicated and on the other side I have the .JAR file that decomlied all the classes just fine.
MY QUESTION IS:
How do I recompile the files I have ? I have the main coding extraced using dex2jar so in java format and JD-Gui to in .ZIP files, and resources/XML files also decoded using APKTools. What do I do next to recompile the APK ?
In short I have plain text based java source code and plain text XML and other resource file. How do I recompile it ?

Categories

Resources