[phpBB Debug] PHP Warning: in file [ROOT]/ext/spaceace/ajaxchat/controller/chat.php on line 220: Trying to access array offset on value of type bool
atvXperience : The Forum • [Not proper] Install OpenGapps in atvXperience TWRP
Page 1 of 2

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Fri Feb 01, 2019 11:07 pm
by SrWladimir
WARNING: YOU ARE ALREADY GOOD WITH atvXperience DEFAULT GAPPS, ONLY TRY THIS IF YOU LIKE TO MESS WITH YOUR DEVICE
Warning 2: This tutorial will asume that you know how to use Amlogic Tools and you know how to edit a file, this is just a dirty hack and only try this at your risk

Why this happen?
atvXperience firmware (or the firmware that atvx is based on) has an issue that in TWRP if you try to install OpenGapps(TVSTOCK) you will receive various errors like:
1. "This package is for 7.1.x" even if you have 7.1.2
2. "There is not space in the system" even having space for it.

1.) Happens because of the "default.prop" recovery image that for some reason has android version 5.1.1 and sdk 22 in the settings and OpenGapps uses this data for detecting version, easily fixable for the atvxperience team

2.) This happens because TWRP (or the entire firmware) has a bad setup of project treble: causing the OpenGapps fail to calculate the size and space left of the system: (I don't how to fix this on the firmware)
How Opengapps should display the size calculation in the log:

Code: Select all

         Total System Size (KB) | 2049200
         Used System Space (KB) | 940488
         Current Free Space (KB) | 1092328
What you get:

Code: Select all

         Total System Size (KB) | Filesystem
         Used System Space (KB) | 1K-blocks
         Current Free Space (KB) | Used
         Additional Space Required (KB) | 42844
If you for some reason want to install OpenGapps anyway, here is my work-around:

Requirements
- Windows PC
- A text editor that is not the in-built notepad in windows (notepad++ or sublime text)
- AmlogicTool (Customization tool)
- Basic knowledge of using AmlogicTools
- Patience

How-to:
Wrong android version bug
- Unpack atvXperience IMG in level 2 mode
- Go to the "Kernel/Recovery" tab and click "Open recovery directory"
- Search for the "default.prop" file and open it with a text editor
- Look for these two settings:

Code: Select all

ro.build.version.sdk
ro.build.version.release
And make it look like this:

Code: Select all

ro.build.version.sdk=25
ro.build.version.release=7.1.2
(You can put another android version, just be sure to put the android version of you atvXperience build and his matching sdk)
- Save it
- Repack recovery and flash it in the way you like (if you will select only recovery mode in packaging, when you flash it uncheck any erase setting)
- Flash it
- Done, if the other error appears follow the next steps
Insufficient system space
- Download the latest Opengapps-tvstock package
- Extract "installer.sh" from the OpenGapps zip file
- Open "installer.sh" it with a text editor
- Search for this:

Code: Select all

if [ -n "$(cat /proc/cmdline | grep slot_suffix)" ];
then
  device_abpartition=true
  SYSTEM=/system/system
  VENDOR=/vendor/vendor
else
  device_abpartition=false
  SYSTEM=/system
  VENDOR=/vendor
fi
And replace it with this:

Code: Select all

if [ -n "$(cat /proc/cmdline | grep slot_suffix)" ];
then
  device_abpartition=false
  SYSTEM=/system
  VENDOR=/vendor
else
  device_abpartition=false
  SYSTEM=/system
  VENDOR=/vendor
fi
- Save it
- Put the "Installer.sh" file back into the Opengapps.zip
- Flash it with TWRP
- Done

If you still have the error of insufficient system space, try resizing the system partition in TWRP.
If nothing of what I write worked, there is nothing I can do for it.

Hope this helped in any way.

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 6:24 am
by Nayam
[mention]SrWladimir[/mention] Thanks for the guide.

Flashing GAPPS might add some problems with the existing data, also, There are some apps that weren't added in atvx because they don't work in L3 and make the system unstable.
It should be alright for most part, although I don't recommend updating gapps because of the pre-existing data partition.

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 6:37 am
by ricklar
[mention]SrWladimir[/mention] nice little Tutorial, I may toy with at a later date.

My questions for you...
1) What device or devices do you have with AtvXperience installed in?
2) What this tested as working OK in your device with no bugs?
3) What advantages, new functions, or fixes were observed? Besides the Google system apps being updated...

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 10:06 am
by SrWladimir
ricklar wrote: Sat Feb 02, 2019 6:37 am @SrWladimir nice little Tutorial, I may toy with at a later date.

My questions for you...
1) What device or devices do you have with AtvXperience installed in?
2) What this tested as working OK in your device with no bugs?
3) What advantages, new functions, or fixes were observed? Besides the Google system apps being updated...
1) s905x (t95x box) but it should work for others because it does not have device specific things
(EDIT: I forgot to say that I use atvXperience 2H)
2) I didn't have any bugs like FC, things not working or other so far
3) Nothing really, I just wanted to install them for testing, anyway.

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 10:12 am
by SrWladimir
Nayam wrote: Sat Feb 02, 2019 6:24 am [mention]SrWladimir[/mention] Thanks for the guide.

Flashing GAPPS might add some problems with the existing data, also, There are some apps that weren't added in atvx because they don't work in L3 and make the system unstable.
It should be alright for most part, although I don't recommend updating gapps because of the pre-existing data partition.
What problems can happen from flashing them? I didn't experience any stability issue for now
and what parts of gapps can't be used with widevine L3? maybe I add a part to unselect those parts of the gapps.

Anyway I will add another warning that is not recommended to do this

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 2:30 pm
by ricklar
[mention]SrWladimir[/mention] thanks for your answers.
I was also curious, because another ATV developer says to use 2 Gapps packages = (TVSTOCK+Nano) and then Chromecast may function properly. Is just speculation and not confirmed yet.

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sat Feb 02, 2019 5:51 pm
by SrWladimir
ricklar wrote: Sat Feb 02, 2019 2:30 pm [mention]SrWladimir[/mention] thanks for your answers.
I was also curious, because another ATV developer says to use 2 Gapps packages = (TVSTOCK+Nano) and then Chromecast may function properly. Is just speculation and not confirmed yet.
How I can test Chromecast? I don't use it but I can test if installing tvstock and nano gapps make it working

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sun Feb 03, 2019 9:09 am
by Nayam
ricklar wrote: Sat Feb 02, 2019 2:30 pm [mention]SrWladimir[/mention] thanks for your answers.
I was also curious, because another ATV developer says to use 2 Gapps packages = (TVSTOCK+Nano) and then Chromecast may function properly. Is just speculation and not confirmed yet.
SrWladimir wrote: Sat Feb 02, 2019 5:51 pm
ricklar wrote: Sat Feb 02, 2019 2:30 pm [mention]SrWladimir[/mention] thanks for your answers.
I was also curious, because another ATV developer says to use 2 Gapps packages = (TVSTOCK+Nano) and then Chromecast may function properly. Is just speculation and not confirmed yet.
How I can test Chromecast? I don't use it but I can test if installing tvstock and nano gapps make it working
Chromecast will Never work natively with google's official app. It always checks for widevine l1.

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Sun Feb 03, 2019 9:53 pm
by ricklar
Ok

[Not proper] Install OpenGapps in atvXperience TWRP

Posted: Mon Apr 22, 2019 7:59 pm
by bennieFeaft
Hi, thanks a lot for the detailed guide. However, I am getting an error, I attached the related image to this post. I dont know what steps should I follow, can you guys help me? Thanks in advance.