Unpack boot.img and add "androidboot.selinux=enforcing" to boot.img-cmdline not work on Samsung
1
vote
0
answers
328
views
After flashing Android 13 of LineageOS to Galaxy Note 10+, I'm trying to set SELinux permissive following the steps.
1. Unpack
boot.img
and add androidboot.selinux=permissive
to boot.img-cmdline
2. use Heimdall, and flash the packed boot.img:
heimdall flash --BOOT myboot.img
The phone would auto-reboot after the flashing was complete. But adb getprop ro.boot.selinux
still returns enforcing
.
And I checked cat /proc/cmdline
, there is androidboot.selinux=enforce
.
This method works on Pixel 3XL with Android 13 LineageOS. I don't know why flash boot.img does not work on Galaxy Note 10+.
I checked boot.img with hex editor(vim), and found cmdline as there.
```
00000000: 414e 4452 4f49 4421 10e0 f602 0080 0010 ANDROID!........
00000010: 96d5 1500 0000 0011 0000 0000 0000 0000 ................
00000020: 0001 0010 0008 0000 0100 0000 8301 001a ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00000040: 616e 6472 6f69 6462 6f6f 742e 7365 6c69 androidboot.seli
00000050: 6e75 783d 7065 726d 6973 7369 7665 2062 nux=permissive b
00000060: 7569 6c64 7661 7269 616e 743d 7573 6572 uildvariant=user
00000070: 6465 6275 6700 0000 0000 0000 0000 0000 debug...........
Asked by Nelson
(11 rep)
Mar 23, 2024, 04:47 PM
Last activity: Mar 24, 2024, 09:58 AM
Last activity: Mar 24, 2024, 09:58 AM