If you are fine using the current set of backup codes, you can print or download them. If you believe this set of codes might have been stolen or you’ve used many of the backup codes, you can generate a new set by clicking Generate new codes.

Second - Even without backup codes, you should have supplied your phone number to Google at some point; this allows for you to have a temporary code sent to you in a text message. As shown in the following image:

That's what a factory reset is for - it does wipe all accounts associated with the handset.

You will need to go into your Google Account on your trusted PC to generate
a password to use and key that into the Google Account after factory reset.

When you use Gmail on your trusted PC:

Go into Settings on the right hand of the GMail web page - its a drop-down menu when the cog-wheel gets clicked

Click on Accounts and Imports

Click on Other Google Account settings, this will launch a tab page on your browser for the Accounts.

Click on Security on the left hand side of the same page.

There's 2-step verification, click on the button Edit, you will be prompted to use your actual Google Sign-on password (the real one). Depending on how your trusted PC is set, you may be asked to enter the code delivered to your SMS, key that verification code into your Google Sign-on page.

Finally

There's a link called Manage application-specific passwords after successful sign-on.

Then, there's a "Step 1 of 2: Generate new application-specific password" at the bottom of the page. Give this a name - for example "BobSmith's Android HTC One X_10thSept2012", and click on Generate password, the password will get generated, now using that to sign on to Google from your handset - its a once-off operation. In any case, if the worst happens, you can revoke it and deny access to your account :)

When you set up 2-factor authentication, there's an option to do so manually (without using a 2D barcode). You can then also write it down. If you have set it up already, you can re-do this and create it again.

(as already noted) Have those 10 emergency one-time codes at hand

If you have root rights, you can access the stored credentials of the Google authenticator app in some ways:

Read out the credentials and write them down:
You can later manually add them to the app by providing GMail address and secret from below (yours differs of course).