Need help to update working build for Samsung Galaxy S2 i9100

Hi folks,

I would like to update the unofficial but working builds for the Samsung Galaxy S2 I9100 provided on this page, last build being from December 2020. (Sorry for the links formats, it seems the forum is VERY suspicious with links for new users like me)

  • I have set up docker and proper directories as explained in the documentation [1] in steps 1 to 3
  • I tried to extract the proprietary blobs from the .zip archive following these instructions [2] but:
    • the ./extract-files.sh I downloaded from Rinando repo [3] absolutely wanted to extract blobs from my phone instead
    • begins properly but fails on last line, I suspect I would need to clone some repository but don’t know what
    • in the end I ended up reading the docker image documentation and it seems that extracting those blobs is unnecessary [4] thanks to TheMuppets repository
  • Following examples [5] on the docker image documentation, I downloaded what I suppose to be the proper manifest.xml [6]
  • Then I tried to run the docker build:
docker run \
-v "/srv/e-os-i9100/src/:/srv/src" \
-v "/srv/e-os-i9100/zips:/srv/zips" \
-v "/srv/e-os-i9100/logs:/srv/logs" \
-v "/srv/e-os-i9100/ccache:/srv/ccache" \
-v "/srv/e-os-i9100/manifests:/srv/local_manifests" \
-e "BRANCH_NAME=v0.18.2-pie" \
-e "DEVICE_LIST=GT-I9100" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

It run a few seconds and then fails with:

Branch name v0.18.2-pie is a tag on e/os/releases, prefix with refs/tags/ for 'repo init'
>> [Fri Sep 10 06:43:53 UTC 2021] Copying '/srv/local_manifests/*.xml' to '.repo/local_manifests/'
>> [Fri Sep 10 06:43:54 UTC 2021] Syncing branch repository
>> [Fri Sep 10 06:43:54 UTC 2021] Missing "vendor/lineage", aborting

In /srv/logs/repo-20210910.log, I have:

>> [Fri Sep 10 06:43:49 UTC 2021] (Re)initializing branch repository
Traceback (most recent call last):
  File "/srv/src/PIE/.repo/repo/main.py", line 651, in <module>
    _Main(sys.argv[1:])
  File "/srv/src/PIE/.repo/repo/main.py", line 627, in _Main
    result = run()
  File "/srv/src/PIE/.repo/repo/main.py", line 620, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/srv/src/PIE/.repo/repo/main.py", line 286, in _Run
    result = cmd.Execute(copts, cargs)
  File "/srv/src/PIE/.repo/repo/subcmds/init.py", line 470, in Execute
    self._SyncManifest(opt)
  File "/srv/src/PIE/.repo/repo/subcmds/init.py", line 269, in _SyncManifest
    m.MetaBranchSwitch(submodules=opt.submodules)
  File "/srv/src/PIE/.repo/repo/project.py", line 3278, in MetaBranchSwitch
    self.Sync_LocalHalf(syncbuf, submodules=submodules)
  File "/srv/src/PIE/.repo/repo/project.py", line 1302, in Sync_LocalHalf
    lost = self._revlist(not_rev(revid), HEAD)
  File "/srv/src/PIE/.repo/repo/project.py", line 2843, in _revlist
    return self.work_git.rev_list(*a, **kw)
  File "/srv/src/PIE/.repo/repo/project.py", line 3056, in rev_list
    raise GitError('%s rev-list %s: %s' %
error.GitError: manifests rev-list ('^160e5fb50c357a2762ba17494d3f2a783af8a173', 'HEAD', '--'): fatal: bad revision 'HEAD'

>> [Fri Sep 10 06:43:54 UTC 2021] Syncing branch repository
Traceback (most recent call last):
  File "/srv/src/PIE/.repo/repo/main.py", line 651, in <module>
    _Main(sys.argv[1:])
  File "/srv/src/PIE/.repo/repo/main.py", line 627, in _Main
    result = run()
  File "/srv/src/PIE/.repo/repo/main.py", line 620, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/srv/src/PIE/.repo/repo/main.py", line 286, in _Run
    result = cmd.Execute(copts, cargs)
  File "/srv/src/PIE/.repo/repo/subcmds/sync.py", line 969, in Execute
    self._UpdateManifestProject(opt, mp, manifest_name)
  File "/srv/src/PIE/.repo/repo/subcmds/sync.py", line 890, in _UpdateManifestProject
    if mp.HasChanges:
  File "/srv/src/PIE/.repo/repo/project.py", line 3312, in HasChanges
    elif self._revlist(not_rev(HEAD), revid):
  File "/srv/src/PIE/.repo/repo/project.py", line 2843, in _revlist
    return self.work_git.rev_list(*a, **kw)
  File "/srv/src/PIE/.repo/repo/project.py", line 3056, in rev_list
    raise GitError('%s rev-list %s: %s' %
error.GitError: manifests rev-list ('^HEAD', '160e5fb50c357a2762ba17494d3f2a783af8a173', '--'): fatal: bad revision '^HEAD'

I searched on the net for this error but could not find anything relevant. I have no clue of what I should try here, so any help would be greatly appreciated.

Regards,
Yvan

  1. UsualWebProtocol://doc.e.foundation/how-tos/build-e
  2. UsualWebProtocol://doc.e.foundation/how-tos/extracting-proprietary-blobs#extracting-proprietary-blobs-from-block-based-otas
  3. UsualWebProtocol://github.com/rINanDO/android_device_samsung_i9100/blob/lineage-16.0/extract-files.sh
  4. UsualWebProtocol://gitlab.e.foundation/e/os/docker-lineage-cicd#proprietary-files
  5. UsualWebProtocol://gitlab.e.foundation/e/os/docker-lineage-cicd#build-for-a6000-not-officially-supported-custom-keys-restricted-signature-spoofing-with-integrated-microg-and-fdroid
  6. UsualWebProtocol://github.com/linusdan/lineage_manifests/blob/lineage-16.0/roomservice.xml

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

1 Like

Have you make a build for an officially supported device fist ?
In order to test your build environment ?

Hi,

Would you please share your custom manifest(s) ?

Thanks for your answers.

@piero: No I have never built /e/, I thought using the docker image was sufficient to have a clean build environment. I will test this.
@smu44: Because of the indications from the first post of the thread providing the builds, I downloaded the manifest from https://github.com/linusdan/lineage_manifests/blob/lineage-16.0/roomservice.xml. I absolutely don’t know if it is appropriate or sufficient.

You could try to add
<project name="LineageOS/android_vendor_lineage" path="vendor/lineage" remote="github" revision="lineage-16.0" />
in top of projects (after the “remove”) …

But to be honest, I don’t think this will be enough for you build to success.

As stated here, they are preliminary steps, which compatibility with /e/ Docker build system is unknown to me …

If you want to stick to Docker, you may try to run commands 3-6 of this README directly in your /srv/e-os-i9100/src/Pie directory, before launching Docker command (not sure about the “Pie”, is it “P” ?).
You may miss repo and git commands, and have to install them (they are included in Docker image, so normally you don’t need them in your “host” OS).

As an alternative, you may give up with the Docker method, and read this : [HOWTO] Build /e/ without docker for non LineageOS supported devices

Kinda difficult for a first build !

It could be linked to the “custom pit” used for this build
( “out of /system space error” workaround OR “out of /system space error” fix ? )

You may have to build other way
Is someone remember what method @Chimpthepimp was used to use ?

Thanks @smu44 and @piero for you comments, I need to take time to read this with attention. Indeed, it does not seem to be the easiest build :slight_smile:

For reference, and as @piero asked, I tried to build for another random but supported device (Galaxy S3), almost with the same command (just changing device name and /e/ version accordingly):

docker run \
-v "/srv/src/:/srv/src" \
-v "/srv/zips:/srv/zips" \
-v "/srv/logs:/srv/logs" \
-v "/srv/ccache:/srv/ccache" \
-v "/srv/manifests:/srv/local_manifests" \
-e "BRANCH_NAME=v0.18.1-nougat" \
-e "DEVICE_LIST=i9300" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

It is currently downloading the sources, which is beyond what I got with the i9100.

1 Like

About i9100, Chimpthepimp say :

I can t remember the directory but somewehere in the sources are patches that have to be applied between sync and build… I can have a look for it in a week or so

Thanks for your help. However this is still really hard for me to understand all of this. I have not abandoned yet :slight_smile: but don’t know if I will ever be able to build this.

Hi @yvanm, I am sorry for my poor wording in this post particularly as I (and others) are struggling with Docker at the moment! :slightly_frowning_face:

My suggestion was meant to carry the meaning that you could try to build a LineageOS ROM as per those instructions.

(You have dived in the deep end where I cannot assist. I hope your supported device, Galaxy S3, build works out, that’s best way to learn.)

However if you do manage the Lineage build (as it is a supported device there) you will gain experience and have some useful pieces to bring forward to your next /e/ build.

Bon chance

2 Likes

There is really no need to apologize @aibd! But I really appreciate your kindness. Also, I think you are right to point me to the LineageOS build as it looks like the best starting point for this particular device.

2 Likes

Ifound that @linusdan have worked on /e/gitlab

i9100.xml · 0812fa50d17d8f826213aa5c279756791113bde9 · Danilo Santos / local_manifests · GitLab

V1 pie: Add Galaxy SII (i9100) (!50) · Merge requests · e / os / local_manifests · GitLab

@piero Thanks for all the information you gave in various threads, hopefully I will manage do make build with it!

YES, you already have tried this :
e-0.14-p-20201217-UNOFFICIAL-i9100.zip

1 Like

Yes @piero, I am currently running this build by @itsclarence. I still want to build 0.18 with Pie, but can’t tell if I will be able to do it.

Hi @yvanm it is a big jump to go straight to building /e for an unsupported device.

but can’t tell if I will be able to do it.

… were you able to get a successful /e/ build for a “random device” (to prove you have a suitable environment!) and how much luck did you have building a “known working” LineageOS build?

Wishing you the best of luck. :slight_smile:

1 Like

Hi @aibd,

I indeed realize it is a big jump :wink:. I have not yet been able to build /e/ nor LineageOS, mostly because a lack of time (had to stop the process because downloading is really long for me and I also need my laptop for work). For those builds instructions are quite clear so I am optimistic. I can’t tell when I will have time to dig into this.

Regards,
Yvan

You should try building in the cloud: you can get access to very powerful machines with loads of bandwidth, for very little cost. Several posts in the forum about how to go about it and how to get free access to cloud resources, and in this post in my personal wiki
https://git.coop/phone-custom-roms/backlog/-/wikis/Building-`e`-ROMs

3 Likes

This is a working roomservice.xml for i9100 R, the problem with it is that with R the buildprocess for kernel and Ramdisk, as the i9100 doesnt have a dedicated partition for it we have to integrate it in zImage so we have to build that first,
make ramdisk && make bootimage
is supposed to do that before building for us…

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <!-- Device -->
  <project name="rINanDO/android_device_samsung_i9100" path="device/samsung/i9100" remote="github" revision="lineage-18.1" />
  <project name="rINanDO/android_device_samsung_galaxys2-common" path="device/samsung/galaxys2-common" remote="github" revision="lineage-18.1" />

  <!-- Kernel -->
  <project name="rINanDO/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="lineage-18.1" />

  <!-- Vendor -->
  <project name="linusdan/vendor_samsung" path="vendor/samsung" remote="github" revision="11" />

  <!-- Extras -->
  <project name="rINanDO/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lineage-18.1" />  
        
</manifest>
2 Likes