-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toDex: "check-cast on non-reference in v0" with k9mail APK #35
Comments
The verifier error is not reproducible with the most current version of K9 Mail and Soot, but something else seems to go wrong. Directly on launch, the app dies with an IllegalArgumentException while initializing com.actionbarsherlock.ActionBarSherlock. |
Looking into the issue a bit more, the exception is raised because method "registerImplementation(java.lang.Class)" which is called inside the static initializer of ActionBarSherlock checks for an annotation (java.lang.Class.isAnnotationPresent) on the class it receives as an argument. However, all annotations are lost somewhere in the process. I'm currently not sure how Soot handles annotations in general - checking back with @ericbodden on that topic. |
I cannot reproduce this bug with the latest version of Soot and an emulator running Android 2.2. |
@Alexandre-Bartel This is still an open issue for the same reason I stated above. I have just tested it once again on a real phone running Android 4.3. Presumably there's little other chance than implementing the missing support for annotation in Dexpler. |
@StevenArzt Which version of the app are you using? http://code.google.com/p/k9mail/downloads/list |
@Alexandre-Bartel It's 4.409. I've sent the file I have on my disk (and that definitely fails) to you via e-mail. |
@StevenArzt Annotations are now supported and 4.409 seems to work with the latest version of Soot. Could you confirm? |
Great, the annotations are now preserved. Thank you, @Alexandre-Bartel |
As reported by Shengqian on the Soot-list, running an APK from k9mail through Soot without modifications produces an APK with an invalid opcode or register state. The generated APK yields a VerifiyError if installed on an emulator for Android 2.2:
Unfortunatelly, I cannot reproduce this with my emulator, with runs Android 4.0.3.
Usually when this error message appears, one can hunt down the cause of the bug by inspecting the generated APK with baksmali. Disassembling the APK with register information (use "--register-info ALL" and "-d dir" where dir points to android's {core,framework,...}.jar) should show the instruction at which the register v0 is filled with a non-reference. Follow the control-flow backwards from the instruction at 0x0959 in the method Lcom/android/email/MessagingController;.synchronizeMailboxSynchronous (Lcom/android/email/Account;Ljava/lang/String;)V. I guess that the check-cast itself is correct, but some other instruction is not.
The text was updated successfully, but these errors were encountered: