Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [selinux]

The tag has no usage guidance.

0
votes
0answers
14 views

Android ROMs - Selinux denial issue - transition [closed]

i have a bespoke deamon i am adding to my android 8.1 source tree. but i keep getting the error: type=1400 audit(21.610:3): avc: denied { transition } for pid=217 comm="init" path="/system/bin/...
1
vote
0answers
34 views

Create a private folder in Android: set the SELinux attribute of a folder in external storage

There are quite a few apps that require read and write access to the external storage, which gives them access to the whole /sdcard directory. But since that is also the only storage the user ...
0
votes
0answers
356 views

Graphics/vnc/ssh connect failed failed

Installed Kali Linux rolling through deploy on coolpad cool1. Debugging mode on. Rooted. Busbox checked. And terminal also fails to start. More info and config in the screenshots given below
0
votes
0answers
287 views

SELINUX sepolicy inject init_shell to run iptables on boot

My question is How to run iptable rules script at boot (sys.boot_completed=1) , I tried to do this by adding service to init.rc to run iptables rules shell script , like below: service myserv /system/...
1
vote
0answers
387 views

Write protection of loop device // Read-Only Filesystem

After spending days on that topic I am in need of additional ideas ;) Facts: MTK6757 / Android 7 / Kernel 4.4.15 / FS EXT4 (No F2FS) / Working Root I have a fresh and clean 64MB EXT4 .IMG File in /...
0
votes
1answer
386 views

Is 'SELinux enforcing' responsible?

My HTC android mobile is rooted after unlocking the bootloader, but it is with S-ON. When I write some files(I mean copy and paste) inside my '/system' partition for the purpose of applying a 'Mod', ...
1
vote
1answer
3k views

SELinux prevents my init.rc exec command to execute

I've added a exec command at the end of init.rc file. on property:dev.bootcomplete=1 exec u:r:shell:s0 shell shell -- /system/bin/am start -n com.example.package/com.example.package.MainActivity ...
0
votes
1answer
1k views

Fix SELinux contexts for a SU binary

I am trying to root my android 6.0.1 phone using the following method: I first booted into a TWRP image using fastboot boot, then using the TWRP terminal I copied the su binary from the SuperSU kit ...
1
vote
1answer
728 views

Checking SELinux permissions in Android?

Is there a tool that will allow me to check what permissions an application has in a file or folder?
0
votes
0answers
511 views

How to edit /sys/ files properly without root?

I have android device with version 5.1.1 . The device is not rooted, but root can be accessed on /system or /data partition files from the custom TWRP recovery using adb. The device has SELINUX ...
0
votes
1answer
114 views

Which is less insecure - mounting /system rw or disabling SELinux

I recently upgraded my (rooted) Oneplus 3 to Nougat, and Adaway - which modifys the hosts file broke. I have been unable to get symlinking the hosts file to work because SELinux gets in the way. ...
3
votes
0answers
427 views

Tried many ways to root my Telenor Infinity E

I have been trying to root my phone for two weeks using various exploits but till now all in vain. The devices isn't international so its not famous and I couldn't find any recovery, custom root or ...
1
vote
0answers
183 views

Why init domain failed to execute shell_exec type though there is “domain_auto_trans(init, shell_exec, init_shell)” in the sepolicy?

I'm trying an root exploit on android 5.1.1 and I have gotten root permission with u:r:init:s0 context now. But when I tried to execute system("sh"), it was denied: type=1400 audit(62.480:16): avc: ...
0
votes
0answers
714 views

Removing Knox and SElinux

I am having problems setting the kernel to permissive (SElinux). I have already tried the setenforce 0 command with terminal but it immediately goes back to enforcing as soon as I set the setenforce 0 ...
0
votes
1answer
475 views

Verifying device integrity. Galaxy Tab S2 9.7"

I wanted to root my Galaxy Tab S2 9.7" LTE (SM-T815Y) and I have spent the better part of my night doing the following. (I have never rooted anything before) Got a img of autoroot from some site and ...
3
votes
1answer
596 views

Cant remount /system as rw because “read only filesystem” (selinux problem)

Hello i tried to replace kingroot with Supersu, since in the newer versions of kingroot you cant block all of its connections, I had some problems, supersu always failed to install the newer binaries, ...
4
votes
1answer
5k views

What is SELinux and its purpose?

For those of you who don't know, SELinux is a collection of administrative tools on Linux OS'. However, what is it for on android, and what does it do on android? After all, Android is not Linux. ...
1
vote
0answers
621 views

selinux denies busybox although selinux is set to permissive?

Device-info: Phone: Sony Xperia Z1 Model number: C6903 Android version: 5.1.1 Build Number: 14.6.A.1.236 Rooted, BusyBox and Terminal Emulator installed (Play Store Version!!!) I have formatted an ...
1
vote
1answer
519 views

SELinux restricting my system app even while it was signed with the same key as the previously shipped one!

Well, I have something weird going on. I was thinking fiddling around with Dotcase.apk from CyanogenMod 13, so I was able to rebuild the apk. I even made sure to sign it with the Platform Android test ...
1
vote
1answer
778 views

How to troubleshoot SELinux issues?

On standard GNU/Linux computers, SELinux comes with a set of tools allowing the administrator to troubleshoot permission issues. Such tools allow to: Temporarily switch a single domain in permissive ...
8
votes
1answer
15k views

How dangerous is the fact that SELinux is in “Permissive” mode? What should I be wary of?

I have installed a certain ROM which comes with SELinux in "Permissive" mode. This is the only (good) ROM that properly fits my device and there is no way to change the state of SELinux. Now I'm not ...
0
votes
0answers
77 views

SELinux policy loading and enforcement on Android

In the most recent versions of Android, SELinux enforcement is enabled in the kernel and is static, but how can this work before a policy has been loaded? Is the policy embedded in the kernel? If not, ...
1
vote
1answer
25k views

How to set SELinux to Permissive

Since installing XtreStoLite 3.1.1, SELinux is set to Enforcing (when I try to boot into TWRP recovery). I tried setting it to permissive (Enforcing = 0) using a terminal emulator (the phone is rooted)...
1
vote
1answer
1k views

What does exactly “Re-root System (SuperSU)” do to your phone in Philz Touch Recovery?

I tried to manually root my phone via pushing a proper su binary to /system/bin and /system/xbin. I was able to push them via adb in recovery, which is a root one (idk why). Once inside my phone, I ...
3
votes
1answer
3k views

Android 6 (cyanogenmod 13) external sd card write access

I always used "Samba server" application on all my android devices for uploading files, it worked great with CM12, but in CM13 even with root access Samba server can't write to external SD card, ...
1
vote
2answers
624 views

Remove a folder I created in /system/lib

I have root access and am able to remount. I created a folder in /system/lib/ named rfsa, but I don't know why I cannot see or open that folder. When I type ls, it is there. But when I type ls -l, I ...
2
votes
0answers
1k views

How does SuperSu provide root privilege?

Has a write-up ever been released on exactly how SuperSu works? After searching around for a while I found mostly guides on who to use the app, no the implementation details. I did, however, find ...
1
vote
0answers
135 views

Fix SELinux labels after restoring /data on CM 12.1

I restored an automatic backup on Cyanogenmod 12.1 created with rsync of my /data partition, but now SELinux is denying apps access to their data. Disabling SELinux "fixes" this problem, but can I ...
12
votes
5answers
7k views

Examine android (v30) selinux policy

I'm trying to find what policy is actually enforced by my phone using selinux. You'd think this would be easy. After all, for security it is good to verify that your policy matches expectations. ...
20
votes
1answer
7k views

SELinux and chroot system call

TL; DR: This is a question about the final step, in a portable, developer-oriented rooting process, that works across all Android machines. It is not based on any exploit - it is something that we are ...
2
votes
1answer
1k views

How SElinux protects android from rooting

I know when rooting we execute a script and we use a thing that is already root and tell it to execute if it executes the script as root and then roots the phone so how does SElinux helps to protect ...
2
votes
0answers
1k views

SELinux context init_shell in boot.img permission denied with Android 5.0.2

I'am used to start a service in the android boot image with inherited context of the init.rc script (u:r:init:s0). In Android 5.0.2 (Samsung), my service does not inherity the init context anymore, it ...
1
vote
2answers
7k views

Set SELinux mode to Permissive permanently

My Samsung Galaxy Note S2 (GT-N7102) running stock 4.3 JellyBean by default blocks all apps from Google (courtesy of the Chinese government). I followed a tutorial to gain access to gapps that relies ...
1
vote
1answer
2k views

How to completely disable SELinux in Android L in the init.rc file

I want to disable SELinux at boot time for Android L or 5. The reason is because my daemon is not begin executed on boot when it should due to SELinux problems. I have the following in my init.rc file:...
3
votes
0answers
138 views

unable to connect to my nexus 10 with android 4.4 and cyanogenmod with a remote desktop manager

Hello android users and developers. I would like to give a developer temporary access to my tablet so he can help me solve a problem. On the tablet is running android 4.4 + cyanogen mod 11. I have ...
2
votes
1answer
2k views

Is it possible to find the full SELinux ruleset for OEM's stock ROMs?

I'm writing a root app following Chainfire's documentation, but I found I've to run some command in another SELinux context. Using that context on my device (OnePlus One with CM12 nightly), I've no ...
3
votes
1answer
6k views

How to fix file permissions on Android 5 so that a certain app can access certain files?

Background: I had a rooted Nexus 4 with Android 4.4.4 that was working well. Then I got the notification to update to Android 5. To this end, I flashed the stock recovery for Android 4.4.4 from Google ...
3
votes
0answers
224 views

Does Android's implementation of SELinux's MAC inhibit apps with root privileges from accessing other app's data?

Starting with Android 4.4, SELinux's MAC is enforced. Does this mean that if an app somehow can get installed and exploit the kernel to get root privileges, that MAC will still prevent that app with ...
4
votes
1answer
6k views

How can I set the correct SELinux / SEAndroid policy for an App?

I am using the free SSHelper SSH server on my phone to get SSH access. However, the application is not behaving correctly under SELinux when set to Enforcing mode, but seem to be OK when using ...
1
vote
1answer
4k views

ssh: No controlling tty: open /dev/tty: No such device or address

When connecting from PC/Cygwin via SSH (over WiFi) to phone, I am always greeted with the following macabre message: $ ssh -T root@192.168.1.100 -p 50000 Authenticated with partial success. root@192....
1
vote
3answers
34k views

How to make SELinux permissive on a Knox Samsung device?

I have a Samsung note 2014 which I rooted following this tutorial. However I now have problems with SELinux which (apparently) is preventing me from installing a Linux virtual box. I backed up and ...
0
votes
2answers
337 views

Would it be possible to sandbox apps with SELinux?

Many apps require too much permissions that they do not need to function Most apps needs internet connection to talk to some API (let's say updates checking or notifications.. etc) and need to access ...
7
votes
1answer
53k views

How can I change SELinux from Enforcing to Permissive on Samsung Galaxy Note 3?

My device is Samsung Galaxy Note 3 SM-N9005. This phone comes with SELinux set to Enforcing by default. I have been trying to change this to permissive but to no avail. I built the kernel from ...
3
votes
1answer
5k views

Where can I configure SELinux in Cyanogenmod 10.1.3?

Cyanogenmod released the stable version 10.1.3 yesterday and it apparently includes SELinux enhancements running in permissive mode per default. I thought that you could change the mode in the ...