I am getting
open failed: EACCES (Permission denied)
EACCES (Permission denied)
on the line OutputStream myOutput = new FileOutputStream
OutputStream myOutput = new FileOutputStream
Change a permission property in your /system/etc/permission/platform.xml and group need to mentioned as like below.
/system/etc/permission/platform.xml