- [TOOL] [Windows] S.U.R v2.0 — Free Premium Kitchen for Android [by JamFlux]
- Breadcrumb
- JamFlux
- Simple unpack and repack android tool
- [TOOL] [Windows] S.U.R v2.0 — Free Premium Kitchen for Android [by JamFlux]
- Breadcrumb
- jolla_ex
- respect_leo
- agabey_42
- Sutan99
- [TOOL][Works with android 11] Henry’s unpacker — unpack repack system/vendor images
- Breadcrumb
- ORIGINALNAME123
- [TOOL] Android Image Kitchen — Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac]
- Breadcrumb
- osm0sis
- Attachments
- osm0sis
- osm0sis
- dancer_69
- dancer_69
- trevd
- Attachments
- osm0sis
- osm0sis
- ZeRo2o9
- Goatshocker
- osm0sis
- ZeRo2o9
- trevd
- osm0sis
- trevd
- osm0sis
- Goatshocker
- osm0sis
- osm0sis
- osm0sis
- Similar threads
- Breadcrumb
- Top Liked Posts
[TOOL] [Windows] S.U.R v2.0 — Free Premium Kitchen for Android [by JamFlux]
Breadcrumb
JamFlux
Senior Member
Disclaimer: the present tool is developed to modify ROMs based on the android system. Any damage that results in your device from the use of this tool is and will be your sole responsibility.
Hi XDA users and friends. My previous tool S.U.R. v1.3 was stopped due some updates, so I start this new thread as a new beggining for upgraded 2.0 version in beta stage that supports Android 10 over System as Root (SAR) and Aonly devices.
This new update is coauthored with @MrWaehere developer.
+Open source
+Friendly interface and few clics options
+Universal English language
+Supports android 5.0 till android 10 ROM’s zip
+Supports the typical format of zip’s ROM containing .dat.br, .dat, .img, payload.bin and tar.md5 formats
+Added support for Samsung’s stock ROMs (tar.md5)
+Drag and drop option for .img and .xz filesystem formats on the executable
+Option to restore your previous project
+Automatic process for unpack and repack the zip rom, leaving intact the original installer of the zip’s ROM
+Automatic detection of system as root devices (SAR — A/B slot) and Aonly (conventional system structure)
+Deodexing function for android 8-10 (NEW)
+On screen ROM’s information
+ROM’s customatizations like change ROM’s name, add 1.1.1.1 DNS, remove DM verity, zipalign, etc
+Option to resize system image size (for porting purposes)
+Automatic generation of file_contexts and fs_config to preserve original ROM’s permissions
+Inside binaries are completely integrated with Windows 64bits
+Final ROM’s zip is signed by default
+Detailed logfile.txt
+Fixed and updated self compiled make_ext4fs binary
+Integrated 32 bits (low performance computers) version (NEW)
+Increased speed when zipping, now 30% faster
+Automatic selection for unpacking vendor if user forget to choose unpack or not
+Automatic identification for Windows versions
+Added option to extract system using WSL case sensitive for some Samsung’s roms only under windows 10
+Added support for extracting odm and product partitions
+file_context.bin converter to plain text
This project would not be possible without the different utilities that are used. Huge thanks to their respective authors:
Pierluigi Sottili — @MrWaehere for python help, fs_config generator, file_contexts finder and some clever ideas
Igor Pavlov for 7zip and Tino Reichardt for 7zip Standard
Google for aapt, brotli, make_ext4fs, zipalign
cygwin project for busybox
Thomas Polaert for cecho
Anestis Bechtsoudis for compact_dex_converter and vdexExtractor
Erwin Waterlander for dos2unix
Xiangyan Sun for flinux
cubinator for ext4 @AndroDef for ext4_analyzer
Andrei Conache — @xpirt for (s)img2sdat and sdat2img
@unix3dgforce and @blackeangel for imgextractor
@SuperR. for initial repository of make_ext4fs , @anpaza for update it and make it compilable for Windows, thanks to @unix3dgforce for his make_ext4fs source
@iuss for payload_dumper
@SuperR. for rmverity
stahlworks for Swiss File Knife
SUR v2.0.4 stable — 08/04/2020
To install WSL, open a PowerShell prompt with administrative privileges and run the command below:
then Reboot your PC.
Telegram’s beta testers group:
PM me or write to @JamFlux in telegram app, only advanced android users will be accepted.
Источник
Simple unpack and repack android tool
Здрствуйте.что то неработает эти скрипты.всегда пищет что нет файла или же нет рута.хотя есть рут.вчем может быть дело?
Сообщение отредактировал ganjybas — 09.08.15, 11:07
Пример расспаковки. Для чайников.
Пример. Внутренняя карта.
Сообщение отредактировал vitalysters — 31.08.15, 21:32
ganjybas,
./unpackimg.sh /sdcard/boot.img
т.е. перед /sdcard пробел
Добавлено 05.09.2015, 21:41:
grinjuk1999, можно. распакуйте зип, содержимое папки data переносите в /data/ , из папки bin берете бинари под вашу архитектуру и кидаете в /data/local/AIK-mobile/bin/ , потом открываете терминал и в нем:
su
mount -o rw,remount /system
ln -s /data/local/AIK-mobile/bin/aik /system/xbin/aik
chmod 755 /system/xbin/aik
mount -o ro,remount /system
Источник
[TOOL] [Windows] S.U.R v2.0 — Free Premium Kitchen for Android [by JamFlux]
Breadcrumb
jolla_ex
New member
respect_leo
New member
Hi @@JamFlux, thanks for nice tools.
I’ve rebuild xiaomi redmi note 9 Merlin, but it’s. Can you give me a hint?
Hi! I have exactly the same problem! I think the problem is in the file make_ext4fs.exe for android 10.
agabey_42
Senior Member
Sutan99
Member
Disclaimer: the present tool is developed to modify ROMs based on the android system. Any damage that results in your device from the use of this tool is and will be your sole responsibility.
Hi XDA users and friends. My previous tool S.U.R. v1.3 was stopped due some updates, so I start this new thread as a new beggining for upgraded 2.0 version in beta stage that supports Android 10 over System as Root (SAR) and Aonly devices.
This new update is coauthored with @MrWaehere developer.
+Open source
+Friendly interface and few clics options
+Universal English language
+Supports android 5.0 till android 10 ROM’s zip
+Supports the typical format of zip’s ROM containing .dat.br, .dat, .img, payload.bin and tar.md5 formats
+Added support for Samsung’s stock ROMs (tar.md5)
+Drag and drop option for .img and .xz filesystem formats on the executable
+Option to restore your previous project
+Automatic process for unpack and repack the zip rom, leaving intact the original installer of the zip’s ROM
+Automatic detection of system as root devices (SAR — A/B slot) and Aonly (conventional system structure)
+Deodexing function for android 8-10 (NEW)
+On screen ROM’s information
+ROM’s customatizations like change ROM’s name, add 1.1.1.1 DNS, remove DM verity, zipalign, etc
+Option to resize system image size (for porting purposes)
+Automatic generation of file_contexts and fs_config to preserve original ROM’s permissions
+Inside binaries are completely integrated with Windows 64bits
+Final ROM’s zip is signed by default
+Detailed logfile.txt
+Fixed and updated self compiled make_ext4fs binary
+Integrated 32 bits (low performance computers) version (NEW)
+Increased speed when zipping, now 30% faster
+Automatic selection for unpacking vendor if user forget to choose unpack or not
+Automatic identification for Windows versions
+Added option to extract system using WSL case sensitive for some Samsung’s roms only under windows 10
+Added support for extracting odm and product partitions
+file_context.bin converter to plain text
This project would not be possible without the different utilities that are used. Huge thanks to their respective authors:
Pierluigi Sottili — @MrWaehere for python help, fs_config generator, file_contexts finder and some clever ideas
Igor Pavlov for 7zip and Tino Reichardt for 7zip Standard
Google for aapt, brotli, make_ext4fs, zipalign
cygwin project for busybox
Thomas Polaert for cecho
Anestis Bechtsoudis for compact_dex_converter and vdexExtractor
Erwin Waterlander for dos2unix
Xiangyan Sun for flinux
cubinator for ext4 @AndroDef for ext4_analyzer
Andrei Conache — @xpirt for (s)img2sdat and sdat2img
@unix3dgforce and @blackeangel for imgextractor
@SuperR. for initial repository of make_ext4fs , @anpaza for update it and make it compilable for Windows, thanks to @unix3dgforce for his make_ext4fs source
@iuss for payload_dumper
@SuperR. for rmverity
stahlworks for Swiss File Knife
SUR v2.0.4 stable — 08/04/2020
To install WSL, open a PowerShell prompt with administrative privileges and run the command below:
then Reboot your PC.
Telegram’s beta testers group:
PM me or write to @JamFlux in telegram app, only advanced android users will be accepted.
Источник
[TOOL][Works with android 11] Henry’s unpacker — unpack repack system/vendor images
Breadcrumb
ORIGINALNAME123
Senior Member
Henry’s unpacker — Unpack raw/sparse android image and repack them into a TWRP flashable rom
Instructions to using the tool:
1. Download and unzip
2. Place boot/system/vendor images to the directory where you extracted
3. Open a terminal and type in ./henry
4. Press 1 and press Enter. Make wanted changes inside system/vendor folders.
5. Type in terminal ./henry and press 2 and press enter.
6. You should have a rom.zip in the same directory which you can flash in TWRP.
If something goes wrong while unpacking make sure you have Python 3.6
This tool works on Linux or WSL2 (Windows 10 build 2004 and up)
Changelogs:
V1.8: Maybe fix some issues??
V1.7: update script
V1.6: V1.5 but better
V1.5: Bugfixes
V1.4: Android 11 support & a lot smaller code
V1.3: Fix a bug i accidentally added in V1.2
V1.2: Fix simg2img not working sometime
V1.1: Fix a rare bug with symlinks.
V1: Initial release
Report any issues in the comments and I’ll try to help:good:
XDA:DevDB Information
Henry’s unpacker, Tool/Utility for all devices (see above for details)
Version Information
Status: Beta
Current Beta Version: V1.5
Beta Release Date: 2020-08-09
Created 2020-07-27
Last Updated 2020-10-10
Источник
[TOOL] Android Image Kitchen — Unpack/Repack Kernel Ramdisk [Win/Android/Linux/Mac]
Breadcrumb
osm0sis
Senior Recognized Developer / Contributor
Android Image Kitchen — Unpack/Repack Kernel+Recovery Images, and Edit the ramdisk.
Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work:
See the Mobile Edition (AIK-mobile) initial release notes for the specifics on the native Android version.
Likewise for the Linux/macOS Edition (AIK-Linux) initial release notes.
My original intent was to have this package dependency-free, but as you can see, I did have to include Cygwin. Initially just for mkbootimg since the huaixzk standalone version wouldn’t work (it wasn’t loading the kernel as binary, thanks trevd); then I discovered that using the GNUWin32 cpio to unpack somehow didn’t play nice with repacking the ramdisk in a usable state, so at that point I decided I might as well go Cygwin across the board. As it is, I’ve included the latest Cygwin-dependent executables and required libraries from their repos and built my own custom Cygwin image and ramdisk utilities built from the latest sources.
Originally only for Google Pixel/Nexus/AOSP standard boot.img files, built-in support has now expanded to Google Pixel/AOSP vendor_boot.img files, Android Verified Boot (AVBv1)/ChromeOS/SignBlob signed boot.img files, Barnes & Noble Nook «Green Loader» signed boot.img files, Samsung/Spreadtrum DHTB header signed boot.img files, the Samsung/Marvell PXA1088/1908 board boot.img variant (AOSP-PXA), Loki patched boot.img files, amonet patched boot.img files, Sony SIN signed/packaged kernel.elf extraction, Sony ELF kernel.elf files, Intel OSIP Android image files, DENX U-Boot uImage files, Rockchip KRNL signed ramdisk image files, MTK headers for kernel/ramdisk, and LG Bump/Samsung SEAndroid footers for boot.img.
The main advantage here is you don’t need Cygwin shell or PERL scripts. Other guides exist but none of them are universal for target device, compression and/or developed for Windows, Android ARM/x86/MIPS + ARM64/x86_64/MIPS64, and now macOS. With this universality in mind I’ve automated the whole process with batch/shell scripts.
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 consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thank you for your support!
1) Unzip.
2) Either use the command-line «unpackimg «, or simply drag-and-drop the image. This will split the image and unpack the ramdisk to a subdirectory.
3) Alter the ramdisk as you like.
4) The repackimg script requires no input and simply recombines the previously split kernel with the newly packed modified ramdisk using all the original image information (which was also split and saved).
5) The cleanup script resets the folder to its initial state, removing the split_img+ramdisk directories and any new packed ramdisk or image files.
There are a few optional, advanced command-line arguments for repackimg: «—original», which will cause it to repack using the original split ramdisk instead of repacking, this is useful for testing or trimming dumps; «—origsize», which will cause it to repack then pad it to the size of the original image, this is useful for repacking dumps to then be fastboot flashed; «—level» with 1-9 and possibly 0 allows changing the compression level used to repack to more closely match the original; «—avbkey» with (optionally path and) a keyname allows changing from the default AOSP verity key; «—forceelf» to attempt to make an older unpacked Sony ELF file repack as an ELF.
All scripts also allow unpacking/repacking with the current directory instead of the AIK directory if «—local» is the first command-line argument.
Supported ramdisk compression formats in the *-ramdiskcomp file are gzip, lzop, lzma, xz, bzip2, lz4, lz4-l (for lz4 legacy), cpio (for uncompressed), and empty (for no ramdisk).
Usage is similar for the Android and Linux versions, again, just review the release notes for them.
Hopefully this is some help to someone. It’s been extremely useful for me in my messing around with kernel ramdisks, which is why I created it in the first place.
Enjoy!
Questions, comments and feedback welcome.
Credits & Thanks: All authors of the included binaries and libraries for their amazing work, as linked (or linked via GitHub) above. Peteragent5, alansj & iridaki for the general methods used in their PERL scripts and Linux guides. SuperR. & tobias.waldvogel for the general methods used in their kernel.elf unpacking scripts. _that and rayman for the general methods used to repack a working boot.blob. Chainfire for the ChromeOS and SEAndroid general methods. cybojenix for the Bump general method. xyz` & k4y0z for the amonet general method.
Thanks to Goatshocker for testing out things for the HTC image issues, leading to the workaround and subsequent fix, avinashrocks1990 & tajimura for testing out compression support and the large pagesize fix, civato for testing out dtb support, talich for testing out the Linux version, shoey63 for testing out Linux + ELF support, moonbutt74 for testing out Android-x86 support, nathanchance for testing out the new AIK-mobile cpio method on his Pixel 2, leading to important fixes for its support, shakalaca for the great help with completing and testing Intel OSIP support, and Postman1year & CXZa for their help testing to find out the workaround for the Cygwin cut + symlink regression issues. Huge thank you to trevd and Modding.MyMind/SHM for all the contributing work they’ve each done and support they’ve provided.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
Download counts:
AIK — v1.0: 1540; +HTCFix: 430. v1.5: 4718. v1.6: 3556. v1.8: 8678; +Lok2Img: 1629. v1.9: 2580. v2.0: 22886. v2.2: 20522. v2.3: 14524. v2.4: 84432; +LokiAddon: 20071. v2.5: 5004. v2.6: 9354. v2.7: 5442. v2.8: 6639. v2.9: 7672. v3.0: 2810. v3.1: 6502. v3.2: 27104. v3.3: 17736. v3.4: 25988. v3.5: 19051. v3.6: 32472. v3.7: 21457.
Mobile — v1.0: 311. v1.1: 265. v1.2: 302. v1.3: 100. v1.4: 486. v1.5: 224. v1.6: 3303. v1.7: 7798. v1.8: 16286. v1.9: 3800. v2.0: 5444. v2.1: 2526. v2.2: 926. v2.3: 1346. v2.4: 18426. v2.5: 2586. v2.6: 6068. v2.7: 2936. v2.8: 3932. v2.9: 4181. v3.0: 1301. v3.1: 3300. v3.2: 3254. v3.3: 6824. v3.4: 10786. v3.5: 8624. v3.6: 14020. v3.7: 8951.
Linux — v1.0: 75. v1.1: 208. v1.2: 233. v1.3: 112. v1.4: 421. v1.5: 173. v1.6: 1838. v1.7: 2596. v1.8: 4818. v1.9: 604; +v1.9.1: 1068. v2.0: 1836. v2.1: 1240. v2.2: 466. v2.3: 522. v2.4: 8126. v2.5: 1052. v2.6: 2018. v2.7: 1248. v2.8: 2486. v2.9: 5057. v3.0: 1455. v3.1: 2957. v3.2: 14508. v3.3: 10046. v3.4: 16294. v3.5: 12651. v3.6: 16478. v3.7: 12927.
Attachments
osm0sis
Senior Recognized Developer / Contributor
AIK should be universal for Android devices that accept AOSP, ELF, OSIP, U-Boot and KRNL format images in theory, but there is always a chance it doesn’t work for your device due to image packing differences, etc. Here is a running list of confirmed working and questionably/confirmed not working devices. If your device isn’t in either list odds are that it will still work fine.
Known Working Devices
Amazon Fire HD 10
Asus Nexus 7 (2012, 2013)
Asus Transformer Pad
Asus Zenfone (2, 5)
Auchan QiLive (Q5, Q7)
Barnes & Noble Nook ( , HD+, 7)
BQ Aquaris M8
Coolpad Catalyst
Essential PH-1
Google Pixel (C, , XL, 2, 2 XL, 3, 3 XL, 3a, 3a XL, 4, 4 XL, 4a, 4a 5G, 5)
Huawei Ascend Y300
Huawei Mate 8
Huawei Nexus 6P
Huawei U8800 Ideos X5
HTC Nexus 9
HTC One (M7, M8, S, X)
HTC Vivid/Raider 4G
HP Slate 21
LeEco Le Pro3
Lenovo A706
Lenovo K900
Lenovo Vibe K5
LG G(2, 2 Mini, 3, 3 Stylus, 5)
LG GPad (7.0, 8.3, X 8.0)
LG Nexus (4, 5, 5X)
LG Optimus (3D, 4X HD)
LG Stylo 3 Plus
LG V(10, 20)
Micromax Ninja/Bolt A27
Motorola Moto G (2013, 2014)
Motorola Moto X 2014
Motorola Nexus 6
Nextbit Robin
OnePlus (One, 2, X, 3, 3T, 5, 5T, 6, 6T, 7, 7 Pro, 7T, 7T Pro, 8, 8 Pro, 8T, 9R, 9, 9 Pro)
OnePlus Nord ( , N10 5G, N100)
Pantech Vega Iron
Pantech Vega Secret Note
Samsung Galaxy A3 2016
Samsung Galaxy Ace II X
Samsung Galaxy Core Mini 4G
Samsung Galaxy Mega
Samsung Galaxy Nexus
Samsung Galaxy Note (2, 3, 4, Pro 12.2)
Samsung Galaxy S(3, 3 Mini, 4, 5, 6, 7, 8, 8+)
Samsung Galaxy Star
Samsung Galaxy Tab (2 7.0, 3 10.1, 4 7.0, 4 8.0, 4 10.1, A 7.0, A 10.1, Pro 8.4)
Samsung Galaxy Victory
Samsung Galaxy Xcover 3
Samsung Nexus 10
Sony Xperia (Arc S, M, Neo, Neo V, SP, Tab Z4, Z, Z1, Z5)
Spice Mi-355 Stellar Craze
Vodafone Smart Ultra 6
Xiaomi Mi Pad
Xiaomi Poco X2
Xiaomi Redmi (6A, Note 3 Pro)
Confirmed Not Working Devices
- Blackview BV4000 — some newer MediaTek (MTK) devices use special image signing that adds a «BFBF» pre-header signature. While present on multiple MTK devices, it only appears to be enforced by the bootloader on some. See this post.
- HTC Desire 326G, Huawei Honor Bee, Huawei MediaPad T1 7.0 — some newer Spreadtrum devices use special image signing that adds a «SPRD-SECUREFLAG» pre-header signature, so images will unpack/repack but most likely won’t boot unless run through their internal signing tool. See this post.
- Nibiru V05-A — some RockChip (RK) devices use a variant of the AOSP image format with extra checksums and hidden sections with extra data. There is not currently an open source tool that can handle repacking these. See this post.
- Samsung Galaxy S (Advance, Captivate, Vibrant), Samsung Galaxy S2, Samsung Galaxy Note & Samsung Galaxy Tab — contain zImage (kernel) + ramdisk (possibly within the zImage) but are the «headerless» Linux kernel blob format and require a full cross-compiler to repack correctly. See this post.
- Samsung [various] — the image and SEANDROIDENFORCE footer are followed by a signature that, while present on many Samsung devices, only appears to be enforced by the bootloader on some. See this post.
- Skyworth 50G2A TV — some newer MediaTek (MTK) devices use special image part signing that adds a 256-byte checksum/signature to both Image.gz-dtb/zImage-dtb (kernel) and ramdisk.cpio.gz, so images will unpack/repack but most likely won’t boot unless run through their internal signing tool. See this post.
- Xiaomi Mi Box 3S, ZTE B860H STB — some newer Amlogic devices use special image signing that adds an «AMLSECU!» signature within the header and appears to encrypt the ramdisk, so the image itself will unpack/repack but cannot be re-signed, and the ramdisk cannot be unpacked or modified.
Note: For devices requiring Loki patched images (e.g. LG G2, AT&T Samsung Galaxy S4), your device’s aboot.img dump must be in the script directory to Re-Loki. (Thank you to jeboo for the original one-way Lok2Img Workaround’s binary source, used prior to the official Loki Tool gaining un-Loki support).
Windows:
v1.0 — Dec 30, 2012 — Initial release.
v1.5 — May 6, 2013 — Linked.
v1.6 — Sep 16, 2013 — Linked.
v1.8 — Dec 9, 2013 — Linked.
v1.9 — Jun 7, 2014 — Linked.
v2.0 — Aug 3, 2014 — Linked.
v2.2 — Mar 25, 2015 — Linked.
v2.3 — Oct 11, 2015 — Linked.
v2.4 — Feb 8, 2016 — Linked.
v2.5 — Jan 26, 2017 — Linked.
v2.6 — Feb 27, 2017 — Linked.
v2.7 — May 1, 2017 — Linked.
v2.8 — Jun 5, 2017 — Linked.
v2.9 — Sep 14, 2017 — Linked.
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Android:
v1.0 — Mar 23, 2014 — Linked. (ARM only)
v1.1 — Apr 19, 2014 — Linked. (ARM only)
v1.2 — May 15, 2014 — Linked. (ARM only)
v1.3 — Jun 7, 2014 — Linked. (ARM, x86 with emulation)
v1.4 — Jun 17, 2014 — Linked. (ARM, x86 with emulation)
v1.5 — Aug 3, 2014 — Linked. (32bit only)
v1.6 — Aug 19, 2014 — Linked. (32bit only)
v1.7 — Dec 26, 2014 — Linked. (32bit only)
v1.8 — Mar 25, 2015 — Linked. (32bit only)
v1.9 — Oct 11, 2015 — Linked. (32bit only)
v2.0 — Dec 7, 2015 — Linked.
v2.1 — Feb 8, 2016 — Linked.
v2.2 — Mar 16, 2016 — Linked.
v2.3 — Apr 1, 2016 — Linked.
v2.4 — Apr 20, 2016 — Linked.
v2.5 — Jan 26, 2017 — Linked.
v2.6 — Feb 27, 2017 — Linked.
v2.7 — May 1, 2017 — Linked.
v2.8 — Jun 5, 2017 — Linked.
v2.9 — Sep 14, 2017 — Linked.
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Linux/macOS:
v1.0 — Apr 11, 2014 — Linked. (x86, Linux only)
v1.1 — Apr 19, 2014 — Linked. (x86, Linux only)
v1.2 — May 15, 2014 — Linked. (x86, Linux only)
v1.3 — Jun 7, 2014 — Linked. (x86, Linux only)
v1.4 — Jun 17, 2014 — Linked. (x86, Linux only)
v1.5 — Aug 3, 2014 — Linked. (x86, Linux only)
v1.6 — Aug 19, 2014 — Linked. (x86, Linux only)
v1.7 — Dec 26, 2014 — Linked. (Linux only)
v1.8 — Mar 25, 2015 — Linked. (Linux only)
v1.9 — Oct 11, 2015 — Linked. (Linux only)
v2.0 — Dec 7, 2015 — Linked. (Linux only)
v2.1 — Feb 8, 2016 — Linked. (Linux only)
v2.2 — Mar 16, 2016 — Linked. (Linux only)
v2.3 — Apr 1, 2016 — Linked. (Linux only)
v2.4 — Apr 20, 2016 — Linked. (Linux only)
v2.5 — Jan 26, 2017 — Linked. (Linux only)
v2.6 — Feb 27, 2017 — Linked. (Linux only)
v2.7 — May 1, 2017 — Linked. (Linux only)
v2.8 — Jun 5, 2017 — Linked. (Linux only)
v2.9 — Sep 14, 2017 — Linked. (Linux only)
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Everyone please let me know if AIK works for your devices or if you encounter any problems, so I can make these lists more comprehensive.
If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.
osm0sis
Senior Recognized Developer / Contributor
WIP Soon-to-be FAQ
Frequently Asked Questions (FAQ)
- Q:Why don’t my .img.lz4 and .img.tar files unpack, I tried renaming them to .img and everything?!
A: File extensions exist for a reason, they denote the format of a file. AIK supports .img files, but renaming things isn’t the same as changing the file format, e.g. for .img.lz4 you actually need to unlz4 to get .img, and for .img.tar you actually need to untar to get .img.
Q:Why is the repacked .img smaller than the original, how will this even work?!
A: It’s smaller because most of a partition dump is empty space, so AIK’s repack is only the actual data inside. If you tried it you’d see it probably works fine (provided you haven’t changed anything). Modern devices also AVBv2 sign images, which uses a bit of space at the end of the partition as well, but this must be done separately with the avbtool Python script from AOSP, and generally unlocked, rooted devices don’t enforce AVBv2 signing so it isn’t really necessary at the moment. You can also try the —origsize option if you want to ensure writing the new image blanks out the old (a fastboot bug on some old bootloaders).
Q:How come nothing works, there’s nothing in bin / android_win_tools?!
A: That’s because no binaries are hosted on GitHub so you can’t just clone/download it and expect it to work. Only use the complete AIK package download links/attachments from the OP of this thread.
Q:This triggered some generic antivirus alert, what the f*ck, are you hax me?!
A: No. Antivirus heuristics recognize patterns in executables and try to guess what might be a threat because it’s «similar» code. Some compression formats (especially the older UPX-compressed Go built sudo.exe AIK uses for Windows Administrator privilege requests) trigger these. Everything here’s open source, I’ve been doing this for almost 10 years and I’m an XDA Senior Recognized Developer, so you can either trust my track record, or build them yourself if you’re that worried.
dancer_69
Senior Member
dancer_69
Senior Member
trevd
Inactive Recognized Developer
Android Image Kitchen — Unpack/Repack Kernel+Recovery Images, and Edit the ramdisk.
My initial intention with this was to gather Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work with as few dependencies (like Cygwin, etc.) as possible. Here’s what I ended up with:
As you can see, in the end I did have to include Cygwin for mkbootimg since the huaixzk standalone version doesn’t appear to work for some reason. I’ve left a note with the author and will update the package to remove Cygwin if he ever fixes the issue. As it is, I’ve included the cygwin1.dll as it’s the only one required, and grabbed the working Cygwin-dependent executable from another thread.
I like what you’re doing here, cygwin dependencies are no good. native on whatever platform you’re using is the way to go. with that in mind here’s a mkbootimg compiled from the aosp source tree.using the MIN_GW toolchain, not a cygwin in sight
not tested it but should be alright for you. I think I’ll finish the job and smash it althought into one tool, saving f***king about., it’ll will come in useful on linux too
Attachments
osm0sis
Senior Recognized Developer / Contributor
Crap. I’ll take it down for now and do some testing. Might be a few days. Things were working over here with the few images I’d tried before. Maybe I messed something up once the scripts got more robust. Batch is an ugly way to do things.
Thanks for the help testing.
I like what you’re doing here, cygwin dependencies are no good. native on whatever platform you’re using is the way to go. with that in mind here’s a mkbootimg compiled from the aosp source tree.using the MIN_GW toolchain, not a cygwin in sight
not tested it but should be alright for you. I think I’ll finish the job and smash it althought into one tool, saving f***king about., it’ll will come in useful on linux too
Thanks bro! I’ll throw that in with the new (hopefully working) version. :good:
And hey go ahead and finish the job if you like. Coding is better than scripting so I’d be happy to get a mod to remove this thread once something better comes along.
osm0sis
Senior Recognized Developer / Contributor
Alright people, sorry about those initial issues. OP updated with the new, fully working, v1.0. There was just some craziness in the one before with cpio not behaving like it should.
It’s all Cygwin for now but trevd has been great and offered to port some things over properly while weeding out the issues, so expect a new release, completely dependency free and automated as always in the coming months, all thanks to him.
ZeRo2o9
Senior Member
Goatshocker
Senior Member
osm0sis
Senior Recognized Developer / Contributor
ZeRo2o9
Senior Member
Yes i confirm it worked for me on htc vivid jellybean
Sent from my HTC Vivid 4G
trevd
Inactive Recognized Developer
The boot loop maybe because ueventd /watchdogd in the sbin directory haven’t been created, they are (normally) symlinked back to ../init, obviously windows doesn’t support symlinks. a work around when using windows would be to copy-rename the /init to sbin/ueventd and sbin/watchdogd.
This is just «finger in the air» guessing but just something I’ve noticed :laugh:
osm0sis
Senior Recognized Developer / Contributor
The boot loop maybe because ueventd /watchdogd in the sbin directory haven’t been created, they are (normally) symlinked back to ../init, obviously windows doesn’t support symlinks. a work around when using windows would be to copy-rename the /init to sbin/ueventd and sbin/watchdogd.
This is just «finger in the air» guessing but just something I’ve noticed :laugh:
No that doesn’t seem to be the issue here, though I think that’s what the issue was when I was using the gnuwin32 cpio. I was also worried about permissions being set correctly but I haven’t seen any issues with that yet either. I just made sure of both by unpacking and repacking the maguro CWM recovery image then flashing it to my device, and both symlinks and permissions are restored correctly in the filesystem. What’s going on with Goatshocker’s One S is a bit more bizarre.
Oddly enough, even just recombining the original zImage and ramdisk from split_img doesn’t work for him, meaning it’s either unpackbootimg, or more likely mkbootimg at fault. All the commandline variables match for the original and built images (cmdline, pagesize, base), and I’ve tried the Cygwin executable and the native one you posted, so it’s leading me to believe there is something different about how images must be packaged for the HTC One S. Another One S user that can confirm would be good though.
trevd
Inactive Recognized Developer
I’ve just done this with an HTC Sensation stock boot image and it unpacked alright after that. not sure about repacking though
You can check if an additional header is present by opening the boot image in an hex editor, A standard boot image starts with the android magic, which is the byte sequence
This spells ANDROID! in ascii text. If it doesn’t you can normally strip the additional header without any problems.
Looking at the various boot images in my htc sensation backups it seems my CM boot images don’t have the special header..
HTC do have some specialness going on with the S-ON/OFF business etc but I’d just be speculating If I said anymore as my knowledge of the htc boot sequence is limited.
osm0sis
Senior Recognized Developer / Contributor
Goatshocker
Senior Member
osm0sis
Senior Recognized Developer / Contributor
Was looking into this again today and found a nice build.sh on the One S Fusion Kernel github..
The mkbootimg command does have an extra parameter:
mkbootimg —kernel zImage —ramdisk ramdisk.cpio.gz —base 80400000 —ramdiskaddr 81800000 —cmdline console=ttyHSL0,115200,n8 -o boot.img
Not yet sure if that ramdiskaddr is the magic difference or not. That ramdiskaddr parameter doesn’t even exist in any win32 compile I’ve seen of mkbootimg. I just downloaded a few images (the Dark Jelly ones we tested before) to hexedit and compare. I’ll post again shortly on that.
osm0sis
Senior Recognized Developer / Contributor
Took a look with HxD and «ANDROID!» is present in all of them, so it’s not the HTC header problem.
Since repacking the original ramdisk still wouldn’t boot for the HTC One S in my tests with Goatshocker (which is crazy because it should all be exactly the same), I did just that with Fusion v3.2 and then ran a diff on the original and repack. Doing the same for a GN kernel produces zero differences, ie. the files are identical, but interestingly enough for the One S images there is a single difference, and it’s in the header.
fv32-boot.xxd versus repack-boot.xxd:
Same change with the TWRP recovery images for the One S (ville) and One X (evita). So somehow I believe that’s our problem with certain HTC devices. No idea why such a thing would occur. I looked into S-ON a bit and it seems that’s controlled from the radio, and would prevent the image from being written, so it shouldn’t have to do with that either. Perhaps it has to do with that extra ramdiskaddr parameter somehow affecting the header.
I could write an extra batch file that flips that byte as a workaround, but I’d prefer to actually figure out why it happens and fix that..
osm0sis
Senior Recognized Developer / Contributor
OP updated with the workaround zip, instructions in the 2nd post. Tested and working fully, many thanks to Goatshocker for the assistance. :good:
Any ideas or leads on why this single byte difference would occur are welcome, but in the meantime the workaround should make this «universal» again.
Similar threads
Breadcrumb
Top Liked Posts
I’ve got some big news! My beautiful wife’s now in third trimester and due to give birth in February, so I’m going to have to be away from Android for possibly quite awhile so we can prepare together and work on our home some more beforehand, then find our footing afterwards.
Work on Android Image Kitchen for AVBv2 signing, boot hdr v4 and all the crazy multi-ramdisk shenanigans vendor_boot hdr v4 has introduced will have to wait. Upside is that in the meantime AOSP has stepped up their game with the unpack/repack Python tools: https://android.googlesource.com/platform/system/tools/mkbootimg/+/refs/heads/master
Android Image Kitchen — Unpack/Repack Kernel+Recovery Images, and Edit the ramdisk.
Windows ports of the necessary Linux utils for Android image (kernel/recovery) mod work:
See the Mobile Edition (AIK-mobile) initial release notes for the specifics on the native Android version.
Likewise for the Linux/macOS Edition (AIK-Linux) initial release notes.
My original intent was to have this package dependency-free, but as you can see, I did have to include Cygwin. Initially just for mkbootimg since the huaixzk standalone version wouldn’t work (it wasn’t loading the kernel as binary, thanks trevd); then I discovered that using the GNUWin32 cpio to unpack somehow didn’t play nice with repacking the ramdisk in a usable state, so at that point I decided I might as well go Cygwin across the board. As it is, I’ve included the latest Cygwin-dependent executables and required libraries from their repos and built my own custom Cygwin image and ramdisk utilities built from the latest sources.
Originally only for Google Pixel/Nexus/AOSP standard boot.img files, built-in support has now expanded to Google Pixel/AOSP vendor_boot.img files, Android Verified Boot (AVBv1)/ChromeOS/SignBlob signed boot.img files, Barnes & Noble Nook «Green Loader» signed boot.img files, Samsung/Spreadtrum DHTB header signed boot.img files, the Samsung/Marvell PXA1088/1908 board boot.img variant (AOSP-PXA), Loki patched boot.img files, amonet patched boot.img files, Sony SIN signed/packaged kernel.elf extraction, Sony ELF kernel.elf files, Intel OSIP Android image files, DENX U-Boot uImage files, Rockchip KRNL signed ramdisk image files, MTK headers for kernel/ramdisk, and LG Bump/Samsung SEAndroid footers for boot.img.
The main advantage here is you don’t need Cygwin shell or PERL scripts. Other guides exist but none of them are universal for target device, compression and/or developed for Windows, Android ARM/x86/MIPS + ARM64/x86_64/MIPS64, and now macOS. With this universality in mind I’ve automated the whole process with batch/shell scripts.
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 consider sponsoring my ongoing work using my GitHub Sponsors profile. For a one-time donation you can hit the donate link from my profile. Thank you for your support!
1) Unzip.
2) Either use the command-line «unpackimg «, or simply drag-and-drop the image. This will split the image and unpack the ramdisk to a subdirectory.
3) Alter the ramdisk as you like.
4) The repackimg script requires no input and simply recombines the previously split kernel with the newly packed modified ramdisk using all the original image information (which was also split and saved).
5) The cleanup script resets the folder to its initial state, removing the split_img+ramdisk directories and any new packed ramdisk or image files.
There are a few optional, advanced command-line arguments for repackimg: «—original», which will cause it to repack using the original split ramdisk instead of repacking, this is useful for testing or trimming dumps; «—origsize», which will cause it to repack then pad it to the size of the original image, this is useful for repacking dumps to then be fastboot flashed; «—level» with 1-9 and possibly 0 allows changing the compression level used to repack to more closely match the original; «—avbkey» with (optionally path and) a keyname allows changing from the default AOSP verity key; «—forceelf» to attempt to make an older unpacked Sony ELF file repack as an ELF.
All scripts also allow unpacking/repacking with the current directory instead of the AIK directory if «—local» is the first command-line argument.
Supported ramdisk compression formats in the *-ramdiskcomp file are gzip, lzop, lzma, xz, bzip2, lz4, lz4-l (for lz4 legacy), cpio (for uncompressed), and empty (for no ramdisk).
Usage is similar for the Android and Linux versions, again, just review the release notes for them.
Hopefully this is some help to someone. It’s been extremely useful for me in my messing around with kernel ramdisks, which is why I created it in the first place.
Enjoy!
Questions, comments and feedback welcome.
Credits & Thanks: All authors of the included binaries and libraries for their amazing work, as linked (or linked via GitHub) above. Peteragent5, alansj & iridaki for the general methods used in their PERL scripts and Linux guides. SuperR. & tobias.waldvogel for the general methods used in their kernel.elf unpacking scripts. _that and rayman for the general methods used to repack a working boot.blob. Chainfire for the ChromeOS and SEAndroid general methods. cybojenix for the Bump general method. xyz` & k4y0z for the amonet general method.
Thanks to Goatshocker for testing out things for the HTC image issues, leading to the workaround and subsequent fix, avinashrocks1990 & tajimura for testing out compression support and the large pagesize fix, civato for testing out dtb support, talich for testing out the Linux version, shoey63 for testing out Linux + ELF support, moonbutt74 for testing out Android-x86 support, nathanchance for testing out the new AIK-mobile cpio method on his Pixel 2, leading to important fixes for its support, shakalaca for the great help with completing and testing Intel OSIP support, and Postman1year & CXZa for their help testing to find out the workaround for the Cygwin cut + symlink regression issues. Huge thank you to trevd and Modding.MyMind/SHM for all the contributing work they’ve each done and support they’ve provided.
Disclaimer: Naturally, you take all the responsibility for what happens to your device when you start messing around with things.
Download counts:
AIK — v1.0: 1540; +HTCFix: 430. v1.5: 4718. v1.6: 3556. v1.8: 8678; +Lok2Img: 1629. v1.9: 2580. v2.0: 22886. v2.2: 20522. v2.3: 14524. v2.4: 84432; +LokiAddon: 20071. v2.5: 5004. v2.6: 9354. v2.7: 5442. v2.8: 6639. v2.9: 7672. v3.0: 2810. v3.1: 6502. v3.2: 27104. v3.3: 17736. v3.4: 25988. v3.5: 19051. v3.6: 32472. v3.7: 21457.
Mobile — v1.0: 311. v1.1: 265. v1.2: 302. v1.3: 100. v1.4: 486. v1.5: 224. v1.6: 3303. v1.7: 7798. v1.8: 16286. v1.9: 3800. v2.0: 5444. v2.1: 2526. v2.2: 926. v2.3: 1346. v2.4: 18426. v2.5: 2586. v2.6: 6068. v2.7: 2936. v2.8: 3932. v2.9: 4181. v3.0: 1301. v3.1: 3300. v3.2: 3254. v3.3: 6824. v3.4: 10786. v3.5: 8624. v3.6: 14020. v3.7: 8951.
Linux — v1.0: 75. v1.1: 208. v1.2: 233. v1.3: 112. v1.4: 421. v1.5: 173. v1.6: 1838. v1.7: 2596. v1.8: 4818. v1.9: 604; +v1.9.1: 1068. v2.0: 1836. v2.1: 1240. v2.2: 466. v2.3: 522. v2.4: 8126. v2.5: 1052. v2.6: 2018. v2.7: 1248. v2.8: 2486. v2.9: 5057. v3.0: 1455. v3.1: 2957. v3.2: 14508. v3.3: 10046. v3.4: 16294. v3.5: 12651. v3.6: 16478. v3.7: 12927.
AIK should be universal for Android devices that accept AOSP, ELF, OSIP, U-Boot and KRNL format images in theory, but there is always a chance it doesn’t work for your device due to image packing differences, etc. Here is a running list of confirmed working and questionably/confirmed not working devices. If your device isn’t in either list odds are that it will still work fine.
Known Working Devices
Amazon Fire HD 10
Asus Nexus 7 (2012, 2013)
Asus Transformer Pad
Asus Zenfone (2, 5)
Auchan QiLive (Q5, Q7)
Barnes & Noble Nook ( , HD+, 7)
BQ Aquaris M8
Coolpad Catalyst
Essential PH-1
Google Pixel (C, , XL, 2, 2 XL, 3, 3 XL, 3a, 3a XL, 4, 4 XL, 4a, 4a 5G, 5)
Huawei Ascend Y300
Huawei Mate 8
Huawei Nexus 6P
Huawei U8800 Ideos X5
HTC Nexus 9
HTC One (M7, M8, S, X)
HTC Vivid/Raider 4G
HP Slate 21
LeEco Le Pro3
Lenovo A706
Lenovo K900
Lenovo Vibe K5
LG G(2, 2 Mini, 3, 3 Stylus, 5)
LG GPad (7.0, 8.3, X 8.0)
LG Nexus (4, 5, 5X)
LG Optimus (3D, 4X HD)
LG Stylo 3 Plus
LG V(10, 20)
Micromax Ninja/Bolt A27
Motorola Moto G (2013, 2014)
Motorola Moto X 2014
Motorola Nexus 6
Nextbit Robin
OnePlus (One, 2, X, 3, 3T, 5, 5T, 6, 6T, 7, 7 Pro, 7T, 7T Pro, 8, 8 Pro, 8T, 9R, 9, 9 Pro)
OnePlus Nord ( , N10 5G, N100)
Pantech Vega Iron
Pantech Vega Secret Note
Samsung Galaxy A3 2016
Samsung Galaxy Ace II X
Samsung Galaxy Core Mini 4G
Samsung Galaxy Mega
Samsung Galaxy Nexus
Samsung Galaxy Note (2, 3, 4, Pro 12.2)
Samsung Galaxy S(3, 3 Mini, 4, 5, 6, 7, 8, 8+)
Samsung Galaxy Star
Samsung Galaxy Tab (2 7.0, 3 10.1, 4 7.0, 4 8.0, 4 10.1, A 7.0, A 10.1, Pro 8.4)
Samsung Galaxy Victory
Samsung Galaxy Xcover 3
Samsung Nexus 10
Sony Xperia (Arc S, M, Neo, Neo V, SP, Tab Z4, Z, Z1, Z5)
Spice Mi-355 Stellar Craze
Vodafone Smart Ultra 6
Xiaomi Mi Pad
Xiaomi Poco X2
Xiaomi Redmi (6A, Note 3 Pro)
Confirmed Not Working Devices
- Blackview BV4000 — some newer MediaTek (MTK) devices use special image signing that adds a «BFBF» pre-header signature. While present on multiple MTK devices, it only appears to be enforced by the bootloader on some. See this post.
- HTC Desire 326G, Huawei Honor Bee, Huawei MediaPad T1 7.0 — some newer Spreadtrum devices use special image signing that adds a «SPRD-SECUREFLAG» pre-header signature, so images will unpack/repack but most likely won’t boot unless run through their internal signing tool. See this post.
- Nibiru V05-A — some RockChip (RK) devices use a variant of the AOSP image format with extra checksums and hidden sections with extra data. There is not currently an open source tool that can handle repacking these. See this post.
- Samsung Galaxy S (Advance, Captivate, Vibrant), Samsung Galaxy S2, Samsung Galaxy Note & Samsung Galaxy Tab — contain zImage (kernel) + ramdisk (possibly within the zImage) but are the «headerless» Linux kernel blob format and require a full cross-compiler to repack correctly. See this post.
- Samsung [various] — the image and SEANDROIDENFORCE footer are followed by a signature that, while present on many Samsung devices, only appears to be enforced by the bootloader on some. See this post.
- Skyworth 50G2A TV — some newer MediaTek (MTK) devices use special image part signing that adds a 256-byte checksum/signature to both Image.gz-dtb/zImage-dtb (kernel) and ramdisk.cpio.gz, so images will unpack/repack but most likely won’t boot unless run through their internal signing tool. See this post.
- Xiaomi Mi Box 3S, ZTE B860H STB — some newer Amlogic devices use special image signing that adds an «AMLSECU!» signature within the header and appears to encrypt the ramdisk, so the image itself will unpack/repack but cannot be re-signed, and the ramdisk cannot be unpacked or modified.
Note: For devices requiring Loki patched images (e.g. LG G2, AT&T Samsung Galaxy S4), your device’s aboot.img dump must be in the script directory to Re-Loki. (Thank you to jeboo for the original one-way Lok2Img Workaround’s binary source, used prior to the official Loki Tool gaining un-Loki support).
Windows:
v1.0 — Dec 30, 2012 — Initial release.
v1.5 — May 6, 2013 — Linked.
v1.6 — Sep 16, 2013 — Linked.
v1.8 — Dec 9, 2013 — Linked.
v1.9 — Jun 7, 2014 — Linked.
v2.0 — Aug 3, 2014 — Linked.
v2.2 — Mar 25, 2015 — Linked.
v2.3 — Oct 11, 2015 — Linked.
v2.4 — Feb 8, 2016 — Linked.
v2.5 — Jan 26, 2017 — Linked.
v2.6 — Feb 27, 2017 — Linked.
v2.7 — May 1, 2017 — Linked.
v2.8 — Jun 5, 2017 — Linked.
v2.9 — Sep 14, 2017 — Linked.
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Android:
v1.0 — Mar 23, 2014 — Linked. (ARM only)
v1.1 — Apr 19, 2014 — Linked. (ARM only)
v1.2 — May 15, 2014 — Linked. (ARM only)
v1.3 — Jun 7, 2014 — Linked. (ARM, x86 with emulation)
v1.4 — Jun 17, 2014 — Linked. (ARM, x86 with emulation)
v1.5 — Aug 3, 2014 — Linked. (32bit only)
v1.6 — Aug 19, 2014 — Linked. (32bit only)
v1.7 — Dec 26, 2014 — Linked. (32bit only)
v1.8 — Mar 25, 2015 — Linked. (32bit only)
v1.9 — Oct 11, 2015 — Linked. (32bit only)
v2.0 — Dec 7, 2015 — Linked.
v2.1 — Feb 8, 2016 — Linked.
v2.2 — Mar 16, 2016 — Linked.
v2.3 — Apr 1, 2016 — Linked.
v2.4 — Apr 20, 2016 — Linked.
v2.5 — Jan 26, 2017 — Linked.
v2.6 — Feb 27, 2017 — Linked.
v2.7 — May 1, 2017 — Linked.
v2.8 — Jun 5, 2017 — Linked.
v2.9 — Sep 14, 2017 — Linked.
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Linux/macOS:
v1.0 — Apr 11, 2014 — Linked. (x86, Linux only)
v1.1 — Apr 19, 2014 — Linked. (x86, Linux only)
v1.2 — May 15, 2014 — Linked. (x86, Linux only)
v1.3 — Jun 7, 2014 — Linked. (x86, Linux only)
v1.4 — Jun 17, 2014 — Linked. (x86, Linux only)
v1.5 — Aug 3, 2014 — Linked. (x86, Linux only)
v1.6 — Aug 19, 2014 — Linked. (x86, Linux only)
v1.7 — Dec 26, 2014 — Linked. (Linux only)
v1.8 — Mar 25, 2015 — Linked. (Linux only)
v1.9 — Oct 11, 2015 — Linked. (Linux only)
v2.0 — Dec 7, 2015 — Linked. (Linux only)
v2.1 — Feb 8, 2016 — Linked. (Linux only)
v2.2 — Mar 16, 2016 — Linked. (Linux only)
v2.3 — Apr 1, 2016 — Linked. (Linux only)
v2.4 — Apr 20, 2016 — Linked. (Linux only)
v2.5 — Jan 26, 2017 — Linked. (Linux only)
v2.6 — Feb 27, 2017 — Linked. (Linux only)
v2.7 — May 1, 2017 — Linked. (Linux only)
v2.8 — Jun 5, 2017 — Linked. (Linux only)
v2.9 — Sep 14, 2017 — Linked. (Linux only)
v3.0 — Dec 14, 2017 — Linked.
v3.1 — Jan 7, 2018 — Linked.
v3.2 — Mar 19, 2018 — Linked.
v3.3 — Jul 23, 2018 — Linked.
v3.4 — Oct 28, 2018 — Linked.
v3.5 — Apr 17, 2019 — Linked.
v3.6 — Sep 22, 2019 — Linked.
v3.7 — May 22, 2020 — Linked.
v3.8 — May 5, 2021 — Linked.
Everyone please let me know if AIK works for your devices or if you encounter any problems, so I can make these lists more comprehensive.
If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.
Android ARM/ARM64, x86/x86_64 + MIPS/MIPS64 version of Android Image Kitchen! Now you can easily modify ramdisks on the go!
AIK-mobile:
— Almost complete feature parity with the Windows/Linux version, including compression support, —original to repack with the original ramdisk, —origsize to pad the repacked image to the size of the original, —level to change the compression level of the repacked ramdisk, —avbkey to change the key used for Android Verified Boot (AVBv1) signing of the repacked image, and —forceelf to make an older unpacked Sony ELF file repack as an ELF. The only thing missing is —local since AIK-mobile’s ability to unpack/repack while booted in Android is too complex to easily allow moving the unpack/repack directory around.
— The flashable zip installs AIK for your Android architecture (ARM/ARM64, x86/x86_64, MIPS/MIPS64) to /data/local/AIK-mobile/ and a helper script created at /system/xbin/aik (alternately /su/bin/aik or /sbin/supersu/bin/aik if SuperSU systemless root is detected, or, /sbin/.magisk/img/aik-mobile/bin/aik or /data/adb/modules/aik-mobile/bin/aik if Magisk is detected).
— Type «aik» in Terminal Emulator to automatically go to the install directory and get a root prompt, then use, eg. «unpackimg.sh boot.img» to get started.
— Running su -c «/data/local/AIK-mobile/bin/aik —restore» will recreate the aik helper script in the appropriate place (see above), e.g. after a ROM flash with su.img SuperSU or magisk.img Magisk removed.
— «aik —uninstall» should be self-explanatory, and «—help» is also available for all included scripts.
Now also possible to run entirely from a file explorer app, see this post for details!
To run from TWRP (recovery shell), follow the instructions in this post.
Originally all but busybox were compiled natively on my Nexus 7 2013 using a KBox2 build environment, now cross-compiled with the NDK on my PC and my own AIK Build Farm.
Notes: You may delete /data/local/AIK-mobile/bin/busybox if you want to use your ROM’s busybox instead.
Linux will be next on the list, and should be pretty easy since I did all of the shell script leg work with the Android version.
If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.
Another longtime request. New Linux version of Android Image Kitchen up in the OP! Bringing my updated binaries back home!
Now also supporting macOS out-of-the-box (i.e. no Homebrew or MacPorts addons needed) with v3.0+!
AIK-Linux:
— Complete feature parity with the Windows/Android versions, including compression support, —original to repack with the original ramdisk, —origsize to pad the repacked image to the size of the original, —level to change the compression level of the repacked ramdisk, —avbkey to change the key used for Android Verified Boot signing of the repacked image, and —forceelf to make an older unpacked Sony ELF file repack as an ELF.
— Unpacks as root by default to maintain full control over all repacked ramdisk file ownership/permissions, —nosudo argument available to attempt unpack/repack as user if possible.
— All scripts allow unpacking/repacking with the current directory instead of the AIK directory if —local is the first command-line argument.
— «—help» is also available for all included scripts.
— Unpack with «tar -xzvf AIK-Linux-*.tar.gz» in your home directory then you can go to AIK-Linux and use, eg. «./unpackimg.sh boot.img» to get started.
Most included binaries were compiled using my patched crosstool-ng i686 and x86_64 Cygwin to Linux cross-compiler toolchains, now as part of my own AIK Build Farm.
macOS compiles built with osxcross. Instructions available via my Build Farm post.
I’m not going to interfere with anyone’s Linux installations, nor needlessly bundle a ton of commonly available binaries, so if you need extra compression support you need to have those packages installed. In my Ubuntu Server VM gzip, bzip2 and xz/lzma all seem to come pretty much by default, and «apt-get install lzop bsdmainutils» handles lzop and hexdump. Java depends on your setup, but openjdk-8-jre will be what most will want if not already included. lz4 would be the only one that would have to be built from source on many distros, so I have considered it an exception, built it and included it myself.
Thanks to shoey63 and talich for testing. Cheers!
If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.
It’s been a busy few weeks!
After a Herculean effort to get the DENX U-Boot utilities to build with the NDK, which required me firing up my Ubuntu VM (for more than testing for once) and then hacking both the NDK toolchains and tool sources, say hello to U-Boot support! It’s a *nix standard, and pretty rare on Android but it does exist (e.g. LG Optimus 3D) and I’m extremely pleased to add support for this completely different type of image format to AIK!
I then added support for the Samsung/Marvell variant of the AOSP standard for their pxa1088 board, which I’ve termed «AOSP-PXA», by updating a modified bootimg tools fork to continue the excellent work done by @ketut.kumajaya and @akuhak. There aren’t a lot of known examples of these either (e.g. Samsung Galaxy Core Mini 4G, Samsung Galaxy Tab 4 7.0 & Samsung Galaxy Xcover 3) but it was pretty straightforward and removes another entry from the «Confirmed Not Working» list in the OPs.
Next up, Sony SIN packaging/signature unpack support, thanks to the brilliant research and development of @munjeni for his closed-source kernel_dump binary, of which he also supplied the builds.
Last but not least, it turns out the signatures I identified on the Pixels last month almost immediately went into enforcement after my release.. and it turns out we misunderstood the nature of these signatures so I have reverted the unpackbootimg patch that was originally submitted to me for the Xioami Mi MAX where these signatures were first found; while reappending the original signature was reported to have worked for the Mi MAX, the Pixel bootloader appears to be enforcing it even more strictly and so they must be signed correctly. Luckily, thanks to the great and ongoing work of @Chainfire we’ve got a cross-platform working signing tool, but it does rely on a Java-like VM — Java Runtime Environment (JRE) 8+ for Windows/Linux to run correctly — and we can use the Dalvik VM on Android without any issues drawing in part from my previous experiments in this area.
Since the original AVB signing OEM keys are naturally unavailable this presents a bit of a problem and there are numerous keys already floating around including SuperSU, ElementalX and a few custom Pixel ROMs. To be sensible we the modding community should all try to use the same keys for interoperability, to make sure different mods stack correctly and avoid any possible problems with encrypted devices, so I have generated the required extra certificate for AVB signing from the usual AOSP testkeys and would encourage all other boot image modifying projects to use them; they are available for use on my GitHub. They are the default for AIK, but a user may specify —avbkey on the repackimg commandline to force the use of other keys. The keys may be placed in the main AIK directory and specified without path with only the base name of the files (e.g. —avbkey supersu for supersu.pk8 and supersu.x509.der) or with a path, but still omitting the file extensions to keep it simple (e.g. —avbkey /path/to/ex for /path/to/ex.pk8 and /path/to/ex.x509.der). Hopefully that’ll cover all the bases and some other projects will come around to using the testkeys.
Per usual, the AIK Build Farm has been updated accordingly. Enjoy!
NOTE: Downloads have switched to being hosted on the XDA DevDB Project Downloads page since AIK-mobile now exceeds the 20mb zip attachment size limit.
I work on these projects in my limited time off, so if you like the progress I’m making, or enjoy anything else I’ve done on xda, please do hit the donate link from my profile. Thanks for your support!
Android Image Kitchen v2.8:
— general cleanup using if/else and absolute paths wherever possible and removing hidden hideErrors option for simplicity since it’s no longer needed
— add detection if running directly from a command prompt and do not pause if so
— add error catching for unsupported/unrecognized formats on repack, and compression formats on unpack
— update unpackbootimg and unpackelf binaries from my repos
— add DENX U-Boot uImage detection and use dumpimage and mkimage to unpack/repack
— add Samsung/Marvell boot.img variant (AOSP-PXA) and use pxa1088-unpackbootimg and pxa1088-mkbootimg to unpack/repack
— add Sony SIN signature/packaging detection and use kernel_dump to extract the kernel.elf
— add Android Verified Boot (AVB) signature footer detection and use BootSignature.jar to re-sign with AOSP testkeys (https://github.com/osm0sis/testkeys)
— dump AVB type (boot/recovery) to -avbtype so that it may be changed for repack if desired
— refactor repackimg commandline parameter parsing and introduce —avbkey to specify custom keys (accepts path and/or filename minus extensions) to use for AVB re-signing
— update slimmed magic file (from file 5.31) with my own fixes
— update to the latest Cygwin binaries and libraries
AIK-mobile v2.8 + AIK-Linux v2.8:
— general cleanup using absolute paths wherever possible
— add error catching for unsupported formats on repack, and compression formats on unpack
— fix unpack error output on some xz/lzma ramdisks by using included xz binary instead of busybox (AIK-mobile)
— update unpackbootimg and unpackelf binaries from my repos
— add DENX U-Boot uImage detection and use dumpimage and mkimage to unpack/repack
— add Samsung/Marvell boot.img variant (AOSP-PXA) and use pxa1088-unpackbootimg and pxa1088-mkbootimg to unpack/repack
— add Sony SIN signature/packaging detection and use kernel_dump to extract the kernel.elf
— add Android Verified Boot (AVB) signature footer detection and use BootSignature.jar to re-sign with AOSP testkeys (https://github.com/osm0sis/testkeys)
— dump AVB type (boot/recovery) to -avbtype so that it may be changed for repack if desired
— refactor repackimg commandline parameter parsing and introduce —avbkey to specify custom keys (accepts path and/or filename minus extensions) to use for AVB re-signing
— actually fix chromeos subfolder permissions during install (AIK-mobile)
— fix unpackimg —help to show —sudo option (AIK-Linux)
— update file binary (5.31) (AIK-mobile)
— update slimmed magic file (from file 5.31) with my own fixes
Installation information and details on each edition can be found in the OP for Win32 or the AIK-mobile and AIK-Linux initial release notes.
If you are reporting a problem with your device, please clearly state your device name and model/variant as well as provide a link to the image file.
Источник