Solved : Error 1 Can't mount Vendor - Xiaomi Redmi Note 4 Guides, News, & Discussion

I won't go into the mentioning the whole Technical details of the project treble here. Giving you links to the Pages and threads that have dedicated their time into explaining it in the best possible manner.
XDA thread
https://www.xda-developers.com/how-project-treble-revolutionizes-custom-roms-android-oreo/
Android Authority
https://www.androidauthority.com/project-treble-818225/
Project Treble
https://forum.xda-developers.com/project-treble
Due to the unofficial implementation of Treble ROMs, a new partition called 'Vendor' Partition is introduced. This gives the noobs like me a huge headache as most of the programs and modules including magisk give errors while trying to flash them. This has led to all the threads being flooded with the same questions again and again without much help.
I thought of compiling all the problems and providing all the solutions to the problems.
All the Treble ROMs and GApps packages can be installed by any latest recovery coz 'mido' phones have unofficial Treble builds which is done by tweaking some partitions. The recovery software or the phone firmware is not aware of it and can't distinguish between the two.
The problems arise when one tries to flash the modules or rooting softwares. The most common error is 'Error:1' 'Can't mount the vendor partition'.
Getting Started
You need to have a treble enabled Custom Recovery.
TWRP Exclusive 3.2.1-7 by @NFound
This recovery would show the 'cust' partition as 'vendor'. Thus solving all the errors regarding the Vendor partition.
Most of the oreo 8.1.0 ROMs are Treble enabled as of now. But this recovery will support non Treble ROMs as well without any problem. Below are the list of ROMs available for Mido.
Oreo ROMs
All ROMs
Root
The official Magisk thread is flooded with the same question of Error:1 can't mount vendor.
The official version(16.0) doesn't throw an error when flashed with treble enabled recovery but the phone goes into a bootloop. A customized version of magisk for Treble ROMs is required to solve this issue.
Magisk 16.4 - Treble by @Nurananto
Tip : Install Magisk Manager before flashing Magisk in recovery. Can solve 'app not installed' errors while updating Magisk Manager.
Unistalling magisk cannot be achieved by the Magisk Uninstaller. Extract the 'boot.img' from your ROMs flashable zip and flash it using TWRP recovery.
Boot into recovery -> Install -> Install Image -> boot.img -> click on boot -> Reboot.
Reflashing Magisk will return all the Modules without any problems.
Tip : This trick can be used if any module or magisk runs into error or keeps stopping. It can also be used for updating Magisk to the latest version.

Related

Android Pay Compatibility?

Hi,
Wondering if anyone has succeeded in using Android Pay on their Mi Note 2?
I have the bootloader unlocked on mine and while I've had a play with Magisk and such, unsurprisingly since the bootloader is unlocked I'm not getting anywhere.
I'm aware there are kernel hacks that can return support to unlocked devices but I'm having a hard time telling if I'd require the full kernel source in order to implement them or if there are any other ways around this or if it is simply to MIUI being an unsupported ROM. I have heard that running stock MIUI with a an originally locked bootloader still fails SafetyNet and is incompatible. With the difficulties Xiaomi place on unlocking/relocking the bootloader etc
I was hoping someone who is still running stock would be able to verify it works on a stock device
If you could also post a screenshot of the ROM you're using that would be great. With so many devices shipping with vendor ROMs rather than the official it only complicates things further.
I'm happy to keep trying and post a tutorial for others if I can get it working but frankly at this stage if the issue is MIUI itself rather than the state of the bootlock then I'd rather not waste any more hours on this.
Cheers,
StoneTrap
Can confirm Android Pay works - I am using a rom provided by Hong Kong Goldway. I haven't rooted yet but I will see if it works afterwards.
thedeejay said:
Can confirm Android Pay works - I am using MIUI Global Stable 8.0.9.0.0. I haven't rooted yet but I will see if it works afterwards.
Click to expand...
Click to collapse
That's great to know.
I'm guessing your bootloader is still locked if you're unrooted. I'm fairly sure that's the only thing left tripping safetynet. AFAIK there's no bypass until we can build our own kernel but I'd love for someone to porve me wrong.
Did you try to lock bootloader again?
I think the Magisk trick is for hiding root, not unlocked bootloader.
terstor said:
Did you try to lock bootloader again?
I think the Magisk trick is for hiding root, not unlocked bootloader.
Click to expand...
Click to collapse
Thanks for the reply.
Like I said, I realise the issue is the unlocked bootloader. I know what Magisk is for
What I was asking is if a full kernel source is needed to build a hacked kernel that supports an unlocked bootloader meeting SafetyNet or if there are is any way of patching or rebuilding a pre-existing one?
There are already compatibility issues with some MIUI versions and Android Pay even with a locked bootloader. Rather than testing every rom myself I was wondering if anyone here had any experience with it working on a certain rom.
I know that you know
I'm just curious if android pay will work again if you lock bootloader again for example using 'fastboot oem lock'.
If someone is unlocking bootloader to install custom recovery only, it would be good idea to unlock -> install recovery -> lock -> install android Pay.
But does anyone know if this will work? Is this fastboot "lock" differs from the original "lock"?
terstor said:
I know that you know
I'm just curious if android pay will work again if you lock bootloader again for example using 'fastboot oem lock'.
If someone is unlocking bootloader to install custom recovery only, it would be good idea to unlock -> install recovery -> lock -> install android Pay.
But does anyone know if this will work? Is this fastboot "lock" differs from the original "lock"?
Click to expand...
Click to collapse
Ah sorry it's hard to tell sometimes when people are making posts just to hit that first 5 posts for access. If there was a signed recovery file, Magisk would be perfect for all sorts of hi-jinx (Like for example on the ZTE Axon 7)
Unfortunately because of the way xiaomi controls unlocking the bootloader there is no way to have a custom recovery and a locked bootloader. The recovery would have to be signed by xiaomi in order to boot it.
Signing system components isn't something I know much about, all we seem to have access to is the firehose in the fastboot images but even then with the way xiaomi have locked down fastboot it seems to require some kind of authorisation first.
I was able to flash the custom recovery with a locked bootloader by modifying a fastboot image before flashing and reclocking. This just forces the phone into EDL mode when trying to boot into recovery. The system itself continues to work and will quickly overwrite the unsigned recovery with the MIUI one if an attempt to boot into recovery doesn't happen.
The locks are all the same, this can be checked with
Code:
fastboot oem device-status
on locked and unlocked phones.
Ok, so if I understood correctly, custom recovery will stop working when i will lock the bootloader.
Sorry for the little offtop, but i have another question connected with this issue. And i can't verify it by myself because i'm still waiting for unlock approval. What will happen in this scenerio:
stock rom *stable* (not dev) -> unlock bootloader -> install custom recovery -> flash eg. SuperSu.zip (to get root) via recovery -> instal magisk/xposed -> lock bootloader.
3 questions:
1. Will root 'survive' after locking or not?
2. Will xposed/magisk survive and works correctly or not?
3. OTA updates will be available or not?
I can confirm locking the boot loader and flashing original firmware global works with Android pay
Sent from my Mi Note 2 using Tapatalk
I am able to get Xiaomi Mi Note 2 and Android Pay working WITH Magisk and unlocked bootloader.
1. Install Magisk
2. Install this patch
There are some issues with files unmounting correctly. I had to manually stop and start magisk hide to get this working.
But right now, I have Android Pay confirmed working, with an unlocked phone.
thedeejay said:
I am able to get Xiaomi Mi Note 2 and Android Pay working WITH Magisk and unlocked bootloader.
1. Install Magisk
2. Install this patch
There are some issues with files unmounting correctly. I had to manually stop and start magisk hide to get this working.
But right now, I have Android Pay confirmed working, with an unlocked phone.
Click to expand...
Click to collapse
Sorry, I have one more question. Which root did you use? (SuperSU, MagiskSU, or ?)
Felixweaster said:
Sorry, I have one more question. Which root did you use? (SuperSU, MagiskSU, or ?)
Click to expand...
Click to collapse
MagiskSU
thedeejay said:
MagiskSU
Click to expand...
Click to collapse
Sorry, which ROM do you install in phone?
I installed the modified MIUI 8 China Developer ROM 7.5.6 without root in my phone.
After flash Magisk V.12 in twrp 3.0.2.0, the Magisk do nothing in my phone.
Felixweaster said:
Sorry, which ROM do you install in phone?
I installed the modified MIUI 8 China Developer ROM 7.5.6 without root in my phone.
After flash Magisk V.12 in twrp 3.0.2.0, the Magisk do nothing in my phone.
Click to expand...
Click to collapse
I am using MIUI Global Stable 8.2.5. However, with the patch (which I think you haven't installed), it shouldn't matter which ROM you are using - China or Global, Stable or Dev. What the patch does is mainly changes the build.prop to a recognised device version and a few other things on the back end to hide being unlocked.
thedeejay said:
I am using MIUI Global Stable 8.2.5. However, with the patch (which I think you haven't installed), it shouldn't matter which ROM you are using - China or Global, Stable or Dev. What the patch does is mainly changes the build.prop to a recognised device version and a few other things on the back end to hide being unlocked.
Click to expand...
Click to collapse
My problem is nothing working after flash Magisk only or with patch!! Q___Q!
I will test and discuss with other people and developer on Sunday with new ROM.
Thank you very much.
Felixweaster said:
My problem is nothing working after flash Magisk only or with patch!! Q___Q!
I will test and discuss with other people and developer on Sunday with new ROM.
Thank you very much.
Click to expand...
Click to collapse
Can you send a copy of your Magisk log? Go to Magisk -> Log and click on Magisk.
I have a feeling that the issue may be that Magisk might not be unmounting correctly. There is quite a bit of a discussion on this (as well as even MORE patches to get this to work)
(and to make sure, you also don't have xposed?)
thedeejay said:
Can you send a copy of your Magisk log? Go to Magisk -> Log and click on Magisk.
I have a feeling that the issue may be that Magisk might not be unmounting correctly. There is quite a bit of a discussion on this (as well as even MORE patches to get this to work)
(and to make sure, you also don't have xposed?)
Click to expand...
Click to collapse
You can find the log as attached.
I did NOT have xposed.
Felixweaster said:
You can find the log as attached.
I did NOT have xposed.
Click to expand...
Click to collapse
It is mounting xposed so you still have traces of it left. Go through these steps:
flash this file in TWRP: - Xposed Uninstaller
Reboot. Check if Magisk is working. If it is not, reboot back into TWRP and flash Magisk v12.0 again: Latest Magisk
Reboot. Do a few keypresses before going back into TWRP. Flash This patch here: Xiaomi safetynet fix v1.3
Reboot back into system, and check if SafetyNet is working (can be done in Magisk Manager). If it isn't, reboot into TWRP once again and flash THIS one here: Magisk v12.0 fix
(So total of 4 files that need to be flashed and cycled through).
Also make sure that you DO NOT clear cache/dalvik cache at any stage!
Give that a shot and let me know how it goes.
thedeejay said:
It is mounting xposed so you still have traces of it left. Go through these steps:
flash this file in TWRP: - Xposed Uninstaller
Reboot. Check if Magisk is working. If it is not, reboot back into TWRP and flash Magisk v12.0 again: Latest Magisk
Reboot. Do a few keypresses before going back into TWRP. Flash This patch here: Xiaomi safetynet fix v1.3
Reboot back into system, and check if SafetyNet is working (can be done in Magisk Manager). If it isn't, reboot into TWRP once again and flash THIS one here: Magisk v12.0 fix
(So total of 4 files that need to be flashed and cycled through).
Also make sure that you DO NOT clear cache/dalvik cache at any stage!
Give that a shot and let me know how it goes.
Click to expand...
Click to collapse
After flash Xposed Uninstaller & reboot => magisk nothing working
After flash Magisk v12.0 => magisk nothing working
After flash Magisk v12.0 again & Xiaomi safetynet fix v1.3 => magisk nothing working
After flash Magisk v12.0 again & Xiaomi safetynet fix v1.3 again & Magisk v12.0 fix => magisk nothing working
After flash Xiaomi official root
I get the same error log as attached.
I also attach the recovery log in attachment.
When I check the recovery log, there are something strange as below.
============
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
grep: init.rc: No such file or directory
sed: init.rc: No such file or directory
sed: init.rc: No such file or directory
Cannot open init.rc
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Cannot find the file entry [sepolicy]
MagiskBoot (by topjohnwu) - Boot Image Modification Tool
Loading cpio: [ramdisk.cpio]
Can't open 'sepolicy': No such file or directory
Could not load policy
Cannot open sepolicy
......
......
- Flashing new boot image
I:Set overlay: ''
5745+0 records in
5745+0 records out
23531520 bytes (22.4MB) copied, 0.291553 seconds, 77.0MB/s
- Unmounting partitions
losetup: /dev/block/loop0: No such device or address
umount: can't unmount /system: Device or resource busy
- Done
I:Updater process ended with RC=0
I:Legacy property environment disabled.
I:Install took 30 second(s).
I:Install zip Success,and install cofface-no-verity by cofface.
================
1. After flash the TWRP Unofficial TWRP 3.1.0-0 Mi Note 2 (scorpio)
2. Mount the /system read-write (I'm NOT sure do it cause something wrong?)
3. flash Magisk v12.0 => magisk working, saftnet false
4. Xiaomi safetynet fix v1.3 => magisk working, saftnet false
5. flash Magisk v12.0 fix => magisk working, saftnet true (before check saftnet, I found Magisk Hide in Magisk Manager and I also selected the safetynet attest app.)
Three more question
1. When you flash Magisk, is the /system read-only ?
2. Where do you have Magisk v12.0 fix ??
3. Why do you ask to flash Xiaomi safetynet fix v1.3 not Xiaomi safetynet fix v1.6 ?
thedeejay!! Thank you very much!!

Rooting OREO (41.3.A.2.24)

I was waiting for a root enabler for oreo (41.3.A.2.24), and I could find https://forum.xda-developers.com/xperia-x-performance/how-to/guide-stock-kernel-root-twrp-drm-fix-41-t3711837.
But this link is for version 41.3.A.0.401 and it does not work for everybody including me.
Since androplus still didn't bring out a new version of his kernel I tried the method from the above link.
But I'm using newer versions than in the description, I use TWRP 3.2.0, Magisk manager 5.2.2 and Magisk 15.2.
I can install the new version, twrp, the new boor image and Magisk 15.2.
I can boot and Magisk runs but the Safetynet control failes and Magisk does not enable root.
On the installation of the boot image, twrp and magisk I got some messages (marked in red)
unable to mount storage
failed to mount
Before I tried with magisk manager 5.5.1 and magisk 15.1 but then I got stuck at boot time at the sony logo.
Does anybody have a way to root Oreo (the latest version), enable DRM and enable root?
Ok I started all over again and I noticed I didn't follow the procedure first time.
So I excluded the FOTA kernel but whatever else I check no full wipe is done, I can always see the previous installed apps, it does not matter if I check Cust-reset, master-reset or reset-wipe-reason, the system is not wiped.
So that's my first problem, how to wipe the previous install.
Flashing the rom seems to be OK, same thing for flashing boot_oreo.img and twrp-3.1.1-0-dora.img.
I'm not sure about twrp 3.2.0.0 because this version is off-line now, so I tried with TWRP 3.1.1.0 and 3.2.1.0 but they all gave me the same result.
Problems start when I have to flash drmfix.zip, safety-net cleaner or magisk 15.2. The procedure tells me the flash is ok but have a look at thet attached images, I get errors while flashing. One picture for drmfix, one for safety-net-cleaner and one for magisk 15.2
After flashing all of this I can boot successfully but when I try to get root in ES File Explorer pro, it does not work. When I go into Magisk and try the afety-net check I get ctsProfile false and basicIntegrity False.
So the rom does work but I do not get root.
I tried all of this with the Italian rom 41.3.A.2.24.R1E ? I can start all over again with the UK version 41.3.A.2.24.R2E but I do not know if this makes any sense.
So can anybody tell me what to do to get it all going?
deboopi2 said:
I was waiting for a root enabler for oreo (41.3.A.2.24), and...
Click to expand...
Click to collapse
1 - Do use always Adrian DC latest fully working TWRP build for dora.
2 - You don't need a 3rd party kernel to achieve that, instead, you can easily create your own one, based always on stock kernel!
Thats the SELinux's problem.
Flash this first then flash magisk
https://forum.xda-developers.com/xp...ment/mod-sony-stock-patcher-xperia-x-t3528148

How to flash a Treble img on redmi 4 prime

I am used to normal flashing. But there is no good official rom for markw. Mokee lags and unstable,I didn't like dotOS ui, havoc was great but unstable with many problems like bettary draining, heating even in sleeping etc. I want to install RR or aosp extended treble img.
Did anyone in this forum flash treble img?? Can anyone help me?? I didn't find anyone who flashed a treble img on an unofficially treble supported device like markw.
Thanks in advance.
Use treble recovery to flash treble roms. GSI's can be flashed with it, you'll additionally need vendor to flash after flashing GSI.
Process
kibria.mgk said:
Use treble recovery to flash treble roms. GSI's can be flashed with it, you'll additionally need vendor to flash after flashing GSI.
Click to expand...
Click to collapse
Will this process work?
1) Flash a treble enabled rom(havoc).
2) Factory data reset with twrp.
3)Install treble gsi.
Thanks for reply.
Fateful n5 user said:
Will this process work?
1) Flash a treble enabled rom(havoc).
2) Factory data reset with twrp.
3)Install treble gsi.
Thanks for reply.
Click to expand...
Click to collapse
I think the following is better:
1. Flash gsi (with all fundamental wipes, ofc.)
2. Flash vendor
3. Flash post gsi's if required (ported sgsi's require this normally)
4. Flash gapps and magisk (both optional)
5. Boot system

[HELP] - Unable to use Magisk 17.1 + A2017U B35 boot unlocked

Guys,
Anyone successful so far in setting up Magisk 17.1 on stock B35 A2017U + TWRP 3.2.1.0?
I tried following ways but everytime I flash the Magisk 17.1 using TWRP, it boot loops to recovery mode. I tried clearing Dalvik + cache everytime but in vain.
1. Install Magisk 5.9.1 -> uncheck encryption, uncheck "restore dm-verify" -> Boot into TWRP and flash Magisk 17.1 -> Clear Dalvik+Cache and Restart -> Recovery Bootloop.
2. Flash Super SU, Install Magisk 5.9.1 -> uncheck encryption, uncheck "restore dm-verify" -> Boot into TWRP and flash Magisk 17.1 -> Clear Dalvik+Cache and Restart -> Recovery Bootloop
I cannot use Super SU, blanket root due to bank & workplace apps security restrictions.
Any help/guidance will be is appreciated.
Cheers
Any reason you need 17.1? If there's no pressing need go with something like 16.4. Seems to work better for some folks.
marcdw said:
Any reason you need 17.1? If there's no pressing need go with something like 16.4. Seems to work better for some folks.
Click to expand...
Click to collapse
Thanks.
Thinking of trying with v16.7 first. If that works then great.
mandrax.prime said:
Thanks.
Thinking of trying with v16.7 first. If that works then great.
Click to expand...
Click to collapse
it does. i'm staying on 16.7
It would be nice to always have a working version of Magisk as Google updates their Safety Net. We have to update as they update.
I ran into problems today with Magisk 18.1 on the latest official LineageOS 15.1, nothing I did was able to get magisk to work (no icon, no error messages).
Has anyone else tried?
Magisk should work fine on LOS, I use it (Magisk) when I have to (i.e. when there is a particular use for it, like converting a systemless mod to a system-installed mod).
On B35, no go, phone will bootloop. Magisk should work fine on stock ROMs up to B15 N, maybe also with the B25 and B32 OTAs too. I'm not a ZTE stock ROM fan, I dont spend alot of time rooting stock, but from the few tests I did,those were my results.
If you have an exFAT SD card, installing Magisk on stock ROM may make your SD falsely show up as corrupt, only solution is to use the inferior/antiquated FAT32 filesystem.
Maybe one day I'll write my own open source root solution, just to show the Android community that Magisk isnt the only game in town for rooting modern ROMs on modern devices. I dont need to hide from SafetyNet, I dont need stupid systemless mods, I just need root that work reliably. I know this will fall on deaf ears, but Magisk is more trouble than it's worth, I'd recommend staying unrooted instead of using it. @topjohnwu is a genius and means well, I'm sure, but in the real world Magisk just isnt reliable enough.
I tried Magisk 17.3, 18.0, and 18.1 on Axon 7 B19 and B35- bootloop on every try

Zip treble incompatibility error twrp

Need urgent help. I really want to try Android pie roms but twrp won't let me flash any of it. It says zip treble incompatibility error or invalid file format. Something like that. Already flashed 2 roms with the same result. What went wrog and how to fix it?
Flash latest twrp, 3.2.3 ver

Categories

Resources