Question How to edit hosts file without Magisk? - Moto G50

I'm using phhusson GSI rom (https://github.com/phhusson/treble_experimentations/releases) and since I'm failing to install Magisk (because there's no boot.img to patch), I wonder if there's a way to edit /system/etc/hosts file in a way that it persists (or is automatically restored) after a reboot.
Thanks!

Related

[DEV][Help][pre-Magisked] Integrating Magisk into kernel

Hi, I am trying to make some kind of "pre-Magisked" kernel, so that, when I flash that kernel already contains the necessary files to Magisk Superuser, avoiding the need to flash Magisk after each kernel flash.
I know the current script patches the ramdisk image when installing it, but I cant see which changes are executed exactly. Tried some of them resulting in bootloop
So, is there a way to create a pre-Magisked kernel or, at least, integrate basic files and later manually install Magisk Manager APK? There was a way to do it in Nougat with SuperSU which doesnt work with Oreo anymore...
bamsbamx said:
Hi, I am trying to make some kind of "pre-Magisked" kernel, so that, when I flash that kernel already contains the necessary files to Magisk Superuser, avoiding the need to flash Magisk after each kernel flash.
I know the current script patches the ramdisk image when installing it, but I cant see which changes are executed exactly. Tried some of them resulting in bootloop
So, is there a way to create a pre-Magisked kernel or, at least, integrate basic files and later manually install Magisk Manager APK? There was a way to do it in Nougat with SuperSU which doesnt work with Oreo anymore...
Click to expand...
Click to collapse
No its not possible to have a pre magisk'd kernel as magisk sets up files in /data/adb which you cannot do later on otherwise magisk will be non functional, you must flash the zip after wiping your data.

Installing Magisk from TWRP Official

I download Magisk and No Verity from http://www.desinerd.co.in/how-to-huawei-p20-pro-root-twrp-recovery/.
I have TWRP official installed 3.2.1 with security disabled on the EMUI. I'm trying to install the Magisk and No Verity but I can't find the zip files in the file system. Where is the Download folder located in the file system? Do I have to move the files somewhere else in order to access it from TWRP? I read that the Download folder is in /sdcard, but there are multiple folders with random letters and numbers, like maybe it's encrypted or something?
If I'm rooting wrong, can you tell me how to root?
I tried using the Patched ramdisk of Magisk, but it didn't do anything after reboot and Root Check says not rooted, hence, that's why I'm following this guide to see if this works.
Same
Did you find out how to root as I'm having the same problem
Install the unofficial TWRP. Remove fingerprint/password/pin etc then try again. TWRP doesn't decrypt when they're active.
Hi, having the same issue with TWRP (twrp-3.2.2-0-charlotte.img and twrp-3.2.1-0-charlotte.img) from dl.twrp.me/charlotte/.
How can I repair it? Cant flash Magisk.
Thanks

What happened to the boot.img patching option in Magisk Manager?

I know Magisk can be flashed via TWRP, and that is the preferred way for me, usually. But on Magisk 19.3 I don't see an option to patch the boot.img without flashing the Magisk installer zip from TWRP. I just want to patch the img and flash it via Odin (I have a Samsung device, fastboot not available on those). I would like to keep the recovery as stock and system partition unmodified with dm-verity enabled. That way I can just use system less modules.
I normally prefer Phh's Superuser or SuperSU, I like old fashioned, traditional root without systemless or modules. But there are some tests I would like to run, and modules I would like to try.
Thanks!
It's right there if you press the install button and choose "Install"... If it it isn't on your setup you need to provide more information.
And both phh's and SuperSU are systemless root.
My setup:
Samsung Galaxy Note 4 N910F (international unbranded variant, latest stock Marshmallow firmware)
When I press install in Magisk Manager, it only offers the option to download a zip, no boot.img patching. I need the output file as tar or tar.md5, not img, so it can be flashed with Odin (no need for TWRP if flashed that way).
You're right, Phh is systemless, but it doesn't offer modules. SuperSU can be systemless or forced as system-installed.
So you don't have the "Select and patch a file" option at all? If you're looking for a specific tar file option there isn't one anymore. Just pick the file and let the Manager do the rest.
Didgeridoohan said:
So you don't have the "Select and patch a file" option at all? If you're looking for a specific tar file option there isn't one anymore. Just pick the file and let the Manager do the rest.
Click to expand...
Click to collapse
Hi, I am confused. I did use Manager 7.3.5 with Magisk 19 and now latest 20 .
When I use "select and patch a file". Use a stock boot.img file from my Tab 4 8.0 T330 Android v5.1.1 last version available. Whilst patched file is being created, a message flashes on screen img or tar file can be selected.
The problem is there is No option to "select img or tar file in output" as was the case in earlier versions of Manager v5 or 6. Which I previously used to create either patched img or tar files.
I have created different img files using the same original boot.img, only created using different Manager updates as they are created and released. Each time a new version creates a different file size.
Therefore you comment "tar file option is no more". WHY NOT.???
Next comment Just pick the file and let the Manager do the rest". Please explain or provide link to method you are referring to.
Another Question. Can I use an earlier img or tar file created on earlier Manager version with the latest Magisk version to install Magisk 20 on the Tablet. I have also used "img to tar to md5" convertor software and use ODIN to update the patched boot file, or install TWRP and use patched img file.
Any comments would be appreciated. Cheers
@BeeJ1109 It just means that the Manager will detect what type of file you're providing and outputs an img or tar file depending on the input. Tar in, tar out, etc.
There's no specific option for it in the settings anymore, since it is handled automatically now.
Didgeridoohan said:
@BeeJ1109 It just means that the Manager will detect what type of file you're providing and outputs an img or tar file depending on the input. Tar in, tar out, etc.
There's no specific option for it in the settings anymore, since it is handled automatically now.
Click to expand...
Click to collapse
Hi, Didgeridoohan, Thanks for your reply.
So I understand that if I use boot.img it will convert to patched.boot.img or patched.magisk.img.
If I use boot.tar it will convert to patched.boot.tar or patched.magisk.tar.
Question 1: So you are now saying I have to use another app to convert img to tar before patching or after patching.
Seems to me a backward function of your latest Manager, when previously you had a choice to select which option you received as the output file. So much extra time and effort to achieve the same result.
Question 2: This the case then I have to install latest manager and reinstall older version that worked. Create patched file as tar. Use ODIN to install patched boot file.
Do I need to rename magisk to boot, so ODIN will accept the patched tar file.
I use latest ODIN 13 on my Samsung Galaxy Tabs 4 & S4 and Phones S3, S4, & S8.
Question 3: Will older version created Tar file work with latest version Magisk to Root device, Then update both Magisk and Manager as normal when updates are released.
Or do I root using same version Magisk and Manager that created the patched boot file, then update to latest version.
I have successfully updated Stock and RR or Lineage OS Firmwares for years.
Samsung devices do not allow sideload installs and ODIN is so easy to use to install updates or new versions for all devices.
I also used other methods to root devices ie TWRP, Flashfire, but now Magisk is updated regularly, Hide Apps works on 7.1 thru 10, whereas old apps don't work past Android 4.4.
Thanks for your assistance, Cheers BJ.
@BeeJ1109 I know very little about Samsung so I can't really answer most of your questions, but wouldn't the file be a tar file to start with?
Anyway, if you wish for some functions to work differently than they currently do I would suggest opening a feature request issue in GitHub (with a detailed description of what you want).
Any solution?
Hi there, i know this is an old thread, but i was wondering if anyone found a solution for this.
I am also trying to install Magisk Manager, modifying the boot.img file from my firmware. The problem i find is that the boot.img is inside a boot.img.lz4 (which i open with the modified 7zip), and that is inside another img.tar file.
Now, i seem to understand the old Magisk Manager (version 6 for example), would allow to decide the output file, while the v7 does not anymore. I would just receive a repatched_boot.img file, which i cannot use to flash using Odin.
I also tried installing Magisk v6, but it will force to update upon doing the repatching.
Do you have any other solution?
PS: all reason i'm trying to do this is trying to install (any) TWRP on my tablet SM-P580 will show a blue/black screen.
walty80 said:
Hi there, i know this is an old thread, but i was wondering if anyone found a solution for this.
I am also trying to install Magisk Manager, modifying the boot.img file from my firmware. The problem i find is that the boot.img is inside a boot.img.lz4 (which i open with the modified 7zip), and that is inside another img.tar file.
Now, i seem to understand the old Magisk Manager (version 6 for example), would allow to decide the output file, while the v7 does not anymore. I would just receive a repatched_boot.img file, which i cannot use to flash using Odin.
I also tried installing Magisk v6, but it will force to update upon doing the repatching.
Do you have any other solution?
PS: all reason i'm trying to do this is trying to install (any) TWRP on my tablet SM-P580 will show a blue/black screen.
Click to expand...
Click to collapse
Hi.
Use Magisk Manager to create a modified stock boot.img. as you have mentioned.
What I do is search for Windoows PC "img to tar converter" app. on Google search.
Lots will be found. They a small executable batch file. Which you Right click on the "convert tar".exe file to run on a Windows PC.
Best one will have Input and Output directories. You can inset your patched boot .img file, you have just downloaded for your device. Add this file into Input directory of the app using Windows Explorer File Manager. May have to setup the location of resultant output directory. Then run Img to Tar converter . The application will convert your patched_boot img file into a patched_boot.tar file.
That newly modified .tar can now use ODIN. To install patched_boot.tar onto your connected device via PC USB port using the Latest version of ODIN 3.14.1.
Hope that helps. CHEERS

How to delete magisk module without root?

Hi, I have installed a magisk module that brokes the system and gets stuck on Havoc OS logo, by flashing original boot image I'm using the phone seamless, but I'm not root anymore.
I tried with TWRP filemanager, but for this device (Redmi Note 9 merlin) it must not work very well and I can't go inside /data/adb/modules folder (It says I haven't permission for that). I didn't found a way to do with adb (but I hope it's possible).
Any idea would be welcome, thanks!
You can't.
For removing modules, you have two methods.
For first method, you need to boot in emergency mode, open magisk manager, remove module and reboot.
(It works only with magisk +v21.)
(To boot in emergency mode, keep pressed volume down after boot starts.)
For second method, you need to flash the original stock boot.img, open magisk manager, remove module, reboot and then flash the magisk patched boot.img again.
Here, you can find boot images for original stock and magisk patched: https://forum.xda-developers.com/t/...omi-redmi-note-9-xiaomi-redmi-10x-4g.4204671/
Good luck
Do you need help with your MERLIN device ?
Read this FAQ: https://forum.xda-developers.com/t/...for-merlin-redmi-10x-4g-redmi-note-9.4225177/

Question How To Update System While Keeping Magisk

I have several modules in Magisk app and couple of apps having root authority after get root with Magisk (like Tasker). Now I want to update system while keeping my magisk apps and root-to-use apps working without any risk of stucking in reboot after install a new ROM.
Could I just firstly patch the boot.img of objective ROM in Magisk, replace the boot.img with magisk_pathed_XXXX.img and flash all the .img files needed? Will this way work? Or any other ways?
while flashing a newer rom version, the magisk modules are not deleted. After flashing the new version install magisk again and everything is working well. Before updatating the rom version "restore hide magisk by itself" if you have enabled it.
If you have modules like SmaliPatcher - These will cause a bootloop after update.
Disable all modules before any update and make sure to Restore the Magisk App if its hidden.
zuize411 said:
I have several modules in Magisk app and couple of apps having root authority after get root with Magisk (like Tasker). Now I want to update system while keeping my magisk apps and root-to-use apps working without any risk of stucking in reboot after install a new ROM.
Could I just firstly patch the boot.img of objective ROM in Magisk, replace the boot.img with magisk_pathed_XXXX.img and flash all the .img files needed? Will this way work? Or any other ways?
Click to expand...
Click to collapse
I take from your description that you are flashing a fastboot ROM. In that case you are correct, i.e.
take boot.img from new ROM, patch in Magisk and copy back into the original installation folder. Simplest is to rename the original boot image and name the new magisk boot image: boot.img
now you can simply start the installation batch and it will automatically install the magisk-patched boot.img
If you are using TWRP to flash the ROM this is not needed, just flash the corresponsing magisk installation ZIP/APK in TWRP right after the system update and BEFORE rebooting.
In addition @JazonX gave a good advice , but it really depends on which modules you use.

Categories

Resources