Please, make a backup or be prepared to roll back to a working state somehow. You are using this tool on your own responsibility. You have been warned!
If anything goes wrong, flashing another kernel that was working for you before should return your device to a working state.
Repository on GitHub
This is a recovery tool primarily made for kernel/ROM developers, but anyone is welcome to use it, provided he knows what to do. It was made to enable kernel developers to have a single .zip with the kernel which will work on all partition layouts like All-F2FS, Data-F2FS and All-EXT4 (the standard layout).
It takes a boot.img, unpacks it during the installation, finds out what partition layout is used on the device, changes the fstab in the ramdisk accordingly, repacks the boot.img and flashes it.
Instructions for kernel/ROM developers/flashaholics who wish to incorporate this tool:
- Make sure your kernel is compiled with F2FS drivers.
- Download agnostic-kernel-template.zip
- Replace the boot.img-placeholder in the .zip with your boot.img.
- OPTIONAL: change the fstab in fstab/ folder to specify any mount options you wish to use. Make sure you include a line for each partition and filesystem combination you want to use.
- OPTIONAL: change the updater-script to print any additional messages or make modifications to the kernel after flashing.
Instructions for users who wish to try this tool:
- Choose one of the prepacked kernels you wish to install and download it.
- Install it via recovery.
Instructions for people who wish to port it to other devices:
- Change the asserts in updater-script to check for your device name.
- Change the fstab in the fstab/ folder. Make sure you include a line for each partition and filesystem combination you want to use.
- Change the FSTAB variable in tools/repack-and-flash.sh to contain the name of your fstab file.
- Change the BOOT_PARTITION variable to contain the path to your /boot partition device.
Currently supported partition layouts:
Filesystem changes are supported only on these partitions because the Nexus 7 doesn't have any other EXT4 partitions by default.
- /system on EXT4 or F2FS
- /cache on EXT4 or F2FS
- /data on EXT4 or F2FS
If you want to add support for some other device specific layout (F2FS formatted SD card comes to mind, for example), feel free to do so or contact me, but it may require some changes to your recovery too.
- 3.2.5-XPerience by @TeamMex
- LegoKernel / SlimKernel by @legolas93
- franco.Kernel by @franciscofranco and modified by @HTCDreamOn
- linux-tegra-nv-3.1-grouper by @HTCDreamOn
- M-Kernel by @Metallice
- ROM shouldn't matter, I tested on various 4.4 / 5.0 ROMs and even without a ROM and it always worked.
Pre-packed kernels:You can download other kernels using agnostic-kernel in their respective threads.
Kernel from SlimROM by @legolas93
3.2.5-XPerience-19 by @TeamMex
Empty template for devs:
If you wish to incorporate or modify this tool, please, mention me somewhere, thanks
- Android Image Kitchen - @osm0sis - this wouldn't be possible without him
- F2FS Recovery - @legolas93
- Kernels on which I tested - @TeamMex & @legolas93 & @franciscofranco & @HTCDreamOn & @Metallice
- Recovery magic - @Chainfire & @_that
- Answers to a lot of my problems - forum.xda-developers.com community
- Some nice ideas - @Metallice
- Partition layout checking, scripting - @frantisek.nesveda