yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] JengaMasterG:
Ok so...I uploaded a bad system.img file....my bad!! It looks like Magisk also affects the vendor images....

So I uploaded the system_b.img so that you can get your phone working for now. I am currently investigating another way to alleviate this issue...

I've also uploaded vendor_a and vendor_b images that you can try as well....I'm sorry for the inconvenience!! for recent 1903040 Build:

vendor_a.img

vendor_b.img

system_b.img

So first try:

fastboot flash vendor_a vendor_a.img

fastboot flash vendor_b vendor_a.img

reboot

and if that doesn't work:

fastboot flash system_b system_b.img

and reboot

you should be able to boot into B slot after this so make sure your active slot is slot b...
[Miscellaneous Android Development] JengaMasterG:
UPDATE:

If anyone with a Chinese Variant (SKR-A0) that is using system_a can upload a system_a image that would be great! That's kind of all we need since I forgot to back mine up... @.@
[Miscellaneous Android Development] gilbert32:
Please tell me what happens with you, i intend to try what you're doing tomorrow
[Miscellaneous Android Development] KingpinTR:
Really I so sory. I did everythink, but result nothing.
[Miscellaneous Android Development] P.Nidh:
Blackshark global

My device is bootloop and i didn't backup. So please anybody upload boot.img n system.img for global.pls
[Miscellaneous Android Development] Deezi74:
What did you do Wong? To get bootloop

---------- Post added at 01:15 AM ---------- Previous post was at 01:14 AM ----------

Somebody should make a video tutorial from a to z from unlocking the bootloader to flashing China ROM from global

---------- Post added at 01:19 AM ---------- Previous post was at 01:15 AM ----------

so use this but flash system b
[Miscellaneous Android Development] JengaMasterG:
Okay...

Can you please copy and paste what your command screen says?

Are you getting any errors?

Are you booting from B??
[Miscellaneous Android Development] Deezi74:
How do you boot from b? And do I flash gapps in twrp thanks
[Miscellaneous Android Development] JengaMasterG:
Please just copy and paste the following commands where you have system_b, vendor_b and vendor_a images:

fastboot system_b system_b.img

fastboot vendor_a vendor_a.img

fastboot vendor_b vendor_b.img

fastboot format userdata

fastboot reboot

And copy and paste your ENTIRE COMMAND WINDOW from start to finish. Use THESE COMMANDS ABOVE. DO NOT MIX OR CHANGE THE COMMANDS.

What does your screen on your phone show?

I restored mine to use slot B from a brick where the phone would boot into recovery right away by doing this. I just need a system_a image file and I would be fully restored

---------- Post added at 07:31 PM ---------- Previous post was at 07:28 PM ----------

Use the command:

fastboot set_active other

This should then say something along the lines of active boot now ‘b’.

As for GApps, I’m also investigating that issue as it seems to say it flashed, but doesn’t. It could be that it only works on booting from A and not B. I won’t know until my system_a partition gets fixed :/
[Miscellaneous Android Development] Deezi74:
I wonder if we could do something like this guy https://xdaforums.com/nubia-z17/development/stock-based-nubia-ui-5-0-v3-06-t3677247
[Miscellaneous Android Development] gilbert32:
Porting Chinese rom to global version

Hello guys,

I tried today and had success. I got the Chinese Rom to install on the Global Black Shark.

I will post a new thread with instructions later. The only thing annoying is swapped navigation buttons (back is now recent and vice versa), and upside-down screen.

However for the screen, once you lock the phone and turn the screen back on, it's fixed.

The fix should probably be replacing the Chinese kernel inside boot.img with the Global kernel. Or some build.prop.
[Miscellaneous Android Development] KingpinTR:
Everythink is OK. But nothing change. What is problem? Why doesn't my phone get out of bootloop?

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash system_b system_b.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'system_b' 1/5 (523854 KB)...
OKAY [ 20.292s]
writing 'system_b' 1/5...
OKAY [ 0.016s]
sending sparse 'system_b' 2/5 (523492 KB)...
OKAY [ 29.162s]
writing 'system_b' 2/5...
OKAY [ 0.000s]
sending sparse 'system_b' 3/5 (491159 KB)...
OKAY [ 29.210s]
writing 'system_b' 3/5...
OKAY [ -0.000s]
sending sparse 'system_b' 4/5 (513038 KB)...
OKAY [ 21.311s]
writing 'system_b' 4/5...
OKAY [ -0.000s]
sending sparse 'system_b' 5/5 (397622 KB)...
OKAY [ 16.758s]
writing 'system_b' 5/5...
OKAY [ -0.000s]
finished. total time: 116.796s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash vendor_a vendor_a.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'vendor_a' 1/2 (503118 KB)...
OKAY [ 19.745s]
writing 'vendor_a' 1/2...
OKAY [ -0.000s]
sending sparse 'vendor_a' 2/2 (60572 KB)...
OKAY [ 48.016s]
writing 'vendor_a' 2/2...
OKAY [ 0.000s]
finished. total time: 67.792s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash vendor_b vendor_b.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'vendor_b' 1/2 (503110 KB)...
OKAY [ 19.948s]
writing 'vendor_b' 1/2...
OKAY [ 0.000s]
sending sparse 'vendor_b' 2/2 (60572 KB)...
OKAY [ 48.114s]
writing 'vendor_b' 2/2...
OKAY [ 0.016s]
finished. total time: 68.109s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot erase userdata
******** Did you mean to fastboot format this ext4 partition?
erasing 'userdata'...
OKAY [ 25.100s]
finished. total time: 25.115s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot set_active other
Setting current slot to 'b'...
OKAY [ 0.031s]
finished. total time: 0.031s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot reboot
rebooting...

finished. total time: -0.000s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>
[Miscellaneous Android Development] JengaMasterG:
Why are you typing erase userdata? That's not the correct command. FORMAT. FORMAT. FASTBOOT FORMAT USERDATA.

FASTBOOT ERASE USERDATA CAN CAUSE BOOTLOOPS!!

COPY AND PASTE THE COMMANDS.

If you still have bootloops after FASTBOOT FORMAT USERDATA, then Customer service is your best bet.

Also, minimal adb and fastboot is OUTDATED. Download the updated platform tools at the Android open source webpage now.
[Miscellaneous Android Development] Deezi74:
Let me know when you get that post up I'ma follow it. Did you get Google play working with it?
[Miscellaneous Android Development] gilbert32:
Yes. and Thread is Up :)
[Miscellaneous Android Development] Deezi74:
Link
[Miscellaneous Android Development] gilbert32:
https://xdaforums.com/android/development/install-chinese-joyui-xiaomi-black-shark-t3897286

For some reason it shows up in android miscellaneous development, and not in threads about black shark.
[Miscellaneous Android Development] pppwaung:
i can boot slot B and root. but userdata error. how to fix userdata error wifi not work. thx for help.

internal problem
[Miscellaneous Android Development] KingpinTR:
C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash system_b system_b.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
erasing 'system_b'...
OKAY [ 7.800s]
sending sparse 'system_b' 1/5 (523854 KB)...
OKAY [ 15.554s]
writing 'system_b' 1/5...
OKAY [ 0.016s]
sending sparse 'system_b' 2/5 (523492 KB)...
OKAY [ 29.206s]
writing 'system_b' 2/5...
OKAY [ 0.000s]
sending sparse 'system_b' 3/5 (491159 KB)...
OKAY [ 29.068s]
writing 'system_b' 3/5...
OKAY [ 0.016s]
sending sparse 'system_b' 4/5 (513038 KB)...
OKAY [ 16.709s]
writing 'system_b' 4/5...
OKAY [ 0.002s]
sending sparse 'system_b' 5/5 (397622 KB)...
OKAY [ 13.412s]
writing 'system_b' 5/5...
OKAY [ -0.000s]
finished. total time: 111.826s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash vendor_a vendor_a.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'vendor_a' 1/2 (503118 KB)...
OKAY [ 15.248s]
writing 'vendor_a' 1/2...
OKAY [ 0.016s]
sending sparse 'vendor_a' 2/2 (60572 KB)...
OKAY [ 47.829s]
writing 'vendor_a' 2/2...
OKAY [ -0.000s]
finished. total time: 63.107s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot flash vendor_b vendor_b.img
target reported max download size of 536870912 bytes
Invalid sparse file format at header magic
sending sparse 'vendor_b' 1/2 (503110 KB)...
OKAY [ 15.328s]
writing 'vendor_b' 1/2...
OKAY [ 0.016s]
sending sparse 'vendor_b' 2/2 (60572 KB)...
OKAY [ 47.948s]
writing 'vendor_b' 2/2...
OKAY [ -0.000s]
finished. total time: 63.306s

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot format userdata
CreateProcess failed: The system cannot find the file specified. (2)
error: Cannot generate image for userdata

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>fastboot format userdata
CreateProcess failed: The system cannot find the file specified. (2)
error: Cannot generate image for userdata

C:\Users\KingpinTR\Downloads\minimal_adb_fastboot_1.4.3_portable>

CreateProcess failed: The system cannot find the file specified. (2)
[Miscellaneous Android Development] JengaMasterG:
Black shark doesn't get it's own thread anymore. Use xiaomi-black-shark as a tag for the thread ?

Did you run fastboot format userdata? That's the only way it works.

Because you used ERASE and not FORMAT like I said to do all the way at the start, you ERASED THE PARTITON from the looks of it. You have to go to Customer service now. Your phone is dead.

"erase <partition> erase a flash partition\n""

Erase in this case means gone, remove the entire partition from the system. So the system doesn't have it anymore.

Source

As far as I know TWRP can't flash images other than system, boot, and vendor...
[Miscellaneous Android Development] pppwaung:
Did you run fastboot format userdata? That's the only way it works.

yes i run fastboot format userdata but CreateProcess failed: The system cannot find the file specified. (2)

i not call or use speakerphone.
[Miscellaneous Android Development] SLavKaM:
Hi everyone! Can you please tell me how to lock the bootloader?
[Miscellaneous Android Development] kanded:
you may try : fastboot oem unlocking

if it doesnt work, you may try : fastboot flashing unlock
[Miscellaneous Android Development] JengaMasterG:
Are you locking it? I'm pretty sure it's one of these:

For global (SKR-H0):

fastboot flashing lock

For CN (SKR-A0):

fastboot oem lock

So pretty much whatever unlock command you did, just swap out unlock for lock.
[Miscellaneous Android Development] SLavKaM:
this command is not working
[Miscellaneous Android Development] kanded:
try this :

fastboot oem lock

and

fastboot oem lock_critical

or try this :

fastboot flashing lock

and

fastboot flashing lock_critical
[Miscellaneous Android Development] SLavKaM:
Thanks.

c:\ADB>fastboot flashing lock_critical
FAILED (remote: Device already : locked!)
Finished. Total time: 0.004s

c:\ADB>fastboot oem device-info
(bootloader) Verity mode: true
(bootloader) Device unlocked: true
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Console enabled: false
OKAY [ 0.011s]
Finished. Total time: 0.011s

c:\ADB>fastboot flashing lock
OKAY [ 0.025s]
Finished. Total time: 0.027s

c:\ADB>fastboot oem device-info
(bootloader) Verity mode: true
(bootloader) Device unlocked: false
(bootloader) Device critical unlocked: false
(bootloader) Charger screen enabled: false
(bootloader) Console enabled: false
OKAY [ 0.010s]
Finished. Total time: 0.011s

---------- Post added at 03:40 PM ---------- Previous post was at 03:36 PM ----------

strange that is unlocked by the command "oem unlock", and blocked back by the command "flashing lock" ......
[Miscellaneous Android Development] shteren:
[MENTION=3367320]kanded[/MENTION] can you update the OP with detailed step by step solution including the ADB commands for CN and global version seperatly?

im so excited by this i have the CN version since it lunched basically and i was getting frustrated by having no way to root it lately. i was considering selling it and getting mi mix3, but this just brought new life to my phone.

btw if future OTA come we will have to relock the bootloader and wipe the user data to get it? or it should keep working normally? i just want magisk installed for root.

i'm afraid to try it because its the only phone i have and i need it for daily use so i don't want to be stuck in loops for days.
[Miscellaneous Android Development] KingpinTR:
I think you should be waiting for non test version. Because My phone is still waiting on bootloop. My phone status writed to BS team. But no answer for my question.
[Miscellaneous Android Development] shteren:
To do this for ch varient, i need to unlock bootloader before? Or i can just pull these files with adb, patch them and flash them without unlocking?

If so it means i dont need to wipe user data just to get root?
[Miscellaneous Android Development] kanded:
make sure ur simcard data is there on your phone for updating th magisk installer later.

im sure fastboot boot, doesnt require us to unlock bootloader.

unlocking ur bootloader is still a good advice. you may keep my advice.
[Miscellaneous Android Development] bluke:
Does anyone have update G66X1901140OS00MPX manual?

Mine just keep looping: G66X1901082OS00MPX ---> Check Update --> have update G66X1901140OS00MPX download --> install ---> say in G66X1901082OS00MPX again --> check again --> have update G66X1901140OS00MPX --> download again.

Mine is China version flash Global Rom into it.
[Miscellaneous Android Development] jaygan93:
really works for my Black shark CN version and with magisk 18.1 rooted! thanks bro!!! but i just wonder which Google camera works perfectly with api camera2 for Black Shark, can anyone help me with this? i would appreciate on that :d
[Miscellaneous Android Development] shteren:
Kanded is awsome he helped me root my CN blackshark also.

We flashed pico gapps in twrp and patched boot with magisk after i have native google now it shows in my phone settings and all google apps work perfectly.

He has a version for google camera that works on the rooted blackshark, and it makes really good pictures.
[Miscellaneous Android Development] JengaMasterG:
This is the thread you are looking for. I'm currently using it with no issues ?
[Miscellaneous Android Development] Jujjuw:
can anyone help me tutorial step by step to open botloader until root with magisk 18.1? is that on first page is up to date tutorial until rooted? im beginner on this, but i want to root my cn blackshark, i will thanksful for helping me :)
[Miscellaneous Android Development] SmashCrash:
Video Tutorial - How to Flash it

Hello to everyone and everybody. I think it will be a good idea if somebody do a full step by step tutorial about the flash progress. Less questions and less problems. It would optimize the thread and would be better for all of us. Peace
[Miscellaneous Android Development] jaygan93:
wow! this is nice! thanks bro??
[Miscellaneous Android Development] JengaMasterG:
What parts do you have questions on? The bootloader unlock command or the ENTIRE process? The entire process can take some time to write out..
[Miscellaneous Android Development] Frankelvis97:
issue regarding magisk

Is magisk Apk is free service?
[Miscellaneous Android Development] gilbert32:
What?!!
[Miscellaneous Android Development] bluke:
Anyone have global System.img I backup on twrp now I can't restored it.
[Miscellaneous Android Development] Jujjuw:
Step how to unlock botloader, what i must prepare, like pc or something, until finish rooting sir, it's entire process i think, btw thank you for asking sir.. :)
[Miscellaneous Android Development] JengaMasterG:
Uhh it's free and always will be. If you bought magisk you got ripped off. Only use the one from the official XDA forum and donate through there if you want to support the project.
[Miscellaneous Android Development] pppwaung:
how to get userdata image. please help me. i get semi brick.
[Miscellaneous Android Development] JengaMasterG:
Read through the forum...or wait until the forum creator updates the first page
[Miscellaneous Android Development] JengaMasterG:
Chinese or global version? What do you mean by semi-brick?

What steps did you do?
[Miscellaneous Android Development] Minhk01994:
Cant root

Please can someone help me step by step how to root black shark chinese version?

I unlocked boatloader then use command

Fastboot boot recovery twrp.img

But i cant past encryption to flash .zip file

I have build number G66X1812291CN00MPX now but cant update to newer build
[Miscellaneous Android Development] jaygan93:
i have a question. i'm using the china version SKR-A0 and changed to b with magisk root without twrp. Currently i receive an new update from ota, can i update it? and how do i update? please help me thanks in advanced.?
[Miscellaneous Android Development] pppwaung:
i erase userdata. wifi mobiledata and camera not work. i want flash new userdata. BS version SKR-A0 Thx for help.:crying:
[Miscellaneous Android Development] JengaMasterG:
Please read the first forum post. You must wipe your data everytime you access TWRP until you root your device.

If you're having issues updating then you have to wipe data, update, and then re-root.

What update version is it? They haven't released any since January...

What command did you use to wipe your userdata? Formatting userdata doesn't break system functions.

What are ALL the steps you did. Did you flash TWRP instead of boot TWRP like the first forum says?
[Miscellaneous Android Development] Minhk01994:
please how did you flash magisk everytime when i am in twrp i had encryption

if i go wipe then reboot system it wont start, my phone was bricked, so i go to stock recovery to wipe/clear data then my phone starts but everthing is deleted. so i put zip files to my phone then goes to twrp but encryption is still here so i cant flash it.

i found kandeds way to root it but when i am in twrp my phone isnt reconized in my pc, my pc is windows xp i tried all usb,adb drivers on google but nothing works.

please someone helps me to root it i am strugling with this 3 days :(:(:crying:
[Miscellaneous Android Development] gilbert32:
Follow this thread for removing encryption:

https://xdaforums.com/android/development/twrp-root-decrypt-december-update-t3893376

EDIT: oh i see windows XP. Try to get your hands on a windows 7+ machine.
[Miscellaneous Android Development] Jujjuw:
is forum maker already update it sir?
[Miscellaneous Android Development] GlobalShark:
how to change from china rom to global rom?

i am using china rom. but i want global rom . . .

please help me . . .

i'm a beginner.
[Miscellaneous Android Development] ck2693:
stock boot.img

i installed twrp and it is working but could not do anything as storage is encrypted.i just want to lock bootloader again.does any body have stock boot or know a way to lock it again ?

ty guys

---------- Post added at 06:30 PM ---------- Previous post was at 06:22 PM ----------

how can i do help. i have srk-h0 latest update global version
[Miscellaneous Android Development] SLavKaM:
fastboot flashing lock

advice
[Miscellaneous Android Development] pppwaung:
this command

"fastboot erase userdata" for brick wifi & mobiledata & camera not work. i can boot it but don't use phone. random reboot.

thx. for help.:crying:

ps.can boot all slot A+B and root.
[Miscellaneous Android Development] JengaMasterG:
So if you've already unlocked your bootloader there should be a forum where someone has done this process. Searching under the tag "xiaomi-black-shark" in the forums should bring it up. You'll need to replace one of the system and boot areas of your BlackShark with the global version. This will break the other boot from loading into the Chinese version, but reflashing the Chinese version whenever you want to go back should solve that issue.

Where are you getting that command from?

---------- Post added at 02:33 PM ---------- Previous post was at 02:28 PM ----------

This is a bit weird in the directions, but you don't want to boot back into the stock system after wiping. You'll want to boot directly into fastboot and then into TWRP from:

fastboot boot TWRP.img

Then move the zip file over and root

The reason behind this is because ONCE the phone boots into the system it encrypts the data. There's no way to disable it from the system menu. This seems to be a default feature on the BlackShark
[Miscellaneous Android Development] ck2693:
ty

third command worked. ty very much.
[Miscellaneous Android Development] pppwaung:
I getting command from post 111 this Thread. post by KingpinTR.

You can help me?

Befor use "fastboot format userdata" CreateProcess failed .Thx
[Miscellaneous Android Development] JengaMasterG:
.....please read what I said to him on post 112 and a bunch of posts later....

Fastboot erase userdata: destroys the partition itself. Gone. Bye bye. Not there anymore. It's essentially the same as erasing a partition on a computer hard drive.

Fastboot FORMAT userdata: the CORRECT command. This clears the previous data from the partition. The partition stays. Why would you listen to kingpinTR's command??????

Nowhere in post 1 of the thread is "fastboot erase userdata" there. It's a deprecated command. It's not used on these newer systems that use dual partitions.

Somehow you're lucky and your system can still boot. I can try to upload a userdata image, but most likely you'll need to go to BlackShark and tell them it's broken.
[Miscellaneous Android Development] kanded:
it means you can't format userdata in the current slot. try to switch to another slot, and do the command again.
[Miscellaneous Android Development] JengaMasterG:
Anyone having Phone Manager Issues on the CN version with third party sms apps? I posted a new thread here so hopefully it will be solved!
[Miscellaneous Android Development] harshz6969:
Thnx for contributions
[Miscellaneous Android Development] FasterBit:
:(

I have the TWRP working in my Black Shark SKR-H0 but now the phone is bricked. Any way to get the firmware .img with black shark firmware to flash system with fastboot or someone can share the full tree of boot and system to coñy to my phone sith TWRP and try to boot it?
[Miscellaneous Android Development] JengaMasterG:
It has just been uploaded here by [MENTION=3907492]gilbert32[/MENTION]
[Miscellaneous Android Development] FasterBit:
Lot of thanks! I was in the chinese version but now I returned to the international. I'm so happy, the black shark is flashable in both versions.
[Miscellaneous Android Development] JengaMasterG:
Yeah! I'm running the global software on the CN version now..got tired of the CN version not playing well with some apps.
[Miscellaneous Android Development] chucvnbg:
---------- Post added at 04:46 AM ---------- Previous post was at 04:43 AM ----------

[/COLOR]

My phone after unlocking bootloader and flash system with root, I relock and now it can't boot. as picture. please help me

https://img.xda-cdn.com/Y3kw2c-0UeE...cflickr.com/7881/47316963171_d5b2d2a139_m.jpg
[Miscellaneous Android Development] lamquynh257:
https://youtu.be/vUaqz31goUQ

Help me, how i can fix it bro? thank you!

after I uninstall magisk, my phone auto boot recovery
[Miscellaneous Android Development] JengaMasterG:
It is bad practice to relock the bootloader if you are rooting. Relocking I believe wipes your data, which causes the bootloop with Magisk. There should be a post with a link to the stock images you will need to start again from scratch. So unlock your bootloader again, flash the stock files, and then twrp and Magisk. Reboot after
[Miscellaneous Android Development] chucvnbg:
All fastboot commands are error messages. Can't flash:crying::crying::crying:

There must be a factory-based rom