开发者

Build .APK after editing with dex2jar and jd-gui?

I have used dex2jar with the help of THIS tutorial to extract .class files, a开发者_如何学Gond used jd-gui to view the classes. but I cant edit in jd-gui so, through jd-gui, I "Saved All Resources", now I have a .zip with .java classes so I edited them with a Notepad++. So now I have a .zip with all the classes in .java and I edited what I wanted, how do I build back everything to a .apk to install to the phone? Is this the wrong way to edit a .apk?

Thanks.


If the decompiler does not decompile all correctly (in fact with obfuscation you'll never get a code without errors) you can't recompile the code...

If you edit the classes into eclipse, you'll see that there are a bunch of errors and a bunch of $NameClassNumber and other stuff.

Maybe you can edit than repackage some resources, but the code not (luckily).


I have never had good results of dex2jar.

I extract the dex file from the jar with 7-zip, then use baksmali http://code.google.com/p/smali/ to decompile the dex file to ".smali" files (not as easy to understand as class files but it's manageable), and then use smali (included with baksmali) to recompile. Use 7-zip again to put the new classes.dex file back in the jar and done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜