$ adb install ~/sandbox/HelloAndroid/bin/HelloAndroid-debug.apk
123 KB/s (6758 bytes in 0.053s)
pkg: /data/local/tmp/HelloAndroid-debug.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
To do the install, you need to do two things. First, create a signed apk file, then copy it over. The signing process is straightforward once you have got your debug keyring set up correctly. For some reason my setup on ubuntu (32 bit) didn't work out right after installing the dev kit and trying to use the eclipse plugin. The debug keyring was unusable, so I deleted it and recreated it.
rm ~/.android/debug.keystore
/usr/lib/jvm/java-6-sun/bin/keytool -genkey -v -keystore ~/.android/debug.keystore -alias androiddebugkey -keyalg RSA -validity 100000 -storepass android -keypass android
Turns out the debug keystore is expected to have both a keystore and key password of android. Then the build scripts work. This command sets up the keystore so that the ant build script will create signed debug apps. However, as a separate problem, the Eclipse Android plugin doesn't generate the ant script.
Even though the plugin supposedly wraps the command below, I ran it again on my source directory and it created the ant files.
$ ${android-sdk}/tools/activitycreator --out HelloAndroid com.technocage.android.hello.HelloAndroid
I could then do an
ant
in the source dir and get bin/HelloAndroid-debug.apk
. It was signed, as expected and that let me install it. After you've setup USB connectivity, and verified it with adb devices
...- Connect USB cable to phone
- Pull down notification window and let USB mount SD card
- Settings->Applications->Development->USB debugging (enable)
- $ ${android-sdk}/tools/adb install ~/HelloAndroid/bin/HelloAndroid-debug.apk
The output of the last command looks something like this:
137 KB/s (8323 bytes in 0.059s)
pkg: /data/local/tmp/HelloAndroid-debug.apk
Success
$
No comments:
Post a Comment