[Q] Backup Kernel How To question - AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin

Hi,
I have a small question. I own a Canadian Samsung 4 SGH-i337m, after reading the main guide for running other carrier rom on this address
http://forum.xda-developers.com/showthread.php?t=2295557
As the guide mention that I didn't need the loki kernel and I could use my carrier kernel.
I used to backup my kernel with SGS kernel flasher to do the job, but it's not working for s4.
I wanted to backup my stock kernel and apply it after the installation of a cursom rom and apply it through TWRP. As I understood it, kernel is the boot.img, and I read somewhere that the way to create this is to copy the boot.img + copy the /sytem/lib/modules files. If I look to the file prepared by iB4STiD in the file MDOB-I337M-VMK6-FIX-4.1 present here, it seems that it's the case.
There is still flashify as a solution but you can't use the file into recovery.
Does someone know how to do it, or point me out where to find a guide where I can do what I want.
thanks in advance,

youpiyo said:
Hi,
I have a small question. I own a Canadian Samsung 4 SGH-i337m, after reading the main guide for running other carrier rom on this address
http://forum.xda-developers.com/showthread.php?t=2295557
As the guide mention that I didn't need the loki kernel and I could use my carrier kernel.
I used to backup my kernel with SGS kernel flasher to do the job, but it's not working for s4.
I wanted to backup my stock kernel and apply it after the installation of a cursom rom and apply it through TWRP. As I understood it, kernel is the boot.img, and I read somewhere that the way to create this is to copy the boot.img + copy the /sytem/lib/modules files. If I look to the file prepared by iB4STiD in the file MDOB-I337M-VMK6-FIX-4.1 present here, it seems that it's the case.
There is still flashify as a solution but you can't use the file into recovery.
Does someone know how to do it, or point me out where to find a guide where I can do what I want.
thanks in advance,
Click to expand...
Click to collapse
What type of ROM are you using? You have to be using a compatible kernel. AOSP ROM's won't work with a stock kernel, and you can't cross Android version between system and kernel. Using any custom kernel developed for your phone with this guide will work okay however.

Thank you for your answer.
in order to answer your question I was trying to flash the hyperdrive to my phone with compatibility pack. But after reboot I go back directly to download mode. So I figured that it was the boot partition that wasn't adapted to my phone.
So yes, I understand that if you flash a rom based on code as cyanogenmod you will need a custom kernel. but for a rom that is based on stock as hyperdrive rom, unless I'm mistaken, I would imagine that the stock kernel should work.:cyclops:
Is there a way to back it up?

youpiyo said:
Thank you for your answer.
in order to answer your question I was trying to flash the hyperdrive to my phone with compatibility pack. But after reboot I go back directly to download mode. So I figured that it was the boot partition that wasn't adapted to my phone.
So yes, I understand that if you flash a rom based on code as cyanogenmod you will need a custom kernel. but for a rom that is based on stock as hyperdrive rom, unless I'm mistaken, I would imagine that the stock kernel should work.:cyclops:
Is there a way to back it up?
Click to expand...
Click to collapse
My best guess is find out which partition it is and use the dd command OR download the ODIN of your firmware version and extract the boot.img. However, it would be easier to just use a custom kernel designed for your phone as if you back it up like that you either have to make it into a flashable zip or use heimdall to restore it every time.
Sent from Black<3's I337 running Foxhound ROM

Thanks for your answer.
That's weird as a nandroid is doing the job,that is hard to find how to backup a kernel.
anyway, I guess my best chance is to download a custom kernel and apply it after installation of the cutom rom. At first boot re apply a backup kernel with an app as flashify.
thanks youpi

Related

[REQ] Stock Kernel 2.3.4

can anybody deliver the stock 2.3.4 kernel as an image to reflash via recovery if one wants to go back from a custom kernel?
would be easier, than using an old backup or reflash the whole ROM due to lost data, apps, sms, etc.
Second to that....maybe someone can help us.
Best Regards
Third to that! Want to try custom kernel, but don't want reflash whole image, if I'll not like it.
evlevl said:
Third to that! Want to try custom kernel, but don't want reflash whole image, if I'll not like it.
Click to expand...
Click to collapse
do a nandroid backup. it saves kernels
Flashing back stock kernel will not allways help , because some other alterations (e.g. in intit.d) will still remain .. But if you want the stock 2.3.4 kernel .. you can download the full rom posted by me or given in an other thread .. set a side the boot.img and flash it with fastboot ( fastboot flash boot boot.img)
If you do not want to download load an entire rom I attached the stcok 2.3.4 kernel .
Bandis710 said:
Flashing back stock kernel will not allways help , because some other alterations (e.g. in intit.d) will still remain .. But if you want the stock 2.3.4 kernel .. you can download the full rom posted by me or given in an other thread .. set a side the boot.img and flash it with fastboot ( fastboot flash boot boot.img)
If you do not want to download load an entire rom I attached the stcok 2.3.4 kernel .
Click to expand...
Click to collapse
excellent, thanx mate! i don't want to flash a whole rom just to get back on stock kernel, because all the backing up and restoring if not necessary is boring...
and does that really set back all changes, a custom kernel does on my phone? aren't there also always some folders in the zip-files of customs?
Well, now I see a reason why there is no "default kernel".
It's because all these custom kernels consist not only from "boot.img", but also from a number of "init.d scripts", "*.so modules", etc, which are obviously different from kernel to kernel. So because of that you cannot have an universal "stock" kernel, but rather a whole stock ROM.
Thanks a lot for all of you who comment that request, now the situation with kernels is more clear.
While all the above is sensible, it should be possible with a modicum of planning to go back and forth between a custom kernel and the stock one. I feel the question is more: is it worth the trouble versus flashing again? Probably not.
1 - Nandroid backup.
2 - Examine the scripts and files included in the custom kernel's zip.
3 - Back up what is replaced, patched or deleted outright from stock.
4 - Note what is added by the custom kernel.
When you want to revert to stock, reflash boot.img from stock, and either adb push the stock backup files back, or create your own update zip with a proper script to finish the job.

[Q] MultiRom kernel flashing?

I got Paranoid 3 as my internal rom, running franco kernel. However, gaming and file transfer with computer seem slow and laggy as a 2gigs movie took 15 mins to copy from pc to nexus 7, so I'd like to install stock rom and stock kernel as an alternative I can use when I want to transfer files. The problem is Multiboot only allow separate kernel for external roms as boot.img, and the kexec patched stock kernel (any many other kernels) is only released under .zip flashable. So does anyone have any solution to this? Please tell me
Um, what's the problem with flashing stock kernel over then stock ROM through Install menu in the recovery?
Fatal1ty_18_RUS said:
Um, what's the problem with flashing stock kernel over then stock ROM through Install menu in the recovery?
Click to expand...
Click to collapse
Well, there are too options to flash zip:
- flash zip thru install menu. This affects the internal ROM and Roms that share kernel with internal one
- flash zip thru multi boot -> manage roms -> choose a specific rom . The description already says that 'don't flash kernel with this option' and if I did, the ROM wouldn't boot.
So, way I see it, there's only one option to inject a boot.img that houses a kernel to the eexternal ROM, but the kernels I need are not released as a .img
Bump ? Anyone ?

Kernel/bootloader/recovery

Hi guys,
1. What is the advantage/disadvantage of flashing a custom kernel?
2. I recently flashed Cyanogenmod. It automatically installs a custom kernel right?
3. Using the Nexus 7 toolkit I reverted my N7 to stock recovery (from CWM) How should I make sure that it's been reverted to the latest stock version?
4. What does N7's stock factory image contain? (Stock ROM + Stock recovery + Stock kernel?) (found here: https://developers.google.com/android/nexus/images)
5. Is this correct? You can install a custom ROM without changing the kernel but in order to have more customization you have to flash a different kernel than the stock one.
6. Is this the correct order? Unlocking bootloader>rooting>Flashing custom recovery>Flashing custom kernel>Flashing custom ROM>...?
7. Difference between unlocking bootloader and rooting.
8. How to find out N7's latest stock kernel version.
Many thanx
Sent from my Nexus 7 using Tapatalk 4 Beta
valapsp said:
1. What is the advantage/disadvantage of flashing a custom kernel?
Click to expand...
Click to collapse
Same as those for a stock kernel. That is to say, every kernel has advantages and disadvantages. Some trade performance for battery life, others do the reverse. Some are more feature-heavy and potentially more unstable, others are feature-light but designed to be rock solid. With custom kernels on a Nexus device, you avoid one of the biggest dangers of custom kernels (instability due to lack of kernel source for developers to base their work on), but you still need to be careful. You don't necessarily know how proficient the author of a given kernel is, and the wrong one can make your device unusable/kill it.
valapsp said:
2. I recently flashed Cyanogenmod. It automatically installs a custom kernel right?
Click to expand...
Click to collapse
I believe it does. I don't remember which one though, since I don't use CM.
valapsp said:
3. Using the Nexus 7 toolkit I reverted my N7 to stock recovery (from CWM) How should I make sure that it's been reverted to the latest stock version?
Click to expand...
Click to collapse
You need to be more specific-- the latest stock ROM, or the latest stock recovery? If you're wondering about the ROM, you can check in Settings > About tablet > Status. When it comes to determining recovery version, I'm not so sure.
valapsp said:
4. What does N7's stock factory image contain? (Stock ROM + Stock recovery + Stock kernel?) (found here: https://developers.google.com/android/nexus/images)
Click to expand...
Click to collapse
I believe it contains stock ROM and kernel.
valapsp said:
5. Is this correct? You can install a custom ROM without changing the kernel but in order to have more customization you have to flash a different kernel than the stock one.
Click to expand...
Click to collapse
Generally correct. There's a subset of features that are kernel-dependent, not ROM dependent, so you should think of it as ROM customizations vs. kernel customizations. Some examples of the former include PIE menus and Paranoid Android's Halo feature. Examples of the latter might include tap2wake (double tap on a powered-off screen to turn it on), NTFS drive support for OTG, and so on.
valapsp said:
6. Is this the correct order? Unlocking bootloader>rooting>Flashing custom recovery>Flashing custom kernel>Flashing custom ROM>...?
Click to expand...
Click to collapse
Yes and no? It's one way of going about it, save for the last two things, which should be reversed. Since some ROMs include custom kernels, flashing a kernel and then a ROM runs the risk of having your kernel choice overwritten.
If all you need to do is flash a different ROM, you can go straight form unlocking the bootloader to flashing a recovery. You can also flash ROMs and kernels independently, so long as whatever kernel/ROM you're running initially doesn't have known incompatibilities with your new ROM/kernel.
valapsp said:
7. Difference between unlocking bootloader and rooting.
Click to expand...
Click to collapse
Unlocking your bootloader is like getting the key to a house. Rooting is getting permission from the landlord to do whatever the heck you want to the house. A locked bootloader means that the device is checking to ensure no unauthorized code is running at boot time, which prevents custom recoveries from being installed. Rooting only really matters when the device is booted up.
valapsp said:
8. How to find out N7's latest stock kernel version.
Click to expand...
Click to collapse
Google. Sorry, can't help you with this one.
That was a great answer @Rirere
Rirere said:
Same as those for a stock kernel. That is to say, every kernel has advantages and disadvantages. Some trade performance for battery life, others do the reverse. Some are more feature-heavy and potentially more unstable, others are feature-light but designed to be rock solid. With custom kernels on a Nexus device, you avoid one of the biggest dangers of custom kernels (instability due to lack of kernel source for developers to base their work on), but you still need to be careful. You don't necessarily know how proficient the author of a given kernel is, and the wrong one can make your device unusable/kill it.
I believe it does. I don't remember which one though, since I don't use CM.
You need to be more specific-- the latest stock ROM, or the latest stock recovery? If you're wondering about the ROM, you can check in Settings > About tablet > Status. When it comes to determining recovery version, I'm not so sure.
I believe it contains stock ROM and kernel.
Generally correct. There's a subset of features that are kernel-dependent, not ROM dependent, so you should think of it as ROM customizations vs. kernel customizations. Some examples of the former include PIE menus and Paranoid Android's Halo feature. Examples of the latter might include tap2wake (double tap on a powered-off screen to turn it on), NTFS drive support for OTG, and so on.
Yes and no? It's one way of going about it, save for the last two things, which should be reversed. Since some ROMs include custom kernels, flashing a kernel and then a ROM runs the risk of having your kernel choice overwritten.
If all you need to do is flash a different ROM, you can go straight form unlocking the bootloader to flashing a recovery. You can also flash ROMs and kernels independently, so long as whatever kernel/ROM you're running initially doesn't have known incompatibilities with your new ROM/kernel.
Unlocking your bootloader is like getting the key to a house. Rooting is getting permission from the landlord to do whatever the heck you want to the house. A locked bootloader means that the device is checking to ensure no unauthorized code is running at boot time, which prevents custom recoveries from being installed. Rooting only really matters when the device is booted up.
Google. Sorry, can't help you with this one.
Click to expand...
Click to collapse
First of all many many thanx to you because of your help. Yes I meant stock RECOVERY in question 3 also the way you explained question #7 is awesome.
Now I'm running stock ROM on CWM recovery and Franco kernel. My question is that will I be able to upgrade to Android 4.3 with this recovery and kernel? Or I have to flash the stock kernel or stock recovery or both?
Also how can I extract the stock kernel from the factory stock image file?
Thanx again.
valapsp said:
First of all many many thanx to you because of your help. Yes I meant stock RECOVERY in question 3 also the way you explained question #7 is awesome.
Now I'm running stock ROM on CWM recovery and Franco kernel. My question is that will I be able to upgrade to Android 4.3 with this recovery and kernel? Or I have to flash the stock kernel or stock recovery or both?
Also how can I extract the stock kernel from the factory stock image file?
Thanx again.
Click to expand...
Click to collapse
The OTA updates are normally only applied to the rom/system, so in theory you should be able to just run the OTA update with the stock rom, the worst that would mainly happen is losing rooting because the system partition gets replaced with a fresh install of the newest operating system (but your /data retains your settings and user data).
I use TWRP recovery instead of CWM, and TWRP when you're bout to exit it will detect if your system has Supersu or not and will offer to install it for you (from there once you boot into the system you can use it to install the su binary for you thus re-rooting).
In the end it's a personal choice. With custom roms like I'm using, there's no real "OTA" update (just a notice that the rom creators use to notify you of new versions which are downloaded to the device, and you just reboot into recovery to flash them). Custom roms typically get updated a few days to a few weeks after google updates if they're AOSP based.
The stock kernel would normally be the boot image, I don't know how you would do it with clockwork mod, but in TWRP you can simply make a backup of the boot partition to retain the original stock kernel. (It will of course only work on AOSP-based roms if you choose to just flash the stock kernel, but the ones that are made for the rom, or custom kernels tend to offer optimizations over the original stock one).
Thanks, I meant extracting the stock kernel from factory image file found here:
https://developers.google.com/android/nexus/images
By the way I don't have the stock kernel anymore to back it up.
Sent from my Nexus 7 using Tapatalk 4 Beta
valapsp said:
Thanks, I meant extracting the stock kernel from factory image file found here:
https://developers.google.com/android/nexus/images
By the way I don't have the stock kernel anymore to back it up.
Sent from my Nexus 7 using Tapatalk 4 Beta
Click to expand...
Click to collapse
Ahh I see, well if your's is the Wifi-only version then would be something like this https://developers.google.com/android/nexus/images#nakasijdq39
The firmwares are basically gzipped tarballs (in a linux system tar zxvf would normally unpack em, otherwise 7zip for windows does a good job of unpacking it into a folder).
Alternatively you can just download the kernel itself (Post #3) http://forum.xda-developers.com/showthread.php?t=2151154
Edit: Yes if you un-gzip/untar the original firmware, then unpack image-nakasi-jdq39.zip inside of that, there will be a boot.img that's where the kernel lives. The boot.img can be flashed via fastboot to the boot partition (I'd advise reading up on this first before actually doing it). Though like linked above, there are some recovery-flashible versions of the stock kernel you can use instead.
kbeezie said:
Ahh I see, well if your's is the Wifi-only version then would be something like this https://developers.google.com/android/nexus/images#nakasijdq39
The firmwares are basically gzipped tarballs (in a linux system tar zxvf would normally unpack em, otherwise 7zip for windows does a good job of unpacking it into a folder).
Alternatively you can just download the kernel itself (Post #3) http://forum.xda-developers.com/showthread.php?t=2151154
Edit: Yes if you un-gzip/untar the original firmware, then unpack image-nakasi-jdq39.zip inside of that, there will be a boot.img that's where the kernel lives. The boot.img can be flashed via fastboot to the boot partition (I'd advise reading up on this first before actually doing it). Though like linked above, there are some recovery-flashible versions of the stock kernel you can use instead.
Click to expand...
Click to collapse
thanks, I actually did unzip the stock firmware seconds ago and was posting the results then I saw your edit.
Just there are some confusions here: what is that userdata.img? also what is bootloader-grouper-4.18.img
valapsp said:
thanks, I actually did unzip the stock firmware seconds ago and was posting the results then I saw your edit.
Just there are some confusions here: what is that userdata.img? also what is bootloader-grouper-4.18.img
Click to expand...
Click to collapse
bootloader img would be the original stock bootloader for the Nexus 7, chances are you never replaced it, you only unlocked it. There's usually no reason to replace the bootloader with a custom one since all you need to do is unlock it.
userdata.img would be the /data partition. The firmware download basically has a image for all of the partition in the original out-of-the-box stock state. Technically you don't even to flash it, as long as you wiped /data before rebooting (since that would be the same as a clean install if you instead flashed the system and boot partition).
Edit: If I were messing with it to get back stock rom (but not messing with recovery, cuz custom recovery is still handy to have), I would only flash the boot.img and system.img , then log into Recovery and wipe data (ie: factory reset which wipes cache and /data but doesn't touch /data/media), Then I would be able to reboot into a clean stock install of the rom.
(from there I could just make a backup from recovery so I wouldn't have to do a fastboot flash again).
kbeezie said:
The OTA updates are normally only applied to the rom/system, so in theory you should be able to just run the OTA update with the stock rom, the worst that would mainly happen is losing rooting because the system partition gets replaced with a fresh install of the newest operating system (but your /data retains your settings and user data).
I use TWRP recovery instead of CWM, and TWRP when you're bout to exit it will detect if your system has Supersu or not and will offer to install it for you (from there once you boot into the system you can use it to install the su binary for you thus re-rooting).
In the end it's a personal choice. With custom roms like I'm using, there's no real "OTA" update (just a notice that the rom creators use to notify you of new versions which are downloaded to the device, and you just reboot into recovery to flash them). Custom roms typically get updated a few days to a few weeks after google updates if they're AOSP based.
The stock kernel would normally be the boot image, I don't know how you would do it with clockwork mod, but in TWRP you can simply make a backup of the boot partition to retain the original stock kernel. (It will of course only work on AOSP-based roms if you choose to just flash the stock kernel, but the ones that are made for the rom, or custom kernels tend to offer optimizations over the original stock one).
Click to expand...
Click to collapse
Unfortunately, how many times does should matter? Theoretically, you should be able to do OTAs while rooted by downloading the ZIP and flashing in recovery, but if you've made changes to /system (uninstalling a system app, or adding a helper), you might get the stupid script_assert error. Of course, you could just push the whole /system back to your device...although that can be just as annoying.
I wish there were away to turn off the script_asserts safely, but they do exist for a reason.
@valapsp
Small but important clarification.
valapsp said:
5. Is this correct? You can install a custom ROM without changing the kernel but in order to have more customization you have to flash a different kernel than the stock one.
Click to expand...
Click to collapse
Essentially 100% of custom ROMs install a kernel. (Actually, a kernel plus a ramdisk packaged together as a single ("bootable image") file, typically named "boot.img".) So your preexisting boot image containing the kernel is always overwritten during a ROM installation. See next answer.
valapsp said:
6. Is this the correct order? Unlocking bootloader>rooting>Flashing custom recovery>Flashing custom kernel>Flashing custom ROM>...?
Click to expand...
Click to collapse
Almost, but not quite. If you want to use a different kernel than what ships with a given ROM, you flash it after you have installed the ROM, not beforehand. See prior answer.
One more thing. Since you are new to this stuff, I'll make a suggestion:
Learn how to create and restore full Nandroid backups (using the custom recovery) immediately. And get in the habit of copying them off your tablet to your PC. You will thank me later for this advice.
have fun
Rirere said:
Unfortunately, how many times does should matter? Theoretically, you should be able to do OTAs while rooted by downloading the ZIP and flashing in recovery, but if you've made changes to /system (uninstalling a system app, or adding a helper), you might get the stupid script_assert error. Of course, you could just push the whole /system back to your device...although that can be just as annoying.
I wish there were away to turn off the script_asserts safely, but they do exist for a reason.
Click to expand...
Click to collapse
Hi, Rirere...
This is my understanding as well... (sort of! - I've always been a bit hazy on this topic).
My take on it is this...
The OTA would only fail, if it found files in /system that SHOULD BE THERE, but have been removed, modified, or replaced by the user (or via some app run by the user).
Logically (one would think), the OTA can't check for files THAT SHOULDN'T BE THERE (How would it know what to look for?) but have been ADDED by the user... like the su binary that confers root.
So, an OTA on pure ROOTED (but in all other regards, unadulterated) stock you would expect to succeed... you'd just lose root (and from what I've read elsewhere, your Custom Recovery). Both of which are trivial to recover.
Is my understanding correct... or have I missed something?
Rgrds,
Ged.
GedBlake said:
Hi, Rirere...
This is my understanding as well... (sort of! - I've always been a bit hazy on this topic).
My take on it is this...
The OTA would only fail, if it found files in /system that SHOULD BE THERE, but have been removed, modified, or replaced by the user (or via some app run by the user).
Logically (one would think), the OTA can't check for files THAT SHOULDN'T BE THERE (How would it know what to look for?) but have been ADDED by the user... like the su binary that confers root.
So, an OTA on pure ROOTED (but in all other regards, unadulterated) stock you would expect to succeed... you'd just lose root (and from what I've read elsewhere, your Custom Recovery). Both of which are trivial to recover.
Is my understanding correct... or have I missed something?
Rgrds,
Ged.
Click to expand...
Click to collapse
I believe you are correct! Theoretically, the script could rather easily check for added files by checksumming the entire /system partition before running the update (using a fast hash algorithm-- you're only looking for the presence of any changes, afterall). And I did have one OTA that went fine, other than losing root back on my Galaxy Nexus.
Again though, it's a classic case of should versus real life. Some root methods might alter things in /system without your knowing, or root actions might alter permissions. Either way, it's a tricky, nasty little game.
So far as recoveries go: yeah, OTAs have a nasty habit of trying to do that. Some of the more advanced recoveries can resist being overwritten though/slipstream a root ZIP into the update process.
GedBlake said:
The OTA would only fail, if it found files in /system that SHOULD BE THERE, but have been removed, modified, or replaced by the user (or via some app run by the user).
Click to expand...
Click to collapse
Typically the OTAs also update the boot image, so the boot partition (LNX) is also checked. The stock recoveries almost always use the same kernel (with a different ramdisk) as the boot image, so they are usually rewritten too.
Owners of tilapia N7 devices have reported successful flashing of everything but radio firmware images when they used a custom recovery to process the OTA bundle. Not a disaster, as their devices will still function with old radio firmware, but it puts them in an unusual position of being unable to use the OTA to subsequently update the radio, even if they restore the stock recovery (the system files and boot images will have been changed, so almost all of the checksums will fail). At that point, using fastboot is an alternate option, but then the newbs will need to read about OTA images, unpack them, yadda yadda yadda.
IMO it is just a dumb idea applying OTAs to anything but a pure stock device. And when I say pure stock, I mean including the stock recovery. The boot loader can be left unlocked, but that's about it.
There are a lot of ways to skin the cat, but IMO the best way to proceed is to operate with two parallel but independent tracks of Nandroid backups/restores: one track is a sequence of pure stock, and the other your customized ROM du jour.
Let's presume you have a Nandroid backup of the pure stock ROM. Make a backup of your current (customized) ROM & get it copied off the tablet (in the event of a disaster), restore the pure stock ROM nandroid backup, flash the stock recovery back to the tab, and then take the OTA.
At this point:
[ unlocked bootloader ] soft-boot (no flashing) a custom recovery using fastboot, and then make yet another Nandroid backup of the newly updated stock ROM including the recovery image. (This becomes the new baseline for future OTAs)
[ locked bootloader ] re-root with motochopper, capture the (new) stock recovery partition using 'dd', flash a custom recovery ('dd' or other method), make a Nandroid of this. (These two backups become the new baseline for future OTAs)
Then, repeat any rooting customizations (if you are a "lightly customized rooted stock" kinda person), and restore apps (Market apps only!) with TiBu.
This may seem like a great deal of work, but it is the only way to insure that you can revert to a prior starting position. Look: after going down a road like this you can even restore the old customized ROM backup to make TiBu app backups after the fact, simply because you can return to any point in time if you have made a backup (and kept a copy of it off the tablet).
Everybody makes mistakes - even the experts. But the lazier folks are (read: toolkit user) the more likely is a disaster. Everybody needs to make backups.
What will happen if I change some values in build.prop editor? I won't be able to install stock ROMs anymore? Or what?
Sent from my Nexus 7 using xda app-developers app
valapsp said:
What will happen if I change some values in build.prop editor? I won't be able to install stock ROMs anymore? Or what?
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
Depends on how you mean "install", you can always install via .img or recovery flashing method, but course that will overwrite your build.prop with the provided version and you would just have to re-edit the values again.
Did you mean OTA wise? If the update doesn't check for the hash of the build.prop, it will likely just replace it with a newer version if anything has changed from the last version to the new version.
As others have said, worse case scenario, the OTA fails to proceed due to errors and you would just have to manually update it yourself, as you could just flash a new boot.img and system.img from google's site (just have to remember anything you added on top of system or custom kernels will of course be reverted, so they will need to be reapplied).
Settings and user apps and such all live in /data , so it should just simply boot up as an upgraded system but with everything else intact (course I always make a backup via my custom recovery just in case).
kbeezie said:
Depends on how you mean "install", you can always install via .img or recovery flashing method, but course that will overwrite your build.prop with the provided version and you would just have to re-edit the values again.
Did you mean OTA wise? If the update doesn't check for the hash of the build.prop, it will likely just replace it with a newer version if anything has changed from the last version to the new version.
As others have said, worse case scenario, the OTA fails to proceed due to errors and you would just have to manually update it yourself, as you could just flash a new boot.img and system.img from google's site (just have to remember anything you added on top of system or custom kernels will of course be reverted, so they will need to be reapplied).
Settings and user apps and such all live in /data , so it should just simply boot up as an upgraded system but with everything else intact (course I always make a backup via my custom recovery just in case).
Click to expand...
Click to collapse
Thanks, and does backing up thru cwm also back up the build.prop?
valapsp said:
Thanks, and does backing up thru cwm also back up the build.prop?
Click to expand...
Click to collapse
Yes, but not in the way you're thinking. If you back up the whole system, CWM will package each partition up (/system /data , etc), so when you flash a new rom or system on, you can't just selectively restore build.prop since restoring in CWM Would also restore the entire system partition.
You can while in recovery, mount /system and do something like
adb pull /system/build.prop , and save a copy of it on your computer, so you can go back in and change the affected values back if for some reason you needed to.
If you're familiar with ghosting, nandroid backups (what CWM and most others do, minus some variations), are basically exact clones of all the files on each partition. Older recoveries actually took an image snapshot, newer ones basically pack all the files in a compressed archive (With some kind of note of what partition type it was, ext4, etc). The latter can easily be unpacked with tar, or 7zip, etc, but disk images are a different matter.
I can't remember which one CWM does exactly since on my DZ I use 4EXT, and on my Nexus devices I use TWRP.
kbeezie said:
Yes, but not in the way you're thinking. If you back up the whole system, CWM will package each partition up (/system /data , etc), so when you flash a new rom or system on, you can't just selectively restore build.prop since restoring in CWM Would also restore the entire system partition.
You can while in recovery, mount /system and do something like
adb pull /system/build.prop , and save a copy of it on your computer, so you can go back in and change the affected values back if for some reason you needed to.
If you're familiar with ghosting, nandroid backups (what CWM and most others do, minus some variations), are basically exact clones of all the files on each partition. Older recoveries actually took an image snapshot, newer ones basically pack all the files in a compressed archive (With some kind of note of what partition type it was, ext4, etc). The latter can easily be unpacked with tar, or 7zip, etc, but disk images are a different matter.
I can't remember which one CWM does exactly since on my DZ I use 4EXT, and on my Nexus devices I use TWRP.
Click to expand...
Click to collapse
Thanks, an easier way is to copy the build.prop thru a file manager.
But since I'm on my geek mood today I wanna know if it's possible to extract the backed up (Nandroid) file and find the build.prop somewhere there.
Sent from my Nexus 7 using xda app-developers app
valapsp said:
Thanks, an easier way is to copy the build.prop thru a file manager.
But since I'm on my geek mood today I wanna know if it's possible to extract the backed up (Nandroid) file and find the build.prop somewhere there.
Sent from my Nexus 7 using xda app-developers app
Click to expand...
Click to collapse
If it's a backup done with 4EXT or TWRP most certainly since it's just a tarball package (or tar+gzipped if you enabled compression) and can be easily unpacked by tar, or any popular archive utility like 7Zip for windows. (restoration generally just looks at the file info to see what partition type it's supposed to be, formats the partition as such, and then just un-tars the content, with the permissions and such retained).
If it's older where it's an actual jaffs (may have spelled that wrong) disk image, I'm not sure off the top of my head how you would mount it as a disk , and then mount the ext4 or ext3 partition in order to get to it. I would assume ClockworkMod would have upgraded their backup method to the same as TWRP or 4EXT, but it's possible that they didn't for compatibility reasons.

Need help flashing ROM on I545

Hi it is the first time I am flashing Android ROM. I have done some reading already. Before I start, I still have a few questions and also want to make sure I am doing it right.
I own the Galaxy S4 Verizon I545. It is running Samsung ROM Android 4.4.2, Baseband I545VRUFNC5. My goal is to flash a new ROM with recent Android versions, hopefully 7.1.1 (but I would settle with Marshmallow if that is more stable), it can be close to AOSP, I don't need ROMs with extra features.
In my understanding, the bootloader is locked, it will only load signed kernels and recovery. And then the kernel would load the system. In order to flash the system, it is best to flash the recovery first with TWRP. TWRP is modded with loki hack so it would load with the locked bootloader.
So here are my questions:
1. Does it matter which firmware/baseband I am currently on? For some phones (LG G2) I heard newer firmware fixed the loki hack. Should I update to the latest Samsung rom or leave it at NC5?
2. I don't see many ROM posted for the i545, which one is the most recent and reasonable stable? The Cyanogen website is down, should I try LineageOS?
3. I see different instructions for flashing TWRP. Can I flash it with just Odin? Some instruction mentioned rooting the phone first with KingRoot or other root, and then use dd. Does the phone have to be rooted? (I prefer not to if it is not necessary)
4. If after I flashed recovery, it fails to boot into TWRP, what can I do to restore everything to default?
5. The kernel will be untouched in the process right? I am only flashing recovery and system ROM, and the kernel will work fine with the new system ROM?
Here are the step and software I plan to use:
0. reset the phone to factory
1. use Odin to flash TWRP 2.8.7
2. download a ROM compatible with I545 and place it on the phone
3. flash the system using TWRP
Any feedback would be appreciated.
PS: Also I have a LG G2 D801. I would flash that phone instead if it is easier. I just want to get started and learn some things along the way.
https://forum.xda-developers.com/galaxy-s4-verizon
Oh Sorry. Didn't notice there is another forum. Should I repost there?
Yes.
1. Yes, it does matter. As you said, newer firmwares have fixed the exploits which make the phone harder to hack.
2. Any ROM should support your phone. They are generally unified.
3. In the name of anything holy, do not root with KingRoot. If you want to root, then the only way to go is CF-Auto-Root.
Rooting is sometimes necessary because recovery won't always install with Odin.
4. Flash stock ROM.
5. Kernels are specific to ROMs. So no, the kernel won't be untouched.

[help] flashing stock kernel back

Hi, i have a moto g4 plus XT1644 U.S Model. I flashed lineage os 14.1 with elemental x kernel. I'd like to know how to flash back the original kernel on this device since i can't find any "understandable" guide. From what i understood i have to go back to the stock nougat rom and then i'd be fine...? Thanks in advance!
Prowy333 said:
Hi, i have a moto g4 plus XT1644 U.S Model. I flashed lineage os 14.1 with elemental x kernel. I'd like to know how to flash back the original kernel on this device since i can't find any "understandable" guide. From what i understood i have to go back to the stock nougat rom and then i'd be fine...? Thanks in advance!
Click to expand...
Click to collapse
By original kernel, do you mean the kernel that came with LineageOS or are you referring to the kernel that came with the Motorola stock ROMs?
If you mean flashing the kernel that came with LineageOS, you can extract the boot.img from the LineageOS zip you flashed with, which is the LineageOS kernel - a good file manager app (e.g. Amaze) should allow you to view the zip file (no need to extract the whole zip file) and extract the boot.img to your Downloads folder. Ideally, perform this extraction step on your device to minimise the chances of corruption (hopefully TWRP would stop a corrupted image being flashed!)
Then:
Reboot to TWRP recovery.
Backup your existing system, just in case anything happens.
Head back up to Install, press Install.
Tap 'Install Image'
Navigate to the boot.img that you extracted from the LineageOS zip (e.g. in your Downloads folder).
Select 'boot' as the target partition.
Wait for your new kernel to flash.
Tap on the back button and head to 'Wipe'
Wipe cache and Dalvik
Reboot.
If anything happens, you can reboot to your TWRP recovery and restore the backup you made. For future reference, if you flash a ROM, back up your boot.img (which contains your kernel) before flashing a new kernel on top. That way, you have an existing copy of your original kernel ready to revert back to.
If you want to revert back to your stock, Motorola, kernel, then your best bet is to flash the whole stock ROM, so you'll have a stock system. I would not recommend flashing a stock kernel onto a custom ROM (custom kernels, like ElementalX, are okay on stock ROMs, but check the custom kernel first). For the latest Nougat stock ROM, here's the fastboot ROM https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369 but be aware this will replace your custom ROM with the stock ROM, stock recovery and stock kernel. TWRP and root and any modifications on your custom ROM will be erased and your data may be wiped too. Back up accordingly and it may be worth moving your data off your device as a precaution.
Any more questions, please ask/research before you perform anything. Good luck either way.
echo92 said:
By original kernel, do you mean the kernel that came with LineageOS or are you referring to the kernel that came with the Motorola stock ROMs?
If you mean flashing the kernel that came with LineageOS, you can extract the boot.img from the LineageOS zip you flashed with, which is the LineageOS kernel - a good file manager app (e.g. Amaze) should allow you to view the zip file (no need to extract the whole zip file) and extract the boot.img to your Downloads folder. Ideally, perform this extraction step on your device to minimise the chances of corruption (hopefully TWRP would stop a corrupted image being flashed!)
Then:
Reboot to TWRP recovery.
Backup your existing system, just in case anything happens.
Head back up to Install, press Install.
Tap 'Install Image'
Navigate to the boot.img that you extracted from the LineageOS zip (e.g. in your Downloads folder).
Select 'boot' as the target partition.
Wait for your new kernel to flash.
Tap on the back button and head to 'Wipe'
Wipe cache and Dalvik
Reboot.
If anything happens, you can reboot to your TWRP recovery and restore the backup you made. For future reference, if you flash a ROM, back up your boot.img (which contains your kernel) before flashing a new kernel on top. That way, you have an existing copy of your original kernel ready to revert back to.
If you want to revert back to your stock, Motorola, kernel, then your best bet is to flash the whole stock ROM, so you'll have a stock system. I would not recommend flashing a stock kernel onto a custom ROM (custom kernels, like ElementalX, are okay on stock ROMs, but check the custom kernel first). For the latest Nougat stock ROM, here's the fastboot ROM https://forum.xda-developers.com/moto-g4-plus/how-to/moto-g4-plus-xt1640-43-athene-npj25-93-t3549369 but be aware this will replace your custom ROM with the stock ROM, stock recovery and stock kernel. TWRP and root and any modifications on your custom ROM will be erased and your data may be wiped too. Back up accordingly and it may be worth moving your data off your device as a precaution.
Any more questions, please ask/research before you perform anything. Good luck either way.
Click to expand...
Click to collapse
Thank you so much, it's ok if i lose all my data,twrp by flashing the stock rom via dab. I just wanted to be sure that i would go back to the stock kernel as well (If i'll ever have problems with the EX Kernel).
Do you think EX kernel would give my device better battery life?
Prowy333 said:
Thank you so much, it's ok if i lose all my data,twrp by flashing the stock rom via dab. I just wanted to be sure that i would go back to the stock kernel as well (If i'll ever have problems with the EX Kernel).
Do you think EX kernel would give my device better battery life?
Click to expand...
Click to collapse
with ex kernel you have the option to underclock your device. you may want to try it if you are interested in saving battery!
Ayan Uchiha Choudhury said:
with ex kernel you have the option to underclock your device. you may want to try it if you are interested in saving battery!
Click to expand...
Click to collapse
What's the recommended values for our moto g4 plus?
while flashing ex kernel you'll see 4 values of frequency. choosing any one of them will suffice. I would not recommend going for other values.
hit the thanks button if it helped!
Ayan Uchiha Choudhury said:
while flashing ex kernel you'll see 4 values of frequency. choosing any one of them will suffice. I would not recommend going for other values.
hit the thanks button if it helped!
Click to expand...
Click to collapse
Didn't know that, i 'll give it a try thanks!
Not booting up
I did as it is said above and the stock booted fine.
there was a software update and after installing it, the phone isn't booting up.
Please help, thank you in advance
ps i had element x kernel before relocking

Categories

Resources