Questions tagged [selinux]
The selinux tag has no usage guidance.
88
questions
0
votes
0
answers
353
views
open failed: EACCES (Permission denied)
I am trying to copy the file from /storage/emulated/0/test.txt to /cache/SH_DIR/ via android user application ,
getting error like below :
java.io.FileNotFoundException: /cache/SH_DIR/test.txt: open ...
1
vote
0
answers
135
views
Should SELinux be Permissive to access /dev/diag
I am trying to set the SELinux to permissive on Android with no luck.
I tried the command su 0 setenforce 0 it returns OK while still being Enforcing if checking immediately using getenforce command.
...
1
vote
0
answers
94
views
Stuck in boot loop after "Fixing SELinus contexts"
So, let's say that I have already "Fixed SELinux Contexts", and I am now in a boot loop. How could I resolve this issue.
I am quite new to all of this, but I am eager to learn and fix my ...
2
votes
0
answers
401
views
remount, turn off SElinux, all fails even though I am root
I have a device which is never hacked into before, mostly as nobody has it, it is a android tv box. I have temp root using the dirty cow exploit, and tried to remount system using the mount command. ...
1
vote
0
answers
19
views
why DAC isn't sufficient for Android that it needs MAC(selinux)
I learned that each app is assigned a separate UID so that a rogue app cannot access other apps data and system sensetive data and files.
What's problem with this that they have to use MAC(selinux)
2
votes
0
answers
49
views
How would the app DiskDigger be able to get past SELinux when adbd/SuperSU/etc. cannot?
Okay, so I was able to recover my deleted files after all. I am the furthest thing from a software developer, and I don't have more time to spend on this, but I wanted to explain how I fixed it and ...
1
vote
0
answers
133
views
Attempting file recovery (deleted photos) on Note 4 via accessing /data/userdata; rooted phone, patched adbd, but now USB debugging won't work
I made a post about this yesterday, and I managed to make a lot of progress today, but I'm stuck again, and I am trying to decide what to do. I am not really experienced with coding, but I happen to ...
1
vote
0
answers
564
views
How to mount a tmpfs directory that would be allowed to be read and written to by any app? (root available)
I am trying to create some volatile (tmpfs) storage for my Android, to avoid clutter.
I am trying to follow the previous questions:
making manually mounted partition folders write accessible to all ...
1
vote
0
answers
215
views
Result of ls -la in adb shell
If I go into my unrooted phone's adb shell (Samsung galaxy s7 Android 8) I get a result similar to this:
dr-xr-xr-x 921 root root 0 2020-01-26 10:06 acct
-rw-r--r-- 1 root root 225 ...
1
vote
0
answers
169
views
Starting shell script at boot in SELinux enforcing mode [closed]
I am building Android Pie (tag android-9.0.0_r46, branch android-msm-marlin-3.18-pie-qpr2) from source. I am testing on a Pixel XL (marlin). I want to have a custom shell script run automatically when ...
2
votes
0
answers
507
views
SUPolicy to allow custom service to read and write from Internal Storage
I'm setting up custom service with custom sepolicy using this as a base:
How to fix SELinux "avc: denied" errors when launching DNSCrypt as init.d script?
In 99% I follow the quick summary ...
1
vote
0
answers
664
views
How to force SELinux to permissive even when setenforce 0 is not working and kernel was 100% permissive when flashed?
I don't know what to do, I'm using Samsung Note 3 (Exynos) - N900 with custom Resurrection Remix 5.8.5 ROM (Android 7.1.2) with it's own permissive kernel and rooted with Magisk. Yesterday it turned ...
2
votes
1
answer
996
views
Run script using init.rc doesn't work
I'm trying to run a script that exectues when the device has finished booting. This particular device does not support running scripts from an init.d directory, which is why I am using init.rc.
The ...
2
votes
1
answer
125
views
How are apps installed on Android ? context - symbolic links of only some apps disappear after reboot
I am using Apps2sd to move some apps to ext4 partition mmcblk1p2. It successfully moved 1 app ( see code below ) but after linking another , the symblink for app gets deleted but data folder's ...
1
vote
1
answer
1k
views
Need to add custom script as service in init.rc for Android 10
I am trying run shell script in device boot-up time.
Steps:
Created shell script and placed into /system/bin/usbmountd.sh
Added test.sh in inir.rc.
service usbmountd /system/bin/usbmountd.sh
user ...
0
votes
0
answers
2k
views
How to disable zip verification flag in stock recovery.img?
In stock recovery there is an option to install zip from the sdcard but it doesn't allow installing zips with unknown signature. Twrp can install any zip without concerning about the the zip signature....
1
vote
0
answers
42
views
How to add a simple file on /system without actually modifying it but with using kernel sources? [closed]
From the time system-as-root came, developers have rooted different devices by patching the Magisk su binaries in the kernel. I want to understand how exactly they have done this so to start from ...
3
votes
1
answer
2k
views
How to mount system under super partion?
Google has recently changed the way to mount system and introduced Dynamic Partitions. Previously in a rooted adb shell, I used to run mount -o rw,remount /system to mount system in read-write mode. ...
4
votes
1
answer
2k
views
What is 02 in the magisk patched vbmeta.img?
According to the Additional Info given for rooting the Android device that doesn't have ramdisk but can be rooted via recovery: we need an empty vbmeta.img and I am trying to check what it actually ...
1
vote
0
answers
326
views
How can I record call using c code(c executable that can run on Android-Linux) on rooted Android device?
I want to record a call that is called by my application for the call test purposes. We record a call and compare it with a high-quality WAV file to determine the call quality. But the call recording ...
3
votes
1
answer
4k
views
SELinux permissive kernel - is it a security risk?
As in title. I am talking of Kernel, not ROM (plenty of questions dealing with ROM on this site).
I have a OnePlus 7 running stock Android 10 and prefer a custom kernel. Of late, OnePlus hasn't ...
0
votes
1
answer
1k
views
how to extend support for EXT4 file system for microSD cards in stock or non lineage / CyanogenMod ROMS
As I am aware after Android 4.4 or some sort your storage card is no longer eXposed directly and needs to be carefully interfaced through specific Mount points that need to be aware through vold ...
1
vote
1
answer
963
views
How to add SELinux policy on a user-debug ROM that has `split` policy scheme?
I have a Sony device that supports treble and is a system-as-root and A/B device. It has a user-debug ROM installed on it so, its adb shell is rooted.
I have disabled dm-verity using adb disable-...
3
votes
0
answers
3k
views
How to disable dm-verity on `Treble` , `system-as-root` device?
Background: Please check following links
How to disable dm-verity on Android with “user” build type ROM?
Stuck in boot-loop when unpack and pack system.img?
Update: So, I am trying to disable dm-...
6
votes
1
answer
9k
views
What does TWRP "Fix Contexts" do?
In my blu_spark TWRP, I have an option (under "Advanced") named 'Fix Contexts'.
When I press it, it says:
Note: Fixing contexts is rarely needed
Fixing SELinux Contexts may cause your ...
0
votes
0
answers
4k
views
How to enforce Selinux (setprop ro.boot.selinux=enforcing)
I have a Xiaomi Redmi K20 Pro (raphael, China Version) device.
I set the prop "ro.boot.selinux" to "permissive", by installing this Magisk Module.
Now I'd like to set it back to "enforcing", but didn'...
0
votes
0
answers
3k
views
Stuck in boot-loop when unpack and pack `system.img`?
Background: I have a treble and system-as-root but it is not an A/B Samsung device. I am trying to modify the system.img. Before that, I have rooted it with the steps given here. After following these ...
0
votes
0
answers
2k
views
How to patch `system.img` using MagiskManager patch feature to root the device?
I have a treble and system-as-root but it is not an A/B device. I have rooted it with the help of the MagiskManager patch feature. My understanding is: MagiskManager has modified the following three ...
1
vote
1
answer
20k
views
How to fix: only official released binaries are allowed to be flashed(recovery) on device / FAIL! (Auth) on Odin3 v3.13?
I have Samsung S10 5G(Qualcomm) device. This device has unlocked bootloader but it is not rooted yet.
I am trying to learn Unpack-Modify-Pack the ROM images.
Currently, I have VZW stock ROM ...
0
votes
0
answers
2k
views
How to get rid of SeLinux Denials in Permissive mode?
Need some help with 3 issues:
In Permissive mode I get denials, why does this happen and how do I fix that?
If I am enforced, how do I give access to my Partitions to various processes. Right now I ...
5
votes
1
answer
1k
views
How to run a program in an app context with Magisk?
Let's say I'm currently as root in Bash on a terminal, outside any app like Termux. I'm running Magisk.
Now I want to synchronously invoke Termux's Bash, such that it behaves the same way as it would ...
1
vote
1
answer
5k
views
SELinux always set to permissive, how to set enforcing permanently?
I flash a custom ROM to my HTC B2UL.
The ROM, by default, has the SELinux policy set to Permissive instead of Enforcing.
I can use adb shell setenforce 1 to make SElinux enforcing. But after reboot, ...
11
votes
2
answers
40k
views
How to unpack/repack system.img of android ROM?
I have OnePlus 6T device which has A/B partition system and has a ROM of user type i.e [ro.build.type]: [user]. This device is rooted with Magisk. I have a requirement(Want to place customized ...
6
votes
2
answers
37k
views
How to disable dm-verity on Android with "user" build type ROM?
I have One Plus 6T Android device which has a ROM of build type user. This device is rooted with Magisk and I want to disable dm-verity on this device. I have tried to run adb disable-verity but I got ...
4
votes
1
answer
2k
views
How to make SELinux injected rules persistent without unpacking-packing boot.img?
I am working on an application that needs root access and I have a device which is rooted but not with Magisk. This device has only adb shell root available. So, I need an alternative to call the ...
-2
votes
1
answer
1k
views
SELinux temporary set to permissive
I am using a Galaxy s10+, rooted with magisk, no custom ROM, no custom kernel and no custom recovery. The rooting is heavily limited because of the SELinux enforce mode. Actually, no root command in ...
2
votes
1
answer
5k
views
How to set SELinux enforcing, config file not found?
I have Samsung Galaxy J7 Core (SM-J701F), I'm running Magisk on my device and I ran the SafteyNet test and it failed. While trying to solve this I tried to change selinux state to enforced by editing /...
0
votes
0
answers
1k
views
How to create Android sepolicy based on the denial "execute_no_trans"?
I am trying to execute my script /vendor/bin/init.inmod.sh using below method:
Script init.inmod.sh:
#!/shebang???
/vendor/bin/test_disp hdcp disable
In vendor specific .rc file:
on ???
start ...
0
votes
1
answer
2k
views
SELinux Policy from Permissive to Enforcing
Using Nexus 5 with AospExtended ROM (Android 9) 19/04/05
The ROM, by default, has the SELinux policy set to Permissive instead of Enforcing.
Is there any way, perhaps using TWRP Recovery, to change ...
1
vote
1
answer
753
views
Adding custom bootup script to Android-x86 Nougat
I've been happy using Android-x86 Nougat on my system. Thanks to everyone who made that work.
I'm now trying to make one small change which is that I want to run a custom init script (a shell script) ...
1
vote
1
answer
3k
views
lsusb returns "permission denied" in Termux
When I run lsusb in Termux, the output is permission denied. I don't have root access.
Perhaps the Android system allows me to get specific access in root?
2
votes
1
answer
3k
views
What sepolicy context will allow any other context to access it?
I am on a bootloader locked Sprint Samsung Galaxy S7, eng boot.img flashed to phone with SELinux permissive, which gives root adb shell from where I can change system partitions, debloat, install ...
1
vote
0
answers
260
views
Is it possible to see which process is calling the zygote socket?
I want to see a verbose from the zygote socket (located in /dev/socket/zygote ) I know i can list all of the services from adb but I wanna see who is calling zygote to fork an specific process. Do you ...
6
votes
1
answer
6k
views
What special privileges "/system/xbin/su" does have w.r.t. root access?
This answer says:
Because of the way directory/file permissions are configured on
Android, you need to have the su binary on your /system partition
in order for it to work. Putting elsewhere ...
11
votes
1
answer
26k
views
How to fix SELinux "avc: denied" errors when launching DNSCrypt as init.d script?
I've installed an unofficial lineage OS 14.1 ROM on my phone and i want to have dnscrypt used on boot by default.
There is what i have done:
Download arm binaries from: https://github.com/jedisct1/...
2
votes
1
answer
3k
views
Why reading permission to /proc/1/maps is denied and why doesn't the denial appear in logcat?
I'm developing a native app for Android, and I'm occasionally confronted with permission denied which doesn't trigger a log in the logcat logs.
For example, trying to run:
shell@kltevzw:/ $ cat /proc/...
1
vote
0
answers
115
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
0
answers
2k
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
2
votes
0
answers
770
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
1
answer
699
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', ...