GSI for not yet supported treble phones [2020/04/15]

Hi,

We’ve built some GSIs thanks to the phh treble experiment you can try
This is a minimal version but it includes /e/ store, magic earth, blisslauncher, edrive, microG, mail, etc.

This was built thanks to PHH-Treble and AndyYan scripts you can find here:

https://forum.xda-developers.com/pro…ow-to-t3908029

Thank you to:
PHH and phh treble team
Lineage team
/e/ team
Andy Yan
Openkirin for the huawei p9 camera

Here is my fork of phh device tree for /e/

Download

Download according to your partition scheme:

New release:


a64_a for a with 64 binders with a scheme
a64_b for a with 64 binders with a/b scheme
arm_a for arm with a scheme
arm_b for arm with a/b scheme
arm64_a for arm64 with a scheme
arm64_b for arm64 with a/b scheme

Old links of 2019:

a-only arm64
a/b arm64
a arm

4 Likes

How to build a GSI

Follow linage tutorial from “install-the-build-packages” to “Initialize the LineageOS source repository” (don’t do this last part, we will init /e/ repository instead)

https://wiki.lineageos.org/devices/bacon/build#install-the-build-packages

We need to init /e/ repo

create a folder on a disk with at least 150 gB of free space, perhaps even 200gB

mkdir e
cd e
repo init -u https://gitlab.e.foundation/e/os/android.git -b v1-pie
git clone https://github.com/phief/e_gsi_localmanifest .repo/local_manifests
repo sync -j2

Once it has completed

If you want to build only the image you need for your device,
edit:
treble_build_los/buildbot_treble.sh

at the end of the file, comment with an “#” the flavors you don’t need:

buildVariant treble_arm_aeN #for arm with a partition scheme
buildVariant treble_arm_beN #for arm with a/b partition scheme
buildVariant treble_a64_aeN #for arm with a partition scheme and 64 binders
buildVariant treble_a64_beN #for arm with a/b partition scheme and 64 binders
buildVariant treble_arm64_aeN #for arm64 with a partition scheme
buildVariant treble_arm64_beN #for arm64 with a/b partition scheme

becomes for example

#buildVariant treble_arm_aeN
#buildVariant treble_arm_beN
#buildVariant treble_a64_aeN
#buildVariant treble_a64_beN
buildVariant treble_arm64_aeN
#buildVariant treble_arm64_beN

then run

bash treble_build_los/buildbot_treble.sh

the resulting system image will be in

out/target/product/your-flavor/system.img

thank you AndyCGYan and PHHusson for patches and the work done one making GSI more universal than ever

2 Likes

Hey, I am trying to build a GSI since the download links are currently not working in your original post. I am stuck at this step:

Once it has completed

bash treble_build_lineage/apply_patches.sh

I cannot find a directory called treble_build_lineage and the only apply_patches.sh I found is in

./external/icu/tools/srcgen/javadoc_patches/apply_patches.sh

I appreciate any help you can give.

Hi, do you have a treble_build_los folder ?

I’ve fixed the link, thanks for reporting

I’m encountering the same issue where the apply_patches.sh file is not found. I also don’t have the treble_build_lineage folder, the repository linked in your response only has an .xml file in it. I’m not sure if I’m missing something or not.

Any help is appreciated!

1 Like

You are not cloning any repo containing the apply_patches.sh : you’re cloning the /e/ repo which doesn’t contain anything related to Treble and your manifest repo but not the repo with the script or at least you didn’t mentioned in your tutorial.

EDIT : I’m stupid : all is in the manifest…

EDIT2: I’ve opened all repos mentioned in the manifest : no one contains apply_patches.sh. Is there no mismatches in the name ? I’ve found a build_treble_vanilla.sh

when running

make WITHOUT_CHECK_API=true systemimage

I get the following error.

ninja: error: '/DATA/GSI/out/target/product/walleye/obj/HEADER_LIBRARIES/generated_kernel_headers_intermediates/export_includes', needed by '/DATA/GSI/out/target/product/walleye/obj/STATIC_LIBRARIES/libgptutils_intermediates/import_includes', missing and no known rule to make it

Could you point me in a direction to get this solved?

tlg@nasbox:/DATA/GSI$ make WITHOUT_CHECK_API=true systemimage
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
LINEAGE_VERSION=0.7-p-20191123-UNOFFICIAL-walleye
TARGET_PRODUCT=lineage_walleye
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a73
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-a
TARGET_2ND_CPU_VARIANT=cortex-a73
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-70-generic-x86_64-Ubuntu-18.04.3-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=/DATA/GSI/out
============================================
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
No need to regenerate ninja file
ninja: error: '/DATA/GSI/out/target/product/walleye/obj/HEADER_LIBRARIES/generated_kernel_headers_intermediates/export_includes', needed by '/DATA/GSI/out/target/product/walleye/obj/STATIC_LIBRARIES/libgptutils_intermediates/import_includes', missing and no known rule to make it
22:19:26 ninja failed with: exit status 1

#### failed to build some targets (10 seconds) ####

coming from the fairphone 3 section, and can’t wait for an official build. therefore thinking about installing this GSI.
two questions:

  1. will there be OTA updates inside the GSI?

  2. @Manoj, why is GSI/treble not officially supported? with a good guide you’d directly support lots of new devices as soon as they are rootable - and you could add a lot of new devices to the “supported” list.

No. Because there will be no official GSI in near future

And I’m not sure that the available GSI is a full eOS GSI, because as far as I know, the patching of e-sources doesn’t work. As far as,I know, it’s an LOS GSI with eOS apps and design

Some of our users tried to build a GSI with the articles available on XDA and the web but were not very successful. We have a small dev team, one of our team member did put some time around it but due to his other commitments was not able to focus completely on it.
I would suggest users who are technically inclined to do some builds and try out building a perfect GSI for /e/. It would be a help for all.

well. I understand. and I don’t really know whether this is a good idea, but treble sounds really… “easy” to support to me.
did you see the list of devices you could just get into your “supported devices” list by providing only one good GSI?

grafik
I didn’t want to put the whole list here because this list is quite huge. therefore I just added the devices that were discussed in the last 10 days in the device request section.

edit: the linked list above is not even complete. I just added the Fairphone 3.

1 Like

Try building a GSI with eOS sources and you will see, it’s hard, very hard to build. I have tried several hours/days but always stuck at point of patching.

New release of GSI:

a64_a for a with 64 binders with a scheme
a64_b for a with 64 binders with a/b scheme
arm_a for arm with a scheme
arm_b for arm with a/b scheme
arm64_a for arm64 with a scheme
arm64_b for arm64 with a/b scheme

1 Like

have you build with build-dakkar.sh ? I’m always getting an error with it

/treble_experimentations/build-dakkar.sh: line 409: jq: command not found

EDIT: Seems, that the dakkar build is onyl working for some AOSP versions. All others are running into the same error.

See my second post, I’ve updated my builds instructions

Thx, I have seen, but the dakkar script isn’t using it

I don’t know about the dakkar script, I don’t use it :slight_smile:

Don’t get it running. All scripts running into errors

bash treble_experimentations/build-rom.sh android-9 e-pie

bash treble_build_los/buildbot_treble.sh e-pie

bash treble_experimentations/build-dakkar.sh e-pie arm64-aonly-floss-nos

what is the result of
bash treble_build_los/buildbot_treble.sh
?

Thousand errors. .’’…

I have all sources in folder PIE.
I have cloned the gsi build folder into PIE folder
I have started all the 3 commands from PIE folder