[Android Software/Hacking General [Developers Only]] osm0sis:
Knowledge Base

Links to information/research posts I've made and other experiments.

----

avbtool-arm (zip package) - link

AOSP's BootSignature.jar for AVB v1 was relatively simple to run on-device for boot.img modifying flashable zips like SuperSU and AnyKernel2 but avbtool for AVB v2 is written in Python, so that makes things a bit trickier. For experimentation I whipped up a little wrapper script to run avbtool on-device with an actual Python interpreter.

Omni SoundPacks (and Nexus Stock pack) - link

My suggested expansion to the Omni SoundPacks feature to allow it to cover all SystemUI sounds.

OnePlus FingerPrint Material Icons (Information) - link

My preferred fingerprint icon for the in-screen OP6T sensor using Zacharee1's excellent OPFPControl app.

N4/N5/N7 '13 Qualcomm Optimized Bionic/Dalvik Patch Comparisons (updated zips) - link

Using Qualcomm optimized files on Snapdragon devices improves performance greatly on KitKat. Especially good on Nexus devices or AOSP ROMs. I took the time to dissect the required files and see what worked best.

----

AIK Build Farm (desktop shell script) - link

The Cygwin shell script "build farm" I wrote for my Android Image Kitchen project to perform all of the cross-compiles required for the mobile and Linux versions. Allows someone to setup the repos from scratch and build.

Louder Farm (zip packages) - link

The Nexus Louder project was a pretty massive system file modifcation undertaking. This details my work to make building the patch zips easy for co-dev Misledz, and includes the farm packages at various stages.

----

PIF custom.pif.json/pif.json Guide (Reference/How-To/Template) - link

I took the time to write up my Play Integrity MEETS_DEVICE_INTEGRITY verdict testing/findings as a step-by-step information post to help people find build.prop files, then create and use a custom.pif.json for spoofing use with my PlayIntegrityFork (or pif.json for chiteroman's PlayIntegrityFix) Zygisk module.

Complete Shell Script Flashable Zip Replacement + Signing Documentation (Reference) - link

Using a shell script instead of an update-binary in flashable zips can make them universal for architecture and put a lot more power in the hands of the developer. This reference documents all of the analogous functions myself and others have written to make this easy.

Booted Zip Flashing Shell Setup Script (Reference/How-To) - link

My implementation of booted zip flashing, originally for AnyKernel2 in Franco Kernel Updater (now Franco Kernel Manager) and since expanded to support AK3's ability to be flashed from anywhere and support most other flashable zips on devices that allow remounting /.

Unified ext4/f2fs ramdisk + ROM installer (Reference) - link

Supporting multiple filesystems like ext4 and f2fs in a custom kernel boot.img ramdisk required some work before custom ROMs were updated to do this themselves and use fallback fstabs. This is the roll-up post gathering all the changes necessary for someone to add this pre-official support to their ramdisk, kernel and ROM installers.

FlashFire Recipe Book (Reference/How-To) - link

Just a quick reference of common tasks (OTA flashing, etc.) for people figuring out how to use Chainfire's brilliant flashing app.

personal addon.d (How-To/Template) - link

I was tired of having to redo a number of tasks (remove files, backup Nexus sounds and replace the AOSP ones, etc.) to get my device back to where I wanted it after flashing a newer nightly, so I wrote an addon.d script to do it all for me. Provided if anyone wants to modify it for their own personal setups.

KBox2: Set Up A Build Environment On Android (How-To) - link

Very cool Linux-like command prompt environment on Android. I originally had it set up as a native build environment with rudimentary git support. You can follow my steps to do the same.

Keeping SafetyNet Passing With Incremental Google OTA on Virtual A/B Devices (How-To) - link

Post-reboot checks added to the incremental OTA process for Virtual A/B devices using Google's servers made it impossible to remain rooted throughout the OTA process, but following these instructions you can complete the OTA then re-root without SafetyNet catching you.

Cygwin-Linux Cross-Compiler (How-To) - link

Compiling from Cygwin with a Linux target required some fixes to the toolchain, so I detailed them for future reference.

----

N7 '13 Bootloader cracking (Information) - link

Sat down with my parents' Nexus 7 2013 (before I got my own) over Christmas and cracked the bootloader for unlock support via my Nexus BootUnlocker Script zip and later the official BootUnlocker App.

N7 '13 Unbricking (Information) - link

Instructions I put together for recovering from a hard brick (bad bootloader flash usually), via the exposed Qualcomm/Marshall London "HS-USB Diagnostics 9006" mode.

Default System Alarm Setting Script (Information) - link

A script snippet function to allow easily changing the default alarm sound on ROMs that hide this ability, like OnePlus' OxygenOS.

SELinux Audit2Allow Script (Information) - link

A script snippet for turning SELinux audits in a logcat into allow statements ready for supolicy or magiskpolicy.

Partition Dumping Script (Information) - link

A script snippet for dumping all non-userland partitions from any eMMC device, useful for bootloader lockstate hacking.

GN Partition Information Table (PIT) Research (Information) - link

Wanting to push the GN as far as possible, several remaining users came together to discuss how it could be repartitioned to add more space to /system to better support Lollipop+ and I contributed a large amount of R&D over several posts throughout the thread which resulted in the PIT Editor script zip (posted above). Could be useful for other devices using PITs as well.

GN/N7 '12 tunables post (deprecated) (Information) - link

The list of supported basic tunables on franco.Kernel for the Galaxy Nexus and Nexus 7 2012 back when those were my primary supported devices.

GN scheduler tunables HZ scale (Information) - link

The Galaxy Nexus scheduler (and other) tunables opperate on an odd scale due to the the device's HZ value in the source being weird. This post experiments with that and finding the method/equation behind it.

LMK boot timing (Information) - link

The Android lowmemorykiller module default tunables go through a bizarre sequence during boot, so I experimented and came up with a script to allow setting alternates as soon as possible.

LMK Launcher Whitelist/Niceness settings reversion (Information) - link

Setting oom_adj values and changing the niceness on launchers and systemui improved responsiveness and helped avoid these important processes being killed by LMK. Then I noticed sometimes they spontaneously reset; experimentation followed.

MTD partition flashing (Reference) - link

My MTD-based MX Box set-top device gave me a few hours of headaches until I figured out how to dump and flash the boot (kernel) partition correctly. This details my experiments and the correct procedure I discovered.

Pixel Launcher bind mount instructions (Reference) - link

I was annoyed that on stock Nexus 5X and 6P Pixel Launcher wasn't available and when sideloaded lost the Google Feed pane, so I replaced Google Now Launcher with Pixel Launcher using bind mounts.

Netflix broken DRM workaround instructions (Reference) - link

Custom Nexus 7 2013 ROMs Nougat+ have all had issues with Netflix due to some peculiarities of the DRM libraries the ROMs use, but some found that intentionally semi-breaking DRM using files from other devices allows Netflix to work again, but this broke Google Play Movies. I did some more testing, resolved the Play Movies issue and wrote up how to install the single needed replacement library either to system or with a systemless bind mount.

----

nano Android static build instructions (Reference) - link

A little documentation of all the dirty tricks I used to get the nano terminal editor utility to build for Android from the official git repo source.

mtd-utils Android static build instructions (Reference) - link

A little documentation of all the dirty tricks I used to get mtd-utils to build for Android from the official git repo source.

zip Android static build instructions (Reference) - link

A little documentation of all the dirty tricks I used to get zip to build for Android from the official tarball source and patches.

----

Thanks for the interest! More to come, I'm sure!