su - Permission denied problem

380 views
Skip to first unread message

markus...@googlemail.com

unread,
Oct 31, 2022, 3:58:45 PM10/31/22
to Android-x86
Hi,
I built android-x86 r-x86 branch. When I open the Terminal Emulator and type "su", it hangs for some seconds, then it displays "permission denied". I tried both the eng and user debug configs.
If I use "su" from adb shell, it works fine. How can I fix this problem?
Thanks in advance,
Markus

endrich...@googlemail.com

unread,
Nov 14, 2022, 3:59:53 AM11/14/22
to Android-x86
Which terminal emulator do you use? do you have a full output of logcat during the error?
Probably your app isn't requesting your permissions.

markus...@googlemail.com

unread,
Nov 16, 2022, 7:43:17 AM11/16/22
to Android-x86
I used TermOne Plus, now also tried Termux, same thing. Here is the logcat:

11-14 11:57:45.602  2155  4044 I system_server: oneway function results will be dropped but finished with status OK and parcel size 4
11-14 11:57:48.884  4501  4501 W bash    : type=1400 audit(0.0:753): avc: granted { execute } for name="su" dev="sdb3" ino=1524900 scontext=u:r:untrusted_app_27:s0:c126,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c126,c256,c512,c768 tclass=file app=com.termux
11-14 11:57:48.885  4501  4501 W bash    : type=1400 audit(0.0:754): avc: granted { execute } for name="su" dev="sdb3" ino=1524900 scontext=u:r:untrusted_app_27:s0:c126,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c126,c256,c512,c768 tclass=file app=com.termux
11-14 11:57:48.885  4501  4501 W bash    : type=1400 audit(0.0:755): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/su" dev="sdb3" ino=1524900 scontext=u:r:untrusted_app_27:s0:c126,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c126,c256,c512,c768 tclass=file app=com.termux
11-14 11:57:47.429     0     0 D ieee80211 phy0: get_station
11-14 11:57:48.892     0     0 W audit   : audit_lost=176 audit_rate_limit=5 audit_backlog_limit=64
11-14 11:57:48.892     0     0 E audit   : rate limit exceeded
11-14 11:57:48.894  4503  4503 D su      : su invoked.
11-14 11:57:48.897  4504  4504 D su      : starting daemon client 10126 0
11-14 11:57:48.899  4505  4505 D su      : connecting client 4502
11-14 11:57:48.902  4509  4509 D su      : remote pid: 4502
11-14 11:57:48.905  4510  4510 D su      : remote pts_slave: /dev/pts/3
11-14 11:57:48.908  4511  4511 D su      : remote uid: 10126
11-14 11:57:48.911  4512  4512 D su      : remote req pid: 4324
11-14 11:57:48.913  4513  4513 D su      : remote args: 1
11-14 11:57:48.915  4516  4516 D su      : waiting for child exit
11-14 11:57:48.915  4517  4517 D su      : daemon: stdin using PTY
11-14 11:57:48.918  4518  4518 D su      : daemon: stdout using PTY
11-14 11:57:48.920  4519  4519 D su      : daemon: stderr using PTY
11-14 11:57:48.923  4521  4521 D su      : su invoked.
11-14 11:57:48.925  4522  4522 E su      : sqlite3 open /data/user_de/0/com.android.settings/databases/su.sqlite failure: 14
11-14 11:57:48.928  4523  4523 D su      : /dev/com.android.settings/.socket4520
11-14 11:57:48.953  4524  4524 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
11-14 11:57:48.954  4524  4524 I AndroidRuntime: Using default boot image
11-14 11:57:48.954  4524  4524 I AndroidRuntime: Leaving lock profiling enabled
11-14 11:57:48.955  4524  4524 I app_process: Core platform API reporting enabled, enforcing=false
11-14 11:57:48.980  4524  4524 D app_process: Time zone APEX ICU file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
11-14 11:57:48.980  4524  4524 D app_process: I18n APEX ICU file found: /apex/com.android.i18n/etc/icu/icudt66l.dat
11-14 11:57:48.981  4524  4524 W app_process: Unexpected CPU variant for X86 using defaults: x86_64
11-14 11:57:48.987  4524  4524 W app_process: JNI RegisterNativeMethods: attempt to register 0 native methods for android.media.AudioAttributes
11-14 11:57:48.988  4524  4524 D AndroidRuntime: Calling main entry com.android.commands.am.Am
11-14 11:57:48.990  2155  4044 I ActivityTaskManager: START u0 {flg=0x10000000 cmp=com.android.settings/.cyanogenmod.superuser.RequestActivity (has extras)} from uid 0
11-14 11:57:48.990  4524  4524 D AndroidRuntime: Shutting down VM
11-14 11:57:50.435     0     0 D ieee80211 phy0: get_station
11-14 11:58:00.001  2291  2291 D KeyguardClockSwitch: Updating clock: 1158
11-14 11:58:08.955  4538  4538 E su      : select failed with 2: No such file or directory
11-14 11:58:08.958  4540  4540 W su      : request rejected (10126->0 /system/bin/sh)
11-14 11:58:05.460     0     0 I chatty  : uid=0(root) logd identical 5 lines
11-14 11:58:08.465     0     0 D ieee80211 phy0: get_station
11-14 11:58:08.961     0     0 I init    : Untracked pid 4524 exited with status 0
11-14 11:58:08.961     0     0 I init    : Untracked pid 4539 received signal 1
11-14 11:58:08.961  4541  4541 D su      : sending code
11-14 11:58:08.963  4542  4542 D su      : child exited
11-14 11:58:08.963  4543  4543 D su      : client exited 1
11-14 11:58:08.966     0     0 I init    : Untracked pid 4507 exited with status 1

crw

unread,
Nov 17, 2022, 7:50:23 AM11/17/22
to Android-x86
You can try the initrd-magisk project as a su replacement. 
Reply all
Reply to author
Forward
0 new messages