[Q] .smali conversion - Android Software/Hacking General [Developers Only]

k after googling a lot i came to apktool for decoding i used sucessful able to get resource files and hell getting .smali file any way around to get .java file from .smali file. i just searched the forum still not sure possible or not

Related

Problems editing cyanogenmod 7 framework-res.apk

I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T
No one will help us
C'mon Guys any Tip ?
Thank in Advance!!
how are you pushing the edited files?
I know that the one safe way is via an update.zip , try that.
TuoNonno said:
I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T
Click to expand...
Click to collapse
can you give more info?
i mean, are you have any error on compiling the framework?
can you post the log file of apk manager?
TuoNonno said:
I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T
Click to expand...
Click to collapse
I have run into some issues with framework-res.apks, the issue ended up being corrupt images, the dot 9 files. I replaced them with clean images and overwrote them after compile using 7-zip. Hope this helps a little.
Sent from my Inspire 4G using XDA Premium App.
britoso said:
how are you pushing the edited files?
I know that the one safe way is via an update.zip , try that.
Click to expand...
Click to collapse
I tried both with an update.zip and also changing it on the original rom...
tj_style said:
can you give more info?
i mean, are you have any error on compiling the framework?
can you post the log file of apk manager?
Click to expand...
Click to collapse
No errors...
Code:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
"adb" non Š riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
Impossibile trovare C:\Users\Nonno\Desktop\New8300\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Impossibile trovare C:\Users\Nonno\Desktop\New8300\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Yes, "W" is a "warning" - it may be a potential problem or may be not. Most of apks have some code, so its lack may be a sign of an problem. framework-res.apk doesn't have it, so this warning is ok for that file.

Editing XML, extreme noob

Hey guys, i've spent a few hours searching while figuring out these new tools I've downloaded in hopes to modify some basic apk's. After successfully modifying the background image for the pandora widget, my intention's are to now expand the widgets width. To do so I understand I would need to modify the xml file associated to the widget, and this is where my trouble's lie.
From what I've gathered I've been able to decompile the binary xml file to regular xml using AXMLPrinter, after editing it there seems to be no hope in recompiling it to an android freindly xml file.
After a bit of searching i've learned most suggest using apktool to decompile the apk, edit the necessary xml files, and then recompile. From what I understand this is the most appropriate method for what I desire.\
The problem i'm having is that once I decompile the apk, all I find is "smali" type files, and not one single xml file. This is where i'm lost..
Thanks for any help in advance, and sorry for this stupid question, it seems that everywhere I search this is the part that is directly skipped over.
you will find the xml files in the /res folder

Decompiling apk to jar..and vice versa

Hi!.i was rying to reverse engineer an app.ihave managed to convert it to a jar file and decompile it using JD(via dex2jar)ihave also tried apktool but it converts it to smali code..and its not readable at all :/.my question is:
after i got the .Java files and loaded them to netbeans...made the changes..how should i compile it back to an apk? thanks
marko.gangsta said:
Hi!.i was rying to reverse engineer an app.ihave managed to convert it to a jar file and decompile it using JD(via dex2jar)ihave also tried apktool but it converts it to smali code..and its not readable at all :/.my question is:
after i got the .Java files and loaded them to netbeans...made the changes..how should i compile it back to an apk? thanks
Click to expand...
Click to collapse
As far as I know you can't. You will have to reference the java code to smali in the apk
Sent from my ADR6350 using XDA Premium App
is this the only way? i just cant modify anything in the smali files they are very confusing..the only problem i get when im compiling the jar is that netbeans cant find the Android SDK like: android.view.WindowManager;.and as far as i know netbeans doesnt support android.any help?

Can't Load res/raw Files After Modding

Hello xda-developers!
I'm new to Android hacking, but I have a general background in programming...
I've been modding an application recently, unpacked the .apk file, done my changes and repacked it, signed it and everything works well...But when I run the program, and the program wants to play an mp3 file, which was located in res/raw before packing the .apk file, it gives an error: "Can't load audio file."...What is the possible cause of this problem and how to solve it? Are the IDs of the raw resource files changed everytime I unpack and repack the .apk file or what?
Thanks in advance...
Edit: Issue fixed by unpacking and repacking using Apktool instead of WinZip.

[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