Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
thx for this, that 'll be usefull
thanks for the guide.
i have managed to do every thing up to the repack
when i type
Code:
perl repack-bootimg.pl boot.img-kernel.gz boot.img-ramdisk.gz boot.img
i get error
Code:
boot.img-ramdisk.gz Not a directory at repack-bootimg.pl line 13.
even though it is definatly in their. any idea how to get it to work?
You don't have to provide the folder instead of the packed Ramdisk-File!
Because this script is made doing changes in Ramdisk and kernel..
So you can change the scripts inside the boot.img-ramdisk folder and the script will repack and add it to the new boot.img!
permission denied
i have done everything as you said, but while using split_bootimg.pl i got "permission denied". please suggest me what to do?
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Jon2555 said:
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Click to expand...
Click to collapse
The script was downloaded from internet not written by me. And it worked for me just fine. I can not verify now that you are right (probably you are). If it works for you with ./ then either I can put fixed version for download for others (if there is anybody) or it can be here just as a notice for other users, if not working.
I have ./ defined in my path variable in my profile so that i don't need it.
eror when repack
tobr said:
Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
Click to expand...
Click to collapse
hi
when do this in ubuntu 11.4
get eorr below
[email protected]:~/Desktop/untitled folder$ ./unpack-bootimg.pl boot.img
kernel written to boot.img-kernel.gz
ramdisk written to boot.img-ramdisk.cpio.gz
463 blocks
extracted ramdisk contents to directory boot.img-ramdisk/
[email protected]:~/Desktop/untitled folder$ ./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
gzip: folder/ramdisk-repack.cpio.gz: No such file or directory
sh: mkbootimg: not found
No such file or directory at ./repack-bootimg.pl line 21.
[email protected]:~/Desktop/untitled folder
can any one help me?
any tools for windows ?
nguyenhonganh said:
any tools for windows ?
Click to expand...
Click to collapse
Same request!
repack problem
Can somebody tell me is it possible to repack kernel and ramdisk using just hex editor? Without this scripts and unmkbootimg and mkbootimg. What does not work for me cos im using i9100 Philz root. I know how to unpack it and change init.rc and pack it back again. So can i just put my (kernel+ramdisk) ramdisk.cpio.gz file inside mmcblk0p5 in exac location. Will that work out? I dont know what this is doing:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x20000000
--cmdline 'no_console_suspend=1' -o new_boot.img
this address thing and cmdline but if i replace just ramdisk i dont need to set up addres again cos everything will be in same place. And one more question if something goes wrong can i boot to recovery or download mode?
New kernel copied itself to mmcblk0p5
and i have new CWM now. So it seems to me recovery is inside mmcblk0p5 as well and my phone never use mmcblk0p6
@tobr, I cannot open the archive of boot.img-kernel.gz. When I try to open it with terminal, it says: Not a valid gzip file. What to do?
Greetings, oh mighty people on XDA!
I am trying to change the FreeXperia screen (.rle file) on the CM 9.1.0 Rom for Xperia S (Nozomi) and i have run into a brick-wall
Whenever i'm trying to extract my boot.img using Dsixda's kitchen(cygwin - i'm a windows user) i get this:
Code:
Android 'magic' header not found at start of boot.img
Checking if it exists elsewhere ...
Warning: Android header not found in boot.img (unsupported format)
Error: kernel offset (page size) is 0
Press Enter to continue
Also found out that Xperia S is not on the kitchen's supported devices list, so here is the question:
how can i unpack and pack my boot.img using windows 7 (64-bit)?
You can extract it with 7-zip, the boot.img is an ELF file. Repacking will be difficult from there without a complete POSIX toolchain.
can't extract it with 7zip, it's said that file was not supported ...
use ultra iso or winrar ... just a wild
guess
Sent from my Xperia U using Tapatalk 2
hello
i want to create custom boot image.i am using cygwin bash shell and android kitchen.
i extract boot.img with Android Kitchen 0.194 Tools for boot images <unpack/re-pack/etc.>
it show like this
Working folder found
Kernal found at offset 2048 in boot.img
Making folder BOOT-EXTRACTED ....
Extracting kernal ...
Extracting ramdisk ...
Error : NO ramdisk folder found!
Press Enter to counting
How i solve Error:NO ramdisk folder found.
Are you have trouble extracting from the phone or extracting the .img file into something editable? I see at the top of the first page here that there is an update to the Kitchen. Maybe the newer version supports your phone better?
This is the support thread of PixelFlasher
(PixelFlasher is an open-source self contained GUI tool to facilitate Pixel phone device flashing/rooting/updating with extra features).
Note: This thread is meant for issues and problems faced in Google Pixel 6 devices, generic issues that are device agnostic should be discussed in the main thread.
For full details on where to download / usage and feature set of the tool, visit the main thread at XDA or the project's Github page.
Troubleshooting:
If you need support or assistance, the best way to get is by generating a support file from within PixelFlasher.
You can hit that big Support button on the main screen, or select it from the Help menu.
The generated support.zip file is sanitized (redacted) to keep your sensitive information (username device id ...) private.
Making sure magisk_patched.img is not on the phone in /storage/emulated/0/Download ...
Transfering boot.img to the phone in /storage/emulated/0/Download ...
ERROR: Encountered an error.
adb.exe: unrecognized option '-'
Aborting ...
Click to expand...
Click to collapse
I'm getting this on Pixel 6. Any idea what am I doing wrong?
dilruk said:
I'm getting this on Pixel 6. Any idea what am I doing wrong?
Click to expand...
Click to collapse
What is your Android platform tools version?
Also can you please share PixelFlasher log? Or everything displayed in the console when you encountered the error.
You should redact your device ID for privacy.
badabing2003 said:
What is your Android platform tools version?
Also can you please share PixelFlasher log? Or everything displayed in the console when you encountered the error.
You should redact your device ID for privacy.
Click to expand...
Click to collapse
==============================================================================
Preparing Package
==============================================================================
Found a previous package oriole-sp2a.220305.013.a3 deleting ...
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: D:\Android\Devices\oriole\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\onedrive\Desktop ...
Unzip time1: 42.51156783103943
Unzipped into oriole-sp2a.220305.013.a3 folder.
Extracting boot.img from image-oriole-sp2a.220305.013.a3.zip ...
Unzip time2: 0.8888261318206787
Deleting boot.img from phone in /storage/emulated/0/Download ...
Making sure boot.img is not on the phone in /storage/emulated/0/Download ...
Deleting magisk_patched.img from phone in /storage/emulated/0/Download ...
Making sure magisk_patched.img is not on the phone in /storage/emulated/0/Download ...
Transfering boot.img to the phone in /storage/emulated/0/Download ...
ERROR: Encountered an error.
adb.exe: unrecognized option '-'
Aborting ...
There you go...
badabing2003 said:
What is your Android platform tools version?
Also can you please share PixelFlasher log? Or everything displayed in the console when you encountered the error.
You should redact your device ID for privacy.
Click to expand...
Click to collapse
From what I see, it fails when trying to copy the boot.img to the phone. Also, how do I see the log file? The one I see is empty
dilruk said:
From what I see, it fails when trying to copy the boot.img to the phone. Also, how do I see the log file? The one I see is empty
Click to expand...
Click to collapse
I see that you have the tool running from one drive folder with spaces.
Maybe that is the issue, please move the tool to a path that does not include spaces or weird characters, see if that resolves the issue, if it does I'll fix it in the next version.
Also see when you do that if the log file gets filled
badabing2003 said:
I see that you have the tool running from one drive folder with spaces.
Maybe that is the issue, please move the tool to a path that does not include spaces or weird characters, see if that resolves the issue, if it does I'll fix it in the next version.
Also see when you do that if the log file gets filled
Click to expand...
Click to collapse
Cool let me try that.
EDIT: Works now. Still nothing in the log though
dilruk said:
Cool let me try that.
EDIT: Works now. Still nothing in the log though
Click to expand...
Click to collapse
OK Thanks for reporting back.
I'll make a fix later today for the path issue.
I'll have to figure out why the log file is empty.
worked flawlessly for me, making the monthly update while keeping root a breeze. THANK YOU
Not sure what I'm doing wrong, but it can't seem to find the unzipped image folder. I even tried manually unzipping it, but the app detects and deletes it. Run as administrator and using version 1.1.3:
==============================================================================
Preparing Package
==============================================================================
Found a previous package oriole-sp2a.220305.013.a3 deleting ...
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\Pixel6\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
Unzip time1: 0.5752615928649902
ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.
Aborting ...
New release:
March 22, 2022 v1.1.4-alpha release.
Bug Fix: Handle space characters in paths.
thekdub said:
Not sure what I'm doing wrong, but it can't seem to find the unzipped image folder. I even tried manually unzipping it, but the app detects and deletes it. Run as administrator and using version 1.1.3:
==============================================================================
Preparing Package
==============================================================================
Found a previous package oriole-sp2a.220305.013.a3 deleting ...
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\Pixel6\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
Unzip time1: 0.5752615928649902
ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.
Aborting ...
Click to expand...
Click to collapse
Can you please try with v1.1.4-alph and report back?
badabing2003 said:
Can you please try with v1.1.4-alph and report back
Click to expand...
Click to collapse
Unfortunately, same thing:
==============================================================================
Preparing Package
==============================================================================
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\Pixel6\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
Unzip time1: 0.08989071846008301
ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.
Aborting ...
thekdub said:
Unfortunately, same thing:
==============================================================================
Preparing Package
==============================================================================
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\Pixel6\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
Unzip time1: 0.08989071846008301
ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.
Aborting ...
Click to expand...
Click to collapse
If you're willing to help out, I'll give you a build that would try few things to determine the cause of the issue and output more verbose messages.
It won't be the final build, but would help me figure out the issue as I cannot reproduce it.
badabing2003 said:
If you're willing to help out, I'll give you a build that would try few things to determine the cause of the issue and output more verbose messages.
It won't be the final build, but would help me figure out the issue as I cannot reproduce it.
Click to expand...
Click to collapse
That would be great.
thekdub said:
That would be great.
Click to expand...
Click to collapse
Try this one, let's see what output you get.
When you paste the console output, please keep everything intact and just redact the device id.
=============================================================================
Preparing Package
==============================================================================
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
debug: "C:\Users\Kirk\AppData\Local\Temp\_MEI127842\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"
Unzip time1: 0.12499141693115234
Unzipped into oriole-sp2a.220305.013.a3 folder.
Traceback (most recent call last):
File "Main.py", line 422, in on_prepare
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Apps\\PixelFlasher\\oriole-sp2a.220305.013.a3\\flash-all.sh'
thekdub said:
=============================================================================
Preparing Package
==============================================================================
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
debug: "C:\Users\Kirk\AppData\Local\Temp\_MEI127842\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"
Unzip time1: 0.12499141693115234
Unzipped into oriole-sp2a.220305.013.a3 folder.
Traceback (most recent call last):
File "Main.py", line 422, in on_prepare
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Apps\\PixelFlasher\\oriole-sp2a.220305.013.a3\\flash-all.sh'
Click to expand...
Click to collapse
sorry @thekdub
In order to test the app before giving it to you, I had added a line to negate a result, but unfortunately I forgot to remove it before building and giving you a copy.
Please try this one.
Looks like it worked was just waiting on python libraries.
Connect your device
==============================================================================
Preparing Package
==============================================================================
Found a previous package oriole-sp2a.220305.013.a3 deleting ...
Found Bundled 7zip.
zip/unzip operations will be faster
Unzipping Image: C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip into C:\Apps\PixelFlasher ...
debug: "C:\Users\Kirk\AppData\Local\Temp\_MEI51122\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"
Unzip time1: 0.10936474800109863
ERROR: Unzipped folder oriole-sp2a.220305.013.a3 not found.
Disabling bundled 7zip ...
Trying unzip again with python libraries ...
Unzip time1.1: 49.77444267272949
Unzipped into oriole-sp2a.220305.013.a3 folder.
Extracting image-oriole-sp2a.220305.013.a3.zip ...
Unzipped into C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\image-oriole-sp2a.220305.013.a3 folder.
Unzip time2: 108.96331071853638
Deleting boot.img from phone in /storage/emulated/0/Download ...
Making sure boot.img is not on the phone in /storage/emulated/0/Download ...
Deleting magisk_patched.img from phone in /storage/emulated/0/Download ...
Making sure magisk_patched.img is not on the phone in /storage/emulated/0/Download ...
Transfering boot.img to the phone in /storage/emulated/0/Download ...
debug: "C:\Users\Kirk\Desktop\platform-tools\adb.exe" -s 1A061FDF600H0X push "C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\boot.img" /storage/emulated/0/Download/boot.img
C:\Apps\PixelFlasher\oriole-sp2a.220305.013.a3\boot.img: 1 file pushed, 0 skipped. 13.5 MB/s (67108864 bytes in 4.749s)
Making sure boot.img is found on the phone in /storage/emulated/0/Download ...
Magisk Tools not found on the phone
Looking for Magisk app ...
Unable to find magisk on the phone, perhaps it is hidden?
User pressed cancel.
Aborting ...
@thekdub
Yes it worked, but it would be slow because it won't be able to use the bundled 7zip.
I'd be curious as to why 7zip is failing on your system, if we figure that out you'd get it to work much faster.
Can you try these steps.
1- Quit the App
2- Launch the APP
3- repeat the package step, you can abort it when it reaches the magisk step
4- But do NOT quit the app, that's because the packaged 7zip gets unpacked into a temporary folder, and each time it is different, so we want to keep the app running, and then look at the logs of the first unzip command.
it would be something similar to this, but the part after the Temp would be different (look for the first debug message)
Code:
"C:\Users\Kirk\AppData\Local\Temp\_MEI51122\bin\7z.exe" x -bd -y "C:\Downloads\oriole-sp2a.220305.013.a3-factory-8bea92d1.zip"
You want to remove the debug part, and copy the rest (quotes included, similar to the sample above)
Open a windows command shell and paste it and execute
Tell me what it responds with.