I'm a noob.i wanna try out a custom kernel but i got no idea what steps to follow
Backup Boot-Partition with TWRP
Install another Kernel, whipe cache and dalvic
Boot Device
Restore Boot-Partition and the new Kernel is gone / whipe cache and dalvic
Boot Device
https://www.youtube.com/watch?v=rKHswG2Nytw
Ashiq.makkar said:
I'm a noob.i wanna try out a custom kernel but i got no idea what steps to follow
Click to expand...
Click to collapse
1. make sure the kernel of your choice SUPPORTS your DEVICE, flashing wrong kernel means BYE BYE POCO
2. using custom Recovery like twrp/blackpitch/orangeFox etc just flash the Kernel.zip file! and wipe cache/delvik
3. flash Magisk19.3 if you wana root your device!
however we don't flash kernels via fastboot but for your knowledge if you extract the kernel.zip and take the img file from inside and place it in
C:\Program Files (x86)\Minimal ADB and Fastboot
open adb command window and flash kernel with this command
Code:
fastboot flash boot kernel.img
will flash the kernel in /boot section
later you can install mangisk manager and PATCH the boot.img
see METHOD 2 https://www.thecustom droid.com/install-magisk-root-android-devices/
however 99% fellows here uses twrp! its easy and popular!
YasuHamed said:
1. make sure the kernel of your choice SUPPORTS your DEVICE, flashing wrong kernel means BYE BYE POCO
2. using custom Recovery like twrp/blackpitch/orangeFox etc just flash the Kernel.zip file! and wipe cache/delvik
3. flash Magisk19.3 if you wana root your device!
however we don't flash kernels via fastboot but for your knowledge if you extract the kernel.zip and take the img file from inside and place it in
C:\Program Files (x86)\Minimal ADB and Fastboot
open adb command window and flash kernel with this command
will flash the kernel in /boot section
later you can install mangisk manager and PATCH the boot.img
see METHOD 2 https://www.thecustom droid.com/install-magisk-root-android-devices/
however 99% fellows here uses twrp! its easy and popular!
Click to expand...
Click to collapse
thanks.did the twrp method and everything worked out fine
Related
Hi,
Because i like to test many different Roms with kernels, i created my own script to flash properly with the recovery.
Often, the Kernels are available for a Rom in particular, in a zip file containing a boot.img with the kernels modules contained in /system/lib/modules
The problem is that to start, Android does not need that kernel, but also the image of a micro file system (zImage) containing startup instructions, but also a list of parameters to pass to the kernel.
The boot.img is the concatenation of the kernel with its startup parameters, and zImage.
To properly replace a kernel, so we need to retrieve the current settings, the current zImage, and reform the boot.img with the new kernel, and of course, replace the modules.
This recovery script make these step:
- Extract the kernel from the boot.img file
- Get the boot parameters of actual kernel.
- Get the actual zImage
- Rebuild the boot.img with new kernel, old boot parameters, old zImage
- Replace the modules in /system/lib/modules
- Flash the new boot.img
Before do that.
Download the kernel from other Rom, you want to flash
Extract from the zip file, boot.img and /system/lib/modules directory
Get my kernel_flash.zip
Extract it.
Replace the system/lib/modules content with the new one.
Replace the boot.img with the new one.
Rebuild you zip file with 7zip (www.7zip.org)
This zip file containing:
META-INF
boot.img
kernel
system
version.txt
And flash it under recovery.
I tested these method with Senses Roms, with AOKP or AOSP Roms. Always in my system started succefully.
You should be able to flash this kernel on any ROM (except the boot stock that has an offset of 256 bytes incompatible with the script)
As is, this kernel_flash.zip file contains a yoda kernel 2.1, overclocked to 1.5 Ghz, you can test with your ROM.
Sorry for my english.
Thank you to Google for translation assistance
Thank you for the kernel to yoda (my kernel_flash.zip contain 3.0.16-yoda_v2.1)
Thank you to all XDA developers who allowed me to further my understanding
looks promising, but does this work also for s-on users ? i dont know if you knew this already, but there is https://play.google.com/store/apps/details?id=com.joeykrim.flashimagegui&hl=en this app in playstore, which works for both s-on and s-off users, and also flashes recovery
gav-collins1983 said:
looks promising, but does this work also for s-on users ? i dont know if you knew this already, but there is https://play.google.com/store/apps/details?id=com.joeykrim.flashimagegui&hl=en this app in playstore, which works for both s-on and s-off users, and also flashes recovery
Click to expand...
Click to collapse
For s-on:
After flashing kernel under recovery, only /system/lib/modules files are copied
Keep in Recovery,
You need to flash the kernel with fastboot.
Open a terminal
with adb, pull the boot image:
Code:
adb pull /tmp/newboot.img boot.img
Restart in fastboot mode
Code:
adb reboot bootloader
Flash the boot.img file
Code:
fastboot flash boot boot.img
fxjumper said:
For s-on:
After flashing kernel under recovery, only /system/lib/modules files are copied
Keep in Recovery,
You need to flash the kernel with fastboot.
Open a terminal
with adb, pull the boot image:
Code:
adb pull /tmp/newboot.img boot.img
Restart in fastboot mode
Code:
adb reboot bootloader
Flash the boot.img file
Code:
fastboot flash boot boot.img
Click to expand...
Click to collapse
would it flash the kernel if you are using 4ext recovery ?
Pacattack said:
would it flash the kernel if you are using 4ext recovery ?
Click to expand...
Click to collapse
My phone is S-OFF
4ext recovery flash the kernel.
I know 4ext dispose a S-ON mode to flash the boot.img on the first boot, but i don't know if it works in this case.
Try it
Hello! I just rooted my xperia u today and now I'm trying to flash a custom ROM. The problem
is that I keep getting error/status 7 in cwm when trying to do this. I have searched around,
but can't find a solution. Any help appreciated!
Info:
Xperia U ST25i
Stock kernel
Stock ICS 4.0.4
CWM 5
Fixed it by following this:
1) Extract the contents you will get 3 things in it .... boot.img (file) , system(folder) , meta-inf (folder)
2) Leaving the boot.img out repack the other two folders (system,meta-inf)
3) fastboot the boot.img file via fastboot by this command "fast boot flash boot boot.img" without quotes
4) then place the new packed zip file
The one without the boot image
5) try flashing it
6) factory reset and wipe delvik cache and reboot
step 2?
blackjacknapper said:
Fixed it by following this:
1) Extract the contents you will get 3 things in it .... boot.img (file) , system(folder) , meta-inf (folder)
2) Leaving the boot.img out repack the other two folders (system,meta-inf)
3) fastboot the boot.img file via fastboot by this command "fast boot flash boot boot.img" without quotes
4) then place the new packed zip file
The one without the boot image
5) try flashing it
6) factory reset and wipe delvik cache and reboot
Click to expand...
Click to collapse
Hi, i'm what you call a noob and I could really use your help.
Could you explain to me what you mean by step 2 'repacking the other two folders (system,meta-inf)'? And do I put all the files in the fastboot folder?
Thanks a lot!!
blackjacknapper said:
Fixed it by fooowing this:
1) Extract the contents you will get 3 things in it .... boot.img (file) , system(folder) , meta-inf (folder)
2) Leaving the boot.img out repack the other two folders (system,meta-inf)
3) fastboot the boot.img file via fastboot by this command "fast boot flash boot boot.img" without quotes
4) then place the new packed zip file
The one without the boot image
5) try flashing it
6) factory reset and wipe delvik cache and reboot
Click to expand...
Click to collapse
Yeah, u should flash the kernel first
I have..
MT27i said:
Yeah, u should flash the kernel first
Click to expand...
Click to collapse
I flashed the kernel via the cmd promt fastboot flash boot boot.img. The device is rooted and bootloader is unlocked.
But when i reboot the phone into recovery mode it doesn't get the FXP screen it just gets the sony logo.
Then when i try to instal from zip I get status 7. I placed the gapps and cm zip files on the sd card.
What am i doing wrong?
I really appreciate the help:good:
blackjacknapper said:
Hello! I just rooted my xperia u today and now I'm trying to flash a custom ROM. The problem
is that I keep getting error/status 7 in cwm when trying to do this. I have searched around,
but can't find a solution. Any help appreciated!
Info:
Xperia U ST25i
Stock kernel
Stock ICS 4.0.4
CWM 5
Click to expand...
Click to collapse
Watch this video (start watching at 8:05).
youtube.com/watch?v=O52IeX93Jek
In this video, he is showing how to flash cm9, but you can also use other custom roms.
What software are you trying to flash?
@Buddha's belly
Have you flashed the kernel that's in the ROM zip?
And you can look at the log to see what exactly fails.
ChikeD said:
@Buddha's belly
Have you flashed the kernel that's in the ROM zip?
And you can look at the log to see what exactly fails.
Click to expand...
Click to collapse
@ChikeD is rights.
try to flash the kernel from rom zip.
Hey guys,
I consider myself pretty switched on but I can't understand how exactly the " ramdisk extraction utility" is used to flash TWRP.
Correct me if I'm wrong but it is used to unpack a boot.img file into separate files, one of which is the recovery. It then repacks it and allows it to be flashed via "fastest flash boot boot.img"
Ive found tools that repack boot.img files but all appear to be for Linux.
Can someone assist me by guiding me to a tutorial or offer step by step instructions on flashing TWRP onto my z2?
Basically all I want to do is understand how to flash any recovery I want when running a custom rom.
P. S - can someone explain the concept of why it dosnt work when I try to install TWRP as described in their website with
*terminal emulator or in adb shell:
su
dd if=/sdcard/fotakernel.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Thank you.
Nothing guys?
Im not sure how to help you
1. Install fastboot
2. Use fastboot to flash recovery
Fastboot flash recovery recovery.img
3. You need a custom kernel
4. Find a kernel that supports fotakernel(recovery partition fyi)
Hello,
Can somebody explain me how to upgrade to, everytime i try my phone bricks and im not able to boot it back.
This is what i do:
Xperia z2 d6503 eXistenZ 4.7 Marshmallow
i download twrp-3.0.2-0-sirius.img from https://dl.twrp.me/sirius/
i reboot on recovery to install the .img and it only shows (Kernel) to select after flash/reboot /breaks.
So what i do is recover using
fastboot flash boot boot.img
fastboot flash recovery twrp.img ( this is twrp 2.8.7.0)
fastboot reboot
and restore using a backup.
Any ideas?
what am i doing wrong,
how do i install TWRP 3.0.2.0?
newproyect said:
Hello,
Can somebody explain me how to upgrade to, everytime i try my phone bricks and im not able to boot it back.
This is what i do:
Xperia z2 d6503 eXistenZ 4.7 Marshmallow
i download twrp-3.0.2-0-sirius.img from https://dl.twrp.me/sirius/
i reboot on recovery to install the .img and it only shows (Kernel) to select after flash/reboot /breaks.
So what i do is recover using
fastboot flash boot boot.img
fastboot flash recovery twrp.img ( this is twrp 2.8.7.0)
fastboot reboot
and restore using a backup.
Any ideas?
what am i doing wrong,
how do i install TWRP 3.0.2.0?
Click to expand...
Click to collapse
/boot and /recovery are two DIFFERENT partition. So what you did is just flashing the right thing ( TWRP .img ) into the wrong partition.
I am wondering if you know how to play with those fastboot command, why dont you just simply flash the TWRP 302-0 using the fastboot method (?) using the following command:
Code:
fastboot flash recovery twrp-3.0.2-0-sirius.img
iXaidyiu said:
/boot and /recovery are two DIFFERENT partition. So what you did is just flashing the right thing ( TWRP .img ) into the wrong partition.
I am wondering if you know how to play with those fastboot command, why dont you just simply flash the TWRP 302-0 using the fastboot method (?) using the following command:
Code:
fastboot flash recovery twrp-3.0.2-0-sirius.img
Click to expand...
Click to collapse
i know boot and recovery are 2 dferrent things
i tried
Code:
fastboot flash recovery twrp-3.0.2-0-sirius.img
But after restarting my android flash on red and doesnt boot anymore.
i should read first next time:
Download the latest image file (.img) from the download link above. Place it in the root of your /sdcard folder and rename it to twrp.img. Run the following commands via adb shell or a terminal emulator app:
su
dd if=/sdcard/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel
Click to expand...
Click to collapse
I did that, still shows 2.8.7.0 installed.....
Well, eXZ 5.1 comes with TWRP installed, so you may consider upgrading to it.
1. Flash a custom kernel out there with TWRP installed using flashtool by androxyde.
2. Flash base rom and update zip.
3. Flash addon ( if any ).
4. Reboot into system.
5. Done.
iXaidyiu said:
Well, eXZ 5.1 comes with TWRP installed, so you may consider upgrading to it.
1. Flash a custom kernel out there with TWRP installed using flashtool by androxyde.
2. Flash base rom and update zip.
3. Flash addon ( if any ).
4. Reboot into system.
5. Done.
Click to expand...
Click to collapse
eXZ 5.1 doesnt allow to set color notification on led
Ok, I am new to this. My op3 was on oxygen os 5.0.8. I first unlocked my bootloader, then flashed twrp, and through twrp i have flashed Magisk 18.1. Then I cleared data, dalvik and cache and started a reboot. I am now in a bootloop, tried to uninstall Magisk through the uninstaller, but still i am in a bootloop. So please help me with the bootloop or guide me on how to get back to stock rom and recovery.
N1mbus17 said:
Ok, I am new to this. My op3 was on oxygen os 5.0.8.
Click to expand...
Click to collapse
Hello, have you tried flashing the stock boot image from fastboot?
I donno how to flash stock boot image with fastboot, can i flash that img with twrp?
N1mbus17 said:
I donno how to flash stock boot image with fastboot, can i flash that img with twrp?
Click to expand...
Click to collapse
What happens when you place your stock boot image somewhere you can access from TWRP and try?
If you want to try fastboot method:
Download the version of OxygenOS you’re currently on
Extract the contents of the ZIP file from Step 1
Copy/move the boot.img file to the same directory as your ADB/Fastboot tools
Launch a Command Prompt, Terminal or PowerShell in that directory
Boot the OnePlus 3 into Fastboot Mode
Connect the OnePlus 3 to the PC with a USB cable
Type the following into the Command Prompt, Terminal or PowerShell. . .
Code:
fastboot flash boot boot.img
. . .then press Enter on the keyboard
Wait for the boot IMG file to be sent and written
Then press the Power button on the OnePlus 3 to reboot back into Android
adapted from https://www.androidexplained.com/oneplus-5-stock-kernel/
united_we_stand said:
What happens when you place your stock boot image somewhere you can access from TWRP and try?
If you want to try fastboot method:
Download the version of OxygenOS you’re currently on
Extract the contents of the ZIP file from Step 1
Copy/move the boot.img file to the same directory as your ADB/Fastboot tools
Launch a Command Prompt, Terminal or PowerShell in that directory
Boot the OnePlus 3 into Fastboot Mode
Connect the OnePlus 3 to the PC with a USB cable
Type the following into the Command Prompt, Terminal or PowerShell. . .
Code:
fastboot flash boot boot.img
. . .then press Enter on the keyboard
Wait for the boot IMG file to be sent and written
Then press the Power button on the OnePlus 3 to reboot back into Android
adapted from Link
Click to expand...
Click to collapse
Ok I will try this method, but what will happen to twrp if I flash through fastboot, will it get removed and replaced by stock recovery?
N1mbus17 said:
Ok I will try this method, but what will happen to twrp if I flash through fastboot, will it get removed and replaced by stock recovery?
Click to expand...
Click to collapse
Hi! in the following command
Code:
fastboot flash boot boot.img
fastboot is the tool
flash is the operation
boot is the destination partition
and boot.img is the source
so to answer your question, TWRP should remain unaffected, as it should reside on your recovery partition
united_we_stand said:
Hi! in the following command
Code:
fastboot flash boot boot.img
fastboot is the tool
flash is the operation
boot is the destination partition
and boot.img is the source
so to answer your question, TWRP should remain unaffected, as it should reside on your recovery partition
Click to expand...
Click to collapse
Ok i did a wipe on cache, dalvik and system, flashed the official os zip file with TWRP and i am still stuck in a bootloop. I haven't tried your method yet where you flash the boot.img as it's just 15mb while the zip file is 1.5gb. What am i missing here? Is my TWRP recovery installing the os zip file correctly? I am stuck.
This is what i have done till now:
Unlocked my bootloader
Flashed official TWRP (twrp-3.2.3-1)
Then cleared data, cache, dalvik and flashed Magisk
Rebooted and got stuck in a bootloop
Used magisk uninstaller but didn't work
Downloaded official Oxygen OS 5.0.8 and then went to twrp, wiped dalvik, cache, data, system and then flashed the zip file.
Rebooted and still stuck in a bootloop
I am now scared that this phone won't startup. Please provide a solution.
Ok, i have followed the mega unbrick guide for oneplus 3 and it has finally come out of the bootloop, it's now updating to the latest oxygen os. Sadly i donno what went wrong the 1st time i tried to root with Magisk, maybe the oreo on the op3 doesn't support magisk. If it's possible can you guide me into rooting the phone with magisk, as most of the tutorials are old and for marshmallow rom and recovery. Thanks.