Trying to install Android SDK...

Hello again.

Truth to be told I only need a command named “adb” in order to be able to install CyanogenMod on my Galaxy Ace S5830L (an Android mobile). But the CyanogenMod wiki says it’s better to install the entire Android SDK from their site. Mr. Malcolmlewis said one can just download the tgz file from the site, unzip it, and put adb in /usr/local/bin (or at least I understood so), but in order for the mobile device to be recognized one must add a udev rule previously.

The point is, I downloaded the file but I found no adb file or executable, just a strange txt that mentioned it was changed or must be downloaded…
Any suggestions about this?

On Sat 12 Jan 2013 09:46:01 PM CST, F style wrote:

Hello again.

Truth to be told I only need a command named “adb” in order to be able
to install CyanogenMod on my Galaxy Ace S5830L (an Android mobile). But
the ‘CyanogenMod wiki’
(http://wiki.cyanogenmod.org/index.php?title=Doc:_adb_intro) says it’s
better to install the entire Android SDK from ‘their site’
(http://developer.android.com/sdk/index.html). Mr. Malcolmlewis said one
can just download the tgz file from the site, unzip it, and put adb in
/usr/local/bin (or at least I understood so). I downloaded the file but
I found no adb file or executable, just a strange txt that mentioned it
was changed or must be downloaded…

Any suggestions about this?

Hi
This one?
http://dl.google.com/android/adt/adt-bundle-linux-x86_64.zip

It’s under /sdk/platform-tools/ and I would put it in you ~/bin


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 20:06, 3 users, load average: 0.01, 0.05, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

You may need to extract the Android SDK to get the individual files, including adb.

TSU

@Malcolmlewis:
I thought you meant this one:
http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz

With ~/bin, does it mean /home/(personal folder)/bin or /usr/local/bin? I have build applications form source before and the binaries/executables used to be placed in the second one…

‘~’ works on the command line and literally means ‘home directory’. It
can be used two ways:

~/ #the current user’s home directory
~someuser/ #the home directory of ‘someuser’

So, if you do something on the command line and reference ~/bin it
literally means the current user’s home directory, and then ‘bin’ within
that home directory.

Good luck.

And as addition to the perfect description of ab above, you can read those things in the man page of bash:

man bash

In this case in the paragraph Tilde Expansion.

I mention this not because it will tell you different from what ab says, but you may like to read there more about bash to increase your knowledge.

@Hcvv:
Thank you for the advise. I’ll do so.

@Malcolmlewis:
When doing the udev rule stuff, should I enable or leave disabled USB storage?

When finally beginning to install CyanogenMod, you mentioned to first unplug and then plug again the device. According to the wiki, once I have the CyanogenMod zip file I must “push” it to the device using adb, so I guess the device must be already turned on and connected to the PC. Also with or without USB storage?

When booting to recovery mode, I guess the device must be still connected… (???) But can I boot it while turned on, or should I first turn it off?

Flashing mobile phones is always a delicate (and probably awful) process, that’s why I’m asking all of this.
Thank you beforehand.

On Sun 13 Jan 2013 07:16:01 PM CST, F style wrote:

@Hcvv:
Thank you for the advise. I’ll do so.

@Malcolmlewis:
When doing the udev rule stuff, should I enable or leave disabled USB
storage?

When finally beginning to install CyanogenMod, you mentioned to first
unplug and then plug again the device. According to the ‘wiki’
(http://wiki.cyanogenmod.org/index.php?title=Install_CM_for_cooper),
once I have the CyanogenMod zip file I must “push” it to the device
using adb, so I guess the device must be already turned on and connected
to the PC. Also with or without USB storage?

When booting to recovery mode, I guess the device must be still
connected… (???) But can I boot it while turned on, or should I first
turn it off?

Flashing mobile phones is always a delicate (and probably awful)
process, that’s why I’m asking all of this.
Thank you beforehand.

Hi
You need to have USB debugging enabled on the device, not storage mode.
But AFAIK, if you can see it in the device list with the adb command,
then you should be able to connect.

Only for the udev rule to kick in hence the unplug/plug so adb will
work.

When booting to recovery mode, should work either connected of
unconnected. As long as the device is in recovery mode and the zip file
is present the system will do it’s thing.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 1 day 15:53, 3 users, load average: 0.13, 0.07, 0.06
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

OK, I was about to start the entire horrible process, but then I found myself checking the adb help and came to another big question: if the only thing “adb push” does is just copying a file from the PC to the mobile device, why is it necessary to do it with adb? What could happen if I just copied the mod file through USB storage or bluetooth?

On Mon 14 Jan 2013 03:46:01 AM CST, F style wrote:

OK, I was about to start the entire horrible process, but then I found
myself checking the ‘adb help’
(http://wiki.cyanogenmod.org/index.php?title=Adb_--help) and came to
another big question: if the only thing “adb push” does is just copying
a file from the PC to the mobile device, why is it necessary to do it
with adb? What could happen if I just copied the mod file through USB
storage or bluetooth?

Hi
Probably a different location on the device… if you have an sdcard
and that’s what it points to, then no reason as you could copy it
there.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 3:51, 3 users, load average: 0.10, 0.06, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

OK, trying to make adb work by adding the udev rule.

First, I use dmesg command and I get this:

user@linux-njo4:~> dmesg |tail -n 19
 3096.997152] sd 11:0:0:0: [sdb] Unhandled error code
 3096.997154] sd 11:0:0:0: [sdb]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
 3096.997157] sd 11:0:0:0: [sdb] CDB: Write(10): 2a 00 00 08 32 bf 00 00 f0 00
 3096.997169] end_request: I/O error, dev sdb, sector 537279
 3097.049176] sd 11:0:0:0: [sdb] Synchronizing SCSI cache
 3097.049236] sd 11:0:0:0: [sdb]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
 3282.499201] usb 2-2: new high-speed USB device number 9 using ehci_hcd
 3282.616670] usb 2-2: New USB device found, idVendor=04e8, idProduct=689e
 3282.616681] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
 3282.616688] usb 2-2: Product: Samsung Android USB Device
 3282.616694] usb 2-2: Manufacturer: SAMSUNG Electronics Co., Ltd.
 3282.616700] usb 2-2: SerialNumber: S5830aabdd4cb
 3282.618410] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
 3282.618581] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
 3282.621500] scsi12 : usb-storage 2-2:1.3
 3283.625270] scsi 12:0:0:0: Direct-Access     SAMSUNG  GT-S5830L Card   0100 PQ: 0 ANSI: 2
 3283.625749] sd 12:0:0:0: Attached scsi generic sg2 type 0
 3283.627966] sd 12:0:0:0: [sdb] Attached SCSI removable disk
 3332.783843] EXT4-fs (sda6): re-mounted. Opts: acl,user_xattr,commit=0

I can see my mobile idVendor under “usb 2-2”, but what those errors in “sd 11:0:0:0”?

Then, I type “cat lib/udev/rules.d/51-android.rules” and I get “no such file”; and if I type “cat /lib/udev/rules.d/51-android.rules” I get “it’s a directory”. How can I create the new needed rule from command? Remember: I can’t write on root’s directories without admin permissions, and someone told me running Nautilus as root is not recommended…

OMGM, for the lamers that is oh my goodness man lol! Anyhooo, this is not the place for adb and device debug. You want xda forum for your device. That said, you may or may not have a samsung device trying to be mounted by linux. lol! Anyhoo again, if you want to adb to the device you would plug the device into pc via usb and make sure usb debugging is turned on the phone/tablet and then issue a command at the terminal

adb devices

If this returns something good like a name or number then you are good. Have you tried that?

On Tue 15 Jan 2013 02:26:01 AM CST, F style wrote:

OK, trying to make adb work by adding the udev rule.

First, I use dmesg command and I get this:

Code:

user@linux-njo4:~> dmesg |tail -n 19
3096.997152] sd 11:0:0:0: [sdb] Unhandled error code
3096.997154] sd 11:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT
driverbyte=DRIVER_OK 3096.997157] sd 11:0:0:0: [sdb] CDB: Write(10):
2a 00 00 08 32 bf 00 00 f0 00 3096.997169] end_request: I/O error,
dev sdb, sector 537279 3097.049176] sd 11:0:0:0: [sdb] Synchronizing
SCSI cache 3097.049236] sd 11:0:0:0: [sdb] Result:
hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK 3282.499201] usb 2-2:
new high-speed USB device number 9 using ehci_hcd 3282.616670] usb
2-2: New USB device found, idVendor=04e8, idProduct=689e 3282.616681]
usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
3282.616688] usb 2-2: Product: Samsung Android USB Device
3282.616694] usb 2-2: Manufacturer: SAMSUNG Electronics Co., Ltd.
3282.616700] usb 2-2: SerialNumber: S5830aabdd4cb 3282.618410]
cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a
modem. 3282.618581] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
3282.621500] scsi12 : usb-storage 2-2:1.3 3283.625270] scsi
12:0:0:0: Direct-Access SAMSUNG GT-S5830L Card 0100 PQ: 0 ANSI:
2 3283.625749] sd 12:0:0:0: Attached scsi generic sg2 type 0
3283.627966] sd 12:0:0:0: [sdb] Attached SCSI removable disk
3332.783843] EXT4-fs (sda6): re-mounted. Opts:
acl,user_xattr,commit=0 --------------------

I can see my mobile idVendor under “usb 2-2”, but what those errors in
“sd 11:0:0:0”?

Then, I type “cat lib/udev/rules.d/51-android.rules” and I get “no such
file”; and if I type “cat /lib/udev/rules.d/51-android.rules” I get
“it’s a directory”. How can I create the new needed rule from command?
Remember: I can’t write on root’s directories without admin permissions,
and someone told me running Nautilus as root is not recommended…

Hi
Just use gedit to create the file, press alt+F2, then enter;


gnomesu gedit /lib/udev/rules.d/51-android.rules

Then copy in;


# Android devices - UDEV Rule

# For Samsung Android USB Device for use with adb
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="users"

You need to check the device is in storage mode by the looks rather
than a modem. Should be on the device somewhere else try the
usb_modeswitch command.

When you’ve saved that, then press alt+F2 again and run;


gnomesu /sbin/udevadm trigger


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 5:10, 3 users, load average: 0.02, 0.05, 0.13
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

@Malcolmlewis:
Well, I indeed had the Samsung phone connected without enabling USB storage. Then is that the reason of those 11:0:0:0 “errors”? Do I really need to enable USB storage then?

@Anika200:
Yes, I know this is XDA stuff and I may have branched from the original post. But mr. Malcolm told me it was OK to ask in this forum section (unless I’ve misunderstood). Besides, when I first talked to him I didn’t know about XDA community…

On Tue 15 Jan 2013 03:26:01 AM CST, F style wrote:

@Malcolmlewis:
Well, I indeed had the Samsung phone connected without enabling USB
storage. Then is that the reason of those 11:0:0:0 “errors”? Do I really
need to enable USB storage then?

Hi
@ F_style I would try it either way, it may change the vendor
id, so just confirm, as well indicated, ensure the usb debugging on.

@Anika200 writing/asking about a udev rule for connecting a device with
openSUSE is fine here…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 6:44, 3 users, load average: 0.04, 0.04, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

Enabled USB storage and got this:

user@linux-njo4:~> dmesg |tail -n 19
[10317.409183] scsi 8:0:0:0: Direct-Access     SAMSUNG  GT-S5830 Card    0100 PQ: 0 ANSI: 2
[10317.409685] sd 8:0:0:0: Attached scsi generic sg2 type 0
[10317.412365] sd 8:0:0:0: [sdb] Attached SCSI removable disk
[10359.632916] usb 2-2: USB disconnect, device number 5
[10359.844225] usb 2-2: new high-speed USB device number 6 using ehci_hcd
[10359.961984] usb 2-2: New USB device found, idVendor=04e8, idProduct=689e
[10359.961993] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10359.962000] usb 2-2: Product: Samsung Android USB Device
[10359.962042] usb 2-2: Manufacturer: SAMSUNG Electronics Co., Ltd.
[10359.962047] usb 2-2: SerialNumber: S5830aabdd4cb
[10359.963720] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
[10359.963896] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[10359.965951] scsi9 : usb-storage 2-2:1.3
[10360.969830] scsi 9:0:0:0: Direct-Access     SAMSUNG  GT-S5830 Card    0100 PQ: 0 ANSI: 2
[10360.970821] sd 9:0:0:0: Attached scsi generic sg2 type 0
[10360.973183] sd 9:0:0:0: [sdb] Attached SCSI removable disk
[10389.993924] sd 9:0:0:0: [sdb] 3911680 512-byte logical blocks: (2.00 GB/1.86 GiB)
[10390.211553] sd 9:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[10390.435711]  sdb: sdb1

Sorry, I lost track what is your goal again? The info for adb for any platform is here Using Hardware Devices | Android Developers. You just need to follow that, it has all the answers already.
Are you just trying to access usb storage on the device? In that case you will want to look at mtp for linux. There are a few posts on the topic and samsung is a special case as I remember it.

On Tue 15 Jan 2013 05:36:01 AM CST, F style wrote:

Enabled USB storage and got this:

[10359.961984] usb 2-2: New USB device found, idVendor=04e8,

Hi
So you have the udev rule in place? Do you see the device with the adb
command?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 8:11, 3 users, load average: 0.01, 0.06, 0.10
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

I haven’t done it yet. I don’t know if doing the udev rule process with or without USB storage. And if I managed to get adb working, I neither don’t know if using it with or without USB storage…

On Tue 15 Jan 2013 10:16:01 PM CST, F style wrote:

I haven’t done it yet. I don’t know if doing the udev rule process with
or without USB storage. And if I managed to get adb working, I neither
don’t know if using it with or without USB storage…

Hi
Just try the udev rule and adb…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 1 day 1:39, 3 users, load average: 0.04, 0.03, 0.05
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile