• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

Need help building a SM-T355 (gt58lte) LineageOS ROM

Search This thread

Rahul.raj

Senior Member
Dec 30, 2010
55
8
recovery.img zipped. Remember, it's untested and you have to know what you are doing.
Hi,

I have an SM-T355Y (gt58ltedo) Tab and I was keen to get this compiled as well.

I tested the recovery you sent. It does boot properly. There is some issue in the zip path due to which it does not extract/ install directly, but when I navigated through the structure and took out the recovery.img, it flashed fine with TWRP and I was able to then reboot to recovery using this.

Hope that helps.

Waiting with baited breath for a LineageOS for my Tab. ♥
 
  • Like
Reactions: user655362020

Rahul.raj

Senior Member
Dec 30, 2010
55
8
An update - the adb does not work properly in this recovery.

It gives an option under 'Advanced' to switch on ADB, but on the PC, it keeps showing as offline.

The same was working fine on the TWRP v3.1.1 and v3.1.0 recoveries I was using. Have shifted back to that recovery as I needed the ADB link to upload files to the tab.
 

user655362020

Member
Sep 5, 2020
16
0
So I cloned my 17.1 gt58wifi mechnical hard drive (250GB) to another drive using dd. Then, I took your roomservice.xml, did a repo sync to your directories as per roomservice and compiled the rom.
Thanks for doing this. It helped me pinpoint that the issue is missing dependencies on os and not manifest error. I installed lubuntu and the build succeed. I also switched to lineage-18.1 from 17.1. Right now the device boots to lineageos logo and then restarts. I attached a logcat with this post (cat logcat.1.log prints it in console with colours). Could you give me some pointers (apart from missing files) to fix bootloop ? I also noticed that your repositories enforce SELinux. Is there a easy way to disable it ?
If recovery.img fails, you can always reflash it with TWRP if that's what you are presently running. If you don't know how to flash recovery and
get into download mode, please do some research. It's not difficult, but first time people will panic and then possibly make a huge mistake possibly creating a bricked device.
I am using TWRP from ashyx. The device model is not set in it so I have to patch the zip created by android build system and remove device verification. Do you by any chance have a manifest for building twrp ?
=== dm-verity ===

You shouldn't have to enable it. It's disabled in kernel as per
I wondered about that. Official docs say dm_verity is required to enable apex image integrity verification. Plus all the other things required by apex image is enabled/set in config. Does it slow our device if dm_verity is not enabled (by falling back to other verification methods) ?

== Logcat ==
Code:
02-16 05:06:57.943   366   366 E [email protected]: Failed to lookup symbol createDrmFactory in library /vendor/lib/mediadrm/libprmediadrmdecrypt.so: dlopen failed: library "libdiag.so" not found: needed by /system/vendor/lib/libdrmfs.so in namespace (default)
Code:
02-16 05:06:58.004   392   392 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/rmt_storage": library "libqmi_csi.so" not found: needed by main executable

But the libraries are being copied according to makefile.
 
Last edited:

retiredtab

Senior Member
Nov 16, 2017
829
405
It helped me pinpoint that the issue is missing dependencies on os and not manifest error.
I'm sure lots of people use something other than Ubuntu flavours to build LineageOS. You just have to find the correct libraries/dependencies for your distro.
Right now the device boots to lineageos logo and then restarts. I attached a logcat with this post (cat logcat.1.log prints it in console with colours).
Any .txt or .log files that are in plain ascii for some reason NEVER show up as an attachment in xda. Resend the file ZIPPED. That's why I zipped the recovery.img file above. It's zipped so that it shows up on xda, not zipped to be installed by TWRP as a zip file.
I also noticed that your repositories enforce SELinux. Is there a easy way to disable it ?
Revert this commit

https://github.com/retiredtab/andro...mmit/775ca9d472eb1013214f4f91be86b056f4ff1443

and recompile. If your policies aren't written correctly, your device will never boot properly or function properly.

In 17.1, I had no sepolicy and decided to try learning about in 18.1.
I am using TWRP from ashyx. The device model is not set in it so I have to patch the zip created by android build system and remove device verification. Do you by any chance have a manifest for building twrp ?
No and neither does ashyx when I look at

https://github.com/ashyx?tab=repositories

I suggest you build TWRP using

https://github.com/SebaUbuntu/TWRP-device-tree-generator

So use the existing ashyx TWRP recovery as the file to feed into Seba's generator OR you can use the recovery.img that LineageOS builds.

It's what I use and it works if you use it with TWRP 7.1. I built SM-T710, SM-P550 and SM-T560NU TWRP using this procedure and all work fine.

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-7.1

It only takes about 10 minutes to build on my slow machine (about 8,000 files to compile). TWRP 7.1 will likely generate an image size smaller than 16MB. I had problems with TWRP 9.0 and 10.0 building images > 16MB which won't fit on the recovery partition.
Official docs say dm_verity is required to enable apex image integrity verification. Plus all the other things required by apex image is enabled/set in config. Does it slow our device if dm_verity is not enabled (by falling back to other verification methods) ?
Unless you are building an "official" rom, there's not need to worry about it. All my 17.1 and 18.1 builds for SM-T350, SM-T550, SM-P550 and SM-T560NU work fine without dm-verity for 1+ years (for 17.1 builds). My 18.1 builds were used by me first in March 2021, then released to xda in July 2021.
 
Last edited:

retiredtab

Senior Member
Nov 16, 2017
829
405
== Logcat ==
Code:
02-16 05:06:57.943   366   366 E [email protected]: Failed to lookup symbol createDrmFactory in library /vendor/lib/mediadrm/libprmediadrmdecrypt.so: dlopen failed: library "libdiag.so" not found: needed by /system/vendor/lib/libdrmfs.so in namespace (default)
Code:
02-16 05:06:58.004   392   392 F linker  : CANNOT LINK EXECUTABLE "/vendor/bin/rmt_storage": library "libqmi_csi.so" not found: needed by main executable

But the libraries are being copied according to makefile.
Go to your out directory and search for both those files that are reported missing.

I see the code copying them

https://github.com/user20482020/and...lte/blob/lineage-18.1/gt58ltedo-vendor.mk#L59

and

https://github.com/user20482020/and...lte/blob/lineage-18.1/gt58ltedo-vendor.mk#L96

but you should actually double check they got copied.

If both are there, then it's possible that libprmediadrmdecrypt.so/libdrmfs.so and rmt_storage are looking for their respective files in /system/lib and not /vendor/lib. You can check by using a hexeditor and looking at libprmediadrmdecrypt.so and rmt_storage for the libraries OR you can change $(TARGET_COPY_OUT_VENDOR) to $(TARGET_COPY_OUT_SYSTEM) for the 2 lines above.
 
Last edited:

retiredtab

Senior Member
Nov 16, 2017
829
405
If you are going to build 18.1, you should update all your github repos to default to branch lineage-18.1. That way, when I go there, I don't have to choose it all the time. That's why I had to edit post #27 and #28 because I was looking at the older revisions and not the latest. Still your problem lies in that make file.
 

user655362020

Member
Sep 5, 2020
16
0
I suggest you build TWRP using

https://github.com/SebaUbuntu/TWRP-device-tree-generator

So use the existing ashyx TWRP recovery as the file to feed into Seba's generator OR you can use the recovery.img that LineageOS builds.

It's what I use and it works if you use it with TWRP 7.1. I built SM-T710, SM-P550 and SM-T560NU TWRP using this procedure and all work fine.
Thanks.

Unless you are building an "official" rom, there's not need to worry about it. All my 17.1 and 18.1 builds for SM-T350, SM-T550, SM-P550 and SM-T560NU work fine without dm-verity for 1+ years (for 17.1 builds). My 18.1 builds were used by me first in March 2021, then released to xda in July 2021.
Ok
Your logcat shows a bunch of missing files. Your problem lies inside this make file. See if you can spot the problem?

https://github.com/user20482020/android_device_samsung_gt58ltedo/blob/los-18.1/lineage_gt58wifi.mk
I have updated the github repositories to point to correct branches. The makefile you linked above refers to old repository and I was using lineage-17.1-gt58lte branch. I have updated manifest and first post to point to correct branches and repositories. I am terribly sorry about the branches and repositories.

I built the rom and booted into the OS.

Wifi works.
Bluetooth works (File transfer, don't have hardware to test bluetooth audio)
Audio Works through speakers and headphones but logcat has a lot of errors.
Camera does not work.
GPS gets fix after 3-4 minutes (satellite only).

Somehow I managed to make UI very large (google keyboard now takes half the screen). Before the latest build the notification panel was small and appeared only where I swiped (in small width). Now it takes entire screen width. I think the changes I made were : https://github.com/user20482020/dev...4a557825aee073e20b0112ab76f4ca8e4bc4eL98-R105

How can I bring back telephony packages (phone,sms,etc) ?

Do you have this too ?
Code:
02-17 05:26:17.762   378   378 E [email protected]: Failed to lookup symbol createDrmFactory in library /vendor/lib/mediadrm/libprmediadrmdecrypt.so: undefined symbol: createDrmFactory

Could you look at the recent commits (mainly in device tree repo and msm8916) and offer some pointers ? I have also attached logcat.
 

Attachments

  • logcat.2.zip
    296.1 KB · Views: 2

retiredtab

Senior Member
Nov 16, 2017
829
405
Bluetooth works (File transfer, don't have hardware to test bluetooth audio)
For future logcats, I don't need them in color. I can read them using gedit and it knows how to interpret the various messages into color. It's a lot easier for me to view and search logcats in gedit. Thanks.

Actually, your logcat shows bluetooth crashing hard so it's not going to be stable. Anytime you see those messages, they have to be fixed otherwise your system won't be stable.

If you have a bluetooth adapter for your PC, this is what I do.

https://ostechnix.com/turn-your-lin...tooth on your,Bluetooth devices and list them.


Camera does not work.
Try using opencamera. I couldn't get stock camera to work in 18.1 for some things and gave up because opencamera works. Evervolv 11 has stock camera working and I tried using his repos, but that breaks a lot of other things for my other devices.
GPS gets fix after 3-4 minutes (satellite only).
Did you go by a window to do the test?
Somehow I managed to make UI very large (google keyboard now takes half the screen). Before the latest build the notification panel was small and appeared only where I swiped (in small width). Now it takes entire screen width. I think the changes I made were : https://github.com/user20482020/dev...4a557825aee073e20b0112ab76f4ca8e4bc4eL98-R105
When testing new roms, it's probably best to do a complete data wipe or factory reset to get rid of any old settings that may be causing the above.
How can I bring back telephony packages (phone,sms,etc) ?
I think you have to change


to something that is suitable in the vendor/lineage/config directory. Perhaps common_full_phone.mk? I don't know for sure. I don't have any RIL devices.
Do you have this too ?
Code:
02-17 05:26:17.762   378   378 E [email protected]: Failed to lookup symbol createDrmFactory in library /vendor/lib/mediadrm/libprmediadrmdecrypt.so: undefined symbol: createDrmFactory
Yes, getting DRM to work is problematic. I suggest you load devcheck by flar2 and scroll to the system tab to check the DRM settings. At best, you will only get L3. You will probably need to implement something like

https://review.lineageos.org/q/_ZN6google8protobuf8internal13empty_string_E

At one point, I thought I had it working using the above, but something could have broken? DRM is needed for $treaming services.
Could you look at the recent commits (mainly in device tree repo and msm8916) and offer some pointers ? I have also attached logcat.
For bluetooth, because your device is different from T350, I suggest you work on that first. There's only so many combinations that you can try to find out what works.

https://github.com/user20482020/and...916-common/blob/lineage-18.1/manifest.xml#L23

https://github.com/user20482020/and...6-common/blob/lineage-18.1/msm8916.mk#L76-L78

For manifest.xml you can try changing
Code:
 <transport>hwbinder</transport>

to
Code:
<transport arch="32">passthrough</transport>

and see if you stil get crashes. You can also try removing either [email protected] or [email protected] You will probably have to do a

Code:
make installclean

to clear out all the old bluetooth files if you are going to try the above. This process will be iterative. I don't know what combination will work. It's something I have been through several times and you need persistance to figure it out.
 

Rahul.raj

Senior Member
Dec 30, 2010
55
8

Do you need any help in testing your build?

Aside:
Has anyone tested flashing a gt58wifi LineageOS build on a gt58lte/do?

I do not need Cellular service on my Tab and if wifi, bluetooth and speakers work, then it could be enough for me.
I am sure, many other would feel the same.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    recovery.img zipped. Remember, it's untested and you have to know what you are doing.
    Hi,

    I have an SM-T355Y (gt58ltedo) Tab and I was keen to get this compiled as well.

    I tested the recovery you sent. It does boot properly. There is some issue in the zip path due to which it does not extract/ install directly, but when I navigated through the structure and took out the recovery.img, it flashed fine with TWRP and I was able to then reboot to recovery using this.

    Hope that helps.

    Waiting with baited breath for a LineageOS for my Tab. ♥