I have an old, small-screen device running Android 4.0.4 that still works perfectly. As someone who dislikes e-waste, I use it for app development, giving ancient devices a useful afterlife. Consequently, some of my apps maintain a minimum SDK API level of 15.
This guide, mainly for my own future reference, shows the exact steps to make such a device show up in adb devices and consequently in Android studio on Ubuntu 24.04.
1. Confirm that the device is visible over USB
First, confirm that Linux actually sees the device at the USB level. In a terminal run lsusb. With the phone connected, you should see a line like:
Bus 005 Device 013: ID 0fce:6180 Sony Ericsson Mobile Communications AB Android
- 0fce is the vendor ID for Sony Ericsson.
- 6180 is the product ID for this specific device/firmware.
If you see such a line, USB connectivity is fine and udev/adb configuration is the missing piece.
2. Create a udev rule for the device
Linux uses udev rules to assign permissions to USB devices. By default, non‑root users are often not allowed to talk to Android devices via ADB. Creating a custom rules file fixes that.
Create or edit the file:
sudo nano /etc/udev/rules.d/51-android.rules
Add a minimal vendor‑only rule (recommended starting point):
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
This tells udev: "Any USB device with vendor ID 0fce should be world‑readable and belong to group plugdev".
If you want to be more specific, you can additionally match the product ID:
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", ATTR{idProduct}=="6180", MODE="0666", GROUP="plugdev"
Save and exit, then set correct permissions and reload the rules:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
Unplug and re‑plug the phone after this.
Note: The filename doesn’t have to be 51-android.rules. Any NN-something.rules under /etc/udev/rules.d works, the number only affects processing order.
3. Configure ADB’s vendor list
adb maintains its own list of USB vendor IDs that are treated as potential Android devices. Adding the Sony Ericsson vendor ID to this list avoids some detection issues.
Create or edit:
nano ~/.android/adb_usb.ini
Append the Sony Ericsson vendor ID (one per line) 0x0fce. Save the file, then restart the ADB server and verify that it sees the device:
adb kill-server
adb start-server
adb devices
You should see something like:
List of devices attached
YT9101PVNF device
Android Studio will now typically detect it automatically.
Summary
To make an old Sony Ericsson Android device (e.g. 0fce:6180) work with ADB and Android Studio on Ubuntu 24.04:
- Confirm the device appears in lsusb.
- Create a udev rule in /etc/udev/rules.d/51-android.rules for vendor 0fce (and optionally product 6180).
- Add 0x0fce to ~/.android/adb_usb.ini.
- Use adb devices to confirm connectivity, then select the device in Android Studio.
You can adapt this procedure for other legacy Android devices by changing the USB vendor and product IDs reported by lsusb.
Related StackOverflow posts:
- https://askubuntu.com/questions/518479/ubuntu-doesnt-recognize-android-devices-anymore
- https://askubuntu.com/questions/863587/adb-device-list-doesnt-show-phone
No comments:
Post a Comment