- Close Android File Transfer
- Open Activity Monitor and kill “Android File Transfer Agent”
- Go to where you installed “Android File Transfer.app” (I have it under /Applications)
- Ctrl+click –> “Show package contents”
- Go to Contents/Resources
- Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
- Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
-
-
Save zeroseis/ce66d4c6b776577442a6 to your computer and use it in GitHub Desktop.
You can use HandShaker if you don't mind the company being based in China.
Removing execution permissions for the agent in ~/Library
and /Applications
is enough
chmod -x ~/Library/Application\ Support/Google/Android\ File\ Transfer/Android\ File\ Transfer\ Agent.app/Contents/MacOS/Android\ File\ Transfer\ Agent /Applications/Android\ File\ Transfer.app/Contents/Helpers/Android\ File\ Transfer\ Agent.app/Contents/MacOS/Android\ File\ Transfer\ Agent
I used the einsteinx2 solution but found an error in step 5.
- In Settings app > Users & Groups > Login Items, first unlock the settings panel then remove the Android File Transfer Agent entry
- Open a Terminal and sudo -s
- Change permissions on the agent app: chmod 000 /Applications/Android\ File\ Transfer.app/Contents/Helpers/Android\ File\ Transfer\ Agent.app
- Change ownership to root on the agent app: chown root:wheel /Applications/Android\ File\ Transfer.app/Contents/Helpers/Android\ File\ Transfer\ Agent.app
/* this line is incorrect, the slashes after Support and Google should be forward slashes */
5. Delete the Application Support directory: rm -r ~/Library/Application\ Support\Google\Android\ File\ Transfer
/* the corrected line 5 is as follows */
5. rm -r ~/Library/Application\ Support/Google/Android\ File\ Transfer
- Open Activity Monitor and force kill the Android File Transfer Agent process
I tried all solutions but this one was the simplest and the best one of for me.
I dragged the Android File Transfer icon to Trash.
Lol
Go to Contents/Resources
should be
Go to Contents/Helpers
macOS 10.15.3 with Android File Transfer 1.0.11
Go to Contents/Resources
should be
Go to Contents/Helpers
macOS 10.15.3 with Android File Transfer 1.0.11
👍
nice, thanks~
@krischik thank you, still working perfectly on macos big sur m1 👌
In case anyone wants to try out an open-source alternative that apparently is way better https://github.com/ganeshrvel/openmtp/releases
@krischik Fixed the missing check for ${HOME}/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app
.
The updated script
#!/bin/zsh
typeset PID=$(ps -fe | grep "[A]ndroid File Transfer Agent" | awk '{print $2}')
if [[ -n ${PID} ]]; then
kill ${PID}
fi
for AFT in \
"/Applications/Android File Transfer.app" \
"/Applications/Sync/Android File Transfer.app" \
"${HOME}/Library/Application Support/Google/Android File Transfer"
do
echo "### Look for agents in “${AFT}”"
if test -e "${AFT}"; then
for AFTA in \
"${AFT}/Contents/Resources/Android File Transfer Agent.app" \
"${AFT}/Contents/Helpers/Android File Transfer Agent.app" \
"${AFT}/Android File Transfer Agent.app"
do
echo "# Look for agent “${AFTA}”"
if test -e "${AFTA}"; then
mv -v "${AFTA}" "${AFTA}.DISABLE"
fi
done; unset AFTA
fi
done; unset AFT
osascript -e 'tell application "System Events" to delete every login item whose name is "Android File Transfer Agent"'
Just try delete the "Andoird File Transfer Agent" in System Preferences > Users & Groups > Login Items
It adds itself back.
Thank you @krischik & @thenamangoyal 🙏
@krischik Fixed the missing check for
${HOME}/Library/Application Support/Google/Android File Transfer/Android File Transfer Agent.app
.The updated script
#!/bin/zsh typeset PID=$(ps -fe | grep "[A]ndroid File Transfer Agent" | awk '{print $2}') if [[ -n ${PID} ]]; then kill ${PID} fi for AFT in \ "/Applications/Android File Transfer.app" \ "/Applications/Sync/Android File Transfer.app" \ "${HOME}/Library/Application Support/Google/Android File Transfer" do echo "### Look for agents in “${AFT}”" if test -e "${AFT}"; then for AFTA in \ "${AFT}/Contents/Resources/Android File Transfer Agent.app" \ "${AFT}/Contents/Helpers/Android File Transfer Agent.app" \ "${AFT}/Android File Transfer Agent.app" do echo "# Look for agent “${AFTA}”" if test -e "${AFTA}"; then mv -v "${AFTA}" "${AFTA}.DISABLE" fi done; unset AFTA fi done; unset AFT osascript -e 'tell application "System Events" to delete every login item whose name is "Android File Transfer Agent"'
It wokers for me, thanks!
Great explanation, thanks. I think you will be interested in this article.
Dear Google: 🖕
@ballo Sincerely, everyone.
openmtp
Thanks for sharing ! This soft is great !
The permissions trick worked great for me. All I did was:
- In Settings app > Users & Groups > Login Items, first unlock the settings panel then remove the Android File Transfer Agent entry
- Open a Terminal and
sudo -s
- Change permissions on the agent app:
chmod 000 /Applications/Android\ File\ Transfer.app/Contents/Helpers/Android\ File\ Transfer\ Agent.app
- Change ownership to root on the agent app:
chown root:wheel /Applications/Android\ File\ Transfer.app/Contents/Helpers/Android\ File\ Transfer\ Agent.app
- Delete the Application Support directory:
rm -r ~/Library/Application\ Support\Google\Android\ File\ Transfer
- Open Activity Monitor and force kill the Android File Transfer Agent process
That's it. I confirmed that re-opening the Android File Transfer app no longer adds the launch entry or makes the copy to Application Support directory and the app no longer auto-launches when a device is plugged in.
Works for me. Thanks.
@einsteinx2
Thanks! It's a clean way indeed. This was really getting me nuts, every f**** time that damn app open, while I don't asked for it. Garbage.