[GUIDE] How-To Automount Your Note 10.1 to Linux with MTP - Galaxy Note 10.1 Android Development

NOTE: These instructions will work the same for the Galaxy S3 GT-I9300. You will just obviously have to adjust the ENV{ID_MODEL} parameter below as well as what you want to name the mount point.
[steps adapted from here]
So with Google's insistence on using MTP for file transfer, it's made it difficult for Linux users out there. So here are the steps I use for my Linux box to connect my Note 10.1 so that I can copy files back and forth.
INSTALL MTPFS
Download and install go-mtpfs (http://hanwen.home.xs4all.nl/public/software/go-mtpfs/). I downloaded the go-mtpfs.amd64.ca2e2c82 pre-compiled binary since I am using an AMD box with 64-bit Linux. Download your version as appropriate. The install instructions are:
1. Download the appropriate version
2. Load a terminal and navigate to the location of the download, most likely ~/Downloads
3. Type the following commands:
Code:
sudo chmod +x go-mtpfs.amd64.ca2e2c82
sudo cp go-mtpfs.amd64.ca2e2c82 /usr/local/sbin/go-mtpfs
SETUP MOUNT POINT
You need to setup a mount point for the computer to automount the tablet to. The steps are:
Code:
sudo mkdir /media/note10
MODIFY UDEV RULES
1. Type the following commands in to create a .rules file for the MTP setup
Code:
sudo nano /etc/udev/rules.d/99-android-mtp-phones.rules
2. Copy the following into the .rules file
Code:
# Samsung Galaxy Note 10.1 MTP mode
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", ACTION=="add", ENV{ID_MODEL}="GalaxyNote10"
# Samsung Galaxy Note 10.1 PTP mode
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6866", ACTION=="add", ENV{ID_MODEL}="GalaxyNote10"
# Samsung Galaxy Note 10.1 : automount when plugged in
ENV{ID_MODEL}=="GalaxyNote10", ACTION=="add", RUN+="/usr/bin/sudo -u root /usr/local/sbin/go -mtpfs -allow-other=true /media/note10"
# Samsung Galaxy SIII : umount when unplugged
ENV{ID_MODEL}=="GalaxyNote10", ACTION=="remove", RUN+="/bin/fusermount -u /media/note10"
3. CTRL-O to save (if you are in nano)
4. CTRL-X to exit (if you are in nano)
5. Type the following to reset your udev service
Code:
sudo service udev restart
That is it. Now you can plug your Note 10.1 into your computer and it will automount to the directory. You can browse to the /media/note10 folder now

Thanks mate that will be helpful .
Regards.

Somehow it does work and somehow it does not work on my ubuntu laptop ...
the good thing: mtp is working fine and i can copy paste what ever i want FROM and TO the note.
"bad" thing: it is not mounted in the media dir but when i plug it in it automounts it as "SAMSUNG_Android" in mtp://[usb:003,002]/
All in all it i dont care about it as long as its well integrated into nautilus and unity dash
thanks dude, well done!
:good:

Related

Nexus 4 and Linux users

A discussion thread for all my linux friends out there!
----
I'm using ArchLinux with my Nexus 4.
Found a new mtp mounting tool http://research.jacquette.com/jmtpfs-exchanging-files-between-android-devices-and-linux/ . Might give it a shot.
Also I would recommend checking out https://wiki.archlinux.org/index.php/Android . Has some good information relevant to all distributions.
---
jmtpfs is definitely one of the best tools for mounting the Nexus 4 to your filesystem.
Code:
mkdir /tmp/nexus && jmtpfs /tmp/nexus
# Unmount / cleanup
fusermount -u /tmp/nexus && rm -r /tmp/nexus
tim.smart said:
A discussion thread for all my linux friends out there!
----
I'm using ArchLinux with my Nexus 4.
Click to expand...
Click to collapse
Are you refering to only users that are using Linux on their Nexus 4's or any user that uses Linux also?
I'm on OpenBSD (not some Linux) but this should still be relevant. Hate using MTP, and it's terribly supported. I installed an sshd server (DropBear SSH Sever II on the play store) which I enable each time I need to transfer files, and then just use scp. This also lets me shell into the phone without relying on adb or typing in a terminal emulator on my phone.
Unfortunately, I haven't been able to install the android SDK on OpenBSD, so that means no fastboot and adb. Thankfully almost everything can be done from the recovery, but in the rare case where I do need to use fastboot, I have to boot to Windows.
Every android device runs Linux
Sent from my SPH-D710 using Tapatalk 2
donec said:
Are you refering to only users that are using Linux on their Nexus 4's or any user that uses Linux also?
Click to expand...
Click to collapse
People who use Linux computers to interact with their Nexus 4.
Does jmptfs use Java for operation? Otherwise a great tool, would be cool to automate.
Sent from my Nexus 4 using xda app-developers app
Then that's me.
Anyone know if the Nexus4 can connect to Ubuntu 12.10 out of the box via USB?
castlefox said:
Anyone know if the Nexus4 can connect to Ubuntu 12.10 out of the box via USB?
Click to expand...
Click to collapse
Yes it will.
Though on Linux Mint, I have had no luck with the 51-android.rules file
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Samsung - Nexus 7 & 10
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
Click to expand...
Click to collapse
I still have to use sudo for adb/fastboot
I just start a FTP server app on the phone and then transfer files with Filezilla. Easy enough.
If you use Linux you can use QtADB:
http://qtadb.wordpress.com/
Also, if you install an SSH server on your phone you can use sshfs:
sshfs -p 22 [email protected]:/ /mnt/nexus4
I believe it uses SFTP, so you need to make sure your SSH server supports SFTP. I gave up on MTP, it only gives you access to /sdcard and writing files has never worked for me.
rootdisk said:
If you use Linux you can use QtADB:
http://qtadb.wordpress.com/
Also, if you install an SSH server on your phone you can use sshfs:
sshfs -p 22 [email protected]:/ /mnt/nexus4
I believe it uses SFTP, so you need to make sure your SSH server supports SFTP. I gave up on MTP, it only gives you access to /sdcard and writing files has never worked for me.
Click to expand...
Click to collapse
sshfs has saved my ass on more than one occasion. Will have to give it a shot later on.
What kind of transfer speeds are you getting with it?
rootdisk said:
Though on Linux Mint, I have had no luck with the 51-android.rules file
Click to expand...
Click to collapse
In one of those rules you are using SYSFS not ATTR. Not sure if it makes a difference - I haven't read any of the udev documentation.
You will also need to add a user group to identify the id with. My Nexus 4 rule:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE=="0666", GROUP=="users"
Replace "users" with a user group you are in. `groups` command lets you know what groups are associated with your user.
Using Ubuntu 13.04 (I know alpha, but already far better than 12.10 for me and my graphics).
For MTP, i'm doing this: http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html
Follow the steps:
Code:
sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs go-mtpfs-unity
Then go into Dash Home, type in Mount Android Device. Click and drag the icon to your launcher. It's not auto-mount, but works well on any Android device i've tried so far. When you plug in your Android device (tested on Galaxy Nexus, Nexus 4, and Nexus 7), unlock it, then, right click on the Android icon, and select Mount Android Device (not the bold text, normal text). Instantly there in Nautilus. When done, make sure unlocked, then right click / unmount. Easy.
Haven't had any issues at all with adb setup either, very easy. Only things I had to do were:
Install Java;
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Then Install SDK (I extracted to /home/%user%/Android) and add in platform tools.
Then edit bashrc;
Code:
sudo gedit ~/.bashrc
Add to end of file:
Code:
# Android tools
export PATH=${PATH}:~/Android/tools
export PATH=${PATH}:~/Android/platform-tools
Save/close.
Then log out/in or just reboot;
Code:
sudo reboot
adb devices = works straight away, no udev rules required.
Haven't had to test fastboot yet, but will check that out sometime soon.
Automount MTP (source: http://www.tuxtrix.com/2012/12/how-to-automount-nexus-4-and-nexus-7-in.html):
Config fuse
Code:
sudo chmod a+r /etc/fuse.conf
sudo gedit /etc/fuse.conf
remove the hash from infront of:
#user_allow_other
to be
user_allow_other
save and close. now download/install go-mtpfs:
Code:
sudo add-apt-repository ppa:webupd8team/unstable
sudo apt-get update
sudo apt-get install go-mtpfs
Now setup mount directories:
Code:
sudo mkdir /media/nexus4
sudo chmod 777 /media/Nexus4
sudo mkdir /media/nexus7
sudo chmod 777 /media/Nexus7
Add udev rules:
Code:
sudo gedit /etc/udev/rules.d/99-android.rules
Add in the following (change "yourloginid" to your Ubuntu username):
Code:
# Google Nexus 7 MTP mode : automatic mount when plugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e41", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e42", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e41", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e42", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/nexus7"
# Google Nexus 7 MTP mode : automatic unmount when unplugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4e41", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e41", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
ENV{ID_MODEL}=="Nexus_7", ENV{ID_MODEL_ID}=="4e42", ACTION=="remove", RUN+="/bin/umount /media/nexus7"
# Google Nexus 4 MTP mode : automatic mount when plugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee1", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee2", ACTION=="add", RUN+="/usr/bin/sudo -u yourloginid /usr/local/sbin/go-mtpfs -allow-other=true /media/Nexus4"
# Google Nexus 4 MTP mode : automatic unmount when unplugged (all android versions)
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee1", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee1", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
ENV{ID_MODEL}=="Nexus_4", ENV{ID_MODEL_ID}=="4ee2", ACTION=="remove", RUN+="/bin/umount /media/Nexus4"
Restart udev:
Code:
sudo service udev restart
Add rules to fstab to allow easy mount/unmount without root:
Code:
sudo gedit /etc/fstab
Add in this to the end of the file:
Code:
DeviceFs(Nexus\0407) /media/nexus7 fuse.DeviceFs(Nexus\0407) allow_other,rw,user,noauto 0 0
DeviceFs(Nexus\0404) /media/Nexus4 fuse.DeviceFs(Nexus\0404) allow_other,rw,user,noauto 0 0
Remount all drives:
Code:
sudo mount -a
Done.
But I prefer the other method (manual mount/unmount) with the icon up top of this post, so not using this method anymore.
tim.smart said:
sshfs has saved my ass on more than one occasion. Will have to give it a shot later on.
What kind of transfer speeds are you getting with it?
Click to expand...
Click to collapse
Here is a breakdown of read & write for SSHFS, ADB & MTP. One thing to note, I gave up on MTPFS because it was very slow connecting to my Nexus 4. These tests use Simple-MTPFS:
https://github.com/phatina/simple-mtpfs
I used the source RPM found here to build an RPM for Fedora 16:
http://arm.koji.fedoraproject.org/koji/packageinfo?packageID=14698
There are also some other alternatives as described here:
https://wiki.archlinux.org/index.php/MTP
Write speed for SSHFS:
sshfs -p22000 [email protected]:/ /mnt/nexus4
[email protected]'s password:
dd of=/mnt/nexus4/sdcard/testfile if=/dev/zero bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 85.9756 s, 1.2 MB/s
Read speed for SSHFS:
dd if=/mnt/nexus4/sdcard/testfile of=/dev/null
200000+0 records in
200000+0 records out
102400000 bytes (102 MB) copied, 81.5803 s, 1.3 MB/s
Read speed for ADB:
adb pull /sdcard/testfile /dev/null
4533 KB/s (102400000 bytes in 22.060s)
Write speed for ADB:
adb push testfile /sdcard/testfile
3755 KB/s (102400000 bytes in 26.624s)
Write speed for MTP using Simple-MTPFS:
time dd of=/mnt/nexus4/testfile if=/dev/zero bs=1024 count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 3.64969 s, 28.1 MB/s
real 0m17.138s
user 0m0.074s
sys 0m1.418s
Read speed for MTP using Simple-MTPFS:
time dd if=/mnt/nexus4/testfile of=/dev/null
200000+0 records in
200000+0 records out
102400000 bytes (102 MB) copied, 0.100472 s, 1.0 GB/s
real 0m5.779s
user 0m0.019s
sys 0m0.083s
One thing to note is that when using MTP, dd returned rather fast results but didn't seem quite accurate. So using time shows a more accurate result. With SSHFS & ADB, there was no real difference between time vs dd.
Cannot mount on Ubuntu 12.10 64bit
[update]: Installed gmtp and it works... that looks like easier way to access my device..
I did all the steps described in another thread to mount my nexus 4 to ubuntu 12.10 64bit. I get the below message. Any help in pointing what's wrong will be great.
Code:
Listing raw device(s)
Device 0 (VID=18d1 and PID=4ee2) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
18d1:4ee2 @ bus 1, dev 5
Attempting to connect device
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Error 7: Found a bad handle, trying to ignore it.
Listing File Information on Device with name: (NULL)
chroot arch on the nexus 4
Hey, fellow linuxers! I've been looking around the forum and I haven't found any tutorials about how to run Arch Linux on the Nexus 4. So, I'm thinking on making my own. Any pointers to people doing something similar?
I'm going to open the thread in a minute, but I'll fill it out as I figure stuff up. Cuz, I've been messing with linux for a long time now, but this is my first project in Android. All help is welcomed.
Does Ubuntu work on Toshiba satellite laptops,?
Sent from my Nexus 4 using Tapatalk 2
I've always used the USB camera mode for transferring files to Android devices (several Nexus 4's, several Nexus 7's, a Galaxy S3 and Note 2). Always worked for me even when I was on Linux Mint Lisa (I'm now running Nadia). It limits me to the DCIM folder, which is not a problem as I use file manager and choose multi-files to move them to their proper destination.
Since only 2 Nexus 4's and 7's are mine and my wife's, I tell the other people to use file manager to move the files around and no one has had problems, either. The move function in file manager takes only a few seconds to complete even when the files are gigabytes in size. This works on non-rooted stock devices.
I do have a VMplayer WinXP that I've used for rooting and installing custom rom's our Nexus devices. MTP mode works fine inside the VM.
I use android terminal for md5sum-checking critical files (ie new ROM version).

[ROOT] Motoshare 2: Old Bug, New Exploit by djrbliss

As Promised Today djrbliss a.k.a Dan released Root Exploit for XT910 And Droid Bionic which running on Jellybean..
For now Technically not possible to root on windows but may be in future one click root tool will be available from Dan..
First to root you Have to use Linux. Preferably 32Bit if u have Ubuntu in Ur Computer proceed if not u can try LiveCd to root your Phone.
Once you Booted into Ubuntu..
Type
Code:
mkdir /tmp/share
Install Samba Package
Code:
sudo apt-get install samba
Edit the Config for file samba as mentioned Below
Code:
sudo gedit /etc/samba/smb.conf
add the following Lines as mentioned below
Code:
[share]
path = /tmp/share
available = yes
valid users = guest
read only = yes
browsable = yes
public = yes
save it then Create username through this command
Code:
sudo useradd guest -m -G users
then Set password
Code:
sudo passwd guest
Then restart Samba Server
Code:
sudo restart smbd
Download the Files
Code:
cd /tmp/share
wget http://vulnfactory.org/public/motoshare2.tgz
tar xvf motoshare2.tgz
sudo chmod 755 run.sh
you'll need to know the IP address of your Linux host, which you can get by running "ifconfig" from your terminal it should be 192.168.xx.xx not 127.5.xx.xx
Now take your Smartphone and Enable usb Debugging and the make sure that youare connected through WIFI
Open Stock "Files" r "Filemanger App"3rd party apps wont work
Open the "Files" app, and select "Remote storage". Click "Add storage", and fill in fields as follows:
Code:
Host IP address: [your Linux machine's IP address]
Domain name: WORKGROUP
Shared folder name: share
User: guest
Password: [the password you created above]
your phone will be mounted in Linux share to complete process plug in your Phone to Computer Via usb and then type following command
Code:
cd /tmp/share/
sudo ./run.sh
Congrats!u are rooted your RAZR XT910 And Droid Bionic..
Every Credit Goes to Dan Rosenberg i take no credits ....im just posting to help people...
Donate to Dan
http://goo.gl/zBGb0
Original Thread
So you took my post, which was written in perfect English, and actually spent time re-writing it to make it harder to read? Why?
Please see the original post at http://www.droidrzr.com/index.php/topic/16518-root-motoshare-2-old-bug-new-exploit/ for the most up-to-date instructions. If you re-post things like this, it becomes very hard for me to update the instructions.

Install ADB on Windows & ubuntu 12.04 or 12.10

If you need to flash ROM even using fastboot for Smartphone or Tablet in which they use Android OS! Then Ubuntu OS is needed!
This is a guide I made for ubuntu users and included a guide for windows users to setup Android SDK which contains ADB.
Android Debug Bridge (ADB) provides a terminal interface on your PC to interact with your device's file system. This can be useful for many things like installing & uninstalling apps, logcat, backup & restore, and hacking your device just to name a few.
ubuntu 12.04 & 12.10 Guide
1. Go here and download android-sdk (not the adt-bundle)....
https://hotfile.com/dl/241406263/5e6a306/android-sdk_r22.0.5-linux.tgz.html
2. Place the downloaded file in your home folder and then extract it and you should get a folder named android-sdk-linux (do not rename it).
3. If you’re on a 64bit machine run these commands in terminal to make sdk compatible with 64bit (if you’re on 32bit machine then skip this step)....
sudo apt-get update
sudo apt-get install ia32-libs-multiarch
4. Run this command in terminal to install jdk if you don’t have it already....
sudo apt-get install openjdk-6-jdk
5. Navigate to the home folder where you extracted android-sdk-linux and open the folder then open the folder named tools
6. Inside the tools folder there will be a file named android... double click it and select run then android sdk manager will open.
7. In the center pane deselect everything... Now only select the following....
Android SDK Tools
Android SDK Platform-tools
Android Support Library
8. Once selections have been made click on install packages and wait till finished.
9. Upon completion of step 8 in terminal run this command....
sudo gedit ~/.bashrc
When the file opens, go to the very bottom and copy/paste the following 3 lines (make sure they’re each on separate lines)....
# Android tools
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
10. Now reboot your computer.
11. Set your phone to usb debugging then plug it to your pc after pc is done booting
12. Open a terminal on your pc and enter....
adb devices
If all went well, you should see your phone’s serial number and you’ll be ready to go.
~~~~~Important~~~~~
You can use steps 5 & 6 to open Android SDK Manager & update your ADB/SDK installation. Only select your installed packages then update.
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Thank...
gazhead said:
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Thanks man! It's also good way!
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
qtoon said:
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
Click to expand...
Click to collapse
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
atmu5fear said:
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
Click to expand...
Click to collapse
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
qtoon said:
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
Click to expand...
Click to collapse
Thanks @qtoon for the reply. I'm not really new to Ubuntu, albeit, it's been a while. First started using it just prior to the realease of Hardy Heron 8.04 LTS. That being said I am certainly no expert, but am somewhat familiar and comfortable with the command line. I did read the README file before posting, but since I'm not all that familiar with configuration files and the like, I figured maybe I should ask.
As per your suggestion i moved the ADB binary to my home folder, not necessarily my working folder, but to test to see if the adb command would be recognized in terminal.
Code:
mv ~/ADB/android-sdk-linux/platform-tools/adb ~/
Still got same result so I moved it back, then went on to make a new file and add the suggested string
Code:
sudo > /etc/udev/rules.d/80-atmu5fear-adb
sudo gedit /etc/udev/rules.d/80-atmu5fear-adb
After saving and restarting udev I still get the same "adb command not found" error.
I then changed the string to read OWNER"atmu5fear" instead of "username", still nothing
Any more suggestions?
Thanks
atmu5fear
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
I get this error...
[email protected]:~$ sudo > /etc/udev/rules.d/80-sjy-phone
bash: /etc/udev/rules.d/80-sjy-phone: Permission denied
ok....... didn't need to add a file, changed phone usb mode to media device and all is ok.
thanks
atmu5fear said:
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
Click to expand...
Click to collapse
Didn't think to mention that, apologies.
Quick 'why' on the ./ here.
Glad you got it running.
Just tried on 14.4 and worked like a charm.
Note: No need to reboot the computer, just reload the bash config with
Code:
source ~/.bashrc
Thanks
A good step by step guide
i will try it and see if it works
Thanks again
Hello, can someone help me ? - I m having problems connecting my device with adb (I ve connected several other devices before with no problems).
I ve got an Allwinner A20 tv box, it worked fine for a few months then one day, after being on (but idle) for a few hours, I noticed the screen was blank but the light on the front was blue (indicating it was on, red is standby). It would not respond to the remote control or to anything, so I unplugged it and since then it will not boot and the screen is blank, the red light will light up but that is it. I ve eliminated the remote controller not working, but I cant boot the device.
So I ve tried connecting via ADB (with Ubuntu) but I cant get the device to show up after typing "adb devices".
Using this guide:
http://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
I can get the vendor id and device id and I ve added it and the manufacturer to udev/modeswitch devices, but when I type "sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W"
I get the following error:
~/Android/sdk/platform-tools$ sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1f3a
DefaultProduct= 0xefe8
SierraMode=1
NeedResponse=0
Look for default devices ...
found USB ID 048d:1336
found USB ID 1d6b:0002
found USB ID 19a8:2036
found USB ID 1f3a:efe8
vendor ID matched
product ID matched
found USB ID 1d6b:0001
found USB ID 062a:0102
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 004 on bus 003
Current configuration number is 1
Use interface number 0
USB description data (for identification)
-------------------------
Manufacturer: not provided
Product: not provided
Serial No.: not provided
-------------------------
Send Sierra control message
Error: Sierra control message failed (error -7). Abort
I ve searched Google for the error code but I cannot find anything.
The device was rooted and USB debugging was on.
Any help would really be appreciated.
Thanks

How to set up Android SDK in Linux

*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!
I'm doing this guide because when I switched to arch linux ,I found no guides to setup sdk in it.Arch is a beautiful OS, but for newcomers like me ,I took some time to get used to it.So,In this guide, we’ll take a look at how to set up a development environment for Android in Arch linux(or Arch based Linux Distros) so you can start working on your Projects.Most of the Arch Linux are pro linux users so there is really no need of this guide, but this guide is meant for those who are switching from ubuntu/mint/fedora/any other disto which are not based on Arch, to say it in short its meant for new users of Arch Linux. Anyway Let's set up.
First let's set see how to install Platform tools.
Setting up platform-tools in UBUNTU(or Ubuntu based distros/Linux Mint)
In ubuntu platform tools can be setup very easily.
1.Open terminal(Default shortcut is ctrl+alt+T)
2. Type "sudo apt-get install android-tools-adb" (this will install the adb)
3. Type "sudo apt-get install android-tools-fastboot"(this will install the fastboot)
Step 4: Check whether the above tools are working by typing an adb command. For e.g. "adb devices"
Now its time to install SDK in Ubuntu and set it up but before that let me tell you there is already a great thread by matt95.You can see the guide and thank him herehttp://forum.xda-developers.com/showthread.php?t=2302780
Fedora/CentOS/RedHat
First lets install Eclipse[You can also use Android Studio if you want]
Code:
sudo yum install eclipse-jdt
Now lets download the sdk from here. http://developer.android.com/sdk/index.html. Its about 500mb , Just wait and let it downlaod. Once the download is done extract it wherever you want.
For newcomers I recommend to extract it to 'home'.So the file is now extracted inside /home/user/AndroidSDK .
Now lets setup .bash_profile file so that we can access adb anywhere or else you have to type the whole location again use the adb command which is lot of work . So let's shorten it up.
Type "sudo vim .bash_profile"in terminal.
Code:
PATH=$PATH:$HOME/AndroidSDK:$HOME/AndroidSDK/tools
export PATH
# For SDK version r_08 and higher, also add this for adb:
PATH=$PATH:$HOME/AndroidSDK/platform-tools
export PATH
Now lets install android plugin for eclipse.
Open Eclipse and click on Help.Select Install New Software. Then click Add, at the top right of that window. Type in Android Plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the address.
Once this is done, click on the Available Software Sites hyperlink below the Add button, then highlight the Android Plugin source and click on Reload. Now exit this window, and choose Android Plugin from the “Work with” dropdown menu. Choose the developer tools option that you see here and Proceed with the installation.
After the installation configure your Android virtual devices.
ARCH LINUX(or Arch based Distros)
Lets install android sdk
Open terminal and type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk/android-sdk.tar.gz
Note:- If terminal shows wget is not found. Type this in the terminal
Code:
pacman -Suy && pacman -S wget
Once it fetches the tarball, lets extract it by typing
Code:
tar -xvzf android-sdk.tar.gz
wait for it to finish. Change the directory to android-sdk by using the command
Code:
cd android-sdk
.
Now lets make the package by using the command
Code:
makepkg -s
now lets install it by typing
Code:
sudo pacman -U *.pkg.tar.xz
Platform tools for Arch
Let's install platform-tools now.Just like above steps ,well get a package and install it.
1. Type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk-platform-tools/android-sdk-platform-tools.tar.gz
2.Type
Code:
tar -xvzf android-sdk-platform-tools.tar.gz
3.Change directory.
Code:
cd android-sdk-platform-tools
4.
Code:
makepkg -s
5.Install it
Code:
sudo pacman -U *.pkg.tar.xz
All the files are installed in /opt/android-sdk/ . Just like we had .bash_profile in FEDORA, we use symbolic links in Arch linux to use commands from anywhere .
Code:
sudo ln -s /opt/android-sdk/platform-tools/adb /usr/bin/adb //this one's for adb
sudo ln -s /opt/android-sdk/platform-tools/fastboot /usr/bin/fastboot //This one's for Fastboot
sudo ln -s /opt/android-sdk/tools/ddms /usr/bin/ddms //This is for DDMS
sudo ln -s /opt/android-sdk/tools/android /usr/bin/android //This is for Android
Now run android by typing "android" in terminal. :good:
Simple as that. If you are yet to switch to Arch linux then I recommened you to use "BBQLinux " its an Arch linux for Android developers. It comes with most of the things needed for android development. You can download it from Here.
Thanks for reading this. Help me by giving me e-books.:angel:
PM me or post here if you have any doubts. :victory:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Pirateghost said:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks for the reply, I havent tried pacaur repository though. Will give it a try soon.:good:
sorry, I made an error:
Code:
pacaur -S android-sdk android-sdk-platform-tools android-udev android-studio android-sdk-build-tools
you dont need both platform and build tools, it looks like build-tools is more recent. if you want eclipse instead of android studio, just use 'eclipse-android' instead of android-studio

Arch Linux - Lightweight Custom Environment Setup

Arch Linux - Lightweight Custom Environment Setup Instructions​
NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​
This article is an alternative to the R method from my minimal Arch Linux instructions which you can find here, so don't do anything from here unless you have Arch Linux already installed either from my instructions or from the wiki! This instructions consists of the following packages for creating the custom environment:
i3: dynamic tiling window manager
LightDM: login page
tint2: bottom bar
rofi: application launcher
xfce4-terminal: lightweight terminal
nitrogen: wallpaper tool
thunar: lightweight file manager
autotiling: better autotiling for the window manager
PulseAudio and pavucontrol: audio manager
This has been tested in VMs and on my main computer.
--
Table of Content:
I. Lightweight Custom Environment Installation
II. Optional Notes
--​
I. Lightweight Custom Environment Installation​
R. Installing the Custom Environment
First let's enable NetworkManager, type this (do this if you came here after following my own Arch Linux installation instructions and you want to continue step R from here, or else connect to your internet in any way you want):
sudo systemctl enable NetworkManager
Reboot by typing "reboot", then after the reboot type "nmtui" and connect to your internet.
Next, update your system by typing:
sudo pacman -Syu
Now let's install these packages: xorg-server, lightdm, i3-gaps and tint2. Type:
Note: you can replace "lightdm-gtk-greeter" with another greeter of your choice, check here: https://wiki.archlinux.org/title/LightDM#Greeter
sudo pacman -S xorg-server lightdm lightdm-gtk-greeter i3-gaps tint2
After the packages are installed, enable lightdm by typing:
sudo systemctl enable lightdm
Now let's setup LightDM, type this in order to edit the config:
sudo nano /etc/lightdm/lightdm.conf
Change the [Seat:*] section, which is this:
...
greeter-session=lightdm-yourgreeter-greeter
...
Instead of "yourgreeter" replace it with the greeter you installed, for example in this case it's "gtk".
Type "reboot" to reboot your system, you should see the login page. Login to i3 (not the one with "(with debug log)", click the arrow and change to "i3") and follow the steps to create config file. After creating the config file, you can continue:
Go to TTY by doing the combination (usually ALT+SHIFT+F2) and run this:
sudo cp /etc/i3/config ~/.config/i3/
Now let's setup tint2 by adding this at the bottom of the i3 config file (run this command to be able to edit the config file: sudo nano $HOME/.config/i3/config):
exec --no-startup-id tint2
Now let's install rofi and xfce4-terminal by running this command:
sudo pacman -S rofi xfce4-terminal
Exit TTY by doing the combination (usually ALT+SHIFT+F1), if you're facing issues just reboot pc.
ALT+Enter (after logging in from the login page) is the combination to open terminal.
Now let's finish setting up rofi, do the combination above to open the terminal and run this command in it:
sudo nano ~/.config/i3/config
Go to the "start dmenu (a program launcher)" section, comment the second line, it should be like this:
# bindsym Mod1+d exec --no-startup-id dmenu_run
the # is commenting the line. And uncomment the third line, which is:
bindsym Mod1+d exec "rofi -modi drun,run -show drun"
the # should be gone
Then save by CTRL+S and close by CTRL+X and reboot your system.
Now we will configure i3 further for tint2, remove the following from the i3 configuration file:
# Start i3bar to display a workspace bar (plus the system information i3 status
# finds out, if available)
bar {
status_command i3status
}
This will be at the bottom of the config file ^ it removes i3bar so only i3 would start.
Then reboot your system by typing "reboot" in the terminal.
After rebooting, when doing the combination ALT+D it opens the application menu.
This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:
(Let’s install git in order to install yay afterwards with it)
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Nitrogen and Thunar to have a wallpaper tool and a file manager by running this command:
sudo pacman -S nitrogen thunar
Check here for more information about Nitrogen and how to use it: https://wiki.archlinux.org/title/nitrogen#Usage
And add this at the bottom of the i3 config file:
exec nitrogen --restore &
Now let's install the user folders (Documents, Pictures...) by installing this package:
sudo pacman -S xdg-user-dirs
Then run this in terminal:
xdg-user-dirs-update
Now let's install autotiling https://aur.archlinux.org/packages/autotiling by running this command:
yay -S autotiling
Add "exec_always --no-startup-id autotiling" to the ~/.config/i3/config file.
At last, let's install PulseAudio by running this command:
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol
Now reboot your PC and enjoy! You should have memorized how to do this already, it's straight forward and simple.
II. Optional Notes​
Type this in the command in the terminal to check the themes available for rofi:
rofi-theme-selector
For controlling the volume, install this package:
yay -S pnmixer
And then add this at the bottom of your i3 config file:
exec_always pnmixer
Restart your PC
In order to fill your wallpaper fullscreen with Nitrogen, you can do it with this command:
nitrogen --set-zoom-fill /path/to/image.png
That's it! Let me know how it goes with you
I use some of these packages now, like Thunar over Dolphin, myself, in most cases, but still end up going back to Dolphin in certain situations. For one, it handles loading thumbnails better and faster, so browsing images is easier.
Everybody loves xfce4-terminal. Even Arch users!
SerjSX said:
Arch Linux - Lightweight Custom Environment Setup Instructions​
NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​
This article is an alternative to the R method from my minimal Arch Linux instructions which you can find here, so don't do anything from here unless you have Arch Linux already installed either from my instructions or from the wiki! This instructions consists of the following packages for creating the custom environment:
i3: dynamic tiling window manager
LightDM: login page
tint2: bottom bar
rofi: application launcher
xfce4-terminal: lightweight terminal
nitrogen: wallpaper tool
thunar: lightweight file manager
autotiling: better autotiling for the window manager
PulseAudio and pavucontrol: audio manager
This has been tested in VMs and on my main computer.
--
Table of Content:
I. Lightweight Custom Environment Installation
II. Optional Notes
--​
I. Lightweight Custom Environment Installation​
R. Installing the Custom Environment
First let's enable NetworkManager, type this (do this if you came here after following my own Arch Linux installation instructions and you want to continue step R from here, or else connect to your internet in any way you want):
sudo systemctl enable NetworkManager
Reboot by typing "reboot", then after the reboot type "nmtui" and connect to your internet.
Next, update your system by typing:
sudo pacman -Syu
Now let's install these packages: xorg-server, lightdm, i3-gaps and tint2. Type:
Note: you can replace "lightdm-gtk-greeter" with another greeter of your choice, check here: https://wiki.archlinux.org/title/LightDM#Greeter
sudo pacman -S xorg-server lightdm lightdm-gtk-greeter i3-gaps tint2
After the packages are installed, enable lightdm by typing:
sudo systemctl enable lightdm
Now let's setup LightDM, type this in order to edit the config:
sudo nano /etc/lightdm/lightdm.conf
Change the [Seat:*] section, which is this:
...
greeter-session=lightdm-yourgreeter-greeter
...
Instead of "yourgreeter" replace it with the greeter you installed, for example in this case it's "gtk".
Type "reboot" to reboot your system, you should see the login page. Login to i3 (not the one with "(with debug log)", click the arrow and change to "i3") and follow the steps to create config file. After creating the config file, you can continue:
Go to TTY by doing the combination (usually ALT+SHIFT+F2) and run this:
sudo cp /etc/i3/config ~/.config/i3/
Now let's setup tint2 by adding this at the bottom of the i3 config file (run this command to be able to edit the config file: sudo nano $HOME/.config/i3/config):
exec --no-startup-id tint2
Now let's install rofi and xfce4-terminal by running this command:
sudo pacman -S rofi xfce4-terminal
Exit TTY by doing the combination (usually ALT+SHIFT+F1), if you're facing issues just reboot pc.
ALT+Enter (after logging in from the login page) is the combination to open terminal.
Now let's finish setting up rofi, do the combination above to open the terminal and run this command in it:
sudo nano ~/.config/i3/config
Go to the "start dmenu (a program launcher)" section, comment the second line, it should be like this:
# bindsym Mod1+d exec --no-startup-id dmenu_run
the # is commenting the line. And uncomment the third line, which is:
bindsym Mod1+d exec "rofi -modi drun,run -show drun"
the # should be gone
Then save by CTRL+S and close by CTRL+X and reboot your system.
Now we will configure i3 further for tint2, remove the following from the i3 configuration file:
# Start i3bar to display a workspace bar (plus the system information i3 status
# finds out, if available)
bar {
status_command i3status
}
This will be at the bottom of the config file ^ it removes i3bar so only i3 would start.
Then reboot your system by typing "reboot" in the terminal.
After rebooting, when doing the combination ALT+D it opens the application menu.
This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:
(Let’s install git in order to install yay afterwards with it)
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Nitrogen and Thunar to have a wallpaper tool and a file manager by running this command:
sudo pacman -S nitrogen thunar
Check here for more information about Nitrogen and how to use it: https://wiki.archlinux.org/title/nitrogen#Usage
And add this at the bottom of the i3 config file:
exec nitrogen --restore &
Now let's install the user folders (Documents, Pictures...) by installing this package:
sudo pacman -S xdg-user-dirs
Then run this in terminal:
xdg-user-dirs-update
Now let's install autotiling https://aur.archlinux.org/packages/autotiling by running this command:
yay -S autotiling
Add "exec_always --no-startup-id autotiling" to the ~/.config/i3/config file.
At last, let's install PulseAudio by running this command:
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol
Now reboot your PC and enjoy! You should have memorized how to do this already, it's straight forward and simple.
II. Optional Notes​
Type this in the command in the terminal to check the themes available for rofi:
rofi-theme-selector
For controlling the volume, install this package:
yay -S pnmixer
And then add this at the bottom of your i3 config file:
exec_always pnmixer
Restart your PC
In order to fill your wallpaper fullscreen with Nitrogen, you can do it with this command:
nitrogen --set-zoom-fill /path/to/image.png
That's it! Let me know how it goes with you
Click to expand...
Click to collapse
Hi, what are the keyboard shortcuts for the i3 tiling window manager?
$cronos_ said:
Hi, what are the keyboard shortcuts for the i3 tiling window manager?
Click to expand...
Click to collapse
Hello! Check these out:
i3 - ArchWiki
wiki.archlinux.org
i3 - Reference Card
i3 is a dynamic tiling window manager with clean, readable and documented code, featuring extended Xinerama support, usage of libxcb instead of xlib and several improvements over wmii
i3wm.org

Categories

Resources