6

adb push error: remote couldn't create file: Operation not permitted

 2 years ago
source link: http://siongui.github.io/2022/01/02/adb-push-error-operation-not-permitted/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

adb push error: remote couldn't create file: Operation not permitted

January 02, 2022

When I tried to adb push file to Google Pixel 3 XL running Android 12. The following error occurred:

$ adb push story-2022-01-01T19:02:47+08:00-1641034967.mp4 /sdcard/DCIM/Camera/
adb: error: failed to copy 'story-2022-01-01T19:02:47+08:00-1641034967.mp4' to '/sdcard/DCIM/Camera/story-2022-01-01T19:02:47+08:00-1641034967.mp4': remote couldn't create file: Operation not permitted

I tried to Google search the error message but the posts I found told me to re-mount or root the phone, which did not work for me.

Before this I have successfully adb pushed files to the phone so the probably the problem is not about mount or root. Then I tried to search illegal character android file name and found that the problem was the : character is not allowed in the file name on Android 12. After replacing the : with allowed character, I successfully pushed the file to the phone.


References:

[1]filenames - What characters allowed in file names on Android? - Stack Overflow


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK