[Q] fastboot? (solved) - Kindle Fire General

I have an Ubuntu 11.10 x64 box and I got ADB up and running after adding
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", MODE="0600", OWNER="user"
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0005", MODE="0600", OWNER="user"
to /etc/udev/rules.d/51-android.rules and adding 0X1949 to adb_usb.ini file.
Everything is working fine but fast boot is unresponsive. any ideas?

Did you chmod +x fastboot and added it to your path? I just put mine in platform-tools where adb is

i used sudo chmod 777 on fast boot. I tried running it from platform tools and the tools directory as a normal user and as root.

So "fastboot --help" does nothing?

sorry i should have specified fast boot works fine with my phone but with the kindle it just says waiting for device with ./fastboot reboot and wont list its attached with ./fastboot devices

Okay I got it working by repeatedly entering ./fastboot devices from power on maybe it times out or whatever but it shows up then i can enter fast boot commands as normal. but if i don't hit fast boot devices it wont work at all not ideal but it works.

I am having the same problem as OP. I am running Ubuntu 11.10 x64 and I have always had ADB working just fine with my fire. I am now in fastboot mode using the "factory" cable but my computer does not recognize the device at all. I can not get any fastboot command to work and lsusb does not show any device connected. Any help?

I have these two lines in my udev rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
And everything works fine

foxdog66 said:
I have these two lines in my udev rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
And everything works fine
Click to expand...
Click to collapse
Yep, I have my rules set up just like that
Sent from my ADR6400L

in your /home make a folder called .android then make a file called adb_usb.ini
then add this to the file
%SingleBootLoaderInterface% = USB_Install, USB\VID_1949&PID_0FFF
0X1949
0X0006
finally reboot
then hopefully it will work

Related

adb connection to kindle with linux problems

I'm on unbuntu 11.10, my kindle has CM7 on it, when it's plugged in and I run ./adb devices it shows up as a bunch of question marks and says no permissions. My phone connects fine in adb, so its not a problem with adb. The kindle also connects fine for USB storage and stuff.
i used to have the problem when I was running ubuntu, but even since I started running arch I haven't had that problem. It has something to do with user privelidges and the way I fixed it was by running
Code:
sudo ./adb kill-server
sudo ./adb start-server
./adb devices
stating the adb server using root fixed the problem for me.
btw this isn't the right forum for questions.
Theres no questions forum for the kindle yet. I tried killing and re-starting adb with the sudo command, and it still shows question marks and no permissions
when in run lsusb i get 4 linux foundation root hubs for device1 and for device2 i get
ID 1949:0006 Lab126
Try sudo su or sudo ./adb devices
Sent from my Incredible 2 using XDA App
tried sudo ./adb devices and still question marks and no permissions.
Here's what I know, which isn't much. Maybe some of it will help?
Set up your /etc/udev/rules.d/51-android.rules file like this:
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", MODE="0600", OWNER="<username>"
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0005", MODE="0600", OWNER="<username>"
Replace <username> with your user name.
The kindle reports idProduct 0005 when in recovery (at least mine did).
It's worth a shot.
teookie said:
Here's what I know, which isn't much. Maybe some of it will help?
Set up your /etc/udev/rules.d/51-android.rules file like this:
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0006", MODE="0600", OWNER="<username>"
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="0005", MODE="0600", OWNER="<username>"
Replace <username> with your user name.
The kindle reports idProduct 0005 when in recovery (at least mine did).
It's worth a shot.
Click to expand...
Click to collapse
Yea, this should fix your problem.
Open terminal and do this...
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
which will open up 51-android.rules in gedit so that you can add this rule...
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
Save the document and then close and reopen terminal.
Type...
Code:
adb devices
If you do not see your device try rebooting your computer
I do not have the rule set up the way it is quoted from the above post but you can add that in addition to the rule that I posted here.
This is the way my rules look for all of my devices. Notice that for some devices I have "subsystem" and subsystems" rules set up but there does not seem to be a difference in gaining access for ADB. I think I set up "subsystems" on a few devices a while ago for porting clockwork to a few devices or some other random thing. Either way you should just need the "subsystem" rule that I posted in the code box above.
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="3610", MODE="0666", OWNER="brian"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="d00d", MODE="0666", OWNER="brian"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7820", MODE="0666", OWNER="brian"
Click to expand...
Click to collapse
Good luck!!
(This thread should be moved to General. Mods?)
I was having this issue yesterday as well... Fixed be making sure I edited usb.ini in ./android folder with 0x1949 and 0x0006 then i restarted computer.{ just to feel good about myself} rebooted. typed sudo su put my password in typed ./adb kill-server typed ./adb start-server typed ./adb devices and POW im running just fine. Ubuntu 11.10 here
my linux can't list the deivce
my dmesg is:
[ 1283.317124] usb 2-2: new high speed USB device using ehci_hcd and address 13
[ 1283.434819] usb 2-2: New USB device found, idVendor=1949, idProduct=0006
[ 1283.434828] usb 2-2: New USB device strings: Mfr=5, Product=1, SerialNumber=2
[ 1283.434835] usb 2-2: Product: kindle
[ 1283.434840] usb 2-2: Manufacturer: Amazon
[ 1283.434846] usb 2-2: SerialNumber: 0123456789ABCDEF
----
when I use adb-linux devices, it said nothing. : (includibg run with sudo)
>./adb-linux devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
how can I checked and connect it. my kindle can't boot up, it's always in opening-screen "Kindle fire".
ixc said:
my linux can't list the deivce
my dmesg is:
[ 1283.317124] usb 2-2: new high speed USB device using ehci_hcd and address 13
[ 1283.434819] usb 2-2: New USB device found, idVendor=1949, idProduct=0006
[ 1283.434828] usb 2-2: New USB device strings: Mfr=5, Product=1, SerialNumber=2
[ 1283.434835] usb 2-2: Product: kindle
[ 1283.434840] usb 2-2: Manufacturer: Amazon
[ 1283.434846] usb 2-2: SerialNumber: 0123456789ABCDEF
----
when I use adb-linux devices, it said nothing. : (includibg run with sudo)
>./adb-linux devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
how can I checked and connect it. my kindle can't boot up, it's always in opening-screen "Kindle fire".
Click to expand...
Click to collapse
Did you do what post #9 said?
printf "0x1949\n0x0006\n" >>~/.android/adb_usb.ini
adb kill-server
adb devices
I'm on Ubuntu 11.10. I spent a few hours trying different things, but adding SikYou's rule to 51-android.rules:
SUBSYSTEM=="usb", SYSFS{idVendor}=="1949", MODE="0666"
Click to expand...
Click to collapse
...finally solved the issue for me. "adb devices" now shows my Kindle Fire.

[Linux] Android rules file [12.28.2012]

So this is just to save the people who use Linux and do Android stuff some trouble, it is merely a compiled list of vendor ID's for many phone manufacturers so that ADB and Fastboot can recognize your device.
Note: For other distributions the instructions would be very similar, you would only be swapping out the "/etc/udev/rules.d/51-android.rules" path for one specific to your distro. Consult Google for specifics, but the content of that file can be copied from the download link below and still work.
Instructions (Ubuntu/Ubuntu-based only):
Download this file: 51-android.rules
Open a terminal
Type in
Code:
$ sudo gedit /etc/udev/rules.d/51-android.rules
Open the file you downloaded above and copy and paste the content into the blank file you opened from terminal
Save the file that was originally blank (and now has content) and close it
Back in terminal type
Code:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now you need to restart the udev service, so try the following commands ONE at a time until one of them works (doesn't give errors). If you'd rather NOT restart udev, you can also reboot for the changes to take effect.
Code:
service udev restart
sudo /etc/init.d/udev restart
sudo reload udev
sudo udevadm trigger
In terminal, either cd to your ADB directory (if not set in your $PATH) and run this
Code:
$ ./adb devices
or if it is in your path, run this
Code:
$ adb devices
Any connected devices should show up
You're done, you can now use adb to connect to your Android device, even if you get a new phone as the definitions in the file cover a large range of manufacturers
Download link: 51-android.rules
I will keep this updated if any new manufacturers show up in the Android market.
Nice....I might just be adding this to Mint. As it sits now only HTC devices show in adb all other devices give me the famous
no permissions ?????? Output. But I only add the HTC vendor. Thanks for sure though
Sent from my myTouch_4G_Slide using Tapatalk 2
strapped365 said:
Nice....I might just be adding this to Mint. As it sits now only HTC devices show in adb all other devices give me the famous
no permissions ?????? Output. But I only add the HTC vendor. Thanks for sure though
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
Yup, thats why I keep this file in my dropbox for when I get more devices
And yeah, I remember you said you might be trying out Ubuntu so I just wanted to help out
went from Mint 14 back to Mint 13 today and used this as a 99-android.rules and it worked out for HTC. cant say anything about the rest all i own is HTC. thanks again man
strapped365 said:
went from Mint 14 back to Mint 13 today and used this as a 99-android.rules and it worked out for HTC. cant say anything about the rest all i own is HTC. thanks again man
Click to expand...
Click to collapse
Ubuntu 12.10 recognized my lte on a fresh adb install. I was surprised I had to do no edits since my shift always gave me trouble.lol
Sent from my EVO using xda app-developers app
jesuscash said:
Ubuntu 12.10 recognized my lte on a fresh adb install. I was surprised I had to do no edits since my shift always gave me trouble.lol
Sent from my EVO using xda app-developers app
Click to expand...
Click to collapse
My Shift MyTouch 4G Slide and G2 all throw fits so this made it super easy not to see
????????? No permissions lol
Sent from my myTouch_4G_Slide using Tapatalk 2
jesuscash said:
Ubuntu 12.10 recognized my lte on a fresh adb install. I was surprised I had to do no edits since my shift always gave me trouble.lol
Sent from my EVO using xda app-developers app
Click to expand...
Click to collapse
Lol it shouldnt by default...
Run:
Code:
sudo gedit /etc/udev/rules.d
And see if its empty or not
I'm thinking that maybe when you install the adb tools package, it creates that file for you....i'm not sure though, I install my adb manually by downloading the ADT_Bundle.tar.gz file
But then again, maybe some phones just work :good:
Sent from my PG06100 using xda premium
strapped365 said:
My Shift MyTouch 4G Slide and G2 all throw fits so this made it super easy not to see
????????? No permissions lol
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
That always drove me nuts.
I used to think a lot of the edits didnt work but I just kept forgetting to kill the server and restart it lol
CNexus said:
Lol it shouldnt by default...
Run:
Code:
sudo gedit /etc/udev/rules.d
And see if its empty or not
I'm thinking that maybe when you install the adb tools package, it creates that file for you....i'm not sure though, I install my adb manually by downloading the ADT_Bundle.tar.gz file
But then again, maybe some phones just work :good:
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
Came out empty lol
jesuscash said:
That always drove me nuts.
I used to think a lot of the edits didnt work but I just kept forgetting to kill the server and restart it lol
Came out empty lol
Click to expand...
Click to collapse
Wait the command was supposed to be this, my b:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Sent from my PG06100 using xda premium
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev"
These are all the devices listed on googles website for ADB, Just copy and paste this into your android.rules.
Well i guess you can paste exactly whats in the file I uploaded....
Sent from my PG06100 using xda premium
CNexus said:
Well i guess you can paste exactly whats in the file I uploaded....
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
That's what I did and it was the first time ever it didn't take an 8 digit vendor number. Like how HTC is 0bb4 my Linux installs always wanted 0bb4 : xxxx ( don't remember last 4 )
Sent from my myTouch_4G_Slide using Tapatalk 2
I think it varies between distros
On ubuntu it just takes a 4 digit one
But to make sure i understood...the 4 digit numbers worked for you or not...?
Sent from my PG06100 using xda premium
strapped365 said:
That's what I did and it was the first time ever it didn't take an 8 digit vendor number. Like how HTC is 0bb4 my Linux installs always wanted 0bb4 : xxxx ( don't remember last 4 )
Sent from my myTouch_4G_Slide using Tapatalk 2
Click to expand...
Click to collapse
I think the last 4 are device model specific. I dunno.
Sent from my EVO using xda app-developers app
CNexus said:
I think it varies between distros
On ubuntu it just takes a 4 digit one
But to make sure i understood...the 4 digit numbers worked for you or not...?
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
All I ever run is a derivative of Ubuntu. And have for the last year. I wish my Linux machine would boot Ubuntu full but it won't.
Yes sir by far the easiest way to get adb going. It took me no more than 30 seconds
jesuscash said:
I think the last 4 are device model specific. I dunno.
Sent from my EVO using xda app-developers app
Click to expand...
Click to collapse
I'll have to plug all my devices in a run lsusb again to check. But if I remember right they are. But for some reason my PC needed all 8 before adb would work on any device.
Sent from my myTouch_4G_Slide using Tapatalk 2
Weird. I use 4 digits and adb recognizes the S3 and my shift
Sent from my PG06100 using xda premium
CNexus said:
Wait the command was supposed to be this, my b:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
lol
Hey look, theres stuff in it lol
Sent from my PG06100 using xda premium
CNexus said:
Hey look, theres stuff in it lol
Sent from my PG06100 using xda premium
Click to expand...
Click to collapse
It doesnt match up with my device's vendor ID and stuff lol
jesuscash said:
It doesnt match up with my device's vendor ID and stuff lol
Click to expand...
Click to collapse
Were you ever able to get this to work?

Trouble rooting on ubuntu

OK so I have an old laptop running Ubuntu 10.04lts (because it runs best on that laptop) and no other computer. I was trying to root with the guide on the nexus4root website but when I go to unlock the boot loader it doesn't do anything. And I tried running the toolkit from the sticky with wine but no avail there either. Anyone have advice on how to do this, or do I need to bite the bullet and use a friends PC?
(I got the nexus 4 from T-Mobile, and I'm still very new to Linux. I went to college for computer engineering but lost interest in messing with computers)
Sent from my Nexus 4 using xda premium
This might help (not watched it but Google bought it up)...
http://www.youtube.com/watch?v=VfmulWBobTQ
skaroger867 said:
OK so I have an old laptop running Ubuntu 10.04lts (because it runs best on that laptop) and no other computer. I was trying to root with the guide on the nexus4root website but when I go to unlock the boot loader it doesn't do anything. And I tried running the toolkit from the sticky with wine but no avail there either. Anyone have advice on how to do this, or do I need to bite the bullet and use a friends PC?
(I got the nexus 4 from T-Mobile, and I'm still very new to Linux. I went to college for computer engineering but lost interest in messing with computers)
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Hey, I have a Ubuntu 12.04 LTS machine and successfully unlocked my N4's bootloader and rooted it, but it shouldn't make any difference. Can you post exactly what the following command (which I assumed you entered, without the $ prompt) outputs:
Code:
$ fastboot oem unlock
Setting up your PATH
Also you need to make sure adb and fastboot executables are in your path. I can help you do that:
Open up .bashrc in your home folder with your favorite text editor (mine's gedit, without the $ prompt):
Code:
$ gedit ~/.bashrc
Add the following lines:
Code:
export PATH = ${PATH}:/home/username/android-sdk-linux/platform-tools/
export PATH = ${PATH}:/home/username/android-sdk-linux/tools/
Note:
You need to put the directory where you installed the Android SDK on your machine correctly. The paths above are just examples in my case and probably won't work for you.
Save and exit gedit. Close every Terminal window you have and open up a new one. Test by typing in (without the $ prompt) with an Android device plugged in and USB Debugging checked:
Code:
$ adb devices
Setting up the udev service
Once you're sure adb and fastboot are in your path, you also need to add the extra udev rules for Fastboot and ADB (in recovery) to work. To do that:
As root, create a file called 51-android.rules and put it in /etc/udev/rules.d/ (again with gedit, without the $ prompt):
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Copy and paste the following contents into the file:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
Save and close the file. Then, run the following commands (without the $ prompt):
Code:
$ sudo chmod 644 /etc/udev/rules.d/51-android.rules
$ sudo chown root:root /etc/udev/rules.d/51-android.rules
$ sudo service udev restart
$ sudo killall adb
Disconnect and reconnect your device (making sure it's in Fastboot/bootloader mode) and run the following command (without the $ prompt) to test:
Code:
$ fastboot devices
I used the video, it was a lot better than the written version they had up on the site. Phone is rooted and I'm downloading carbon rom now. Thanks!
Sent from my Amazon Kindle Fire using xda premium

[Guide][7/7/13]Learn Linux Terminal/Setup A Build Environment/HTC Kernel Building

To start I will be adding a lot to this over time so dont be upset if I dont have everything.
To open a terminal without finding it in your programs all you need to do is ctrl+alt+t
Heavily used Commands
cd: this command is used to navigate through your directory's. For example if you have a folder named apps on desktop you would type... cd Desktop...then cd apps.
mkdir: this means make directory or folder. For example cd to your directory then do mkdir whatever. Then you can cd right into that directory ever.
pwd: print working directory. This shows you where you are on the filesystem. This helps if your deep in a directory or folders.
ls: this means list. This tells you all the files in your present working directory.
man: this means manual. This prints like a help page in the terminal to guide you on whatever you need. This can be used for many things.
cp: means copy a file or directory
rm and rmdir: remove a file or like rmdir remove a directory.
mv: move a file or directory
The next command is to issue a command. There are a couple of popular ways of doing so.
First
"./": this is to issue or run a command or file that is in your current directory.
Second
"../": this runs the file that is directly above your current directory.
cat: prints a list of provided text files to the screen.
grep or global regular expression print: searches for patterns or a pattern in a list of files. This is great for small editing if thats what your into and so is.....
diff: compares two text files and displays the differences found between the files on the screen.
history: this is very useful. This shows you a list of your recent commands if you forgot the exact command. To select a command on the list use "!". For example if the label for the command is 00 then type "!00". However most linus OS's allow you to use the up arrow and enter key instead.
Also if you guys dont want a full help list using the "man" command you can use this command: --help
Popular Terminal Commands for Android:
adb: also called android debug bridge is used to issue commands to your phone and debug.
Most people use the following:
adb devices: shows what devices are connected to the computer
adb push and pull: can transfer file from computer to phone and vice versa.
if you want to push an apk to your system make sure that apk is in your adb folder and type: "adb push target.apk system/apps"
adb reboot
adb reboot bootloader
adb logcat: if you are either porting, making roms, or just debugging for a dev you need to know how to logcat. Also if you want to just take the log and make it into a txt file to share just issue the following; "adb logcat -d> logcat.txt"
The logcat will go to your adb folder and save as logcat.txt.
fastboot: is a tool used to update the flash filesystem
I use fastboot for a few things including flashing splashes and flashing recoveries. For example:
Take twrp. To flash to htc one you do...
"fastboot flash recovery twrp.img" presuming you are in your fastboot directory in terminal and the recovery.img is in that folder.
Now as you may know htc uses fastboot to unlock and lock the bootloader using the following commands:
"fastboot oem unlock"
"fastboot oem lock"
Of course you should know this by now you need to be in bootloader under fastboot usb mode.
Now to be able to use fastboot and adb u need sdk and java. Lets start.
"sudo apt-get install openjdk-6-jre openjdk-6-jdk icedtea6-plugin"
This will get u java jdk. Sudo means root and apt-get install means terminal is pulling the file from servers and then installing it.
Next you want sdk. So instead of going all around and downloading it just do this.
" wget http://dl.google.com/android/android-sdk_r20-linux.tgz"
Wget means you are "getting the package".And then you want to extract the file.
"tar -xvzf android-sdk_r20-linux.tgz"
Seeing how the file is a tar "tar -xvzf" extracts that tar. Then cd to the sdk folder and you are good to go.
Speaking of compressing and uncompressing files......
tar -zxvf filename.tar.gz
Untar a tarred and compressed tarball (*.tar.gz or *.tgz).
tar -xvf filename.tar
Untar a tarred but uncompressed tarball (*.tar).
gunzip filename.gz
Decompress a zipped file (*.gz" or *.z).
bunzip2 filename.bz2
Decompress a file (*.bz2) zipped with bzip2 compression.
unzip filename.zip
Decompress a file (*.zip).
Next. Processes.
You know hiw windows has task manager with ctrl+alt+delete. Well here is that for terminal.
ps
(=print status) Display the list of currently running processes with their process IDs (PID) numbers.
kill PID
Force a process shutdown. First determine the PID. Use the command "ps".
bg PID
Send the process to the background.The same can be accomplished with z.
any_command&
Run any command in the background the symbol "&" means run the proceeding command in the background.
killall program_name
Kill program or multiple programs by name. This is useful
lpq
Shows your printing queue.
lprm job_number
Remove a printing job "job_number" from the queue. Alot like windows printing task manager.
lpc
Check and control the printer(s). Type "?" to see the list of available commands.
renice -1 PID
(as root) Change the priority of a running process to -1. Make sure you are Root.
*
Ill add more later. My fingers are tired.
Here are some useful admin commands
printtool
Configuration tool for your printer(s).
linuxconfig
(as root, either in text or graphical mode). You can access and change hundreds of setting from it. Be careful.
adduser user_name
Create a new account (you must be root).
userdel user_name
Remove an account (you must be a root).
passwd
Change the password on your current account. If you are root, you can change the password for any user using: "passwd user_name"
chmod perm filename
Change the file access permission for the files you own. You can make a file accessible in three modes: read (r), write (w), or execute (x) to three classes of users: owner (u), group (g), or others (o).
ls -l filename
Checks the files current permissions.
If the file is accessible to all users in all modes it will show:
rwxrwxrwx
The first triplet shows the file permission for the owner of the file, the second for that group, the third for others. A no permission is shown as "-".
su
You will be asked for your password. Type "exit" to return you to your previous login. Don't work on your machine as root. Use it only when you need it.
fdisk
(as root) Linux hard drive partitioning utility. The program gparted I think is better. To install gparted just like many other programs us the command "sudo apt-get install gparted".
fsck -t ext2 /dev/hda2
Check and repair a filesystem.
Instructions For Setting up a Build Environment for Linux
Make sure you are 64-bit
Have a big hard drive
A good amount of ram
If you dont have java already. Get it.
sudo apt-get install openjdk-6-jdk
You will also need python
Code:
sudo apt-get install python
And git
Code:
sudo apt-get install git-core
Android SDK:
I showed you guys how to get it in the first post.
Now open your home folder and press Ctrl+H to show hidden files, and open up a file called .bashrc.
Add these lines to the bottom of .bashrc:
Code:
# Android tools
export PATH=${PATH}:~/SDK/tools
export PATH=${PATH}:~/SDK/platform-tools
export PATH=${PATH}:~/bin
Now you should also find .profile file in the same place you found .bashrc file. Add this to that file:
Code:
PATH="$HOME/SDK/tools:$HOME/SDK/platform-tools:$PATH"
After that you need to install these packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
On Ubuntu 12.04:
Code:
sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
Also this:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Now Configure your USB.
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
A blank text will open and now add this code and save:
Code:
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"
Once you have saved the file type this:
Code:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Now install your repository:
Type the following:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > ~/bin/repo
chmod a+x ~/bin/repo
Now all you have to do is initialize your repository and then make a working folder and sync:
mkdir WORKING_FOLDER
cd WORKING_FOLDER
So lets just say you want to sync and build cm10.1 you need the repo so once you cd into the directory type this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
While that runs in the terminal it is going to ask you to put in your name and email address.
Once all thats done just type:
Code:
repo sync
And your good to go. Thats where I stop for now. Any questions just ask.
How to build a sense kernel from source
Judging that you are reading this and going to try and build a kernel make sure you have looked at the previous posts above as they may be needed to complete this task.
Below is the readme from htc dev's website. But why do all this work. Lets use Linux and bash scripts to our advantage.
Code:
defconfig file: m7wls_defconfig (arm-eabi-4.6)
Download:
=========
If you are not already using an AOSP toolchain (included in an AOSP build tree), download the corresponding official android toolchain for the arm-eabi specified above for this device:
git clone [url]https://android.googlesource.com/platform/prebuilt[/url] for 4.4.3
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6[/url] for 4.6
(use darwin-x86 in place of linux-x86 for mac)
Build the kernel:
=================
set the following environment variables:
export TOP= [where you installed the toolchain or top of android AOSP code base]
export PATH=$TOP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:$PATH (use corresponding arm-eabi bin path)
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make [the defconfig file for this device above]
make clean (for subsequent builds)
make -j4 (in this example 4 is the number of processors of your build machine)
Output Binary Files:
====================
After the build process is finished, there should be a file named "zImage" found in arch/arm/boot/
If you are building a rom with this kernel ZImage, copy it into your build's output folder and rename it to "kernel".
You will also need the following kernel modules. These will eventually be installed into /system/lib/modules on the device.
kernel modules:
./driver/*.ko
The only thing I will ask you to get are the following.
-Download the source from htcdev.
-Get your toolchain and put it in your desired folder. Do that with this command.
**On a sidenote you need to know your devices defconfig and what toolchain your device uses. (This is given on the top of the readme as per the one above.)**
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6"
-for me I put the toolchain in my directory like this. It is different for each toolchain and device. It doesn't matter. /android/kernel/**toolchain**. That's where the extracted toolchain is.
-Next step open a file and add the following text. Make sure the file is executable so you can run it. Add this....
echo "~m7wls STOCK KERNEL COMPILER~"
cd Kernel-m7wls
export ARCH=arm CROSS_COMPILE=/android/kernel/toolchain/arm-eabi-4.6/bin/arm-eabi-4.6-
echo "Cleaning up source"
make clean && make mrproper
date +%Y%m%d%H%M > CURRENT_VERSION
echo "Making config"
make m7wls_defconfig
echo "Adding Current Version to Kernel"
cp CURRENT_VERSION .version
echo "Building Kernel"
make -j4
echo "Kernel ready"
cp -f arch/arm/boot/zImage /android/kernel/htcone/STOCK-m7wls/zImage
echo "Copying modules"
rm -f /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/*
find . -name "*.ko" -exec cp {} /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/ \;
cd /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/
for i in $(find . | grep .ko | grep './')
do
echo $i
/android/kernel/toolchain/arm-eabi-4.6/bin/arm-eabi-4.6-strip --strip-unneeded $i
done
echo "Stripped Modules"
echo "All done,Press Enter to Quit"
read ANS
Click to expand...
Click to collapse
-This is a quick script that does all the work for me. No need to add paths, etc. As long as your folders and filed match the paths of the script all will be ok. Now this script will have to be edited to suite your computer and the destinations of your kernel folders.
-Now once the script is fully correct and everything is setup just cd to the directory your script is in and type the following assuming your file name is m7wls type:
Code:
./m7wls
Once the script has fully run. It should take a while in the folders I made you should see zImage and kernel modules. From there you will need to know how to pack the kernel.
Notice if you downloaded sprints htc one kernel source the source is named m7wls-jb-crc-3.4.10-eb45596. I changed this to just m7wls to make it easier for the script.
Finally, remember you will have to make directories to suit the script for example this line "rm -f /android/kernel/htcone/STOCK-m7wls/boot.img-ramdisk/lib/modules/*" this is where the modules go "*" but I had to make these folders first boot.img-ramdisk/lib/modules/.
If you followed my instructions and did your own fooling around you should have a sense kernel built from source. This is not for beginners. If you have any questions just ask. Message me if you really need some more help.
Happy Building!
Reserved just in case.
Im gonna feel tempted for one more if i really want to add to more.
Is anyone finding this guide useful??
Sent from my HTCONE using xda premium

You Don't Have to Enter OEM Code '0x2b4c' Each Time When Doing ADB

All you need to do is add the following lines to your /etc/udev/rules.d/51-android.rules
#Zuk
SUBSYSTEM=="usb", ATTR{idVendor}=="0x2b4c", MODE="0666"
After that just execute 'sudo service udev restart' without quotes.

Categories

Resources