Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

Application crashed #1

Open
HexRabbit opened this issue Oct 16, 2018 · 6 comments
Open

Application crashed #1

HexRabbit opened this issue Oct 16, 2018 · 6 comments

Comments

@HexRabbit
Copy link

HexRabbit commented Oct 16, 2018

I'm using Android Pie, after switching to newly created UID, app crashed.
Does it require root permission?

@HexRabbit HexRabbit changed the title Application crashing Application crashed Oct 16, 2018
@0140454
Copy link
Owner

0140454 commented Oct 17, 2018

Yes, it requires root permission to modify NFC configuration.

@0140454
Copy link
Owner

0140454 commented Oct 18, 2018

@HexRabbit Could you provide logcat output for debugging?

@HexRabbit
Copy link
Author

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)

@0140454
Copy link
Owner

0140454 commented Nov 7, 2018

@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.

@NokisDemox
Copy link

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.(NfcHelper.kt:16)
at com.phwu.nfcuidemulator.MainActivity.onCreate(MainActivity.kt:37)
at android.app.Activity.performCreate(Activity.java:6977)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3064)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6816)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451)
Caused by: java.util.NoSuchElementException: Sequence is empty.
at kotlin.sequences.SequencesKt___SequencesKt.single(_Sequences.kt:277)
at com.phwu.nfcuidemulator.NfcConfig.getConfigPath(NfcConfig.kt:106)
at com.phwu.nfcuidemulator.NfcConfig.(NfcConfig.kt:8)
at com.phwu.nfcuidemulator.NfcHelper.(NfcHelper.kt:16) 
at com.phwu.nfcuidemulator.MainActivity.onCreate(MainActivity.kt:37)
 
at android.app.Activity.performCreate(Activity.java:6977) 
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3064) 
at android.app.ActivityThread.-wrap14(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:154) 
at android.app.ActivityThread.main(ActivityThread.java:6816) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1563) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1451) 
Application terminated.

I put in bold the part of the log thats shows were the kotlin problem is.

@0140454
Copy link
Owner

0140454 commented Jan 4, 2019

@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*)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants