Application crashed
I'm using Android Pie, after switching to newly created UID, app crashed. Does it require root permission?
Yes, it requires root permission to modify NFC configuration.
@HexRabbit Could you provide logcat output for debugging?
Sure. It looks like a permission problem.
10-18 13:24:07.085 W/i (29582): Cannot obtain root
10-18 13:24:07.085 W/i (29582): java.io.IOException: Cannot run program "su": error=13, Permission denied
10-18 13:24:07.085 W/i (29582): at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
10-18 13:24:07.085 W/i (29582): at java.lang.Runtime.exec(Runtime.java:695)
10-18 13:24:07.085 W/i (29582): at java.lang.Runtime.exec(Runtime.java:525)
10-18 13:24:07.085 W/i (29582): at java.lang.Runtime.exec(Runtime.java:422)
10-18 13:24:07.085 W/i (29582): at com.pluscubed.logcat.d.i.a(SuperUserHelper.java:199)
10-18 13:24:07.085 W/i (29582): at com.pluscubed.logcat.d.j$a$6.a(UpdateHelper.java:1096)
10-18 13:24:07.085 W/i (29582): at com.pluscubed.logcat.ui.LogcatActivity$23.doInBackground(LogcatActivity.java:3031)
10-18 13:24:07.085 W/i (29582): at android.os.AsyncTask$2.call(AsyncTask.java:333)
10-18 13:24:07.085 W/i (29582): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
10-18 13:24:07.085 W/i (29582): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
10-18 13:24:07.085 W/i (29582): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
10-18 13:24:07.085 W/i (29582): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
10-18 13:24:07.085 W/i (29582): at java.lang.Thread.run(Thread.java:764)
10-18 13:24:07.085 W/i (29582): Caused by: java.io.IOException: error=13, Permission denied
10-18 13:24:07.085 W/i (29582): at java.lang.UNIXProcess.forkAndExec(Native Method)
10-18 13:24:07.085 W/i (29582): at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
10-18 13:24:07.085 W/i (29582): at java.lang.ProcessImpl.start(ProcessImpl.java:132)
10-18 13:24:07.085 W/i (29582): at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
@HexRabbit
I think your logcat output may be not about this app. It seems to be generated by the app whose package name is com.pluscubed.logcat.*. Could you check it again?
So, I just wrap code related to root with try/catch to avoid crash now.
It compiles and everything but crash when i open the app. It doesn't show up any permission or root access, just crashes. This is the log that android studio leaves:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.phwu.nfcuidemulator, PID: 13624
java.lang.ExceptionInInitializerError
at com.phwu.nfcuidemulator.NfcHelper.
I put in bold the part of the log thats shows were the kotlin problem is.
@NokisDemox I have no demand for emulating NFC ID currently; therefore, this project have been discontinued.
But I could assist in fixing this problem if you could provide phone model or the output of the following command.
strings $(ls /system/lib*/*nfc*jni*)