سؤال

Hi in my Filemanager i want to add an Option to create Folder in /system directory. Ive tried this to add to my code. It doesnt work. What did I wrong?

File dir = new File(path + name);

Runtime.getRuntime().exec("su -c \"mount -orw,remount /\"");
Runtime.getRuntime().exec("su -c \"mkdir" + dir.getAbsolutePath + "\"");
هل كانت مفيدة؟

المحلول

fixed! I need to add a space after mkdir.

Runtime.getRuntime().exec("su -c \"mkdir " + dir.getAbsolutePath + "\"");
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top