5

i'm a developer for driver not app. Recently, i transplant ghostscript to android, it works okay in embedded linux. but it works no okay in Android, because it need /tmp, it can works okay after i create a /tmp. So, my problem is where is the /tmp in android or has other solution in my case ?

kangear
  • 2,493
  • 2
  • 31
  • 44
  • 1
    This post might be helpful to you: http://stackoverflow.com/questions/2364740/where-is-the-temp-folder-in-android-device Good luck! – Bipin Bhandari Jan 14 '14 at 02:58
  • i'm a develper driver not app, i had seen your link. it no help for me. – kangear Jan 14 '14 at 03:01
  • If you're a root dev hobbyist making apps only for your own purposes and don't plan on distributing your stuff, you can abuse `/dev` and do `mkdir -p /dev/tmp`. `/dev` is a small ram disk on some distros and therefore cleared on power off. Useful for basic hacking. – aggregate1166877 Jul 14 '21 at 02:34

1 Answers1

5

Try /data/local/tmp you can even execute from here. Note that you can access /data/local/tmp on unrooted devices (done it on nexus 10), you cannot access /data. You have to address full path.

Chris
  • 2,655
  • 2
  • 18
  • 22
  • 1
    /data/local/tmp very Good but it can be cleanlike PC linux when reboot ? – kangear Jan 14 '14 at 03:41
  • From my exp it does not auto clean, and for me it works as I deploy driver testing tools which want to persist on reboot. You can clean it up yourself though. – Chris Jan 14 '14 at 03:46
  • i fond ghostscript will clean "/tmp" by itself, now i just need redirect it. thank you very much! – kangear Jan 14 '14 at 04:02