title: How to read/write file as root using Kivy for Android?
body: <p>I would like to write to /etc/hosts in my Kivy app, and I've surely a rooted device to test. I tried several ways but always get my app exit without any warning or error.</p>
  
  <p>I've tried:</p>
  
  <p><code>subprocess.Popen("su -c touch /etc/hosts", shell = True)</code></p>
  
  <p><code>subprocess.Popen("su -c bash -c touch /etc/hosts", shell = True)</code></p>
  
  <p><code>subprocess.Popen(["su", "-c", "bash -c touch /etc/hosts"])</code></p>
  
  <p>and several combinations of them. Every time I can get the su app message box asking me for permission and I pressed "Allow", but my app exits after that.</p>
  
  <p><strong>EDIT</strong>: logcat output is at <a href="http://pastebin.com/YMT5Vxra" rel="nofollow">http://pastebin.com/YMT5Vxra</a></p>
  
  <p>Many thanks if anyone can give any suggestion!</p>