[JB]Xperia Sola 6.2.A.1.100 SemcPhone.apk Compile - Sony Xperia P, U, Sola, Go

Hi there,
I am using 6.2.A.1.100 Rom from DeathZeroFX on my Xperia Sola and I want to change the semcphone.apk caller image size.
I am using APK MultiTool v5.5.7 but although I am able to decompile it with no errors when I try to compile it, it keeps running forever. I have "installed" framework-res.apk, semcgeneric....apk and from folder (system/app) the systemui.apk.
I tried Apk MultiTool v4 and I got the same error with this http://forum.xda-developers.com/xperia-u/issues/decompile-semcphone-apk-t2118131.
All I want to do is change a value inside res/layout/somc_incallscreen_large.xml.
Even if I make no change same thing happens (v5.5.7) does not give me any error just keeps running..
In the decompiled)apk folder I get a new folder called "build" and inside there is only the classes.dex nothing else!
Searching the web does not say anything particular except for old aapt.exe version
I am desperate I even tried to compile the helloworld.apk (found on web which (de)/compiles with no problem) and just add my res folder but of course that could not happen.
Any suggestions?Or even another tool?I need to edit those @#$% android binary xmls..

Bingo
Despite being desperate, I used APK Studio and after decompiling I modified some of the xml, plus with the help of the previously decompiled java classes and the help of notepad++ I changed the corresponding code inside smali files and then build it. After that I copy pasted the edited files (from the apk) into the original one without signing and yeahaa happy reverse engineering..If I sign them with APK Multitool it will crash..(Though it is not clear if it should be signed again (for me crashes), somewhere says that by restoring the original META-INF and Manifest.xml will do the job (which does for me since the final apk is the original just with modified classes.dex).
I have a semcphone.apk with callers image (scaled down a little bit) instead of being cropped.
The last alternative was editing binary files through notepad++ hex editor which is a no go..

Related

Problem modifying apk

Hi, i am trying to modify the classes.dex file in an apk but it is giving me problems.
if i decompile the apk and recompile it after modifying the app installs but crashes after one minute. also some functionality in the app is also lost.but when i binary edited the classes.dex file and replaced it in the apk ( i have used different methods for replacing the .dex such as direct replacing in archive and replacing in the decompiled archive) the app doesn't install and the phone or emulator reboots. i have done this with other apps and they are working fine after editing so i couldn't understand what's going wrong. please help
You should use a decompiler and achive to the java code. Than you can easily modify and recompile the app. You will need an Linux virtual machine to do this.
In linux, after you found you .apk file use this to decompile it to a .jar file. http://siis.cse.psu.edu/ded/installation.html. After that, you can use http://java.decompiler.free.fr/?q=jdgui to browse the code. With this method you will need a Linux machine and would give you the best result.
If you want to use windows, follow this tutorial http://androidorigin.blogspot.com/2011/02/dex-format-to-jar-format.html but I warn you, its likely to be faulty.
Hope this will help you.
thanks for replying
i used apktool to decompile and modify the smali code. i had even tried converting the smali code to java but no help.the problem is that the recompiled app runs only for one minute and then crashes without any error message even logcat log is not of help it just says that the process xxx has died but no err msg or exception is logged. if i replace the classes.dex with the patched one and then re-sign it it does not install and crashes the emulator but when i again decompile and then recompile the modified file it return to the same old problem of crashing. do you know how apktool packages the compiled files?
You should follow one of the tutorials posted in my last post. I did not used apktool and I don't know how it works.c the method with that decompiler will work. If you want your application signed just sign it as a normal one.
this particular apk loses about 20-30 kb in filesize on decompiling and then recompiling with apktool while this is not seen in any other apk. maybe this means that this file has some overlay data that goes missing on modifying and creats problems.7-zip is unable to show any extra data in the file.does anyone know how to add and extract overlay data on/from an apk?

[Solved] smali changes not compiling

I don't know if I'm doing something wrong or missing a step but I'm trying to get my status bar transparent following this guide
http://forum.xda-developers.com/showthread.php?t=1523703
I'm using wanams apk manager, I make the changes to the statusbar.smali file and the xml files, I compile and it doesn't work on my phone, so I decompiled the modified apk, and the changes to the xml files went through but the smali files go back to the originals.
when compiling I use yes on Is this a system apk, yes to copy additional files, go to keep, delete resources.arsc and finish.
It happens with any smali file when I compile, I use notepad++ to edit the files.
Solved: So what I ended up doing since my xml files were saving but my smali files weren't, kindof a noob so I didn't realize that when compiling it asks to copy over files and the classes.dex file was overwriting all my changes to the smali files, so I compiled and when it asks to delete files from the keep folder I took the classes.dex from that folder, decompiled it seperatly made the changes to the smali files there. I still deleted my resources.arsc, then I finished making the apk opened the apk and replaced the classes.dex there with my modified one. pushed to my phone and everything works perfectly.
I don't know how it works for other files but try applying the same method somehow; When decompiling and recompiling framework-res.apk, there is a resources.arsc file that is created and placed inside a build folder under the original decompiled folder. Drag that resources.arsc to the NEW apk file you have, and it will work.
I assume you're decompiling a .jar file so maybe it's a classes.dex file. If there is a newly compiled one under some build folder, try placing it into the new .jar file. Make sure the compression method is STORE, or 0 if it's a scale. Try out some combos until it works out.
liinko said:
Solved: So what I ended up doing since my xml files were saving but my smali files weren't, kindof a noob so I didn't realize that when compiling it asks to copy over files and the classes.dex file was overwriting all my changes to the smali files, so I compiled and when it asks to delete files from the keep folder I took the classes.dex from that folder, decompiled it seperatly made the changes to the smali files there. I still deleted my resources.arsc, then I finished making the apk opened the apk and replaced the classes.dex there with my modified one. pushed to my phone and everything works perfectly.
Click to expand...
Click to collapse
Just delete the classes.dex from keep folder and press enter in apk manager menu.. and you're done
?
systemui with smali
in the whole forum not an any solution for compiling with smali

Replacing png in apk

Hi everyone,
From my understanding, if we want to change the pngs in an apk, we can simply open it with 7zip, then replace the pngs, it's done.
I took EventStreamPluginCallLog.apk from arc s which is updated to ICS.
The apk can be installed in xperia s and it is working fine.
However, when I change the png named icon in res > drawable-hdpi > icon.png
The apk can no longer be installed.
So I go with decompiling and recompiling the apk using apktool, no error shown but I still can't install it
Any idea? Thanks
did you sign it after recompiling?
System apps don't need to be signed. What i did for system apps is:
Decompile app
Replace png
Recompile app
Use TickleMyAndroid -> Prepare files for pushing.
realfelix said:
did you sign it after recompiling?
Click to expand...
Click to collapse
I thought the same even it says no need for system apk, I still do it and get the same problem, can't install
Felimenta97 said:
System apps don't need to be signed. What i did for system apps is:
Decompile app
Replace png
Recompile app
Use TickleMyAndroid -> Prepare files for pushing.
Click to expand...
Click to collapse
I tried everything I know. Apk Multi Tool, simply apktool only, direct replace PNG with 7zip (compression changed to deflate), direct replace with winrar (compression method retained as store), it just doesn't want to install.
I have tried TickyMyAndroid, I am not sure if I done thing correctly but I see no error when recompiling yet can't be installed. My goodness. Time to forget about this stuff

[Q] Unable to re-compile (using autoapktool / apktool)

** I dont have enough posts yet so cannot start thread in the correct section, so posted it below here in general **
I have all the content ready to add to an app and been searching for the right template and came across an app that has the look and feel I want.
I used autoapktool2.0.0 and it dissasembles the app fine so you can access the xml and other files. I am also able to edit a test apk and recompile and sign it with the above software fine. It creates 2 different folders one build which has a created classes file and one called dist that has the completed recompiled apk
however, when i try one specific apk I am able to decompile it fine, but when it comes to recompiling it after making a tiny test edit it will not do it.
I creates the classes file fine but it does not recompile the whole source files into an apk, so the dist folder is not created.
Why will it not recompile the whole thing?, is there something I am doing wrong or is the thing protected?
can someone test it for me using same methods I done and see what their result is?
(no errors were given when recompiling, it acted as if it was complete but it was not, as no apk created)

SystemUI.apk compiling error - solved

SystemUI compiling error on stock Android 4.3 roms
This is not actually a fix just a work around to allow the compiling of the SystemUI.apk
The problem is that apktool isn’t decompiling the SystemUI.apk resources.arsc values correctly, download the attached zip and copy the enclosed values-sw720dp folder to your res folder.
This should solve the compiling error but do not replace the newly compiled resources.arsc to you phone as it could cause the SystemUI.apk to crash.
Changes to other xml or png files should work as normal if you are flashing via vrthemeing or similar methods but would suggest that after compiling your SystemUI.apk you extract the files you changed and only flash those files to your phone not the full apk
Thanks for this, it solved my compiling issues instantly.
Thank you very much

Categories

Resources