[Q] question about (de)compile... - Nexus S Q&A, Help & Troubleshooting

I'm getting this issue:
I got Settings.apk and framework.apk from a rom, then i opened apktool and
1) imported fw: apktool if framework.apk
2) decompiled apk: apktool d Settings.apk
3)edited a string in a xml
4) rebuilt all: apktool b Settings Settings.apk
5)pushed it into system/app
6) fix permissions and reboot.
Settings now should work, but it doesnt. Can somebody tell me where i do a mistake?
Thank you
(I used win8, but i could use macos or ubuntu as well)

sign it first

ej8989 said:
sign it first
Click to expand...
Click to collapse
I did it. same result. maybe the application I used is not good (Auto-Sign v0.65). what application i've to use?
I didnt write it before, however the rom is on 4.2.1 (cyanogen 10.1)

put your re-complied apk to your phone's sd card and use zipsigner2 from playstore to sign it.

ej8989 said:
put your re-complied apk to your phone's sd card and use zipsigner2 from playstore to sign it.
Click to expand...
Click to collapse
Nothing. Maybe this is not good for 4.2.1? (I've used it lots of times with 4.1)

Well, apktool is using smali/baksmali to compile/decompile classes.dex/apk_name.odex file.
The problem can occur when you use different baksmali version when you decompile and also not the right version to compile (as the system expects it to be). You can also experience issues if the apk is not zipaligned properly (check down who to do that)
apktool has the smali/baksmali code inside it so you will need to get the newest version for it for JB for example.
You can check why the status bar is not there when you monitor the logcat and look for DEX related logs in the beginning.
You can also use smali/baksmali on your own: http://code.google.com/p/smali/wiki/DeodexInstructions
and just place the generated classes.dex in the apk
then zipalign -f 4 filein.apk fileout.apk (http://developer.android.com/tools/help/zipalign.html)
then push back fileout.apk (sytemui.apk in your case)
Sent from my Galaxy Nexus using xda premium

Related

Themeing and CWM FLashable File

Hey guys/girls. I'm creating a theme for Andromeda 3 and one thing I cannot fifure out is how to make my theme CWM flashable to test it.
I opened the zip from a different flashable theme, replaced the framework-res.apk and twframework-res.apk with the modified ones from Andromeda and repackaged them using Winrar. I have followed the guides to resign the APK's and ZIP but no mater what I do, after a reboot I get a solid black screen and the phone vibrates.
Im not sure what I am doing wrong because I thought that was all that went into creating a CWM file.
Thanks in advance......
7 posts under this one
http://forum.xda-developers.com/showthread.php?t=1037842
the meta info is alot more specific than just swap any other files...
Thanks, I found that one about 5 mins ago but couldn't seem to find it when I searched the forum before posting. Must have missed it
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Actually, I'm just opening the apk's with winrar. I make the changes to the folders/files and rezip them with Winrar with Store mode (no compression?) Then I resign them with testsign.jar.
I have read the themeing guides but they are really lacking in the small details dept.
modest_mandroid said:
Should also point out that if you're decompiling the framework apks with apktool, modifying any of the xml's or code, and recompiling, you'll need to sign the resulting apk or you'll end up with a boot loop.
Click to expand...
Click to collapse
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
If you are simply copying over files inside the apk and getting this error, then you are adding more files than was originally inside the apk. I repeat, DO NOT ADD FILES THAT ARE NOT ALREADY INSIDE UNLESS YOU KNOW HOW TO RE-COMPILE THE RESOURCES.ASRC!
Also, use 7-zip to edit apks when you just want to overwrite files. Never unzip, or re-zip. Just right-click > 7-zip > Open Archive > Drag and drop files > close the window > you're done
Edit: Also, this goes in Q&A not General.
Click to expand...
Click to collapse
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
ryude said:
Wrong.
Never resign system apks such as framework-res or twframework-res. His problem has nothing to do with the signature.
Click to expand...
Click to collapse
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
modest_mandroid said:
I didn't say anything about resigning? Apktool creates an entirely new, unsigned apk, which unless I'm extremely mistaken you'll need to use if you intend to modify certain resources.
Click to expand...
Click to collapse
He doesn't need to use apktool, because he isn't edited any code.
timbrendelaz said:
Ok, thanks man.
Will I need to resign the final theme.zip before flashing it?
Also, can't I just grab the updater-script from another theme.zip and us it in my mine?
Click to expand...
Click to collapse
No, you don't have to sign CWM zips because Clockwork doesn't check for a signature.
You could use another updater-script, but the problem with that is if it tries to perform an action on a file or folder that isn't inside your zip it will crash while flashing. You'll be left with a bricked phone and have to ODIN back to restore.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
TXLunchbox said:
But what if he is lol? Cause that's what im trying to do and having some issues. Know of a good thread on this? Editing xml that is
Sent from my SGH-T959 using XDA Premium App
Click to expand...
Click to collapse
If you're editing code, I recommend using apk manager since it will automatically recompile the resources.asrc for you. Just make sure to downgrade the apktool that comes with it to 1.3.1, 1.3.2 is known to cause problems with xml edits.
1. Set new project apk.
2. Decompile apk, if it's a system apk use the option for dependency apk and use twframework-res.apk as the dependency apk.
3. Edit your xml files.
4. Recompile, when asked use yes twice. It will tell you to delete files in the Keep folder.
5. Delete the resources.asrc if you edited any xml/added new files. Delete the files that you added/edited.
6. Once you're done it will automatically copy over the signature and use the compression that you set (default level 9, I recommend level 0).
Don't worry that it says "unsignedFramework-res.apk", it will work since it's a system apk because system apk signatures get copied over to the new file. Just rename it to Framework-res.apk or whatever you need it to be called.
ryude said:
He doesn't need to use apktool, because he isn't edited any code.
Click to expand...
Click to collapse
Hence the 'if' in my original statement, you know, 'if' he ever chose to in the future.

Need someone to compile an APK for me

Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Thanks!!
Here's what I need compiled:
http://mikelierman.com/SystemUI.apk.zip
Click to expand...
Click to collapse
What did you use to decompile it? APK Manager from this thread?
http://forum.xda-developers.com/showthread.php?t=695701
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
0vermind said:
Alright, so I decompiled the apk, edited the XML files I needed to. And now it won't compile. Keeps throwing java errors. Would someone be so kind to compile this for me?
This is a System APK so it needs to be compiled and signed. If you're curious or it needs extra files pulled from somewhere, it's the SystemUI.apk in the CM7 Droid nightly build 88.
Click to expand...
Click to collapse
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
mazdarider23 said:
Oh and once you compile it, you don't have to sign it because is a system app and not a regular app.
Click to expand...
Click to collapse
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
MongooseHelix said:
What errors are you getting from apktool? It's going to be hard for someone else to compile an apk that has not been decoded by them and not knowing what files have been changed. Letting us know at least what .png or .xml files were modified would be a start but will work best if we could just figure out why you aren't able to build with your modifications.
The first thing I noticed from the zip you attached is that it's missing the apktool.yml file that should get created a package is decoded. Second, make sure to pull /system/framework/framework-res.apk so resources can be decoded/built properly. If you are using APK Manager, use option 10 to decode with framework-res.apk. If you are just using apktool run the command "apktool if framework-res.apk" before decoding.
SystemUI.apk actually does get signed using the platform key. The easiest way to do so in my opinion is to use ZipSigner 2 on your phone. Also, once you've placed the modified SystemUI.apk into /system/app make sure it's permissions are rw-r--r--(chmod 644 /system/app/SystemUI.apk) and it's owner:group is root:root(chown 0:0 /system/app/SystemUI.apk). Next reboot to recovery, wipe dalvik-cache and cache, then reboot.
Click to expand...
Click to collapse
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
mazdarider23 said:
Well I'm glad you told me because little old me has been modifying system apps since the days of the nexus one and I've yet to sign one....I think is all depends on who's doing the modification...hahahaha....Good luck 0vermind on finding someone to compiling your systemui.apk!
Click to expand...
Click to collapse
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
MongooseHelix said:
I'm not quite sure what to make of that comment...I certainly wasn't trying to step on your toes so I apologize if it came across that way. Just wanted to help avoid and rule out any issues that might come up. With APK Manager or by using 7zip, you can move the manifest and/or META-INF folder containing the signature from the original but to imply that system apps are not signed is incorrect.
I also think it is important that those messing with system apps understand that there are different keys used to sign apps. For anybody reading this that wants to figure out how certain packages are signed, here's a bit of an explanation. If we extract SystemUI.apk, we see a directory called META-INF. This holds the key/signature info. The key's serial number can be determined with the following command:
Code:
keytool -printcert -v -file SystemUI/META-INF/CERT.RSA | grep SerialNumber
You can check other apks/jars and noticing which have matching serial numbers, meaning they are signed with the same key...
platform key - SystemUI.apk, Settings.apk, Phone.apk, etc
shared key - Contacts.apk, UserDictionaryProvider.apk, etc
test key - Calendar.apk, DeskClock.apk, etc
google proprietary key - Vending.apk, Talk.apk, etc (including some market user apps like Maps, VoiceSearch, Docs)
Click to expand...
Click to collapse
Thanks, I didn't know this! I'm glad there's people like you and mazdarider23 on this forum that know **** like this!!!

(GUIDE) How to use Apktool Apk manager Baksmali and Adb

Hello Guys....
Just been watchin around our forum and The Galaxy Fit Development Group in FB and came to know that many are not able to decompile, compile, using apktool and apk manager !!! And few are not able to use the baksmali tool and even Android debugging bridge (ADB) So Decided to make a Guide on How to use all these
The tools required are attached along with this file...
So here we go....
[How To Use APK Tool]
If you're using apktool for the first time thn
Place framework-res.apk and twframework-res.apk from STOCK Firmwares (Do not take it from Custom ROM )
Thn open command prompt in the current window and type the following code
Code:
apktool if framework-res.apk
apktool if twframework-res.apk
The Dependencies would be installed in apktool folder in C:\Users\USER NAME\apktool\framework and also check if u hav 1.apk and 2.apk present inside the folder
Decompile And Compile Apk's Using apktool
Place the apk file that u wish to decompile in the downloaded apktool folder
Open command prompt in the current window and type the following code
Code:
[To Decompile] apktool d "apk name.apk"
[To Recompile] apktool b "apk name"
Example:
Code:
[To Decompile Mms.apk] apktool d Mms.apk
[To Recompile Mms.apk] apktool b Mms
The Compiled apk would be in "dist folder" inside the "decompiled folder"
[How To Use APK Manager]
Always use apktool to install dependencies even if u r gonna use apk manager
Place the apk tat u wish to decompile in "Place here for modding folder"
Open Script.bat in the folder and Press 9 to decompile and 11 to recompile
The decompiled folder would be in "Projects" folder and recompiled apk would be in "place here for modding folder"
[How To Use Baksmali]
Smali/Baksmali is an assembler/disassembler for the dex format used by Dalvik
The names "smali" and "baksmali" are the Icelandic equivalents of "assembler" and "disassembler" respectively
Smali Editting can be done through apk tool as well as apk manager but all those needs experience and practice
Place either the .apk or .jar file who's dex u want to decompile in that baksmali folder
Right click and Edit 1.bat using notepad++
Code:
java -jar baksmali.jar -x "filename"."file extension" -o classout
Example:
Code:
[To Decompile Mms.apk] java -jar baksmali.jar -x [B]Mms.apk[/B] -o classout
[To Decompile android.policy.jar] java -jar baksmali.jar -x [B]android.policy.jar[/B] -o classout
U would get a folder called classout
Make necessary changes and to compile back just press 2.bat
U would get classes.dex in the current folder
Replace this classes.dex with the classes.dex in the unmodded file
[How To Use ADB]
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device
With this adb u would be able to push pull files from your mobile, Logcat and much more
I would explain only the basic that is used most often that is pullin and pushin of files
Place the file tat u r about to push into the ADB folder
Code:
[To Push system apps] adb push "[B]apk name".apk [/B]/system/[B]app[/B]/[B]"apk name".apk[/B]
[To Push system framework files] adb push [B]"name".jar[/B]/system/[B]framework[/B]/[B]"name".jar[/B]
[To Push files to your SD Card] adb push [B]"filename.extension"[/B] /sdcard/
Example:
Code:
[To Push Mms.apk] adb push Mms.apk /system/app/Mms.apk
[To Push android.policy.jar] adb push android.policy.jar /system/framework/android.policy.jar
[To Push files to your SD Card] adb push Readme.txt /sdcard/
Credits:
Google
And to all those who taught me [How To Use These]
Tools
Reserved
Rooting
Sorry, I know this is not the right thread to post this..
But i need help
I am a newbie and never had rooted my android phone... I know that there had been many threads about rooting this phone..but i am a little afraid about bricking my phone..that's why i am asking again..
The specs of my phone are given in the attachment...Please give a guide on rooting and unrooting my phone..
Akshit97 said:
Sorry, I know this is not the right thread to post this..
But i need help
I am a newbie and never had rooted my android phone... I know that there had been many threads about rooting this phone..but i am a little afraid about bricking my phone..that's why i am asking again..
The specs of my phone are given in the attachment...Please give a guide on rooting and unrooting my phone..
Click to expand...
Click to collapse
May be u should try using the search option next time...
but since u asked for it
http://forum.xda-developers.com/showthread.php?t=1606380
Really good guide mr.wilfred...
Want to ask something about compile and decompile apk from ICS version... what tool I need to compile and decompile it? And which version?
Thank you....
Sent from my GT-S5670 using Tapatalk 2
AldoSebastian said:
Really good guide mr.wilfred...
Want to ask something about compile and decompile apk from ICS version... what tool I need to compile and decompile it? And which version?
Thank you....
Sent from my GT-S5670 using Tapatalk 2
Click to expand...
Click to collapse
A seperate version of Apk tool has been made and i saw it few days back in xda only.... I would let u know if i get that link... ^_^
http://www.xda-developers.com/android/modified-apktool-for-android-4-0-4/
this is the one for ics apks
unable to compile using your method
Avilove.Cullen said:
unable to compile using your method
Click to expand...
Click to collapse
which are u talking abt.......apks dexes or jar files........
Avilove.Cullen said:
unable to compile using your method
Click to expand...
Click to collapse
Thn u would hav done any error....
btw... wat was the error u got...
Avilove.Cullen said:
unable to compile using your method
Click to expand...
Click to collapse
Hey Avi from personal experience,.. I found out something none of these guides tell us !
U need to put a file called aapt in apkmultitools/platformtools/ for u to compile properly in some computers,..!
I had an error which read as
java.io.exception : cannot run command [aapt ....blah blah blah]
if this is the same error,.. just put the right aapt file,..
also,.. to mod JELLY BEAN apks,.. all u gotto do is put the latest aapt that u can download using Android SDK,..
Havent tested whether it works .. but saw that some did succesfylly decompile using this method (no not in xda,.. in some other forum,.. )
I did all this and I get a folder with all the this stuff in it with smali extentions. I was wondering how do you actually look at the code of the apk and program it self. The reason why I want to look at the code is to see apps are written; the best way I know how to is by looking at code and figuring it out.
brievolz84 said:
I did all this and I get a folder with all the this stuff in it with smali extentions. I was wondering how do you actually look at the code of the apk and program it self. The reason why I want to look at the code is to see apps are written; the best way I know how to is by looking at code and figuring it out.
Click to expand...
Click to collapse
FYI smali's are dalvik opcodes... u can use dex2jar to view the smali in java language which is easier wen compared to smali... and to under these languages u would hav to learn java or hav xperience and interest too
need a recommendation for APK Tool
Hi, I have a i9305 SG3 using a custom ROM Jellybean Ver 4.1. I want to learn how to decompile, edit, and recompile code in my SystemUI.apk file. I know I need an APK tool/manager of some sort. However, after looking through your thread (and looking into other research on google) I wasn't able to find conclusive evidence on WHAT the name of a stable APK Program is and WHERE to get it.
*
I am using Windows 7 64x PC and want to learn how to edit APKs. I have appreciated reading your threads and hope to learn more. I need to find the right APK software to start with. Suggestions please....
droido123 said:
Hi, I have a i9305 SG3 using a custom ROM Jellybean Ver 4.1. I want to learn how to decompile, edit, and recompile code in my SystemUI.apk file. I know I need an APK tool/manager of some sort. However, after looking through your thread (and looking into other research on google) I wasn't able to find conclusive evidence on WHAT the name of a stable APK Program is and WHERE to get it.
*
I am using Windows 7 64x PC and want to learn how to edit APKs. I have appreciated reading your threads and hope to learn more. I need to find the right APK software to start with. Suggestions please....
Click to expand...
Click to collapse
Hey there..... Hello..... U can either use apk manager or apk tool to decompile nd recompile apk's ... But as far as i know ICS rom's had different dependencies hence a diff version of apktool wer required .... since your rom being jelly bean ,As a wild guess, it MAY hav certain problems as such in ICS's ROM's ..... The best solution is either ask a fellow dev from your community who has been decompilin/recompilin apps or else there's always a better partner ( google ) .....
Sent from my GT-S5670 using XDA
Hey wilfred for decompiling app from custom rom like cm7 should we still use stock framework first??
MajinSaiyan4 said:
Hey wilfred for decompiling app from custom rom like cm7 should we still use stock framework first??
Click to expand...
Click to collapse
nop.... use CM7 framework-res.apk !!!
wilfredcool007 said:
nop.... use CM7 framework-res.apk !!!
Click to expand...
Click to collapse
Ok thnx but i had problems recompiling systemUI.apk with apktool even without any modifications sry cant post error right now im on phone..
MajinSaiyan4 said:
Ok thnx but i had problems recompiling systemUI.apk with apktool even without any modifications sry cant post error right now im on phone..
Click to expand...
Click to collapse
Did u delete the public.xml before u could recompile ??? if so u wouldnt hav got any error.... to be on the safer side send me the error tat u get....
wilfredcool007 said:
Did u delete the public.xml before u could recompile ??? if so u wouldnt hav got any error.... to be on the safer side send me the error tat u get....
Click to expand...
Click to collapse
Uh is it necessary to del public.xml??ok i wil try when im on pc..actually i was trying jellybean layout mod but i was unsuccesful

[HELP][DECOMPILING] I can't install/use the modded apk

Hi, okay guys, i wanna ask something. I was able to decompile, recompile, sign apk (using 7-zip) last year. Then, somethings happened to my laptop. I have to install a new windows 8.
All i have done is :
1) Installing JRE 7u45 64 bit and JDK 7u40 64 bit
2) Pulling SemcGenericUxpRes.apk, installing it by typing on the command "apktool if SemcGenericUxpRes.apk"
3) Pulling framework-res.apk, installing it by typing on the command "apktool if framework-res.apk"
4) Decompiling some app. After that, i typed on the command "apktool b XXX" where XXX refers to the decompiled folder
5) Drag and Drop the META-INF folder from the original to the new one
6) Pushing to my Xperia Miro. But the app doesnt show up on the launcher
7) When i recompile SystemUI.apk, signing it, then pushing it to system/app, setting the permissions, then using Restart SystemUI app, its worked. But after i restarted my phone, my SystemUI is gone
Does anybody here have the same problem with me?
Here is my Specification of my laptop :
Acer Aspire E1 -471G
Windows 8 64 bit version
JRE and JDK installed as ive told you above
Apktool, tried from version 1.5.1PR2 until 1.5.2 version
7-zip version 9.20 64 bit version
Winrar version 5.00 64 bit version
The last time i was able to recompile and use the modified apk was one year ago. The specification is same like above. Help me, please! :crying:
Did you sign your new apk?
PulseDroid said:
Did you sign your new apk?
Click to expand...
Click to collapse
Hi, thanks for your reply. Okay, in this post : http://forum.xda-developers.com/showthread.php?t=2011325 its showed me to copy the META-INF folder. And ive already copy that folder. Its failed to install in my phone. I tried using Adb Install xx.apk but shows me this :
"Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]"
And when i push it manually to /data/app/ or /system/app/ it doesnt showed up to my launcher.
Ive tried to zipalign it, but still error. So, what is wrong with my phone?
What certificate did you use in Zipalign?
Certificate from the original apk. Drag and Drop the META-INF folder using 7-zip
Skip the META-INF copy step.
Rather use this
Okay, ive downloaded the application.
So, ive just decompiled the SystemUI.apk. Which one should i select? Thanks for your help

[Resolved] How to sign an apk

HI!
I have a problem with an apk i am trying to edit. So i have an apk that i changed from .apk to .zip and then opened it with WINRAR to replace original PNGs with new PNGs becouse i didnt like them haha (i kept the same name). then i changed extension back from .zip to .apk and when i tried to install it on my phone (Xperia Miro ICS) it gave me an error. Please help me, what can I do? :good:
jaka_music said:
HI!
I have a problem with an apk i am trying to edit. So i have an apk that i changed from .apk to .zip and then opened it with WINRAR to replace original PNGs with new PNGs becouse i didnt like them haha (i kept the same name). then i changed extension back from .zip to .apk and when i tried to install it on my phone (Xperia Miro ICS) it gave me an error. Please help me, what can I do? :good:
Click to expand...
Click to collapse
except system apk, you must sign it. Using apk editor is easier if you only change .png.
[email protected] said:
except system apk, you must sign it. Using apk editor is easier if you only change .png.
Click to expand...
Click to collapse
Thanks, but how do I sign it?
jaka_music said:
Thanks, but how do I sign it?
Click to expand...
Click to collapse
just gogling guys, or find here in xda. Many tools for that: apkmanager, apktool etc (via pc) or apkeditor, ninjamorph etc (via device)
How to sign apks
How to sign an apk file & make a flashable zip without PC
pySignare - Quickly Sign APKs (Windows)
Signing and zipaligning your app (Using eclipse or android studio)
Found it
Netherlander said:
How to sign an apk file & make a flashable zip without PC
pySignare - Quickly Sign APKs (Windows)
Signing and zipaligning your app (Using eclipse or android studio)
Click to expand...
Click to collapse
Thank you but i found very easy way to sign it. Heres how:
Instruction :
1) Download Attached "SignApk.rar"
2) Unrar "SignApk.rar" to any folder
3) Copy your apk to be signed to SignApk dir
4) Open command Prompt and go to SignApk dir
5) Type the following command:
java -jar signapk.jar certificate.pem key.pk8 your-app.apk name-off-signed-app.apk
or
signapk.jar certificate.pem key.pk8 your-app.apk name-of-signed-app.apk

Categories

Resources