Powered By Blogger
Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

30 January 2011

Unlocking my Nexus S - on Ubuntu

WARNING - unlocking will wipe your user data - settings, apps, all the stuff you lovingly created "just so" on your groovy new phone. If you have not done so already, back it up all that good stuff with one of the many backup tools out there and/or create a google account to ensure all your useful data (contacts, email, etc) are safely sync'd to the cloud.

I have used these instructions on Ubuntu 10 and 11, they probably work on earlier versions (why haven't you upgraded?!) but make use of google and the man pages to see what "bumps in the road" you may hit.

I assume you have previously installed adb as part of the Android SDK - note it has moved to platform-tools now

Get fastboot from http://android-dls.com/files/linux/fastboot

Connect phone to Ubuntu via USB cable

su

lsusb

will show a list including these identities  - but, oddly, no description/name information, it may be another set of values entirely, I noticed it sometimes appeared as one of these two:
:
:
Bus 001 Device 044: ID 18d1:4e22
Bus 001 Device 044: ID 18d1:4e20
:
:

I now know 18d1:4e22 is the identity when android has booted, and 18d1:4e20 is the identity when in the boot loader. Doh!

Now edit this information a rules file:

vi /etc/udev/rules.d/51-android.rules 

Many posts suggested differing prefixes 70, 90 instead of 51, but it seemed to make no odds - man udev to explore options

Edit in two lines :

SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", ATTRS{idProduct}=="4e22", MODE="0666", OWNER="user", GROUP="plugdev"

SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", ATTRS{idProduct}=="4e20", MODE="0666", OWNER="user", GROUP="plugdev"

Replace user with your uid.


plugdev is a group of which you need to have membership - type groups from command line, as your uid, to see what groups you have - man groups for help

18d1  - vendor id from lsusb
4e22/4020 - product id from lsusb

Other vendor codes are documented here

Now ensure correct perms on the rules file we made earlier:

chmod a+rx /etc/udev/rules.d/51-android.rules 

Restart adb server as root - I made a simple init.d service to make adb daemon restart easier but the 
basic commands (if running as root and in the directory where you installed adb) will be:

./adb kill-server
./adb start-server

output something like:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *

then try 

./adb devices

should get something like:

List of devices attached 
3931B6CB90EC00EC device

if you get output like:

List of devices attached
????????????    no permissions 

you need to check the permissions on the rules file are like:

-rwxr-xr-x 1 root root   111 2011-01-30 15:50 /etc/udev/rules.d/51-android.rules

and that you started the adb server as root

so now we can set the phone to the bootloader and try to run fastboot - this one you can do as your own user id

./adb reboot bootloader 

should give a basic screen with an android logo and some details about the phone, version etc 
and some choices that can be actioned via the hard keys. Should be saying FASTBOOT MODE at the top of the screen.

as root issue:

./fastboot devices

should see:

3931B6CB90EC00EC fastboot

if nothing happens you have configured incorrectly, and no results will return.

Now you can unlock, do this as root:

./fastboot oem unlock

The phone will prompt you to check this is really what you want, and then will do you bidding.

Reboot the phone and set it up as require.

If you subsequently reboot to the bootloader you will see the lock state as:

LOCK STATE - UNLOCKED






17 January 2010

Installing Epson PX710W (networked) on Ubuntu 9.10


  1. Set up the printer and add it to your network.
  2. Try pinging it if you know the ip address (I used a fixed IP to make my life easier) to make sure its connected.
  3. Get drivers from All-in-Ones (multifunction inkjet printers) and fill in form at bottom of page. After submitting form you get a list of appropriate drivers, PPDs and help documents.
  4. Save them somewhere sensible and then read the guidance in the document Instructions%20on%20use%20of%20PPD%20files.txt
  5. I was installing to a 64 bit ubuntu so I had to use this command:

    sudo dpkg -i --force-architecture pipslite_1.4.0-5_i386.deb

    but that failed as I had a missing
    libltdl3.
  6. Google-ing revealed this link where I was led to the Ubuntu Hardy repo website for that dependency. I manually downloaded - I guess you might want to do it properly setting up an entry in your repo lists?
  7. Install the dependency

    sudo dpkg -i --force-architecture libltdl3_1.5.26-1ubuntu1_i386.deb

  8. And rerun command in step 5 above
  9. Then in the desktop System|Adminstration|Printing menu and add the printer using the Network Printer sub-menu.
  10. Select the PX710W from the list, accept the defaults and on the next dialog window select the option to provide the PPD file, browse to it and you are done.
  11. Print a test page