7

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

Abdul Rahman
  • 2,097
  • 4
  • 28
  • 36
cnfw
  • 770
  • 2
  • 11
  • 28
  • did you sign the apk with the same key that you used when you put it in the marketplace? – Paul Nikonowicz Feb 07 '12 at 21:46
  • 1
    Trying debugging it and giving us the logcat output for the error. – Flynn Feb 07 '12 at 21:50
  • unlikely you can decompile it and have it make any sense since Android uses proguard to prevent people from doing just that. Now if the apk is not obfuscated then you may be able to. – Ali Feb 07 '12 at 21:52
  • Why do you need to decompile the apk to do this? If you were the one that created it wouldn't you have the project folder with all of the resources that you could edit and compile an entirely new apk? – FoamyGuy Feb 07 '12 at 22:06
  • I didn't create it, I just need to modify the one I got from the market to work better on my small screen – cnfw Feb 07 '12 at 22:28
  • It isn't my app, I just need to modify it, for personal uses only (I respect copyright) – cnfw Feb 07 '12 at 22:28
  • 2
    If it isn't your app, DO NOT modify it. It's unethical and probably illegal. – Bill Gary Feb 07 '12 at 23:33

1 Answers1

4

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.

  • This is the only APK Signer that worked for me, I've been stuck on this step for many days. Thank you! – KickAss Jun 20 '14 at 18:33