Can't upload big file to Android Device

Hello! I recently faced an issue trying to upload big file to Android tablet. It doesn't detect with MTP so I tried to push it via ADB. But I get this error:

$ adb push myfile /sdcard
adb: error: 65544-byte write failed: Success

How can I fix it? Why is this happening? Storage space is enough:

EDIT: I want to use it for app devlopment, so I need ADB or quick MTP for app installing.

21 points · 24 comments · view on lemmy.world

24 Comments

Fisch@discuss.tchncs.de · 4 pts · 1y (7 replies)

Is /sdcard really the correct path? Maybe try /storage/emulated/0? That's the internal storage

user_naa@lemmy.world · 1 pts · 1y (6 replies)

Same error. Plus /sdcard is just symlink to /storage/emulated/0/

Fisch@discuss.tchncs.de · 1 pts · 1y (5 replies)

Yeah but sometimes stuff like this works even if it seems to make no sense. If both of your devices are on the same wifi, maybe you can just use something to transfer it using that like KDE Connect. If you don't want to install anything, you could even try using SSH.

user_naa@lemmy.world · 1 pts · 1y (4 replies)

It will be very inconvenient to transfer app via KDE Connect on every Android Studio build

Cris16228@lemmy.today · 2 pts · 1y (3 replies)

Android studio has it's own way to install, just enable wireless debug in devs settings (tap 7 times the build number in software info) and connect it to android studio. That's how I do it and just click the "play" button and studio does everything automatically

user_naa@lemmy.world · 1 pts · 1y (2 replies)

Yes, but it crashes with "connection reset" if app is big enough.

Fisch@discuss.tchncs.de · 1 pts · 1y

That's really weird. Have you tried if it's something as simple as the cable? You could also try using wireless adb if you can't get it to work over the cable at all. I also always use wireless adb, it still allows Android Studio (or in my case VS Code) to automatically install it on your device but I find it a lot easier anyways because it just connects automatically and you don't have to plug anything in first.

Cris16228@lemmy.today · 1 pts · 1y

Uh I didn't know that

Sabin10@lemmy.world · 4 pts · 1y (1 reply)

A little old skool maybe but why not try ftp?

viking@infosec.pub · 2 pts · 1y

Would be my go-to as well. I'm using x-plore file manager on my phone to start an ftp server, and then push files via filezilla from my computer. Easy, and compatible with every OS out there.

lemmeBe@sh.itjust.works · 2 pts · 1y (2 replies)

Did you try LocalSend maybe?

user_naa@lemmy.world · 1 pts · 1y (1 reply)

It works, but my Wi-Fi is very slow

Onomatopoeia@lemmy.cafe · 1 pts · 1y

It'll be quicker than MTP because it's actually reliably consistent, unlike MTP.

Since MTP is an unreliable hack, I've found using a "slow" wireless connection to work better.

TheBat@lemmy.world · 1 pts · 1y (3 replies)
[ removed ]
user_naa@lemmy.world · 2 pts · 1y (2 replies)

197MB

TheBat@lemmy.world · 2 pts · 1y (1 reply)
[ removed ]
user_naa@lemmy.world · 2 pts · 1y

I edited post to explain why I need ADB

blue_potato@lemm.ee · 1 pts · 1y (5 replies)
[ removed ]
user_naa@lemmy.world · 1 pts · 1y (4 replies)

Yes, didn't help

blue_potato@lemm.ee · 1 pts · 1y (3 replies)
[ removed ]
user_naa@lemmy.world · 1 pts · 1y (2 replies)

Fedora 41 with latest adb from repos

blue_potato@lemm.ee · 1 pts · 1y (1 reply)
[ removed ]
user_naa@lemmy.world · 1 pts · 1y

ADB and Android Studio works perfectly with any other Android phone, so I think it is likely not PC issue. Small files and apps can also be pushhed/installed

lka1988@sh.itjust.works · 1 pts · 1y (4 replies)

Does your PC actually see your phone via adb? What's the output of adb devices?

user_naa@lemmy.world · 1 pts · 1y (3 replies)

Yes, I can even shell into it or pull/push small files

onlinepersona@programming.dev · 1 pts · 1y (2 replies)

How old is this phone? My guess is corruption at hardware level.

If you can shell into it and have dd or something, try to write a simple file to e.g dd if=/dev/zero of=/sdcard/testfile bs=1MB count=200 If that fails when directly on the device, you can rule out network issues.

You can also try downloading a file from the web that's about the size of your file or serving your file on the local WLAN with python3 -m http.server and accessing it on your phone. Just to see what happens.

Anti Commercial-AI license

user_naa@lemmy.world · 1 pts · 1y (1 reply)

I can't do it until I formatted data. After it file can be downloaded from net, but adb still fails.

lka1988@sh.itjust.works · 1 pts · 1y

Shooting from the hip here, but it sounds like the storage chip may be dying. I have a 128GB Pixel 1XL that crashes if I use more than ~20GB of space.

burgersc12@mander.xyz · 1 pts · 1y

I'd check the cable. Might be a POS that only works for the bare minimum of tasks.