Hi All,
Has anyone here been able to sucessfully decompile/disassemble the TouchWiz APK and ODEX, for love nor money I can't do it using various tools, or if I can do it, the reassembled file doesn't work.
I'm trying to edit the
Launcher.smali
File to force it to choose screen for as the default screen as opposed to number 1 and, like I mentioned, using one set of tools causes it to fail, another completes but cannot re-compile it properly as it doesn't work once you get it on the phone?
I've attached the files (apk and Odex) in a zip file below.
Any ideas/help would be great.
Related
So I had my first go at playing with frame-work-res.apk -- fortunately I made a backup first!
This is what I did, step-by-step (probably the hard way, but at the time, I didn't have my USB cable, left it at work).
1. Pulled a copy of framework-res.apk off of the phone.
2. Renamed to .zip (Windblows7) and extracted.
3. Modified a few images, just to see if it would work.
4. Re-created a .zip (making sure that it would be the same, structurally, as the first one) then renamed it to .apk
5. Put it onto the phone, replacing/removing existing one
I immediately got an error (expected) but then I rebooted. Wouldn't go past the boot screen.
All I did was open the .apk, modify (not replace, modified) a couple of images, then put it back onto the phone.
What am I missing?
Thanks, in advance.
I think you might need to sign the apk. Try this:
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
I've never did this myself so I could be wrong
nDrg said:
I think you might need to sign the apk. Try this:
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
I've never did this myself so I could be wrong
Click to expand...
Click to collapse
Thanks for that, nDrg! I'll give it a shot later.
Also, I wonder if my problem was simply that I didn't use adb push to put it back onto the phone. I didn't have my cable with me at the time, so I couldn't... perhaps I'll give it a shot when I get home tonight.
No need to rename it to .zip, just open the .apk with your application of choice and resign.
I edit mine by pulling the framework-res.apk, extract it out and whatever i change, i just drag it back into the apk. I use winrar to open my apk files. I don't even make a new zip and don't resign it either.
If I edited a full rom, lets say CM6. I would extract the framework from his rom, do w/e, put the framework apk back into the rom zip and sign the whole entire thing.
if you edit anything with .9.png and replace it without correctly modifying and recompiling you will get infinite fc's
framework-res.apk
K I've tried replacing the drawables in my framework-res.apk using better zip in Mac and winrar in windows. Then is sign the apk with signapktic on my Droid x. Then I replace it with root explorer to system/framework. I get a boot loop every time? Tried everything. Still get boot loop. What am i doing wrong?
One thing i noticed is I can save as zip in eather better zip or winrar no chances just saving the file and my macbook will no longer recognize the apk as a Unix executable fill.
ANY SUGGESTION?
Make sure you're not compressing the file, in WinRAR, you can pick 'store'
Refrencing changes from this thread I'm trying to change some stuff in the current framework-res.apk of this firmeware's framework-res.apk.
From what I've read, APKs only need to be signed if they're being installed, and using APK Manager, there's an option for System APK and Regular APK.
I decompile it with Option 1. Replace his ****ty icons with the default stock icons and then use option 7 with suboption 1. Push the APK to system/framework and overwrite the current one and then reboot. When I reboot I get a bunch of FCs and I have to do a clockwork recovery to get it working again.
When I open the original framework-res.apk with WinRAR, it says "signed with SignApk" in the note field. Does 2.2 require framework-res.apk to be signed? I can't get it to stop FCing on my recompiled framework-res.apk.
First of all, to get rid of all doubts, make sure the compression level is close to 0 (0 works for sure)
Then all you have to do is extract (1), modify files in 'projects', zip (3) unsigned (1). That's it
If its a custom ROM - most likely you can tweak the files and shouldn't have any FC issues.
BUT... you I would recommend finding the icons you want to change.... and then copy them directly into the res/drawable-hdpl folder with WinRar open and have it overwrite the existing ones. I've done this a few times to change batt mods and other items with little risk.
And... if your tweaking *.xml files? This could be your issue as well.
No. All I did was replace the connection icons with the stock ones from the 2.1 framework-res.apk in WinRAR. I use the "store" mode when I replace them, assuming that's the 0 compression method. Should I use Normal?
Bump. ▄
Ive been working on a custom theme for MIUI for a while now and I just finished it but everytime I try to load it up on my droid it just puts me on the default theme. Help/Suggestions?
No one has any helpful advice?
Yes, that has been happening to me too, but that is when I try to go from scratch. There are two things I can think of right now that could be stopping that: You are on a mac and you used the built-in archive, and you didn't use astro to delete the MACOSX_. Folder, or you don't have update scripts or code that you need.
You're right about the mac. So how do I get rid of the MACOSX folder?
Scratch that. Just found it. Trying to load the theme now....
And still same default theme.
Actually I might have just found the problem. When I compressed the folder it put the actual theme folder INSIDE the .zip file instead of putting the contents in the .zip file.
For fun I made custom textures for 'Flappy Bird'
When I try to move the new texture file into the .apk it doesn't work and it disappears after I load the .apk back up.
I am using root browser, I basically can't do anything with the files in the .apk besides extract or view.
Also when I tried to modify it with my PC It wasn't even there, I tried and tried by making files and changing the extension but it wouldn't appear.
How can I fix these problems?
I really want to modify the texture for 'Flappy Bird'
Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
fOmey said:
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
Click to expand...
Click to collapse
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
dagrim1 said:
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
Click to expand...
Click to collapse
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
ksekhar said:
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
Click to expand...
Click to collapse
Yup, it does. (But again, doesn't bother me as much as I don't look at it long because I usually hold my phone to my ear anyway ).
But yeah, I think I know where to fix it... It's the Contacts apk I mentioned above but there is an issue with decompiling/rebuilding it so can't fix it yet. Looking into it.
Did notice when decompiling and recompiling including resources it fails, when keeping resources intact it does work.
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Meh, been looking into it some more and also found this:
http://forum.xda-developers.com/android/software-hacking/how-to-recompile-tw-contacts-phone-t3066350
and
http://www.ez-pg.com/guide-how-to-decompilerecompile-lollipop-seccontacts.html
I tried modifying the manifest as instructed, but the apk still didn't work. Perhaps because signature verfication is not properly disabled on my rom. BUt if it isn't it is also not for the majority of the users in which case siumply supplying the apk wouldn't work anyway.
I also tried resigning the apk, no luck. Copying the original manifast is also not going to work afaik with a changed manifest file...
More info about signature verficiation:
http://forum.xda-developers.com/showthread.php?t=2725233
http://forum.xda-developers.com/showthread.php?t=2342262
Perhaps I will try this soon as well, but for now I think I'll leave it be...
sebdigital said:
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Click to expand...
Click to collapse
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
dagrim1 said:
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
Click to expand...
Click to collapse
I'm on 5.1.1 today and noticed that contacts/dialer is (almost) multi DPI already without having to do anything. And your camera mod works on 5.1.1 too!
Sent from my SM-G920F using XDA Free mobile app
can u change this Camera 480 dpi camera s6 to 420 dpi?
https://mega.nz/#!M4Ui0KoR!TKsPKkMl-XQHyiJ_DNf53eQCGZTrYWhuHaAnhAYXeSM
thanks you very much
can be used for other than s6 for SamsungCamera4. ??
my android device A8 6
dagrim1 said:
Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Click to expand...
Click to collapse
how to fix on parse error, after recompile SamsungCamera4.apk with apktool
with or without edit error on parse...
My device Galaxy-A8