Jump to content


Photo

[GUIDE] Ubuntu and the Blade

* * * * * 1 votes

  • Please log in to reply
43 replies to this topic

#1
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232
So, I am struggling with a Maverick install, bcos Win7 refuses to boot up (and I am lazy to reinstall it). That's why I began to play with Ubuntu and ADB.

1. Install Android SDK

Install the SDK as defined in the CyanogenMod Wiki
As a sidenote: I used the path

/home/[username]/android-sdk-linux

as it is easier to remember.

To automatically add the tools to the terminal, add this line to your
/home/[username]/.bashrc
file:

export PATH=${PATH}:/home/[username]/android-sdk-linux/platform-tools/:/home/[username]/android-sdk-linux/tools/

Replace [username] with your Ubuntu username!

After done, run the command "android" in a terminal. Better to do it as sudo tho! It will open a window, install some platforms and update the tools!


2. Add UDEV rules

Open a terminal, and type this:

sudo gedit /lib/udev/rules.d/11-android.rules

When prompted, enter your password.
A new Text editor will open, just paste these lines and Save:
(DO NOT FORGET TO REPLACE [username] WITH YOUR USERNAME!!!)

SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1353", MODE="0666", OWNER="[username]" #Normal Blade
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1351", MODE="0666", OWNER="[username]" #Debug Blade
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1354", MODE="0666", OWNER="[username]" #Recovery Blade
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0666", OWNER="[username]" #Fastboot Blade

/* Sidenote: Google has some good humour: the Fastboot Product ID says dood (dude) in G33K lang. It also proves ZTE lacks fantasy: their Vendor ID is just a [google_vendor_id_numerics]+1 */

Restart your PC and you're done :D
(Actually restarting UDEV would be probably enough, but don't trust everything what they say)

Edited by fonix232, 13 January 2011 - 11:08 AM.

  • 4
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#2
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232
Reserved

  • 0
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#3
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232
Reserved

  • 0
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#4
StevenHarperUK

StevenHarperUK

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 1,431 posts
  • Gender:Male
  • Location:United Kingdom
  • Devices:Orange San Francisco
Added these to my Common Problems and Glossary

http://android.modac...lems-questions/
http://android.modac...-for-new-users/

thanks

  • 0

#5
IronDoc

IronDoc

    Addict

  • MoDaCo Silver
  • PipPipPipPipPip
  • 522 posts
  • Devices:Blade
Thanks a lot, I'd been looking for vendor ids.

  • 0

#6
andred

andred

    Newbie

  • Members
  • Pip
  • 2 posts
  • Gender:Male

Open a terminal, and type this:

sudo gedit /lib/udev/rules.d/11-android.rules


Thanks for the post! Note that /etc/udev/rules.d/ is the recommended place for local udev rules, not /lib/udev/rules.d.

  • 0

#7
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232

Thanks for the post! Note that /etc/udev/rules.d/ is the recommended place for local udev rules, not /lib/udev/rules.d.


Well, I found that the second path is better, loads faster, and somewhy the /etc/ path isn't working properly :S

  • 0
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#8
yuki71

yuki71

    Newbie

  • Members
  • Pip
  • 26 posts
  • Devices:sanfransisco
installed as instructed
"No command 'adb' found" error
any ideas

  • 0
Posted Image

#9
prometheus0815

prometheus0815

    Newbie

  • Members
  • Pip
  • 33 posts

installed as instructed
"No command 'adb' found" error
any ideas

You got the additional $PATH settings wrong.

  • 0

#10
prometheus0815

prometheus0815

    Newbie

  • Members
  • Pip
  • 33 posts
fonix232,

if it's just for adb (and fastboot), there's no need to install the whole Android SDK. See the hint in bold print on the CM wiki page you linked to. Go to their adb article, download the archive, unpack it to ~/bin (and maybe adjust $PATH accordingly) and you're all set. This should be sufficient for most people not wanting to develop applications für Android.

Furthermore, i second andred in that custom udev rules should be placed in /etc/udev/rules.d/. This will also avoid them being affected by package updates and the like. Also, setting OWNER to your username is not necessary, since you already specify read/write access by setting MODE="0666". Of course, restarting udev is enough, no need to reboot the entire system. After all, we're talking about real operating systems here, not Windows. ;) So, just execute sudo restart udev on an Upstart enabled system such as newer Ubuntu releases and sudo /etc/init.d/udev restart on other flavours.

Edited by prometheus0815, 30 January 2011 - 05:36 PM.

  • 0

#11
fonix232

fonix232

    Addict

  • Members
  • PipPipPipPipPip
  • 942 posts
  • Location:Hungary, Debrecen
  • Devices:ZTE Blade [TFT 512RAM]
  • Twitter:@fonix232

fonix232,

if it's just for adb (and fastboot), there's no need to install the whole Android SDK. See the hint in bold print on the CM wiki page you linked to. Go to their adb article, download the archive, unpack it to ~/bin (and maybe adjust $PATH accordingly) and you're all set. This should be sufficient for most people not wanting to develop applications für Android.


I need some other parts from the SDK too, that's why I download (and also, if there's ANY update, the SDK manager will do all what's necessary. No need to download-overwrite, etc).

Furthermore, i second andred in that custom udev rules should be placed in /etc/udev/rules.d/. This will also avoid them being affected by package updates and the like. Also, setting OWNER to your username is not necessary, since you already specify read/write access by setting MODE="0666". Of course, restarting udev is enough, no need to reboot the entire system. After all, we're talking about real operating systems here, not Windows. ;) So, just execute sudo restart udev on an Upstart enabled system such as newer Ubuntu releases and sudo /etc/init.d/udev restart on other flavours.


1. For me, on PC the /etc/ path never worked properly (10.10 Meerkat). On my tablet, both worked.
2. setting OWNER is to make ADB launchable properly. Worked on 10.04 (first distro what needed setting OWNER, anything before that was fine, ADB never asked for sudo), so I added to 10.10 too. Not a bad thing to have there I say.
3. I like restarting the whole system. Sometimes (even if it isn't Windows) some info may stuck, and such. I won't risk it, restart the whole damn stuff, and thanks to the usual Ubuntu boot time, in 30secs my system is up and running. And this is of course to be sure ;)

  • 0
If you like my work, invite me for a drink or two!

Also, take a look at my Blade-dedicated site too! fonix232.co.cc

#12
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp
you already have adb in fastboot.zip if this all you need

no no no custom udev rules should be placed in /etc/udev/rules.d/
we are not in "windows i put my files everywhere no matter" ;)

apart this an excellent tutorial ;)

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#13
prometheus0815

prometheus0815

    Newbie

  • Members
  • Pip
  • 33 posts
fonix232, don't get me wrong. I very much appreciate you posting this guide!

I need some other parts from the SDK too, that's why I download (and also, if there's ANY update, the SDK manager will do all what's necessary. No need to download-overwrite, etc).

I thought so. Just meant to show people only wanting adb an easier way.

1. For me, on PC the /etc/ path never worked properly (10.10 Meerkat). On my tablet, both worked.

On my Lucid system at home, rules in /etc/udev/rules.d work pefectly. On Maverick at work, "normal" debug mode worked without any additional rules, Didn't test the other modes though. Stuffing your custom rules in /lib will eventually cause problems in case of updates or whatever. That sort of conventions is usually not made up just for the fun of it.

2. setting OWNER is to make ADB launchable properly. Worked on 10.04 (first distro what needed setting OWNER, anything before that was fine, ADB never asked for sudo), so I added to 10.10 too. Not a bad thing to have there I say.

Sounds plausible, but I didn't have any problems with adb or its daemon on my Maverick machine with no additional rules and, thus, no OWNER setting. Your solution will cause problems on multi-user systems where more than one user wants to use adb on the Blade, which should be a rather rare condition. ;)

3. I like restarting the whole system. Sometimes (even if it isn't Windows) some info may stuck, and such. I won't risk it, restart the whole damn stuff, and thanks to the usual Ubuntu boot time, in 30secs my system is up and running. And this is of course to be sure

The 30s (max!) boot time is not why I hate rebooting. It's the 2-5 minutes of freezing all VMs, closing applications and such, and, even more, setting it all up again after the reboot. Plus, I just hate doing stuff that I can avoid. ;)

you already have adb in fastboot.zip if this all you need

That's what I referred to by pointing to the adb article on the CM wiki.

Edited by prometheus0815, 30 January 2011 - 08:29 PM.

  • 0

#14
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp
ho and i'm using arch linux
all this stuff works too of course

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#15
punkmilitia

punkmilitia

    Regular

  • Members
  • PipPip
  • 127 posts
  • Location:South England
  • Devices:San Francisco
  • Twitter:@shaunhoare
Hey, for some reason I get this error in the terminal:


punkmilitia@ubuntu:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions

  • 0
http://shaunsdomain.tk
if any of my posts help you, why not look into getting a GG simcard? free UNLIMITED internet, unlimited texts and 250mins a month for just a £10 topup, by signing up for a sim with the sim pic below we both get £5 free! :DPosted Image

#16
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp

Hey, for some reason I get this error in the terminal:
punkmilitia@ubuntu:~$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions

you haven't add the udev rules
so to wake up the deamon at first adb you need to type
sudo ./adb start-server

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#17
hecatae

hecatae

    Hardcore

  • Moderator Team
  • PipPipPipPipPipPip
  • 3,234 posts
  • Gender:Male
  • Location:northampton
  • Devices:Samsung i9305
  • Twitter:@meritez
another way of setting up PATH

export PATH="/home/[username]/android-sdk-linux_x86/tools/:$PATH"
export PATH="/home/[username]/android-sdk-linux_x86/platform-tools/:$PATH"

replace [username] with your username, I do this instead of editing .bashrc as I have no PATH line in .bashrc

  • 0

#18
glossywhite

glossywhite

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,887 posts
You need to make this much clearer, as it is ambiguous. For example, does "[username]" mean that we enclose our username in square brackets, or is that the OP's own descriptive syntax for this guide?

Little details make all the difference!

PS: For the WHITE UK Orange San Fran, this is my "11-android.rules" file, which has a different debug ID:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1353", MODE="0666", OWNER="matt" #Normal Blade (Default setting from Modaco.com)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1350", MODE="0666", OWNER="matt" #Debug Blade (was 1351 but changed to 1350 for white SF)
SUBSYSTEMS=="usb", ATTRS{idVendor}=="19d2", ATTRS{idProduct}=="1354", MODE="0666", OWNER="matt" #Recovery Blade
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0666", OWNER="matt" #Fastboot Blade

Edited by glossywhite, 29 April 2011 - 03:26 PM.

  • 0

#19
Phoenix Silver

Phoenix Silver

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,839 posts
  • Gender:Female
  • Location:Strasbourg.
  • Devices:ZTE Blade Orange France
  • Twitter:@phoenixbjp
you should know that username = your home directory
it's a linux discussion here
people know what they are doing don't need a lot of usefulness details
if you use windows just follow another post for windows users
cheers
Alice

  • 0
Si le corps est mortel, l’âme elle est éternelle.

#20
glossywhite

glossywhite

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,887 posts

you should know that username = your home directory
it's a linux discussion here
people know what they are doing don't need a lot of usefulness details
if you use windows just follow another post for windows users
cheers
Alice


Yes dear, okay dear :mellow:

Actually '~/' == home. I was merely stating that the usage of "[]" could be made less ambiguous, for the uninformed. No need to be such a reactionist, really. Assumption, as they say, is the mother of all f**k-ups - never assume the whole member base knows what we/you do, ok? If everyone "knows what they are doing", then why is there a tutorial here?

Edited by Lew247, 30 April 2011 - 07:57 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users