signing modified touchwiz - Galaxy S 5 Q&A, Help & Troubleshooting

hii all..
I used to theme touchwiz for my S3 to look like s6..
after themeing I used to compile it with apktool and then zipalign and finally sign it with signApk..
it used to work fine..
Now I am trying to theme TouchWiz for my G900H.. but when I recompile, zipalign and sign the final apk as I used to do earlier it doesnt work.. Touchwiz doesnt install in recovery nor after I push it manually and set permissions..
where can be the problem ? what am I missing ?
P.S: I also used Advanced APK Tool v4.1 but same result..
please help if u can..
thanks

any help ??

Open the apk in 7zip, open original unmodified apk in 7zip as well, drag the unmodified apk's meta-inf folder to the modified one, should install now.
Sent from my SAMSUNG-SM-G900A using Tapatalk

Related

apktool compiling problem

Hi,
I use apktool and have a problem.
I sucessful decompile apk and get direcrory with app name.
When compile this directory (without change) I get apk file.
But apk file cannot install on phone!
What I do wrong?
I just decompile and compile without change and apk cannot install...
Help..
atlantisu21 said:
Hi,
I use apktool and have a problem.
I sucessful decompile apk and get direcrory with app name.
When compile this directory (without change) I get apk file.
But apk file cannot install on phone!
What I do wrong?
I just decompile and compile without change and apk cannot install...
Help..
Click to expand...
Click to collapse
What apk is it?
Some .apk's just will not install. I had an apk that compiled 1MB smaller, without change. Its not a perfect system.
Name is not important, but original file size is 1,376 MB
and compiled file size now is 1,372 MB
Where is 4KB?
Well I only asked the name incase it was one I myself had issues with or someone else had.
Now I just think you're doing something suspicious by answering.like that
4KB not as bad as 1MB. But you're still losing size which will be why it won't install.
Can't help any more than that I'm afraid. Except to say I have seen the issue before and never resolved it
Sent from my HTC Desire using Tapatalk
Suspicious
I tried more apk without sucess..beacause I dont tell a name.
Actual apk is BeoGSP-6.apk and there I lost 18KB...
I dont understand this compiler!?
Is there any another compiler with more working chance?
Can I export resource to Eclipse and make apk from here?
There is also APK manager. its pretty similar as far as I can tell.
There's APK Manager or APK Multi Tool which I use and both do the job quite well. I need APK Multi to decompile ICS or newer APK's and I use APK Manager 4.9 to decompile the APK's from the oxygen ROM.
If it decompiles and recompiles without errors then the only thing you might need to do is sign the APK. It won't install if it's a non-system APK and you haven't signed it.
APK Manager 4.9 option 16 signs the APK's so I just use that and if there're no errors it will sign and install fine.
Thanx! Works with APK Manager. This is a great thing!
I signed apk and now work

re-sign the official 4.0.4 framwork-res apk

i want to do some changes in my official 4.0.4 xperia Arc framwork-res apk i de-compile my framwork-res.apk changed it and re compile it successfully
problem is that after re-compile i lost the signature , now my framwork-res is not signed
i want to sign it back so it will not give me bootloop when i use it in to my rom
Please please any body can help me to re-sign it again :crying::crying::crying::crying:
I never sign mine, I always zipalign it though. But what I have used in the past is what's attached. Open a command prompt in the extracted folder and copy and paste the following in to it...
java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.apk framework-ress.apk
...and you'll have a signed framework-res apk, but obviously remove the second "s" from the new apk.
zohaib0001 said:
i want to do some changes in my official 4.0.4 xperia Arc framwork-res apk i de-compile my framwork-res.apk changed it and re compile it successfully
problem is that after re-compile i lost the signature , now my framwork-res is not signed
i want to sign it back so it will not give me bootloop when i use it in to my rom
Please please any body can help me to re-sign it again :crying::crying::crying::crying:
Click to expand...
Click to collapse
use meta-inf and android manifest ffrom original one
Inviato dal mio ST18i
Plus I just copy files from my recompiled framework in to the original before zipaligning and pushing to my phone.

[Q] Apk png change problem

I used vts for changing png of an apk (specifically that GS3 launcher made by Sam-rom)
after changing the png's i recompile it and then i install it manually with system app replacer , the install is successfull but the launcher is not installed.
I can manually install all the other versions but i have problems installing after i changed the pngs.
Decompile the apk with apk tool
Change pngs
Recompile
Sign apk
Put in flashable zip & flash with system mounted
Png must be the same file name & dimensions of the original
marcussmith2626 said:
Decompile the apk with apk tool
Change pngs
Recompile
Sign apk
Put in flashable zip & flash with system mounted
Png must be the same file name & dimensions of the original
Click to expand...
Click to collapse
I used vts for compiling/decompiling which uses apktool.
I signed the apk with mh mahadi's tool
Still the same prob
try this > decompile it then compile it back > sign it > zip it > flash it > It works without mods? Yes, then you're playing with .9.png images wrongly | No, there is a problem in apktool!

Apktool recompile error

While recompile systemui.apk i get "W:could not find source" . Even if i make no changes & recompile i get the same error.....Whereas i do not get this error while recompiling music.apk n memo.apk....
btw i imported framework res and tw framework res....any solution??
Sent from my GT-S5360 using Tapatalk 2
delroydsouza said:
While recompile systemui.apk i get "W:could not find source" . Even if i make no changes & recompile i get the same error.....Whereas i do not get this error while recompiling music.apk n memo.apk....
btw i imported framework res and tw framework res....any solution??
Sent from my GT-S5360 using Tapatalk 2
Click to expand...
Click to collapse
dont worry - its looking for some sources that are in a different apk for reference
the apk will still compile and work if all changes are correct
if you are using evo-x4 make sure you are using ics framework and not the one in the rom zip
also once you have recompiled delete the new apk
open then decompiled folder
unzip the orig apk with winrar
take out META-INF and AndroidManifest.xml
place this in your decompiled folder in build/apk
recompile the folder again
I got the same thing when I modded android.policy.jar

Edit the SystemUI_ZTE.apk?

Hi,
I want to edit the SystemUI_ZKE.apk, but when I use "APK Editor Pro" for instance the apk crashes after a reboot.
What would be the right way to do this? My goal is to delete the charging.ogg file that wakes my wife as I plugin a charger when I go to bed
Any other solution to *that* problem is welcome too.
I'm on a A2017G B06 btw.
Thanks in advance,
Cheers,
/Cacti
Edit: Sorry, wrong forum, should be posted in the Questions & Answers. @mods: please move it, thanks.
le_cactus said:
Hi,
I want to edit the SystemUI_ZKE.apk, but when I use "APK Editor Pro" for instance the apk crashes after a reboot.
What would be the right way to do this? My goal is to delete the charging.ogg file that wakes my wife as I plugin a charger when I go to bed
Any other solution to *that* problem is welcome too.
I'm on a A2017G B06 btw.
Thanks in advance,
Cheers,
/Cacti
Edit: Sorry, wrong forum, should be posted in the Questions & Answers. @mods: please move it, thanks.
Click to expand...
Click to collapse
You need to use apktool on Windows or Linux instead: https://ibotpeaches.github.io/Apktool/. You'll need Java already installed.
Your device also needs to be rooted and have TWRP recovery installed.
Put the apktool.jar and wrapper script in the system directory (C:\Windows on Windows)
Pull frameworks and SystemUI from your device with
Code:
adb pull /system/framework/framework-res.apk
adb pull /system/framework/framework-zte-res.apk
adb pull /system/priv-app/SystemUI_ZTE/SystemUI_ZTE.apk
Install frameworks to your computer:
Code:
apktool if framework-res.apk
apktool if framework-zte-res.apk
Decompile SystemUI_ZTE.apk:
Code:
apktool d SystemUI_ZTE.apk
Make whatever changes you want to make then recompile with:
Code:
apktool b SystemUI_ZTE
Use signapk.jar to sign the apk then put the apk into a flashable zip and flash to your device in TWRP.
If you want to make changes to smali you'll need to pull the SystemUI_ZTE odex file and deodex the apk with oat2dex and then use 7-zip or WinRAR to paste the classes.dex file into the apk before decompiling.
Gr8 tutorial. I'll try that tomorrow, hope I get it fixed. Thank you!
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
Hi,
*
Earlier I tried with APK Editor Pro (https://play.google.com/store/apps/details?id=com.gmail.heagoo.apkeditor.pro)
What happened was (after replacing the SystemUI_ZTE.apk with the modified APK) after a reboot the system booted with parts of the UI nog working. Navigationkeys didn't work except for the home button, and I had no status bar at all. After rebooting again it only showed my wallpaper, and no matter what I did it wouldn't show me anything else. So I had to restore.
*
Modifying the APK with the APKTool gave me the exact same result. Only thing i did differently as to bkores guide was I signed it using ZipSigner (but that never failed me before) and I just replaced the file using TWRP, instead of flashing it through an installer zip. But I can't imagine that being the problem?
*
Anyways, anybody able to modify the SystemUI_ZTE.apk? All I need is the B06 (A2017G) with a replaced charging.ogg (with only silence).*Any tips are welcome.
*
TIA,
*
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
le_cactus said:
Hi,
*
Earlier I tried with APK Editor Pro (https://play.google.com/store/apps/details?id=com.gmail.heagoo.apkeditor.pro)
What happened was (after replacing the SystemUI_ZTE.apk with the modified APK) after a reboot the system booted with parts of the UI nog working. Navigationkeys didn't work except for the home button, and I had no status bar at all. After rebooting again it only showed my wallpaper, and no matter what I did it wouldn't show me anything else. So I had to restore.
*
Modifying the APK with the APKTool gave me the exact same result. Only thing i did differently as to bkores guide was I signed it using ZipSigner (but that never failed me before) and I just replaced the file using TWRP, instead of flashing it through an installer zip. But I can't imagine that being the problem?
*
Anyways, anybody able to modify the SystemUI_ZTE.apk? All I need is the B06 (A2017G) with a replaced charging.ogg (with only silence).*Any tips are welcome.
*
TIA,
*
Cheers,
/Cacti
Click to expand...
Click to collapse
Try copying META-INF folder from old apk to new apk. If that doesn't work try copying resources.arsc from new apk to old apk and flash the old apk. Don't sign
Can it have anything to do with the .odex file?
I'll try the meta-inf thingy and see if that works
Cheers,
/Cacti
Sent from my ZTE A2017G using XDA-Developers Legacy app
Actually try this instead. I think the apk needs to be deodexed before it can be modified like you said.
Pull the odex file
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI.odex
Get smali folder from the odex file with oat2dex.jar here: https://github.com/testwhat/SmaliEx/releases/tag/snapshot
Open command window in directory of odex file
Code:
java -jar oat2dex.jar smali SystemUI.odex
Decompile the apk and then copy and paste the smali folder into the directory of the decompiled apk.
Make your charging.ogg change and then recompile the apk. Copy and paste the META-INF from original apk to new apk.
Push apk to your device and delete the "oat" folder in the SystemUI_ZTE folder on your device.
Hi,
Thank you for your support so far, but that didn't work out eighter....
bkores said:
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI.odex
Click to expand...
Click to collapse
Assuming you made a typo (since there is no SystemUI.odex) I used this instead:
Code:
adb pull /system/priv-app/SystemUI_ZTE/oat/arm64/SystemUI_ZTE.odex
bkores said:
Get smali folder from the odex file with oat2dex.jar
Click to expand...
Click to collapse
After the oat2dex command I don't have a smali folder, just 5434 smali files scattered over serveral folders, so I don't know how to proceed from there.
Cheers,
/Cacti
le_cactus said:
Hi,
Thank you for your support so far, but that didn't work out eighter....
Assuming you made a typo (since there is no SystemUI.odex) I used this instead:
After the oat2dex command I don't have a smali folder, just 5434 smali files scattered over serveral folders, so I don't know how to proceed from there.
Cheers,
/Cacti
Click to expand...
Click to collapse
Well then create a folder called smali in the directory of decompiled apk and paste the folders into smali
Can someone help me, i want to change framework.jar but there is no classes.dex in jar nor framework.odex in /system/framework/oat/arm64 (also arm). Because of it i can't decompile it with smali/baksmali tool. I want to change volume steps in AudioService exactly what VolumeSteps+ do but without Xposed. Any help? I'm on Nougat B10 Rom.
SkaboXD said:
Can someone help me, i want to change framework.jar but there is no classes.dex in jar nor framework.odex in /system/framework/oat/arm64 (also arm). Because of it i can't decompile it with smali/baksmali tool. I want to change volume steps in AudioService exactly what VolumeSteps+ do but without Xposed. Any help? I'm on Nougat B10 Rom.
Click to expand...
Click to collapse
Perhaps this can help a bit : https://forum.xda-developers.com/axon-7/themes/a2017-volume-steps-enabler-call-media-t3745747
If you want a decompiled framework, I can send you. Just pm me.
If you want I'll implement your mods and recompile again. Up to you to test
raystef66 said:
Perhaps this can help a bit : https://forum.xda-developers.com/axon-7/themes/a2017-volume-steps-enabler-call-media-t3745747
If you want a decompiled framework, I can send you. Just pm me.
If you want I'll implement your mods and recompile again. Up to you to test
Click to expand...
Click to collapse
I solved a problem, AudioService is not in framework.jar anymore, it's on services.jar. Check my post on your mentioned thread.

Categories

Resources