jammiwam
[java, web, android, agent-based-modeling, gtd]
K-9 Mail Not Accepting Google’s Application-Specific Password
K-9 Mail on Android phone not accepting Application-Specific Password from Google’s 2-Step Verification.
= Motivation =
I use the K-9 Mail client on my Android phone.
I also recently signed up for Google’s 2-Step Verification process for all my Google applications. This is a great security feature, because if a rogue gains access to your email, you’re pretty much screwed. Its like the skeleton key to your life. And all a person needs to access your life is a password. I don’t care if its the strongest password ever, if someone has it; they’re in… unless you have Google’s 2-Step Verification turned on. Then its much more difficult for someone other than you to access your gmail account.
With the 2-Step Verification, whenever you sign into your web-based gmail account on an un-recognized laptop or device, Google will ask you to enter a second verification code. This verification code is sent to your phone as a text message (or perhaps via the Google Authenticator App, or even a voice message). It takes a little more time to access your email from an unrecognized device, but I think its well worth it.
Now this is all well-and-good. But of course, there are other third-party applications that don’t participate in this two-step verification. Some examples:
- Google Chrome Sync
- Your Android account
- Third party email applications (such as K-9, Thunderbird, Outlook, etc)
These other types of applications still require a password. This is where Google’s “Application-Specific Password” comes in. You generate an Application-Specific password for each of your third-party apps by going to your “Applications and sites” information under your Google Account Settings. This password is then entered once into the third party app, and you’re good-go-go. You can always go to “Applications and sites” and revoke a particular application’s access for whatever reason (i.e. lost phone, laptop, etc).
= Problem =
My K-9 Mail application on my Android phone was not accepting the Application-Specific password.
= Solution =
After some Googling, I found this on Google’s Support Page:
If you tried using an application-specific password on a non-browser device or application, double check to ensure that you have entered it correctly.
If your application-specific password is still not working, try going to https://accounts.google.com/DisplayUnlockCaptcha on your phone’s browser. Enter your username and password, then type the letters on the screen. Then go back to the application you’re trying to access and enter your application-specific password.
I did just this.Then went back to my Account Settings, re-created an Application-Specific password for K-9. Entered this same password in for both the incoming and outgoing server settings. And boom. It worked.
Fetching Mail -> Incoming Server Settings: Username: your email address Password: your application-specific password IMAP Server: imap.googlemail.com Security Type: SSL (always) Authentication Type: PLAIN IMAP path prefix: blank Show only subscribed folders: unchecked Mobile: Checked Wi-Fi: Checked Other: Checked
Sending Mail -> Outgoing Server Settings SMTP server: smtp.googlemail.com Security type: SSL (always) Port: 465 Require sign-in: Checked Authentication type: AUTOMATIC Username: your email Password: your application-specific password
Prepare Eclipse for Android Development
Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT). This is what I did to get the Android ADT plugin installed and working, using the official Android Developers Installation Instructions.
NB: These instructions were tested on 2012.05.05 using Ubuntu 11.10 with Eclipse Java EE IDE for Web Developers (version: Indigo Service Release 2, build 20120216-1857).
Step 1: Install Android SDK
The prerequisite for configuring the ADT plugin is to have the Android SDK starter package installed.
1. Download the appropriate SDK package for your system here:
http://developer.android.com/sdk/index.html
2. Save the compressed folder to your Android directory.
Example: /home/meghan/programming/android/android-sdk_r18-linux.tgz
3. Extract compressed folder into the Android directory.
4. Launch the Android SDK Manager by running:l
$ [your Android directory]/[extracted_folder]/tools/android
Example:
meghan@davros:~$ ./programming/android/android-sdk-linux/tools/android
NB: You can get to the SDK Manager by running the above command, or going through Eclipse (Window->Android SDK Manager). However Eclipse always locks up on me when I access the SDK Manager from here, so I usually just use the command-line.
5. An installer dialog should pop up that looks similar to this:
I chose to install all tools, extras and sdk versions 3.0 and up.
Select “Accept All” on the license page.
5. It took awhile for everything to download.
While downloading, you’ll sometimes receive these popups that want you to log into something or other. I just hit cancel on all these.
Step 2: Install Android Plugin for Eclipse
1. Open Eclipse
2. Goto: Help -> Install New Software…
3. Select: Add
Name: ADT Plugin
Location: https://dl-ssl.google.com/android/eclipse/
4. Select: OK
5. Check ‘Developer Tools’ and select Finish
Click through and approve all the licenses and say ok to any security warning popups.
Restart Eclipse after installation.
Possible Issue
The below message is a known issue with downloading the development tools software. If you run into this, and are NOT using the Eclipse for Java EE Developers, I would strongly recommend downloading and using this version instead. I ran into the below message using “Eclipse Classic v3.7.0″ and switching to the Java EE version seemed to fix this issue.Cannot complete the install because one or more required items could not be found.
Software being installed: Android Development Tools 18.0.0.v201203301601-306762 (com.android.ide.eclipse.adt.feature.group 18.0.0.v201203301601-306762)
Missing requirement: Android Development Tools 18.0.0.v201203301601-306762 (com.android.ide.eclipse.adt.feature.group 18.0.0.v201203301601-306762) requires ‘org.eclipse.wst.sse.core 0.0.0′ but it could not be found
Step 3: Configure Android Plugin
1. Goto: Window->Preferences
2. Select ‘Android’ from left panel
3. In right panel Browse to Android SDK directory
4. OK
Possible Issue
If you are running a 64-bit distribution on your development machine, you may see this error in your Eclipse console:error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64
Its cool, you just need to install the ia32-libs package by opening your terminal and running:
sudo apt-get install ia32-libs
After this, clear the messages in your Eclipse console, go back to Window->Preferences and try adding the Android SDK again like before. Once you hit ‘Apply’ or ‘OK’ the SDK target list should be refreshed, and you should not see any error messages in the Eclipse console.
Step 3: Install an Android Platform
1. Goto: Window->Android SDK and AVD Manager
2. Choose ‘Available Packages’ in left panel
3. Expand ‘Android Repository’ (Uncheck ‘Display Updated Only’ checkbox at the bottom)
4. I selected the latest platform version:
- Install Selected
5. Accept Licence – Install
Step 4: Create New Android Test Project
I used: Hello World Tutorial
Turning A Nook Color Into An Android Tablet
Motivation
I wanted to turn a Nook Color into an Android tablet for fun.
I also wanted try my hand at Android app development and test it on an actual device.
Stuff You’ll Need
NookColor (NC)
2G Mirco SDCard (MicroSD)
Download Needed:
1. uNooter.zip [unzip --> uNooter.img]
2. CyanogenMod
3. GoogleApps (optional)
Step 1: Root NC
Open a terminal and run command to list all available storage devices:
meghan@Davros:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 116993420 24473464 86577020 23% /
none 2997764 692 2997072 1% /dev
none 3005492 1308 3004184 1% /dev/shm
none 3005492 96 3005396 1% /var/run
none 3005492 0 3005492 0% /var/lock
/dev/sdc1 1956096 64 1956032 1% /media/04C5-13FF
/dev/sdb 5242964 2008 5240956 1% /media/MyNOOKcolor
Find the MicroSD card storage device in the list.
- Here: /dev sdc1
Un-Mount this device:
meghan@Davros:~$ umount /dev/sdc1
Change directory to the uNooter.img directory on your computer. And run the following command.
meghan@Davros:~$ cd Desktop/Nook/
meghan@Davros:~/Desktop/Nook$ dd if=uNooter.img of=/dev/sdc1 bs=1M
wait a few seconds, then you’ll see…
112+1 records in
112+1 records out
117760000 bytes (118 MB) copied, 20.9844 s, 5.6 MB/s
Power off NC
Unplug NC from computer
- This will trigger NC to power back on
- Device will automatically be rooted
Disconnect from computer [Eject]
Power off
Remove SDCard
Power back on
The NC should now be rooted
Flashing Cyanogen Mod
Step 2: Create Backup of Current Barnes and Nobel Configuration
Turn off NC
Insert “other guys” MicroSD into NC
Turn on NC
- It should boot into ClockworkMod Recovery
Select “backup and restore” (use volume keys)
Select “backup” to back up current installation of Barnes and Nobel Nook Color
- This backs everything up on to the SDCard
- This will take a few minutes
Step 3: Format the Nook
# Select Wipe data/factory reset.
- Select “Yes – Wipe all user data”
- Wait a few minutes… then it said the wipe was complete but locked up on me.
- Rebooted and back to ClockworkMod Recovery menu.
# Wipe cache partition
- Takes like a second to do
Step 4: Install Cyanogen Mod
Install zip from sdcard
Coose zip from sdcard
Browse to clockworkmod/update/download.cyanogenmod.com/get/update-cm-7.0.3-encore-signed.zip
- Now we wait
- When it says installation is complete…
Hold down on/off button to turn off
Remove sdcard
Reboot
CyanogenMod should boot.
Step 5: Install Google Apps (optional)
Turn off NC
Insert sdcard (with gapps zip on it)
Restart NC into ClockworkMod recovery
Goto “Install zip from sdcard
Goto “Choose zip from sdcard”
Browse to Google Apps update.zip
When installation complete, hold down on/off button to turn off and remove sdcard.
Download Eclipse IDE
The Eclipse IDE (integrated development environment) is a place where you can write your code. I like to describe it to my non-tech friends like this: [Microsoft Word:writing::Eclipse:coding]. Here’s how to download and install Eclipse.
NB: These instructions were tested on Ubuntu 11.10 with Eclipse Classic 3.7.0 on 2012.0.05.
Step 1: Choose which Eclipse to download
Eclipse is like tofu and can come flavored to suit your needs.
http://www.eclipse.org/downloads/
“Eclipse Classic” is sort of the Plain-Jane one.
I chose to download “Eclipse for EE Developers” because:
- I am an EE developer (among other things)
- It seems to be the most friendly with the Android ADT plugin installation. (see this android post).


