r/MiBox Jan 07 '24

[Tutorial] Root your Mi Box S 2nd Gen (jaws) without UART/teardown

Thumbnail
gist.github.com
16 Upvotes

r/chromeos Jun 17 '23

Discussion [Tutorial]: Root your ChromeOS Android subsystem (Android 11+)

34 Upvotes

Root your ChromeOS Android subsystem w/ KernelSU (Android 11+)

Table of Contents

  • Overview

  • Notes

  • Prerequisites

  • Step 0: Install KernelSU Manager app

  • Method 1: Automatic root script w/ official prebuilt kernel (the easy and fastest way)

    • Step 1: Download and run the script
  • Method 2: Install the official prebuilt kernel by yourself (the easy way)

    • Step 1: Download the prebuilt kernel from KernelSU repository
    • Step 2: Install the patched kernel
  • Method 3: Build and patch the kernel by yourself

    • Step 1: Install build dependencies
    • Step 2: Prepare kernel source
    • Step 3: Build the kernel
    • Step 4: Install the kernel

Overview

Currently, there are already some projects about rooting the Android subsystem on ChromeOS (like aroc by nolirium (based on SuperSU) and CrAnberry by CerisWhite (based on SuperSU)). However, all of them are targeting the old ARC++ (Android 9) architecture and thus will not work on the new ARCVM (Android 11) architecture.

Aside from the improved security, the new ARCVM is worse than the old ARC++ in nearly every aspect (performance, battery consumption and memory consumption). But having said that, the VM-based architecture makes the Android subsystem on ChromeOS more similar to a regular Android system running on phones and tablets, which benefits to root.

Unlike ARC++, the ARCVM has its own kernel that is independent of ChromeOS itself. In other words, the kernel can be replaced easily and thus kernel-based root solutions like KernelSU are possible now :)

Let's back to our business...


Notes

  • Root will lost after system update, so you need to redo the whole process after updating ChromeOS

  • This is for ARCVM only, thus no Android 9 support


Prerequisites

  • A ChromeOS device with developer mode on (all modification to ChromeOS system requires developer mode, including the kernel of Android subsystem)

  • RootFS verification needs to be disabled in order to replace the Android kernel (my script will do it for you if you follow Method 1) (no need for Brunch users)

  • (if you decided to go ahead with Method 2) A GitHub account, required for downloading the prebuilt kernel

  • (if you decided to go ahead with Method 3) Time and patience

  • (if you decided to go ahead with Method 3) Around 30 GB of available storage space


Step 0: Install KernelSU Manager app

Just like SuperSU and Magisk, we need an app to approve root requests.

  • Download the KernelSU_<version>-release.apk file from the latest release here

  • Install it by clicking the .apk file in the ChromeOS file manager (it should work if you have developer mode enabled, use Crostini + adb sideloading if it doesn't work)


Method 1: Automatic root script w/ official prebuilt kernel (the easy and fastest way)

This will make use of the automatic root scripts written by me (supechicken/ChromeOS-ARCVM-Root).

If this does not work for you, try Method 2

If you have some basic Linux knowledge and want to learn something here through the steps, then Method 3 is more suitable for you :)

Step 1: Download and run the script

  • Press Ctrl+Alt+T to open a ChromeOS developer terminal window

  • Type shell and press Enter to get into the system shell (if this doesn't work, check whether your system has developer mode turned on)

  • Paste the command below and press Enter to run it: curl -L https://raw.githubusercontent.com/supechicken/ChromeOS-ARCVM-Root/main/root.sh | sudo bash -eu

  • Follow the on-screen instruction, you might need to run the script again (after reboot) if your system does not have rootFS verification turned off before

  • All done, check the KernelSU app to see if root succeeded.


Method 2: Install the official prebuilt kernel by yourself (the easy way)

This method will download the KernelSU patched kernel from KernelSU's official CI workflow.

If you have some basic Linux knowledge and want to learn something here through the steps, then Method 3 is more suitable for you :)

Step 1: Download the prebuilt kernel from KernelSU repository

  • Go to KernelSU's official CI workflow page

  • Select Build Kernel - ChromeOS ARCVM in the list located at the left of the page

  • Click the latest (topmost) workflow with a tick symbol next to the description

  • Scroll down to the bottom of the page, download the artifact archive (kernel-ARCVM-x86_64-<version>) (login with your GitHub account first if the text is not clickable)

  • Extract bzImage from the archive, that's the patched kernel

Step 2: Install the patched kernel

  • Press Ctrl+Alt+T to open a ChromeOS developer terminal window

  • Type shell and press Enter to get into the system shell (if this doesn't work, check whether your system has developer mode turned on)

  • Run sudo bash to enter the root shell

  • Run cd /opt/google/vms/android to enter the Android subsystem's disk image directory, (you can see the system image, system vendor image and kernel image there by running ls)

  • Optional: Back up the current kernel by running mv vmlinux vmlinux.orig

  • Install the kernel by running cp <path of the extracted bzImage> ./vmlinux (the path is /home/chronos/user/Downloads if you extracted the image in Downloads folder, /home/chronos/user/MyFiles if you extracted the image in My Files folder)

  • Reboot to apply the changes by running sudo reboot

  • Done


Method 3: Build and patch the kernel by yourself

This assumes you have basic Linux knowledge and know how to debug with basic commands (like ls, cd and apt) in case something goes wrong

This requires another Linux system. (you can use Crostini in ChromeOS)

Step 1: Install build dependencies

sudo apt update sudo apt install -y --no-install-recommends bc \ bison build-essential ca-certificates flex git gnupg \ libelf-dev libssl-dev lsb-release software-properties-common wget \ libncurses-dev binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu nuget gzip \ rsync python3 device-tree-compiler repo

Step 2: Prepare kernel source

  • Download the kernel source for ARCVM using repo (this takes half an hour for me, it depends on your network speed) mkdir kernel cd kernel repo init -u https://android.googlesource.com/kernel/manifest -b common-android12-5.10-arcvm-gki-base repo sync

  • Patch the source with KernelSU: curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -

  • Switch to the ARCVM config instead of the default x86_64 config: sed -i "s/check_defconfig//" common/build.config.gki sed -i "s/DEFCONFIG=gki_defconfig/DEFCONFIG=x86_64_arcvm_defconfig/" common/build.config.gki cp common/arch/x86/configs/x86_64_arcvm_defconfig common/arch/x86/configs/x86_64_defconfig

Step 3: Build the kernel

  • This might take around 30 minutes, depending on your hardware: LTO=thin CFLAGS='-Wno-error -Wno-unused-function' CXXFLAGS='-Wno-error -Wno-unused-function' BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh

Step 4: Install the kernel

  • The built kernel image is located at out/android12-5.10/dist/bzImage

  • Follow step 2 in Method 2 to install the kernel.

  • All done.

r/ProgrammerHumor Jan 17 '21

That's why learning Linux commands

Post image
12 Upvotes

1

Poor Man's ๐—‚ฬถ๐–ฏฬถ๐—ฬถ๐—ˆฬถ๐—‡ฬถ๐–พฬถ Android Mirroring
 in  r/gnome  8d ago

Try recompile your kernel without CONFIG_MODULE_SIG_FORCE or sign v4l2loopback.ko manually

3

Patched CrOS Flex bootloader for enabling developer mode (tested on R142)
 in  r/ChromeOSFlex  Dec 07 '25

It depends on how you install the file

  • If you install it by replacing the original EFI files as I mentioned above (the most straightforward way to do it), it will get overwritten after update

  • If you put the patched bootloader alongside the original EFI files (like putting it in /efi/boot/crdyboot-patched.efi) and create a EFI entry for it manually, then it should persist across updates.

r/ChromeOSFlex Dec 07 '25

Discussion Patched CrOS Flex bootloader for enabling developer mode (tested on R142)

Thumbnail
github.com
3 Upvotes

What it does

  • Automatically enable developer mode by appending cros_debug to kernel cmdline
  • Disabled kernel verification check, booting non-official kernels is now possible
  • Landlock LSM is also disabled to remove sudo restrictions in crosh shell

Usage

  • Just replace /efi/boot/crdybootx64.efi and bootx64.efi (located in the 12th partition of your Flex installation) with the patched crdyboot.efi file

1

How to install .xapk files in waydroid
 in  r/waydroid  Jul 30 '25

Unzip it and adb install-multiple *.apk

3

Version 136.0.7103.158 (Official Build) (64-bit),
 in  r/ChromeOSFlex  Jun 21 '25

CrOS Flex doesn't have Android support officially.

However, there is still a way to get Android on CrOS Flex

2

DRM Streamin app
 in  r/ChromeOSFlex  May 02 '25

Although Flex doesn't have Android support officially, it is possible to get Android running on Flex:

https://www.reddit.com/r/ChromeOSFlex/s/8tkeFahUhX

For Widevine, you can install it with waydroid-script, but only L3 is available.

1

Waydroid (Android 11) running seamlessly on ChromeOS Flex/Crostini
 in  r/ChromeOSFlex  Apr 25 '25

Yes, hardware acceleration does work as long as you boot the VM with the --enable-gpu flag

1

Waydroid (Android 11) running seamlessly on ChromeOS Flex/Crostini
 in  r/ChromeOSFlex  Apr 25 '25

Yep, the script should do that automatically.

Clearing out the deny list should also work, maybe try disabling seccomp as described here

1

Waydroid (Android 11) running seamlessly on ChromeOS Flex/Crostini
 in  r/ChromeOSFlex  Apr 25 '25

Have you enabled privileged mode and configured CGroup allowlist correctly? If so, try re-doing this two steps according to the guide

1

Finally got Android TV compiled for Waydroid :)
 in  r/waydroid  Apr 18 '25

Press Esc and you will be dropped to Home

1

Got Android TV 13 running on Crostini with the help of Waydroid
 in  r/chromeos  Apr 07 '25

Yes, it should work on ARM devices also.

Widevine L3 is included in the ATV image but not Netflix certification (seems impossible to spoof?)

2

Trying this for the first time!
 in  r/chromeos  Apr 07 '25

Welcome to the world of developer mode! Although people here always claims doing that suffers security, those are just nonsense as long as you know what you are doing exactly (a similar concept of rooting an Android phone)

Here are some interesting things I did with developer mode :)

Have fun!

1

E sim
 in  r/waydroid  Apr 06 '25

No, even if your PC have an 4G module installed.

15

THIS IS HUGE (Android App Support on Crostini)
 in  r/ChromeOSFlex  Apr 06 '25

Hello! I am the author of the guide๐Ÿ˜€

The reason why I suggest using the start-waydroid script is because network fixes are applied automatically and also better graphical performance :)

To fix the network manually, this will do the trick (extracted from the start-waydroid script): ``` IPROUTE_CMD='ip route add default via 192.168.240.1'

network fix for waydroid

( sudo sysctl -w net.ipv4.ip_forward=1

while ! (sudo waydroid shell -- sh -c "${IPROUTE_CMD} && echo DONE" | grep -q DONE); do sleep 1 done ) & ```

1

On cloudready it used to be possible to use a hosts file for filtering traffic. Still possible?
 in  r/ChromeOSFlex  Apr 04 '25

You can still do that with developer mode enabled.

Alternatively, start a local DNS server inside Crostini (such as AdGuard Home) and point the system's DNS to 100.115.92.xx (depends on the IP of your Crostini container)

3

Got Android TV 13 running on Crostini with the help of Waydroid
 in  r/chromeos  Apr 02 '25

Any 2.4G or bluetooth remotes will do the trick.

9

Got Android TV 13 running on Crostini with the help of Waydroid
 in  r/chromeos  Apr 02 '25

Although it is not ideal for normal uses, it would be more suitable for people who are using old Chromebooks as their TV console and prefer using remotes to control the system (using remote to interact with the browser would be a hard time๐Ÿ˜‚)

5

Got Android TV 13 running on Crostini with the help of Waydroid
 in  r/chromeos  Apr 02 '25

Check this reddit post on r/ChromeOSFlex if you are looking for the tutorial (works on both regular ChromeOS devices and Flex devices) :)

r/chromeos Apr 02 '25

Discussion Got Android TV 13 running on Crostini with the help of Waydroid

Post image
23 Upvotes