cancel
Showing results for 
Search instead for 
Did you mean: 

Installing an Android in Linux (Ubuntu)

anticpated
Level 30: Meditator
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

The first thing you need to do is make sure USB Debugging is enabled on your device. Go to the Settings and look for Developer Options. If you can't see it, scroll down to About.

 

Press the text where is states the version of Android up to 7 times. A message should appear to say Developer Mode is now enabled.

 

Go back into the menu and select Developer Options and enable USB debugging. Otherwise the device will not be recognised when you plug in the USB cord.

 

Next within Linux you need to bring up a Terminal (Command line).

 

You don't need any special drivers -- all you need is to make your device known. A few simple steps can accomplish this when your device is connected via USB:

sudo lsusb
[...]
Bus 002 Device 054: ID 18d1:4e22 Google Inc. Nexus S (debug)

See the two hex values separated by a colon: 18d1:4e22 This is the manufacturerID:deviceID you need to tell the system to handle. So as root:

sudo su -
cd /etc/udev/rules.d
vi 51-android.rules

In this file, add a line (you can use the editor of your choice, of course -- my example uses vi)

# MyDeviceName
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e22", MODE="0666" GROUP="androiddev", SYMLINK+="android%n"

This example uses the values from above lsusb output -- you need to replace them by yours. Now, to let your changes take effect:

sudo service udev reload

Final step: Disconnect your device, and reconnect it. It should be recognized now.

 

These instructions are generic and should work across a host of distributions. What should happen is, your mobile should be usable as a drive.

 

For software updates this will depend on your handset.

 

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 1 of 11
5,150 Views
10 REPLIES 10

anticpated
Level 30: Meditator
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

On a sidenote: 

 

For people using an iDevice you can try the below. 

 

libimobiledevice

There’s a piece of software available for Linux called libimobiledevice. This library – as the name implies – tells the computer how to communicate with iOS devices, like the iPhone and iPad.

If you’re running the most recent release of your favorite Linux distribution then libimobiledevice is most likely already installed. If you’re unsure whether you do actually have it installed or you know you don’t, you can install it easily with your respective package manager.

Ubuntu users would input the following command into Terminal: sudo apt-get install libimobiledevice

Fedora users should use: sudo yum install libimobiledevice.

If the package is already installed, the command will tell you so and exit. You can search “libimobiledevice” in your respective package manager for other Linux distributions.

Connect It!

 

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 2 of 11
5,043 Views

viridis
Level 56: Guvnor
  • 13532 Posts
  • 106 Topics
  • 309 Solutions
Registered:
Just one thing
"Press the text where is states the version of Android up to 7 times. A message should appear to say Developer Mode is now enabled."

Multi tapping "android version" will bring up the easter egg, developer mode is enabled by tapping "build number"
Message 3 of 11
5,026 Views

anticpated
Level 30: Meditator
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

Yes thank Viridis, I couldn't quite word that part properly.

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 4 of 11
5,000 Views

sheepdog
  • 3310 Posts
  • 31 Topics
  • 39 Solutions
Registered:

Or if you're slightly more geeky and slightly diverging away the subject: put an android emulator on your pc using virtual box!

 

The article is a little old but it seems that Genymotion is a simpler, faster way to emulate Android for development. 

Message 5 of 11
4,980 Views

anticpated
Level 30: Meditator
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

Cool info.

 

Although that does go beyond the scope of the original topic, that's useful to know. Now the big thing unless somebody knows would be connecting an Android handset to Mac OS X.

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 6 of 11
4,978 Views

anticpated
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

https://www.android.com/filetransfer/

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 7 of 11
4,960 Views

blissgirl
Level 33: Firestarter
  • 7228 Posts
  • 46 Topics
  • 3 Solutions
Registered:
@anticpated all gobbdy **bleep** to me
iPhone 15 plus 128Gb light pink (with Vodafone) slight_smile
Message 8 of 11
4,924 Views

anticpated
Level 30: Meditator
  • 3412 Posts
  • 164 Topics
  • 53 Solutions
Registered:

Well....

 

To keep the topic on track.

 

This is a guide on how to use your Android Tablet/Phone with a Linux.

 

Fedora and Ubuntu although are both Linux are different types of distributions. Fedora is based on Red-Hat and Ubuntu is based n Debian which means slightly variations in commands and operating kernels. However they are the same in principle.Lets leave that point at that and not overall complicate things. Anybody who is using either of their products or indeed FreeBSD or any other Unix-like OS will be aware of this.

 

The whole point of this post was to demonstrate that is possible with a minimum of fuss to install your Android or indeed Apple based device within Linux. This does mean you still have a 3rd option and aren't confined to one of two operating systems to use your phone/tablet.

 

If security concerns you then one of those networking based operating systems should suffice and most stuff is free apart from enterprise licenses. Whilst not bulletproof, out of the box you are secured by default with no need for 3rd party software.

 

Anyway just installing some Windows 7 Updates......not fun.

 

 

 

Samsung Galaxy S10, Samsung Galaxy S21 Ultra
Message 9 of 11
4,892 Views

Toby
Former Staff
  • 11577 Posts
  • 520 Topics
  • 213 Solutions
Registered:

Lovely to see more guides @anticpated , great job

Fancy writing a great device review or O2 forum guide? Send me a message!

Get involved:
• New to the community? This is how you get help.
• Want to know who we are? Come and say hi to us.
• Want to have a chat? Drop me a direct message.

Message 10 of 11
4,869 Views