[Q]How can I temporary boot a custom kernel using adb? - Android Q&A, Help & Troubleshooting

Hi,
I want to temporary boot my nexus 6 with ElementalX.
I'm familiar with the fastboot command fastboot boot boot.img
But what boot img I need to use after downloading the flashable zip file of the kernel?
Pics provided below, which file I need to use for the fastboot command?

I don't believe you can flash Elemental kernel in that regards as it is set up differently than many custom boot.imgs. Even if you did, you would be missing out on many functions of the kernel without the other settings being installed. You could either do a nandroid backup of your boot and system and restore that when you were done testing the kernel or dirty flash just the rom you are on (they have flashable stock roms in the forums) while just wiping the cache and dalvik cache.

es0tericcha0s said:
I don't believe you can flash Elemental kernel in that regards as it is set up differently than many custom boot.imgs. Even if you did, you would be missing out on many functions of the kernel without the other settings being installed. You could either do a nandroid backup of your boot and system and restore that when you were done testing the kernel or dirty flash just the rom you are on (they have flashable stock roms in the forums) while just wiping the cache and dalvik cache.
Click to expand...
Click to collapse
I only want to flash ElementalX in order to be able to use properly on Android M.
But I'll try to do a nandroidbackup . funny I never though to do that. Thanks.

Yea, for best results, use TWRP, make a backup, then flash what you need. No reason to keep a stock recovery setup if you are running a custom kernel and root as you will not want to take OTA updates anyway. Keep in mind that it is also recommended to update the radio and bootloader. I have seen reports of members being fine without them, but it's best practice to keep them all updated together. If you don't want to mess with any of that and don't care about being rooted or customized at all, then you will just want to unlock the bootloader and flash the factory img files from Google and then all partitions will be updated to official 6.0 and you'll be done with it. If you go that route, remember to backup your internal storage as unlocking the bootloader and the update will wipe everything.

Related

Noob question. First kernel to root: CF-root or Siyah

Hi
I am new on the SGS2 though i have one Android Tablet.
I have been reading a lot and there is something i have not been able to find.
I want to root, , install CMW and install this custom ROM: Dynamic
http://forum.xda-developers.com/showthread.php?t=1582217
1.- Do i need to install first the CF-ROOT kernel matching my actual Firm to make the root or can i install the Siyah kernel at this will make the root anyway?
2.- If i install the CF-root using ODIN, do i need to install an specific kernel for that ROM? Or most kernels work with most rom?
Thanks.
I suggest you flashing the cf-root kernel with odin then you can install your custom rom from the modified recovery mode flashing the .zip file of the rom.
You can flash the siyah kernel after that, because generally custom roms mount a custom kernel which supports CWM (Clock Work Mod, the custom recovery).
If i helped u, press thanks.
if you are on ics you should be good flashing siyah but most of us here started with cf root
darkpollo said:
Hi
I am new on the SGS2 though i have one Android Tablet.
I have been reading a lot and there is something i have not been able to find.
I want to root, , install CMW and install this custom ROM: Dynamic
http://forum.xda-developers.com/showthread.php?t=1582217
1.- Do i need to install first the CF-ROOT kernel matching my actual Firm to make the root or can i install the Siyah kernel at this will make the root anyway?
2.- If i install the CF-root using ODIN, do i need to install an specific kernel for that ROM? Or most kernels work with most rom?
Thanks.
Click to expand...
Click to collapse
1/ follow the install notes stated for that rom also siyah kernel if flashed thru odin will give you root and install cwm/superuser
2/if you install cf root again follow install notes within that thread and it does say best to use same cf as your stock kernel or find one close to it to match
i prefer to use siyah less hassle but each to there own and everyone has there own choice
Thank you all.
I decided to go safe and try with CF-Root. Now i am rooted and i have installed the rom using the CWM.
Do you recommend to change the kernel again? I think that the rom has its own kernel but i am not sure.
Also something weird happen (little off topic), after wipe and reinstall the rom, i have some apps installed by default, some of them where on the old ROM.
I thought that all the apps will be deleted with the installation of the new rom.
Not sure how to fix it.
Thanks again
Apps will only be deleted by doing a full wipe in cwm. And you dont need to flash another kernel if you only want the root feature.. i think all the custom roms use a rooted kernel... some use cf-root, some siyah, some speedmod etc...
Well, i really prefer to use the features offered by other kernels. I was not sure if i can change the kernel keeping the Roms or if i need to reinstall everything afterwards.
How do i make a Full Wipe? most of the apps are bloatware and i do not want them.
Thanks
im also a noob and i use siyah without changing much
just OC to 1400 and choosing en demand for governor
darkpollo said:
Well, i really prefer to use the features offered by other kernels. I was not sure if i can change the kernel keeping the Roms or if i need to reinstall everything afterwards.
How do i make a Full Wipe? most of the apps are bloatware and i do not want them.
Thanks
Click to expand...
Click to collapse
You must go in the custom recovery and press "Data wipe/factory reset", so you wil have only the system apps, but you must start the phone configuration again.
U can flash another kernel if you want, there's no problem with the rom, but remember to do a dalvik wipe.
If youre thinking about to flash a new kernel, i would prefer to flash the kernel first (now) and then do a full wipe and dalvik wipe. Otherwise youre doing some work twice...
And if youre yet haveing some "bloatware" (e.g. from a provider branded firmware) after wipeing, you can delete them (be careful with system apps) with root explorer... (in "\system\app" folder....
darkpollo said:
Thank you all.
I decided to go safe and try with CF-Root. Now i am rooted and i have installed the rom using the CWM.
Do you recommend to change the kernel again? I think that the rom has its own kernel but i am not sure.
Also something weird happen (little off topic), after wipe and reinstall the rom, i have some apps installed by default, some of them where on the old ROM.
I thought that all the apps will be deleted with the installation of the new rom.
Not sure how to fix it.
Thanks again
Click to expand...
Click to collapse
If your happy with the results you get form using CF then by all means stay with it otherwise follow the thread in which your rom is based on users will often leave feedback on there selected kernels and setups like my signature for example check im sure theres users within your choosen thread with the same
I can advise using the kernel cleaning script after changing to another kernel. http://forum.xda-developers.com/showthread.php?t=1363738
This will prevent problems that left behind files from the old kernel can cause.
After flashing the file/script install the desired kernel
Thank you to everyone!
Ubbabubba said:
You must go in the custom recovery and press "Data wipe/factory reset", so you wil have only the system apps, but you must start the phone configuration again.
U can flash another kernel if you want, there's no problem with the rom, but remember to do a dalvik wipe.
Click to expand...
Click to collapse
I did the Data wipe/factory reset and everything as per the instructions:
*For a clean installation and no problem
- Download the ROM and put it on your S2.
- Go to Recovery
- Wipe data factory reset, wipe cache.
- In Advance: wipe dalvik cache and wipe battery stats.
- In mount and storage - format data , system and cache
- Install the zip file and you will get the CWM install completed message.
- Select Reboot Now and let the phone boot up to an Android setup screen.
- If there are Update, download it, put it on the phone, go to recovery and install it. Don't do wipes.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1582217
glowfinger said:
If youre thinking about to flash a new kernel, i would prefer to flash the kernel first (now) and then do a full wipe and dalvik wipe. Otherwise youre doing some work twice...
Click to expand...
Click to collapse
I think i am going to make it more than twice.
I will go to other kernel to try them. The battery on CF is not as good as i would like.
glowfinger said:
And if youre yet haveing some "bloatware" (e.g. from a provider branded firmware) after wipeing, you can delete them (be careful with system apps) with root explorer... (in "\system\app" folder....
Click to expand...
Click to collapse
That is the strange thing. I am not using any branded firmware, i came from one, but i thought everything was to be erased after the wipes and formats.
Spunkynitro said:
I can advise using the kernel cleaning script after changing to another kernel. http://forum.xda-developers.com/showthread.php?t=1363738
This will prevent problems that left behind files from the old kernel can cause.
After flashing the file/script install the desired kernel
Click to expand...
Click to collapse
I will use this on my next try this weekend.
If i do not understand wrong this is what i need to do:
Review the rom to find a kernel that suits it.
Use the kernel cleaning script
Install the new kernel.
Follow the instructions to flash the desired ROM with all the wipes and formats required.
Anything else?

[Q]Problems with flashing custom ROMS

Lately i'm experiencing problems with flashing custom roms (i.e. UltimaROM , Xperianze, whatever)
What i did is:
1: flash the latest CWM , touch and non -touch with Odin
2: download ROM of choice , copy to internal SD-card
3: reboot recovery, fact-reset, wipe cache + dalvik
4: flash rom ( with aroma installer )
5: boot phone
with booting it keeps hanging on the Samsung i9300 logo txt. It doesnt matter which rom i flash. it always keeps hanging.
I've tried alternative methods like flashing TWRP and do the same as above but again, no success. I also tried factory-reset after flash, cache wipe etc. no success.
The weirdest thing is: when i try to flash CM or MIUI ( current running MIUI ) , it works like a charm, but normal "custom" roms are not approved it seems.
does anyone have a suggestion for me what to do? or explain what i am doing wrong , or even better, can explain why CM-based ROMS work?
Have you checked the MD5 of your downloaded ROMs when they are on your SD card? Format system, data and pre-load before flashing? Tried flashing an alternative kernel/radio before you boot the first time?
If only stock based ROMs are a problem then it maybe something that is unique to them, probably a direct hardware hit via the kernel.
Try returning completely to stock to test, flashing Samsung's vanilla EMB5 via Odin - including stock recovery and full wipe. If that doesn't work then you may have a hardware issue that CM or MIUI doesn't use.
yeah good idea to return to stock and try all over again.
to your other questions: no i didnt flash another kernel after i flashed the custom rom. i've tried with several kernels which options were given to me in aroma installer ( boeffla, syah, stock )
md5: did that
format system and data: nope. kinda relied on the fact-reset + cache/dalvik
what do u mean with pre-load?
if I were you I would format data & system again manually after the fac. reset thing, or even more clean use the mega wipe flashable zip to have a clean slate to start from (it will format anything but the ext. sd-card). Then flash the rom from your ext. sd-card and see how it goes.
additional possibly helpful hints
hi there,
i'm not entirely sure if this will help you but generally speaking i came made a few observations about the fact that some people, mostly repeatingly the same users, encounter problems with their custom roms and/or flashing them, while others don't, albeit they are using the same devices.
i my selfe use 3 different devices, all rooted and running on pac 4.3, always lates nightly, as there are GT-N7100 - GT-I9100 - Nexus 4
not to the point
a) other than most other users i usually clean cache and dalvik cache as well before and after flashing the new rom and/or new nightly
and never encountrer any problems except those which everybody, using the same rom and nightly encounters.
b) whenever i flash an totally different rom and/or upgrade and/or downgrade to another level of android os, i.e. from 4.2.2 to 4.3, i perform
a clean install, including not only a factory reset, but as well a format sd-card, format cache and format system etc., again i cannot proof
which of these steps make a or the differnce but however, i never have problems others than thosw which everyone has with a version.
c) when using cusome kernels and due to the fact that some roms come with a kernel included, as well as with a custom recovery included,
it is strongly recommended not to forget to flas the kernel again after each flashing the new rom. one good example ist dorimanx kernel
for GT-I9100 which will not boot into recovery and reluctantly boot at all after a new flash of a pac nightly without reflashing the kernel.
d) try to fix permissions on reboot instead of doing it from recovery. one reason is that not every recovery has this option and further i
found that when fixing permissions before the first boot after flashing a new rom, there might be bootloops, albeit i cannot explain exactly
why that should, but however, sometimes it's better to be on the safe sid.
e) try to run whether the lastes version of custom recovery for your device, and or the use the included custom recovery of the rom or the
kernel. this again is one thing that can help to avoid some unexpected and hard to explain bootproblems and/or fc's etc.
hope that i could give you some new ideas how to avoid trouble while using custom roms and other hacks
magnamentis said:
try to fix permissions on reboot instead of doing it from recovery. one reason is that not every recovery has this option and further i
found that when fixing permissions before the first boot after flashing a new rom, there might be bootloops, albeit i cannot explain exactly
Click to expand...
Click to collapse
Fix permissions was removed because its useless. All permissions are set when flashing by way of updater-script. Fix permissions via recovery "guesses" the permissions which causes issues...
If permissions need fixing, then the updater-script is poor which means you should probably avoid flashing it.
Sent from my GT-I9300 using Tapatalk 4
rootSU said:
Fix permissions was removed because its useless. All permissions are set when flashing by way of updater-script. Fix permissions via recovery "guesses" the permissions which causes issues...
If permissions need fixing, then the updater-script is poor which means you should probably avoid flashing it.
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
thanks for the explanation which makes totally sense, so my feeling which i could not explain was right always better to learn exactly why than just guessing
no thanks button found in your post however, so i want to thank you this way.
regards

How to dirty flash a custom rom?

Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
BenParz said:
Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
Click to expand...
Click to collapse
Just flash the rom, and wipe cache thats it. But be sure ur using the same rom not another one
BenParz said:
Can someone enlighten me how to dirty flash a custom rom? I mean I did it before but it was back in gingerbread days. Now that we use magisk, can someone give me the exact steps to do?
Click to expand...
Click to collapse
wipe system,davik and cache. then dirty flash. remember not to wipe "system" if you flash OTA .zip
Okay, I have Additional questions :
1. Do I have to disable magisk modules or outright uninstall it before flashing?
2. Do I have to mount system and vendor in twrp again?
3. Do I need to install magisk again after dirty flashing?
4. Do I have to flash DFE again?
BenParz said:
Okay, I have Additional questions :
1. Do I have to disable magisk modules or outright uninstall it before flashing?
2. Do I have to mount system and vendor in twrp again?
3. Do I need to install magisk again after dirty flashing?
4. Do I have to flash DFE again?
Click to expand...
Click to collapse
1. Not necessary (unless you are using a module which may cause bootloop)
2. I never did.
3. Most of the times when dirty flashing the same ROM, twrp flashes Magisk (and GApps) automatically (atleast in my case). If it doesn't flash automatically, then you can flash it manually in order to make it certain.
4. Like I always said, flashing DFE is not necessary if you use the TWRP that supports decryption without actually decrypting your device permanently. Infact, I never suggest anyone to use a decrypted device if using it for financial purpose.
Rowdyy Ronnie said:
1. Not necessary (unless you are using a module which may cause bootloop)
2. I never did.
3. Most of the times when dirty flashing the same ROM, twrp flashes Magisk (and GApps) automatically (atleast in my case). If it doesn't flash automatically, then you can flash it manually in order to make it certain.
4. Like I always said, flashing DFE is not necessary if you use the TWRP that supports decryption without actually decrypting your device permanently. Infact, I never suggest anyone to use a decrypted device if using it for financial purpose.
Click to expand...
Click to collapse
Omg, thanks for answering my questions mate, much appreciated!
Depends, but if you are switching from a different ROM then dirty flash will most likely brick your device or cause a lot of errors and it should never be done. But if it is from the same ROM, like going from older PE to new one, then all you do is flash the newer one with the older version already installed. But it is recommended you clean flash because from my experience, dirty flash always caused errors like lag and crashing. Just use Migrate(available on Play store) and use it to backup apps. A lot of these custom ROMs are still early and in BETA so it is recommended you clean flash.
As for DFE, it is optional. Only problem is you will have to use TWRP with SD card support or one that has a working decryption so that you can flash files through the recovery . You can use apps like flashify to flash if you dont want to your device decrypted. If you got any questions you can ask me.
itscooltime said:
Depends, but if you are switching from a different ROM then dirty flash will most likely brick your device or cause a lot of errors and it should never be done. But if it is from the same ROM, like going from older PE to new one, then all you do is flash the newer one with the older version already installed. But it is recommended you clean flash because from my experience, dirty flash always caused errors like lag and crashing. Just use Migrate(available on Play store) and use it to backup apps. A lot of these custom ROMs are still early and in BETA so it is recommended you clean flash.
As for DFE, it is optional. Only problem is you will have to use TWRP with SD card support or one that has a working decryption so that you can flash files through the recovery . You can use apps like flashify to flash if you dont want to your device decrypted. If you got any questions you can ask me.
Click to expand...
Click to collapse
Actually I've got one.
I want to dirty flash a ROM (just an updated version of the same one) but I dont know how i can place a file into my phone's internal storage through TWRP without formatting de data (full wipe). My phone is not recognized by my PC on TWRP mode unless I make a full wipe.
Can you guys assist?
I have a question I'm using a custom rom with gapps, but the custom rom update that is available does not have gapps if I flash the non-gapp version on my gapp version will it cause problems?
gersomfcomiano said:
Actually I've got one.
I want to dirty flash a ROM (just an updated version of the same one) but I dont know how i can place a file into my phone's internal storage through TWRP without formatting de data (full wipe). My phone is not recognized by my PC on TWRP mode unless I make a full wipe.
Can you guys assist?
Click to expand...
Click to collapse
G3's typically have sd card storage available. athat's where I put all my roms, gapp's, other stuff which I have no trouble flashing from TWRP. Beyond that you must seek one more learned than I.
Nfury00701 said:
wipe system,davik and cache. then dirty flash. remember not to wipe "system" if you flash OTA .zip
Click to expand...
Click to collapse
in this case all data & apps will be lost ?
gajanan57 said:
in this case all data & apps will be lost ?
Click to expand...
Click to collapse
You're right. That user is wrong. Do NOT wipe system if you are dirty flashing. Otherwise you are just doing a normal flashing, not updating your rom.
fede01_8 said:
You're right. That user is wrong. Do NOT wipe system if you are dirty flashing. Otherwise you are just doing a normal flashing, not updating your rom.
Click to expand...
Click to collapse
I'd say no.
Android System partition is mounted as readonly after boot and won't be modified anymore then (unless you modify system files with adb/TWRP and mounted system partition).
Your during Android usage installed apps are stored in Data partition.
However you have to reflash gapps and magisk in case you installed them with TWRP/adb.

How to switch between different kernels?

Hell guys!
I recently started flashing custom roms found in the rom section and I'm currently on latest pixel experience Build.
Next I want to flash custom kernels and see how it goes but since I'm fairly new to all this I want to make sure I'm doing it right.
1. So what's the safest way to switch different kernels while being on custom rom such as PE, lineage etc?
2. What's the procedure for flashing these custom kernels through twrp?
3. How to take backup of the current stock kernel that comes with this (PE) Rom and restore safely in case of bugs without losing previous apps/settings/data or causing bootloops, soft bricks etc?
Thank you for your time.
before you flash anything backup your Rom first
(by Boot data system vendor in custom recovery)
Do clean install by Wipe dalvik cache and cache and flash the kernel
Backup:
Backup /boot partition using twrp, this contains the currently installed kernel and ramdisk.
Installation:
Flash the kernel zip, no need to wipe anything.
Restore:
Restore the boot partition you made earlier in twrp.
If you don't have a backup, you can dirty flash your currently installed ROM, this will restore the roms stock kernel and also uninstall magisk which you can reflash.

I really need someone to help me! MY DEVICE WONT BOOT

I have a Sony Xperia XZ Premium and i decided to enter the world of tinkering with my device. I successfully unlocked by bootloader, installed TWRP but as i was figuring out how it all worked something went wrong. i can no longer boot into my device (its stuck on the sony/carrier boot screen) and i belive that i may have completely removed by OS from my device. A website told me that i should to something with changing the file system and i think that has something to do with it. I have tries re-installing a stock rom but i cant seem to get it to work (I am noob). When i try to flash the zip it says 'invalid zip file format!' i really dont know what to do. Any help would be grealty appreciated as this is my only phone. I dont care if it has to be reset to factory settings.
THANK YOU.
jakessavage said:
I have a Sony Xperia XZ Premium and i decided to enter the world of tinkering with my device. I successfully unlocked by bootloader, installed TWRP but as i was figuring out how it all worked something went wrong. i can no longer boot into my device (its stuck on the sony/carrier boot screen) and i belive that i may have completely removed by OS from my device. A website told me that i should to something with changing the file system and i think that has something to do with it. I have tries re-installing a stock rom but i cant seem to get it to work (I am noob). When i try to flash the zip it says 'invalid zip file format!' i really dont know what to do. Any help would be grealty appreciated as this is my only phone. I dont care if it has to be reset to factory settings.
THANK YOU.
Click to expand...
Click to collapse
First, let's start with the small stuff, just in case. Try booting into TWRP and select the Wipe option, then select advanced wipes, then choose only the cache partition and the dalvik cache partition, DO NOT choose any other partitions, after choosing cache and dalvik cache, swipe the slidee at the bottom to run the wipes, then reboot the device.
The stock .zip that you tried to flash probably isn't made for flashing via TWRP. It is probably meant for extracting the .zip to get the flashable form of your stock firmware and then flashing that firmware using your device's specific flashing tool on PC. Flashing the firmware will remove TWRP. After you get the firmware flashed and you get the device working again, you will have to reinstall TWRP the same way you did the first time. When you get TWRP reinstalled, immediately use the Backup option in TWRP to create a backup of everything on your device(do not include internal storage in the backup). Store that backup on your external sdcard and/or on your PC. Do this BEFORE you attempt any kind of modification ms to the device. This backup can be used to restore your device if you mess it up again.
After creating the backup and storing it in a safe place, then you can try making the modifications that you were originally trying to do.
Sent from my SM-S767VL using Tapatalk
Droidriven said:
First, let's start with the small stuff, just in case. Try booting into TWRP and select the Wipe option, then select advanced wipes, then choose only the cache partition and the dalvik cache partition, DO NOT choose any other partitions, after choosing cache and dalvik cache, swipe the slidee at the bottom to run the wipes, then reboot the device.
The stock .zip that you tried to flash probably isn't made for flashing via TWRP. It is probably meant for extracting the .zip to get the flashable form of your stock firmware and then flashing that firmware using your device's specific flashing tool on PC. Flashing the firmware will remove TWRP. After you get the firmware flashed and you get the device working again, you will have to reinstall TWRP the same way you did the first time. When you get TWRP reinstalled, immediately use the Backup option in TWRP to create a backup of everything on your device(do not include internal storage in the backup). Store that backup on your external sdcard and/or on your PC. Do this BEFORE you attempt any kind of modification ms to the device. This backup can be used to restore your device if you mess it up again.
After creating the backup and storing it in a safe place, then you can try making the modifications that you were originally trying to do.
Sent from my SM-S767VL using Tapatalk
Click to expand...
Click to collapse
After clearing the 2 caches the phone is still stuck on the boot screen. I will try to figure out how to flash the ROM with flash tools now...
jakessavage said:
After clearing the 2 caches the phone is still stuck on the boot screen.
Click to expand...
Click to collapse
Your phone's Android 7 has neither a Dalvik cache nor an ART cache. TWRP is misleading in this respect.
Try to re-flash phone's Stock ROM ( Android 7 ) by means of Sony Xperia Flash Tool.
jwoegerbauer said:
Your phone's Android 7 has neither a Dalvik cache nor an ART cache. TWRP is misleading in this respect.
Try to re-flash phone's Stock ROM ( Android 7 ) by means of Sony Xperia Flash Tool.
Click to expand...
Click to collapse
Yes I managed to do this. The only problem now is that my phone is on Android 7. Before it was on Android 9. I've went to the software update section on the phone but there's no update available. Will I have to flash an android 9 ROM to get the update or will it eventually come to my phone
Thanks
@jakessavage
Moving from one Android version ( e.g. 7 ) to another one ( e.g. 9 ) istn't an update but an upgrade.
Don't think your phone's OEM/Carrier automatically supply an upgrade, but only updates if recognized to be necessary.
IMHO in case of Android 9 for your phone is not provided by OEM/Carrier, you have to flash a Custom ROM based on Android 9.
jakessavage said:
Yes I managed to do this. The only problem now is that my phone is on Android 7. Before it was on Android 9. I've went to the software update section on the phone but there's no update available. Will I have to flash an android 9 ROM to get the update or will it eventually come to my phone
Thanks
Click to expand...
Click to collapse
Find the android 9 firmware for your device and flash it via flashtool.
Sent from my SM-S767VL using Tapatalk

Categories

Resources