Android Pay not working? - Xiaomi Mi 5s Questions & Answers

So I'm on the M5s Plus and Android Pay doesn't work.
Does Pay work on the Mi5s?
When attempting to add a card, error says:
Android Pay can't be used
Google is unable to verify that your device or the software running on it is Android compatible
MIUI Global 8.0.1.0

Check your version again, there is no 8.0.1.0. Official release is 8.0.10.0, "global custom rom" is 8.0.10.0.0. If you have the second one, there it probably doesn't work because your bootloader is unlocked.
If you indeed have the rare original Chinese/English ROM, then go into settings -> connections -> NFC and there somewhere (I sadly don't yet have the phone) you have to switch from MI Pay to the other possible setting. Then it should work.

hey thanks for the input. Am definitely on 8.0.1.0 here.
i tried your suggestion and switched the nfc pay method but that didn't help so it must be detecting something in the rom. this is rather curious

Oohh you're a Plus user, didn't read that when I replied the first time. Yeah there the software releases are different. Your SIM card is payment enabled? I needed a new sim card when I tried this the last time here, but not with Android Pay, as we don't have that yet here.
Anyway found this: http://en.miui.com/forum.php?mod=viewthread&tid=402053&extra=&highlight=android+pay&page=2
Sounds like there is a bug in the new Global Release of MIUI official
Here the official manual on how to enable it: http://en.miui.com/thread-405166-1-1.html

I have Mi5s plus on same Global Rom. I had to lock boot loader for android pay to work.
Sent from my iPad using Tapatalk

How to relock the bootloader? I try to use "fastboot oem lock" to relock the bootloader. After reboot the phone, the bootloader is still unlock. What's wrong? I am using Xiaomi Mi 5s.

You can relock in miflash, but I don't know if that works without flashing it.
I compared the two .bat files (flash_all.bat and flash_all_lock.bat) and the difference is this:
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* erase devinfo || @ECHO "Erase devinfo error" && exit /B 1
I don't exactly know what those commands do, so I wouldn't execute them!
The .sh file has those differences:
fastboot $* erase devinfo
if [ $? -ne 0 ] ; then echo "Erase devinfo error"; exit 1; fi
So for me it looks like the erase devinfo file is the re-lock command, not sure why that should do it tough.
In MiFlash you could try this command flash_all_except_storage.bat. That would flash your phone again, but should not delete your apps and data, but I'm not entirely sure

I also tried to use flash_all_lock.bat to flash the global ROM. After flashing the ROM successfully, the unlock status shown by "fastboot oem device-info" is true also. I think the boot loader is also unlocked, and I can't pass the CTS profile test so that I can't use Android Pay.
patoberli said:
You can relock in miflash, but I don't know if that works without flashing it.
I compared the two .bat files (flash_all.bat and flash_all_lock.bat) and the difference is this:
fastboot %* flash userdata %~dp0images\userdata.img || @ECHO "Flash userdata error" && exit /B 1
fastboot %* erase devinfo || @ECHO "Erase devinfo error" && exit /B 1
I don't exactly know what those commands do, so I wouldn't execute them!
The .sh file has those differences:
fastboot $* erase devinfo
if [ $? -ne 0 ] ; then echo "Erase devinfo error"; exit 1; fi
So for me it looks like the erase devinfo file is the re-lock command, not sure why that should do it tough.
In MiFlash you could try this command flash_all_except_storage.bat. That would flash your phone again, but should not delete your apps and data, but I'm not entirely sure
Click to expand...
Click to collapse

That's weird. I unlocked my phone (to be able to flash global rom) and then flashed it with the lock option and it passes the CTS test.

Chinese stable rom(MIUI 8.0.22) not working with android pay and octopus card

Related

Looking to hire tech $upport for Moto G7 Play --> /e/ Project Conversion

Money. $$$$$$$$$$$$$$$$$$$$$$
I need HELP in de-soft-bricking my Moto Play G7 and installing the /e/ project (or perhaps other Linux-based build), and I am willing to PAY for tech support to walk me through it (ideally via Skype or Zoom platform). Here are a few more specifics:
I bought a used Moto G7 Play that was updated by a developer from Android 9 to Android 10. I followed tutorials to unlock the phone and install TWRP via ADB but ran into problems, as far as I can tell, due to the Motorola A-B slot issue (it says "No bootable A/B slot, failed to boot Linux, falling back to fastboot" when I try to reboot). I can no longer recover the phone to Android or reset it to "factory" settings via the bare-bones Android and Motorola phone menus, but I remain able to issue commands via ADB / USB and also navigate to the G7's bootloader menus by using the buttons on the side of the phone. As for my PC platforms, I am running Win 10 (with ADB) but I also have Ubuntu running (so I could format SD cards to ext4 if that would help), and I have Android studio installed (not as if I know what to do with it), if that would be of any help. As far as I can tell, ADB and the Motorola USB drivers are working fine, and I USUALLY get positive indication when I type "adb devices", and I can always get the phone to acknowledge that the USB is connected/disconnected.
I don't know if this will help, but as I try to do the ADB sideload for copy-partitions.zip, this is where things don't work, as my Moto G7 play screen says:
Finding update package…
Opening update package…
Verifying update package…
E:footer is wrong
Update package verification too 0.2 s (result 1).
E: Signature verification failed
E: error:21
Installation aborted.
From there, it seems I can't go on to flash the TWRP image. Any ideas how I can work past these problems? Let me know how I can contact you via the forum and we can work $omething out. I'm guessing that this is a fast fix for someone who knows what they are doing. I'm sick of google and don't want to accept defeat! Thanks, -Andrew
Try the motorola rescue assistant
When it not workling download for your device the firmware
Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img
I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.
maw1 said:
Try the motorola rescue assistant
When it not workling download for your device the firmware
Click to expand...
Click to collapse
I tried the Motorola Device Manager tool. Not sure if I made a good backup to begin with, and now I try to open the tool it doesn't seem to do anything.
xtermmin said:
Instead of flashing TWRP, have you tried just booting TWRP w/o flashing?
fastboot boot twrp.img
Click to expand...
Click to collapse
Tried that... It says it FAILED.
C:\adb>fastboot boot twrp.img
downloading 'boot.img'...
OKAY [ 0.427s]
booting...
FAILED (remote failure)
finished. total time: 1.054s
Exinu said:
I ran into some problems with my Moto G7 Play; I didn't softbrick it, but several things fought back, so I'll pass along what may get you back on track. First of all, I cannot use Linux to connect via fastboot, so I had to use a Mac, you can use your Windows box. Secondly, TWRP does not officially have a version for the G7 Play. I used an unofficial one from an XDA forum member HERE. It only offers a black screen unless you flash dtmo.img. I didn't want to flash dtmo.img, so I just used the black screen and used adb commands to install Lineage (and /e/) via TWRP command line.
The steps are pulled from another XDA posting showing how to use TWRP command line:
1. Connect the phone in fastboot mode to the PC, run fastboot devices to make sure it is connected.
2. Type: fastboot set_active b
Then: fastboot boot <your_recovery.img>, e.g. fastboot boot twrp.img
<phone will reboot, the screen will be black>
<wait to Windows new device sound>
3. Type: adb shell
twrp wipe cache << will not work on Moto G7 Play, but won't hurt anything.
twrp wipe dalvik
twrp wipe system
twrp wipe data <- NOW YOUR DATA WILL BE REMOVED, SO MAKE A BACKUP BEFORE!
twrp sideload
adb sideload <location_of_your_ROM.zip>, e.g. adb sideload C:\lineage-xyz.zip
IF THE TWRP commands do not work and hang saying something about "starting TWRP", I discovered by looking at the log in /tmp that /sdcard is encrypted. You will need to unencrypt /sdcard and I'm not sure how to do that without recovery; I'm sure there is way, though.
If I were you, I would see if you can flash LineageOS (or lineageOS + microG) with this method to get your phone back working, then you can move on to /e/. Note that if this works, you will have a recovery program available (the standard Lineage recovery), which has some basic tools. You CAN ONLY load Lineage-signed roms with this recovery. So if you want to switch from lineage to /e/ or to lineage+microG, you will need to use the twrp method above to switch to the other rom. Then you can use the lineage or /e/ recovery to install lineage or /e/ updates from the same publisher.
Also, if you install stock lineage, don't use a bleeding edge version. Pick one from mid-October so if you decide to switch to /e/ or Lineage+microG you will not be downgrading because they don't make nightly builds. It probably won't hurt since downgrading a week probably has few changes, but just in case.
Hope this helps.
Click to expand...
Click to collapse
Thanks for the effort, Exinu, but it seems to not fully recognize the command or is looking for another flag or operand. The "set_active b" command that you proposed just results in making a list like for a "help" or unspecified command. As you can see below, I tried other variations of the command after I tried searching out more details. I also tried "fastboot set_active=b" and it does the same thing with the listing. I'm assuming that it's not accepting this command. I did try the twrp-dirtyport image as well, but as you can see below, that created an error as well:
C:\adb>fastboot --set_active b
fastboot: unknown option -- set_active
C:\adb>fastboot --set-active=b
fastboot: unknown option -- set-active=b
C:\adb>fastboot set_active b
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing partitions
flashing unlock unlocks the device. Allows user to flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related partitions
flashing unlock_critical Enables flashing bootloader related partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
C:\adb>​
I did try the next step with the dirtyboot but that seem to have failed as well.
C:\adb>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.570s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.566s​
On my phone on the "Bootloader logs" screen, it said (before I began)
Start Up Failed:​Your device didn't stat up successfully.
Use the Software Repair Assistant on computer to repair your device.
Connect your device to your computer to get
the Software Repair Assistant.
AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​
I then typed fastboot devices from my windows C:\ADB prompt and it showed me it was connected.
After running the stuff mentioned above, it said:
cmd: download:01348000
cmd: boot
Incomplete boot image for booting.
I disconnected and reconnect the USB and then I tried the fastloading of the dirtyport image again. The screen went blank and said the same stuff again with no bootable A/B slot, which leaves me to believe this is where my problem starts.
Any other ideas?
Any ideas
I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.
Exinu said:
I think you may have several issues that need to be fixed one step at a time. First, I think you have an old fastboot if it doesn't recognize the set_active command. Go to this link: https://developer.android.com/studio/ and scroll down to the section labeled "Command Line tools only" and download the command line tools. Make sure you are in that directory in Windows so you are running the newer version and not the old version installed. If you run "fastboot --help" you should see set_active as an option.
Next, where did you get the TWRP? Go to the link I provided, which has a (black screen) TWRP that I have used and it works. Start from there and see how things proceed.
Click to expand...
Click to collapse
I got the TWRP from the link that you provided. As for running "fastboot --help", I did not see the "set_active" flag listed as an option (results pasted below). I also tried to download the command line tools as suggested, but not positive as to which directory they are to reside in, or which of the files I should launch. I unzipped the commandlinetools directory (in my adb directory) and tried running the sdkmanager.bat batch file which was nested in one of the subdirectories (it briefly opened and flashed a window but seemed to do nothing more). Not sure if this matters, but I also have android studio installed, although I am not sure how or where the "set_active" command comes from. I tried downloading windows latest PowerShell, and have also tried CMD as adminstrator. From my searching, I see people using "--set-active" with android commands as well, but I really don't know if this is a MS/DOS based command that is used for controlling drives and partitions on the Windows system, or if it's an adhock SDK - Linux add-on command of sorts. I can't seem to find much info on the command.
This is how it reads:
PS C:\adb> fastboot --help
usage: fastboot [ <option> ] <command>
commands:
update <filename> reflash device from update.zip
flashall flash boot, system, vendor and if found,
recovery
flash <partition> [ <filename> ] write a file to a flash partition
flashing lock locks the device. Prevents flashing
partitions
flashing unlock unlocks the device. Allows user to
flash any partition except the ones that are related to bootloader
flashing lock_critical Prevents flashing bootloader related
partitions
flashing unlock_critical Enables flashing bootloader related
partitions
flashing get_unlock_ability Queries bootloader to see if the device is unlocked
erase <partition> erase a flash partition
format[:[<fs type>][:[<size>]] <partition> format a flash partition.
Can override the fs type and/or
size the bootloader reports.
getvar <variable> display a bootloader variable
boot <kernel> [ <ramdisk> ] download and boot kernel
flash:raw boot <kernel> [ <ramdisk> ] create bootimage and flash it
devices list all connected devices
continue continue with autoboot
reboot [bootloader] reboot device, optionally into bootloader
reboot-bootloader reboot device into bootloader
help show this help message
options:
-w erase userdata and cache (and format
if supported by partition type)
-u do not first erase partition before
formatting
-s <specific device> specify device serial number
or path to device port
-l with "devices", lists device paths
-p <product> specify product name
-c <cmdline> override kernel commandline
-i <vendor id> specify a custom USB vendor id
-b <base_addr> specify a custom kernel base address.
default: 0x10000000
-n <page size> specify the nand page size.
default: 2048
-S <size>[K|M|G] automatically sparse files greater
than size. 0 to disable
PS C:\adb>​
PS C:\adb> set_active
set_active : The term 'set_active' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ set_active
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (set_active:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Any other ideas?
The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.
Exinu said:
The command-line tools download should not require any installation; at least, the Mac version did not. Unzip the file to your desktop. Then open a command prompt which should open in c:\Users\your_user . Enter "cd Desktop" to change to the Desktop folder, then cd <foldername> to change into the folder you unzipped the files into. Windows will sometimes unzip a folder into a second folder, so you may need to cd <foldername> once more. In any case, enter "dir" to make sure you see files like fastboot.exe, adb.exe, etc.
In Windows, when you type a command it will first look to your current directory and run the exe file that exists there, if it exists. If it does not, then it starts looking for the command in your %PATH% environment variable. That's why you need to "cd" to the tools directory: when you run "fastboot", you want it to run fastboot.exe in that directory, and not the old fastboot.exe that is installed somewhere on your system.
It sounds like you haven't worked with the command line much; I suggest you go through some tutorials on basic command line usage for both Windows and Linux; it will make tinkering with computers and phones much easier. And set_active is not a DOS/Windows command, it is parameter you are passing to fastboot.exe to tell it what action you want it to do; it just also calls these actions "commands". So when you typed c:>set_active, you told Windows to find a file called set_active.exe and run it. That file does does not exist, so it did not work.
Quick note: the Unix command line will not run a command from the current directory for multiuser security reasons; you need to specify the current directory (dot) and a slash on the command like this: ./fastboot
This will also work with DOS/Windows, but usually the backslash is used instead of the forward slash, for very old historical reasons.
Click to expand...
Click to collapse
Exinu, thanks for your continued assistance. As it turns out the fastboot/adb version I was using didn't include the "set_active" command (I don't think it was a path problem as I was always typing commands from the in directory where the ADB software was downloaded). As I had tried to follow a number of different tutorials of the course of several weeks, some for the G7 play, and perhaps some for the G7 and others generic, I think the place on the web that I went for the original ADB package (or the ADB version) was the problem. I also found another copy of ADB on my drive (downloaded weeks ago) that was titled "Minimal ADB and Fastboot", and as it turns out, that version DID support the set_active operand (from the fastboot --help command). So, I was able to return to your initial directions to set the active partion to b as initially instructed (see below, but the phone also shows that the set_active:b command seemed to process without error). However, I was not able to do the next step of flashing the TWRP. I tried the TWRP version you suggested and linked to (the dirtyport version) and then also the "channel" version, which I understand to be designed for the G7 play, unlike the "river" version. In either case (dirtyport or channel) I get a new/different "usage: unknown command" error, as seen in text pasted below:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot set_active b
Setting current slot to 'b'...
OKAY [ 0.176s]
finished. total time: 0.178s
C:\Program Files (x86)\Minimal ADB and Fastboot>dir
Volume in drive C has no label.
Volume Serial Number is EC2B-BC54
Directory of C:\Program Files (x86)\Minimal ADB and Fastboot
2020-11-27 01:42 PM <DIR> .
2020-11-27 01:42 PM <DIR> ..
2018-01-11 06:53 PM 1,784,320 adb.exe
2018-01-11 06:53 PM 97,792 AdbWinApi.dll
2018-01-11 06:53 PM 62,976 AdbWinUsbApi.dll
2015-08-09 01:50 PM 29,882 cmd-here.exe
2018-01-11 06:53 PM 853,504 fastboot.exe
2020-08-17 02:31 AM 1,456,678 logo.bin
2020-08-15 11:25 PM 27,848,704 twrp
2020-09-03 02:52 AM 27,133,952 twrp-dirtyport-g7play.img
2020-08-16 01:12 AM 17,307,289 twrp-installer-3.4.0-0-river.zip
2020-11-17 04:21 AM 23,298,048 twrp-moto-g7-play-channel-android-10.img
2020-08-15 11:25 PM 27,848,704 twrp.img
2020-11-27 01:27 PM 5,004 unins000.dat
2020-11-27 01:26 PM 717,985 unins000.exe
13 File(s) 128,444,838 bytes
2 Dir(s) 28,010,246,144 bytes free
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot twrp-dirtyport-g7play.img
fastboot: usage: unknown command twrp-dirtyport-g7play.img
Granted, I'm not a command line expert, but I have been playing with computers since the TRS-80 and the C64 and Apple IIe, and 8086 DOS stuff, and used to do QBasic programming as a kid, so in most cases, I can usually navigate myself through some hairy computer instructions to do whatever I need to do, unless the instructions themselves are hairy. I find that the Android Dev forums are predicated upon some knowledge of those platforms and are a rude awakening for those unfamiliar with the development history and architecture. Obviously, I'm going to extremes to try to de-google an Android phone (frankly I would be happier if there was more stuff on the market that already was preinstalled), as this google censorship and proposed contract tracing stuff is just getting out of hand and going too far... so this is my way of fighting back. I'd rather know nothing about ADB, but here I am.
Is there any chance you know how or why I am getting the "fastboot: usage: unknown command twrp..." error above, or how I can resolve it?
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, so that was a head-slapping "duh" moment on my end (using fastboot filename.img instead of fastboot boot filename.img). However, now that I've entered the right command I'm still having problems. As you indicate in your post above, the "fastboot boot" command did initiate the sequence, and the screen did go black, however, one of the screens that it went to only said "bad key" at the upper left hand corner.
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-dirtyport-g7play.img
downloading 'boot.img'...
OKAY [ 0.575s]
booting...
FAILED (status read failed (Too many links))
finished. total time: 1.580s​
As for my phone screen, it goes black and cycles saying "bad key" a few times, and after a few attempts it reverts to the Bootload logs screen, giving the same message it did that I started with.
Start Up Failed​
Your device didn't start up successfully.
Use the Software Repair Assistant on computer
to repair your device.
Connect you device to your computer to get
the Software Repair Assistant. ​AP Fastboot Flash Mode (Secure)
No bootable A/B slot
Failed to boot Linux, falling back to fastboot
Fastboot Reason: Fall-through from normal boot mode
USB Connected​
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
OK, I after the "dirtyport" image didn't work, I went out on a limb and tried to flash a different img file, (first doing the set_active b command), typing:
C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img
downloading 'boot.img'...
OKAY [ 0.496s]
booting...
OKAY [ 0.178s]
finished. total time: 0.679s​It briefly flashed the Moto screen and then went black. After this, with the black screen, it seemed like it was able to the "adb shell" command, although it seemed to not be able to take the TWRP commands:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
channel:/ # twrp wipe cache
Unable to find partition for path '/cache'
Done processing script file
channel:/ # twrp wipe dalvik
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp wipe system
E:Error with wipe command value: 'system'
Done processing script file
channel:/ # twrp wipe data
Failed to mount '/data' (Invalid argument)
Done processing script file
channel:/ # twrp sideload
C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip
Total xfer: 1.00x​
After this point it went back to the "bad key" and return to the Bootloger logs screen.
I'm assuming at this point if there is a failure in the TWRP command sequence (as suggested above) I shouldn't expect the latter commands to work. I also attempted to use the moto g7's built-in recovery menu that is available from pushing and holding the power and upper volume button. When I tried to "apply update from ADB" using the phone to initiate the effort, and then typed, C:\Program Files (x86)\Minimal ADB and Fastboot>adb sideload lineage-17.1-20201129-nightly-channel-signed.zip, the phone screen read as follows:
Supported APR: 3
Stopping adbd...
Now send the package you want to apply to the device with the "adb sideload ,filename"...
Finding update package...
Opening update package...
Verifying update package...
E: failed to verify whole-file signature Update package verification took 45.2 s (result 1).
E: Signature verification failed
E: error: 21
Installation aborted. ​
Exinu said:
You are getting close. Your fastboot entry is a little off. It should be >fastboot boot <filename.img>. If the twrp img file is not in the current directory, you will need to provide the full path.
Click to expand...
Click to collapse
Even though I was getting errors after the "WIPE" command, it seems like the adb shell is bringing about a linux-esque terminal of the channel image and I can see the files/directories. Using the LS command it seems that the folders you are mentioned are empty, with the exception that there is no "dalvik" directory:
C:\Program Files (x86)\Minimal ADB and Fastboot>adb shell
channel:/ # twrp
TWRP openrecoveryscript command line tool, TWRP version 3.3.1-0
Allows command line usage of TWRP via openrecoveryscript commands.
Some common commands include:
install /path/to/update.zip
backup <SDCRBAEM> [backupname]
restore <SDCRBAEM> [backupname]
wipe <partition name>
sideload
set <variable> [value]
decrypt <password>
remountrw
fixperms
mount <path>
unmount <path>
print <value>
mkdir <directory>
reboot [recovery|poweroff|bootloader|download|edl]
See more documentation at https://twrp.me/faq/openrecoveryscript.html
channel:/ # ls
acct config etc init.rc init.recovery.usb.rc persist plat_service_contexts res sideload tmp vendor_file_contexts vndservice_contexts
bin d external_sd init.recovery.hlthchrg.rc license plat_file_contexts postinstall root storage twres vendor_hwservice_contexts
bugreports data file_contexts.bin init.recovery.mksh.rc mnt plat_hwservice_contexts proc sbin sys ueventd.rc vendor_property_contexts
cache default.prop firmware init.recovery.qcom.rc odm plat_property_contexts product sdcard system usb_otg vendor_seapp_contexts
charger dev init init.recovery.service.rc oem plat_seapp_contexts prop.default sepolicy system_root vendor vendor_service_contexts​
Here are the directory contents:
channel:/ # cd data
channel:/data # ls
channel:/data # cd /
channel:/ # cd cache
channel:/cache # ls
channel:/cache # cd /
channel:/ # cd system
channel:/system # ls
channel:/system # cd /
channel:/ # cd dalvik
/sbin/sh: cd: /dalvik: No such file or directory​
When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.
Exinu said:
When you went into recovery mode, was it Motorola's stock recovery or LineageOS's recovery (with the Lineage logo (the three circles))?
In any case, at least you have a working recovery. Error 21 simply means that the signature is on the firmware file is not what it was expecting. If you have a Motorola recovery, then it expects a Motorola-signed firmware. If it is the Lineage recovery, then it will only flash Lineage-signed firmware.
Your TWRP sideload command sure looks like it worked when it loaded the firmware, but if it had worked, you would have LineageOS recovery and it would say current slot: a. I don't remember if the stock Motorola recovery displays the current slot. When you tell fastboot to set_active b, it sets the current slot to b and then when you install the firmware it installs the firmware to slot a.
Click to expand...
Click to collapse
Exinu,
It looks like the fastboot set_active b command worked, in that my phone acknowledged it did, and the command prompt seemed to indicate the same. As for the phone screen, the Moto splash screen that flashed quickly (probably less than 1 second) did not have any hint of Lineage logo. I tried repeating the process and saw the logo a total of 3x. It was the C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot boot twrp-moto-g7-play-channel-android-10.img command that got me there (the "dirtyport" image you suggested didn't work) and it was before the attempt to flash the lineage image.
However, as for the ADB SHELL commands that you recommended, it didn't seem like they were doing what one might expect. Subsequent to the attempted TWRP commands in the shell, I tried to sideload the lineage system but it would not take, saying "bad key" on the upper LH side of the screen.
Is it possible that prior image flashing attempts have left some incompatible clutter on my phone (perhaps visible by means of exploring other folders or folder names via the ADB SHELL)? I've been working with Raspberry PI's and PC based OMV / Nextcloud servers in recent months and perceive that new installs seem inclined to revert to old files on occasion if not thoroughly formatted.
One thing I forgot to mention: since you are installing Lineage, you can use the Lineage recovery to install it. TWRP is only necessary for /e/ or other roms that do not have their own recovery. Try "fastboot boot" but specify the lineage recovery file.
Also, now that I review things again, I may have used this TWRP instead of the "dirty port" version. I don't know if it will make a difference, but it might be worth a try. Sorry, I guess I have too many irons in the fire right now and got it mixed up. Scroll down to abou t the third or forth comment and there is a google drive link. You just need the recovery.img. Do not flash the dtmo.img, just fastboot/boot the recovery image: https://forum.xda-developers.com/t/...y-custom-recovery-kernel-source-code.3933680/

DM Verity and Force Encryption disabling on Nexus 5X for Kali Nethunter installation

Hi,
GOAL: I'm trying to flash Kali Nethunter on my Nexus 5X (bullhead)
MIDD: This boils down to try to disable dm-verity and force-encryption from my Nexus 5X (bullhead).
STEP: I have a rooted, TWRP'ed phone on (alledgedly) stock ROM, disabling both FAILs
Let's 1st state my safety nets
1. I went the safe route : Fastboot > Temporary TWRP through fastboot > Full backup
2. So I have carefully backed up every partition, literally boot.emmc.win, data.ext4.win, efs1.emmc.win, efs2.emmc.win, recovery.emmc.win, system.ext4.win000, system.ext4.win001, system_image.emmc.win, vendor.ext4.win, vendor_image.emmc.win
3. I can at any time restore my phone - it was a huge step, using fastboot + twrp + the backup above
4. Then I installed magisk, produced a dm-verity-enabled and encryption-enabled boot partition copy
5. Then flashed this boot, then had root, then added twrp app, and gained permanent TWRP
6. Now I'm fine with a safe backup at that point
That said (100% clear : I can try anything out of deleting fastboot - if that's even a thing )
Guys .. I have a real corner case :
1. I want to flash NetHunter .. brings error "Can't write to /system"
2. OK I (think I) know that one : mount -o remount,rw /system && touch /system/test # .. oh crap
3. It looks like dm-verity-plus-encrypt switches prevent me from tinkering with /system
And that's where it becomes furry
4. I adb push my boot.emmc.win as /sdcard/boot.emmc.win.img
5. I use magisk to "disable dm-verity" and "disable force-encrypt" [screenshot Screenshot_20210416-131341.png] .. and patch that boot image. The result is some magisk_patched_kSiHo.img [screenshot Screenshot_20210416-131422.png]
6. I rename this to /sdcard/TWRP/boot.emmc.NOVERITY.NOENCRYPTION.img and go to TWRP
7. In TWRP I use *this* image to flash boot, and *format* (not wipe) data and *format* cache
8. Cross fingers, pray, reboot .. FAIL : Google white logo doesn't move - no fancy colorful anim
9. I flash back my stuf, go to step 4 state again, and decide I may have made a typo
10. I triple check the original boot.emmc.win.img, put it again on sdcard, go through magisk again with the same options
11. I get a alledgedly bullet-proof BOOT image again [screenshot Screenshot_20210416-131841.png], copy it to /sdcard
12. I decide to do it hardcore-style [screenshot EXTRACT 2021-04-16 à 13.22.21.png] and issue a fastboot flash boot boot.emmc_nodmverity_noencryption.win && fastboot format userdata && fastboot format cache
Now I can't possibly have typed things wrong and I'm hoping to
* Have wiped all my data (format userdata)
* Have gotten RID OF dm-verity and encryption
* Be able to boot the partition without android needing to decrypt it
And the result is ... tadaa .. FAIL
RESULT: A white "Google" logo forever (1 night so > 6h) without Android booting. Time to restore.
So .. I don't have dm-verity and force-encryption disabled. The boot partition is (still, to date) dm-veritied and data encrypted and .. the Kali Nethunter zip fails to Install using TWRP because it fails to mountpoint /system || mount -o remount,rw,seclabel /system .. and in fact it mounts but then fails to write to any /system/some_file (and TWRP terminal show the impossibility to even touch /system/hello_world # readonly filesystem)
Any checklist/hint/manual/request_for_getprop_or_info is welcome !
For some reason /system had become non-writable and non-mountable (rw).
I don't have any data on the phone so I went down the strong route :
* Using https://dl.google.com/dl/android/aosp/bullhead-n4f26u-factory-e6420fc1.zip to extract the cache.img
* Using https://dl.google.com/dl/android/aosp/bullhead-opm7.181205.001-factory-5f189d84.zip for every other partition
I did the following, which works :
Code:
fastboot format userdata \
&& fastboot format cache \
&& fastboot flash bootloader bootloader-bullhead-bhz32c.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot flash radio radio-bullhead-m8994f-2.6.42.5.03.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot erase cache \
&& fastboot flash cache cache.img \
&& fastboot flash boot boot.img \
&& fastboot flash recovery recovery.img \
&& fastboot flash vendor vendor.img \
&& fastboot flash system system.img \
&& fastboot boot ~/Downloads/twrp-3.5.2_9-0-bullhead.img \
&& sleep 30 \
&& adb push ~/Downloads/Magisk-v22-0.zip /sdcard/Magisk-v22-0.zip
At that point I had a *stock* ROM with TWRP booted temporarily, Magisk on the sdcard and no encrypted data partition.
I flashed Magisk and rebooted the phone.
After configuring Android (first boot overwhelmingly long wizard) I found out I had root and a writable /system . I don't know why it had become read-only. Something between dm-verity, encryption, using the TWRP app instead of the img and (probably) a shadow /system that gets re-signed and archived in /data with verity_keys each time.
Problem #1 solved. Onto the next - Kali NetHunter now installs in TWRP .. but does not boot.
I found a reproducible way to install Kali NetHunter on a Nexus 5X (in March 2021, in case you bump on this thread in the 'future')
Do this at your own risk. While it works, it erases everything on your phone. Please learn how to backup and use fastboot and TWRP first
Scope :
Model Nexus 5X, codename bullhead
A spare phone, you will erase everything on it by following the instructions
Installation of Android 8.1.0 OREO, namely https://dl.google.com/dl/android/aosp/bullhead-opm7.181205.001-factory-5f189d84.zip
With the addition of cache.img from a 7.1 archive, namely https://dl.google.com/dl/android/aosp/bullhead-n4f26u-factory-e6420fc1.zip
Installation of SuperSU 2.82, namely SR5-SuperSU-v2.82-SR5-20171001224502.zip from https://download.chainfire.eu/1220/SuperSU/SR5-SuperSU-v2.82-SR5-20171001224502.zip/
Installation of Kali NetHunter 2021.1, namely https://images.kali.org/nethunter/nethunter-2021.1-bullhead-oreo-kalifs-full.zip
All this using fastboot and TWRP 3.5.2, namely https://dl.twrp.me/bullhead/twrp-3.5.2_9-0-bullhead.img.html
You, a fluent Linux (preferably) user with some knowledge of fastboot and adb - including the proper google USD drivers installed if on windows. You've been warned
Enough warnings. After long and painful weeks of tests I finally succeeded in installing NetHunter on Nexus 5X, the crucial point being SuperSU works whereas M.a.g.i.s.k does not (redacted to prevent search to get here)
Step 1​Download the prerequisites, create an install directory on your pc
Unzip there bullhead-n4f26u-factory-e6420fc1.zip/cache.img
Unzip there bullhead-opm7.181205.001/image-bullhead-opm7.181205.001.zip/*.img
Using the key combo POWER + Volume Down, boot in fastboot mode.
Connect your phone to the PC/Mac/Linux
Step 2​Here goes the (non-bricking but) destroying commands
Code:
D=YOUR_INSTALL_DIR
cd $D
fastboot format userdata \
&& fastboot format cache \
&& fastboot flash bootloader $D/bootloader-bullhead-bhz32c.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot flash radio $D/radio-bullhead-m8994f-2.6.42.5.03.img \
&& fastboot reboot-bootloader \
&& sleep 6 \
&& fastboot erase cache \
&& fastboot flash cache $D/cache-bullhead-n4f26u.img \
&& fastboot flash boot $D/boot.img \
&& fastboot flash recovery $D/recovery.img \
&& fastboot flash vendor $D/vendor.img \
&& fastboot flash system $D/system.img \
&& fastboot boot $D/twrp-3.5.2_9-0-bullhead.img \
&& sleep 30 \
&& adb push $D/SR5-SuperSU-v2.82-SR5-20171001224502.zip /sdcard/SR5-SuperSU-v2.82-SR5-20171001224502.zip
Your phone should now be inside the TWRP gui (if necessary slide to answer "yes I want to modify the system partition")
Step 3​
From within TWRP, choose "Install"
Select SR5-SuperSU-v2.82-SR5-20171001224502.zip
Wait for the end of the install
Also run Wipe Davik/Cache
Select reboot > system
Your phone should boot within less than 2 mins in normal Stock Android 8.1.0. Configure it slightly (especially the wifi) and on to the next step
Step 4​
Boot again in TWRP mode
Code:
fastboot boot $D/twrp-3.5.2_9-0-bullhead.img
Now transfer the Kali NetHunter image from the PC
Code:
adb push nethunter-2021.1-bullhead-oreo-kalifs-full.zip /sdcard/nethunter-2021.1-bullhead-oreo-kalifs-full.zip
At the end (~20mins) run Wipe Davik/Cache
Select and run reboot > system
Wait for the ~1min for 1st boot
Enjoy !

Question Fastboot and windows.bat does not work

hi,I am currently trying to install MIUI 12.6 -21.10.27 on my PocoF3.Fasboot ROM with a Windows batch file.
My steps:
1 Unzip the file
2 Start the device in Fastboot and connect to the PC
3 Start the Windows batch file
But nothing is happening. In the file folder are the platform tools for Windows, images and windows fastboot .bat. when I do a fastboot device with cmd, I can see my device.
Is it possibly the cable or missing Windows drivers?
Tried using the MiFlash tool?
Also check similar posts, fe https://forum.xda-developers.com/t/fastboot-rom-tgz-file-into-adb-sideload.4352239/
dirtytwo said:
hi,I am currently trying to install MIUI 12.6 -21.10.27 on my PocoF3.Fasboot ROM with a Windows batch file.
My steps:
1 Unzip the file
2 Start the device in Fastboot and connect to the PC
3 Start the Windows batch file
But nothing is happening. In the file folder are the platform tools for Windows, images and windows fastboot .bat. when I do a fastboot device with cmd, I can see my device.
Is it possibly the cable or missing Windows drivers?
Click to expand...
Click to collapse
try to install device drivers especially fastboot and Qualcomm usb driver
dirtytwo said:
hi,I am currently trying to install MIUI 12.6 -21.10.27 on my PocoF3.Fasboot ROM with a Windows batch file.
My steps:
1 Unzip the file
2 Start the device in Fastboot and connect to the PC
3 Start the Windows batch file
But nothing is happening. In the file folder are the platform tools for Windows, images and windows fastboot .bat. when I do a fastboot device with cmd, I can see my device.
Is it possibly the cable or missing Windows drivers?
Click to expand...
Click to collapse
you could also try:
- disable Windows driver signature check;
How to Enable or Disable Driver Signature Enforcement in Windows 10
How to Enable or Disable Driver Signature Enforcement and Test Mode in Windows 10
www.tenforums.com
- reinstall the drivers; (find the ones that work on the mi flash program);
- move the rom folder to c: \;
- try another usb port, the rear or the 2.0 are better;
- make sure you have enabled usb debug in developer settings and have authorized the pc;
- start the .bat file as administrator;
what I've found so far:
first .bat is from 22.4.21 rom wich works
@Echo off
cd %~dp0
set /p CHOICE=You are going to wipe your data and internal storage. It will delete all your files and photos stored on internal storage. Do you agree? (Y/N)
if /i "%CHOICE%" neq "y" exit /B
platform-tools-windows\fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth"
if %ERRORLEVEL% neq 0 echo Missmatching image and device & exit /B 1
second .bat is from 27.10.21 which doesn't work
@Echo off
cd %~dp0
set DEVICE=unknown
for /f "tokens=2" %%D in ('platform-tools-windows\fastboot %* getvar product 2^>^&1 ^| findstr /l /b /c:"product:"') do set DEVICE=%%D
if "%DEVICE%" neq "alioth" echo This package is for "alioth" devices; this is a "%DEVICE%". & exit /B 1
set /p CHOICE=You are going to wipe your data and internal storage. It will delete all your files and photos stored on internal storage. Do you agree? (Y/N)
if /i "%CHOICE%" neq "y" exit /B 0
so what can i do.
dirtytwo said:
what I've found so far:
first .bat is from 22.4.21 rom wich works
@Echo off
cd %~dp0
set /p CHOICE=You are going to wipe your data and internal storage. It will delete all your files and photos stored on internal storage. Do you agree? (Y/N)
if /i "%CHOICE%" neq "y" exit /B
platform-tools-windows\fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth"
if %ERRORLEVEL% neq 0 echo Missmatching image and device & exit /B 1
second .bat is from 27.10.21 which doesn't work
@Echo off
cd %~dp0
set DEVICE=unknown
for /f "tokens=2" %%D in ('platform-tools-windows\fastboot %* getvar product 2^>^&1 ^| findstr /l /b /c:"product:"') do set DEVICE=%%D
if "%DEVICE%" neq "alioth" echo This package is for "alioth" devices; this is a "%DEVICE%". & exit /B 1
set /p CHOICE=You are going to wipe your data and internal storage. It will delete all your files and photos stored on internal storage. Do you agree? (Y/N)
if /i "%CHOICE%" neq "y" exit /B 0
so what can i do.
Click to expand...
Click to collapse
I see that they have changed the encoding of the installation script, but honestly I don't know why it doesn't work for you, it's weird!
Did you do all the moves I handed you?
Can you try to install it from another pc? (So let's see if the problem is the pc or the rom)
You can also try to re-download it because maybe the package got corrupted.
Also you can try asking for information here:
MIUI 13 Stable Xiaomi.EU [Poco F3, Mi 11x, Redmi K40]
This thread is for discussion about xiaomi.eu stable releases. Weekly releases won't be shared here. MIUI 13 :- Xiaomi.EU 13.0.2.0 (Fastboot ROM) Xiaomi.EU 13.0.3.0 (Fastboot ROM) Xiaomi.EU 13.0.5.0 (Fastboot ROM) Xiaomi.EU 13.0.6.0 (Fastboot...
forum.xda-developers.com
(this is the discussion dedicated to the rom xiaomi.eu)
Or directly to the xiaomi.eu community on the official website, here:
MIUI 12.6 - 21.10.27/28
Status: RELEASED RULES WHEN POSTING 1. If a ROM is not published DONT ASK ABOUT ITS ETA 2. If a ROM is not published DONT ASK why! 3. If a ROM is available, download it and use it 4. If a ROM has bugs, post the bug to the bug section if the BUG is not already listed 5. If you use any form of...
xiaomi.eu
(you must register in order to post).

Question Is there any salvation from this?

Hello guys, I created this account because I think I have bricked my Poco F3 badly, but you guys may know how to recover from this:
{
"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"
}
How did I get here:
This is the first time I try to install a custom rom on any Android phone, nevertheless I followed tutorials step by step on how to unlock the device (I waited 136 hours as instructed) and then I was able to install TWRP first to RAM, and then as a recovery tool as stated in the tutorial I followed. I tried installing LineageOS following this tutorial (in Spanish) but it got seemingly stuck at "step 2/2" stating: "to flash additional zips please reboot recovery", so then I rebooted but this is where things spiraled out of control... After rebooting I was greeted by LineageOS boot logo animation, but it didn't do boot even after 10 minutes, so then I attempted to reboot in recovery by pressing Vol Up+Power, but was greeted by a Recovery tool by LineageOS instead of TWRP, which didn't let me do anything, so then I though "maybe I should do a factory reset and start all over", after which the whole thing wiped.
Now when rebooting it always takes me to LineageOS recovery tool, but now my PC won't recognize the device as storage, it just recognizes it as "Android Bootloader Interface", but CMD doesn't recognize it anymore...
Any idea how to fix this mess? I'm kinda desperate at this point
donwload sdk platform tools
extract it
in file explorer url type cmd it will show cmd
hold power and volume down to your phone to boot it into fastboot
connect phone to pc
type in the opened cmd, fastboot devices
if your devices showed in cmd we can repair it back
try also downloading xiaomi flash tool latest and open the software click drivers on the upper right corner install all 5 drivers and try connecting your phone see if its detected on your device manager
Thank you for your quick response, cmd finally detected my phone, I got Mi Flash Tool but it got me a weird message in after installing drivers:
(hopefully it means it was successful) and it detects it as well!
Edit: Not sure what to do next, monkey brain tells me I should probably try installing TWRP again and see if it detects it as storage to try again and install LineageOS? Unless I can do that with Mi Flash Tool instead
HBMHD said:
Thank you for your quick response, cmd finally detected my phone, I got Mi Flash Tool but it got me a weird message in after installing drivers:
View attachment 5470215
(hopefully it means it was successful) and it detects it as well!
Click to expand...
Click to collapse
its in chinese character dont worry it is successful hahaha
go flash your stock rom before installing and perfecting your custom recovery and roms take note: before flashing stock rom tick clean flash dont flash it if its clean flash and relock bootloader
disregard my stock rom my phone is global variant choose your designated variant to flash
khazzey said:
disregard my stock rom my phone is global variant choose your designated variant to flash
Click to expand...
Click to collapse
Mine is too, I'm downloading it right now, will take a while.
This may be a silly question and idk if you know the answer of, but will my phone keep charging even if it's in Fastboot mode? It has been on for a few hours since attempting to fix and I don't want it to die in the middle of installing the stock rom, the damn thing won't turn off, every time I hold the power button it just turns on again into that LineageOS recovery tool
HBMHD said:
Mine is too, I'm downloading it right now, will take a while.
This may be a silly question and idk if you know the answer of, but will my phone keep charging even if it's in Fastboot mode? It has been on for a few hours since attempting to fix and I don't want it to die in the middle of installing the stock rom, the damn thing won't turn off, every time I hold the power button it just turns on again into that LineageOS recovery tool
Click to expand...
Click to collapse
it will definitely charge like the speed of micro usb like 2.0 amperes in fastboot only it charges too slow but it will keep your phone still alive dont worry after you flashed stock rom it will go back normal 33W
before i forgot you cant flash your stock rom, you need to install notepad ++ edit the extracted rom batch file clean flash all bat remove the first script, stop the editing for the first fastboot word you read to avoid anti rollback protection of xiaomi
khazzey said:
before i forgot you cant flash your stock rom, you need to install notepad ++ edit the extracted rom batch file clean flash all bat remove the first script, stop the editing for the first fastboot word you read to avoid anti rollback protection of xiaomi
Click to expand...
Click to collapse
I'm waiting for my file to download again to check that batch file... What I downloaded was "miui_ALIOTHGlobal_V12.5.4.0.RKHMIXM_76076865ce_11.0.zip" which I think it's a file meant for TWRP as it says "Recovery" and not Fastboot (which I didn't know was strictly different), I'm downloading the Fastboot version from here that has the same name as yours now, and then I'll see if I can figure out how to remove a script from a batch file; I was so not prepared for this, but I'm learning slowly lol.
Thank you for the explanations and warnings, I'll keep you and possible readers posted.
HBMHD said:
I'm waiting for my file to download again to check that batch file... What I downloaded was "miui_ALIOTHGlobal_V12.5.4.0.RKHMIXM_76076865ce_11.0.zip" which I think it's a file meant for TWRP as it says "Recovery" and not Fastboot (which I didn't know was strictly different), I'm downloading the Fastboot version from here that has the same name as yours now, and then I'll see if I can figure out how to remove a script from a batch file; I was so not prepared for this, but I'm learning slowly lol.
Thank you for the explanations and warnings, I'll keep you and possible readers posted.
Click to expand...
Click to collapse
thats the right rom you are downloading now the fastboot one after that extract it to drive C: of your pc in able to detect it from xiaomi flash after you downloaded and extracted it go back here i am going to teach you how to edit fastboot command line to avoid anti rollback
khazzey said:
thats the right rom you are downloading now the fastboot one after that extract it to drive C: of your pc in able to detect it from xiaomi flash after you downloaded and extracted it go back here i am going to teach you how to edit fastboot command line to avoid anti rollback
Click to expand...
Click to collapse
Finally, that took a while; I see the "flash_all.bat" file after extracting.
HBMHD said:
Finally, that took a while; I see the "flash_all.bat" file after extracting
Click to expand...
Click to collapse
edit it with notepad ++ save the first fastboot comand line upto last. then flash it ticking clean flash youre good to go
khazzey said:
edit it with notepad ++ save the first fastboot comand line upto last. then flash it ticking clean flash youre good to go
Click to expand...
Click to collapse
Sorry I got a bit lost there, what do I edit in Notepad++? Do I remove something or do I copy the first line and move it?
This is what's inside the batch file:
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *alioth" || exit /B 1
::check anti_version
if exist %~dp0images\anti_version.txt (for /f "delims==" %%a in (%~dp0images\anti_version.txt) do (set CURRENT_ANTI_VER=%%a))
if [%CURRENT_ANTI_VER%] EQU [] set CURRENT_ANTI_VER=0
for /f "tokens=2 delims=: " %%i in ('fastboot %* getvar anti 2^>^&1 ^| findstr /r /c:"anti:"') do (set version=%%i)
if [%version%] EQU [] set version=0
set anticheck="antirollback check pass"
if %version% GTR %CURRENT_ANTI_VER% set anticheck="Current device antirollback version is greater than this pakcage"
echo %anticheck% | findstr /r /c:"pass" || @echo "Antirollback check error" && exit /B 1
fastboot %* erase boot_ab || @echo "Erase boot_ab error" && exit /B 1
fastboot %* flash crclist %~dp0images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
fastboot %* flash xbl_ab %~dp0images\xbl.elf || @echo "Flash xbl_ab error" && exit /B 1
fastboot %* flash xbl_config_ab %~dp0images\xbl_config.elf || @echo "Flash xbl_config_ab error" && exit /B 1
fastboot %* flash abl_ab %~dp0images\abl.elf || @echo "Flash abl_ab error" && exit /B 1
fastboot %* flash tz_ab %~dp0images\tz.mbn || @echo "Flash tz_ab error" && exit /B 1
fastboot %* flash hyp_ab %~dp0images\hyp.mbn || @echo "Flash hyp_ab error" && exit /B 1
fastboot %* flash devcfg_ab %~dp0images\devcfg.mbn || @echo "Flash devcfg_ab error" && exit /B 1
fastboot %* flash storsec %~dp0images\storsec.mbn || @echo "Flash storsec error" && exit /B 1
fastboot %* flash bluetooth_ab %~dp0images\BTFM.bin || @echo "Flash bluetooth_ab error" && exit /B 1
fastboot %* flash cmnlib_ab %~dp0images\cmnlib.mbn || @echo "Flash cmnlib_ab error" && exit /B 1
fastboot %* flash cmnlib64_ab %~dp0images\cmnlib64.mbn || @echo "Flash cmnlib64_ab error" && exit /B 1
fastboot %* flash modem_ab %~dp0images\NON-HLOS.bin || @echo "Flash modem_ab error" && exit /B 1
fastboot %* flash dsp_ab %~dp0images\dspso.bin || @echo "Flash dsp_ab error" && exit /B 1
fastboot %* flash keymaster_ab %~dp0images\km41.mbn || @echo "Flash keymaster_ab error" && exit /B 1
fastboot %* flash logo %~dp0images\logo.img || @echo "Flash logo error" && exit /B 1
fastboot %* flash featenabler_ab %~dp0images\featenabler.mbn || @echo "Flash featenabler_ab error" && exit /B 1
fastboot %* flash aop_ab %~dp0images\aop.mbn || @echo "Flash aop_ab error" && exit /B 1
fastboot %* flash qupfw_ab %~dp0images\qupv3fw.elf || @echo "Flash qupfw_ab error" && exit /B 1
fastboot %* flash uefisecapp_ab %~dp0images\uefi_sec.mbn || @echo "Flash uefisecapp_ab error" && exit /B 1
fastboot %* flash multiimgoem_ab %~dp0images\multi_image.mbn || @echo "Flash multiimgoem_ab error" && exit /B 1
fastboot %* flash super %~dp0images\super.img || @echo "Flash super error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @echo "Flash misc error" && exit /B 1
fastboot %* flash vbmeta_ab %~dp0images\vbmeta.img || @echo "Flash vbmeta_ab error" && exit /B 1
fastboot %* flash dtbo_ab %~dp0images\dtbo.img || @echo "Flash dtbo_ab error" && exit /B 1
fastboot %* flash vbmeta_system_ab %~dp0images\vbmeta_system.img || @echo "Flash vbmeta_system_ab error" && exit /B 1
fastboot %* erase metadata || @echo "Erase metadata error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @echo "Flash userdata error" && exit /B 1
fastboot %* flash cust %~dp0images\cust.img || @echo "Flash cust error" && exit /B 1
fastboot %* erase imagefv_ab || @echo "Erase imagefv_ab error" && exit /B 1
fastboot %* flash imagefv_ab %~dp0images\imagefv.elf || @echo "Flash imagefv_ab error" && exit /B 1
fastboot %* flash rescue %~dp0images\rescue.img || @echo "Flash rescue error" && exit 1
fastboot %* flash spunvm %~dp0images\spunvm.bin || @echo "Flash spunvm error" && exit /B 1
fastboot %* flash vendor_boot_ab %~dp0images\vendor_boot.img || @echo "Flash vendor_boot_ab error" && exit /B 1
fastboot %* flash logfs %~dp0images\logfs_ufs_8mb.bin || @echo "Flash logfs error" && exit /B 1
fastboot %* flash boot_ab %~dp0images\boot.img || @echo "Flash boot_ab error" && exit /B 1
fastboot %* set_active a || @echo "Set active error" && exit /B 1
fastboot %* reboot || @echo "Reboot error" && exit /B 1
remove the first 10 lines
you shold save the fastboot erase boot_ab upto fastboot reboot
just save this only
dont forget to tick clean flash only dont lock your bootloader
update me if flashing is done

Trying to install NetHunter on Nexus 5X that has Lineage-15.1 on?

I have looked and looked and still can't find any help so I thought I'd ask! I've been using Kali for the best part of 2 years and decided to give Nethunter a go.
Got myself a Nexus 5X, installed
twrp-3.6.2_9-0-bullhead.img
lineage-15.1-20220321-UNOFFICIAL-bullhead (rebooted after install)
Magisk-v25.2 (rebooted and verify app)
Got it rooted OK with Magisk, checked with Root Checker Basic.
So far so good.
Now I boot back into TWRP and try flashing:
nethunter-2022.2b-bullhead-oreo-kalifs-full
Which gets me to boot and the flaming Kali logo, then after 30 mins I'm still looking at it!
I also tried wiping it all and flashing the first three again then tried a different flavor of Nethunter and tried to flash:
nethunter-generic-armhf-kalifs-full-rolling-2019.03-13-0514
kernel-nethunter-bullhead-nougat-2019.03-13-0514 (I realise this is nougat and lineage 15.1 is Android 8.1 Oreo but thought it was worth a shot)
For a 3rd attempt I wiped and installed factory official 8.1 Oreo, then TWRP, then Magisk (same version as above), then the Nethunter directly from Nethunter.
AND as a last ditch attempt I wiped and installed factory official 8.1 Oreo, then TWRP, then Magisk.... THEN I transferred to internal storage:
KaliNethunter-v8.2(22).zip
kalifs-full.tar.xz
Then with Magisk I installed KaliNethunter-v8.2(22).zip, rebooted and opened the Nethunter app and used Kali Chroot Manager, however 'apt-get updates', 'apt-get install firmware-atheros' and 'ifconfig wlan1' doesn't work and it's just keeps giving me the error it's outdated plus it doesn't feel as baked in as if I was flashing it via TWRP!?
Soooooooo can anyone point me in the right direction of how to get this done please?
A lot of XDA posts are outdated or contain broken links.
I will caveat and say that this is not my everyday phone and understand the roms are not patched to the latest security and that's OK for what I need it for.
Thank you, thank you, and thank you for anyone that can help get this working.
Maybe it's a little bit late for this but the instructions stated here work:
DM Verity and Force Encryption disabling on Nexus 5X for Kali Nethunter installation
Hi, GOAL: I'm trying to flash Kali Nethunter on my Nexus 5X (bullhead) MIDD: This boils down to try to disable dm-verity and force-encryption from my Nexus 5X (bullhead). STEP: I have a rooted, TWRP'ed phone on (alledgedly) stock ROM, disabling...
forum.xda-developers.com
I slightly modified the script to:
#!/usr/bin/sudo bash
./fastboot format userdata \
&& ./fastboot format cache \
&& ./fastboot flash bootloader bootloader-bullhead-bhz32c.img \
&& ./fastboot reboot-bootloader \
&& sleep 10 \
&& ./fastboot flash radio radio-bullhead-m8994f-2.6.42.5.03.img \
&& ./fastboot reboot-bootloader \
&& sleep 10 \
&& ./fastboot erase cache \
&& ./fastboot flash cache cache.img \
&& ./fastboot flash boot boot.img \
&& ./fastboot flash recovery recovery.img \
&& ./fastboot flash vendor vendor.img \
&& ./fastboot flash system system.img \
&& ./fastboot flash recovery twrp.img \
&& ./fastboot boot twrp.img \
&& echo ENABLE read and write on partitions and install magisk \
&& sleep 30 \
&& ./adb push Magisk-v25.2.zip /sdcard/TWRP/ \
&& echo Flash NH with TWRP, clear caches and reboot into system \
&& echo ./adb push nethunter-2022.3-bullhead-oreo-kalifs-full.zip /sdcard/TWRP/ \
&& echo now copy and unzip this manually into /system/etc/firmware via terminal \
&& echo ./adb push firmware.zip /sdcard/TWRP/
And the firmware.zip can be found here:
GitHub - rithvikvibhu/nh-magisk-wifi-firmware: This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter.
This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter. - GitHub - rithvikvibhu/nh-magisk-wifi-firmware: This Magisk module adds the required firmwar...
github.com
Just zip this
nh-magisk-wifi-firmware/system/etc/firmware at master · rithvikvibhu/nh-magisk-wifi-firmware
This Magisk module adds the required firmware for external wireless adapters to be used with NetHunter. - nh-magisk-wifi-firmware/system/etc/firmware at master · rithvikvibhu/nh-magisk-wifi-firmware
github.com
and extract into /system/etc/firmware via terminal/unzip
If you need rw permissions issue mount -o rw,remount /system
Once NH is installed you can check what dongles may work with cat /proc/config.gz (that's the kernel config) on TWRP. I had the fortune to make one work (an old tplink dongle).
Hope it helps someone.

Categories

Resources