Agnostic-kernel - filesystem independent kernel flasher
WARNING!
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:
Instructions for users who wish to try this tool:
Instructions for people who wish to port it to other devices:
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.
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.
Tested on:
Downloads
Credits:
If you wish to incorporate or modify this tool, please, mention me somewhere, thanks
WARNING!
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:
- /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.
Tested on:
Kernels
- 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
- CWM Recovery 6.0.4.3 by ClockworkMod
- TWRP by @legolas93[/MENTION]
- MultiROM recovery by @@Tasssadar
- ROM shouldn't matter, I tested on various 4.4 / 5.0 ROMs and even without a ROM and it always worked.
Downloads
Pre-packed kernels:
Kernel from SlimROM by @legolas93
3.2.5-XPerience-19 by @TeamMex
Empty template for devs:
agnostic-kernel-template.zip
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:
agnostic-kernel-template.zip
Credits:
- 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 - xdaforums.com community
- Some nice ideas - @Metallice
- Partition layout checking, scripting - @frantisek.nesveda
If you wish to incorporate or modify this tool, please, mention me somewhere, thanks
Attachments
Last edited: