Trying to compile LineageOS 18.1 for discontinued SM-T713

Search This thread

thefanum

Senior Member
Dec 27, 2011
246
103
Samsung Galaxy Tab S2
OnePlus 3T
I've been following the instrucsions from here:


To try and compile LOS 18.1, and I am using this manifest:


And i am getting this error. Wondering if anyone has any insight into how to get past this. Thanks in advance:

[100% 182/182] out/soong/.bootstrap/bin/soong_build out/soong/build.
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android
.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile ou
t/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Androi
d.bp
error: hardware/samsung/hidl/power-libperfmgr/Android.bp:22:1: "andr
[email protected]" depends on undefi
ned module "libperfmgr"
Module "[email protected]" is de
fined in namespace "." which can read these 1 namespaces: ["."]
Module "libperfmgr" can be found in these namespaces: ["hardware/goo
gle/pixel"]
17:31:32 soong bootstrap failed with: exit status 1
 

retiredtab

Senior Member
Nov 16, 2017
1,654
1,466
@thefanum,

While it's nice to follow the provided instructions, one of the main problems with them is that they get out of date if not updated periodically.

Specifically these commits made March 14, 2023.

https://review.lineageos.org/q/git-lfs

require that git-lfs be installed on the host computer now otherwise the compiler will stop and webview.apk won't get installed properly in the rom.

So if you are running a Debian style distro, then you need

Bash:
# install git-lfs
sudo apt install git-lfs
# cd into LineageOS code directory
cd ~/18.1
# tell build system we have git-lfs
repo init --git-lfs
# get rid of old webview
rm -rf external/chromium-webview/prebuilt/*
rm -rf .repo/projects/external/chromium-webview/prebuilt/*.git
rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*.git
# sync everything
repo sync --force-sync

Compiling the next version of Android always requires some code changes. That is, using 17.1 code and trying to build 18.1 will never work.

I've already done 99.9% of the work for T713 because the T813 and T713 share the same common code trees. Since there were no code changes from 17.1 to 18.1 for the device specific tree

https://github.com/retiredtab/android_device_samsung_gts210vewifi

and assuming none are needed for the gts28vewifi tree, then you can use the 17.1 existing tree with MY manifest from

https://github.com/retiredtab/LineageOS-build-manifests/tree/main/18.1

That is, your version of my 181-gts210vewifi.xml should look like

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

<!-- Samsung Device Trees -->
  <project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
  <project name="retiredtab/android_device_samsung_gts210vewifi" path="device/samsung/gts210vewifi" remote="github" revision="lineage-18.1" />
  <project name="retiredtab/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-18.1" />

<!-- Samsung MSM8976 Kernel -->
  <project name="syphyr/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-16.0" />

<!-- Vendor Trees (for all devices) -->
  <project name="retiredtab/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-18.1" />

<!-- Samsung Hardware Repo -->
  <project path="hardware/samsung" name="LineageOS/android_hardware_samsung" remote="github" revision="lineage-18.1"/>

<!-- Dependencies -->
  <project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-18.1"/>
  <project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-18.1" />

</manifest>

In theory, this should yield an equivalent 18.1 T713 build with the same functionality as my 18.1 T813 build.

I suggest you follow my 18.1 build specific instructions at

https://github.com/retiredtab/Linea...ob/main/18.1/181-gts210vewifi-build-guide.txt

One person on xda has followed them and created their own 18.1 T813 private builds.

I'll also make 3 suggestions during your build phase.

1. Make an "eng" build so that adb logcat starts right away so you can see log messages on your console. Once everything works, you can then build the "userdebug".

Bash:
# j4 means 4 threads.  If you have 6 core, 12 thread CPU, then change this to 12.
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j4 bacon

2. My publicly released 18.1 T813 is selinux enforcing. There's no guarantee that the rules I wrote will work 100% with the T713 so you should revert/undo this commit

https://github.com/retiredtab/andro...mmit/687691a81e028d002919f9f1d069b5b0c9d72512

so that the build is permissive. Once everything works, then you can enforce the build.

3. You will need at least 16GB DRAM to make this 18.1 64 bit build. The more the better.
 

retiredtab

Senior Member
Nov 16, 2017
1,654
1,466
Code:
[100% 182/182] out/soong/.bootstrap/bin/soong_build out/soong/build.
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android
.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile ou
t/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Androi
d.bp
error: hardware/samsung/hidl/power-libperfmgr/Android.bp:22:1: "andr
[email protected]" depends on undefi
ned module "libperfmgr"
Module "[email protected]" is de
fined in namespace "." which can read these 1 namespaces: ["."]
Module "libperfmgr" can be found in these namespaces: ["hardware/goo
gle/pixel"]
17:31:32 soong bootstrap failed with: exit status 1
The above error is because you are trying to use the 17.1 tree and compiling 18.1 and you are not picking up the 18.1 tree at

https://github.com/LineageOS/android_hardware_samsung/commits/lineage-18.1

If you look at the March 18, 20 and 21, 2021 changes, that's where they added libperfmgr.
 

thefanum

Senior Member
Dec 27, 2011
246
103
Samsung Galaxy Tab S2
OnePlus 3T
@thefanum,

While it's nice to follow the provided instructions, one of the main problems with them is that they get out of date if not updated periodically.

Specifically these commits made March 14, 2023.

https://review.lineageos.org/q/git-lfs

require that git-lfs be installed on the host computer now otherwise the compiler will stop and webview.apk won't get installed properly in the rom.

So if you are running a Debian style distro, then you need

Bash:
# install git-lfs
sudo apt install git-lfs
# cd into LineageOS code directory
cd ~/18.1
# tell build system we have git-lfs
repo init --git-lfs
# get rid of old webview
rm -rf external/chromium-webview/prebuilt/*
rm -rf .repo/projects/external/chromium-webview/prebuilt/*.git
rm -rf .repo/project-objects/LineageOS/android_external_chromium-webview_prebuilt_*.git
# sync everything
repo sync --force-sync

Compiling the next version of Android always requires some code changes. That is, using 17.1 code and trying to build 18.1 will never work.

I've already done 99.9% of the work for T713 because the T813 and T713 share the same common code trees. Since there were no code changes from 17.1 to 18.1 for the device specific tree

https://github.com/retiredtab/android_device_samsung_gts210vewifi

and assuming none are needed for the gts28vewifi tree, then you can use the 17.1 existing tree with MY manifest from

https://github.com/retiredtab/LineageOS-build-manifests/tree/main/18.1

That is, your version of my 181-gts210vewifi.xml should look like

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

<!-- Samsung Device Trees -->
  <project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
  <project name="retiredtab/android_device_samsung_gts210vewifi" path="device/samsung/gts210vewifi" remote="github" revision="lineage-18.1" />
  <project name="retiredtab/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-18.1" />

<!-- Samsung MSM8976 Kernel -->
  <project name="syphyr/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-16.0" />

<!-- Vendor Trees (for all devices) -->
  <project name="retiredtab/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-18.1" />

<!-- Samsung Hardware Repo -->
  <project path="hardware/samsung" name="LineageOS/android_hardware_samsung" remote="github" revision="lineage-18.1"/>

<!-- Dependencies -->
  <project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-18.1"/>
  <project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-18.1" />

</manifest>

In theory, this should yield an equivalent 18.1 T713 build with the same functionality as my 18.1 T813 build.

I suggest you follow my 18.1 build specific instructions at

https://github.com/retiredtab/Linea...ob/main/18.1/181-gts210vewifi-build-guide.txt

One person on xda has followed them and created their own 18.1 T813 private builds.

I'll also make 3 suggestions during your build phase.

1. Make an "eng" build so that adb logcat starts right away so you can see log messages on your console. Once everything works, you can then build the "userdebug".

Bash:
# j4 means 4 threads.  If you have 6 core, 12 thread CPU, then change this to 12.
TARGET_BUILD_TYPE=debug TARGET_BUILD_VARIANT=eng make -j4 bacon

2. My publicly released 18.1 T813 is selinux enforcing. There's no guarantee that the rules I wrote will work 100% with the T713 so you should revert/undo this commit

https://github.com/retiredtab/andro...mmit/687691a81e028d002919f9f1d069b5b0c9d72512

so that the build is permissive. Once everything works, then you can enforce the build.

3. You will need at least 16GB DRAM to make this 18.1 64 bit build. The more the better.


You're the man! Thanks so much for your help here.

I'm on it!
 

ronnz98

Member
Jan 25, 2023
7
5
hello,
Anyone succeed with building T713 for LOS-18.1 and having a working manifest file?
Does the camera work?
 
Last edited:

thefanum

Senior Member
Dec 27, 2011
246
103
Samsung Galaxy Tab S2
OnePlus 3T
hello,
Anyone succeed with building T713 for LOS-18.1 and having a working manifest file?
Does the camera work?

Nope, camera on 18+ is broken. I've got a 20 build up, but Bluetooth and camera are both broken. I have a fix for Bluetooth, but not camera. And have no plans to address it. Sorry.

The unofficial 17.1 builds are fairly functional and have working camera I believe
 

Top Liked Posts