• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Unlocked Bootloader][SKR-A0] Install GApps via TWRP for CN Xiaomi Black Shark

Search This thread

JengaMasterG

Senior Member
Sep 1, 2012
270
93
Devon
LG G6
Opp Find X
How to Install GApps onto Xiaomi Black Shark
IF YOU ARE UNLOCKING YOUR BOOTLOADER FOR THE FIRST TIME, THEN THIS WILL WIPE USER DATA. You are also assuming the risk of bricking your device! Please read directions carefully!

REQUIREMENTS:
Unlocked Bootloader!
TWRP from mauronofrio found here

1. Unlock Bootloader (if you haven't yet):
FOR CHINESE VERSION (SKR-A0):
Code:
fastboot oem unlock
FOR GLOBAL VERSION (SKR-H0)[SIZE]
Code:
fastboot flashing unlock

2. Get GApps:
Go to http://www.opengapps.org and download NANO SIZE OR BELOW.
Download .gapps-config file if you want to KEEP the STOCK PACKAGE INSTALLER

3. Factory wipe data in recovery mode:
This will erase all of your data! Make sure you have a backup you can use that's not on your phone. This helped make sure active boot a got the correct files flashed to it and it not disappearing.

4. Check that Active Boot Partition as A!:
The default active boot is a. For some reason the system_b and vendor_b partitions doesn't have enough space for flashing gapps...

5. Boot into TWRP and flash!:
Code:
fastboot boot twrpimg.img
move gapps & optional config file to phone internal storage
flash gapps
reboot!

5. All Done!:
Go through both set up processes(if data was wiped)

What Has Been Checked:
All GApps on Stock and Nano Packages

Credits:
OpenGApps for GApps
@Invisan for Unlock Bootloader Method for Global Variant
@ioriz for Unlock Bootloader Method for Chinese Variant
@mauronofrio for TWRP
 

Attachments

  • Screenshot_2019-02-01-13-08-59-619_com.google.android.setupwizard.png
    Screenshot_2019-02-01-13-08-59-619_com.google.android.setupwizard.png
    83.2 KB · Views: 1,212
  • Screenshot_2019-02-01-13-09-03-452_com.google.android.gms.png
    Screenshot_2019-02-01-13-09-03-452_com.google.android.gms.png
    53.1 KB · Views: 1,204
  • Screenshot_2019-02-01-13-09-49-728_com.google.android.googlequicksearchbox.png
    Screenshot_2019-02-01-13-09-49-728_com.google.android.googlequicksearchbox.png
    121.8 KB · Views: 1,160
  • Screenshot_2019-02-01-13-10-00-595_com.google.android.googlequicksearchbox.png
    Screenshot_2019-02-01-13-10-00-595_com.google.android.googlequicksearchbox.png
    84.3 KB · Views: 1,062
  • Screenshot_2019-02-01-13-10-05-746_com.google.android.gms.png
    Screenshot_2019-02-01-13-10-05-746_com.google.android.gms.png
    201.9 KB · Views: 1,030
  • Screenshot_2019-02-01-13-10-10-089_com.google.android.gms.png
    Screenshot_2019-02-01-13-10-10-089_com.google.android.gms.png
    242.4 KB · Views: 1,014
  • Screenshot_2019-02-01-13-10-57-163_com.google.android.packageinstaller.png
    Screenshot_2019-02-01-13-10-57-163_com.google.android.packageinstaller.png
    50.3 KB · Views: 984
  • Screenshot_2019-02-01-13-11-22-595_com.google.android.gms.png
    Screenshot_2019-02-01-13-11-22-595_com.google.android.gms.png
    202.7 KB · Views: 1,042
Last edited:
  • Like
Reactions: Finn Do and kanded

JengaMasterG

Senior Member
Sep 1, 2012
270
93
Devon
LG G6
Opp Find X
by the way, when flashing, it gives error 70.
Which GApps version did you use? Error 70 is caused from the system not having enough storage, so nano or pico packages are the only available options that should work.
@kanded I've updated the steps for flashing. For some reason system_b doesn't have a big enough partition size for the GApps to work correctly. Flashing from system_a after setting A as your active partition should work. I just tested it (even with a borked system_a partition like mine!)
 
Last edited:

kanded

Senior Member
Dec 22, 2010
247
90
Medan
Which GApps version did you use? Error 70 is caused from the system not having enough storage, so nano or pico packages are the only available options that should work.
@kanded I've updated the steps for flashing. For some reason system_b doesn't have a big enough partition size for the GApps to work correctly. Flashing from system_a after setting A as your active partition should work. I just tested it (even with a borked system_a partition like mine!)

i think im gonna find a way to reduce the size of the image. thanks a lot mate.
 
  • Like
Reactions: JengaMasterG

gilbert32

Senior Member
Apr 4, 2011
1,037
1,437
In the universe
By unlocking the bootloader, will I lose the OTA firmawares updates?

Not by unlocking, but after flashing anything. Including flashing twrp, or magisk, or rooting, or decrypting. You can always backup after unlocking and before flashing anything, allowing you to return to stock anytime. And by backup, i mean manually copying all the phone partitions to your computer, not the twrp backup thingy.
 

aqoerama

Member
Mar 24, 2011
5
0
Which GApps version did you use? Error 70 is caused from the system not having enough storage, so nano or pico packages are the only available options that should work.
@kanded I've updated the steps for flashing. For some reason system_b doesn't have a big enough partition size for the GApps to work correctly. Flashing from system_a after setting A as your active partition should work. I just tested it (even with a borked system_a partition like mine!)

Hye, what's the difference between installing GApps via TWRP compare to installing using the google installer from app store that came with the phone?
I'm using SKR-A0 version.

Another question is, can I relock the bootloader without wiping the data? so that I can get the new official OTA again.

Thanks again
 

s?gt

New member
Jan 13, 2021
2
0
Hello there, I have unlocked the bootloader and rooted my phone with magisk but I could not flash gapps stock or mini, I have the same code 70 (Insufficient storage), I have tried to switch to partition A using .\fastboot.exe --set-active=a and it said "current-slot: a" when I tried .\fastboot.exe getvar current-slot.
The reboot menu in TWRP doesn't have the A/B slot option for version 3.3.1 blackshark, the old version has it but no longer works and giving me black screen but the screen is on after I update to android p via System Update.

Is there an additional step to switch partitions or did I messed up?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    How to Install GApps onto Xiaomi Black Shark
    IF YOU ARE UNLOCKING YOUR BOOTLOADER FOR THE FIRST TIME, THEN THIS WILL WIPE USER DATA. You are also assuming the risk of bricking your device! Please read directions carefully!

    REQUIREMENTS:
    Unlocked Bootloader!
    TWRP from mauronofrio found here

    1. Unlock Bootloader (if you haven't yet):
    FOR CHINESE VERSION (SKR-A0):
    Code:
    fastboot oem unlock
    FOR GLOBAL VERSION (SKR-H0)[SIZE]
    Code:
    fastboot flashing unlock

    2. Get GApps:
    Go to http://www.opengapps.org and download NANO SIZE OR BELOW.
    Download .gapps-config file if you want to KEEP the STOCK PACKAGE INSTALLER

    3. Factory wipe data in recovery mode:
    This will erase all of your data! Make sure you have a backup you can use that's not on your phone. This helped make sure active boot a got the correct files flashed to it and it not disappearing.

    4. Check that Active Boot Partition as A!:
    The default active boot is a. For some reason the system_b and vendor_b partitions doesn't have enough space for flashing gapps...

    5. Boot into TWRP and flash!:
    Code:
    fastboot boot twrpimg.img
    move gapps & optional config file to phone internal storage
    flash gapps
    reboot!

    5. All Done!:
    Go through both set up processes(if data was wiped)

    What Has Been Checked:
    All GApps on Stock and Nano Packages

    Credits:
    OpenGApps for GApps
    @Invisan for Unlock Bootloader Method for Global Variant
    @ioriz for Unlock Bootloader Method for Chinese Variant
    @mauronofrio for TWRP
    1
    thanks mate. a must have after rooting. i'll share your good work.
    1
    Which GApps version did you use? Error 70 is caused from the system not having enough storage, so nano or pico packages are the only available options that should work.
    @kanded I've updated the steps for flashing. For some reason system_b doesn't have a big enough partition size for the GApps to work correctly. Flashing from system_a after setting A as your active partition should work. I just tested it (even with a borked system_a partition like mine!)

    i think im gonna find a way to reduce the size of the image. thanks a lot mate.