Dit probleem is zojuist opgelost.
Je moet je app laten deelnemen aan linux build om het SYSTEEM toestemming te geven.
-
voeg deze regel toe aan Android.mk
LOCAL_CERTIFICATE := platform -
voeg dit toe aan het manifestknooppunt van
AndroidManifest.xmlandroid:sharedUserId="android.uid.system" -
Genereer apk en druk het in /system/app/
-
Nu kunt u proberen te rennen
final String command = "chmod 777 /data/ena"; Process p = Runtime.getRuntime().exec(command);of
File file = new File("/data/ena"); if (file.exists()) { boolean result = file.setExecutable(true); Log.e(TAG, "trpb67, RESULT IS " + result); }waarde van resultaat moet waar zijn