Have you been working on an app and you decided to deploy your android app to your phone, only to find out that when you plug the phone into one of the USB ports, the Android File Transfer app pops up and then you find that your built-in keyboard and trackpad does not work? Or worse, have you ever wanted to just charge your phone only to find out that you computer’s keyboard and trackpad stops working when you plug the phone into the USB port?
The TL;DR plug in another USB device (such as a flash drive) and the computer should reconnect the keyboard and trackpad again. Sometimes it takes a couple of tries. There are also more permanent solutions such as removing the Android File Transfer Agent app.
The main culprit is the Android File Transfer Agent app which runs in the background and is supposed to listen to connections on the USB port and launch the Android File Transfer app when it detects and Android phone. I am assuming it’s doing this via device ID. Anyway, it seems that something goes horribly wrong with this detection process which results in your keyboard and trackpad being (virtually) “ejected” from their connections.
This has been a long running issue with seemingly no fix from the app’s developers as can be seen in this thread. It seems the issue was closed without any resolution. This is a terrible situation for Macbook owners since it can ruin their Android experience. I am forever hopeful that this issue will be fixed soon, since the Android File Transfer is sometimes the only way to transfer large files from your phone to your computer and vice versa.
There is a simple fix to this, which is to plug in another USB device, or to unplug the phone and plug it back in. There are also more permanent fixes which involve:
- Disable the Android File Transfer app from your the login items for your desktop. Go to System Preferences > User & Groups > Login Items and remove Android File Transfer by selecting it and clicking the minus symbol.
- Rename the Android File Transfer Agent app from the Applications folder. Go to your Applications folder and right click it and click on Show Contents. You should see a folder called Contents and inside this folder another folder called Resources. Find the Android File Transfer Agent app and rename it to something else, such as “Android File Transfer Agent.app.stop”. This way if you would like to enable it again, you can just remove the “.stop” at the end of the file name.
This post is based on an article I read here