[Android Stick & Console AMLogic based Computers] Downunder35m:
I am still a green beginner when it comes to making a custom firmware but I basically only do it for my personal needs and offer the result for everyone.

However, there is one thing really nagging me ith the X96 and that is to get updated GAPPS to work properly and with all Google apps.

The basics like Playstore, Framework and Play Services and managed to get going but only by disabling some "features" in the firmware and with the box showing up as uncertified.

Real problem is to get the TV GAPPS working at all.

No matter how I spoof the build.prop, disable services and manully add permissions, the TV Gapps claim be on an unsupported device and demand dowgrade / removal of updates.

For a chinese phone I would simply flash an internation rom and be done with it but not so much on a chinese TV box :(

What I tried so far for the TV GAPPS:

Using custom roms claiming to work for several boxes including the X96.

Here the rom either fails to boot unless I modify it or if it boots then nothing, and I mean nothing all works.

Funny enough that some user of a X96 say they have no problem with the same rom...

Next was to clean the original firmware from all Google related apps, services, scripts and libraries, then manually installing the TV GAPPS.

For this I always get the error that the device is not compatible.

Even if in the build.prop a Mibox or Nvidia Shield is spoofed together with ro.build.characteristics=tv.

Last but not least the Open GAPPS TV version.

Flashing works just fine and with no errors, on a cleaned and on a standard rom.

After that it is all over.

Setup Wizard crashes, if disabled or removed the other Google apps and services crash, usually starting with the TV Wizard and TV Customisation.

TV Playstore again claims the device is not compatible in the rare case it does start otherwise I get an error that the Play services are missing on the device.

But of course all is installed completely....

What I would love to know is how and where these chinese roms disable the Google compatibility.

Here is what I think I found so far that does not make much sense to me:

The supplied Playstore is signed with different key than anything else on the system partition.

The same version number from APKMIRROR fails to install or work if replaced in the rom.

I tried signing with the Amlogic platform, test and release keys to no avail.

Both by zip aligning before or after the signing.

Other apps I sign with these keys perform just fine.

Just to be able to use the Open GAPPS through TWRP I had to disable a PPoE apk that runs presistent - with that active no open Gapps pack works (claiming device is incompatible or simply crashing).

There are a bunch of additional certificates installed in the ETC folder than when removed or renamed cause the system to fail - I had no time so far to do a one on one check to figure out for what each cert might be used.

When comparing fstabs with other roms it seems the X96 has lot more than what would be required but my understanding of all that is still too limited.

I guess the big question is:

Does anyone know what is causing all these problems in chinese roms and how to fix it without flashing a firmware for different TV box?