# fetch source
sudo yum install git
sudo yum install wget
# to compile
sudo yum install java-1.7.0-openjdkSo, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.
Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.
Prerequisite: Certain requirements are to be met before you start with this amazing journey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Remove repository configuration | |
| git config --unset [key] | |
| # Remove global configuration | |
| git config --global --unset [key] | |
| # Remove system configuration | |
| git config --system --unset [key] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| installmake () | |
| { | |
| cd /tmp || exit 1 | |
| axel -a -n 10 https://ftp.gnu.org/gnu/make/make-"${1:?}".tar.gz | |
| tar xvzf /tmp/make-"${1:?}".tar.gz | |
| cd /tmp/make-"${1:?}" || exit 1 | |
| ./configure | |
| bash ./build.sh | |
| sudo install ./make /usr/local/bin/make | |
| cd - || exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To build a A10+ (AOSP/LOS based) on Ubuntu 20.04+ (or distros based on it), there are four main steps: | |
| (This guide is applicable for recoveries as well (TWRP, OFRP...)) | |
| Working on Android 9, 10, 11 and 12 | |
| ################################################################# | |
| # Step 1: Setup your environment # | |
| ################################################################# | |
| ****Setup Linux to build Android**** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Workarounds for building S on 8GB RAM environment: | |
| 1. At the start of the build: | |
| [ 99% 138/139] /mnt/ssd/lineage/out/soong/.bootstrap/bin/soong_build /mnt/ssd/lineage/out/soong/build.ninja | |
| This used to take around 30mins, after enabling zram now it takes around 30secs (thanks to @kdrag0n for the zram idea) which is on par with what happens in 16GB RAM building environments | |
| sudo apt install zram-config for installing zram-config package | |
| sudo nano /etc/fstab and add a # in front of the swap disk if you have one and then reboot | |
| After booting cat /proc/swaps to check if zram is enabled or not |
Migrated with additional information to my blog: https://msfjarvis.dev/posts/understanding-and-resolving-selinux-denials-on-android/
Denial in question
avc: denied { read write } for pid=29059 comm="i.tetherservice" name="ipa" dev="tmpfs" ino=11991 scontext=u:r:system_app:s0 tcontext=u:object_r:ipa_dev:s0 tclass=chr_file permissive=0
sepolicy fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| while true; | |
| do | |
| echo "running ..." | |
| sleep 2s | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| git clone https://github.com/ccache/ccache.git && cd ccache | |
| mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| udp://tracker.opentrackr.org:1337/announce | |
| https://tracker2.ctix.cn:443/announce | |
| https://tracker1.520.jp:443/announce | |
| udp://opentracker.i2p.rocks:6969/announce | |
| http://tracker.openbittorrent.com:80/announce |
OlderNewer