In a nutshell, I just wanted a single thread to gather links to some of my other, larger projects, but also serve as a spot I could put some smaller scripts and zips I've created that I don't think merrit their own separate threads. This is partially for my own sanity and will hopefully make it easier for others to find some things as well. A lot of the stuff here was developed with the GN, N5 or N7s (my devices) and Windows in mind, but could generally be applicable to most devices either out-of-the-box or with some slight modification. If you see something that inspires you, go ahead and mod it, just let me know and give me some credit somewhere. If anyone would like to know the specifics of what's in a particular script that I haven't already linked to more information on, just let me know and I'll post that in here as well.
Note: Older zips with a "cwm-" prefix are NOT only for the now-defunct ClockworkMod Recovery, the prefix was used to denote a flashable zip before I adopted Chainfire's "UPDATE-" prefix. Please use a currently maintained recovery, like TWRP, for all zips to ensure the best compatibility/results.
My development work on my many projects comes out of my free time, so if you enjoy this project or anything else I've done on xda, please do hit the donate link from my profile. Thank you for your support!
- AnyKernel2 (many devices) - link
AnyKernel was a simple template for an update.zip that could apply any kernel to any ROM, regardless of ramdisk to reduce the chance of any issues arising from the custom kernel pairing. The drawback to this is that some kernels require modifications to the ramdisk to enable/set up kernel features, and in the old AnyKernel format there was no way to do this. AnyKernel2 pushes the format even further by allowing kernel developers to modify the underlying ramdisk for kernel feature support easily using a number of included command methods along with properties and variables to customize the install experience.
- APK-Patcher (many devices) - link
Simplifies APK modification to make it easier for modification creators to keep creating. Using JesusFreke's brilliant bak/smali and iBotPeaches' excellent apktool, modified to run on-device along with the various binaries required, allows on-the-fly APK modifications to be applied via recovery, to whatever ROM APK is present, taking the constant update burden off of the modification creator. The zip is smart and automated, using the APK name to run all the various parts involved for complicated patches and is extensible to any number of APKs in a single zip.
- Android Image Kitchen (many devices) - link
A collection of Windows/Android ports of the necessary Linux utilities for Android image (kernel+recovery) mod work, and my own automation script to unpack, edit and repack the ramdisk. Other guides/scripts exist but none of them are universal for target device, compression and/or developed for Windows/Android. Now also Linux builds to bring my improved featureset back to where it came from. Has been extremely useful for me in my messing around with kernel ramdisks.
- ADB Screenshot (many devices) - attached
Take screenshots while in recovery. Useful for development of recovery apps or error reporting. Original method had lots of different threads around with the general method for various devices but I figured out a couple tricks required for getting it working on the Galaxy Nexus and then automated the process. Tested and confirmed working with both pixel formats of CWM and TWRP. More information in this GN Q&A FFmpeg thread. New method uses fb2png and should work on all ARM devices.
- ADBsync sdcard Backup (many devices) - attached
Backs up the entire sdcard so that you can have a complete snapshot of your device when you make periodic backups, and be able to restore things exactly as they were. Automates the sync process of Renate NST's great ADBsync utility which makes only newer files get pulled, significantly decreasing backup time for the sdcard compared to "adb pull". Original version posted in the old ADBsync thread. Defaults for devices with /data/media/ internal sdcards (Nexus devices, etc.), but is easily customizable to backup other mountpoints.
Flashable Script Zips
- Nexus BootUnlocker script (GN, N4, N5, N7 '13, N10) - attached
I don't know about everyone else but sometimes I find I've rebooted into the bootloader only to realize I've forgotten to unlock it in segv11's excellent BootUnlocker App beforehand. Well, I decided to make a BootUnlocker Script for my Galaxy Nexus so I could just boot to recovery quickly, unlock, then adb reboot-bootloader (or use my Reboot To Bootloader script below) to get back without having to fully boot the OS to make the change. Also extremely useful in the case you aren't able to boot. As with the app there is no data loss like there would be with fastboot, allowing you to relock for safety. Originally posted in the GN EDIFY Scripting thread. Modified for the newer Nexus devices and combined into a single Nexus BootUnlocker zip with tamperbit reset support added using information from the BootUnlocker App Dev thread. For newer devices using Factory Reset Protection (N6 and later), the BootUnlocker Script can't directly toggle the lockstate due to new security tokens, but it does now toggle the ability to use "fastboot oem unlock" without needing a booted device.
- N7 BootUnlocker script (N7 '12) [creation guide] - link
The Nexus 7 2012 is a special case. Per-device encryption of an entire partition makes it impossible to support the N7 '12 in a simple root app, or flashable zip as above, however using my guide and included script you can now create a working BootUnlocker Script Zip for your specific device. As with the above scripts there is no data loss like there would be with fastboot, allowing you to relock for safety.
- sdcard Fix Permissions script (many devices) - attached
A little flashable zip script to fix ownership and permissions of files and directories on the sdcard to what they would be if Android OS had put them there itself, since some apps can't access pushed files that have root.root as owner/group. This is useful when restoring to your sdcard backup, as with my ADBsync sdcard Backup batch script above, since generally, pushed files get root.root from adb shell and higher permissions than usual. Also a solution for a bug where sdcard files get lower permissions somehow, resulting in similar access problems. Currently written for devices with /data/media/ internal sdcards (Nexus devices, etc.), but could easily be modified for other mountpoints.
- SUmount script (many devices) - attached
Another tool for the toolkit of anyone using Chainfire's brilliant SuperSU systemless root, this simple flashable zip script toggles the mounting of the su.img while in recovery to allow easier access to the /su filesystem, simplifying manipulating it via ADB shell, AROMA Filemanager or TWRP's terminal/file manager. Especially useful to anyone who uses su.d scripts or can't boot due to some issue with a user addition in /su/su.d or /su/bin.
- unSU script (many devices) - link
While experimenting with Chainfire's brilliant SuperSU systemless root, I discovered that uninstalling the older style system-modifying root through his app (<2.60) didn't restore all of the modified system files correctly, so I wrote this script to do so and aid in people wanting to unroot from recovery. Expanded to support uninstallation of Koush's SuperUser, phh's Superuser, SuperSU Systemless and custom ROM su binaries.
- Adreno Systemless Installer script (N5, N6, N7 '13) - link
For use with Qualcomm's official updated preview GPU drivers packages for Adreno 3xx/4xx-powered Nexus stock images, this is technically a script and not an installer because it is only a different frontend to take whatever device zip from Qualcomm is in the same directory as it and unpack it then install it into the SuperSU systemless root /su filesystem instead of the usual /system, allowing OTA and SafetyNet checks to pass.
- Kernel MultiROM Injector script (many devices) - attached
Intended for use in Chainfire's excellent FlashFire app to automate re-injecting the current boot image ramdisk with Tasssadar's brilliant MultiROM's trampoline bootmenu; this avoids having to do this as an extra step in MR-TWRP following an OTA, ROM Delta or SuperSU update. Should work for all EMMC devices with MultiROM installed.
- GN PIT Editor script (GN) - link
Dumps and alters the Galaxy Nexus' Partition Information Table (PIT) to reclaim unneeded space from the /cache partition and add it to /system to allow for larger ROMs and GApps packages to make continued support for Lollipop+ easier. The resulting file is byte-for-byte identical to those created by external tools like PIT Magic, so that it may be flashed back to the device in Odin Mode to complete the repartitioning.
- Kernel Emergency Reset script (many devices) - link
Basically a go-to cure-all for custom kernel users experiencing issues after an upgrade due to old settings left over in a kernel control app (eg. franco.Kernel updater, Trickster, etc.), or problematic init.d/userinit.d scripts. It's also useful if you just want to make sure you're running clean defaults without conflicts.
- Reboot To Bootloader script (all devices) - attached
Those who prefer using CWM may have noticed a couple of things missing that the other popular custom recovery, TWRP, has built-in. One of these is a file explorer/manager, which is answered by amarullz' brilliant AROMA Filemanager. Another thing I found myself wanting is a way to reboot back to the bootloader once I'm in recovery, so I created this very very simple flashable zip script. (No longer required on CWM >=22.214.171.124). Note: Once in the bootloader, "Start" will boot you back to recovery. Not sure why, but it's not a big deal, just reboot normally from recovery at that point.
Flashable Installer Zips
- Flashlt Installer script (many devices) - attached
Installs my Flashlt script to allow easy flash and dump of boot, recovery and radio/modem EMMC or MTD partitions while booted, and trimming of null characters from files. Also installs a script zip that makes flashing boot.img (kernel), recovery.img, and radio.img/modem.img (baseband) files via recovery simple. It aims to save the average user the hassle of repacking their own image zip, or using the command-line or fastboot to flash it. Place an appropriately named file in the same directory as the zip and flash away! Should work on all emmc devices with normal partition naming ("boot", "recovery" and "radio" or "modem") which accept Android standards-compliant images. Extremely handy when used with amarullz' brilliant AROMA Filemanager, and/or my Android Image Kitchen: Mobile Edition (linked above).
- Busybox Installer (all devices) - attached
As a byproduct of building my own static busybox compiles in all supported Android architectures for my AIK-mobile package I figured I might as well offer them up separately as well since there weren't any providers making Android x64 builds when I was researching. The installer detects what architecture (ARM/ARM64, x86/x86_64, MIPS/MIPS64) your device uses and installs the correct busybox binary accordingly. It then cleans up any symlinks from a possible previous installation in the same directory and generates new symlinks directly from the output of the installed binary. Detects and supports "systemless" root via SuperSU/Magisk installation as well. Please read the release post about applet inclusion.
- nano Terminal Editor Installer (many devices) - attached
A simple installer to push my own static Android ARM build of the nano editor binary to /system/xbin/ along with the required files in /system/etc/terminfo/. Detects and supports "systemless" install via SuperSU/Magisk as well. It can then be used from Terminal while booted from that point on. Each time you flash it also temporarily enables use in recovery by pushing a script to /sbin/nano with the required environment variables, so you can then trigger it from recovery shell or the console in amarullz' brilliant AROMA Filemanager. Makes it extremely easy and worry-free to tweak and mod on the go, knowing you can edit the faulty build.prop or init.d script if something goes wrong.
- adb + fastboot Installer (many devices) - attached
Marshmallow has removed adb from the /system/bin directory. For those wanting this functionality back, here's a simple installer to push static compiles of adb and fastboot to /system/xbin and uses a command wrapper to point adb to the correct HOME directory and ser TMPDIR for compatibility. Detects and supports "systemless" install via SuperSU/Magisk as well. It can then be used from Terminal while booted from that point on.
- Nexus Media Installer (many devices) - attached
Custom ROMs often don't include the Google ringtones/notifications/system sounds and bootanimation, instead including numerous, terrible sounds and often less-than-desirable visuals. This zip installs the Nexus media for recently-retired Nexus devices, using the zip name to allow user choice, systemlessly installed (SuperSU and Magisk supported) or with an addon.d script to survive a ROM update or dirty flash.
- odex Script Installer (all devices) - attached
Based on the great work and binaries from this thread, a simple installer to push my odex script along with the required dexopt-wrapper and zip binaries to /system/xbin and set the appropriate permissions. Automates the procedure to odex any apk or jar from the commandline to potentially improve performance. Dalvik runtime (KitKat and below) only. Also uses cut from busybox.
- Kernel init.d Support Injector (many devices) - attached
Following from great ideas by Captain_Throwback in my AnyKernel2 thread and using script from my Flashlt script above, this AK2 zip will inject basic init.d bootscript support into any kernel ramdisk on any emmc device with normal partition naming and using the Android bootable image standard, without having to bloat a ramdisk using a busybox binary. This zip is also signed, so could potentially be used with non-Nexus stock recovery on a locked bootloader.
- CMSetup Fix for GApps Installer (many devices) - attached
Installs a su.d script fix to work around the CyanogenMod ROM issue of a broken Quick Settings pull-down when CMSetupWizard is removed as part of a GApps installation. Removing CMSetupWizard is useful because it allows Google's SetupWizard to grant apps default permissions, so the workaround automatically executes the only required command at the appropriate time following first boot. Requires a SuperSU installation (for su.d support). Flash after the SuperSU zip and your GApps.
- Dev Team init.d Pack Installer (all devices) [see "950iosettings, etc." below] - link
A simple installer I wrote to create the /system/etc/init.d/ directory, extract the latest init.d scripts as published by the "Franco's Dev Team" tuning collective (of which I was a member), then set correct owner, group and permissions to the entire init.d directory. If you are a developer and would like to include these tunables/scripts in your kernel or ROM please provide credit. A lot of time and effort has gone into this project and that's all we ask.
Credits & Thanks: All authors of any included binaries and libraries for their amazing work. Anyone who's helped me with these projects along the way.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
osm0sis' Odds and Ends -- Misc./Batch Tools, Flashable Zips, Scripts, etc., Tool/Utility for the Android General
Source Code: https://github.com/osm0sis
Last Updated 2017-03-04