Is there any location on an android device that we can push a file (using adb) if the device has no SD card and we do not have root access?
(I am trying to push a properties file onto the device, so I will also need to be able to read from this location inside an activity running on the device)
Every device has the capacity to be different. On some phones, such as the Samsung Galaxy S Vibrant, the /sdcard/ mount is writeable by any host connected through adb. On others, such as the MyTouch 4G, 'adb push' cannot send any files to any destination at all.
If you are testing with just one or two devices, open an adb shell
and issue commands such as df
and ls -l
to see what mount points there are, and the file permissions, respectively.
If your user can execute find
on the Android device, that's a real boon and you can probably use that to locate files writeable by the current effective uid (or writeable by all).
Some directories to try:
/sdcard /data /tmp /opt
You've probably already seen the adb page but I'm linking it just in case.
Example df
output:
$ df /dev: 318068K total, 64K used, 318004K available (block size 4096) /system: 558668K total, 468920K used, 89748K available (block size 4096) /data: 1190256K total, 129868K used, 1060388K available (block size 4096) /cache: 294628K total, 16720K used, 277908K available (block size 4096) /devlog: 21100K total, 6056K used, 15044K available (block size 4096) /mnt/asec: 318068K total, 0K used, 318068K available (block size 4096) /mnt/obb: 318068K total, 0K used, 318068K available (block size 4096) /app-cache: 8192K total, 0K used, 8192K available (block size 4096)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With