[Q] Noob questions abaut kernels and ROMs - Moto G Q&A, Help & Troubleshooting

Hi everyone! First of all, sorry for my english.
My question is very simple. I am going to flash Aero Kernel into my Moto G xt1034.
In case something goes wrong or i want to go back to stock kernel, does reflash the rom via fastboot replaces the kernel? I mean, Aero Kernel is ereased and replaced by the stock kernel?
Thank you very much in advance!

Yep, boot.img is your kernel, so you need to flash that at least. But, I think aero is replacing your kernel modules too (eg the WiFi driver), so you need to flash the system image too. Or backup the original modules from the /system/lib/modules directory.

Rhyn said:
Yep, boot.img is your kernel, so you need to flash that at least. But, I think aero is replacing your kernel modules too (eg the WiFi driver), so you need to flash the system image too. Or backup the original modules from the /system/lib/modules directory.
Click to expand...
Click to collapse
Thank you. Does flashing stock Rom replaces those modules ?

neucoas said:
Thank you. Does flashing stock Rom replaces those modules ?
Click to expand...
Click to collapse
If you mean by flashing is fastboot flash etc, then yes. The system.sparesechunk.0-3 files contains your full system partition including the kernel modules. But if you do a cwm backup from your stock system partition before flashing aero and flash that back, that will work too.
Edit: if you just do a backup from /system/lib/modules directory, you should include /system/lib/hw/power.msm8226.so too, hence aero installer also deletes that too.
Usually if you uncertain what a flashable zip do, you can always examine the META-INF/com/google/android/updater-script file. Thats the installer, you can open it with a simple text editor. Usually not too hard to understand, its quite a simple language.

Rhyn said:
If you mean by flashing is fastboot flash etc, then yes. The system.sparesechunk.0-3 files contains your full system partition including the kernel modules. But if you do a cwm backup from your stock system partition before flashing aero and flash that back, that will work too.
Edit: if you just do a backup from /system/lib/modules directory, you should include /system/lib/hw/power.msm8226.so too, hence aero installer also deletes that too.
Usually if you uncertain what a flashable zip do, you can always examine the META-INF/com/google/android/updater-script file. Thats the installer, you can open it with a simple text editor. Usually not too hard to understand, its quite a simple language.
Click to expand...
Click to collapse
Thank you very much! :victory:

Related

ADB And other questions

Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
jgcaap said:
Hello. I've used ADB to extract from the system folder the hole files of my android. I would like to know if is possible for me to make a ROM from there.
Also i would like to ask if i can use the META-INF and boot.img wich is on other roms into this one, in order to create a zip file ready for use of flasshing. Thanks
Click to expand...
Click to collapse
It may be possible but certainly not recommended.
This is actually no different than taking the /system folder from the rom that you had flashed.
The best way is compiling your rom from source (which of course requires Linux).
The problem with using another rom's boot.img is that the kernel and drivers may not necessarily match those called by those in /system which may cause a lot of errors and instability that is assuming you can get it to boot.

[Q] Kernel Extraction

How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Try it and find out. It's pretty easy to find. Not all ROMs include a kernel, so try out the Andromeda one for example, which does include a kernel.
ragnarokx said:
How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Click to expand...
Click to collapse
ragnarokx said:
How difficult would it be to "rip" a kernel from a ROM, to use in a different ROM? Is it a matter of pulling certain files from the zip and creating and signing a new zip, or is it much more involved?
Click to expand...
Click to collapse
If the rom you want to put it in has a kernel then it is just a matter of replacing the zImage in one with the other. Then resign.
For a rom that doesnt have one it could get a little uglier but still easy. (I just use one that has a kernel in it.)
smeyerhuky said:
If the rom you want to put it in has a kernel then it is just a matter of replacing the zImage in one with the other. Then resign.
For a rom that doesnt have one it could get a little uglier but still easy. (I just use one that has a kernel in it.)
Click to expand...
Click to collapse
So all I need is the "zImage"? I don't need the "redbend_ua" or files in any other folder?
And I did want to transplant this kernel to a ROM that doesn't come with a kernel, but you're saying that's not easy to do. So what if instead of putting the kernel directly in the ROM, I take a stand-alone kernel zip, put my zImage in there, resign, and install the kernel after I install the ROM. Would that work?
[QOUTE]So all I need is the "zImage"? I don't need the "redbend_ua" or files in any other folder? [/QOUTE]
as long as the rom your using had redbend_ua then there is no need to copy it over, but its the same redbend_ua for both probably.
ragnarokx said:
So what if instead of putting the kernel directly in the ROM, I take a stand-alone kernel zip, put my zImage in there, resign, and install the kernel after I install the ROM. Would that work?
Click to expand...
Click to collapse
That is what I always do., ps I include my keyboard hack as well. Don't forget to resign...
Sent from my SPH-D700 using XDA App

[Q] (Stock Deodexing) -- boot.img failure on update.zip flash? Fix, Replace? Re-Zip?

I have a ZTE990 avail.
Currently I'm rooted with no other roms installed, simply stock, and odexed.
I've tried to manually de-odex using baksmali, Xultimate, etc. All were a pain, all wouldn't work properly.
I found someone and downloaded someone who just simply uploaded a Stock_Deodex.zip rom. Sounded perfect.
So I boot into CWM, try to update and...
assert failed: write_raw_image("/tmp/boot.img","boot" android
Click to expand...
Click to collapse
Since I have stock.. and am just trying to De-Odex.
Can I just unzip the Stock_Deodex.zip, delete the current (apparently faulty) boot.img, and replace it with one of the ones created with the cwm recovery, re-zip and attempt to update as usual?
Or since (if my understanding is correct), the only thing necessary for a system to become deodex is the files in /system/app and /system/restore.
Obviously when I un-zip stock_deodex.zip I have access to them. Could I possibly just replace the two folders (somehow?) and be properly de-odexed?
Any other options that I could use that'd be best?
Much appreciated to anyone who helps, thanks!

[Q] Going from Franco's Kernel to experimentalX Kernel

Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
2mnyshp said:
Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
Click to expand...
Click to collapse
Yes You can directly flash experimental X from FRANCO kernel ...
Try yourself and tell us whether it gives a problem or not ?!!! :sly:
Sent from my Nexus 5 using Tapatalk
ok thanks! I'll try it this evening
rahil3108 said:
Yes You can directly flash experimental X from FRANCO kernel ...
Try yourself and tell us whether it gives a problem or not ?!!! :sly:
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
2mnyshp said:
Hi there
I've got a quick question: Right now I'm using Franco's Kernel with the stock 4.4.2 ROM. I also want to test experimentalX (i heard it's a tad snappier). Is it correct that instead of flashing from Franco directly to experimentalX, I install the stock kernel again with TWRP. After that i can flash to experimentalX.
I also use Xposed with a few modules. Is that going to be a problem?
Cheers!
Click to expand...
Click to collapse
You can be sure about flashing the stock boot.img first simply looking at the zip of your already installed kernel.. If the zip includes boot.img file you should flash the stock boot.img first, then your new custom kernel.
if the zip just includes kernel.img then you can flash your custom kernel over it safely.
Xposed isn't related to the kernel flashing, it won't cause any issue
Inviato dal mio Nexus 5 utilizzando Tapatalk
Hi,
Have you read the OP of ElementalX kernel?
NOTE: If you have been using a different custom kernel, please reflash your ROM without wiping data prior to installing this kernel. This will ensure you have all the necessary system files and that customizations from other kernels do not interfere.
Click to expand...
Click to collapse
With Francisco's kernel some system files are modified so better is to dirty flash your rom or at least the stock kernel before...
Just in case for the stock kernel: http://forum.xda-developers.com/showthread.php?t=2518816.
EDIT: too late...
OK, that's the way I would've done it; I put the stock kernal zip on my phone, flash that with TWRP and after that flash ElementalX. I'm not sure about the dirty stock rom flash: Can i just extract the system.img from the official android hammerhead download, put the img on my phone and flash that over my current rom?
Sorry for these trivial questions but the answers to such topics in other threads are sometimes a bit unclear.
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
viking37 said:
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
Click to expand...
Click to collapse
Thanks! And for the dirty flash i can use the System.img which i extracted with TWRP after i cleaned the dalvic cache, right?
2mnyshp said:
Thanks! And for the dirty flash i can use the System.img which i extracted with TWRP after i cleaned the dalvic cache, right?
Click to expand...
Click to collapse
Re
I don't understand what you mean here, you are on full stock rom? You have not flashed a rom from a zip file?
viking37 said:
Re,
If you have already flashed the stock kernel (so the boot.img) it should be enough... But Francisco's kernel rename some system files like /system/lib/hw/power.msm8974.so or /system/bin/thermal-engine-hh so with a dirty flash of your current rom all the files are replaced (and you won't loose anything, just wipe Dalvik cache and cache partition, just in case then reflash your rom).
Check if the files I mentioned don't have a .bak extension (with a file explorer follow the path above), if not all is fine. If yes, and if you are convenient, delete the .bak extension by yourself.
If you are not convenient with this (I mean delete some extension in system files), dirty flash your rom, reboot (as always just in case, to be sure, etc...), flash your new kernel... And you're good to go!
Click to expand...
Click to collapse
viking37 said:
Re
I don't understand what you mean, you are on full stock rom? You have not flashed a rom from a zip file?
Click to expand...
Click to collapse
yes, stock 4.4.2 only with a custom kernel (franco's as of now)
Yes, or at least just take a look at the files I mentioned following the path with a file explorer to see is there is still not the .bak extension. And after flashed ElemantalX kernel, obviously.
As far as I know it should be the only modified system files, I mean renamed since in Francisco's kernel they are not used, that "could" caused issues...

Unpack system.new.dat

Hi guys, I was able to extract system.new.dat from a rom (purity lollipop) and now I have the old good system with folders, so I can change whatever I want. But I tried to flash the zip and only the boot.img gets installed, the rest seems to be ignored.. What should I change in the zip on order to get it to install correctly?
carlese said:
Hi guys, I was able to extract system.new.dat from a rom (purity lollipop) and now I have the old good system with folders, so I can change whatever I want. But I tried to flash the zip and only the boot.img gets installed, the rest seems to be ignored.. What should I change in the zip on order to get it to install correctly?
Click to expand...
Click to collapse
Look at the updater-script
Lethargy said:
Look at the updater-script
Click to expand...
Click to collapse
Can I use the updater from the same rom but kitkat version? The things I install are the same I think..

Categories

Resources