Build for Samsung Galaxy S4 (SGH- i337M / jfltecan)

Earlier I reported that the /e/ jfltexx build on my Samsung Galaxy S4 (SGH-i337m / jfltecan) worked well with the exception that it was unable to connect to the mobile network. After replacing the SIM card reader and trying to flash a different modem, I almost bricked it. Fortunately, I was finally able to restore a “stock” ROM that recognized the SIM card and allowed text messaging and calls.

As a newbie, I’ve been thrashing around a bit with various versions of TWRP and researching on XDA Developers to see what other ROMs might be working on the jtflecan. Yesterday, I had a breakthrough of sorts in that I was able to get an Oreo image installed and working from the LineageOS project [JDCTeam] Optimized LineageOS 14.1 Version12. I also broke down and installed a mini version of Open Gapps just because it is a real pain to get the apps I want other than through the Play Store. F-Droid is okay but why don’t they have the open source password manager Bitwarden? Looking forward to the /e/ Store ! :wink:

I have now installed Docker on my Linux desktop and will see if I can build /e/ specifically for the jfltecan. I have never built a ROM before so it may take a while. If anyone has any hints or pointers on what to look out for in the build process, I’d much appreciate it. I will likely be back with more specific questions after I get into it.

Regards,

David

All the best @dpb just follow the instructions given here https://gitlab.e.foundation/e/wiki/en/wikis/build and you should be good.

Thanks @Manoj ! Running it now. “Syncing branch repository” has been running for 45 minutes but I see lots of activity in the process monitor so it seems to be doing its thing. Is this a “normal” length of time?

Yes. This can take 5-6 hours if not more. You can see what is happening in the log files inside the log folder

Thanks again @Manoj ! After an hour, I received an error message. Here is the the output from my session:

david@XPS-Bar-D ~ $ sudo docker run
-v “/srv/e/src:/srv/src:delegated”
-v “/srv/e/zips:/srv/zips:delegated”
-v “/srv/e/logs:/srv/logs:delegated”
-v “/srv/e/ccache:/srv/ccache:delegated”
-e “BRANCH_NAME=v1-nougat”
-e “DEVICE_LIST=”
-e “CUSTOM_PACKAGES=‘MuPDF Notes Tasks GmsCore GsfProxy FakeStore Telegram Signal AnySoftKeyboard Mail BlissLauncher BlissIconPack MozillaNlpBackend OpenWeatherMapWeatherProvider AccountManager MagicEarth OpenCamera eDrive Weather NominatimNlpBackend Light’”
-e “SIGNATURE_SPOOFING=restricted”
-e “OTA_URL=https://ota.ecloud.global/api
-e “REPO=https://gitlab.e.foundation/e/os/android.git
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest
[sudo] password for david:
Set cache size limit to 50.0 GB

[Thu Feb 7 16:09:18 UTC 2019] Branch: v1-nougat
[Thu Feb 7 16:09:18 UTC 2019] Devices: ,
[Thu Feb 7 16:09:18 UTC 2019] (Re)initializing branch repository
[Thu Feb 7 16:09:24 UTC 2019] Copying ‘/srv/local_manifests/*.xml’ to ‘.repo/local_manifests/’
[Thu Feb 7 16:09:24 UTC 2019] Use branch cm-14.1 on github.com/TheMuppets
[Thu Feb 7 16:09:24 UTC 2019] Syncing branch repository
sed: can’t read build/core/version_defaults.mk: No such file or directory
sed: can’t read build/core/version_defaults.mk: No such file or directory
/root/build.sh: line 139: [: : integer expression expected
[Thu Feb 7 17:14:08 UTC 2019] Missing “vendor/cm”, aborting

I don’t know if it’s related but, during the build process, I started to receive messages that my root partition was running out of room. I noticed that the Nougat source files were over 12 GB.

It looks like I might have to repartition my system which in my case probably means re-installing Linux as I did not use LVM (see Gparted output below).

Comments and suggestions welcome!

David

You don’t need to reinstall Linux, since you have enough free space on /home/

Create directories /home/e/src/, /home/e/zips, /home/e/logs and /home/e/ccache
and change the build command to:

sudo docker run
-v “/home/e/src:/srv/src:delegated”
-v “/home/e/zips:/srv/zips:delegated”
-v “/home/e/logs:/srv/logs:delegated”
-v “/home/e/ccache:/srv/ccache:delegated”
...

That way you can tell docker to use /home/e/ instead of /src/e/

Of course! If brains were dynamite, I’d have trouble blowing my nose! :thinking:

I wondered if it might be possible to re-direct Docker to the home directory but thought it might be “hard wired” to use the root directories. Thanks @Markus for your reply and making it so clear.

Regards,

David

Hi @dpb , your build command is missing the DEVICE_NAME
You have to specify the name code name of the device you want to build for.
for e.g.

-e “DEVICE_LIST=tissot”
or
-e “DEVICE_LIST=FP2” \

Also as @Markus mentioned you can use your home directory. For e.g. i build there with this command

docker run \
-v “/home/manoj/e/src:/srv/src:delegated” \
-v “/home/manoj/e/zips:/srv/zips:delegated” \
-v “/home/manoj/e/logs:/srv/logs:delegated” \
-v “/home/manoj/e/ccache:/srv/ccache:delegated” \
-e “BRANCH_NAME=v1-oreo” \
-e “DEVICE_LIST=tissot” \
-e “CCACHE_SIZE=100G” \
-e “CUSTOM_PACKAGES=‘Light MuPDF Notes Tasks GmsCore GsfProxy FakeStore Telegram Signal AnySoftKeyboard Mail BlissLauncher BlissIconPack MozillaNlpBackend OpenWeatherMapWeatherProvider AccountManager MagicEarth OpenCamera eDrive Weather NominatimNlpBackend’” \
-e “SIGNATURE_SPOOFING=restricted” \
-e “OTA_URL=https://ota.ecloud.global/api” \
-e “REPO=https://gitlab.e.foundation/e/os/android.git” \
registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest

Eh bien! That would have been pretty bad. Problem seems to be that I pasted an un-escaped “<” in the console listing which removed the “jfltecan” from the blockquote.

Have confirmed that it was included in my initial run and again now in my current attempt with…

“DEVICE_LIST=<jfltecan>”

properly specified and target directory in my home partition… fingers crossed.

Merci @Manoj !

David

The device name need not have the > signs. Not sure it will parse the > < signs- never tried it. It can be just
-e “DEVICE_LIST=jfltecan” \

Thanks @Manoj that makes sense. In the build guide the angle brackets around <device_name> are meant to indicate “substitute in your device name here”. So far the process seems to have forgiven the brackets and be handling the build correctly. Certainly on my next attempt (if needed) , I will omit the angle brackets. Thanks again.

David

Good catch @Manoj . The build generated error…

Device <jfltecan> not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS)

Re-trying with correct device name. We’ll see how it went in the morning (my time).

David (@dpb)

2019-02-08 13:26 UTC
As I had begun to suspect, the LineageOS “Muppet” repository does not have a branch for the jfltecan (Log details here).

I am not sure what approach to take now. My first thought is to see if I can figure out how to build /e/ using the LineageOS variant that I already have running on my phone [JDCTeam][7.1.2][21 Jan 2019][EOL]Optimized LineageOS 14.1-Version12 (http://bit.ly/2SvcjHS). I expect that would require modifying the /e/ build script to use the JDCTeam repository but I have no idea yet what that would entail. This is a very active project and they also have builds for both Oreo and Pie (which I haven’t yet been able to get working on my device.)

I will do more research and report back. Any comments or suggestions welcome.

@dpb

2019-02-09 14:56 UTC

Just a footnote to my first build experience. I’ve just discovered that the /src directory for the build ended up at almost 100GB! I had not thought to exclude it from my backup process and wondered why my 10 year old NAS drive started sending messages about running out of space! Might be worth adding a note to the build guide to warn novice users like myself of the scale of the build process.

For anyone else working with the Samsung Galaxy S4 jflte{variants} , I highly recommend the XDA-Developers JDCTeam that is dedicated to this device. They are doing amazing work and now have LineageOS ROMs for Pie running on this vintage 8 year old device! I have no idea how privacy-compliant they are or whether their repositories could be made available as the foundation for custom /e/ builds. The further I have gone in this exercise, the more I have realized the complexity of these devices and the scale and complexity of the software that runs them. As a seventy year old mid-range “pro-sumer” rather than a true techie or developer, I am finding it a bit daunting. After the week I’ve just put in, I’m going to take a break and pay attention other aspects of life. I’ll come back to this later when I have time to give it another shot.

Thanks for listening!

David (@dpb)

Thank you for the suggestion. There is already a note about space requirements on https://gitlab.e.foundation/e/wiki/en/wikis/build

Do you have ideas for improving this?

@Markus I read through that instruction guide several times and specifically remember the paragraph about mixed-case file systems but managed to miss the one about space requirements. That is exactly what I meant and for some reason, even though I double-checked before posting, I somehow missed it again. It seems my old eyes no longer see or perhaps it’s just bad reading habits. Thanks again and sorry for the thrash!

@dpb (David)

After spending the past week getting the XDA JDCTeam Optimized LineageOS 16.0 up and running on two different Samsung Galaxy S4 (SGH-i337M / jfltecan variant) devices, I have come back to /e/ to see whether I could get the current build for the the jfltexx variant to work on these devices. As I mentioned earlier, on my first attempt I ran into a problem with the mobile networking service and was not sure if it was an artifact of the ROM or a faulty SIM / MicroSD card reader. I replaced the suspect card reader and was able to get mobile service working on both devices with the LineageOS 16.0 ROMs, so this evening, I installed the latest build of /e/ (e-0.5-n-201902173314-dev-jfltexx).

I popped in a SIM card and ’ Voilà ! '. All is working including voice, text and data networking over the mobile network. The device now identifies itself as a GT-i9505 / jfltexx but that does not seem to be a problem.

Somewhere in the process, I lost root access to the device. I’ll go over it again when I get a chance to see what I missed. Meanwhile, if there are any jfltecan users out there who would like go give /e/ a whirl. Go for it!

1 Like