问题
I have this application from the market in an apk format, but I want to tweak it a little bit to fix some issues I have with a small screen, I know the code ok but it's getting to the point of editing the code that's the problem
What I have tried before:
- Decompile using apk manager (command 9)
- That created a folder in projects with all the files
- In eclipse I made a new android project, and chose, "use existing source", chose the folder it was in and imported.
- All the files appeared in the project folder and I could edit them.
- I made all the relevant changes (not touching the manifest.xml file)
- I went to file>export and chose Export android app
- Went through the steps about keys and everything
- Output file created with no errors
- I transferred the file to my android phone
- Opened it, it installed
- When open it from the menu, I get an immediate force close error
Everything seems to be going good until that point, I have tried it on other phones, same problem.
What I would like to know is the proper way of editing apks so that they will work again.
I have searched everywhere on the internet about editing apk's but I can't find a good answer so I was hoping that someone here would give me a soloution.
Thanks
回答1:
Before installing it to your phone, you actually need to sign the app. This can be done by downloading appsign.apk file and it has a little bit procedure to do. First download the SignAPK tool - http://www.mediafire.com/?rw57ftajd6nm81s Extract them to a directory you will remember. I have put them in C:\SignApk
Now just open cmd and type - Quote
cd C:\SignApk java -jar signapk.jar certificate.pem key.pk8 your-app.apk your-app-signed.apk
Example -
java -jar signapk.jar certificate.pem key.pk8 D:\nfsshift\dist\nfsshift.apk D:\nfsshift\dist\nfsshift-signed.apk Your APK is signed and can be installed.
来源:https://stackoverflow.com/questions/9184419/how-do-you-decompile-edit-in-eclipse-and-recompile-an-apk-step-by-step