Coder Social home page Coder Social logo

Why CANT WE USE MAGISK? about cranberry HOT 13 OPEN

ceriswhite avatar ceriswhite commented on August 15, 2024
Why CANT WE USE MAGISK?

from cranberry.

Comments (13)

vinaykharayat avatar vinaykharayat commented on August 15, 2024 3

ChromeOS does not use boot.img. The only images the containers require are system and data partitions, thus leaving the current method unusable. If there was a way to force all system modifications to be written to /data instead, that would resolve all our issues, but that just doesn't seem to be possible.

If anyone can correct me on this, please do

Chrome OS is Linux based there has to be a boot partition.

from cranberry.

CerisWhite avatar CerisWhite commented on August 15, 2024 2

While I appreciate the input, I have no idea how Magisk works. Even after looking through their install scripts, I'm utterly baffled by how to implement it all. If anyone can piece it together, I'll gladly incorporate the changes. I jumped between r/Android and a few other discord servers trying to get more information and absolutely no one had any further information on it.

Also, SuperSU isn't "trashy". While it's not the most up-to-date method, it still works. The real issue here is the inability to set the image to mount read-write, which I'm still working on, alongside getting ARC into builds of ChromiumOS.

from cranberry.

vinaykharayat avatar vinaykharayat commented on August 15, 2024

Well, I am not an expert but when I tried to understand how magisk works, I found something interesting. Basically in other rooting methods, we place the su file in the /usr/bin folder and execute it. But magisk has a clever concept behind this. What @topjohnwu did is modified the boot.img and made some other path (data/sbin) to be used to execute su. I hope you will find the below links useful.
https://topjohnwu.github.io/Magisk/
https://topjohnwu.github.io/Magisk/details.html
Although I have no idea about Chromebook system architecture, I think magisk provides a manual method to path boot.img If Chromebook has boot.img concept (as it should) you can try patching boot.img and compare that to the unpatched version. Or you can try this with any android boot.img to get the idea.

from cranberry.

CerisWhite avatar CerisWhite commented on August 15, 2024

ChromeOS does not use boot.img. The only images the containers require are system and data partitions, thus leaving the current method unusable. If there was a way to force all system modifications to be written to /data instead, that would resolve all our issues, but that just doesn't seem to be possible.

If anyone can correct me on this, please do

from cranberry.

xAffan avatar xAffan commented on August 15, 2024

If I'm not wrong, there must be something that tells the system that it needs to execute x from x path or just basic instructions. I'm not exactly sure where they are but it's really worth looking into as with magisk, we might even pass safetynet. The upcoming zygisk will provide even more powerful tools.

from cranberry.

CerisWhite avatar CerisWhite commented on August 15, 2024

Chrome OS is Linux based there has to be a boot partition.

Not all Linux systems are the same. ChromeOS does not use /boot and neither does the android container. That said, the way ChromeOS boots isn't part of this repository and I won't go into detail, but my discord tag is now in the readme and you can discuss with me there if you're curious.


@xAffan That would be PATH variables, but those don't really do much for the system as a whole unless we set up a bunch of funky symlinks to redirect the System partition to the Data partition. I'd much rather figure out why changing the arc.properties trashes the whole image but I'm not exactly making much progress.
On a side note, there's a lot more going on with Magisk than just "redirecting". It's a lot more complicated than "why don't we use this?", especially on ChromeOS, which is fundamentally different from using a real android device. Like I said before, I cannot read the scripts used by Magisk, rendering it impossible for me to incorporate those methods.

No one else I've tried to talk with has any idea how it works either, so until I get some outside assistance, there's no way to even start working it into my current script.

from cranberry.

Geofferey avatar Geofferey commented on August 15, 2024

I may be able to offer you some insight... Magisk essentially works at it's core by replacing the init binary in root of system / boot.img. Since the android subsystem doesn't use a boot.img we may be able to replace the init daemon in rootfs with magiskinit. On newer versions of ChromeOS they seem to be using Android 10 so magisk v21.0 should suffice for now. I plan to play with this concept some since CrAnberry doesn't seem to be working on my HP X2 '11. Hopefully this little bit of info is helpful.

from cranberry.

CerisWhite avatar CerisWhite commented on August 15, 2024

@Geofferey It's entirely possible that Android 10 breaks this method yet again. As I don't have a recent Chromebook with Android to test on, I'm afraid this is as far as I can go. I'm more than happy to discuss my current findings and see what's possible as far as getting this (and your) project up to speed with Magisk, though.

from cranberry.

zainullahk avatar zainullahk commented on August 15, 2024

magisk could be possible when android apps move to vm

from cranberry.

xAffan avatar xAffan commented on August 15, 2024

from cranberry.

PicPew00 avatar PicPew00 commented on August 15, 2024

there is a similar project going about chrome os root https://github.com/newbit1/rootCROS maybe you can help each other

from cranberry.

CerisWhite avatar CerisWhite commented on August 15, 2024

@PicPew00 Thank you for pointing my attention to that. If they ever reach out to me, I will gladly accept their help, but it seems like they don't intend to support any other devices other than the ones they have listed already. I'd have to read through the script myself to see if what they do can be adapted. For the most part, I've moved on to other projects and have accepted this one as complete, since I do not have a ChromeOS device with the latest version of android to work with anymore.

from cranberry.

heremiah81 avatar heremiah81 commented on August 15, 2024

I know it has been over a year but if there is a Ramdisk you should be able to patch with Magisk, and even if there isn't a valid ramdisk (or boot.img }maybe look into a fork called Magisk Delta? The dude that runs that dist is named HuskyDg (or some amalgamation of husky Dog.) I'm trying to gain root on an old HP G3 chromebook for research reasons...

from cranberry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.