Magisk on Stock Xperia Z2 D6503 SAFETY NET PASSED - Magisk

NOTE: This post was firstly added to the Xperia Z2 Forum and I decided to post it here as well thinking it might help someone else.
https://forum.xda-developers.com/xperia-z2/general/magisk-stock-xperia-z2-d6503-safety-net-t3700786
Firstly, I do not take any responsability in case anything happens to your device or your files. You decided to follow this guide at your own risk.
THIS WORKED FOR ME FOR MAGISK v14.3
ALSO WORKS ON MAGISK v14.5
I highly not recommend to use this guide for a different device other than the Xperia Z2 D6503.
All that aside, I managed to install magisk on my Stock Xperia Z2 and still keep ctsProfile and basicIntegrity: true.
HIGHLY RECOMMEND TO BACK EVERYTHING UP BEFORE PROCEEDING
You will need:
(OPTIONAL)Marshmallow FTF Firmware Here
(OPTIONAL)Flashtool Here
Magisk Manager Here
Rootkernel_v4.31_Windows_Linux.zip Here
ADB and Fastboot Here
Advanced Stock Kernel Here
TWRP Sirius Here
(OPTIONAL BUT HIGHLY RECOMMENDED) Use flashtool to flash the modified version of the stock ROM from above. It worked on this version but I can't really guarantee it will work on others. Can't really guarantee it will work on this either.(after you select the file there are 2 versions. pick the modified one).
1) Extract the Rootkernel_v4.31_Windows_Linux.zip and extract from the advanced stock kernel the boot.img (Rename it from boot.img to Old_boot.img)
2) Open cmd and use cd to reach the folder in which you extracted rootkernel.
Use the command "rootkernel Old_boot.img New_boot.img"
Say Yes to everything except installing TWRP.
3) Install Magisk Manager on your phone and copy "New_boot.img" to the phone.
4) Go to Magisk Manager settings , scroll to Update Channel and select Beta
5) Select install Magisk and select modify boot image. Select "New_boot.img" from the folder you copied it to
6) Extract adb to a folder
7) After patching the boot image at step 6, copy "patched_boot.img" from internal storage/MagiskManager to the folder in which you extracted adb
8) Copy TWRP to the adb folder and rename it to TWRP.img
9) Open cmd and use cd to navigate to the folder in which you copied adb. Type in the console "fastboot flash boot New_boot.img". Turn off your phone and then hold Volume Up whil plugging it into your pc(booting it into fastboot).
10) While still in fastboot, type "fastboot flash recovery TWRP.img"
11) Disconnect your phone from the pc. Wait a few seconds and then boot into TWRP (hold power button and Volume Down). A notification will pop up and select to "Keep System Readonly" (I think something like that). Reboot into system.
If everything worked as intended, a safetynet check will reveal everything in green, allowing you to both have root access and also run apps like Netflix and Android Pay
NOTE: Magisk Modules should be flashed via TWRP. For some reason, Magisk Manager is unable to install them.
EDIT: I tried to install xposed systemlessly but Safetynet was triggered. Don't think I can figure this out.
This worked for me but I can't guarantee it will work for you. (Photos at the end)
Did this guide help you? If you need any help, I will do my best to answer your questions.
I am not a developer and I do not really understand why or how everything works. I came across this method that worked for me and I thought I'd share it since I couldn't find a guide for my xperia phone when I needed it.
IN CASE SAFETY NET IS TRIGGERED, the only way to restore to everything in green is to reflash the stock rom (you don't have to format everything).
Did it work out for you? Just leave a reply saying that so I can figure out if everything works.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
.

hi
Does it work for Magisk18?

Related

Cannot install CM 10.2 via ADB Sideload

Hi all,
I've been combing this forum to try and find the answer to my specific question, and I can't seem to find the answer.
I'm in the process of rooting/flashing a custom ROM to my KFHD7. I've gone through all the steps up until installing a ROM via TWRP. I've been following Seokhun's guide located here.
I downloaded Hashcode's CM 10.2 ROM here.
Once I booted into TWRP, I realized that somehow I had accidentally flashed /sdcard and I had no bootable ROM. Thus, I followed Seokhun's steps to sideload a ROM file:
6. Wiped /sdcard, can't reboot from recovery: You thought you had the ROM file on the sdcard, but you didn't, and wiped everything, so without a ROM image, you can't boot into system.
Solution: Put the ROM file where your ADB binary is (usually inside platform-tools folder in Android SDK directory) and rename it rom.zip. On the device, boot into TWRP, select Advanced, then ADB Sideload. Connect device to PC. From here, run "adb" and hit Enter to check for your binary version, if it's anything lower than 1.0.3.0, you need to update the binaries by re-installing the latest Android SDK. Once the device is in sideloading mode and is connected to the PC, type "adb sideload rom.zip" and hit Enter. Now you'll find the ROM on the sdcard, flash, and you're done.
Click to expand...
Click to collapse
I checked my ADB version:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and then moved Hashcode's CM 10.2 ROM from "downloads" to the folder where my ADB exe is located and renamed it "rom.zip" as the guide instructed:
Next, I boot into TWRP -> Advanced -> ADB Sideload via my fastboot cable
On that screen i see "Wipe Dalvik Cache" and "Wipe Cache" as check boxes along with "Swipe to Start Sideload" slider.
From there, i enter the command "adb sideload rom.zip" into the CMD prompt and it returns this:
UPDATED:
After thinking about it, I went in and changed the zipped folder name to "rom" realizing that the ".zip" should be understood as the file extension and not a part of the actual file name.
So, after changing the name, I went into TWRP -> Advanced -> ADB Sideload -> Swipe to begin sideload
I enter the command "adb sideload rom.zip" and it shows that Daemon starts successfully but then returns this error message:
and my KFHD7 does not download the ZIP file successfully.
So, after all of that, any ideas from the XDA community? Sorry this was so long. I'm new to the forums and wanted to make sure I was very specific to my individual problem. Thanks for the help in advance!
UPDATED:
I was able to find a solution here
I ran "adb usb" before running "adb sideload rom.zip" and it worked like a charm.
My KFHD7 is now successfully flashed with Hashcode's CM 10.2 mod!
I decided not to delete this thread in case anyone else had this very specific issue. However, if one of the mods feel it necessary to delete, then please do so.
for anyone else that comes along to this thread seeking salvation after a moment of forgetfulness and / or misguided recklessness, you can use Restore2Stock. took me a good while to find it but eventually stumbled across is and it solved everything, an exe that can fix everything as long as you can boot to TWRP:
http://n2aos.com/forum/restore2stock-r2s/890-kindle-fire-hd-7-wiped-operating-system.html
the above link is a brief explanation of how to use it. the download link is on the main page.
happy restoring

Doogee x5pro rooting (question)

I was interested in rooting Doogee x5pro
Android version 5.1
Baseband version: Doogee-X5pro.2015/10/08
Kernel version : [email protected].2015.10.08
Build number: DOOGEE-X5pro-Android5.1-R17-2016.07.01
I don't really know what to do and I would apreaciate, I'm not sure that if there is root for newest build as I've saw for builds like R12 and R15 roots,
Maybe I'm being silly, but it would be very nice to know and thank you for help!
Regards,
Bescaredofdark
I have rooted my doogee X3 with an old root tool used for the samsung gio it should probably work also for the X5.
see x3 theme ...
http://forum.xda-developers.com/android/development/doogee-x3-mtk6580-dual-sim-android-5-1-t3446211
Hello,
I tried to root my wife's Dodgee X5 pro, but with no success. Kingoroot do not works and trying other systems I erased all the phone, just to notice the sms/mms where not backed up (done by now...) - my fault.
jdd
Been having a problem with this
I rooted my old X5 Pro when it was on Lolipop - 5.1 and now I have a new one after my old one broke its on 6.0. and now I can't find any way of rooting it, I have used SP tools etc, I have tried kingroot, kingoroot, oneclickroot, all of them and nothing works. I don't think anyone is rooting the new updated X5 PRO
I rooted my x5 max pro, a few days ago. You need twrp and a custom ROM . I used resurrection remix.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
root doogee x5 pro android 6.0
Hello good afternoon I have a doogee mobile x 5 pro android 6.0 and I can not do a root. can someone help me?
same problem here.
Tried all available one-click things, can not install twrp .
Help is appreciated. Really !
GUYS HERE IS WHAT YOU WILL DO!
1) Install adb and fastboot services on your pc, dowload supersu.zip on your phone and DOWNLOAD TWRP FOR YOUR DEVICE, PUT IT ON THE SAME FOLDER THAT ADB IS STORED AND RENAME IT TO RECOVERY.IMG!.
2)ON YOUR SMARTPHONE:Go to Developer Options menu on your smartphone and enable USB Debbuging!
3)ON YOUR PC:Open the command line on the folder where adb and fastboot are stored.
4)Connect your phone to the pc via usb and on the command line type adb devices. (A pop up will appear on your smartphone's screen, just accept.)
5)If your device is detected type adb reboot bootloader.
6)Once your device has rebooted, type fastboot getvar all. A long list will appear, find the line where it says unlocked=yes/no.
7)If you find a line that says unlocked=yes, then skip this step and proceed to the next one! If you find a line that says unlocked=NO then type fastboot oem unlock. (A pop up will appear on your phone, read the instructions!).
8)Now you have an unlocked bootloader. Type fastboot reboot or just take off your battery , insert it again and boot the phone.
9) Once the phone is booted , go again to the Developer Options menu on your smartphone and enable USB Debbuging!
10) ON YOUR PC Now type adb reboot bootloader.
11)Once your device rebooted , type fastboot flash recovery recovery.img.
12) Wait until the procces succesfully ends.
13) WARNING!:NOW TURN OFF THE DEVICE AND BOOT DIRECTLY INTO THE RECOVERY BY PUSHING THE CORRECT BUTTON COMBINATION FOR YOUR DEVICE!
14) You now have succesfully installed the twrp custom recovery and now you can flash the supersu.zip to get root access!
15)HIT "THANKS" IF I HELPED!

[ROM] [BL] [TWRP] [GUIDE] [CN] Newest Flyme 8 TWRP Installation and Root Access

Hi guys.
While I was looking for an appropriate firmware, I found a website where I could get an update for the Chinese version, which provides the newest Flyme 8 for this device.
https://www.flyme.com/firmwarelist-138.html#3
Download update.zip from here. And download TWRP from here.
I flashed this build with TWRP. To use TWRP you need to have your bootloader unlocked.
To unlock this, please, follow https://remoteunlockservice.com/payment.php (paid). Then flash TWRP, I'm attaching here, using the fastboot mode:
Code:
fastboot flash recovery /path/to/new_recovery.img
I needed to remove lines until the line containing
Code:
delete_recursive("/cache/backup");
in file update-script by the path
Code:
meta-inf/com/google/android/
inside update.zip.
Then I put the modified update.zip to /sdcard and flashed that update.zip using TWRP
Enter TWRP (power + vol+, then release power and hold vol+ up to the vibration). Connect the device with a USB-cable and transfer tool-root_unlock-Testing-Pro7.zip and update.zip to the internal memory.
Flash update.zip and immediately flash tool-root_unlock-Testing-Pro7.zip which I'm attaching here.
Log in with your Flyme account on the phone.
To get the root access please follow the instructions under the link https://mroot.flyme.cn/index.html to make an application (press 申请授权) and download the root app from https://mroot.flyme.cn/download.html.
Filling out the application, you'll encounter some Chinese characters.
Here is some translation:
Flyme 账号 — Flyme Account
Root 授权设备 — Your Device
姓名 — Your Name
手机号码 — Phone Number, use fake Chinese phone number 12345678901
PSN — get this parameter from the root app you have installed
CHIPID — the same as PSN
申请理由 — tell the reason why you need the root access. As for me, I specified, "I need to install the Russian localization for the Chinese firmware."
Wait a few days or less. The single big button in the root app will become active (its color will change from light gray to blue). Pls remember, that you must be logged in your Flyme account. Tap that button and wait until the rooting completes. In the end you'll see a picture which implies your phone has been rooted (an open padlock beside a phone) .
Grats! Now you have the newest rooted firmware.
References: https://4pda.ru/forum/index.php?showtopic=902543
Reserved
Noob question. I'm using a meizu m8 and I was wondering if this method will work on my phone. Do I just have to upgrade my firmware and follow your instruction is that correct? My current firmware is Flyme 7.1.6.0G
Sorry, but I have checked the relevant thread on 4pda, and the method there is dramatically different.
Hi, did you have an idea of why with unlocked BL, fastboot tell me "FAILED (remote: not allowed in locked state)" ?
Device is pro7 P25 64Gb version
Thx !
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
myxomop25 said:
I needed to remove lines until the line containing
Code:
delete_recursive("/cache/backup");
in file update-script by the path
Code:
meta-inf/com/google/android/
inside update.zip.
Then I put the modified update.zip to /sdcard and flashed that update.zip using TWRP
Click to expand...
Click to collapse
Should I delete up to delete_recursive("/cache/backup")
Or including this line ?
I tried both way but I always receive error 11. Also tried to copy updater-script from custom firmware
Also tried to install Meizu Pro 7 AOSP Beta V3.zip
That goes ok, no errors but phone starts only in twrp
Have no Ideea why
tintome said:
Also tried to install Meizu Pro 7 AOSP Beta V3.zip
That goes ok, no errors but phone starts only in twrp
Have no Ideea why
Click to expand...
Click to collapse
that means your phone still have orange state enable .
Try flashing magisk insatller zip v18 after flashing the Aosp rom.

[O][P]Unoficial TWRP 3.4.0 & Root

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
TWRP 3.4.0 & Root
Root and absolutely working TWRP 3.4.0 from nemo-nemo!
Oreo & Pie​
Features
In the new TWRP and Root installation method described below, there is no need to format the Data partition to remove the encryption.
Thanks to TWRP's built-in FB Encryption (File Based Encryption), the contents of the Data partition are available with encryption preserved. The folders on the external memory have the correct names and structure.
- Forced DM-Verity removal
- Forcibly removing the protection of Motorola Hab
- Now there is no need to sew additional decoders when installing TWRP and receiving Root or when installing custom firmware!
- Full access to Oem partition modification directly from the running system using Root Explorer, which previously was only possible with Root obtained through SuperSu.
Installation Instruction
1. Download archive with files for installation TWRP and Magisk Google Drive
2. Extract files:
- twrp-3.4.0-nash-nemo-nemo.img to the folder adb with drivers adb & fastboot ;
- twrp-installer-3.4.0-nash-nemo-nemo.zip, Magisk-disable-dm-verity-v20.4.zip to the SD Card..
This is a special modification of Magisk for Motorola devices. You can read about it here Link
3. Boot the phone in fastboot mode, connect it to a PC and perform the following commands:
Code:
fastboot boot C:\adb\twrp-3.4.0-nash-nemo-nemo.img
4. The phone restart in to Recovery.
5. Go to the "Install" section. Click on "Select Storage" button, select Micro SD card, OK. Install twrp-installer-3.4.0-nash-nemo-nemo.zip and Magisk-disable-dm-verity-v20.4.zip.
6. Reboot into the system.
Attention! Backup creation after TWRP and Magisk installation should be done only after full booting into the system. Otherwise restoration of the Data partition backup will be interrupted with an Error 255.
Сredits:
nemo-nemo
TeamWin-TWRP
ilia3367
Thanks a lot, everything works fine. The only issue I had was the russian language on the first boot in TWRP, but it is easy change to english.
forgottennick said:
Thanks a lot, everything works fine. The only issue I had was the russian language on the first boot in TWRP, but it is easy change to english.
Click to expand...
Click to collapse
Well, this is understandable. This TWRP was created by 4PDA developers.
do I have to flash Magisk-disable-dm-verity whenever I want to install a custom rom?
If you need a Root then of course yes.
Very good, works, thanks!
Will this method work for the Verizon version of the Z2 Force?
ilia3367 said:
If you need a Root then of course yes.
Click to expand...
Click to collapse
Willi this work on the Verizon Z2 Force?
will4958 said:
Willi this work on the Verizon Z2 Force?
Click to expand...
Click to collapse
Verizon and Root concepts are not compatible.
hey, im getting a bootloop when trying this. no idea why?

[GUIDE]Xiaomi.EU ROMs Flashing Guide All Devices [Linux-Only]

Requirements:
Your device's bootloader must be unlocked.
Prerequisites:
Ubuntu/Debian/Ubuntu-Based Distros:
Open terminal
Type sudo apt install adb
Once that is installed.
Type sudo apt install fastboot.
Done.
Fedora:
Open terminal.
Type sudo dnf install android-tools.
Let it install and done.
OpenSUSE:
Download this official package from here according to your version :
https://software.opensuse.org/download.html?project=hardware&package=android-tools
(Use either one the add repository and install manually or grab binary packages directly options.)
Click to expand...
Click to collapse
MIUI 12 (Weekly And Stable)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Go to the sourceforge link of the rom and see the date of your rom. In this case it's alioth.
See the date of your rom . Now go to xiaomiformwareupdater.com and select your device. Then click download.
New page will appear. Type fastboot in the searchbar of the page. Now see global rom the date closest to the release of the xiaomi.eu rom and download.
Unzip the rom file to the root of home directory and connect your device to fastboot mode and open a terminal in the rom folder and run the command:
./flash_all.sh
A terminal window will popup and close after 15-20 min approx when flashing is done.This will delete your data.
Let the device boot into MIUI.
Once it boots power it off . Then press the vol down + power button until fastboot in orange letters appear.
TWRP method:
Flash twrp using fastboot.
Boot into twrp.
Go to wipe and format data.
Then factory reset in wipe.
Do not wipe anything in advanced wipe !
Copy the zip file to a fat32 formatted sdcard or usb.
Connect sdcard or usb to device.
Go to install , select storage , sd/usb, select rom zip and flash.
Once flashing done , wipe dalvik.
Reboot to recovery.
Reboot to system.
Done.
Fastboot:
Unzip rom file to root of home directory.
Go into folder.
Run fastboot installation script in folder
Open terminal window in the folder
If updating from older rom.
Run command in terminal:
./linux_fastboot_update_rom.sh
Done.
If installing first time.
Run command in terminal:
./linux__first_install_with_data_format_.sh
NOTE(For Stable And Recovery ROMs):
CHECK THE XIAOMI.EU THREAD FOR KNOWING IF YOUR ROM IS FASTBOOT OR RECOVERY.
Alternatively If you want you can flash india , eea , turkey , etc variants of stock rom instead of global , then flash xiaomi.eu according to the instructions above. But keep in mind that the release date of stock rom that you are flashing should be closest to the release date of xiaomi.eu weekly rom.
Install magisk after first boot and reboot after installing magisk to get rid of system lags.

Categories

Resources