[GUIDE] How to use microG with our mi5 (Custom Nougat ROM)

Search This thread

kevinkvothe

Senior Member
Dec 27, 2014
72
32
Installation guide of microG services in three ways:
-On ROMs with signature spoofing option.
-On Deodexed ROMs without signature spoofing option.
-On Odexed ROMs without signature spoofing option.​

I'm using win10 all the time here, and this guide is for Nougat ROMs only.

Hi everybody! Two months ago I discovered the awesome world of microG, a life without original google play services, without any of my data on google and with better battery life (we all know how google services drains battery). For more general information, refere please to these threads and forums:
https://forum.xda-developers.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616
https://microg.org/
https://shadow53.com/no-gapps/

Today I present you my guide (none of this work is done by me, I'm just showing the way I install these services) to install microG features.

The first thing we need is a ROM without gapps included. Then is needed to know if it supports signature spoofing out-of-the-box, you can see if the ROM is present on this list: https://forum.xda-developers.com/android/general/index-list-custom-roms-offering-t3557047 or ask developer in his own thread. If it supports it, you can directly go to the instructions num 1) . If else, you need to know if the ROM is odexed or deodexed, for this, you can ask on the dev thread or unpack the rom yourself.

How to unpack the ROM:
You can unpack it with 7-zip and then decompress it with this tool: https://forum.xda-developers.com/android/software-hacking/tool-tool-unpack-repack-dat-img-v2-0-t3284806. You must place the system.transfer.list and the system.new.dat you'll find in the decompressed folder in the Input_dat folder of the tool given, then open the tool with usage permission and mark option 1, then wait until process is finished and you'll have the output in the System_unpack folder.
Then you only need to go to the /system_/framework/ folder and see if there's any arm, arm64, folder with .oat files inside. If there isn't, congratulations, your rom is deodexed and you can follow path 2). If there is any of these folders mentioned with .oat files, your rom is odexed, and you'll need to follow path 3).

Note: on all this process we will be using the @Shadow53 files placed on https://shadow53.com/no-gapps/downloads/, I personally use the "microG with playstore" and the "calendar and contacts" flashable zips (I've modified the calendar and contacts zip because of some issues with sync that i don't know if were solved, I let the modified flashable zip later in this post) please, before asking or complaining, read his page fully, his work is awesome.


1) ROMs with signature spoofing option:

This is the easy way. We only need to install the clean ROM and then flash the microG and the sync packages we've donwnloaded before. Once booted, we only need to active signature spoofing option and check microG Self-Check and we are ready to go. In order to install backends for network location, please, refer to proper threads.


2) Deodexed ROMs without signature spoofing option.

Here we will follow the steps as if we had a signature spoofing option (as the previous paragraph) but obiously we won't active nothing when booted and we will use this tool: https://forum.xda-developers.com/android/development/tingle-fork-needle-t3438764 (please, read carefully before asking) if your ROM is deodexed and you follow the steps carefully, you'll have patched the ROM in a few minutes. Then you just need to reboot and check with microG Self-Check.

3) On Odexed ROMs without signature spoofing option.

This is my "original" way, as nobody explained fully how to do it. Here, you need to deodex the framework folder and then flash the rom with the tingle patch already applied. Let's begin.
First, you need to get the /system_/framework and the build.prop you unpacked when checking if the rom was or not odexed. Then you need to deodex it by using this tool https://forum.xda-developers.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081 (I have to say sometimes it only works for me the 1.1 version) it's easy, you'll need to download the tool and the backsmali, smali 2.2 or later (already compiled in .jar, I let them later in this thread) and run it.
Once you have the framework deodexed (erase the arm, arm65 and oat folder if there is any left) you just need to get the framework.jar and patch it with tingle (option 2 in the script, the patched file will be in the output folder), then replace the patched framework in the deodexed framework folder.
Now you just need to pack it in a flashable zip that must erase the current framework folder of your ROM and then place the one you deodexed, for this, I let you all a flashable zip I made modifying the one the ZIPme app made. Yo must unpack it and replace the framework folder in "system" with the deodexed one with the patched file and repack it.
Then you just need to flash the clean ROM and afte that the framework-replacer.zip and all microG flashable zips you need, once booted you can directly check microG and you'll se it is already patched.

Suggestions are welcome on this guide!

Many thanks to all devs and people made all this possible:
Marvin for microG.
Shadow53 for his guide and flashable zips.
ale5000 for tingle.
xpirt for fulmics deodexer.
Kritsada Chaitan for his unpacking tool.
Primokorn for his signature spoofing support list.
JRummy Apps for ZIPme.
kevinkvothe (I gess)
Anyone else feeling he/she should be on this list, please, tell me.​

Downloads.
https://mega.nz/#F!id1jlZoS!6Su8IJeGQnYO_3olQmQMTg
 

Attachments

  • baksmali-2.2.0.jar
    1.3 MB · Views: 87
  • smali-2.2.0.jar
    1,014.8 KB · Views: 71
  • framework-replacer.zip
    137 KB · Views: 156
  • GoogleSync.zip
    1.4 MB · Views: 152
Last edited:

Aaren11

Senior Member
Dec 12, 2015
181
83
Thanks for the concise, resource-rich guide. I've been trying to patch an odexed ROM for the past few weeks, and never thought to try and flash it with the patched framework.jar. Cheers! I'm going to give this a try first thing tomorrow!
 

ikzouhetnietweten

Senior Member
Nov 21, 2013
95
36
That was one hell of a long ride but I got the signature spoofing working.. Thanks a lot.
I got the Error [RH-01] with play store but after rebooting it was fixed somehow.
 
Last edited:

ale5000

Senior Member
Dec 24, 2013
1,089
1,016
That was one hell of a long ride but I got the signature spoofing working.. Thanks a lot.
But my Play Store aint working! it says Error [RH-01] , I tried everything from deleting cache, data, enabled google device registration in micro settings, enabled google cloud messaging.. etc etc Everything is checked in Self checked.
Enable "Google device registration" in micro settings, then clear data of Play Store, termintate it and remove it from recent apps.
Then run it again.
 
Last edited:

xiiihyou13

Member
Feb 20, 2017
18
2
Hi all,

I'm using RR + Magisk + NanoMod which can achieve this faster. However, I was dumbfounded when I couldnt get sync properly to work, however flashing the google sync adapter work. I urge anyone who want to use microG to use nanomod version, as it is simpler. you only have to flash via twrp and let it sit.

@kevinkvothe

Hi,
have you tried my Google Sync Add-on?

It would be nice to know if it is working for everyone.

thank you
 

ale5000

Senior Member
Dec 24, 2013
1,089
1,016
Hi all,

I'm using RR + Magisk + NanoMod which can achieve this faster. However, I was dumbfounded when I couldnt get sync properly to work, however flashing the google sync adapter work. I urge anyone who want to use microG to use nanomod version, as it is simpler. you only have to flash via twrp and let it sit.

thank you
It depends what you mean, both are flashable zip so as simplicity should be the same.
 

ale5000

Senior Member
Dec 24, 2013
1,089
1,016
I tested it once, when I started to learn about microG and it didn't work, but I'm not sure all was working and if I had signature spoofing support so... I'll test it when possible.
In the latest version I have fixed permission problems, so it will most likely work out of the box.
 

Bracher

Senior Member
Sep 18, 2009
192
46
Hi all,

I'm using RR + Magisk + NanoMod which can achieve this faster. However, I was dumbfounded when I couldnt get sync properly to work, however flashing the google sync adapter work. I urge anyone who want to use microG to use nanomod version, as it is simpler. you only have to flash via twrp and let it sit

thank you
But unfortunately Nanomod Patcher does not work on odexed and deodexd ROMs, I don't know yet if mine is odexed or deodexed but will have to check It's the unofficial LinageOS 14.1 for lt03lte - the official nightly does unfortunately not detect my external SD Card!
 

Sick1

Senior Member
Aug 24, 2011
361
222
Juat FIY, now that nougat supports xposed, this is much easier when using Fakegapps module [emoji106]

Lähetetty minun MI 5 laitteesta Tapatalkilla
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Installation guide of microG services in three ways:
    -On ROMs with signature spoofing option.
    -On Deodexed ROMs without signature spoofing option.
    -On Odexed ROMs without signature spoofing option.​

    I'm using win10 all the time here, and this guide is for Nougat ROMs only.

    Hi everybody! Two months ago I discovered the awesome world of microG, a life without original google play services, without any of my data on google and with better battery life (we all know how google services drains battery). For more general information, refere please to these threads and forums:
    https://forum.xda-developers.com/android/apps-games/app-microg-gmscore-floss-play-services-t3217616
    https://microg.org/
    https://shadow53.com/no-gapps/

    Today I present you my guide (none of this work is done by me, I'm just showing the way I install these services) to install microG features.

    The first thing we need is a ROM without gapps included. Then is needed to know if it supports signature spoofing out-of-the-box, you can see if the ROM is present on this list: https://forum.xda-developers.com/android/general/index-list-custom-roms-offering-t3557047 or ask developer in his own thread. If it supports it, you can directly go to the instructions num 1) . If else, you need to know if the ROM is odexed or deodexed, for this, you can ask on the dev thread or unpack the rom yourself.

    How to unpack the ROM:
    You can unpack it with 7-zip and then decompress it with this tool: https://forum.xda-developers.com/android/software-hacking/tool-tool-unpack-repack-dat-img-v2-0-t3284806. You must place the system.transfer.list and the system.new.dat you'll find in the decompressed folder in the Input_dat folder of the tool given, then open the tool with usage permission and mark option 1, then wait until process is finished and you'll have the output in the System_unpack folder.
    Then you only need to go to the /system_/framework/ folder and see if there's any arm, arm64, folder with .oat files inside. If there isn't, congratulations, your rom is deodexed and you can follow path 2). If there is any of these folders mentioned with .oat files, your rom is odexed, and you'll need to follow path 3).

    Note: on all this process we will be using the @Shadow53 files placed on https://shadow53.com/no-gapps/downloads/, I personally use the "microG with playstore" and the "calendar and contacts" flashable zips (I've modified the calendar and contacts zip because of some issues with sync that i don't know if were solved, I let the modified flashable zip later in this post) please, before asking or complaining, read his page fully, his work is awesome.


    1) ROMs with signature spoofing option:

    This is the easy way. We only need to install the clean ROM and then flash the microG and the sync packages we've donwnloaded before. Once booted, we only need to active signature spoofing option and check microG Self-Check and we are ready to go. In order to install backends for network location, please, refer to proper threads.


    2) Deodexed ROMs without signature spoofing option.

    Here we will follow the steps as if we had a signature spoofing option (as the previous paragraph) but obiously we won't active nothing when booted and we will use this tool: https://forum.xda-developers.com/android/development/tingle-fork-needle-t3438764 (please, read carefully before asking) if your ROM is deodexed and you follow the steps carefully, you'll have patched the ROM in a few minutes. Then you just need to reboot and check with microG Self-Check.

    3) On Odexed ROMs without signature spoofing option.

    This is my "original" way, as nobody explained fully how to do it. Here, you need to deodex the framework folder and then flash the rom with the tingle patch already applied. Let's begin.
    First, you need to get the /system_/framework and the build.prop you unpacked when checking if the rom was or not odexed. Then you need to deodex it by using this tool https://forum.xda-developers.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081 (I have to say sometimes it only works for me the 1.1 version) it's easy, you'll need to download the tool and the backsmali, smali 2.2 or later (already compiled in .jar, I let them later in this thread) and run it.
    Once you have the framework deodexed (erase the arm, arm65 and oat folder if there is any left) you just need to get the framework.jar and patch it with tingle (option 2 in the script, the patched file will be in the output folder), then replace the patched framework in the deodexed framework folder.
    Now you just need to pack it in a flashable zip that must erase the current framework folder of your ROM and then place the one you deodexed, for this, I let you all a flashable zip I made modifying the one the ZIPme app made. Yo must unpack it and replace the framework folder in "system" with the deodexed one with the patched file and repack it.
    Then you just need to flash the clean ROM and afte that the framework-replacer.zip and all microG flashable zips you need, once booted you can directly check microG and you'll se it is already patched.

    Suggestions are welcome on this guide!

    Many thanks to all devs and people made all this possible:
    Marvin for microG.
    Shadow53 for his guide and flashable zips.
    ale5000 for tingle.
    xpirt for fulmics deodexer.
    Kritsada Chaitan for his unpacking tool.
    Primokorn for his signature spoofing support list.
    JRummy Apps for ZIPme.
    kevinkvothe (I gess)
    Anyone else feeling he/she should be on this list, please, tell me.​

    Downloads.
    https://mega.nz/#F!id1jlZoS!6Su8IJeGQnYO_3olQmQMTg
    1
    @kevinkvothe

    Hi,
    have you tried my Google Sync Add-on?

    It would be nice to know if it is working for everyone.

    I tested it once, when I started to learn about microG and it didn't work, but I'm not sure all was working and if I had signature spoofing support so... I'll test it when possible.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone