I'm looking to dabble in making my own rom just for the hell of it, and to learn what the devs do
but before I start I need to set up usb access for my phone, and was wondering if you guys could point me in the right direction for doing so
download and install Android SDK,
in the phone just go into settings --> applications --> development --> usb debugging
and use ADB to connect and execute commands
done
that's it? damn I thought I had to configure something else been using this guide, and it threw me for a loop on the usb access part
http://source.android.com/source/initializing.html
ROB281 said:
that's it? damn I thought I had to configure something else been using this guide, and it threw me for a loop on the usb access part
http://source.android.com/source/initializing.html
Click to expand...
Click to collapse
The "Configuring USB Access" part is for using adb with regular user account on Ubuntu . Because normally you need to have root permission to access a USB device e.g. you have to type sudo adb devices instead of only adb devices
To follow the guide, use the following command:
Code:
cd /etc/udev/rules.d
sudo nano 51-android.rules
Then copy/paste the lines in the guide into the file and change <username> to your account name, in my case it would be something like: (notice the OWNER= part)
Code:
# adb protocol on crespo (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="suksit"
# fastboot protocol on crespo (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="suksit"
Then save the file and plug in your Nexus S. If you can use the command adb devices then you're good to go.
Related
I just got a refurbished Xoom wifi from woot.com. I am trying to access it via adb from my Ubuntu PC, but it doesn't seem to recognize it. I have followed the guides for the udev rules, and it works (to a degree). It seems that my PCIIDS may be different, and this may be the problem.
I previously owned a g-tablet and a Zenithink epad, and was able to access them through adb, after changing the udev rules.
I also want to root it, and I understand that it must be able to recognize it to do that. There seems to be three modes that you can start it up in, RSD, Fastboot and Android Recovery. I'm not sure if I should be in RSD or Fastboot for adb to work, but each mode gives a slightly different PCIID.
I do have a fastboot binary for Linux, but it too needs the PC to first "see" the Xoom.
For me, in opensuse
lsusb to see the constructor and id ( be careful the id change between normal mode, recovery and fastboot)
mine is :
In normal mode
Bus 002 Device 006: ID 22b8:70a8 Motorola PCS
with debug on
Bus 002 Device 006: ID 22b8:70a9 Motorola PCS
In Bootloader
Bus 002 Device 006: ID 18d1:708c Motorola PCS
In bootRSD
Bus 002 Device 006: ID 22b8:70a4 Motorola PCS
Edit or create your /etc/udev/rules.d/92-motorola-xoom.rules
to reflect the id's of your xoom
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="22b8", SYSFS{idProduct}=="70a8", MODE="0666" SYMLINK+="xoom"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="22b8", SYSFS{idProduct}=="70a9", MODE="0666" SYMLINK+="xoomdebug"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="18d1", SYSFS{idProduct}=="708c", MODE="0666" SYMLINK+="xoombootloader"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="22b8", SYSFS{idProduct}=="70a4", MODE="0666" SYMLINK+="xoombRSD"
Click to expand...
Click to collapse
restart udev or reboot
sudo /etc/init.d/boot.udev restart
And normally you should see your device with
adb devices
Thanks for the reply.
I have been trying something very similar. I don't believe that I can directly copy a SuSE version to use on Ubuntu, but it gives me some ideas.
Here is what worked for my g-tablet:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
I think that was for mounting it to transfer files. I tried something like that for the Xoom IDs, but it didn't give me adb access.
I'll keep plugging away!
I finally got it to find it in adb. I'm not sure what did it, but rebooting the PC may have helped.
I am still not getting it to be seen by fastboot. I am following a How-To for rooting that first requires unlocking the bootloader. That is why I am trying to get fastboot to work.
If you know of a better way to root it, please advise me.
Thanks.
Just plug it when in fastboot and note the ID and constructor (mine change from 22b8 to 18d1 depending of the state) in that state and add it to your rules
reboot and try again
I've done that, with and without USB debugging enabled.
I think that the Linux versions of fastboot that I am trying may not be working. I am currently trying to install everything needed on my Win 7 laptop. The windows SDK includes fastboot, where the Linux version doesn't.
Ran it in windows and it is now performing the unlocking. It's disappointing that it isn't working in Linux.
I found another copy of Linux flashboot, from somewhere on the web. That one seems to work if I run it with root permissions (sudo). Otherwise I get this:
Code:
$ fastboot devices
no permissions fastboot
I'm not sure if tweaking the udev rules will fix this, but running it with sudo is no big deal. I'm just glad I got it to work.
Okay, I'm about to pull my hair out. I've Googled this, I've looked for YouTube videos for this, and I've even looked on here for this.
I found one post about obtaining SuperCID on Mac, but the post ends with no real solution (that I can see).
I'm trying to get SuperCID but I do not own a Windows PC. I downloaded the SDK for Mac on the Android Dev site, but what now? I don't know where to go from there.
Can anyone help me?
Sent From My HTC Sensation 4G Using XDA Premium
Bump to the top.
Sent From My HTC Sensation 4G Using XDA Premium
Avoid trouble. Visit someone with real computer before you'll brick your Sensation.
Mike
sp5it said:
Avoid trouble. Visit someone with real computer before you'll brick your Sensation.
Mike
Click to expand...
Click to collapse
I've seen it's possible, it just wasn't explained In detail.
Sent From My HTC Sensation 4G Using XDA Premium
Set up adb (make sure you have the htc drivers), open utilities, then terminal, cd to your adb directory, write in commands from dev section with ./ in front (ex: ./adb devices)
Couldn't you use VirtualBox on your mac to install linux (ubuntu or something) and do it the proper way using revolutionary.io and the android SDK?
Behold_this said:
Set up adb (make sure you have the htc drivers), open utilities, then terminal, cd to your adb directory, write in commands from dev section with ./ in front (ex: ./adb devices)
Click to expand...
Click to collapse
I thought the drivers could only be set up on Windows.
Sent From My HTC Sensation 4G Using XDA Premium
[GUIDE] Set up ADB & fastboot on Mac OSX
Make sure you have already downloaded the ADB & fastboot files and that they at located in a directory that is easy for you to find (example: /Users/home/Android-sdk/platform-tools).
1) you have two options for using ADB & fastboot:
open terminal and navigate to your directory containing ADB and fastboot **if using this method skip to step 5, also you should note that you will need to add "./" (without the quotes) to the beginning of each ADB or fastboot command (example: ./adb devices)**
configure ADB & fastboot to run natively (recommended) **if using this method proceed to next step**
2) make an entry in ~/.bash_profile configuration file by executing the following command in terminal:
Code:
nano ~/.bash_profile
3) the corresponding file will open in a text editor window, add the following line of text, save your changes, and exit text editor:
Code:
export PATH=${PATH}:your_sdk_dir
(example: export PATH=${PATH}:/Users/home/android-sdk/platform-tools)
4) execute the following command in terminal, then quit terminal:
Code:
source ~/.bash_profile
5) check if all is working by entering the following command in terminal (your phone should be connected to your Mac via USB and must have USB debugging enabled):
Code:
adb devices
(you should see your device serial number returned. if device is not found move on to step 6)
6) if necessary, install HTC driver, and run the above command again - can be done by:
installing naked htc driver (can be found in dev section)
installing PDAnet which installs the drivers for many Android devices
Behold_this said:
Make sure you have downloaded the ADB & fastboot files and that they at located in a directory that is easy for you to find (example: Users/home/Android-sdk/platform-tools).
1) you have two options for using ADB:
open terminal and navigate to your directory containing adb **if using this method skip to step 5
configure adb to run natively **if using this method proceed to next step
2) make an entry in ~/.bash_profile configuration file by typing the following command in terminal:
Code:
nano ~/.bash_profile
3) a new file will open in a text editor, add the following line to text file and save:
Code:
export PATH=${PATH}:your_sdk_dir
(example: export PATH=${PATH}:Users/home/android-sdk/platform-tools)
4) type the following command in terminal then quit terminal:
Code:
source ~/.bash_profile
5) install HTC driver, can be done by:
installing naked htc driver (can be found in dev section)
installing PDAnet which installs the drivers for many Android devices
6) check if all is working by entering the following command in terminal:
Code:
adb devices
(you should see your device serial number returned)
7) follow steps as normal for superCID by entering fastboot commands in terminal (found in dev section)
Click to expand...
Click to collapse
Thanks man.
This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
JAMCx said:
This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
Click to expand...
Click to collapse
Did u allow your pc from the phone when connecting it to adb?
JAMCx said:
This is just with Linux Mint- works in OS X.
adb in Mint works with Nexus 4 and One X every time but the OPO won't show up at all whether stock OS or Mahdi.
Any way to fix?
Click to expand...
Click to collapse
Just "sudo adb devices"
Happens to me on my ubuntu build VM too
bud77 said:
Just "sudo adb devices"
Happens to me on my ubuntu build VM too
Click to expand...
Click to collapse
Didn't work. The OTO does not show up in Mint as a connected device for some reason while the Nexus 4 and One X do and they respond to adb devices.
The OTO says connected as media device, android debugging enabled. Again it does connect and respond in OS X.
JAMCx said:
Didn't work. The OTO does not show up in Mint as a connected device for some reason while the Nexus 4 and One X do and they respond to adb devices.
The OTO says connected as media device, android debugging enabled. Again it does connect and respond in OS X.
Click to expand...
Click to collapse
Did yo follow these steps already ?
If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
Use this format to add each vendor to the file:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.
Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
Now execute:
chmod a+r /etc/udev/rules.d/51-android.rules
Click to expand...
Click to collapse
(From here)
bud77 said:
Did yo follow these steps already ?
(From here)
Click to expand...
Click to collapse
Above my pay grade ... I'll just plug it in the Mac
Thanks though.
Just plugged it into a W7 Pro machine and it saw it as a portable device and let me browse the folders without any tweaking.
JAMCx said:
Above my pay grade ... I'll just plug it in the Mac
Thanks though.
Just plugged it into a W7 Pro machine and it saw it as a portable device and let me browse the folders without any tweaking.
Click to expand...
Click to collapse
Just had the same problem and solved it by creating the file above.
Create the file
sudo vim /etc/udev/rules.d/51-android.rules
add the line below:
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
and reload the the new rules by using this command (or reboot ):
sudo udevadm control --reload
unplug the device and plug it back in and now "sudo adb devices" should show the correct name and status.
Do sudo bash, then password, the adb and fastboot work fine for me. If using windows cmd, run as admin.
So dont ask me why, but I was redoing windows and just for no reason ended up with Ubuntu instead with actually no knowledge of Linux. Still I love trying out new things and I think I am loving Ubuntu so far, only can't get fastboot/adb to work with phone. Honestly I thought it would be easier here than on windows... Alas..
Problem is 'adb devices' when I connect phone within ROM works, (adb debugging enabled), result is:
List of devices attached
3530B61945F400EC device
But when I run the same command from bootloader it does not list any devices.
Even from the ROM when i try fastboot reboot command it just gets stuck on <waiting for device>.
Did some googling and came across:
sudo gedit /etc/udev/rules.d/51-android.rules
and added:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="fasih"
fasih being my username.
Still no luck.
Any help?
*Fastboot Devices Showing nothing On GNU/Linux* <----title correction
Hello people, first of all my native language is not english, so sorry for bad typing.
I am on Arch Linux, this is my first time trying to flash something on my G900-P through my terminal, i had always use ODIN
on Windows just because im lazy and i wanted it be simple, so right now when i type
Code:
adb devices
i can see perfectly
my Galaxy through that, but the problem is when i type
Code:
fastboot devices
it show's anything, i know is something related
to the drivers, but again it's my first time using GNU/Linux to try flashing my device, i have no recovery in my Device, altough i have root
yes i am trying to flash a recovery, but that's not the problem, so if anyone can help me with recognize my device, it will be very helpful,
Here is my /etc/udev/rules.d/51-android.rules cat.
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
Thanks.