cancel
Showing results for 
Search instead for 
Did you mean: 

Installing an Android in Linux (Ubuntu)

anticpated
Level 30: Meditator
  • 3417 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.

 

Indubitably true. Samsung S21 Ultra and Xiaomi 14 Ultra
Message 1 of 11
5,529 Views
10 REPLIES 10

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

I wish I could be more comprehensive with some screenshots and what not. 

Indubitably true. Samsung S21 Ultra and Xiaomi 14 Ultra
Message 11 of 11
1,006 Views