How do you decompile, edit in eclipse and recompil

2020-06-04 05:15发布

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:

  1. Decompile using apk manager (command 9)
  2. That created a folder in projects with all the files
  3. In eclipse I made a new android project, and chose, "use existing source", chose the folder it was in and imported.
  4. All the files appeared in the project folder and I could edit them.
  5. I made all the relevant changes (not touching the manifest.xml file)
  6. I went to file>export and chose Export android app
  7. Went through the steps about keys and everything
  8. Output file created with no errors
  9. I transferred the file to my android phone
  10. Opened it, it installed
  11. 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条回答
贪生不怕死
2楼-- · 2020-06-04 05:38

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.

查看更多
登录 后发表回答