Root isn't being detected on the FP2
When I start the app, it request superuser permissions. But after that, it just exits saying "Cannot get superuser access, exiting". More detailed information would be nice.
Superuser access is there, using su via a terminal app or via adb works fine.
What Superuser app are you using? I don't have that device, but if you can find the cause or get me debug logs, I should be able to add a workaround or new condition to the app.
It does need a utility from SuperSU to adjust SELinux policy, so if you are using anything else, or the policy is different, root may not be detected, or the app might be able to get the necessary permissions to run properly.
Additionally, the format of the cryptfs command parameters might be different, which further complicates things. Can you change or verify the password from a root shell? See the README for the commands you need to use.
Yes, I could change the password in the terminal by running vdc cryptfs changepw password <old> <new>. And I could verify it by running vdc cryptfs verifypw <new>.
I'm not using any superuser app. The su support is built into the ROM. (This should be the code used.) [Edit: It's simply the CyanogenMod root thingy.]
Here's a logcat when I start the app:
09-25 15:22:26.640 4560 7164 D audio_hw_primary: start_output_stream: enter: stream(0xb6077380)usecase(1: low-latency-playback) devices(0x2)
09-25 15:22:26.640 4560 7164 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
09-25 15:22:26.640 4560 7164 D hardware_info: hw_info_append_hw_type : device_name = speaker
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 14, path = 0
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> send_adm_topology
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> send_asm_topology
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> send_audtable
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> send_audvoltable
09-25 15:22:26.640 4560 7164 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
09-25 15:22:26.641 4560 7164 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
09-25 15:22:26.641 4560 7164 D ACDB-LOADER: ACDB -> send_afe_cal
09-25 15:22:26.641 4560 7164 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
09-25 15:22:26.641 4560 7164 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
09-25 15:22:26.645 8078 9965 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=org.nick.cryptfs.passwdmanager cmp=org.nick.cryptfs.passwdmanager/.MainActivity} from uid 10060 on display 0
09-25 15:22:26.651 4560 7164 D audio_hw_primary: select_devices: done
09-25 15:22:26.708 19307 19307 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
09-25 15:22:26.723 19307 19307 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=48
09-25 15:22:26.723 8078 9051 V BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@3a08ee5
09-25 15:22:26.723 8078 9051 I ActivityManager: Start proc 5683:org.nick.cryptfs.passwdmanager/u0a71 for activity org.nick.cryptfs.passwdmanager/.MainActivity
09-25 15:22:26.797 5683 5683 W System : ClassLoader referenced unknown path: /data/app/org.nick.cryptfs.passwdmanager-1/lib/arm
09-25 15:22:26.808 10787 11646 D OpenGLRenderer: endAllStagingAnimators on 0xa0020380 (RippleDrawable) with handle 0x9b0fb8c0
09-25 15:22:26.933 5683 5683 D CryptfsCommands: ro.crypto.state= encrypted
09-25 15:22:26.951 5683 5714 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
09-25 15:22:26.973 5716 5716 D su : su invoked.
09-25 15:22:26.973 5716 5716 D su : starting daemon client 10071 10071
09-25 15:22:26.979 5718 5718 D su : remote pid: 5716
09-25 15:22:26.979 5718 5718 D su : remote pts_slave:
09-25 15:22:26.981 5718 5718 D su : waiting for child exit
09-25 15:22:26.981 5720 5720 D su : su invoked.
09-25 15:22:26.982 5683 5714 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8974_LA.BF.1.1.3_RB1__release_AU (I741a3d36ca)
09-25 15:22:26.982 5683 5714 I Adreno-EGL: OpenGL ES Shader Compiler Version: E031.29.00.00
09-25 15:22:26.982 5683 5714 I Adreno-EGL: Build Date: 04/04/16 Mon
09-25 15:22:26.982 5683 5714 I Adreno-EGL: Local Branch: mybranch19053788
09-25 15:22:26.982 5683 5714 I Adreno-EGL: Remote Branch: quic/LA.BF.1.1.3_rb1.12
09-25 15:22:26.982 5683 5714 I Adreno-EGL: Local Patches: NONE
09-25 15:22:26.982 5683 5714 I Adreno-EGL: Reconstruct Branch: NOTHING
09-25 15:22:26.982 5720 5720 E su : SU from: u0_a71
09-25 15:22:26.982 5720 5720 D su : Checking whether app [uid:10071, pkgName: org.nick.cryptfs.passwdmanager] is allowed to be root
09-25 15:22:26.985 5683 5714 I OpenGLRenderer: Initialized EGL, version 1.4
09-25 15:22:26.986 8078 8108 E AppOps : Creating dialog box
09-25 15:22:27.066 8078 8557 I OpenGLRenderer: Initialized EGL, version 1.4
09-25 15:22:27.126 8078 8113 I ActivityManager: Displayed org.nick.cryptfs.passwdmanager/.MainActivity: +419ms
09-25 15:22:28.367 5720 5720 D su : Privilege elevation allowed by appops
09-25 15:22:28.367 5720 5720 D su : Allowing via appops.
09-25 15:22:28.367 5720 5720 D su : 10071 /system/bin/app_process32_xposed executing 0 /system/bin/sh using binary /system/bin/sh : sh
09-25 15:22:28.368 5720 5720 D su : Waiting for pid 5731.
09-25 15:22:28.394 5720 5720 D su : Finishing su operation for app [uid:10071, pkgName: org.nick.cryptfs.passwdmanager]
09-25 15:22:28.400 5718 5718 D su : sending code
09-25 15:22:28.400 5718 5718 D su : child exited
09-25 15:22:28.400 4560 7164 D AudioFlinger: mixer(0xb3b00000) throttle end: throttle time(1)
09-25 15:22:28.407 8078 9051 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4656656 attribute=null, token = android.os.BinderProxy@24b05e3
09-25 15:22:28.408 5716 5716 D su : client exited 0
09-25 15:22:28.596 8078 8113 W AppOps : Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0
09-25 15:22:28.612 5683 5714 V RenderScript: 0xaecbe000 Launching thread(s), CPUs 4
09-25 15:22:29.733 19307 19307 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
09-25 15:22:29.747 19307 19307 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=163840 outq=0 send_len=48
i can confirm exact the same issue with RR-OS 5.8.5 (which is based on LineageOS 14.1) with LOS' su... including the possibility to change and verify password via terminal with vdc cryptfs changepw password <old> <new> and vdc cryptfs verifypw <new>.
@nelenkov can you go into or link some details about the SELinux policy?
Same Issue here (App exists with ""Cannot get superuser access,exiting" after allowed root access has been confirmed by a toast before)
Running 7.2.1 Nougat Stock ROM with Magisk applied.
vdc cryptfs changepw pin
after su in adb shell completes withou error.