Skip to content

Instantly share code, notes, and snippets.

View mikecriggs's full-sized avatar

Michael S Corigliano mikecriggs

View GitHub Profile
RULES FOR ANDROID BUILDER'S HELP
July 23, 2022
THESE RULES ARE NON-NEGOTIABLE.
FAILURE TO COMPLY MAY RESULT IN A WARNING BY AN ADMIN (3 WILL BAN YOU) OR AN IMMEDIATE BAN.
ALL ADMINS MAY WARN/BAN AT THEIR OWN DISCRETION AS LONG AS THEIR REASONING FALLS WITHIN THE SCOPE OF THESE RULES.
A BAN HERE MAY RESULT IN A BAN IN OUR RELATED CHATS (OFF-TOPIC, LINUX KERNEL BRICKERS, BRINGUP/FW, ETC)
@mikecriggs
mikecriggs / metalava_workaround_android-10
Created July 18, 2020 13:28
Metalava issue workaround Android 10
If you're building Q and getting metalava errors apply:
https://github.com/Magma-WIP/build_soong/commit/bcd1bb529132905cf55e72f5a2a6ba19a99f60ac
https://github.com/Magma-WIP/build_soong/commit/dc3365fbde3b2a5773e655f690bb073967100795
If build fails even with the commits applied try building SystemUI with -j1
It can also be a good idea to increase swap
Command:
cd build/soong && git fetch https://github.com/Magma-WIP/build_soong ten-metalava && git cherry-pick bcd1bb529132905cf55e72f5a2a6ba19a99f60ac^..dc3365fbde3b2a5773e655f690bb073967100795
@mikecriggs
mikecriggs / 8GB_android-10_compilation-note
Created July 18, 2020 13:25
Workarounds for building Android 10 on 8GB RAM
Workarounds for building Q on 8GB RAM environment:
1. At the start of the build:
[ 99% 138/139] /mnt/ssd/aosip/out/soong/.bootstrap/bin/soong_build /mnt/ssd/aosip/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
Allocating group tables: 0/12 done
Writing inode tables: 0/12 done
Writing superblocks and filesystem accounting information: 0/12 done
loaded 987 fs_config entries
Created filesystem with 997/1152 inodes and 371014/381862 blocks
2020-01-05 11:51:37 - common.py - INFO : Running: "simg2img /home/criggs/android/du/out/target/product/bonito/obj/PACKAGING/target_files_intermediates/du_bonito-target_files-eng.criggs/IMAGES/product.img /home/criggs/android/du/out/target/product/bonito/obj/PACKAGING/target_files_intermediates/du_bonito-target_files-eng.criggs/IMAGES/unsparse_product.img"
2020-01-05 11:51:38 - common.py - INFO : error: file_write: write: No space left on device
Cannot write output file
#!/bin/bash
#
# A simple build script for StatiXOS
# Written by Michael S Corigliano (Mike Criggs) <michael.s.corigliano@gmail.com>
#
# Usage: ./build.sh <DEVICE> <CLEAN OPTION> <OFFICIAL OPTION>
# Clean options: rm, clean, clobber, installclean
# Official options: official, nuclear
#
@mikecriggs
mikecriggs / Gerrit Cheat Sheet
Created November 27, 2018 20:19
Thanks to @bigrushdog for this
** FORCE PUSH **
git push --force ssh://bigrushdog@review.invictrixrom.com:29418/vendor_support HEAD:refs/heads/inv-9.0
** REGULAR GERRIT PUSH **
git push ssh://bigrushdog@review.invictrixrom.com:29418/manifest HEAD:refs/for/inv-9.0
** CREATE PROJECT **
ssh -p 29418 bigrushdog@review.invictrixrom.com gerrit create-project kernel_oneplus_msm8996.git
** DIRECT PUSH **
@mikecriggs
mikecriggs / build-inv.sh
Last active July 19, 2018 20:43
A simple build script written for InvictrixROM
#!/bin/bash
#
# A simple build script for InvictrixROM
# Written by Michael S Corigliano (Mike Criggs) <michael.s.corigliano@gmail.com>
#
# Usage: ./build.sh <DEVICE> <CLEAN OPTION>
# Clean options: rm, clean, clobber, installclean
#
#!/bin/bash
#
# Git clone OpenGapps
#
git clone git@github.com:opengapps/aosp_build.git -b master vendor/opengapps/build
git clone git@github.com:opengapps/all.git -b master vendor/opengapps/sources/all
git clone git@github.com:opengapps/arm.git -b master vendor/opengapps/sources/arm
git clone git@github.com:opengapps/arm64.git -b master vendor/opengapps/sources/arm64
@mikecriggs
mikecriggs / upload.sh
Created January 30, 2018 22:22
Upload with sftp via bash
#!/bin/bash
#
# upload via sftp
#
# fill out the following definitions
DEVICE="$1"
ROM=""
USER=""
@mikecriggs
mikecriggs / build.sh
Last active January 30, 2018 22:02
Build script
#!/bin/bash
#
# Build script
#
# Definitions
DEVICE="$1"
TIMESTAMP=$(date +"%Y-%m-%d-%S")
ROM=""