Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report - System has not been booted with systemd as init system (PID 1). Can't operate. #2073

Open
Ayienz4581 opened this issue Nov 1, 2024 · 1 comment

Comments

@Ayienz4581
Copy link

How to use this template:
Any line that begins with '#' is a header. Please leave the headers in as is, and fill in the information they suggest
below them. These templates are here to help us resolve your issue as quickly as possible. Leaving requested information out
of your issue will cause our issue template bot to request that your post be reformatted. If a header doesn't seem relevant
to your issue, either write 'N/A' or something similar below the header or consider using a different template.

Describe the bug

A clear and concise description of what the bug is, and what expected behavior is. Include whether the bug occurs before
or after entering a terminal or vnc client session.

Steps to reproduce the behavior:

A list of exact steps to reproduce the behavior. If we cannot follow the steps to recreate the issue, we won't be able
to help you.

For example:

  1. Go to '...'

  2. Click on '....'

  3. Scroll down to '....'

Screenshots

If applicable, add screenshots to help explain your problem.

Device Information

Device: [e.g. Pixel XL 2].
Android Version: [e.g. Oreo, 8.0].
UserLAnd Version [e.g. 0.1.2].
Whether the device is rooted.
Whether the device is running LineageOS

Please add any other context you think might help us resolve your issue.

@MNLierman
Copy link

MNLierman commented Nov 1, 2024

You did not follow the bug report template and for that reason alone your issue request should be closed or deleted. You didn't specify when and where this is happening, what distro, and what packages you installed which installed systemd. In the future, please make sure that you fill out the bug report completely.

However, I can answer this question for you, as someone who has already ran into this. This is a normal error. Userland is a chroot, and chroots do not actually run with full root / system privileges. Unfortunately, this also means that things that require root / higher system privileges will not work, such as systemd, OpenSSH, Docker, etc. There is nothing you can do to make systemd work.

I'm pretty sure from my research into this myself, that the only way to make systemd work would be to unlock your bootloader and root your phone. Unfortunately again, there are problems with that, Google is cracking down very hard on rooted phones now. It took them 14 years, but Google finally decided to completely block root users with an API called Device Verification. If you root your phone so that you can use things like a rooted chroot or a rooted full privilege linux VM, then you loose Play Store access, and access to any apps that utilize the Device Verification API – a crap ton of apps now use this API, some popular examples are Cash App, DoorDash, Uber, etc etc. Rooting is now pretty much off the table for most people unless you are ok with loosing all of this functionality.

Lastly, I'm sure you might wonder anyways, how would I root my phone and is it possible? The answer is, most of the time, it's not possible. Most OEMs encrypt their bootloader's and stop the phone from booting if you tamper with the bootloader. I have many devices sitting around, running Android, with nice specs, lots of RAM 4-6 core processors, and I would love to install things that use systemd and system privileges like Docker, but it's not possible. You can thank whoever your phone manufacturer is, ie. Samsung, Google, HTC, Asus. Whoever made your phone, hey don't want you to have full root (admin) rights. Why? Because these OEMs like control and they think they are protecting you by doing all of this and adding all of this limitations. They think it's “better” and “safer” for you.

In Conclusion / Tl;dr
This is a normal error that you might be able to work around. Systemd is a system API that starts apps and services with varying higher levels of system privileges. Userland is a type of Linux installation known as Chroot, and it does not run with full root / system privileges, systemd is not supported. There are a lot of things you can install and play with on Chroot, systemd is unfortunately not one of them.
Possible Solution: Whatever package/app you are using (feel free to provide that information and I might be able to provide you a workaround) may not actually need systemd. You could try using init.d or starting the app/package manually, but this only works if the app does not require full system privileges. The kernel for Chroot is still your phones kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants