/e/OS - Android 14 2.7 GSI bring-up

Yes, it should be called before the ROM even boots because it is a debug build

The error it throws should be app-permissions issue though, that is what is preventing it from booting on a non-lineage base, I haven’t fixed it yet so it is unlikely to boot on any stock ROM, presently I can only build once a day so I’m going to choose the next build to be A13 with all modifications to boot on stock HW since you’re helping me test, I’d like to cater to what you’ve been waiting for

@Null, how many EUR or U$Dollars would we have to invest in more powerful hardware so that you don’t have to spend so much time waiting for GSI image building?

I don’t need money, I am on vacation presently and will be home in 1 week back to my source building PC, it has a i9 with 24 cores :slight_smile:

I only got into building /e/OS because I got bored here

2 Likes

Test N°3

Nothing Phone (1) A063 spacewar
SoC: Qualcomm SM7325-AE Snapdragon 778G+ 5G
NothingOS 2.6 (A14) Security: Nov. 2024
No custom recovery, no LineaageOS; no /e/OS

Successful, problem-free installation (without support of Nothing Glyph) of lineage-21.0-20241118-UNOFFICIAL-arm64_bvN.img by @AndyYan

@Null, maybe over time you can try to build a a64: ARM 32-bit with 64-bit binder /e/OS-T GSI 2.7.x (A13), like lineage-20.0-20241118-UNOFFICIAL-a64_bvN.img by @AndyYan?

Test N°4

Xiaomi Poco F1 beryllium
SoC: Qualcomm SDM845 Snapdragon 845
e-2.6.3-u-20241217455391-community-beryllium.zip
recovery-e-2.6.3-u-20241217455391-community-beryllium.img


Install /e/OS-U on a Xiaomi Poco F1 - “beryllium”

Waited until e-2.6.3-u-20241217 boots, then rebooting to e-Recovery

Entering Fastboot (= FASTBOOTD) via e-Recovery
then
…fastboot erase system
…fastboot flash system system.img (GSI by @Null)
…Reboot to system

:warning: /e/OS-U 2.7 GSI boots up to the yellow POCO logo and remains there motionless - for minutes - until I abort the process and reinstall e-2.6.3-u-20241217.






An error occurred: No more than 3 consecutive replies are allowed. Please edit your previous reply, or wait for someone to reply to you.






Test N°5

Samsung Galaxy S8 dreamlte
SoC: Samsung Exynos 8895

e-2.6.3-u-20241219-UNOFFICIAL-dreamlte.zip by @ronnz98
recovery-e-2.6.3-u-20241219-UNOFFICIAL-dreamlte.img by @ronnz98


:warning: Installation is not possible in the manner described above, as FASTBOOT is not available in e-Recovery.

Samsung and Fastboot-Mode is a separate story. Samsung does not have the classic fastboot mode, but there is the so-called Odin/Download mode in addition to the recovery mode.

Ok, there’s no need to do further tests as I’m now modifying the codebase so the next build will not even be the same as the previous one, plus there is still no ADB Logcat feedback so it tells me nothing when it doesn’t work lol.

It doesn’t tell you anything? My five tests tell me: @AndyYans’s GSI build works, @Null’s GSI doesn’t work under the identical conditions. But today is not the end of the world. We may see if and what changes with your next build.

Hello @Null, welcome to this forum

You help is really appreciate, you are our long-time-awaited savior !

.


.

@Xxpsilon, the topic is to collect informations from the logcat to improve the source code to build an /e/ G.S.I.

Unlike our respectable well known ronnz98 who “simply” build /e/ for many device from existing sources, and just need a work or not work feedback,
here, Null seems to be a developper who needs some further informations feedback (from logcat) to create the long-awaited /e/ G.S.I. upgrade.

i cannot help because i don’t own any treble compatible devices (except my daily FP3), my s4 and s4mini don’t meet the requirements…

i could say @Harvey186’s (who builded some of the fisrt working /e/GSI), and now LeOS.de works but it is not helpfull.

1 Like

My tip: Make GSI Build available to a wider public on github Generic System Image (GSI) list and draw conclusions from the response.

OK, I’ve added a few patches to /e/OS source, to apply these patches unpack the folder into the source of your android directory and open generic.sh, the contents are as follows:

echo patching Android source

echo for patch in /media/developer/android/Lineage21/lineage_patches_unified/patches_treble - Change to your path

for patch in /media/developer/android/Lineage21/lineage_patches_unified/patches_treble/**/*.patch; do
    # Extract the relative folder path without altering the structure unnecessarily
    relative_folder=$(dirname "$patch" | sed 's|/media/developer/android/Lineage21/lineage_patches_unified/patches_treble/||')

    # Replace only the underscores in the patch directory structure with slashes
    relative_folder=$(echo "$relative_folder" | sed 's|_|/|g')

    # Define the corresponding source folder path in the Lineage21 source tree
    source_folder="/media/developer/android/Lineage21/$relative_folder"

    echo "Applying $patch to $source_folder"

    # Ensure the source folder exists and apply the patch
    if [ -d "$source_folder" ]; then
        git -C "$source_folder" apply -p1 "$patch" || echo "Failed to apply $patch, continuing with next"
    else
        echo "Source folder $source_folder does not exist, skipping patch"
    fi
done

Simply change the path to your /e/OS source directory, then open a terminal inside this folder and issue the following command:

bash generic.sh

This will patch everything for GSI use.

You are very helpful in confirming Andy’s Lineage 21 works for you.

Since /e/OS is basically Lineage at source with prebuilt apps, most of the patches Andy used apply to Lineage and I’m pretty sure my next build will boot.

For now, I must confirm that the patches do not violate the integrity of the build process, and if they do, to resolve those errors.

To be truthful I don’t think I’ve done that bad, considering I got it to boot when the base is Lineage generically on just a second attempt; it’s a really small jump to make it boot on generic devices from there.

My tests are intended to help you as much as possible and are not intended as criticism of your work. Nobody is perfect, not even me. If we work together respectfully, we have a good chance of achieving our aims.

1 Like

Thanks @Null for sharing all your expertise. I have the build syncing now but I notice manifest.xml is adding project name "MindTheGapps/vendor_gapps" … coming from local_manifests_treble. I edited it out … I would guess this might prevent /e/ booting (??)

No, since the build is flagged with 'v, it produces a vanilla build.

The thing which prevented it from booting as a GSI on the initial build was the fact that it didn’t know how to utilize the stock vendor files, evidenced by the fact that it was trying to register sensors twice (in my opinion).

With the applied Lineage 21 patches, it should not do this but it seems some source in Lineage has changed, I am presently building it and am at 50% with no issues, but if any issues occur I will resolve them.

Similarly, if you encounter any issues building this let me know and I will do my best to resolve them.

If your device has Lineage already, and you just want to use an updated /e/OS patching anything is not required, a ‘generic lineage image’ will work with the lineage vendor files and boot.img.

The patches I posted are only for the bring-up of this ROM on devices that do not have lineage

2 Likes

Ok, I received the following errors at 75% completed:

device/lineage/gsi/audio/hal/Stream.cpp:117:50: error: 'string' is a private member of 'android::String8'
  117 |             samplingRatesFromString(halListValue.string(), AudioParameter::valueListSeparator);
      |                                                  ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/Stream.cpp:143:49: error: 'string' is a private member of 'android::String8'
  143 |             channelMasksFromString(halListValue.string(), AudioParameter::valueListSeparator);
      |                                                 ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/Stream.cpp:185:53: error: 'string' is a private member of 'android::String8'
  185 |         halFormats = formatsFromString(halListValue.string(), AudioParameter::valueListSeparator);
      |                                                     ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;

device/lineage/gsi/audio/hal/ParametersUtil.cpp:100:32: error: 'string' is a private member of 'android::String8'
  100 |         result[i].key = halKey.string();
      |                                ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:101:36: error: 'string' is a private member of 'android::String8'
  101 |         result[i].value = halValue.string();
      |                                    ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:108:60: error: 'string' is a private member of 'android::String8'
  108 |     char* halValues = halGetParameters(keys.keysToString().string());
      |                                                            ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:166:55: error: 'string' is a private member of 'android::String8'
  166 |     int halStatus = halSetParameters(param.toString().string());
      |                                                       ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
device/lineage/gsi/audio/hal/ParametersUtil.cpp:100:32: error: 'string' is a private member of 'android::String8'
  100 |         result[i].key = halKey.string();
      |                                ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:101:36: error: 'string' is a private member of 'android::String8'
  101 |         result[i].value = halValue.string();
      |                                    ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:108:60: error: 'string' is a private member of 'android::String8'
  108 |     char* halValues = halGetParameters(keys.keysToString().string());
      |                                                            ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;
      |                                 ^
device/lineage/gsi/audio/hal/ParametersUtil.cpp:166:55: error: 'string' is a private member of 'android::String8'
  166 |     int halStatus = halSetParameters(param.toString().string());
      |                                                       ^
system/core/libutils/include/utils/String8.h:157:33: note: declared private here
  157 |     inline  const char*         string() const;

Ok, so all instances of string() in these files needs to be changed to c_str().

Example: In ParametersUtil.cpp


Result ParametersUtil::setParams(const AudioParameter& param) {
    int halStatus = halSetParameters(param.toString().string());
    return util::analyzeStatus(halStatus);
}

Should be changed to

Result ParametersUtil::setParams(const AudioParameter& param) {
    int halStatus = halSetParameters(param.toString().c_str());
    return util::analyzeStatus(halStatus);
}

I guess the latest revision of String8 is not the same as prior versions

The files that need to be changed are


device/lineage/gsi/audio/hal/ParametersUtil.cpp

device/lineage/gsi/audio/hal/Stream.cpp

With these changes, I was able to continue the build, so we’ll see what errors it throws next

Lineage21/build/tools

revert buildinfo.sh to stock buildinfo.sh

Then go to vendor/lineage/build/core

and revert main_version.mk to stock.

Not doing this will cause a HARD CRASH at 99% and the system image won’t be able to be built, and you will need to have to issue make clean before rebuilding after changes are made. :frowning:

error: found duplicate sysprop assignments:
ro.lineage.version=LineageOS 21 Self-built CGMod
ro.lineage.version=2.7-u-20250106-UNOFFICIAL-gsi_arm64_vN
error: found duplicate sysprop assignments:
ro.lineage.display.version=LineageOS 21 Self-built CGMod
ro.lineage.display.version=2.7-u-20250106-UNOFFICIAL-gsi_arm64_vN
error: found duplicate sysprop assignments:
ro.modversion=LineageOS 21 Self-built CGMod
ro.modversion=2.7-u-20250106-UNOFFICIAL-gsi_arm64_vN
01:19:36 ninja failed with: exit status 1

Oh yeah, and when you build use brunch, do not use make systemimage

//frameworks/base/api:api-stubs-docs-non-updatable metalava merged [common]

On systems with weak HW, this may hang and cause a heap crash but it will not affect the System.img created.

In this case, the system.img will be found inside the following directory:

/Lineage21/out/target/product/lineage_gsi_arm64/obj/PACKAGING/systemimage_intermediates

In

frameworks/base/data/etc/privapp-permissions-platform.xml

add the following:

<privapp-permissions package="me.phh.treble.app">
    <permission name="android.permission.INSTALL_PACKAGES" />
    <permission name="android.permission.INTERACT_ACROSS_USERS" />
</privapp-permissions>

If you do not want to use the Trebleapp, just remove it from:

Lineage21/vendor/hardware_overlay

If Trebleapp is not addressed, it will throw a permission error no matter what, I’m going to try removing Trebleapp before adding permissions for it; if that fails then i will retry with enabled permissions but I’m on a device that Trebleapp will not be effective for, so whether it is removed or not is up to the individual.