fixed, MXS sticks need a permissions hammer
[vuplus_xbmc] / xbmc / utils / AMLUtils.cpp
index 6104c54..4986169 100644 (file)
@@ -100,6 +100,28 @@ bool aml_present()
   return has_aml;
 }
 
+void aml_permissions()
+{
+  // most all aml devices are already rooted.
+  int ret = system("ls /system/xbin/su");
+  if (ret != 0)
+  {
+    CLog::Log(LOGWARNING, "aml_permissions: missing su, playback might fail");
+  }
+  else
+  {
+    // certain aml devices have 664 permission, we need 666.
+    system("su -c chmod 666 /sys/class/video/axis");
+    system("su -c chmod 666 /sys/class/video/screen_mode");
+    system("su -c chmod 666 /sys/class/video/disable_video");
+    system("su -c chmod 666 /sys/class/tsync/pts_pcrscr");
+    system("su -c chmod 666 /sys/class/audiodsp/digital_raw");
+    system("su -c chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq");
+    system("su -c chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq");
+    CLog::Log(LOGINFO, "aml_permissions: permissions changed");
+  }
+}
+
 int aml_get_cputype()
 {
   static int aml_cputype = -1;