Open SRC - Shield Android TV Q&A, Help & Troubleshooting

https://nv-tegra.nvidia.com/r/gitweb?p=manifest/android/binary.git;a=blob;f=README_NEW_SHIELD;h=2a227699f26b82186ae33eef0469efc4ac174e89;hb=refs/heads/rel-shield-r-r1-9.1.1-opensource#l1
1 # Copyright (c) 2022 NVIDIA Corporation. All Rights Reserved.
2 #
3 # NVIDIA Corporation and its licensors retain all intellectual property
4 # and proprietary rights in and to this software, related documentation
5 # and any modifications thereto. Any use, reproduction, disclosure or
6 # distribution of this software and related documentation without an express
7 # license agreement from NVIDIA Corporation is strictly prohibited.
8
9 Welcome to the SHIELD Open Source Release.
10
11 In this README, you will find sync instructions.
12
13 ==========
14 HowTo Sync:
15 ==========
16
17 Syncing this release requires git and the repo tool from Google:
18 http://source.android.com/source/downloading.html#installing-repo
19
20 mkdir ~/shield-open-source
21 cd ~/shield-open-source
22 repo init -u git://nv-tegra.nvidia.com/manifest/android/binary.git -b rel-shield-r-r1-9.1.1-opensource -m tlk/t210.xml
23 repo sync -j5

Related

Dropbear SSHD Ported!

No need to use telnet anymore, I ported dropbear sshd over. (Mostly just mangled up the authentication.)
I provide the patch with basically no support, and reserve the right to ridicule you if you ask stupid questions. (If I described something incorrectly or you have actual questions, thats different. But if you aren't comfortable cross-compiling code - or compiling it at all - then this is not for you.)
It isn't plug and play, its a patch to the dropbear shipped with the Android platform code and you are on your own getting it to cross-compile. (I used the sourcery pack.) My build is MULTICALL=1 STATIC=1 and includes dbclient, dropbear, dropbearkey. You'll want to set the root password in debug.h and follow the instructions in the patch.
Latest patch here: http://link.sigkill.net/dropbear-v1.1.patch
# A couple of hints for this script.
# debug.h - you want to set a password at the bottom
# I prefer to build STATIC=1 MULTICALL=1 but you can do what you want.
#
# It still checks /etc/shells so unfortunately you have to create that file
# and put your shell in it. (by default I use /system/bin/rootsh. Which you
# will want to create.)
# If you want key-based authentication, there's some additional prep work:
# /data/dropbear needs to be root:root 744 and
# /data/dropbear/.ssh root:root 700
# options.h | 30 +++++++++++++++---------------
# svr-auth.c | 34 +++++++++++++++++++++++++++++++++-
# svr-chansession.c | 2 ++
# 3 files changed, 50 insertions(+), 16 deletions(-)
Changelog: v1.1 initial public release
Plans:
v1.2 remove /etc/shells check
v? add configurable password
v? auto-create directories
THANK YOU!!

[DEV][TOOL]Splitting Signed Boot Images - Script

Quick and dirty modified split_bootimg.pl for splitting our signed boot images.
This will strip the first 256bytes (the signature) from the image.
Advice, this will ruin unsigned boot images, if you are not a competent developer leave th alone, if you are competent
make backups before using.
#!/usr/bin/perl
######################################################################
#
# File : split_bootimg.pl
# Author(s) : William Enck <[email protected]>
# Description : Split appart an Android boot image created
# with mkbootimg. The format can be found in
# android-src/system/core/mkbootimg/bootimg.h
#
# Thanks to alansj on xda-developers.com for
# identifying the format in bootimg.h and
# describing initial instructions for splitting
# the boot.img file.
#
# Last Modified : Tue Dec 2 23:36:25 EST 2008
# By : William Enck <[email protected]>
#
# Copyright (c) 2008 The Pennsylvania State University
# Systems and Internet Infrastructure Security Laboratory
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
######################################################################
#
# Modified for signed boot images, no longer compatible with
# unsigned images. ~jcase
#
# Modded by a friend of AndIRC
#
######################################################################
Nice Job thanks 4 this!
Sent from my ADR6400L using XDA Premium App
tanks d000d
Thank you jcase
Sent from my ADR6400L using XDA Premium App
sadly, this script can not work on galaxy note GT-N7000

From CAF/MSM8974 to Omni

Hallo,
i'm trying to build Omni for I9506/ks01lte. How can i achieve a list of present hardware so i know which drivers are needed? There is no 'lshw' binary or '/proc/device-tree' on my current CM13 image and I'm not sure how to gather a reliable hardware map to start searching for drivers. Are unknown detected devices listed in dmesg?
Looking at find7op kernel dts files it seems they injected some older stuff (most files include copyright from 2014). I guess they've taken that from stock. But how did they know what to pick in the first place?
My first milestone is setting up a vanilla caf msm8974 defconfig kernel with boot interrupted 'bootable/recovery' image. This should bring up a minimal system with adb i think.
DualJoe said:
Hallo,
i'm trying to build Omni for I9506/ks01lte. How can i achieve a list of present hardware so i know which drivers are needed? There is no 'lshw' binary or '/proc/device-tree' on my current CM13 image and I'm not sure how to gather a reliable hardware map to start searching for drivers. Are unknown detected devices listed in dmesg?
Looking at find7op kernel dts files it seems they injected some older stuff (most files include copyright from 2014). I guess they've taken that from stock. But how did they know what to pick in the first place?
My first milestone is setting up a vanilla caf msm8974 defconfig kernel with boot interrupted 'bootable/recovery' image. This should bring up a minimal system with adb i think.
Click to expand...
Click to collapse
General idea is - Try to determine which CAF tag the OEM derived their source from. Sometimes (not Samsung) the vendor is nice and tells you where they started.
Otherwise, you typically determine from https://codeaurora.org/xwiki/bin/QAEP/release which tags correspond to your chipset and the Android version of the OEM source
e.g. back in the Oppo find7 days, we started with (if I recall correctly) msm8974 and Android version 04.03.00 or something like that.
It takes a bit of work to check out a CAF tag, drop the source on it, and come up with a metric of "how much changed" - some people use "lines of code in the patch" others use "physical size of the resulting patch" - Someone else wrote a script that automated this, I don't have a link on hand though.
Once you determine the closest CAF tag to the OEM source - check that out, drop the OEM source on it, then commit the changes. Then work on splitting the diff up into smaller digestible chunks, usually by path.
Then apply these chunks to a new CAF tag, reading through everything and making a judgement call on what changes are needed/what aren't. Can be harder with Samsung as they make a lot of unnecessary changes.
https://github.com/Entropy512/kernel_find7_reference/commits/oppo_kernel - diffchunked Oppo find7 kernel, start point was LNX.LA.3.2.5-00210-8x74.0
https://github.com/Entropy512/kernel_find7_reference/tree/kk_3.5_oppo - initial effort to rebase onto CAF kk_3.5 tag (this was the chosen CAF baseline back then)
NOTE: Over the years, Max has stripped out even more "unneeded ****" over time.
Thanks. I somewhat hoped for a more "sorted" sub-vendor patches approach but looks like the world is not yet ready for that. Will give it a shot anyway.
There are more than 30 branches (LA.BF.1.1.1) for 5.0.1 in CAF repo though and Samsung were so nice and cleared/unified all file dates in their kernel. I already wasted too much time in trying to find some place to identify the kernel somehow. Without any success though.
I think i will do as you said and compare everything starting in the middle of the branches and try to see in which direction i have to go dependent on 'diff' difference. Its 100MB download per CAF kernel and 2x500MB comparison data. I will test with 'diff -r folder1 folder2'.
Looks like its LA.BF.1.1.1_rb1.1 for Samsung-I9506XXUDOJ2 (Android 5.0.1).
Code:
git init
git remote add git://codeaurora.org/quic/la/kernel/msm
git fetch --depth 1 origin '+refs/heads/LA.BF.1.1.1*:refs/heads/LA.BF.1.1.1*'
# '--depth 1' strips commit history (for smaller download)
git checkout LA.BF.1.1.1_rb1.1
git checkout -b LA.BF.1.1.1_rb1.1-Samsung-overlay
(copy/overwrite Samsung kernel into worktree)
git add -A
git commit -m 'LA.BF.1.1.1_rb1.1-Samsung-I9506XXUDOJ2 kernel overlay'
GLOBIGNORE="*"; for i in $(git branch); do if [[ ! "$i" = "*" ]]; then echo "$i"; git diff --diff-filter=M "$i"..LA.BF.1.1.1_rb1.1-Samsung-overlay > ../"$i".txt; fi; done
# The active branch is marked with asterisk that globs to filenames. The 'if' handles that.
$ ls -lSr --block-size=K
total 196716K
drwxrwxr-x+ 1 User None 0K Mar 27 22:08 msm
-rw-rw-r--+ 1 User None 6408K Mar 27 22:29 LA.BF.1.1.1_rb1.1.txt
-rw-rw-r--+ 1 User None 6415K Mar 27 22:30 LA.BF.1.1.1_rb1.3.txt
-rw-rw-r--+ 1 User None 6422K Mar 27 22:29 LA.BF.1.1.1.c2.txt
-rw-rw-r--+ 1 User None 6432K Mar 27 22:30 LA.BF.1.1.1_rb1.4.txt
-rw-rw-r--+ 1 User None 6432K Mar 27 22:31 LA.BF.1.1.1_rb1.7.txt
-rw-rw-r--+ 1 User None 6433K Mar 27 22:30 LA.BF.1.1.1_rb1.6.txt
-rw-rw-r--+ 1 User None 6433K Mar 27 22:31 LA.BF.1.1.1_rb1.8.txt
-rw-rw-r--+ 1 User None 6453K Mar 27 22:31 LA.BF.1.1.1_rb1.9.txt
-rw-rw-r--+ 1 User None 6461K Mar 27 22:29 LA.BF.1.1.1_rb1.10.txt
-rw-rw-r--+ 1 User None 6470K Mar 27 22:29 LA.BF.1.1.1.c1_rb1.txt
-rw-rw-r--+ 1 User None 6485K Mar 27 22:29 LA.BF.1.1.1_rb1.12.txt
-rw-rw-r--+ 1 User None 6500K Mar 27 22:29 LA.BF.1.1.1.c1_rb1.2.txt
-rw-rw-r--+ 1 User None 6501K Mar 27 22:29 LA.BF.1.1.1.c1_rb1.1.txt
-rw-rw-r--+ 1 User None 6503K Mar 27 22:29 LA.BF.1.1.1_rb1.13.txt
-rw-rw-r--+ 1 User None 6510K Mar 27 22:29 LA.BF.1.1.1_rb1.14.txt
-rw-rw-r--+ 1 User None 6552K Mar 27 22:29 LA.BF.1.1.1_rb1.15.txt
-rw-rw-r--+ 1 User None 6555K Mar 27 22:30 LA.BF.1.1.1_rb1.16.txt
-rw-rw-r--+ 1 User None 6556K Mar 27 22:30 LA.BF.1.1.1_rb1.17.txt
-rw-rw-r--+ 1 User None 6570K Mar 27 22:29 LA.BF.1.1.1.c3.txt
-rw-rw-r--+ 1 User None 6577K Mar 27 22:30 LA.BF.1.1.1_rb1.18.txt
-rw-rw-r--+ 1 User None 6606K Mar 27 22:30 LA.BF.1.1.1_rb1.19.txt
-rw-rw-r--+ 1 User None 6634K Mar 27 22:30 LA.BF.1.1.1_rb1.20.txt
-rw-rw-r--+ 1 User None 6639K Mar 27 22:30 LA.BF.1.1.1_rb1.21.txt
-rw-rw-r--+ 1 User None 6653K Mar 27 22:30 LA.BF.1.1.1_rb1.22.txt
-rw-rw-r--+ 1 User None 6655K Mar 27 22:30 LA.BF.1.1.1_rb1.23.txt
-rw-rw-r--+ 1 User None 6663K Mar 27 22:30 LA.BF.1.1.1_rb1.24.txt
-rw-rw-r--+ 1 User None 6696K Mar 27 22:30 LA.BF.1.1.1_rb1.25.txt
-rw-rw-r--+ 1 User None 6714K Mar 27 22:30 LA.BF.1.1.1_rb1.26.txt
-rw-rw-r--+ 1 User None 6714K Mar 27 22:29 LA.BF.1.1.1.c5.txt
-rw-rw-r--+ 1 User None 7020K Mar 27 22:29 LA.BF.1.1.1.c4.txt
Click to expand...
Click to collapse
DualJoe said:
Thanks. I somewhat hoped for a more "sorted" sub-vendor patches approach but looks like the world is not yet ready for that. Will give it a shot anyway.
There are more than 30 branches (LA.BF.1.1.1) for 5.0.1 in CAF repo though and Samsung were so nice and cleared/unified all file dates in their kernel. I already wasted too much time in trying to find some place to identify the kernel somehow. Without any success though.
I think i will do as you said and compare everything starting in the middle of the branches and try to see in which direction i have to go dependent on 'diff' difference. Its 100MB download per CAF kernel and 2x500MB comparison data. I will test with 'diff -r folder1 folder2'.
Click to expand...
Click to collapse
If you grab CAF's git repo, it contains all branches and you can switch between them with "git checkout".
Process is something, sort-of, like:
git checkout <candidate tag> - should be able to just use the tag right from the releases page
extract Samsung tarball onto the checked out source
git diff > somefile
Look at size of somefile - Note, somewhere someone has a script that automates this whole thing and I think does it by analyzing lines of code change instead of diff patch size
I forget the sequence of git commands to pretty much clean the tree - you can do a "git diff" without committing FYI.
Repeat the above steps for each candidate
You might be able to, instead, drop the Samsung source somewhere, tag it, then diff the Samsung source's tag and the CAF tag with something like
git diff <tag1> <tag2>
eliminating the need to repeatedly drop the source onto a tag.

[ROM] [Development] [Source] [Noob] [Friendly]

Introduction & Setting Up Build Environment​
Well hello everyone today I will teach you “How to build custom ROM’s for your device from source”. So, if you are interested then please continue to read. So, first of all, you must know how Linux work and few commands for that you can simply visit here
I guess you are done with commands now let's move ahead. First and for most important… You must have a high specs PC like with i7, 16gb ram, 512gb SSD. If yes then move ahead if no then look for online cloud services like GCloud/AWS.
Setting Up Environment for the build!
Woo-ho! We will set up the environment for the build now …
Now install Linux in your PC. You can install any distro but I would suggest installing Ubuntu 16.04.
Just copy paste below codes and if asked for y/n then type y and hit enter, all set!
Code:
sudo apt-get update && sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip openjdk-8-jdk openjdk-11-jdk && sudo apt-get upgrade
Code:
git clone https://github.com/akhilnarang/scripts.git ~/scripts
cd scripts
bash setup/android_build_env.sh
All set! As mentioned earlier allow the packages to be installed by typing “y” if asked.
Syncing Sources ​
Now look for your favorite ROM sources like for me its lineage so source are here
After you are done with your sources just clone the source but before that let's make a directory where we will store our source like for me I am using android/lineage for your ROM you can change as per your wish! Well if you still didn’t get your ROM sources then I will drop down link below of my top 5 favorite ROM sources!
Now let's make our directory
Code:
mkdir android/lineage && cd android/lineage
Now let’s initialize our ROM repo like for me its lineage, but for you change it as per your ROM. Here for your info after “-b” is your branch you will have to look for your ROM and change accordingly.
Code:
repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
Well, now you will encounter a small error to fix it up just copy below code.
Code:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Replace [email protected] & “Your Name with your GitHub account email and username respectively. After that re-initize source.
Wow, it’s for Pie hehehe but it’s not yet done. We have just initialized source we are yet let to sync it. but before that please note source size is about 60-80gb so make sure you have enough bandwidth with high speed …
Now let’s sync our source
Code:
repo sync -f –-no-tags –-no-clone-bundle
Well, now you can do only one thing that is wait ... as repo is long (60g-80gb)
Done? Then why to wait just start with syncing device related sources.
Now you must be wondering what are they and why we need those… So, device related sources are of the device tree, kernel source, vendor blobs. You can find those by searching your device codename like for me I will search k5fpr device tree, k5fpr kernel source, k5fpr vendor tree (Here k5fpr is my device codename you change as per your device.) Now I got these links
DT : https://github.com/SahilSonar/android_device_lenovo_k5fpr
Kernel Source : https://github.com/SahilSonar/android_kernel_lenovo_k5fpr
Vendor Blobs/Tree : https://github.com/SahilSonar/android_vendor_lenovo_k5fpr
Well, now you don’t use these until and unless you want to build for k5fpr. You look for your device and now let’s clone them to our working dir. Again as dir. may change please edit the code as per your ROM
Code:
git clone https://github.com/SahilSonar/android_device_lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/device /lenovo/k5fpr
git clone https://github.com/SahilSonar/android_kernel _lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/kernel /lenovo/k5fpr
git clone https://github.com/SahilSonar/android_vendor _lenovo_k5fpr.git -b lineage-15.1 ~/android/lineage/vendor /lenovo/k5fpr
Now after -b is our branch just look one there in your source, which one you want to use just change it now most of the people must have thought hey man there is another way for this … We can use manifest… yes, those are 100000% but cloning is an easy way instead of manifest but still for those who want to clone using manifest then simply follow below steps instead of above … No issue you can use anyone.
First, let’s move to the dir where we are supposed to add manifest like for me its android/lineage/.repo You will have to change as per your dir.
Code:
cd android/lineage/.repo && mkdir local_manifests && cd local_manifests && nano roomservice.xml
After pasting above code you will see a text editor in that we are supposed to paste our manifest okay I am giving manifest of k5fpr you change source as per your device.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/lenovo/k5fpr" name="mohancm/android_device_lenovo_A7010a48" remote="github" revision="oreo" />
<project path="vendor/lenovo/k5fpr" name="mohancm/android_vendor_lenovo_k5fpr" remote="github" revision="oreo" />
<project path="kernel/lenovo/k5fpr" name="mohancm/android_kernel_lenovo_A7010a48" remote="github" revision="oreo" />
</manifest>
Okay, so you must be wondering what to do for my device… Well don’t worry as we have used -b here its revision so after revision what comes is our branch and after “name” it's our source link and after “path” it's our destination like we have used ~/android/lineage/device/lenovo/k5fpr. That’s all for manifest just save it and exit after that just sync sources again … Whoa man, I don’t have 60-80gb left. Well, don’t worry its just loads the repo which is downloaded also it only fetches device specific sources.
Code:
repo sync -f –-no-tags –-no-clone-bundle
Patches & Bring-up!​
Now let it finish syncing and after that, we will apply patches. Yes! Patches now most of you must be thinking what are those? Well, patches are nothing more than fixes they are located in your device tree(android/lineage/device/lenovo/k5fpr/patches) Now look there and see which patches you want to apply. If you are confused which to apply then simply apply all. Whoa man, we are new and no idea how to apply those. Well I know don’t worry I will teach you same now.
First of all copy patches from device tree to our source like for e.g I will show you how to apply bionic_libc.patch.
Code:
cp ~/android/lineage/device/lenovo/k5fpr/patches/bionic/bionic_libc.patch ~/android/lineage/bionic
Now what comes after bionic_libc.patch is our destination where we are copying our patch. For your info “cp” is nothing then copy. Now just apply it by using below codes.
Code:
cd android/lineage
git add .
git commit -m “Patch”
Now you are done with applyin bionic_libc. patch but there are many other patches left do same with those just change their dir location like we choose/bionic/bionic_lib.patch same way for other patches just changes as accordingly.
Now after you are done applying all patches lets build our ROM … Oh! Yea finally.
Well not yet before that will learn a new thing called as “bing-up” well not device is universal for every ROM but there are some changes needed to be done before you build for any ROM like for me my device tree is already on lineage but if in case I want to build aosp or rr or any other ROM I will have to do certain changes in device tree for that particular ROM. Like here we will choose AOSP.
Now move to device tree like here in my case
Code:
cd ~/android/lineage/device/lenovo/k5fpr
Now following things will require changes :
*AndroidProducts.mk
*lineage.mk (Now pretty tricky this file name is lineage if your source is for dot just consider then its dot .mk)
*vendorsetup.sh
Just these 3 needed few changes now pay careful attention or else you won't get what I am saying. Now here we are doing bring-up for aosp from lineage so first and for most, we will start with AndroidProducts.mk so I am showing before bring-up and after bring-up (These changes are done using notepad like nano AndroidProducts.mk)
Before
Code:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage.mk
After
Code:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/aosp_k5fpr.mk
Now if you can see then we have changed lineage.mk to aosp_k5fpr.mk… yes for newer oses like pie we will have to include device code name as we did so here you are supposed to change lineage to aosp_k5fpr. Well, now we will talk about lineage.mk itself as we have changed it to aosp_k5fpr there then let's change the name of the file itself for that save the change and exit notepad and copy below code to rename it.
Code:
mv lineage.mk aosp_k5fpr.mk
Here you can observe we have typed lineage.mk at first so it means we want to change this file name and to what after space we typed aosp_k5fpr.mk. This means you will have to change it as per your current makefile and to which you want. Now open aosp_k5fpr.mk by using nano aosp_k5fpr.mk
Before
Code:
#
# Copyright (C) 2015-2016 The CyanogenMod Project
# Copyright 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
# Inherit device configuration
$(call inherit-product, $(LOCAL_PATH)/device_k5fpr.mk)
# Device display
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Device identifier
PRODUCT_BRAND := lenovo
PRODUCT_DEVICE := k5fpr
PRODUCT_MANUFACTURER := LENOVO
PRODUCT_MODEL := Lenovo K4 Note
PRODUCT_NAME := lineage_k5fpr
PRODUCT_RELEASE_NAME := k5fpr
PRODUCT_RESTRICT_VENDOR_FILES := false
After
Code:
#
# Copyright (C) 2015-2016 The CyanogenMod Project
# Copyright 2017-2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Inherit device configuration
$(call inherit-product, $(LOCAL_PATH)/device_k5fpr.mk)
# Device display
TARGET_SCREEN_HEIGHT := 1920
TARGET_SCREEN_WIDTH := 1080
# Device identifier
PRODUCT_BRAND := lenovo
PRODUCT_DEVICE := k5fpr
PRODUCT_MANUFACTURER := LENOVO
PRODUCT_MODEL := Lenovo K4 Note
PRODUCT_NAME := aosp_k5fpr
PRODUCT_RELEASE_NAME := k5fpr
PRODUCT_RESTRICT_VENDOR_FILES := false
Now if you observe we removed a line “
# Inherit some common lineage stuff.
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
“ Well in aosp there is no common_full_phone.mk so we removed entire but for most of the ROM’s its common.mk So make sure you check that out. Also, path will be changed like vendor/dot/config/common.mk for dot but for aosp there is nothing so we removed. Now also we did a change to PRODUCT_NAME : aosp_k5fpr from lineage_k5fpr.mk Well that all changes needed just save it and move to last but not the least vendorsetup.sh. Just open it by nano vendorsetup.sh
Before
Code:
add_lunch_combo lineage_k5fpr-eng
add_lunch_combo lineage_k5fpr-userdebug
add_lunch_combo lineage_k5fpr-user
After
Code:
add_lunch_combo aosp_k5fpr-eng
add_lunch_combo aosp_k5fpr-userdebug
add_lunch_combo aosp_k5fpr-user
This was a simple change just aosp from the lineage that all save it and let's start building now … Wait we did bring-up just for teaching you how exactly it works but doesn’t use aosp bring-up for lineage. Also if you still see some error cannot locate makefile for your device then try changing aosp_k5fpr.mk to aosp.mk and also in AndroidProducts.mk If still not then see for common.mk file or can seek your maintainer who has made trees.
Building ROM & Basic Info regarding errors!​
Now let's start the build
Code:
. build/envsetup.sh
export USE_CCACHE=1
export LC_ALL=C
brunch aosp_k5fpr-userdebug
Now we used userdebug but I would suggest eng as debugging is on by default so as to pull logs in case ROM doesn’t boot and wont to know what went wrong. For your info “export LC_ALL=C” Enables local time as it fixes up an error which new kernel causes due to improper time. “export USE_CCACHE=1” Enables cache, now cache speed up build. If you want to know more about lunch, brunch, mka and make just read this
Now building takes a long time as of me it took ~ 5hrs but I am sure it takes around ~6 hrs.
Also some basics… Now you will see many things in screen just ignore those as you may see “warning’s” well those are normal and will see those don’t worry about those but if you see something like “error” or “failed” That means something is wrong with certain file just ask Android ROM Development Group (Telegram)about the error as I cannot help with device-related errors. Also, these errors are due to device tree issues most of the cases as your maintainer has not maintained tree properly or due to some changes required for bring-up! Additionally, your device tree may also contain build manual just have a look at it
You forgot to add build guide for Snapdragon as you said MTK and Snapdragon are different.
Good guide btw.
SkaboXD said:
You forgot to add build guide for Snapdragon as you said MTK and Snapdragon are different.
Good guide btw.
Click to expand...
Click to collapse
Added !

How to build 19.1 for SM-P555

Hi @retiredtab
First of all, thanks for all your help and hardwork in keeping Galaxy Tab A devices alive.
I am trying to build your sources to start development for my SM-P555 device and following the instructions detailed in your https://github.com/retiredtab/LineageOS-build-manifests/blob/main/191-build-instructions.txt
While executing https://github.com/retiredtab/LineageOS-build-manifests/blob/main/191-build-instructions.txt#L43, I am hitting this prompt and seeking your advice on what needs to be done.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Many thanks!
In order for line 43 to 64 to work, you need to be in the frameworks/av directory as show in line 41.
You then have to use the patch command exactly as shown if you have directories named the same.
I updated the build instructions for Sept 5th patches to reflect a compiler error. Be sure to use the new instructions.
retiredtab said:
In order for line 43 to 64 to work, you need to be in the frameworks/av directory as show in line 41.
You then have to use the patch command exactly as shown if you have directories named the same.
Click to expand...
Click to collapse
I have executed in the same folder, let me try again and confirm.
The patches have succeeded for now.
Please advise why is it reporting bad object
is it because the changes are already merged to the lineage ?
If you didn't do a repo sync earlier, you may not have the correct vendor/lineage repo.
If you
Bash:
cd vendor/lineage
git log
it should look like this (after applying the camera patch). Note it's on branch m/lineage-19.1, github/lineage-19.1
Code:
commit adac70126753c3c666396c08d068147c4226255d
Author: Kyle Harrison <[email protected]>
Date: Wed Oct 27 14:54:44 2021 +0100
soong: Update camera_in_mediaserver_defaults
- Add [email protected]
Change-Id: I1ad534d87ce3b35d0116bccdbc0ac7f70c799c00
commit cff7740aea7cb154f800a428be712e2833bd8b5a (m/lineage-19.1, github/lineage-19.1)
Author: Nicholas Merill <[email protected]>
Date: Thu Jul 7 03:43:12 2022 +0530
sensitive_pn: Updates to USA list
Change-Id: I4405a50d00d7bc3b0d70e5233104895aaecb4cde
# press q to quit
If I do a
Bash:
vendor/lineage$ git log 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
commit 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
Author: Han Wang <[email protected]>
Date: Sat Feb 26 17:54:17 2022 +0100
Remove libbfqio
* BFQ is not enabled in kernels for recent devices. Considering
that pre-MSM8998 devices are likely to be dropped, it is time
for this ricing to die.
Change-Id: I7fcf7afa7aa7c7aaab2e7ee917b1e2e8203d0abb
In addition, this commit was done April 18, 2022 has shown by
https://github.com/LineageOS/android_vendor_lineage/commit/8f67d055b36d992f2f09aa6f733aa06ee3d5b917
and it has the same commit hash.
retiredtab said:
If you didn't do a repo sync earlier, you may not have the correct vendor/lineage repo.
If you
Bash:
cd vendor/lineage
git log
it should look like this (after applying the camera patch). Note it's on branch m/lineage-19.1, github/lineage-19.1
Code:
commit adac70126753c3c666396c08d068147c4226255d
Author: Kyle Harrison <[email protected]>
Date: Wed Oct 27 14:54:44 2021 +0100
soong: Update camera_in_mediaserver_defaults
- Add [email protected]
Change-Id: I1ad534d87ce3b35d0116bccdbc0ac7f70c799c00
commit cff7740aea7cb154f800a428be712e2833bd8b5a (m/lineage-19.1, github/lineage-19.1)
Author: Nicholas Merill <[email protected]>
Date: Thu Jul 7 03:43:12 2022 +0530
sensitive_pn: Updates to USA list
Change-Id: I4405a50d00d7bc3b0d70e5233104895aaecb4cde
# press q to quit
If I do a
Bash:
vendor/lineage$ git log 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
commit 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
Author: Han Wang <[email protected]>
Date: Sat Feb 26 17:54:17 2022 +0100
Remove libbfqio
* BFQ is not enabled in kernels for recent devices. Considering
that pre-MSM8998 devices are likely to be dropped, it is time
for this ricing to die.
Change-Id: I7fcf7afa7aa7c7aaab2e7ee917b1e2e8203d0abb
In addition, this commit was done April 18, 2022 has shown by
https://github.com/LineageOS/android_vendor_lineage/commit/8f67d055b36d992f2f09aa6f733aa06ee3d5b917
and it has the same commit hash.
Click to expand...
Click to collapse
Thanks for your response.
my response for git log
Bash:
commit 86b2513158d87d7f9836248ad6e2ac5bf9ff91af (HEAD)
Author: Kyle Harrison <[email protected]>
Date: Wed Oct 27 14:54:44 2021 +0100
soong: Update camera_in_mediaserver_defaults
- Add [email protected]
Change-Id: I1ad534d87ce3b35d0116bccdbc0ac7f70c799c00
commit 8e451618f9766f17ef796d734d93216dd69122b2 (grafted, m/lineage-19.1, github/lineage-19.1)
Author: Aaron Kling <[email protected]>
Date: Wed Jun 22 15:08:04 2022 -0500
overlay: Use -television instead of -large-notouch for atv
Mobile builds on devices with no touch panel are also getting these
settings applied, which is not intended.
Change-Id: I0e0e1635ec21f0fbddcaef311b443b80f2da2b86
So the git reverse should work now. The git revert is required otherwise you will get compiler errors.
I am still getting the same error. is there anyway to delete and just resync this folder ?
Bash:
git revert 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
Result
fatal: bad object 8f67d055b36d992f2f09aa6f733aa06ee3d5b917
git status
Result
HEAD detached from 8e451618
nothing to commit, working tree clean
psuryatej said:
I am still getting the same error. is there anyway to delete and just resync this folder ?
Click to expand...
Click to collapse
I see the problem now after doing an experiment. You did a repo init with --depth=1 which only shows the last git commit in the history. See below. With --depth=1, it will never show the older git commits. I didn't notice the "grafted" earlier in the post.
Bash:
$ git clone https://github.com/LineageOS/android_vendor_lineage -b lineage-19.1 --depth=1
Cloning into 'android_vendor_lineage'...
remote: Enumerating objects: 424, done.
remote: Counting objects: 100% (424/424), done.
remote: Compressing objects: 100% (281/281), done.
remote: Total 424 (delta 93), reused 286 (delta 53), pack-reused 0
Receiving objects: 100% (424/424), 32.08 MiB | 22.65 MiB/s, done.
Resolving deltas: 100% (93/93), done.
$ cd android_vendor_lineage/
$ git log
commit fa16b42ddd1eb341f201b8d810c717ea12afe1cb (grafted, HEAD -> lineage-19.1, origin/lineage-19.1, origin/HEAD)
Author: Luca Stefani <[email protected]>
Date: Mon Sep 12 17:55:12 2022 -0400
kernel: Allow passing empty DTB to mkbootimg via board-flag
* Boot Image header v2 demands a DTB be passed by default.
* We don't /need/ one at all, as we have and use a dedicated
DTB partition.
* Signing hates trying to find dtb.img anywhere for some magical
reason, so cheat and introduce a flag to include a blank one.
Change-Id: I889ce3815476a55829870b30de1b9210283a79ae
You can add those required files back by downloading
https://github.com/LineageOS/android_vendor_lineage/tree/lineage-18.1/libbfqio
into the appropriate directories. There's only 3 small files to download, but the directory structure has to match the above URL.
By doing the above, you don't have to do the git revert.
retiredtab said:
I see the problem now after doing an experiment. You did a repo init with --depth=1 which only shows the last git commit in the history. See below. With --depth=1, it will never show the older git commits. I didn't notice the "grafted" earlier in the post.
Bash:
$ git clone https://github.com/LineageOS/android_vendor_lineage -b lineage-19.1 --depth=1
Cloning into 'android_vendor_lineage'...
remote: Enumerating objects: 424, done.
remote: Counting objects: 100% (424/424), done.
remote: Compressing objects: 100% (281/281), done.
remote: Total 424 (delta 93), reused 286 (delta 53), pack-reused 0
Receiving objects: 100% (424/424), 32.08 MiB | 22.65 MiB/s, done.
Resolving deltas: 100% (93/93), done.
$ cd android_vendor_lineage/
$ git log
commit fa16b42ddd1eb341f201b8d810c717ea12afe1cb (grafted, HEAD -> lineage-19.1, origin/lineage-19.1, origin/HEAD)
Author: Luca Stefani <[email protected]>
Date: Mon Sep 12 17:55:12 2022 -0400
kernel: Allow passing empty DTB to mkbootimg via board-flag
* Boot Image header v2 demands a DTB be passed by default.
* We don't /need/ one at all, as we have and use a dedicated
DTB partition.
* Signing hates trying to find dtb.img anywhere for some magical
reason, so cheat and introduce a flag to include a blank one.
Change-Id: I889ce3815476a55829870b30de1b9210283a79ae
You can add those required files back by downloading
https://github.com/LineageOS/android_vendor_lineage/tree/lineage-18.1/libbfqio
into the appropriate directories. There's only 3 small files to download, but the directory structure has to match the above URL.
By doing the above, you don't have to do the git revert.
Click to expand...
Click to collapse
Many thanks for explaining the details.
I am using the fix from the link below to build lineage-19.1 on 8gb ram
Workarounds for building Android 12 on 8GB RAM
I am getting the error during the build process and sharing the full log in
Error log
please let me know your thoughts on this
I never had that error. For your error, I suggest you do a
Code:
make clean
brunch
If that doesn't work, perhaps your repo sync didn't work and one or more repos is out of sync. I would run repo sync again.
Where is your manifest.xml and source code for 19.1?
retiredtab said:
I never had that error. For your error, I suggest you do a
Code:
make clean
brunch
If that doesn't work, perhaps your repo sync didn't work and one or more repos is out of sync. I would run repo sync again.
Where is your manifest.xml and source code for 19.1?
Click to expand...
Click to collapse
Noted, Will try repo sync again.
I haven't started building sm-p555
Still using your manifest.xml and source code only.
Once the build succeeds, I will start mine.
psuryatej said:
Noted, Will try repo sync again.
I haven't started building sm-p555
Still using your manifest.xml and source code only.
Once the build succeeds, I will start mine.
Click to expand...
Click to collapse
make clean and repo sync didn't help
I am trying to download the full sources without depth=1 and see if that helps.
psuryatej said:
make clean and repo sync didn't help
I am trying to download the full sources without depth=1 and see if that helps.
Click to expand...
Click to collapse
I've followed those same instructions for the Aug 5th and Sept 5th security patches and it works. I also had someone else build 19.1 SM-T710 with similar instructions.
Mine was built using Lubuntu 20.04 and 22.04.
retiredtab said:
I've followed those same instructions for the Aug 5th and Sept 5th security patches and it works. I also had someone else build 19.1 SM-T710 with similar instructions.
Mine was built using Lubuntu 20.04 and 22.04.
Click to expand...
Click to collapse
I am building using
HOST_OS_EXTRA=Linux-5.13.0-52-generic-x86_64-Ubuntu-20.04.4-LTS
@retiredtab Thanks for all your response. Can you help to build SM-P555 using my repositories here ? Repo
psuryatej said:
@retiredtab Thanks for all your response. Can you help to build SM-P555 using my repositories here ? Repo
Click to expand...
Click to collapse
The 19.1 build instructions, manifest, device trees, commits are on my github. You have to replicate all those to your own trees. All the hard work has been already done by me.

Categories

Resources