- Generating signing keys (Part 1)
- Generating signing keys (Part 2)
- Making signed build (recovery)
- Making signed build (fastboot)
- Making incremental update
All you need is an android buildsystem (I would recommend you to use lineageos)
# First time building A12 | |
Open terminal and run: | |
sudo bash | |
mkdir /mnt/ccache | |
exit | |
sudo mount --bind /home/masemoel/.ccache /mnt/ccache | |
export USE_CCACHE=1 && export CCACHE_EXEC=/usr/bin/ccache && ccache -M 60G && export CCACHE_DIR=/mnt/ccache | |
(set ccache -M with the maximum of GB of your disk you wanna set available for ccache, and home/masemoel with home/ and your username on your Linux environment). |
--- a/smali/com/qualcomm/qti/internal/telephony/WifiManagerCompatible.smali | |
+++ b/smali/com/qualcomm/qti/internal/telephony/WifiManagerCompatible.smali | |
@@ -17,7 +17,7 @@ | |
.locals 1 | |
.line 15 | |
- sget-boolean v0, Lmiui/os/Build;->IS_GLOBAL_BUILD:Z | |
+ const v0, 1 | |
return v0 |
To build a A14+ (AOSP/LOS based) on Ubuntu 24.04+ (or distros based on it), there are four main steps: | |
(This guide is applicable for recoveries as well (TWRP, OFRP...)) | |
Working on Android 14 and upper | |
################################################################# | |
# Step 1: Setup your environment # | |
################################################################# | |
****Setup Linux to build Android**** |
Model: MMC DH6DAB (sd/mmc) | |
Disk /dev/block/mmcblk0: 62.5GB | |
Sector size (logical/physical): 512B/512B | |
Partition Table: gpt | |
Disk Flags: | |
Number Start End Size File system Name Flags | |
1 20.5kB 10.5MB 10.5MB fat16 oppodycnvbk | |
2 10.5MB 21.0MB 10.5MB oppostanvbk | |
3 21.0MB 23.1MB 2097kB modemst1 |
import glob | |
import csv | |
dictCSV = "C:/path/to/androidx-class-mapping.csv" | |
projectPath = "C:/path/to/project/src/" | |
def replace_all(text, dic): | |
for i, j in dic.items(): | |
text = text.replace(i, j) | |
return text |
# Adjust the following variables as necessary | |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=500 | |
# check if the branch exists on the remote | |
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# if so, only push the commits that are not on the remote already | |
range=$REMOTE/$BRANCH..HEAD | |
else |
#!/usr/bin/node | |
const DEBUG = false; | |
const relativeFilesDirectory = process.argv[2]; | |
const relativeFileStart = process.argv[3]; | |
const filesDirectory = path.resolve(relativeFilesDirectory); | |
const fileStart = path.join(filesDirectory, relativeFileStart); |
# Goto android source code root and then execute following commands | |
# Keep the logcat.log in the root | |
export ANDROID_BUILD_TOP=$(pwd) | |
./external/selinux/prebuilts/bin/audit2allow -p out/target/product/{devicename}/root/sepolicy < logcat.log | |
# Copy the generated rules in respective files in the device tree |