How to build ROMs - Samsung Galaxy Tab A series Questions & Answers

I'm 82yrs old and it may be too late to "teach an old dog new tricks", but I'd like to find a recent tutorial on how to build ROMs. I have a Linux box with 16gb RAM and 400gb disk space on an SSD and Ryzen 3 2200g APU. I built my first computer back in 1978, taught myself several programming languages and was a computer consultant till I retired in 2005. So I'm not a complete novice. I've tried googling for a tutorial but everything I see seems to be outdated, going back to Android 4 or 5 and having 404 links.

@lewmur, Sir, you are not too old to learn! Your computer is more than adequate to build a rom and running linux is key.
I use Lubuntu, but Ubuntu is the generally "recommended" platform to build roms. Other distros like Fedora, Debian, will work, but may require extra libraries or tweaks on your part to get it to work.
The way I learned how to build roms in July/August 2020 was to take a working repo for a device I have and replicate a working rom. After I was successful, then I started on non working roms.
For build instructions, I used
https://wiki.lineageos.org/devices/gtelwifiue/build
Obviously, you will have to change the device name and correct version of LineageOS that you want to build, but the template is current and correct as that's what I follow. Every "official" LineageOS device has a build instruction guide for it.
I also found https://www.youtube.com/c/AlaskaLinuxUserAKLU to have useful information in building roms.

retiredtab said:
@lewmur, Sir, you are not too old to learn! Your computer is more than adequate to build a rom and running linux is key.
I use Lubuntu, but Ubuntu is the generally "recommended" platform to build roms. Other distros like Fedora, Debian, will work, but may require extra libraries or tweaks on your part to get it to work.
The way I learned how to build roms in July/August 2020 was to take a working repo for a device I have and replicate a working rom. After I was successful, then I started on non working roms.
For build instructions, I used
https://wiki.lineageos.org/devices/gtelwifiue/build
Obviously, you will have to change the device name and correct version of LineageOS that you want to build, but the template is current and correct as that's what I follow. Every "official" LineageOS device has a build instruction guide for it.
I also found https://www.youtube.com/c/AlaskaLinuxUserAKLU to have useful information in building roms.
Click to expand...
Click to collapse
Thanks for all the links. My Linux box (my main man) is running Mint 20.2, which is based on Ubuntu, so I guess it should work. But I'd have no problem installing Ubuntu if needed. I have 3 Ryzen boxes, so letting one be "tied up" compiling is no big deal.
I'm currently having a few brews at a local bar, so it will be tomorrow before I can check the links but I'll be back in touch once I do.
Again, thanks

Another way to learn how to build roms is to build TWRP. It's like a small stepping stone towards learning how to build a full rom. Again, take a working TWRP repo and try to replicate a working TWRP for a device you already have.
When you build a full working LineageOS rom, LineageOS builds it's own recovery.img (similar to TWRP), but most people prefer TWRP for its extra features.

As for one last thought on building, do it for 17.1 or 18.1. 19.0 is still a work in progress and it will be frustrating as changes are constantly being made while you are learning. It's better to take 17.1 or 18.1 and start from there.
I haven't built any GSI roms, but if you want to learn that, I suggest doing GSI after you have learned building your own rom first. GSI requires a bit more work especially in older devices that didn't come with a vendor partition.

retiredtab said:
As for one last thought on building, do it for 17.1 or 18.1. 19.0 is still a work in progress and it will be frustrating as changes are constantly being made while you are learning. It's better to take 17.1 or 18.1 and start from there.
I haven't built any GSI roms, but if you want to learn that, I suggest doing GSI after you have learned building your own rom first. GSI requires a bit more work especially in older devices that didn't come with a vendor partition.
Click to expand...
Click to collapse
I've made to this point
Code:
Initialize the LineageOS source repository
The following branches can be used to build for the Samsung Galaxy Tab E 9.6 (WiFi):
cm-14.1
How do I determine the branch for LOS 18.1 for the SM-T500?

Just remember the link I referenced is a template and that you have to substitute in the parameters that you want to build.
So if you want 18.1, you need to change
Code:
repo init -u https://github.com/LineageOS/android.git -b cm-14.1
to
Code:
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
If the SM-T500 isn't a LineageOS officially supported device, it won't show up when you try
breakfast <your device name>
You need to find out what your SM-T500 device name is. You can do that by downloading an free app called devcheck by flar2. It's a wonderful utility that I use regularly to help troubleshoot and verify my work.
https://play.google.com/store/apps/details?id=flar2.devcheck
Once installed, if you goto the system tab, it will tell you the device name just under the product information. For example, the SM-T560NU's device name is gtelwifiue. This is what you need to know and remember.
Once you find your SM-T500 device name, then you need to search xda and github for code repositories and most importantly a manifest or roomservice.xml file. This will tell the build system where to find all the device specific code, proprietary binary blobs and other dependencies that it needs to build the rom.
A sample manifest or roomservice.xml looks like this. This is for device I'm currently building with the 17.1 Dec 5th security patches.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- Samsung MSM8916 Common Repos -->
<!-- <project path="device/samsung/msm8916-common" name="aala27/android_device_samsung_msm8916-common" remote="github" revision="Q10.0"/> -->
<project path="device/samsung/msm8916-common" name="Galaxy-MSM8916/android_device_samsung_msm8916-common" remote="github" revision="lineage-17.1"/>
<project path="device/samsung/qcom-common" name="LineageOS/android_device_samsung_qcom-common" remote="github" revision="lineage-17.1"/>
<!-- Samsung Hardware Repo -->
<project path="hardware/samsung" name="LineageOS/android_hardware_samsung" remote="github" revision="lineage-17.1"/>
<!-- Common Samsung MSM8916 Kernel -->
<project path="kernel/samsung/msm8916" name="Galaxy-MSM8916/android_kernel_samsung_msm8916" remote="github" revision="lineage-17.1"/>
<!-- Vendor Trees (for all devices) -->
<project path="vendor/samsung/msm8916-common" name="aala27/android_vendor_samsung_msm8916-common" remote="github" revision="Q10.0"/>
<project path="vendor/samsung/gte-common" name="aala27/android_vendor_samsung_gte-common" remote="github" revision="Q10.0"/>
<project path="vendor/samsung/gt5note10wifi" name="aala27/android_vendor_samsung_gt5note10wifi" remote="github" revision="Q10.0"/>
<!-- Qcom audio -->
<remove-project name="LineageOS/android_hardware_qcom_audio"/>
<project path="hardware/qcom-caf/msm8916/audio" name="Galaxy-MSM8916/android_hardware_qcom_audio" remote="github" revision="lineage-17.1-caf-msm8916" />
<!-- Dependencies -->
<project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-17.1"/>
<!-- arm-eabi-7.2 -->
<project path="prebuilts/gcc/linux-x86/arm/arm-eabi-7.2" name="Galaxy-MSM8916/android-prebuilts-gcc-linux-x86-arm-arm-eabi-7.2" remote="github" revision="master"/>
<!-- Galaxy Tab P550 -->
<project path="device/samsung/gte-common" name="aala27/android_device_samsung_gte-common" remote="github" revision="Q10.0"/>
<project path="device/samsung/gt5note10wifi" name="aala27/android_device_samsung_gt5note10wifi" remote="github" revision="Q10.0"/>
</manifest>
The product is SM-P550 and it's device name is gt5note10wifi.
This file needs to go into the .repo/local_manifests directory.
So if you did something like
Bash:
mkdir code
cd code
repo init -u https://github.com/LineageOS/android.git -b lineage-18.1
# put your roomservice.xml file in .repo/local_manifests
# you may need to create the local_manifests directory if it doesn't exist
# after that then
repo sync
source build/envsetup.sh
# see if all dependencies are met
breakfast <your SM-T500 device name>
# if okay, then build rom
brunch <your SM-T500 device name>
Now if you can't find an existing code repo for the SM-T500, then this exercise becomes 100x harder because you will have to make it yourself from scratch. That's something I haven't had to do myself, but upgrading/maintaining existing repos for each new version of Android is challenging enough.
Finding an existing and working SM-T500 code repo will be the most important thing in your journey in rom building. If you find a non working repo, then you will have to fix it and that will likely take weeks, not days, of researching, learning, troubleshooting etc. There's a reason it's called a custom rom. Each device has it's own custom parameters, quirks, bugs, traps, etc.
For example, for SM-P550, I had to modify the code repo to make it run properly for 17.1. Extensive changes were required to make it work for 18.1 and it will be same when I try to make it work for 19.0.

Related

[SOLVED] Compiling for hammerhead. Edit : It boots !

Hello,
I've been trying to compile for hammerhead, but I'm getting a weird behavior
I've repo sync on branch pac-4.4, and all went well
Then I "build-pac.sh -c hammerhead"
It populates the local manifest with entries for device, proprietary and kernel (from CM and themuppets)
Then it repo sync for the above mentionned entries in the manifest
But when trying to sync the kernel branch, it is prompting me for a github login & password
I tried to left it blank, to input my github login/pwd, but none worked, and the repo does not sync
Did I missed something or is there something wrong in my setup ?
What name do you use when you did the repo init? Use that same name and password
Sent from my SAMSUNG-SGH-I747 using Tapatalk
I left the default one (from my ubuntu session)
But I'm not sure this is the problem here
When I try to breafast "mako" for example its works fine, and sync the mako's repos, without any login/pwd prompt
Looks like pac-man git has changed from "git://github.com/PAC-man/android.git" to "git://github.com/PAC-man/pacman.git"
I'll try to repo sync with the new one ...
New sync didn't help
Here is the log from the build-pac
From https://github.com/TheMuppets/proprietary_vendor_lge
* [new branch] cm-11.0 -> github/cm-11.0
Fetching projects: 66% (2/3)
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/Cyanogenmod/android_kernel_lge_hammerhead/'
Username for 'https://github.com': bud77
Password for 'https://[email protected]':
remote: Repository not found.
fatal: repository 'https://github.com/Cyanogenmod/android_kernel_lge_hammerhead/' not found
error: Cannot fetch Cyanogenmod/android_kernel_lge_hammerhead
error: Exited sync due to fetch errors
...
Lunching device
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[vendor/pac/products/pac_hammerhead.mk]]: "device/lge/hammerhead/cm.mk" does not exist. Stop.
Device hammerhead not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_lge_hammerhead
Default revision: cm-11.0
Checking branch info
CyanogenMod/android_device_lge_hammerhead already exists
Syncing repository to retrieve project.
Fetching project CyanogenMod/android_device_lge_hammerhead
Fetching projects: 100% (1/1), done.
Repository synced!
Looking for dependencies
Adding dependencies to manifest
CyanogenMod/android_kernel_lge_hammerhead already exists
Syncing dependencies
Fetching project Cyanogenmod/android_kernel_lge_hammerhead
Username for 'https://github.com':
Password for 'https://github.com':
remote: Repository not found.
fatal: Authentication failed for 'https://github.com/Cyanogenmod/android_kernel_lge_hammerhead/'
error: Cannot fetch Cyanogenmod/android_kernel_lge_hammerhead
error: Exited sync due to fetch errors
Done
Click to expand...
Click to collapse
This time I setup my real github user & mail during the repo init, but even when I specify those when prompter, it doesn't work
I rewrote the line manually in the local manifest, and it's now syncing normally ...
bud77 said:
I rewrote the line manually in the local manifest, and it's now syncing normally ...
Click to expand...
Click to collapse
Could you please explain which file you edited and where it was located? I'm having the same problem and I can't figure it out.
I'm figuring something is wrong with android_device_lge_hammerhead but it looks like it exists on github, so I'm not sure what needs fixing.
moffa~ said:
Could you please explain which file you edited and where it was located? I'm having the same problem and I can't figure it out.
I'm figuring something is wrong with android_device_lge_hammerhead but it looks like it exists on github, so I'm not sure what needs fixing.
Click to expand...
Click to collapse
It's the rooomservice.xml. Ot is located in ~/your_repo_folder/.repo/local_manifest
To be very specific, I wrote the line as the 2nd entry of the roomservice, instead of the 3rd entry
Started compiling before going to bed, and this morning, build completed ..
IT BOOTS !!!!!!!!!!
Edit : There is some system UI FC upon first start, and some apps are not working
But most of it is working !
bud77 said:
Started compiling before going to bed, and this morning, build completed ..
IT BOOTS !!!!!!!!!!
Edit : There is some system UI FC upon first start, and some apps are not working
But most of it is working !
Click to expand...
Click to collapse
So my roomservice.xml looks like
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_hammerhead" path="device/lge/hammerhead" remote="github" revision="cm-11.0" />
<project name="Cyanogenmod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-11.0" />
</manifest>
What does yours look like?
moffa~ said:
So my roomservice.xml looks like
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_lge_hammerhead" path="device/lge/hammerhead" remote="github" revision="cm-11.0" />
<project name="Cyanogenmod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-11.0" />
<project name="TheMuppets/proprietary_vendor_lge" path="vendor/lge" remote="github" revision="cm-11.0" />
</manifest>
What does yours look like?
Click to expand...
Click to collapse
It is exactly the same
I tried to repo sync yesterday before bed, and I was prompt for password again
I edited the file, again, but this time, it didn't worked
I truly think there is something wrong on the repo itself
Edit : I edited right now and copied the line from an old file, and it works
There most probably is an invisible caraacter or something like that
Paste that on 1st or 2nd line
<project name="CyanogenMod/android_kernel_lge_hammerhead" path="kernel/lge/hammerhead" remote="github" revision="cm-11.0" />
Click to expand...
Click to collapse
Capitalize the m in CyanogenMod. It won't sync that repo without it
Sent from my SAMSUNG-SGH-I747 using Tapatalk
atrus5 said:
Capitalize the m in CyanogenMod. It won't sync that repo without it
Sent from my SAMSUNG-SGH-I747 using Tapatalk
Click to expand...
Click to collapse
Ohhhhhhh I didn't noticed it ! Thank you
But is it normal the manifest gets rewritten every compile/sync ?
bud77 said:
Ohhhhhhh I didn't noticed it ! Thank you
But is it normal the manifest gets rewritten every compile/sync ?
Click to expand...
Click to collapse
It will get written to when building not syncing. Syncing will just take whatever is in the two files and sync them. It takes what is in the dependency file. Vendor/pac/device.dependencies
Many thanks for the clarification
So, to sum it up for everyone :
Edit local manifest, put a capital M to "CyanogenMod" save & repo sync
Then re-edit the file after any build
bud77 said:
Many thanks for the clarification
So, to sum it up for everyone :
Edit local manifest, put a capital M to "CyanogenMod" save & repo sync
Then re-edit the file after any build
Click to expand...
Click to collapse
Fixed dependency file. Thanks for noticing it. Will get merged soon. So you won't have to edit the file anymore after the merge.
edit: merged
http://review.pac-rom.com/#/c/3799/
Well done :good:
bud77 said:
http://review.pac-rom.com/#/c/3799/
Well done :good:
Click to expand...
Click to collapse
Just remember to anyone building this, DO NOT POST THIS ANYWHERE. If you do the thread will be closed as soon as we find out. You can build for yourself for right now but this is not to be spread out to the masses. Just a warning.
atrus5 said:
Just remember to anyone building this, DO NOT POST THIS ANYWHERE. If you do the thread will be closed as soon as we find out. You can build for yourself for right now but this is not to be spread out to the masses. Just a warning.
Click to expand...
Click to collapse
Don't worry, I read the bold lines at the end of the build, and saw the guy apologizing on your github about posting a rom
bud77 said:
Don't worry, I read the bold lines at the end of the build, and saw the guy apologizing on your github about posting a rom
Click to expand...
Click to collapse
Glad you mentioned it
Makes it more difficult for those who "did not see that" to come up with excuses.
Enjoy your Alpha build

Compile Error

I'm attempting to build omni rom from source on my mac for my galaxy note 2 N7100 and ran into the following error:
Code:
make: *** No rule to make target `vendor/samsung/smdk4412-common/proprietary/system/lib/libExynosHWCService.so', needed by `/Volumes/android/omnirom/out/target/product/n7100/system/lib/libExynosHWCService.so'. Stop.
I ran through all the steps again to make sure I didn't miss anything, but no luck.
Any ideas? Thanks
FYI, I created an omnirom.xml inside the local_manifests folder, here are the contents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="omnirom"
review="gerrit.omnirom.org"
fetch="https://github.com/omnirom" />
<project path="device/samsung/n7100" name="android_device_samsung_n7100" remote="omnirom" revision="android-4.4"/>
<project path="device/samsung/smdk4412-common" name="android_device_samsung_smdk4412-common" remote="omnirom" revision="android-4.4"/>
<project path="hardware/samsung" name="android_hardware_samsung" remote="omnirom" revision="android-4.4"/>
<project path="kernel/samsung/smdk4412" name="android_kernel_samsung_smdk4412" remote="omnirom" revision="android-4.4"/>
</manifest>
EDIT: I went through the process again and came across the following error from extract-files.sh:
Code:
remote object '/system/lib/libExynosHWCService.so' does not exist
I currently have omni-4.4.2-20140428-n7100-NIGHTLY.zip installed.
Try adding the Donkey Coyote vendor repo to your local manifest.
https://github.com/DonkeyCoyote/proprietary_vendor_samsung/tree/android-4.4
PonsAsinorem said:
Try adding the Donkey Coyote vendor repo to your local manifest.
https://github.com/DonkeyCoyote/proprietary_vendor_samsung/tree/android-4.4
Click to expand...
Click to collapse
Hi, I'm a bit new to this so trying to figure out how to add this repo. Would you mind giving an example? Thanks
Also, I searched the repo and the file libExynosHWCService.so doesn't exist so I'm not sure it would help me.
cjhmdm said:
Hi, I'm a bit new to this so trying to figure out how to add this repo. Would you mind giving an example? Thanks
Also, I searched the repo and the file libExynosHWCService.so doesn't exist so I'm not sure it would help me.
Click to expand...
Click to collapse
Can you find the file '/system/lib/libExynosHWCService.so' on your phone ? The script uses "adb pull ..." to retrieve these proprietary files from your handset, so it first needs to exist on your device (it will) and secondly adb needs to be functional. (for what it's worth, you'll also find that file in the nightly zip but you don't want it).
To start with can you do simple things like:
adb devices
adb shell
Is your path setup correctly and pointing to the SDK ?
There are instructions for "configuring USB access" over at the android developers site.
http://source.android.com/source/initializing.html
I have this configured on my machine, but I honestly can't remember if I did this manually or if it was done automagically during the initial repo setup.
FrodgE said:
Can you find the file '/system/lib/libExynosHWCService.so' on your phone ? The script uses "adb pull ..." to retrieve these proprietary files from your handset, so it first needs to exist on your device (it will) and secondly adb needs to be functional. (for what it's worth, you'll also find that file in the nightly zip but you don't want it).
To start with can you do simple things like:
adb devices
adb shell
Is your path setup correctly and pointing to the SDK ?
There are instructions for "configuring USB access" over at the android developers site.
http://source.android.com/source/initializing.html
I have this configured on my machine, but I honestly can't remember if I did this manually or if it was done automagically during the initial repo setup.
Click to expand...
Click to collapse
Hello, thanks for taking the time to reply. My build environment is setup and configured correctly. All of my paths are correct, etc.
In searching my device, which is running omni-4.4.2-20140428-n7100-NIGHTLY.zip, the file libExynosHWCService.so doesn't exist, nor does the 'binary' version exist in the rom zip file.
cjhmdm said:
Hello, thanks for taking the time to reply. My build environment is setup and configured correctly. All of my paths are correct, etc.
In searching my device, which is running omni-4.4.2-20140428-n7100-NIGHTLY.zip, the file libExynosHWCService.so doesn't exist, nor does the 'binary' version exist in the rom zip file.
Click to expand...
Click to collapse
Just add DonkeyCoyote repo as mentioned above and build.
BTW, omnirom remote is already configured by default, you don't need to do it in local manifest.
UtkarshGupta said:
Just add DonkeyCoyote repo as mentioned above and build.
BTW, omnirom remote is already configured by default, you don't need to do it in local manifest.
Click to expand...
Click to collapse
Could you provide an example of how I can add that repo? I'm trying to figure out to add it but haven't had much success so far.
Thanks in advance
Code:
<remote fetch="https://github.com/DonkeyCoyote" name="donkey" />
<project name="proprietary_vendor_samsung" path="vendor/samsung" remote="donkey" revision="android-4.4" />
chasmodo said:
Code:
<remote fetch="https://github.com/DonkeyCoyote" name="donkey" />
<project name="proprietary_vendor_samsung" path="vendor/samsung" remote="donkey" revision="android-4.4" />
Click to expand...
Click to collapse
cjhmdm said:
I'm attempting to build omni rom from source on my mac for my galaxy note 2 N7100 and ran into the following error:
Code:
make: *** No rule to make target `vendor/samsung/smdk4412-common/proprietary/system/lib/libExynosHWCService.so', needed by `/Volumes/android/omnirom/out/target/product/n7100/system/lib/libExynosHWCService.so'. Stop.
I ran through all the steps again to make sure I didn't miss anything, but no luck.
Any ideas? Thanks
FYI, I created an omnirom.xml inside the local_manifests folder, here are the contents:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="omnirom"
review="gerrit.omnirom.org"
fetch="https://github.com/omnirom" />
<project path="device/samsung/n7100" name="android_device_samsung_n7100" remote="omnirom" revision="android-4.4"/>
<project path="device/samsung/smdk4412-common" name="android_device_samsung_smdk4412-common" remote="omnirom" revision="android-4.4"/>
<project path="hardware/samsung" name="android_hardware_samsung" remote="omnirom" revision="android-4.4"/>
<project path="kernel/samsung/smdk4412" name="android_kernel_samsung_smdk4412" remote="omnirom" revision="android-4.4"/>
</manifest>
EDIT: I went through the process again and came across the following error from extract-files.sh:
Code:
remote object '/system/lib/libExynosHWCService.so' does not exist
I currently have omni-4.4.2-20140428-n7100-NIGHTLY.zip installed.
Click to expand...
Click to collapse
Hello, I'm trying to build a LineageOS rom for Meizu PRO5 which has a similar chipset as Samsung Galaxy S6/Note5, I also encounter a similar error with libExynosHWCService, which says:
Code:
make: *** No rule to make target /home/user/los/system/out/target/product/m86/obj/SHARED_LIBRARIES/libExynosHWCService_intermediates/export_includes', needed by 'home/user/system/out/target/product/m86/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates/import_includes'. Stop.
Can you please advise and help? I both have these libraries in the vendor folders for both /lib and /lib64 and currently stuck here. Thanks in advance!

[GUIDE][HOW-TO][T819]Build your own LineageOS 15.1 for T819

Hello and welcome to my first try to write an HOW-TO, don't kill me for my epic skillz in that ^^
After a nice chat with @LuK1337 that weekend I was able to build my own LineageOS ROM for our beloved Tablet. It works very nice and thus I think it should be fine to pass my information over to you, but first:
If your tablet eats your cat after that, you are on YOUR OWN! It is NOT my fault and even less the fault of @LuK1337!!
What works:
- Everything the T813 LineageOS can do + working Vibration + LTE
What does not work:
- Phone audio
So, let's start:
First you have this nice howto for the T813: https://wiki.lineageos.org/devices/gts210vewifi/build which you follow down to and including the "Download the source code" step with two lil modifications:
Install the build packages -> I had to "apt-get install python-minimal", too to make it work on Ubuntu 17.10.
Initialize the LineageOS source repository -> Well, we don't want LOS 14.1, so the command we use here is:
Code:
repo init -u https://github.com/LineageOS/android.git -b staging/lineage-15.1
After you finished the repo sync, which takes AGES on slower internet connections, you really should follow two optional steps below:
https://wiki.lineageos.org/devices/gts210vewifi/build#turn-on-caching-to-speed-up-build
https://wiki.lineageos.org/devices/gts210vewifi/build#configure-jack (Especially needed if you have not that much RAM. I did not wanna listen to @LuK1337 telling me that the build EATS RAM for breakfast, but it's true! You NEED more than 12 GB of RAM even with that setting!!)
Next one is the following lines:
Code:
mkdir -p ./.repo/local_manifests
wget https://www.dropbox.com/s/72cb5jix08y9jkv/envsetup.sh?dl=1 -O ./picks
wget https://www.dropbox.com/s/0fknl8w7zl6buz2/roomservice.xml?dl=1 -O ./.repo/local_manifests/roomservice.xml
chmod +x ./picks
repo sync
This loads the device specific stuff you will need now and prepares a step we need later.
Some useful and badly needed pickings from @LuK1337 are added when you next run this command:
Code:
./picks
Now once you are done:
Code:
. build/envsetup.sh
ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
In theory we now can go to bed and check for a result in $OUT after it finished build after about 6-10 hours. There waits a nice install ZIP for TWRP in there.
Flash on a T819 with FORMATTED and thus useable /data partition. This can and HAS TO be done in TWRP, too. If the file laments about a wrong bootloader, you should update your tablet to most recent official 7.0 firmware first!
Maybe this is a first start for ppl trying to tinker with T819 and add even more things to it, like Phone audio. At least is was a nice odyssey and the result I got was perfect. Have fun with your track down to the crazy self builders ^^
P.S. If you want GAPPS, load em here: https://sourceforge.net/projects/unofficial-opengapps-8-1/
Wanna update? SURE ^^ But be sure your picks are the most recent above.
Code:
repo forall -c 'git am --abort ; git cherry-pick --abort ; git merge --abort ; git clean -fdx ; git reset --hard' ; repo sync -j30 --force-sync -f
./picks
Code:
. build/envsetup.sh
rm -rf out ; ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
Hello, new version ^^
Updates will be added here:
15.01.18:
If you have funny build problems indicating compiler suite problems... Update the platform tools. Fixes some funny problems with newer LOS builds.
And always be sure you have the most recent picks and roomservice.xml
14.01.18:
Still wanna tinker with your own build? I updated the manual making it waay smaller thx to recent changes.
08.01.18:
https://forum.xda-developers.com/tab-s2/orig-development/rom-lineageos-15-1-t3732074
https://forum.xda-developers.com/tab-s2/orig-development/rom-lineageos-15-1-t3732070
Have fun, did go on LuK1337 and others nerves and this is the result. Don't expect a full featured ROM though. Calling is a bit silent when you don't hear ppl and they don't you ^^
25.12.17:
Updated the link to LuK1337's picks to a new one disabling stuff not working on new checkouts anymore. Source is LuK1337 again ^^
Completely removed the after build zip editing by modifying another file and keeping the line uncommented-out in BoardConfig.mk. This way the whole file correctly checks for the CORRECT bootloaders. This way the build.prop file in /system on the device is correct, too.
Added link to unofficial GAPPS for ppl who don't want to tinker inside GAPPS zip files.
Started some tinkering with RIL. Results up to now: ZIP file +30 MB aka LOS has all stuff built needed for telephony. Working? Naaah ^^
and where is the link to test the build
ronald_w. said:
and where is the link to test the build
Click to expand...
Click to collapse
There is none. This is a manual how to make it yourself. If I ever manage to get RIL working... MAYBE I will upload one or two builds.
emuandco said:
There is none. This is a manual how to make it yourself. If I ever manage to get RIL working... MAYBE I will upload one or two builds.
Click to expand...
Click to collapse
this is also my problem
ronald_w. said:
this is also my problem
Click to expand...
Click to collapse
So you made your own build already? Working fine (except RIL)?
emuandco said:
So you made your own build already? Working fine (except RIL)?
Click to expand...
Click to collapse
for now not working, build process without errors but the kernel will not boot the device (lineage 15.0 with other build tree) , new build is 8%
No need to build it at all. It is enough to just edit installer script. Change gts210wifi to gts20lte and delete assert for BL. It works perfect, I tried, I use it. And of courese to use newset twrp 3.2.
ivanox1972 said:
No need to build it at all. It is enough to just edit installer script. Change gts210wifi to gts20lte and delete assert for BL. It works perfect, I tried, I use it. And of courese to use newset twrp 3.2.
Click to expand...
Click to collapse
You know that we are talking about the NON Exynos devices, so you? so it is gts210VEwifi.
And even if it does, lucky you. I don't like the idea to use defconfigs for another device on my tablet.
EDIT: Current status regarding RIL... After hours with LuK1337 and his skills and code source juggling... Daemon runs, SIM detected, IMEI detected, network sorta... runs? This means SMS receiving runs and not much more for now. Still investigating.
Of courese, I forget ve to write, my lapsus. Otherwise it works perfect. They use same board.
But, if you make RIL there, it diffferent story. Every credit to you, if you need someone to test those builds I am here
ivanox1972 said:
Of courese, I forget ve to write, my lapsus. Otherwise it works perfect. They use same board.
But, if you make RIL there, it diffferent story. Every credit to you, if you need someone to test those builds I am here
Click to expand...
Click to collapse
Well, I would prefer someone knowing more of that stuff helping me to fix the remaining bugs. I even went down the pipe to try to disassemble the original libril.so but no big results from that... Right now you have all phone stuff included and thus for example can install WhatsApp again + GAPPS install the DialerFramework and Google Dialer. You get IMEI information, Baseband Information, SIM Phone Number Information and you can receive SMS, but no calling, no SMS sending and no data network works for now.
Current logcat: https://hastebin.com/iguvaxagas.xml
Thanks for hard work, I'll be very happy to have full oreo Los on tab s2!
Well I've been fiddling all day to get it to work, ubuntu 17.* have been removed from the main ubuntu site, and using the the cdimage.ubuntu locations gave me the install iso's but ended in not properly working install repos of the needed apps.
So went for 16.04 after several attempts, every installs fine, setted everything up according the tutorials in the OP and checking my old info for setting up ubuntu VM (or full pc's) what i did in the past, those where the same since my last succesfull setting up build machines.
but in the end I had to use a "repo sync -f --force-sync" instead of repo sync before ./picks, otherwise it ended up with a ton of errors in running ./picks.
After that that being running good, and finally comming to build I end up after 50 to 60 seconds in
Code:
[44/44] bootstrap /home/ragebuilder/android/lineage/out/soong/.minibootstrap/build.ninja.in
[4/4] /home/ragebuilder/android/lineage/out/soong/.bootstrap/bin/minibp /home/ragebuilder/android/lineage/out/soong/.bootstrap/build.ninja
[862/863] glob vendor/qcom/opensource/interfaces/display/config/1.0/Android.bp
[56/56] /home/ragebuilder/android/lineage/out/soong/.bootstrap/bin/soong_build /home/ragebuilder/android/lineage/out/soong/build.ninja
/home/ragebuilder/android/lineage/out/build-lineage_gts210vewifi.ninja is missing, regenerating...
[527/1117] including ./hardware/qcom/media-caf/msm8952/Android.mk ...
./hardware/qcom/media-caf/msm8952/Android.mk:4: warning: target list is : msm8952
[1117/1117] including ./vendor/samsung/zerofltexx/Android.mk ...
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libgps.utils.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libgps.utils.so'
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_core.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_core.so'
build/core/Makefile:34: warning: overriding commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_eng.so'
build/core/base_rules.mk:391: warning: ignoring old commands for target `/home/ragebuilder/android/lineage/out/target/product/gts210vewifi/system/lib64/libloc_eng.so'
[ 99% 1585/1586] glob vendor/qcom/opensource/interfaces/*/Android.bp
ninja: error: '/home/ragebuilder/android/lineage/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/classes.jack', needed by '/home/ragebuilder/android/lineage/out/target/common/obj/APPS/AdvancedDisplay_intermediates/with-local/classes.dex', missing and no known rule to make it
18:57:35 ninja failed with: exit status 1
#### failed to build some targets (54 seconds) ####
Tried resetting up the build VM now 6 times to find anything I could've done wrong, but cant find any, just end up at the same manner with this error.
Also made sure that Jack is setup properly ( https://forum.xda-developers.com/android/software/aosp-cm-los-how-to-fix-jack-server-t3575179 ) and jack starts and stops, shouldn't that also solve the ninja problem? Soz my last home build was nearly 2 years ago and a lot could have been changed, but normally google is my friend to fix it, not this time..
Has anyone some advice what to look at?
I have removed in hardware/samsung/AdvancedDisplay/Android.mk the line org.cyanogenmod.platform.internal and the directory /hardware/samsung/AdvancedDisplay/src/com/cyanogenmod/. (LineageOS 15.0)
Build is complete,
[100% 84744/84744] build bacon
Package Complete: /home/ronald/android/system/out/target/product/gts210velte/lineage-15.0-20180106_214317-UNOFFICIAL-gts210velte.zip
make: Verzeichnis „/home/ronald/android/system“ wird verlassen
#### make completed successfully (03:05:39 (hh:mm:ss)) ####
Click to expand...
Click to collapse
but for me this rom doesn't work properly --> boot stuck with sim card not detected
ronald_w. said:
I have removed in hardware/samsung/AdvancedDisplay/Android.mk the line org.cyanogenmod.platform.internal and the directory /hardware/samsung/AdvancedDisplay/src/com/cyanogenmod/. (LineageOS 15.0)
Build is complete,
but for me this rom doesn't work properly --> boot stuck with sim card not detected
Click to expand...
Click to collapse
That got me just a step furter
14:07:50 Build configuration changed: "" -> "lineage_gts210vewifi-userdebug", forcing installclean
ninja: warning: bad deps log signature or version; starting over
Click to expand...
Click to collapse
now it is waiting time agian....
But thanx for the tip!!!
RagingHarry said:
That got me just a step furter
now it is waiting time agian....
But thanx for the tip!!!
Click to expand...
Click to collapse
I have no clue what you did wrong or why you tinker with LOS 15 with a manual for 15.1, but... check post #2 and load your ROM from there.
emuandco said:
I have no clue what you did wrong or why you tinker with LOS 15 with a manual for 15.1, but... check post #2 and load your ROM from there.
Click to expand...
Click to collapse
That 15.0 was the person I quoted but that step was a test to see if it would hold further, but also then it ended up in errors and a crash of the build.
I did everything with copy pasting from the guide in OP and the linked pages, why it went wrong for me I still don't understand, have been making homebuilds since my Galaxy S2 and always got it to work.
But now you made the new LOS threads I will stick to that for now, and maybe try later again.
Thnx for your efforts and now the Unofficial support start for the T819!
RagingHarry said:
That 15.0 was the person I quoted but that step was a test to see if it would hold further, but also then it ended up in errors and a crash of the build.
I did everything with copy pasting from the guide in OP and the linked pages, why it went wrong for me I still don't understand, have been making homebuilds since my Galaxy S2 and always got it to work.
But now you made the new LOS threads I will stick to that for now, and maybe try later again.
Thnx for your efforts and now the Unofficial support start for the T819!
Click to expand...
Click to collapse
Sure, but beware, we have now device repos for gts210velte and gts28velte ^^
So roomservicexml more should look like this now:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="gts210vewifi-dev/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="staging/lineage-15.1" />
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="staging/lineage-15.1" />
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-15.0" />
<project name="gts210vewifi-dev/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-15.1" />
<project name="gts210vewifi-dev/android_device_samsung_gts210velte" path="device/samsung/gts210velte" remote="github" revision="lineage-15.1" />
<project name="gts210vewifi-dev/android_device_samsung_gts28velte" path="device/samsung/gts28velte" remote="github" revision="lineage-15.1" />
<project name="gts210vewifi-dev/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_packages_apps_Updater" path="packages/apps/Updater" remote="github" />
</manifest>
And brunch has to be started with that hw id, too:
Code:
ALLOW_MISSING_DEPENDENCIES=true brunch gts210velte
Code:
ALLOW_MISSING_DEPENDENCIES=true brunch gts28velte
Feel free to try it, if it works, tell me. Not much time these days.
Thnx!
Gonna give it a try in a few days when I have some free time.
Feel free to try it, if it works, tell me. Not much time these days.
Click to expand...
Click to collapse
[ 90% 83198/92320] Building with Jack: /home/ronald/android/syst...mmon/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack
FAILED: /home/ronald/android/system/out/target/common/obj/JAVA_LIBRARIES/services.core_intermediates/classes.jack
ERROR: /home/ronald/android/system/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java:260.8: The import org.lineageos.internal.util.ActionUtils cannot be resolved
ERROR: /home/ronald/android/system/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java:2017.17: ActionUtils cannot be resolved
[ 91% 84356/92348] Building with Jack: /home/ronald/android/syst...get/common/obj/APPS/Updater_intermediates/with-local/classes.dex
ninja: build stopped: subcommand failed.
19:24:06 ninja failed with: exit status 1
#### failed to build some targets (02:35:28 (hh:mm:ss)) ####

[HOW-TO] Building TWRP from source with goodies

I decided to put together a guide on how to build TWRP from source, having successfully built it myself and restored a few of the goodies that disappeared in the 3.3.1-0 release (e.g. install kernel). Also, marlin (Pixel XL) has had a few advancements over sailfish (Pixel), so this is a way to get back on par even if unofficially.
Whilst I'll go into a good level of detail, this will not be a hand-holding guide. You are expected to be able to use the Linux command line, and tools such as Git and repo.
Download sources
This guide is based upon building from the Minimal TWRP sources, which are based upon a subset of Omnirom. At the time of writing, the latest branch is twrp-9.0 (Pie). (If you are reading this some months after I have written this guide, check for later branches.) Follow this link for the repo, and the instructions:
https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/tree/twrp-9.0
Firstly, create a folder to put this in, e.g. $HOME/twrp-minimal-omni, and change to that directory. Then execute the following for a shallow clone (to save space...):
Code:
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-9.0
Before doing the repo sync, we will need a few extra repositories to be downloaded. Create a subfolder .repo/local_manifests and create an XML file (e.g. custom.xml) with the following content:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="android_device_google_marlin" path="device/google/marlin" remote="TeamWin" revision="android-9.0" />
<project path="hardware/qcom/bootctrl" name="platform/hardware/qcom/bootctrl" groups="pdk-qcom" remote="aosp" />
<project path="hardware/qcom/msm8998" name="platform/hardware/qcom/msm8998" groups="qcom_msm8998,pdk-qcom" remote="aosp" />
</manifest>
android_device_google_marlin - contains the configuration and build instructions for marlin and sailfish
hardware/qcom/bootctrl - this is part of AOSP, and is required for building TWRP
hardware/qcom/msm8998 - extra chipset stuff that is required for marlin/sailfish
You can do a repo sync now to download the sources.
Additionally, we will need some driver binaries that are available from Google. Get the Google (Qcom is not necessary) drivers for the latest Pie release here:
https://developers.google.com/android/drivers#sailfishpq3a.190801.002
Extract the files into the same folder as you created, and execute e.g as follows, and follow the prompts:
Code:
./extract-google_devices-sailfish.sh
The binaries will be extracted into a vendor/google-devices/ sub-folder. Do not rename the sub-folder - the configuration looks for exactly this path.
You now have all of the source files needed.
Do the build
We then more-or-less follow the instructions as per the original minimal manifest page:
Code:
export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
lunch omni_sailfish-eng
mka bootimage
The boot image will be created at out/target/product/sailfish/boot.img.
Use fastboot boot out/target/product/sailfish/boot.img to test it in fastboot mode on your device.
Hope this helps someone out there!
XDA:DevDB Information
Building TWRP for Sailfish, Tool/Utility for the Google Pixel
Contributors
NZedPred
Version Information
Status: Stable
Created 2020-01-03
Last Updated 2020-04-26
Downloads
Occasionally I will make available one of my builds. They will be in the folders below.
Please note the following:
You are always encouraged to use the official versions of TWRP instead of these
I am not liable for anything that goes wrong as a consequence of using them
As a general rule, I will not be fixing bugs or adding features to these builds (other than enabling features that already are in the code) - they are built straight from the TWRP sources
Google Pixel (Sailfish) Unofficial TWRP
Google Pixel (Marlin) XL Unofficial TWRP
GPL compliance
The downloads in this folder use pre-compiled Linux kernels. The source for these can be found here (thanks to @razorloves for pointing out the correct URL):
[URL="https://github.com/bigbiff/android_kernel_google_marlin/commits/lineage-16.0[/URL]
Refer to the tags/branches prefixed with "android-msm-marlin-".
Log
20200301 - Added version "3.3.1-4-experimental-multi-user-decrypt" for Sailfish and Marlin, ability to decrypt data for multiple users. Refer to the advanced menu.
20200223 - Added version string "3.3.1-3-unofficial-nzedpred" for Sailfish, very minor updates from TWRP
20200115 - Added a build of OrangeFox Recovery for Sailfish
20200105 - Added f2fs support (consider the f2fs option to be experimental, and it may not even work)
20200104 - Initial version for sailfish with feature parity with marlin
Building other recoveries - Orangefox
Orangefox
Quick guide for the impatient
Create a folder that will be your OrangeFox folder, and change into it. All commands below will be relative to this folder.
Code:
# Initialize the repo
repo init --depth=1 -u https://gitlab.com/OrangeFox/Manifest.git -b fox_9.0
# Create local manifests folder
mkdir .repo/local_manifests
# Create the local manifest for sailfish/marlin - use gedit, kate, leafpad, whatever your text editor is
gedit .repo/local_manifests/orangefox-marlin.xml
After the last command, the text editor window will open. Paste the following content into it.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="TeamWin" fetch="https://github.com/TeamWin" review="https://gerrit.twrp.me" />
<project name="external_magisk-prebuilt" path="external/magisk-prebuilt" remote="TeamWin" revision="master" />
<project name="android_device_google_marlin" path="device/google/marlin" remote="TeamWin" revision="android-9.0" />
<project path="hardware/qcom/bootctrl" name="platform/hardware/qcom/bootctrl" groups="pdk-qcom" remote="aosp" />
<project path="hardware/qcom/msm8998" name="platform/hardware/qcom/msm8998" groups="qcom_msm8998,pdk-qcom" remote="aosp" />
</manifest>
Then save and close the editor, and continue with the following commands.
Code:
# Sync the repos
repo sync -j8
Additionally, we will need some driver binaries that are available from Google. Get the Google (Qcom aren't necessary) drivers for the latest Pie release here:
https://developers.google.com/android/drivers#sailfishpq3a.190801.002
Extract the files into the same folder as you created, and execute as follows, and follow the prompts:
Code:
./extract-google_devices-sailfish.sh
The binaries will be extracted into a vendor/google-devices/ sub-folder. Do not rename the sub-folder - the configuration looks for exactly this path.
You now have all of the source files needed.
At the time of writing, there is a bug that prevents the FB2PNG module building (I think this is FrameBuffer2PNG - screenshots). Edit the file as below
Code:
# Edit sailfish config
gedit device/google/marlin/sailfish/BoardConfig.mk
# Edit marlin config
gedit device/google/marlin/marlin/BoardConfig.mk
Around line 204, change
Code:
TW_INCLUDE_FB2PNG := [U]true[/U]
to
Code:
TW_INCLUDE_FB2PNG := [U]false[/U]
Now continue to build as normal
Code:
. build/envsetup.sh
export ALLOW_MISSING_DEPENDENCIES=true
# For building sailfish use this line
lunch omni_sailfish-eng
# For building marlin use this line
lunch omni_marlin-eng
mka bootimage
NOTE: If you are building for sailfish, don't run the lunch omni_marlin-eng line. Also, you may get an error "Your device can't be found in device sources..". That's actually OK, it's just because there isn't a folder called device/google/sailfish. If the error bothers you, just create the folder and re-run the lunch command (and ignore the warning about device/google/sailfish/omni.dependencies file not found).
This will create a fastboot bootable image in the $OUT folder called boot.img. You can try booting it with your device in fastboot mode:
Code:
fastboot boot $OUT/boot.img
There are also a number of environment variables that OrangeFox has available. I haven't really tested whether or not they are necessary. Will update this post after I do some investigation.
Could you make twrp for marlin with support F2FS? I did but unsuccesed.
chuate92 said:
Could you make twrp for marlin with support F2FS? I did but unsuccesed.
Click to expand...
Click to collapse
You will need to add a flag to the device/google/marlin/marlin/BoardConfig.mk file:
Code:
TARGET_USERIMAGES_USE_F2FS := true
Additionally, the kernel needs to support f2fs. No idea if the one that comes with the repos supports it, but you could always grab one from a kernel that does and try that.
I'll try doing a build later on, but you will have to test at your own risk.
NZedPred said:
You will need to add a flag to the device/google/marlin/marlin/BoardConfig.mk file:
Code:
TARGET_USERIMAGES_USE_F2FS := true
Additionally, the kernel needs to support f2fs. No idea if the one that comes with the repos supports it, but you could always grab one from a kernel that does and try that.
I'll try doing a build later on, but you will have to test at your own risk.
Click to expand...
Click to collapse
I followed your guide but, I didn't know how to do "Create a subfolder .repo/local_manifests and create an XML file (e.g. custom.xml) with the following content:". So I downloaded manual. Then I do build recoveryimage, I still got error them same I posted here https://forum.xda-developers.com/showthread.php?p=81384609#post81384609.
I didn't know why.
chuate92 said:
I followed your guide but, I didn't know how to do "Create a subfolder .repo/local_manifests and create an XML file (e.g. custom.xml) with the following content:". So I downloaded manual. Then I do build recoveryimage, I still got error them same I posted here https://forum.xda-developers.com/showthread.php?p=81384609#post81384609.
I didn't know why.
Click to expand...
Click to collapse
For the above, using the command line, from the folder you originally created you do this:
Code:
mkdir .repo/local_manifests
gedit .repo/local_manifests/custom.xml
If you don't have gedit, use e.g. kate, or whatever other text editor you have.
Also, you don't build a recovery image - you build a boot image.
Code:
mka bootimage
Anyway, I've updated the second post with a folder for Google Pixel XL as well. I'll upload there later (once AFH sorts itself out - I can't upload anything into the new folder yet).
For now, try using the build here (at your own risk):
https://www.dropbox.com/s/gvkvhklmu2fh0tx/twrp-marlin-unofficial-20200105.img?dl=0
tried this unofficial twrp for sailfish. it boots just fine as temporary recovery, when trying to install into ramDisk it acts as the official image, too large to fit the ramDisk
wizardwiz said:
tried this unofficial twrp for sailfish. it boots just fine as temporary recovery, when trying to install into ramDisk it acts as the official image, too large to fit the ramDisk
Click to expand...
Click to collapse
Yes, TWRP is now getting quite big and a lot of features would have to be removed to get it to fit into the ramdisk. This is something I've been spending some time on, but it seems to be a difficult ask at this point. I'll post if I ever get there...
I'm having some trouble with your guide. I am trying to compile not TWRP but orangefox recovery. I have the files and I will link them below. If you could either walk me through building orangefox or building it yourself, that would be amazing. I have a sailfish.
Link: https://gitlab.com/OrangeFox/Recovery
Spookybear said:
I'm having some trouble with your guide. I am trying to compile not TWRP but orangefox recovery. I have the files and I will link them below. If you could either walk me through building orangefox or building it yourself, that would be amazing. I have a sailfish.
Link: https://gitlab.com/OrangeFox/Recovery
Click to expand...
Click to collapse
I've had a look at this, and I don't think it's as straight forward as merely dropping in in the TWRP sailfish device tree and building. It reports success when building, but it hasn't actually built anything...
I'd suggest you go to their Telegram chat for building OrangeFox: https://t.me/OrangeFoxBuilding
@Spookybear - I managed to do a build. If you want to test (at your own risk!) you can get it here:
https://www.androidfilehost.com/?fid=4349826312261701399
@Spookybear - I managed to do a build. If you want to test (at your own risk!) you can get it here:
https://www.androidfilehost.com/?fid=4349826312261701399
NZedPred said:
@Spookybear - I managed to do a build. If you want to test (at your own risk!) you can get it here:
https://www.androidfilehost.com/?fid=4349826312261701399
Click to expand...
Click to collapse
Can you send me the zip file of your build environment, I'm getting ninja error 1. Thank you.
NZedPred said:
@Spookybear - I managed to do a build. If you want to test (at your own risk!) you can get it here:
https://www.androidfilehost.com/?fid=4349826312261701399
Click to expand...
Click to collapse
tested it. Working just fine. to bad it is based on twrp 3.3.1 (naturally) and therefor still to large to fit the RamDisk.
wizardwiz said:
tested it. Working just fine. to bad it is based on twrp 3.3.1 (naturally) and therefor still to large to fit the RamDisk.
Click to expand...
Click to collapse
I meant that you could compress your /scripts folder and so I could try to build different versions for when it gets updated or when I need to fix a bug.
Thank you
Spookybear said:
I meant that you could compress your /scripts folder and so I could try to build different versions for when it gets updated or when I need to fix a bug.
Thank you
Click to expand...
Click to collapse
I'll add a guide into the third post of this thread for it. It's a bit much trying to compress some 40GB of files. Best you use the guide and try to work out where things went wrong. Will update once its up.
Quick and dirty guide to compiling OrangeFox now up
NZedPred said:
I'll add a guide into the third post of this thread for it. It's a bit much trying to compress some 40GB of files. Best you use the guide and try to work out where things went wrong. Will update once its up.
Quick and dirty guide to compiling OrangeFox now up
Click to expand...
Click to collapse
Thank you, I will work on this later.
NZedPred said:
I'll add a guide into the third post of this thread for it. It's a bit much trying to compress some 40GB of files. Best you use the guide and try to work out where things went wrong. Will update once its up.
Quick and dirty guide to compiling OrangeFox now up
Click to expand...
Click to collapse
Thank you, it worked.
Is it possible to merge this patch into your build? It should fix the issue when doing multi-user backup. Thanks.
https://gerrit.omnirom.org/c/android_bootable_recovery/+/33944

[GUIDE/HOW-TO] Building LineageOS for an Unsupported Device

Foreword:
This is my own notes I created to build LOS for my device (SM-T713 or gts28vewifi). After reading this, I encourage you to create your own notes as it will help you better understand the build process.
I followed the official guide here with additional reading here since we are building this for a device no longer officially supported by LOS.
Requirements:
A fast CPU. How fast? All depends on how long you can wait for the build.
At least 16Gb RAM is a must.
Around 300Gb 50Gb disk space since at least 100Gb of it will be devoted to "ccache".
*nix system, mine is on Ubuntu so the commands below are Debian-based.
Step 1: Setup the environment.
sudo apt install -y bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev python-is-python3
mkdir -p ~/bin
mkdir -p ~/android/lineage
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
cd ~/android/lineage
repo init -u https://github.com/LineageOS/android.git -b lineage-17.1
Step 2: Get the device manifest file.
local_manifests/gts28vewifi.xml at lineage-17.1 · team-infusion-developers/local_manifests
Contribute to team-infusion-developers/local_manifests development by creating an account on GitHub.
github.com
...and save to ~/android/lineage/.repo/local_manifests/gts28vewifi.xml
Then do:
repo sync
Step 3: Turn on caching to speed up build. Note that I used 300Gb instead of 100Gb (just personal preference).
mkdir ~/ccache
export CCACHE_DIR=~/ccache
export USE_CCACHE=1
export CCACHE_EXEC=/usr/bin/ccache
ccache -M 300G 50G
Step 4: Select Build.
source build/envsetup.sh
lunch
select lineageos_gts28vewifi-userdebug (whatever number it's identified under)
Step 5: Prepare the output:
make clean-apache-xml
make clean
make apache-xml
make ims-common
Step 6: Build it!
brunch gts28vewifi
Now go have a few coffees and come back later.
Epilogue:
I'm sure there are many different ways to build this but this method works for me. Just want to get the knowledge out so you can find a way that works for you.
@thisisludachris, I have been building roms for about 18 months now and can share that ccache is typically less than 10G per rom.
You can check by doing
ccache -s
Here is output from my machine building one rom.
Bash:
$ ccache -s
Summary:
Hits: 758742 / 837008 (90.65 %)
Direct: 693243 / 845272 (82.01 %)
Preprocessed: 65499 / 143805 (45.55 %)
Misses: 78266
Direct: 152029
Preprocessed: 78306
Uncacheable: 293976
Primary storage:
Hits: 1499615 / 1682320 (89.14 %)
Misses: 182705
Cache size (GB): 7.89 / 20.00 (39.45 %)
Also, it is possible to build a rom with less than 16GB DRAM if you apply these patches below. Obviously, the more the better, but I have use the patches below to build when I had less than 16GB DRAM.
https://forum.xda-developers.com/t/guide-how-to-build-android-11-with-low-ram.4298483/
Thanks for the info
thisisludachris said:
Step 2: Get the device manifest file.
local_manifests/gts28vewifi.xml at lineage-17.1 · team-infusion-developers/local_manifests
Contribute to team-infusion-developers/local_manifests development by creating an account on GitHub.
github.com
...and save to ~/android/lineage/.repo/local_manifests/gts28vewifi.xml
Then do:
repo sync
Click to expand...
Click to collapse
Sorry but for me this step fails. The repo command doesn't seem to find the files from team infusion:
team-infusion-developers/android_device_samsung_team-infusion-developers:
remote: Repository not found.
fatal: Repository »https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers/« nicht gefunden
error: Cannot fetch team-infusion-developers/android_device_samsung_team-infusion-developers from https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers
Does the procedure still work for you?
Paradroid
paradroid28 said:
Sorry but for me this step fails. The repo command doesn't seem to find the files from team infusion:
team-infusion-developers/android_device_samsung_team-infusion-developers:
remote: Repository not found.
fatal: Repository »https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers/« nicht gefunden
error: Cannot fetch team-infusion-developers/android_device_samsung_team-infusion-developers from https://github.com/team-infusion-developers/android_device_samsung_team-infusion-developers
Click to expand...
Click to collapse
It looks like whomever put up the manifest screwed up with cut and paste. It should probably be
Code:
<project name="team-infusion-developers/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-17.1" />
otherwise all the common code won't get compiled and integrated into the rom.
Yes @retiredtab is correct, there is an incorrect entry in the manifest file from team-infusion-developers. Please update the correct line as pointed out. Thanks.
@paradroid28 I just went over to my build folder and pulled out my manifest file as per below if you want to copy & paste them:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lineage-17.1" />
<project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_device_samsung_gts28vewifi" path="device/samsung/gts28vewifi" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_device_samsung_msm8976-common" path="device/samsung/msm8976-common" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/android_kernel_samsung_msm8976" path="kernel/samsung/msm8976" remote="github" revision="lineage-17.1" />
<project name="team-infusion-developers/proprietary_vendor_samsung_msm8976" path="vendor/samsung" remote="github" revision="lineage-17.1" />
</manifest>
​@thisisludachris
@retiredtab
Thank you for your efforts. I compared your manifest against the one I downloaded -> they are identical. So I probably have made a different error. ATM i don't know where to look, but i admit, i do not speak "git" fluently. Last time i built an Android ROM successfully was probably 2016-ish , therefore i was very happy about your notes thisisludachris.
If you have another idea where i can have messed up, please let me know.
paradroid28 said:
Thank you for your efforts. I compared your manifest against the one I downloaded -> they are identical.
Click to expand...
Click to collapse
If you followed post #1 exactly, namely
Code:
mkdir -p ~/android/lineage
# save manifest to
~/android/lineage/.repo/local_manifests/gts28vewifi.xml
check to make sure ~/android/lineage/.repo/local_manifests/gts28vewifi.xml is the correct file.
There should only be one .xml file in that directory otherwise the build system will try and parse it.
Another thing you can do is
Code:
cd ~/android/lineage/.repo
grep -iRl "android_device_samsung_team-infusion-developers"
to see where that statement is hiding from you.
paradroid28 said:
​@thisisludachris
@retiredtab
Thank you for your efforts. I compared your manifest against the one I downloaded -> they are identical. So I probably have made a different error. ATM i don't know where to look, but i admit, i do not speak "git" fluently. Last time i built an Android ROM successfully was probably 2016-ish , therefore i was very happy about your notes thisisludachris.
If you have another idea where i can have messed up, please let me know.
Click to expand...
Click to collapse
Perhaps start with which step from above that you are stuck on. Also, if you want to post a screenshot of your error, perhaps I can try to help troubleshoot. Bear in mind though I have limited knowledge in codes and compiling but will try nonetheless.
For those on Windows OS, you can install Ubuntu via WSL2 with the following command run in PowerShell:
Code:
wsl.exe --install
More info here if you require more details on running Ubuntu in Windows.
I'd be interested to see how you go with compiling on Ubuntu via WSL2 in Windows OS
thisisludachris said:
Perhaps start with which step from above that you are stuck on. Also, if you want to post a screenshot of your error, perhaps I can try to help troubleshoot. Bear in mind though I have limited knowledge in codes and compiling but will try nonetheless.
Click to expand...
Click to collapse
The step that fails is 'repo sync'. I Now deleted line 6 in the local manifest (which is generating the error because a certain repository is not found by my computer) and the sync command finished successfully .
Now i will try building it and see, if i am missing something vital.
Maybe you have a very smart computer which finds more repos than mine.
Good work @paradroid28, hope it went well.
@thisisludachris
@retiredtab
Well, i have to thank you again and to apologize, because at first i misread post #5. There lies the solution. So every file of the local manifests from team infusion is faulty atm and refers to a repo that does not exist.
With the corrected manifest i was able to successfully build a ROM for my gts28velte. It remains to be tested on the device.
You might update post #1 to give people following it, a hint, that there is a problem with the manifest and how it can be fixed.
Paradroid
@thisisludachris, @paradroid28, the next step for the 2 of you is to actually fix some the problems. I started just like you guys compiling what was given, but after a while, I learned how to fix the bugs and then take the next step and actually make the next Android version. I don't write code, but I copy working code from other repos (giving credit to original authors of course).
If you want guidance on how to do this, let me know.
retiredtab said:
@thisisludachris, @paradroid28, the next step for the 2 of you is to actually fix some the problems. I started just like you guys compiling what was given, but after a while, I learned how to fix the bugs and then take the next step and actually make the next Android version. I don't write code, but I copy working code from other repos (giving credit to original authors of course).
If you want guidance on how to do this, let me know.
Click to expand...
Click to collapse
yes please!
just bought a new POCO m4 pro 5g
never done that before but what the hell, might as well
any bit of guidance would be very much appreciated
retiredtab said:
@thisisludachris, @paradroid28, the next step for the 2 of you is to actually fix some the problems. I started just like you guys compiling what was given, but after a while, I learned how to fix the bugs and then take the next step and actually make the next Android version. I don't write code, but I copy working code from other repos (giving credit to original authors of course).
If you want guidance on how to do this, let me know.
Click to expand...
Click to collapse
that would be nice - would be good to try and get 18.1 on my Galaxy Tab TM-813 (gts210vewifi)
been a long time since built android, but would be fun to try and get back into it
On curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo, it gets stuck on this:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 45277 100 45277 0 0 278k 0 --:--:-- --:--:-- --:--:-- 279k
When I enter the link, (https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo) in a browser, it comes out with an error:
<Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>
Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object.
</Details>
</Error>
Ok few questions, what if your device is unofficial? what about the manifest? Also the guide differs if i want to build lineage 19.1?
Skorpion96 said:
what if your device is unofficial?
Click to expand...
Click to collapse
It's the same steps whether it's official or unofficial.
Skorpion96 said:
what about the manifest?
Click to expand...
Click to collapse
That's something you need to build or use an existing one. If you're new to building, I suggest building a rom that is offiical for a device you have. That way, you will see the entire process start to end.
Skorpion96 said:
Also the guide differs if i want to build lineage 19.1?
Click to expand...
Click to collapse
No. It's basically the same.

Categories

Resources