Android root problems

Until android 6, I was able to bypass the external SD write problem, but now it’s really affecting me, so I decided to try the root mode.

It appeared to work… more or less. I was unable to change any config with the ST android wrapper, but I could access the web interface and make the changes there. It worked well, until I restarted ST. Then it forced closed and the toast message about getting root access was always popping up. With the logcat I think there is a permission issue with the config.xml file. Maybe because the main ST process runs as root and changes files but then the wrapper does not have access to those files.

ConfigXml: Failed to open config, moving to config.xml.invalid and creating blank config com.nutomic.syncthingandroid: type=1400 audit(0.0:1027): avc: denied { unlink } for comm=4173796E635461736B202331 name=“config.xml.invalid” dev=“mmcblk0p25” ino=51780 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0 tclass=file permissive=1 com.nutomic.syncthingandroid: type=1400 audit(0.0:1028): avc: denied { rename } for comm=4173796E635461736B202331 name=“config.xml” dev=“mmcblk0p25” ino=51784 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:app_data_file:s0 tclass=file permissive=1 FragmentManager: moveToState: Fragment state for DeviceListFragment{ca63e88 #1 id=0x7f0d006d android:switcher:2131558509:1} not updated inline; expected state 3 found 2 chmod : type=1400 audit(0.0:1029): avc: denied { setattr } for name=“” dev=“mmcblk0p25” ino=373325 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:apk_data_file:s0 tclass=file permissive=1

There are currently some bugs related to root, eg in this issue. Some workarounds are described there. I don’t use Syncthing with root myself, so I won’t be fixing them, but contributions are always welcome!

Yup. Those are my problems exactly. And since you use a nexus 5, you also don’t have the external storage problem… I’ll try to look at the code, but java is not my thing.