Trying to make boot.img with the kernel and initramfs from Arch - ZenFone 2 Q&A, Help & Troubleshooting

I am trying to get Arch to run on my zf2 and I got both and unmkbootimg and a mkbootimg binary. I tried to unpack the stock boot.img, replace the kernel and initramfs with those from Arch, change the command line and boot that image using `fastboot boot new_boot.img` but nothing happened (no I did not expect it to be this easy, but gotta try still!)
So my question is: once I have a booting boot.img I can populate the /system partition with Arch and then see if everything will start up properly, so how can I make a boot.img using the kernel and initramfs from Arch?
I am rooted, have TWRP and my bootloader is unlocked btw

fastboot boot command isn't supported on ZF2.
You have to flash boot and then boot it as usual.

Related

how to flash a zimage

please if some one knows how to flash a zimage kernel with adb shell????
kaokollaa said:
please if some one knows how to flash a zimage kernel with adb shell????
Click to expand...
Click to collapse
You can't do it with adb. The only way is to use fastboot from the android sdk (same folder that adb is located in) and use:
Code:
fastboot flash zimage zImage (where the second zImage is the filename)
kaokollaa said:
please if some one knows how to flash a zimage kernel with adb shell????
Click to expand...
Click to collapse
To flash a zImage:
1. Place the zImage you want to flash inside your AndroidSDK\tools folder
2. Reboot your phone into FASTBOOT/bootloader mode
3. Run the following commands (from your AndroidSDK\tools PATH):
Code:
fastboot devices -- Should pull up serial #
Code:
fastboot boot zImage -- Your phone will automatically reboot
The command above will only temporarily boot the new zImage, meaning you can test and do whatever you want, but after you reboot your phone again -- your previous zImage will be reloaded, removing the current one you were testing (Recommended method for testing, until you're sure you want to permanently flash).
If you want to make the new zImage you're trying to flash permanent, enter this command instead:
Code:
fastboot flash zimage zImage
Fastboot might hang so just turn the power off on your Evo then put it back into “fastboot” mode by pressing on the Power button WHILE holding down the Volume down button. Then press Power button once more to enter “fastboot” mode. You should see the image flashing now. Just reboot after that.
I'm trying to flash a zImage and I first got this error with the 0.97 bootloader
Code:
writing 'zImage'... FAILED (remote: not allowed)
And with the eng bootloader the error says
Code:
writing 'zImage'... FAILED (remote: unknown fail)
Anybody have any ideas to fix this? I searched for a while and turned up nothing.
do you have eng .76 bootloader? it is the one needed for clockworkmod. also, instead of the second zimage, type the name of your file. are you on a mac or a pc? if you are on a mac, you will need the mac fastboot file. pm me if you need it.
dkdude36 said:
do you have eng .76 bootloader? it is the one needed for clockworkmod. also, instead of the second zimage, type the name of your file. are you on a mac or a pc? if you are on a mac, you will need the mac fastboot file. pm me if you need it.
Click to expand...
Click to collapse
I flashed the eng bootloader and that's when I started getting the "remote: unknown fail" error when trying to flashe the zimage.
The file IS named zImage so that's right.
Plot thickens- now it will only boot into fastboot. I tried restoring my nandroid and it will still only boot into fastboot. I can get into the bootloader and recovery no problem but the phone reboots into fastboot every time.
I tried to flash a stock PC36IMG file and during the install process next to boot it says Fail-PU.
Now it says "Partition update fail!"
Please tell me I didn't just brick my phone.
EDIT: Ok, I flashed the PC36IMG file again and now it's booting again. My question is this- is the kernel stored on the boot partition? Would wiping the boot partiton and then flashing the zImage work? What commands would I use to do that?
http://tinypic.com/r/2q9ifir/7
dont know what to do...
Replay
MishXT said:
****tinypic****/r/2q9ifir/7
dont know what to do...
Click to expand...
Click to collapse
I am a ubuntu user,
but you need root permissions,
Try what you get when you type : fastboot devices
When you get an error with no permissions. Get root acces (in ubuntu sudo -s)
try export the fastboot directory path and run fastboot devices again.
Then when that is working, try your thing again. There will be no errors
Murakuchi said:
I am a ubuntu user,
but you need root permissions,
Try what you get when you type : fastboot devices
When you get an error with no permissions. Get root acces (in ubuntu sudo -s)
try export the fastboot directory path and run fastboot devices again.
Then when that is working, try your thing again. There will be no errors
Click to expand...
Click to collapse
I'm pretty sure he figured this out already as his question is close to 2 years old.
Evilone69tmg said:
I'm pretty sure he figured this out already as his question is close to 2 years old.
Click to expand...
Click to collapse
+1 lolz
HipKat said:
+1 lolz
Click to expand...
Click to collapse
haha bless him he actually thought he was helping rofl hehe xx
KernelDev101 said:
haha bless him he actually thought he was helping rofl hehe xx
Click to expand...
Click to collapse
Hello, another post added to a year old thread.
I am getting trouble trying to flash a custom compiled HTC amaze x715e. (unbranded, S-off, unlocked, SuperCID)
I cross-compiled the kernel source and now have the zImage in my /arch/arm/boot folder.
fastboot flash zimage zImage
results in 'FAILED (remote: not allowed)'
fastboot boot zImage
results in 'FAILED (remote: reproduce boot image with on-flash ramdisk error)'
How am I suppose to flash this?
Is there a thread for this?
Thanks in advance.

[BOOT.IMG] Insecure boot.img for IMM76D (ICS 4.0.4)

Decided to create an insecure boot.img for the new release. The boot.img was pulled from the official factory images and ro.secure has been set to 0.
So now you can obtain ADB root priviledges.
Please do not attempt to flash this if you don't know what you are doing! I am not responsible for any misuse of flashing this.
Flash using fastboot:
boot.img - MD5: 589885EC34A95735F924501A8548D891 - fastboot flash boot boot.img
Kind Regards,
Revoked
DL-Link: boot.img
If you can, please add the boot img as an attachment. We have seen DropBox links go 404 with files like these.
You can upload an Img file up to 8MB on here
worked fine
EDIT: it has a bug where it stuck in the charging animation while the phone is powered off, probably a bad repack of the img..back to the stock kernel

Can't boot Alcatel One Touch Fire 4012X after flash with custom boot.img

Hello,
I use Alcatel One Touch Fire 4012X with FirefoxOS 1.4 (preRelease). I've built my own kernel with swap support and created boot.img with it. I'm able to boot the device with custom boot.img when doing it with 'fastboot boot custom_boot.img'. But when trying to flash the device with custom_boot.img by:
fastboot flash boot custom_boot.img
after sucessfull flashing phone reboots to fastboot mode every time. I can flash back boot to stock boot.img then phone is able to boot as usual.
custom_boot.img was created by:
mkbootimg --kernel ONE_TOUCH_FIRE_4012_20130628/kernel/arch/arm/boot/zImage --ramdisk B2G/out/target/product/hamachi/ramdisk.img --base 0x200000 --pagesize 2048 --cmdline 'androidboot.hardware=qcom loglevel=1' -o custom_boot.img
I will be really glad for any help with it.
How did you compile your kernerl?
I'm following the "official" guide at http://k.japko.eu/alcatel-otf-hackers-guide-1.html
it says to download a kernel tree from alcatel on sourceforce and make it. but make complains that there are millions of settings that are NEW from the provided .config. have no idea why they do that...

[SOLVED] Preventing Recovery Overwrite On System/normal Boot

After moving my Mi6 from EU ROM to Global Stable 8.2.2.0, I realised that MIUI has now programmed either the boot.img or system.img to overwrite recovery partition on every "normal"/system boot.
So much for unlocking the bootloader...
Although the source system.img has a recovery-from-boot.p file, but it appears to be different from the stock recovery.img file. Attempting to replace it with the TWRP image or removing it entirely (and flashing the rebuilt system.img) results in boot failure (see below for more information).
Does anyone know:
where the "protected" recovery image may be found? and/or
how to repack/rebuild a system.img which will not cause a boot hang?
Note that I have rebuilt it "correctly" (as "correct" as I know) using the properly extracted file_contexts (as extracted from the file_contexts.bin) from the initrd.img from inside the boot.img using the command:
Code:
make_ext4fs -s -T -1 -S file_contents -L system -l <size of partition> -a system system.img <mount point>
I have tried both a blind fastboot flash system system.img, and also a standard "clean" flash using the MiFlash tool (after ensuring that the correct MD5, CRC and sparse CRC strings are edited in the various files, of course).
Thanks!
fastboot flash recovery TWRP.img
That's the solution.
And if you flash a MIUI rom with TWRP simply flash twrp.img without Reboot under TWRP, after rom.zip flash. That's all
reb00tz said:
After moving my Mi6 from EU ROM to Global Stable 8.2.2.0, I realised that MIUI has now programmed either the boot.img or system.img to overwrite recovery partition on every "normal"/system boot.
Click to expand...
Click to collapse
dennis46419 said:
fastboot flash recovery TWRP.img
That's the solution.
And if you flash a MIUI rom with TWRP simply flash twrp.img without Reboot under TWRP, after rom.zip flash. That's all
Click to expand...
Click to collapse
Hi @dennis46419,
Thanks for replying. I have always done that upon forced reboot by the MiFlash tool (i.e. the moment it powers off for a reboot, I put it right back into fastboot mode to flash TWRP again, then directly boot with the TWRP.img).
As mentioned, I believe the new global stable ROM actually overwrites recovery on every boot.
Have you experienced this (i.e. when using the global stable ROM)?
OK, seems I missed the solution as already provided by @TheStrix:
https://forum.xda-developers.com/showpost.php?p=72620133&postcount=2
But the instruction (which I missed because I downloaded directly from the TWRP site) was already here: https://forum.xda-developers.com/showpost.php?p=72620133&postcount=2

Pixel C struck at TWRP and cannot boot to system.

I wanted to root my Google Pixel C. So as a first step I tried to installed twrp3.4.0-0 using the commands like fastboot flash recovery TWRP.img etc as described in many webpages. My pixel C restarted in twrp. When Reboot>System, i get message "Bootloader is unlocked and OS verification is OFF. Device will continue booting in 30 secs ", then a Beep sound then Google logo for few seconds and then again twrp. Fastboot reboot command again bring my Pixel C to twrp. I think it has softbricked and I don't want to lose it . Can someone kindly help what I do to restore it with stock or install custom rom and root it. My ultimate goal is to run Linux on Pixel C. I was using Windows 10 before but now I am using Linux usb. Thanks
I ended my boot looping by installing stock rom (ryu-opm8.190605.005-factory-25b457f3) downloaded from google website. For me flash-all.bat or flash-all.sh were not working and throwing multiple kind of errors. I did two things. First I used this guide from xda to set PATH variable "How to Use ADB or Fastboot From Any Directory on your Windows/Linux PC". Then I copied the .zip ROM file into "platform-tools" folder. Importantly I also extracted the .zip file within the .zip to same platform-tool folder. I manually installed each .img file one by one:
sudo fastboot flash bootloader bootloader_dragon-google-smug.img
sudo fastboot reboot bootloder
sudo fastboot devices
sudo fastboot flash boot boot.img
sudo fastboot flash cache cache.img
sudo fastboot flash recovery recovery.img
sudo fastboot flash system system.img
sudo fastboot flash vendor vendor.img
System now working fine with stock ROM and recovery.
On 1st screen of TWRP, do not swipe to modify system partition, choose the leftmost option to skip that step.
It still allows you to flash zips like Magisk, but system partition remains intact and bootable.
satelliteseeker said:
On 1st screen of TWRP, do not swipe to modify system partition, choose the leftmost option to skip that step.
It still allows you to flash zips like Magisk, but system partition remains intact and bootable.
Click to expand...
Click to collapse
If only I had see this before I installed TWRP

Categories

Resources