[Replicant] Phantom Reboots i9305
Denis 'GNUtoo' Carikli
GNUtoo at cyberdimension.org
Fri Oct 8 15:59:42 UTC 2021
On Thu, 23 Sep 2021 17:55:04 +0000
J05HYYY via Replicant <replicant at osuosl.org> wrote:
> In addition to this Dennis just helped me find out that if I set using
> adb root, and, adb shell
>
> setenforce 0
>
> The device no-longer automatically reboots itself.
I think I accidentally helped here.
What I was pointing out is that with Replicant 6 official images,
according to the bug #1834[1], the kernel has some code that can detect
if the modem is not started, and it reboot the device when it finds
that out. Maybe that done through the GPIO API[2], though the exact
source code where that happens isn't mentioned in the bug report.
I wonder how it's supposed to work in the recoveries with either the
stock Samsung Android distribution, LineageOS, TWRP, as I never heard
of recoveries where it would start the modem.
So maybe the kernel detects that the recovery is being used with
SELinux?
It would make sense as as far as I know, because recoveries don't use
SELinux, and both the boot and recovery images use an initramfs, so you
can't differentiate with that. So beside SELinux and command line
arguments, there is not much possibilities.
And the command line arguments would be complicated to use here
because the stock bootloader completely ignores the command line
arguments that are in the bootimage.
So you're left with having to build two different kernel just to pass
some arguments to the kernel (with CONFIG_CMDLINE_EXTEND) and that means
that you would need to modify the Android build system to build two
different kernel images.
So if the stock recovery doesn't reboot, it's very likely that there is
some code that disables this check if SELinux is enabled.
In any case it's wroth including patches that disables SELinux (but
only for the GT-I9305) here as as it's way better not to have SELinux
than have a device that constantly reboots from time to time.
So if patches are sent for that I can review them and merge them if
they are good.
Also note that we have a regression that was introduced after Replicant
6.0 0004 RC5 that made devices not boot, so we also need to revert to
commit that broke that and retest if everything works again when
building on Debian.
References:
-----------
[1]https://redmine.replicant.us/issues/1834
[2]https://redmine.replicant.us/projects/replicant/wiki/XMMBoot
Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20211008/8b1ef614/attachment.asc>
More information about the Replicant
mailing list