I have a question, ive decompiled the apk, and edited some png files.
But since the old smiley files were much too big when shown in the mms.apk Ive used some that are small like 33 x 33 insted of 67 x 67
I get error when trying to recompile it. If i then make the 33 x 33 to 67 x 67 files it will compile just fine.
Is there a line in a xml file I need to edit befor it will allow me to use these small filers? or is there a line in a xml file that defines the size of them ?
or in a smali file?
Please reply
fixed but bypassed the compile.
I think that if you are going to modify .png only, you can just open the .apk using 7zip and replace/modify the file you want without compiling/decompiling.
I know I didn't answer your question, but just showing an easier way in case you didn't know.
Sent from my GT-I9100 using Tapatalk 2
Related
I'm trying to decompile a few apks for modifying the dialer on an ICS rom. When I go to decompile I get an empty folder and this error:
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
I'm using this ver: http://forum.xda-developers.com/showthread.php?p=22845681
All I would like to do is edit a few xml files to change the color on text. Anyone have any idea on what the issue is? Could I just rename the apk to .zip and extract the files to be edited?
There's another you can edit APK's.
- Extract the apk
- Modify the files in the folder you get after extracting
- Right click on the original APK and open it with 7zip ( click on "open archive " )
- Drag the edited file from the folder to the original APK and overwrite it.
With this method you don't need to decompile and then recompile !
Sent from my GT-I9003 using xda premium
Use the proper one, not an auto tool. download the latest apktool and make sure you add the framework files needed
thanks! it turned out I needed to use a different jar file from here http://forum.xda-developers.com/showthread.php?p=23483528 for the new ICS roms. So far so good but I'll definitely try the ways you mentioned. seems abit easier. appreciate the feedback.
New issue: when I try and compile it, all I get is a classes.dex file so I tried copying the files to the original apk with 7zip and whenever I flash the zip and try and access the dialer/phone app, i get an acore.process error and it force closes. All I did was edit some pngs and change some color values in a few xml's.
killerb777 said:
New issue: when I try and compile it, all I get is a classes.dex file so I tried copying the files to the original apk with 7zip and whenever I flash the zip and try and access the dialer/phone app, i get an acore.process error and it force closes. All I did was edit some pngs and change some color values in a few xml's.
Click to expand...
Click to collapse
I never had a problem doing this method!
What I did was :
After changing the files and putting them on the original APK
I just replaced it with the original one by going in System/App
And rebooted!
It worked everytime!
Don't flash, just replace it!
But take a backup of the original one before you replace!
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.
i made this video for a friend, and think it helpful with some one , so i made a thread for it
(in 1:42 just delete resources.arsc)
If anyone want other video, just request for it, i'll do if i can :cyclops:
in this video, i used this tool: https://docs.google.com/file/d/0B1jXm_WqN2CaRWMybk42NXJSRDg/edit?usp=sharing
Ok, this is all steps:
1, Decompile SystemUI
Copy your Sony-based SystemUI.apk from system/app in phone to Apkmanager/place_here_to_modding folder
Open cmd file in APK manager, choose 9 to decompile
2, edit XML
Open file projects/SystemUI.apk/res/values/styles.xml by notepad++
Find a line have statusbar.clock (if you want change clock in status bar color, for other items, just find it's style code in this xml file)
Change color from ffffff (white opaque) in a line below to color you want ( for example : if i have a color code 00123456 (hex) means: 2 first hex number 00 is full transparent, ff is no transparent; 2 next hex numbers is green values, then 34 is green value, 56 is blue value. For each color value, 00 is zero and ff full of that color). After all changes, save the file
3, Recompile your apk:
Reopen cmd window and chosse 11, enter then y ,enter then y,enter. After that go to keep folder and delete resources.arsc. go back cmd windows and press enter. DONE, YOUR FILE IS unsignedsystemui.apk in place-apk-here-for-modding folder
i dont understand a SH#T...sorry but u can make a new video with more explanation? or something :S
leloiboi said:
i made this video for a friend, and think it helpful with some one , so i made a thread for it
(in 1:42 just delete resources.arsc)
If anyone want other video, just request for it, i'll do if i can :cyclops:
in this video, i used this tool: https://docs.google.com/file/d/0B1jXm_WqN2CaRWMybk42NXJSRDg/edit?usp=sharing
Click to expand...
Click to collapse
What This?
Sent from my ST15i using xda premium
Updated step by step
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
so I trying to assets ripping/mod the game; I already locate most if not all the assets for the game
the problem is that its use weird extension, so I can't modify them
change it to
.zip
.rar
.7z
nothing
TrID. no avail
magic number
It shows something but its kinda nothing
file signature says
6E 73 69 66 ( nsif ) .nsi
6E 73 08 00 ( ns ) .ns
6E 73 08 00 ( ns ) .nsj
can't really find anything with that
with a simple deduction
those extensions came from the game name (the ns part) and looking at the size
.nsi so like i for Image(?)
most likely image/texture pack files like
.png
.pvr.ccz
.nsj j for js as in javascript or JSON(?)
the other most likely script to run the assets like
.toml
.plist
.xml
or something like that
for these files, judging by the size, maybe it's a sliced-up version of the original file
so it's like an original or made-up file extension
and I don't know how to access them
other things I could do probably debug the .apk and see how it treats those assets
there is also .exe version so I could try the same
but my android studio/visual studio is not in a good mood for some weird reasons, too much weird errors
so is there a thing I could do with the file to make it accessible?
I attach some files if anyone interested