I can confirm that the only thing that worked for me was to add martin.scott4’s set-debug-mode stuff to build.xml, and then manually sign it using jarsigner:
jarsigner -verbose -keystore home/.android/debug.keystore pathto/myapp-debug.apk androiddebugkey