Magisk & Lineage = No wifi - General Questions and Answers

Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?

Ork_77 said:
Goodmorning everyone. I have a problem with magisk and lineageos 18.1
I have a xiaomi mi mix 2 unlocked
Premise: I've never had any problems with magisk and lineage until now.
I installed magisk scrupulously following the official instructions and using both the boot.img patch system and the direct installation via recovery (adb sideload & lineage recovery)
In both cases magisk appears as not installed when looking from magisk manager and the wifi stops working (the phone connects to the various networks I have tried but reveals them as without internet.)
clearing cache does nothing
resetting network connections does nothing
Updating to the latest version of the radio firmware does nothing
restore boot.img OR reinstall lineage corrects the problem
In all cases I don't get root ...
Honestly, everything is beyond my understanding .. can you help me?
Click to expand...
Click to collapse
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?

Droidriven said:
It seems to me like you aren't properly flashing the patched boot.img. What method are you using to flash the patched boot.img?
Click to expand...
Click to collapse
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.

Ork_77 said:
I used both the method I'm aware of
1) I install magisk manager, extract the boot.img from lineage zip, upload it to the phone, patch it with magisk manager (operation ends fine), pass the modified version back to the pc reboot the phone in recovery and install the new boot with adb (installation ends correctly).
2) I rename the magisk app as .zip and then I install it through recovery
The result is the same.
In the past (with lineage 17) i always used the second method and I lived happy and with root for years.
Click to expand...
Click to collapse
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com

...

Droidriven said:
Since you have TWRP, you don't need the patched boot.img.
The Magisk Manager app has the root binaries built in now, all you should need to do is a Magisk Manager flashable zip.
Read this:
The Magisk Manager APK can now be flashed from within TWRP
Magisk is now distributed as part of the Manager APK, meaning you no longer need to flash a separate ZIP file from a custom recovery.
www.xda-developers.com
Click to expand...
Click to collapse
Yes...this is exatcly what I did.
Method 2.

Ork_77 said:
Yes...this is exatcly what I did.
Method 2.
Click to expand...
Click to collapse
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.

Droidriven said:
You said that you converted the apk into a flashable zip. I think you should be able to find a MagiskManager.zip that is prepackaged for you to download and flash.
Also, if you use the patched boot.img method, you should rename the patched boot.img to "boot.img", then place the boot.img in your fastboot folder on PC. Then right click inside the fastboot folder and choose the option to open a cmd terminal, then boot your device into fastboot mode, connect your device to PC, type the following command:
fastboot devices(press enter)
If it returns a serial number, you are connected. Next, type the following command:
fastboot flash boot boot.img(press enter)
This should flash the patched boot.img correctly. Then reboot the device to system and try installing the Magisk Manager apk file from your internal storage instead of flashing it as a zip in recovery. If that doesn't work, try flashing the apk as a zip in recovery, wipe cache and dalvik cache after flashing the zip(DO NOT FACTORY RESET OR FORMAT ANYTHING), then reboot to system and see if it works correctly.
Click to expand...
Click to collapse
Hi Droidriven, thank you for your answers. Perhaps, synthesizing my steps too much, I gave the impression of not being particularly capable in computer science (you even tell me to press "enter" after commands ...). Well, let's say it's not my case.
All steps are performed correctly.
all steps end without errors.
No matter what I do, in the end Magisk appears as n / a, I don't have root, and the data connection doesn't work. Small addition about the latter aspect: when rebooting the wifi connection works for a variable time between 10 and 20 seconds, after which the network appears as without internet (or intranet) but the phone remains connected.
At the reboot, history repeats itself
Restoring the original boot everything returns to normal.

Related

Magisk creates bootloop

downloaded factory image from googles website
copied latest platform tools to the same directory as the extracted contents of the zip from google.
run the batch file, can boot into android just fine.
reboot to bootloader, use fastboot boot twrp-3.2.3-0-walleye.img
install the twrp zip
android boots fine and i can use my phone normally.
install magisk apk, reboot to recovery, install magisk 16.7 zip, android wont boot
everything was fine until i made a backup last night within twrp. ive repeated the above process idk how many times. any help would be appreciated
EDIT: https://forum.xda-developers.com/pixel-2/how-to/guide-unlock-flash-root-pixel-2-walleye-t3702417 is the guide i was using.
EDIT 2: now when i install TWRP and try to reboot to system, it just reboots back to TWRP...
EDIT 3: looking at the contents of my twrp zip, theres a file called magiskboot so what im going to do is reinstall the factory image using the bash script included in the download directly from google, then just flash twrp-pixel2-installer-walleye-3.2.3-0.zip, then install the magisk manager and see what happens. if that doesnt work ill redo the factory image, boot from twrp-3.2.3-0-walleye.img, install magisk, and see what happens without installing twrp.

[GUIDE][OP7][9.0/10.0/11.0] Unlock Bootloader | TWRP | Root with Magisk | Update

Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
Introduction
This thread is dedicated to newbies and rooting, so if you're familiar with the whole procedure, you're done
Just ask questions about every step and you'll receive help!
Downloads
TWRP Installer ZIP and TWRP IMG for Android 9/10: https://forum.xda-developers.com/oneplus-7/development/recovery-unofficial-twrp-recovery-t3932943
TWRP for Android 11(including instructions, thank's to @Nebrassy ): https://forum.xda-developers.com/t/recovery-11-unofficial-teamwin-recovery-project.4289455/
TWRP Installer ZIP = For example twrp-3.4.0-10-guacamole-unified-installer-mauronofrio.zip
TWRP IMG = For example twrp-3.4.0-10--guacamole-unified-Q-mauronofrio.img
Check for Pie or Q TWRP IMG! If you have Android Pie, choose Pie TWRP IMG, if you have Android Q, choose Q TWRP IMG.
The TWRP Installer ZIP works on Android Pie(9)/Q(10)
Magisk ZIP: https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Hints
If you need to update TWRP or Magisk, always keep older versions of both in hand(Magisk canary or beta may have issues)
Remove your lockscreen protection which also removes encryption to prebvent mounting issues within TWRP
Before proceeding
Your Windows PC should already recognized your device with the USB cable
Use an USB cable provided with the phone
Make sure your Windows Explorer is set up to have file extensions enabled to avoid file name issues
This process will FORMAT/WIPE/DELETE your internal storage and every file of your phone, so please back it off your device at first!
Also keep a boot.img from your current system in place if anything went wrong so you can flash it via fastboot, see "Rooting without TWRP" for how to get it.
Rooting with TWRP (Android 9/10)​
Steps for unlocked bootloader with TWRP AND Root(Magisk)
1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
4. Copy the latest "TWRP installer ZIP" and "Magisk ZIP" to the phones internal storage.
5. Copy the "TWRP IMG" to the "platform-tools" folder from step 1.
6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
7. Type
Code:
adb devices
to see if your device is connected and recognized sucessfully by your PC.
8. Type
Code:
adb reboot bootloader
to reboot to fastboot mode.
9. Type
Code:
fastboot boot recoveryimgfilename.img
to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
10. Enter your screen lock PIN within TWRP if you have set it up before.
11. Allow modifications.
12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP installer ZIP" from your phones storage from step 4.
13. Hit "install" and navigate to the "TWRP installer ZIP" file and select it for installation(dont boot the system now!).
14. Go back and flash "Magisk ZIP" the same way as for TWRP Zip otherwise your device will not boot!
15. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP and Magisk:highfive:
Steps for unlocked bootloader with TWRP WITHOUT Root(Magisk)
1. Follow this guide to unlock your Oneplus 7 bootloader(wipes everything on your device, works for OP7 pro and OP7): https://forum.xda-developers.com/showpost.php?p=79741564&postcount=2.
2. Your phones bootloader is now unlocked, leave the phone plugged to your PC
3. Make sure you have enabled USB-Debugging and Advanced Reboot under developer options(see step 1 how to enable it all) again after the first boot of the wiped device, since this gets reset
4. Copy the latest "TWRP IMG" to the phones internal storage.
5. Copy the latest "TWRP IMG" to the "platform-tools" folder from step 1.
6. Open command window or PowerShell window again if you did not closed it before within the "platform-tools" folder from step 1
7. Type
Code:
adb devices
to see if your device is connected and recognized sucessfully by your PC.
8. Type
Code:
adb reboot bootloader
to reboot to fastboot mode.
9. Type
Code:
fastboot boot recoveryimgfilename.img
to temporary boot TWRP, where recoveryimgfilename.img is the name of your downloaded TWRP *.img file, so watch your file name!.
10. Enter your screen lock PIN within TWRP if you have set it up before.
11. Allow modifications.
12. Now you have temporary booted twrp recovery. To make it stick permanently you need to flash the "TWRP IMG" from your phones storage from step 4
13. Navigate to advanced menu within TWRP, click on "Install Recovery Ramdisk" and select the "TWRP IMG". This will patch the boot image which does Magisk otherwise.
14. Thats all, you can unplug the USB cable and boot the device to your system. Your device is now bootloader unlocked with TWRP:highfive:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Rooting without TWRP (Android 9/10/11)​
Also useful to get stock recovery and kernel --> Recovery is within boot.img on A/B devices like OP7
Refer here for unlocking the bootloader.
1. Download the payload dumper tool to your PC from here and extract it
2. Download the FULL OxygenOS Rom zip(The version your phone is running) and extract the payload.bin
3. Put payload.bin to "payload_input" folder o the extracted tool
4. Run payload_dumper.exe from the tool's folder
5. Extracted img files are in "payload_output" folder
6. Now you have your own boot.img for your Rom
7. Copy it to your phone
8. Patch the boot.img with Magisk directly on your device: Magisk Manager App -> hit install after your Magisk version -> hit "Select and Patch a file"
9. Copy the patched boot.img (it should be in the Download folder of your device named something like "magisk_patched-22100_bjjRn.img") back to your PC
10. Reboot your device to fastboot
11. Flash the patched magisk_patched-22100_bjjRn.img
Code:
fastboot flash boot_a magisk_patched-22100_bjjRn.img
fastboot flash boot_b magisk_patched-22100_bjjRn.img
12. Reboot your device. Now you have your phone rooted without the need of TWRP (Check with Magisk Manager App)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update your rooted OxygenOS (Android 9/10)​Steps for UPDATE OxygenOS via OTA and keep unlocked bootloader, TWRP, Root(Magisk)
1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
2. Go to Magisk Manager App and uninstall all modules
2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
3. Go to Android settings -> system -> system update and hit "Download & Install Now", don't reboot yet!
4. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
5. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version -> hit "install to inactive slot"
6. Reboot your device
7. Reinstall your Magisk Modules(maybe a reboot is necessary)
Your device is now updated via OTA and you keep TWRP and Root:highfive:
Steps for UPDATE OxygenOS via local upgrade and keep unlocked bootloader, TWRP, Root(Magisk)
1. [OPTIONAL, but highly recommended]Backup everything in case of issues!
2. Download the full rom zip file and place it into the root folder of your storage(/storage/emulated/0)
3. Go to Magisk Manager App and uninstall all modules
2.1 [Optional]: For some modules(read those instructions) you should do an reboot now, then proceed
4. Go to Android settings -> system -> system update and hit gear icon top right -> local upgrade, don't reboot yet!
5. (not for Android 11)Flash "TWRP ZIP" within Magisk Manager App like a Module: Magisk Manager App -> Menu -> Modules "+". This installs TWRP to both a/b partitions.
6. Install Magisk via Magisk Manager App again: Magisk Manager App -> hit install after your Magisk version ->hit "install to inactive slot"
7. Reboot your device
8. Reinstall your Magisk Modules(maybe a reboot is necessary)
Your device is now updated via local upgrade and you keep TWRP and Root:highfive:
If you have any issues, just feel free to ask!
@strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me.
Kollachi said:
@strongst you should maybe write in your guide that magisk flash is a must! Without phone won't boot if it's stock.
There are a lot of people who wanna flash TWRP without magisk. I don't know why they do that it makes no sense for me.
Click to expand...
Click to collapse
I made it a little bit more clear, thanks, that's an common issue across several devices and requested often enough
Thank you for the quick tutorial. For me it looks very similar to the procedure with the OnePlus 5, am I right?
Does this indicate, that an EFS Backup is also to create the same way? https://forum.xda-developers.com/oneplus-5/how-to/oneplus-5-unlock-bootloader-flash-twrp-t3624877
BR
Axel
AxelM said:
Thank you for the quick tutorial. For me it looks very similar to the procedure with the OnePlus 5, am I right?
Does this indicate, that an EFS Backup is also to create the same way? https://forum.xda-developers.com/oneplus-5/how-to/oneplus-5-unlock-bootloader-flash-twrp-t3624877
BR
Axel
Click to expand...
Click to collapse
There's something different after unlocking the bootloader(which is the same). Twrp and magisk installation is different due to treble.
For EFS you can backup with twrp or local terminal
dd if=/dev/block/sdf2 of=/sdcard/modemst1.bin bs=512
Thanks for the guide, my OnePlus 7 came with 9.5.5 and I want to clean flash to the latest 9.5.8. I have already unlocked the bootloader, boot into TWRP and installed TWRP, are these the correct steps to flash 9.5.8 as I'm confused with the A/B partition?
1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip
3. Flash kernel and Magisk or the other way round?
Camack said:
Thanks for the guide, my OnePlus 7 came with 9.5.5 and I want to clean flash to the latest 9.5.8. I have already unlocked the bootloader, boot into TWRP and installed TWRP, are these the correct steps to flash 9.5.8 as I'm confused with the A/B partition?
1. Wipe data, cache, system
2. Flash 9.5.8 signed flashable zip
3. Flash kernel and Magisk or the other way round?
Click to expand...
Click to collapse
1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip with current twrp
3. Flash twrp installer zip with current twrp
4. Flash magisk zip with current twrp
5. Reboot
Make sure not to FORMAT internal data, otherwise you wipe the files you want to flash as it formats sdcard
strongst said:
1. Wipe data, cache, system and internal storage
2. Flash 9.5.8 signed flashable zip with current twrp
3. Flash twrp installer zip with current twrp
4. Flash magisk zip with current twrp
5. Reboot
Make sure not to FORMAT internal data, otherwise you wipe the files you want to flash as it formats sdcard
Click to expand...
Click to collapse
Thanks, so I boot into TWRP first and then do step 1 and 2? Also, which step should I flash custom kernel?
Camack said:
Thanks, so I boot into TWRP first and then do step 1 and 2? Also, which step should I flash custom kernel?
Click to expand...
Click to collapse
You need to do all steps. I recommend to flash the custom kernel when you've sucessfully booted the device at first.
Hi, a new OP7 User here. I wanted to know how can i keep my data decrypted? i have installed TWRP but i want to decrypt my data and also keep it the same after updated newer updates. Is it possible? I was able to do it on my OP3T, so wanted to know if its possible on OP7 as well
murti52 said:
Hi, a new OP7 User here. I wanted to know how can i keep my data decrypted? i have installed TWRP but i want to decrypt my data and also keep it the same after updated newer updates. Is it possible? I was able to do it on my OP3T, so wanted to know if its possible on OP7 as well
Click to expand...
Click to collapse
This should work https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
strongst said:
This should work https://forum.xda-developers.com/android/software/universal-dm-verity-forceencrypt-t3817389
Click to expand...
Click to collapse
I think i messed up real bad, now when iam booting the phone, a message comes, your device is corrupt. It can't be trusted and will not boot.
murti52 said:
I think i messed up real bad, now when iam booting the phone, a message comes, your device is corrupt. It can't be trusted and will not boot.
Click to expand...
Click to collapse
That message is the bootloader unlocked warning and comes every time as soon as you unlocked the bootloader.
Flashing DM verity patch can only be done when you format internal storage which wipes everything of your internal storage. You can't "decrypt" your existing data permanently with this.
strongst said:
That message is the bootloader unlocked warning and comes every time as soon as you unlocked the bootloader.
Flashing DM verity patch can only be done when you format internal storage which wipes everything of your internal storage. You can't "decrypt" your existing data permanently with this.
Click to expand...
Click to collapse
No, this is not the same, i can't even go to fastboot or anything, it's hardbricked.
murti52 said:
No, this is not the same, i can't even go to fastboot or anything, it's hardbricked.
Click to expand...
Click to collapse
If you have really bricked it: https://forum.xda-developers.com/oneplus-7/how-to/op7-unbrick-tool-to-restore-device-to-t3954325
strongst said:
If you have really bricked it: https://forum.xda-developers.com/oneplus-7/how-to/op7-unbrick-tool-to-restore-device-to-t3954325
Click to expand...
Click to collapse
Sadly it didn't worked, as phone doesn't gets detected on pc, keeps on rebooting. Gave it to service center and they are also not able to solve it ??. So a replacement for me ?
Edit : i think the force decryption was the culprit. When i rebooted, system was crashing. Op3t had its specific force decrypt file, not a general one, So i think as the development moves forward, op7 will also get it's own. Hoping the best ?
murti52 said:
Sadly it didn't worked, as phone doesn't gets detected on pc, keeps on rebooting. Gave it to service center and they are also not able to solve it ??. So a replacement for me ?
Edit : i think the force decryption was the culprit. When i rebooted, system was crashing. Op3t had its specific force decrypt file, not a general one, So i think as the development moves forward, op7 will also get it's own. Hoping the best ?
Click to expand...
Click to collapse
This file also works on OP7 pro, so it should also work on normal op7. I think the issue comes from something other.
strongst said:
This file also works on OP7 pro, so it should also work on normal op7. I think the issue comes from something other.
Click to expand...
Click to collapse
Then there must be some issue with my flashing sequence. Btw, The service centre repaired the issue and i have rooted it and using bluespark with stock rom. I'll give the zip another try later on when a new update comes. Thanks for the help
I believe the default file system is ext4, is there any benefits changing it to f2fs?
Jacckz said:
I believe the default file system is ext4, is there any benefits changing it to f2fs?
Click to expand...
Click to collapse
A good and quick overview and comparison with oneplus 7 pro https://sparrowsnews.com/2019/08/13/difference-between-f2fs-and-ext4-file-system/

Magisk/Twrp for GSI (Won't work on stock)

I have a Twrp backup with the boot img patched with Magisk/Twrp boot to recovery boots GSI with magisk boot to recovery hold volume up while rebooting to recovery will boot twrp for this boot img to work u have to be on the vendor of the boot img which is also in the backup so the phone won't bootloop this vendor is modified to work with GSIs pass the magisk environmental setup and notch fix so swiping down is like swiping down on stock.... to implement notch fix go to developer settings hide display cut and choose the first hide option and your notch will be fixed...
Thanks @Spaceminer for the twrp for without this none would of been possible
please note twrp will only boot with a android 9 vendor and your GSI will only boot with magisk and twrrp with the vendor in the backup cause it matches the boot img, GSIs only boot when the vendor and boot img match
the boot img & vendor img in the backup is from Channel/Retail (PPY29. 105-160-4)
Instructions
If on android 9 stock
1. Boot to bootloader
2. fastboot - w
3. fastboot GSI of your choice
4. fastboot boot twrp.img
5. format data
6. Place the twrp folder you downloaded from the zip into your devices internal storage which will be available after u format data
7.Resize system
8.Flash gapps zip if gapps is needed
9.wipe dalvick
10. go to twrp restore boot and vendor
11. reboot to recovery and phone will boot after boot is complete install magisk manager it will do the environmental setup phone will reboot and u will have magisk.... ( if u want the best experience with magisk on this device I recommend that you use havoc cause with the lineage GSI magisk doesn't play nice but with havoc its stable also when making a backup it's boot, system image, vendor image, data if u chose system instead your backup will bootloop your device upon restoration)
Download (twrp img is in twrp folder remove it and place it in ADB folder)
https://mega.nz/file/7t03DLhL#jjS9vgrJMlDS-_-hsApyx4uJ6L8wXCN8HtjSqJrg2ds
if u wanted to do this manually to install the latest canary or stable version magisk need to patch twrp to the recovery flash phh root boot up install magisk manager give it root permissions with phh superuser from apk mirror now with elevated permissions the option patch directly will be avaliable cause u got root (it's the recommended option ?) chose recovery and leave the other 2 unchecked patch the img and reboot to recovery the phone will reboot os with magisk and u hold up while booting recovery will boot twrp after that backup that boot img in twrrp for future installation of the GSI of your choosing....
Hello,
Already figured it out.
Is there any way to flash a Android 10 ROM (treble) without loosing magisk ?
thanks for your help!
xcode22 said:
Hello,
Already figured it out.
Is there any way to flash a Android 10 ROM (treble) without loosing magisk ?
thanks for your help!
Click to expand...
Click to collapse
Everytime u flash a GSI just use the vendor and boot from the twrp folder and your android 10 GSI Will have magisk and twrp no need for data disabler zip cause my backup already has the vendor and boot patches enabled for decryption so twrp will be accessible via boot to recovery
([emoji88]Havoc GSI[emoji88])
Also have edxposed for Android 10 since the one in the repo won't work cause it needs a custom magisk with merged patches for xposed to work on android 10 this version has the patches in the edxposed so having to use a custom magisk won't be an issue cause as ya know obtaining magisk and twrrp in this device was unknown into this OP was made
([emoji88]Havoc GSI[emoji88])
Thanks so much for the instructions, only way i could install on G7 play.
The only thing is I always have to boot in recovery mode to start the system.
If I boot normal it starts again. Any way to solve this ?
I think somehow I flashed my ROM to the recovery partition ?
thank you!!
xcode22 said:
Thanks so much for the instructions, only way i could install on G7 play.
The only thing is I always have to boot in recovery mode to start the system.
If I boot normal it starts again. Any way to solve this ?
I think somehow I flashed my ROM to the recovery partition ?
thank you!!
Click to expand...
Click to collapse
Your on a GSI go in your system settings and activate advance boot and when u have to reboot just put reboot to recovery and you don't have to worry about manually rebooting to recovery everytime u have to reboot also no way u installed the rom to the recovery partion our device doesn't have a recovery partion the recovery lives within the boot img
([emoji88]Havoc GSI[emoji88])]
thanks, not sure if I can do this with my Treble gsi (phhusson).
The other thing is that some things got messed up after instalation for example I cannot put in a passcode for the phone.
Is there no other way to install magisk on the G7 play ?
Maybe this has to do with the vendor and boot beeing different model than mine wich is XT 1952-2 (latin american model)
thanks
xcode22 said:
thanks, not sure if I can do this with my Treble gsi (phhusson).
The other thing is that some things got messed up after instalation for example I cannot put in a passcode for the phone.
Is there no other way to install magisk on the G7 play ?
Maybe this has to do with the vendor and boot beeing different model than mine wich is XT 1952-2 (latin american model)
thanks
Click to expand...
Click to collapse
The reason the lockscreen doesn't work is cause the device is decrypted which is essential for the device to be able to reboot to twrp my vendor has the decryption patches for the full functionality of twrp however if u don't care about twrp and just want magisk just patch a fresh version of your boot img in magisk manager with the patch a file option and fastboot that boot img to your device install fresh GSI with your vendor so it will boot encrypted since your vendor doesn't have the decryption zip patches in the vendor... However with this method to have full functionality with magisk u will have to remove from vendor/bin/init mimi hab if this file isn't removed your magisk won't pass the environmental setup... U be given root privileges with magisk before u have to do the environmental setup so u can remove that file...
([emoji88]Havoc GSI[emoji88])
PoochyX said:
The reason the lockscreen doesn't work is cause the device is decrypted which is essential for the device to be able to reboot to twrp my vendor has the decryption patches for the full functionality of twrp however if u don't care about twrp and just want magisk just patch a fresh version of your boot img in magisk manager with the patch a file option and fastboot that boot img to your device install fresh GSI with your vendor so it will boot encrypted since your vendor doesn't have the decryption zip patches in the vendor... However with this method to have full functionality with magisk u will have to remove from vendor/bin/init mimi hab if this file isn't removed your magisk won't pass the environmental setup... U be given root privileges with magisk before u have to do the environmental setup so u can remove that file...
([emoji88]Havoc GSI[emoji88])
Click to expand...
Click to collapse
Yes I understand, sounds logic. I tried to follow your guide but it didn't work.
I did the following:
1. Followed your first instructions with restore vendor and boot in the end to have magisk twrp (Now on Android 10).
2. patched the boot.img (stock one Android 9) with magisk and pulled via adb on computer
3. fastboot flash boot boot.img (patched)
4. Fastboot flash system gsi.img (android 10)
After that I get a bootloop if I go via normal boot and recovery doesn?t boot either.
In the end I tried to flash the stock vendor.img but everything stayed the same.
Not sure how to remove the file in the /vendor/bin, with twrp ?
xcode22 said:
Yes I understand, sounds logic. I tried to follow your guide but it didn't work.
I did the following:
1. Followed your first instructions with restore vendor and boot in the end to have magisk twrp (Now on Android 10).
2. patched the boot.img (stock one Android 9) with magisk and pulled via adb on computer
3. fastboot flash boot boot.img (patched)
4. Fastboot flash system gsi.img (android 10)
After that I get a bootloop if I go via normal boot and recovery doesn?t boot either.
In the end I tried to flash the stock vendor.img but everything stayed the same.
Not sure how to remove the file in the /vendor/bin, with twrp ?
Click to expand...
Click to collapse
PoochyX on telegram dm me I walk you threw it
([emoji88]Havoc GSI[emoji88])
xcode22 said:
Yes I understand, sounds logic. I tried to follow your guide but it didn't work.
I did the following:
1. Followed your first instructions with restore vendor and boot in the end to have magisk twrp (Now on Android 10).
2. patched the boot.img (stock one Android 9) with magisk and pulled via adb on computer
3. fastboot flash boot boot.img (patched)
4. Fastboot flash system gsi.img (android 10)
After that I get a bootloop if I go via normal boot and recovery doesn?t boot either.
In the end I tried to flash the stock vendor.img but everything stayed the same.
Not sure how to remove the file in the /vendor/bin, with twrp ?
Click to expand...
Click to collapse
The easiest way I know of is from the stock OS using termux and root.
Code:
su
setenforce 0
mkdir /mnt/x && chmod 0755 /mnt/x
mount -o loop /dev/block/by-name/vendor_a /mnt/x
Now navigate to /mnt/x and everything from vendor will be in there. Find the file and delete it with a root explorer. Then unmount the partition and the changes will be permanent. Doing it this way gets around FEC, which is what prevents you from changing anything in vendor.
Code:
umount /mnt/x
If you need to work on the other vendor partition just change out vendor_a with vendor_b
Any recommendation about what GSI to choice for XT1952-6 variant?
mickem said:
Any recommendation about what GSI to choice for XT1952-6 variant?
Click to expand...
Click to collapse
Chaos GSI Bluetooth works without disabling audio effects (so u can use viper with bluetooth headset) it's clean stock with minimum stuff added to it and works with gravitybox then you got havoc that has the majority of stuff gravity has off the rip so it's not as minimum so more memory usage is needed and Bluetooth only works with the phh disable audio effects work around also magisk works good on both of these lineage is good also if you don't care about magisk working cause with our device magisk has issues on lineage don't know if it was fixed on a recent bulid however if lineage is your preference there is a phh root for it so u can be functional
([emoji88]Havoc GSI[emoji88])
My device is xt1952-4. I downloaded the latest firmware (PPYS29-105-160-4-8), and installed it to both slots. I am currently using Resurection Remix Pie. Is your patched boot.img and vendor compatible with the newer firmware or will I get a downgrade error?

[SOLVED] Bootloop-ish on Fastboot Mode but TWRP works

Hello, I'm new here, so if I'm doing something wrong have mercy .
My 1+7Pro GM1913 is unlocked, rooted with Magisk (I think 22.1), TWRP 3.5.0_9-0-guacamole and OOS (last flashed version was 10.0.11.GM21BA considering I still have on the phone the OnePlus7ProOxygen_21.E.32_OTA_032_all_2101280020_c39273ef1f205b6.zip).
Last time I've flashed something I think was about a month ago, with the last update. No problem so far, until today. This morning my phone had problems with wifi, so I rebooted it.
From that moment on, it boots only to Fastboot Mode. I can get to TWRP and I can access my phone directories from the pc only from TWRP, every other mode makes my phone unreachable from usb, and installing or updating drivers doesn't work.
I would love to avoid any data loss or anything related to having to reinstall every 2FA I have.
I tried deleting everything from /data/adb/modules but nothing changed.
I looked around on XDA but I usually get people stuck on Fastboot only and accessible via usb, which is not my case.
So I was thinking about flashing the latest available OTA, then TWRP, then Magisk from TWRP but I'm not sure if it will works or just worsen my problem.
Has anyone had this problem before? Any idea about how to solve this?
Thanks for anyone willing to help me.
Have a nice day!
EDIT:
Solved flashing the full OTA.zip, twrp.zip, reboot and Magisk.zip after renaming the apk.
I think this will help you:
Twrp --> flash your boot.img (with "payload dumper" it can be extracted from the full OTA update file)
Then flash twrp.zip, reboot in to twrp, flash magisk.zip, wipe dalvik cache
Reboot and provit ;-)
Being a monday and everything, I'll write down what I've done so far, this way if anyone find this post with the same luck as mine maybe it will be less painful for him\her.
I followed this guide on XDA in merit of the "payload dumper" suggested by Ghost323 and followed the instruction on the Github page, which are:
google protobuf for
Code:
python pip install protobuf
Make you sure you have Python 3.6 installed.
Download payload_dumper.py and update_metadata_pb2.py
Extract your OTA zip and place payload.bin in the same folder as these files.
Open PowerShell, Command Prompt, or Terminal depending on your OS.
Enter the following command:
Code:
python -m pip install protobuf
and being my zip a full OTA​
When that’s finished, enter this command:
Code:
python payload_dumper.py payload.bin
This will start to extract the images within the payload.bin file to the output folder you are in.
Click to expand...
Click to collapse
All good until the
Code:
python payload_dumper.py payload.bin
gave me a "no module named bdsiff4" error.
So I used
Code:
pip install bsdiff4
and turns out I'm missing Microsoft Visual C++ 14.0, which is absurd because I'm staring at it in my programs and I used it last week.
Anyway, one vs_BuildTools.exe, 12Gb downloaded and a reboot later, this time
Code:
pip install bsdiff4
works and the
Code:
python payload_dumper.py payload.bin
command finally starts.
Once that's done in the output folder I found the boot.img and made a copy into my phone root folder /.
At this point, I was looking for a flashable zip of Magisk, but I found out in a tweet dated 11:55 AM · Jan 22, 2021 that "the Magisk Manager APK *itself* is a custom recovery flashable zip", so back to Github to download the Magisk-v22.1.apk and copy that on the same root folder on my phone, following the instruction under the Magisk v22.0 updated installation guide. Under "Custom Recovery" it is written to rename the .apk into .zip.
On TWRP, Install, Install Image, and selected boot.img.
At that point I can choose between Boot, System Image, Vendor Image and Install Recovery Ramdisk.
But on the installation guide of Magisk is written "Never, ever try to restore either boot or recovery partitions back to stock! You can easily brick your device by doing so, and the only way out is to do a full Odin restore with data wipe."
So now I'm stuck. Please help.
Later I'll flash twrp-installer-3.5.2_9-0-guacamole.zip, reboot to TWRP and flash the Magisk-v22.1.zip.
You can install your full OTA update file in TWRP. Then install TWRP.zip. Restart into TWRP, install Magisk.zip (rename Magisk 22.1.apk to Magisk 22.1.zip). Wipe dalvik cache and reboot into the system.
That should work the same way. The main thing is that your Boot.img is fine again.
Both ways of mine should lead to the same success.
I wish you success.
Yes, flashing the full OTA, twrp, reboot and Magisk gave me back my phone.
However now my SafetyNet is having problems.
Thanks for the help!

Install magisk using ONLY adb root shell

/* excuse windows person in advance for poor grammar */
TL;DR:
LG V20 H918
bootloader unlocked
bootable LOS19.1
no fastboot available
no recovery available
Goal: setup magisk using adb root shell
Is it possible?
What happend:
On stock LG V20 H918 no flashing was available in fastboot, probably done by manufacturer.
No stock recovery available as well.
I was able to unlock bootloader and install TWRP using "lafsploit".
Then I installed LOS 18.1 and Magisk with TWRP.
Everything worked perfectly.
Later I decieded to update to LOS 19.1, and probably forgot some step in the process.
LOS 19.1 boots and works OK, but without root/magisk. TWRP now stucks in splash screen.
I unable to install Magisk or restore backup without TWRP.
I unable to reflash TWRP without fastboot.
But I have acces to adb root shell!!!
So I thought it should be possible to repeat all changes Magisk does when patches boot.img, right?
I examined boot_patch.sh from magisk.akp, then compared original and patched img-s.
Waht I concluded magisk does:
1: create ".backup" folder in root
put there original "init" file
put there ".rmlist" file with what to remove on uninstall
put there ".magisk" file with checksum and other variables
2: create "overlay.d" folder in root
create "sbin" folder in "overlay.d"
put there same ".xz" files mentiond in ".rmlist"
3: perform some modifications to "init" file in root
Will it work if i repeat all this changes through shell?
Or do i need to do something else, like changing that checksum somwhere?
I have all this files from patched "boot.img", including that "init" file.
Is this a guide, or a question?
If this is a guide, you need to write it in such a way that others can easily follow it.
I don't know enough about LG devices to tell you whether you can accomplish what you're trying to do. From what I can see, rooting is extremely complicated. This is why I have a Pixel.
This is a question, I just atempted to give as much information as possible.
IMHO this sitiation should not be specific to this particular device.
In other words, is it possible to install magisk by "patching files" on booted system? (without re-flashing boot.img?)
I had to flash the lineage recovery to replace twrp when i installed the 19.1 rom. You can still install magisk using the lineage recovery.
If I recall however you can also patch the bootloader to install magisk through the installed magisk app itself aswell. As for the specifics of your question of installing it without patching of some way to the bootloader... ive no clue.
I was unable to install recovery, and there was no recovery when I got this phone with "stock ROM". thought it was done this way by oem.
Atempting to boot into recovery results in "brocken android icon" with "no command" text.
Yes, this is how I installed magisk first time: install app -> patch boot image in app -> then re-flash patched image with twrp.
My idea is to do all reqired changes manually, as we have root acces from adb shell:
As for now I mimicked difference betwen patched and original 'boot.img', which coresponds to "Ramdisk Patches" section of Magisk's "boot_patch.sh":
'.backup' and 'root/overlay.d/sbin' folders and their contents, init file and all permissions
Phone boots but no changes in magisk
Also added '99-magisk.sh' to /system/addon.d
It seem to launch, but no changes in magisk too.
Posting in case somebody will search for this.
For magisk to work some changes in kernel may be reqired. If kernel in patched boot image is different from original, then there is no solution this way.
Wiping cache and userdata can possibly fix TWRP bootloop, but If your fastboot unable to flash anything, then it probably also will be unable erase/format cache and userdata.
>>>!!! Backup first if you can, this will erase all your files and apps !!!<<<
Try to do hard factory reset this way, it helped in my case:
- Turn the phone off.
- Press and hold "Vol. down" + "Power btn"
- When LG logo appears, release "Power btn" for ~0.5sec. then push again
- Hold "Vol. down" + "Power btn" until hard reset menu appears.

Categories

Resources