[GUIDE] TREBLE on Moto Z All variants for dummies [GSI][TWRP][ROOT][PLAY SERVICES]

Search This thread

mosfet321

Senior Member
Jan 18, 2009
58
35
Aguascalientes, Mex.
Hi everyone!

I present to you the practical and simple guide special for dummies that will allow you to try and use the wonders of google treble project in our beloved Moto Z [Griffin has no official support but...] thanks to the great work of the highly recognized developer @erfanoabdi we can enjoy project treble in an easy way [*could apply user restrictions] in our griffin.

*First of all, this guide is designed for those who are curious and have a high degree of autonomy when they try to solve low level or common problems of the Android system. You dont need to be a developer but you must have experience in using and applying the following words: unlocked bootloader, ADB and Fastboot basic commands, Lineage OS, TWRP, Magisk , Back to Stock, Frustration, No "daily driver user" or maybe according to your needs, contribute to general knowledge, dont demand from me more than here is already here because I'm not a developer, I'm just a curious user who likes to try new things in his griffin and I have already given you more than 168 hours of trial and error with the only goal of making the process easier and more fun to you. :)

Now let's go to what interests us, do you have your bootloader unlocked?

If the answer is no, go here and do it or you can not continue

First we start with the files that we need to download:

Latest Lineage OS from here:
https://download.lineageos.org/griffin

[Thanks to Erfanoabdi]GSI image of your favorite flavor from here:
https://mirrors.lolinet.com/firmware/gsi/
Only type A not AB just A like ColorOS-Aonly-9-20190605-ErfanGSI.img.7z not ColorOS-AB-9-20190605-ErfanGSI.img.7z and decompress the .7z file to get the IMG file inside.

To decompress the .7z file
https://www.7-zip.org/download.html

If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
https://xdaforums.com/moto-z/development/stock-moto-z-8-0-firmware-t3805226
Thanks to @thuybang for the post and @erfanoabdi again for the needed files.

Official TWRP from here:
https://dl.twrp.me/griffin/twrp-3.3.1-0-griffin.img.html

Latest Stable Magisk from here:
https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Thanks to @topjohnwu

Magisk module "Device Spoofing Tool" from here:
https://xdaforums.com/apps/magisk/qa-want-to-install-modules-magisk-v13-3-t3800435
Thanks to @Dreamer(3MF)

Device ID apk from here:
https://androidfilehost.com/?fid=673956719939830832

Latest Android System WebView APK from here:
https://www.apkmirror.com/apk/googl.../android-system-webview-76-0-3809-36-release/

Finally put this on favorites because you will need it for the final touch:
https://www.google.com/android/uncertified/


Only if you have all those files downloaded and placed in your PC in the folder that you want you can continue.

Now the easy way step by step if you are on Official Stock ROM:

1 - Reboot to Bootloader and flash twrp-oemasvendor-2.img you can use ADB and fastboot of the .rar adb-fastboot-latest.rar that you ¿downloaded? from the back to stock link

Use
Code:
fastboot flash recovery twrp-3.3.1-0-griffin.img.img

Hard-reboot to bootloader again, down two steps and select reboot to recovery.

2 - Already in TWRP do this:

2.1 - Wipe Data - if it gives you error go reboot and select reboot recovery and again wipe data it should have been erased without errors, back and
2.2 - Manually wipe caches, system, vendor, data, internal storage
2.3 - Do "Swipe to Factory Reset" probably not necessary but for me it works.

3 - Now connect your Griffin and copy the Lineage OS ROM downloaded [obviously still inside of TWRP]
3.1 Go to Install and select the copied Lineage ROM and then install
3.2 Finished the installation restart and skip all startup, now in the launcher screen shutdown your griffin

4 - Power on your griffin again in bootloader, two steps down and select reboot recovery again.
4.1 - Now in TWRP copy the GSI type A image that you downloaded [MIUI, ColorOS, OneUI, Pixel, Flyme OS, etc)
4.2 - Allready copied go to Install and select "Install Image"
4.3 - Now you see the .IMG file, select and then flash as "System" and go let finish, clear cache and restart to System.

5 - Be very patient, you will see the warning image for having your bootloader unlocked for 5 to 10 seconds [may vary] then you will see the start animation according to the GSI image that you will select before, again be very patient it can take 3 to 15 minutes to your griffin to start completely (MIUI 3-5 minutes, Pixel 3-5 minutes, OneUI 5-10 minutes, Flyme 15 to 20 minutes in my experience) If you see that the start animation reduces its brightness after a few minutes, it means that we are on the right track wait a little longer.
5.1 - Finally we start system we enter directly without previous configurations (configure wifi, google account, PIN, etc) just start screen now go to step 6, if not then go here:

If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
https://xdaforums.com/moto-z/development/stock-moto-z-8-0-firmware-t3805226
Thanks to @thuybang for the post and @erfanoabdi again for the needed files.


And start again :rolleyes:

6 - Ok you are one of those who managed to install and start their GSI image and you dont have google services enabled and your griffin is not certified :eek: you probably have app errors that crash infinitely [if they are 1 or 3 - example the camera] manage to go to app administration in the ROM and cancel auto-start of that apps, instead if you have so many apps errors that dont let you move anything in the interface you need to go to TWRP and clean davlink cache and cache and reboot.

That's why this step is important

Code:
4.3 - Now you see the .IMG file, select and then flash as "System" and go let finish, [B][COLOR="Red"]clear cache and restart to System
[/COLOR][/B].


7 - Now Root your griffin with Magisk, you know how otherwise I dont know how you got here :confused:

8 - Already in system, install the "Device Spoofing Tool" magisk module and reboot to activate the module.

9 - Again already in system, install Device ID APK
9.1 - Open Device ID app and find your device’s GSF (Google Service Framework) Device-ID
9.2 In your PC go HERE and use your GSF to register and certify your griffin

10 - Now install Android System WebView APK
10.1 - Go to TWRP again and clean cache one more time and reboot to system

11 - Configure your google account and be happy
11.1 - Camera its a common fail, use Gcam or Snapdragon Camera instead of GSI stock camera app

12 - Enjoy your griffin :highfive:

Well that's all from me and remember if something goes wrong or it does not work you can always go here:
If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
https://xdaforums.com/mot...mware-t3805226
Thanks to @thuybang for the post and @erfanoabdi again for the needed files.


The 99.99999999 percent of all this, maybe more, it's thanks to @erfanoabdi If you want to thank someone, buy a coffee for him.

Screenshots (sorry just from MIUI with my emotion I forgot to save from the other GSI that I proble) I feel comfortable with MIUI and now it is my ROM-GSI of daily use in my griffin (I really love taking screenshot with my three fingers :D )



Finally dont be mad with my english, itis very bad and I use translator :mad:
 
Last edited:

isgakbrfc

Senior Member
Apr 2, 2014
54
5
whats the waiting time for the moto image? ive installed the moto image, and still waiting for the device to bootup. its been about 15 mins

---------- Post added at 07:46 PM ---------- Previous post was at 07:25 PM ----------

after installing the image, im stuck on this (device will boot in 5 seconds screen) Can i boot back into recovery, and re install the image? its been more than 30 mins on this screen
 

calinorg

Senior Member
Pixel image is the only one I managed to boot, but couldn't get gsf id from it, and it constantly force closed (cache was cleaned) and couldn't make it work at all. Moto image just gives black screen, all other images couldn't even be installed (either error in twrp or something else.) I'll try miui image one of these days, but would really like to try to make pixel image work, but without gsf id it's impossible


EDIT: Changed twrp to twrp-oemasvendor-2.img version, and managed to boot miui (but after magisk it bootlooped) and to start booting moto GSI images (moto bootloops), and just tried to boot pixel images, will see later... but I think that the problem was that twrp uses cache as vendor partition, and deleting cache, well, deletes vendor partition (will need clarification from @erfanoabdi on this)...
 
Last edited:
  • Like
Reactions: ultrasymmetry

anwesh

Member
After following this guide, I am able to boot into system (only with Pixel or MIUI GSI), but SIM is not getting detected. Frequent app crashes are also observed. Cache and dalvik are being cleared before booting...
Do I still need to follow this How to make GSI...?
But LOS 16 seems to flash vendor image, isn't it...?
What am I missing...?
By the way, clearing vendor partition always gives me an error...
 
Last edited:

mosfet321

Senior Member
Jan 18, 2009
58
35
Aguascalientes, Mex.
After following this guide, I am able to boot into system (only with Pixel or MIUI GSI), but SIM is not getting detected. Frequent app crashes are also observed. Cache and dalvik are being cleared before booting...
Do I still need to follow this How to make GSI...?
But LOS 16 seems to flash vendor image, isn't it...?
What am I missing...?
By the way, clearing vendor partition always gives me an error...

Go to TWRP and make full wipe factory, that fix the problem
 
  • Like
Reactions: anwesh

Edmontonchef

Senior Member
Nov 30, 2016
867
386
42
edmonton
Google Pixel 6
I've been hunting down and trying out some different gsi's. With the latest twrp + los16 installed I've had success with some from this list

https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

AOSP 10 with gapps included
Msm xtended gapps included
Blissrom + gapps
Aosip + gapps
EvolutionX gapps included
DU13 + gapps (not on list but works)

If installing gsi's without gapps included, let it boot first then reboot TWRP and install gapps + magisk if you want root.
 
  • Like
Reactions: JS.zip

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Hi everyone!

    I present to you the practical and simple guide special for dummies that will allow you to try and use the wonders of google treble project in our beloved Moto Z [Griffin has no official support but...] thanks to the great work of the highly recognized developer @erfanoabdi we can enjoy project treble in an easy way [*could apply user restrictions] in our griffin.

    *First of all, this guide is designed for those who are curious and have a high degree of autonomy when they try to solve low level or common problems of the Android system. You dont need to be a developer but you must have experience in using and applying the following words: unlocked bootloader, ADB and Fastboot basic commands, Lineage OS, TWRP, Magisk , Back to Stock, Frustration, No "daily driver user" or maybe according to your needs, contribute to general knowledge, dont demand from me more than here is already here because I'm not a developer, I'm just a curious user who likes to try new things in his griffin and I have already given you more than 168 hours of trial and error with the only goal of making the process easier and more fun to you. :)

    Now let's go to what interests us, do you have your bootloader unlocked?

    If the answer is no, go here and do it or you can not continue

    First we start with the files that we need to download:

    Latest Lineage OS from here:
    https://download.lineageos.org/griffin

    [Thanks to Erfanoabdi]GSI image of your favorite flavor from here:
    https://mirrors.lolinet.com/firmware/gsi/
    Only type A not AB just A like ColorOS-Aonly-9-20190605-ErfanGSI.img.7z not ColorOS-AB-9-20190605-ErfanGSI.img.7z and decompress the .7z file to get the IMG file inside.

    To decompress the .7z file
    https://www.7-zip.org/download.html

    If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
    https://xdaforums.com/moto-z/development/stock-moto-z-8-0-firmware-t3805226
    Thanks to @thuybang for the post and @erfanoabdi again for the needed files.

    Official TWRP from here:
    https://dl.twrp.me/griffin/twrp-3.3.1-0-griffin.img.html

    Latest Stable Magisk from here:
    https://xdaforums.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
    Thanks to @topjohnwu

    Magisk module "Device Spoofing Tool" from here:
    https://xdaforums.com/apps/magisk/qa-want-to-install-modules-magisk-v13-3-t3800435
    Thanks to @Dreamer(3MF)

    Device ID apk from here:
    https://androidfilehost.com/?fid=673956719939830832

    Latest Android System WebView APK from here:
    https://www.apkmirror.com/apk/googl.../android-system-webview-76-0-3809-36-release/

    Finally put this on favorites because you will need it for the final touch:
    https://www.google.com/android/uncertified/


    Only if you have all those files downloaded and placed in your PC in the folder that you want you can continue.

    Now the easy way step by step if you are on Official Stock ROM:

    1 - Reboot to Bootloader and flash twrp-oemasvendor-2.img you can use ADB and fastboot of the .rar adb-fastboot-latest.rar that you ¿downloaded? from the back to stock link

    Use
    Code:
    fastboot flash recovery twrp-3.3.1-0-griffin.img.img

    Hard-reboot to bootloader again, down two steps and select reboot to recovery.

    2 - Already in TWRP do this:

    2.1 - Wipe Data - if it gives you error go reboot and select reboot recovery and again wipe data it should have been erased without errors, back and
    2.2 - Manually wipe caches, system, vendor, data, internal storage
    2.3 - Do "Swipe to Factory Reset" probably not necessary but for me it works.

    3 - Now connect your Griffin and copy the Lineage OS ROM downloaded [obviously still inside of TWRP]
    3.1 Go to Install and select the copied Lineage ROM and then install
    3.2 Finished the installation restart and skip all startup, now in the launcher screen shutdown your griffin

    4 - Power on your griffin again in bootloader, two steps down and select reboot recovery again.
    4.1 - Now in TWRP copy the GSI type A image that you downloaded [MIUI, ColorOS, OneUI, Pixel, Flyme OS, etc)
    4.2 - Allready copied go to Install and select "Install Image"
    4.3 - Now you see the .IMG file, select and then flash as "System" and go let finish, clear cache and restart to System.

    5 - Be very patient, you will see the warning image for having your bootloader unlocked for 5 to 10 seconds [may vary] then you will see the start animation according to the GSI image that you will select before, again be very patient it can take 3 to 15 minutes to your griffin to start completely (MIUI 3-5 minutes, Pixel 3-5 minutes, OneUI 5-10 minutes, Flyme 15 to 20 minutes in my experience) If you see that the start animation reduces its brightness after a few minutes, it means that we are on the right track wait a little longer.
    5.1 - Finally we start system we enter directly without previous configurations (configure wifi, google account, PIN, etc) just start screen now go to step 6, if not then go here:

    If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
    https://xdaforums.com/moto-z/development/stock-moto-z-8-0-firmware-t3805226
    Thanks to @thuybang for the post and @erfanoabdi again for the needed files.


    And start again :rolleyes:

    6 - Ok you are one of those who managed to install and start their GSI image and you dont have google services enabled and your griffin is not certified :eek: you probably have app errors that crash infinitely [if they are 1 or 3 - example the camera] manage to go to app administration in the ROM and cancel auto-start of that apps, instead if you have so many apps errors that dont let you move anything in the interface you need to go to TWRP and clean davlink cache and cache and reboot.

    That's why this step is important

    Code:
    4.3 - Now you see the .IMG file, select and then flash as "System" and go let finish, [B][COLOR="Red"]clear cache and restart to System
    [/COLOR][/B].


    7 - Now Root your griffin with Magisk, you know how otherwise I dont know how you got here :confused:

    8 - Already in system, install the "Device Spoofing Tool" magisk module and reboot to activate the module.

    9 - Again already in system, install Device ID APK
    9.1 - Open Device ID app and find your device’s GSF (Google Service Framework) Device-ID
    9.2 In your PC go HERE and use your GSF to register and certify your griffin

    10 - Now install Android System WebView APK
    10.1 - Go to TWRP again and clean cache one more time and reboot to system

    11 - Configure your google account and be happy
    11.1 - Camera its a common fail, use Gcam or Snapdragon Camera instead of GSI stock camera app

    12 - Enjoy your griffin :highfive:

    Well that's all from me and remember if something goes wrong or it does not work you can always go here:
    If everything goes to hell [100% sure to happen at least once] Stock ROM and adb-fastboot-latest.rar from here:
    https://xdaforums.com/mot...mware-t3805226
    Thanks to @thuybang for the post and @erfanoabdi again for the needed files.


    The 99.99999999 percent of all this, maybe more, it's thanks to @erfanoabdi If you want to thank someone, buy a coffee for him.

    Screenshots (sorry just from MIUI with my emotion I forgot to save from the other GSI that I proble) I feel comfortable with MIUI and now it is my ROM-GSI of daily use in my griffin (I really love taking screenshot with my three fingers :D )



    Finally dont be mad with my english, itis very bad and I use translator :mad:
    2
    Thanks for guide, very cool
    Official TWRP is updated with treble support BTW
    1
    Pixel image is the only one I managed to boot, but couldn't get gsf id from it, and it constantly force closed (cache was cleaned) and couldn't make it work at all. Moto image just gives black screen, all other images couldn't even be installed (either error in twrp or something else.) I'll try miui image one of these days, but would really like to try to make pixel image work, but without gsf id it's impossible


    EDIT: Changed twrp to twrp-oemasvendor-2.img version, and managed to boot miui (but after magisk it bootlooped) and to start booting moto GSI images (moto bootloops), and just tried to boot pixel images, will see later... but I think that the problem was that twrp uses cache as vendor partition, and deleting cache, well, deletes vendor partition (will need clarification from @erfanoabdi on this)...
    1
    After following this guide, I am able to boot into system (only with Pixel or MIUI GSI), but SIM is not getting detected. Frequent app crashes are also observed. Cache and dalvik are being cleared before booting...
    Do I still need to follow this How to make GSI...?
    But LOS 16 seems to flash vendor image, isn't it...?
    What am I missing...?
    By the way, clearing vendor partition always gives me an error...

    Go to TWRP and make full wipe factory, that fix the problem
    1
    I've been hunting down and trying out some different gsi's. With the latest twrp + los16 installed I've had success with some from this list

    https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list

    AOSP 10 with gapps included
    Msm xtended gapps included
    Blissrom + gapps
    Aosip + gapps
    EvolutionX gapps included
    DU13 + gapps (not on list but works)

    If installing gsi's without gapps included, let it boot first then reboot TWRP and install gapps + magisk if you want root.