Assalamualaikum... Adik, Abang, Encik, Bro, MINTAK SETTING ...
It works now!. Here is a ( more or less detailed ) how to debug Smali Code with APK-Tool ... YOU NEED - Dont Try THIS at LUS + RC ( .MY Zellower )
1. Apk-tool 1.4.1 and NetBeans 6.8. Use these versions, not the latest ones! Currently, the latest versions of apk-tool and NetBeans do not allow to debug Smali code.
2. Java, JDK and other stuff installed in your system to make Apk-tool and NetBeans working
The step-by-step instruction:
1. Decode your .apk file to out directory, use -d option:
2. java -jar apktool.jar d -d my.app.apk out
3. Add android:debuggable="true" attribute to <application> section in out/AndroidManifest.xml file.
4. Build out directory to .apk file:
5. java -jar apktool.jar b -d out my.app.to.debug.apk
6. Sing and install my.app.to.debug.apk to the Android device used for debugging
7. Delete out/build folder
8. Run NetBeans, click "File" -> "New Project". Choose "Java"->"Java Project with Existing Sources". Click "Next".
9. Specify out as "Project Folder". Click "Next".
10. Add out/smali folder to the "Source Package Folder" list. Click "Next" and then "Finish".
11. Start my.app.to.debug.apk on the device, run DDMS, find your application on a list and click it. Note port information in last column - it should be something like 86xx / 8700".
12. In Netbeans, click "Debug" -> "Attach Debugger" -> select "JPDA" and set "Port" to 8700 (or whatever you saw in previous step). Rest of fields should be ok, click "OK".
13. Debugging session should start: you will see some info in a log and debugging buttons will show up in top panel.
14. Set breakpoint. You must select line with some instruction, you can't set breakpoint on lines starting with ".", ":" or "#".
15. Trigger some action in application. If you run at breakpoint, then thread should stop and you will be able to debug step by step, watch variables, etc.
The Zello "Jet Fighter" have been everywhere !!! . GET IT NOW.
BigThanksToTheArticleEditor + APK-Tool + NetBeans
by Dima Kovalenko ( Zello PTT Jet Fighter – Accomplished – ThankYou )