Hi dear personal XDA developer. I would like to understand the whole structure of the operation of the platform. Desdo beginning of the boot by the end of the boot. Understanding how it is assembled in the form of the System Tree. In Order crescente.Tipo when a kernel is installed is loaded before or after the CWM. The CWM backups restores a Kernel? The fastboot is loaded before the ROM? or is part of the ROM Fastboot? I need to understand how it works the Tree of the Order of the boot startup. What it is first loaded? A Kernel ROM and improperly installed, can block the installation of a new kernel, if so how to install a kernel when the kernel fastboot no longer installs. How do I copy my kernel for security backup?
Related
I noticed for myself with custom ROMs there is no problem to flash a kernel zip
with Zimage or boot.img inside via recovery.Tried all available kernels and all works.
But if I do a restore to my rooted and S-Off stock ROM with stock kernel,
nothing works.First I flashed kernel zip with Zimage,then I got
Code:
Flashing New boot.img ...
assert failed: write_raw_image ("/tmp/newboot.img". "boot")
(Status 7)
Installation aborted
After this,I tried to flash a kernel zip with boot.img inside.This works,but
phone stuck at HTC splash image.
Also,after flashed the kernel zip with boot.img inside,the kernel zips with
Zimage inside works too,but also stucks at HTC splash image.
Phone details:
EVO 3D GSM, rooted by:
HBOOT 1.49.1107
revolutionary s-off
CWM 5.0.2.0
Any answers/solutions for this from the devs,why custom kernels don`t
work with rooted/S-Off stock ROM and stock kernel?
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
harpss1ngh said:
This should go to Q&A Section...
Stock ROM's have secured Boot Images, custom ROM Dev's unsecure the Boot Image to allow Root ADB commands.
Click to expand...
Click to collapse
I could be wrong, but as far as I know this is partly true, although I might have misread.
I agree, completely 100% stock kernels from the manufacturer have secured kernels (boot images).
Ganii said:
So no solution to get a custom kernel working on rooted/S-Off stock ROM
with stock kernel?
Click to expand...
Click to collapse
The first 256 bytes of the kernel/boot.img are the signature/encryption on 100% stock kernels for this device. Since the first 256 bytes are encrypted, the standard Anykernel (zImage in .zip file with dd, etc.) method does not work. It will successfully dump the kernel from the boot partition but it will fail when parsing out the pieces due to the 256 bytes at the beginning, at least in previous/current state.
The only way I've seen to bypass this is by flashing an unsigned kernel. I've had success removing the first 256 bytes of the dumped/RUU kernel file and flashing. Once the user has an unsigned/unsecured kernel loaded in the boot partition, the Anykernel style (zImage, dd, mkbootimg.sh, etc) type kernel usually works.
These unsigned kernel files can be found in ROMs or separately in kernel .zip files, but they have to always be in the boot.img form the first time.
Some of this is my personal theory but it is based on my experiences. Welcome anybody else with experience to chime in, especially other kernel developers.
Hope my ideas make sense!
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
I think you might be typing the commands wrong. Have you tried
fastboot flash zimage??? Also did you unpack/unzip the .img to the correct directory??? Also did you do fastboot reboot boot loader???
Locked & Loaded
""Shooter on Deck""
Ganii said:
I also tried to flash boot.img,but doesn`t work.
http://forum.xda-developers.com/showpost.php?p=18686747&postcount=166
Click to expand...
Click to collapse
If the kernel is compiled and verifed working properly, flashing the boot.img should work as it completely overwrites the stock kernel image.
In comparison to the Anykernel method, where they dump the stock signed kernel and attempt to split out the ramdisk, cmdline and base, which will fail due to the 256 byte signature at the front of the kernel.
As a side note, I'm fairly certain it would be simple to modify the current tools, somebody might have already, to ignore the first 256 bytes of the kernel partition, and then use the rest of the image to split out the correct information. On a mass scale, the only hard part would be determining which kernels had 256 bytes of encryption/signed or which don't. The easiest solution would be to provide a flag to pass to the binary which splits out the imagine ... probably getting off topic.
Hope the extra details help clarify the process as far as I understand it!
Whats the fastest kernel out for the EXT3? And how about EXT4?
Hello guys I have Alcatel One Touch 918n. I was trying to make a custom rom for the device. It is an armv6 device running on Android 2.3.6 . But for complete building and tweaks I need full stock rom which is not available on internet. So I decided to use cwm backup. I have a cwm v5.0.2.8 port for my device but I think it does not properly image the boot.img. as far as I know boot.img has zimage and ramdisk folder. Ramdisk has many tweaks associated with it. But my boot img contains zimage but no ramdisk. Also if I restore the boot.img it causes bootloop. So everytime I have to use advanced restore and restore all other img separately. Any solution so that I can fix the boot img
Hello
Here are some basic queries that I have before I start my adventure in Android ROM flashing:
What's the difference between Baseband and Kernal?
I have a Nexus 4 & Google provides only stock ROM (and not kernel) on their official website. If I flash a 3rd party kernel how will I able to restore stock kernel? and
What are binaries?
Thanks!
ngr.hd said:
Hello
Here are some basic queries that I have before I start my adventure in Android ROM flashing:
What's the difference between Baseband and Kernal?
I have a Nexus 4 & Google provides only stock ROM (and not kernel) on their official website. If I flash a 3rd party kernel how will I able to restore stock kernel? and
What are binaries?
Thanks!
Click to expand...
Click to collapse
To answer your questions:
1. Baseband is a subset of the phones system that controls radio communications and related aspects of cellular tower communications. The Kernel is the low level layer of code that interfaces directly with the phones hardware such as sensors, processor, etc
2. Included in the stock ROM or Google Factory Image for the Nexus 4 is a kernel, the kernel is contained withing the boot.img file in the ramdisk usually in the form of a zimage file. If you flash a 3rd party kernel and you want to restore the stock kernel you will have to flash the Google Nexus 4 Factory Image to restore the stock kernel. The other method is before you flash a 3rd party kernel is to make a NANDROID backup of your phones stock ROM using either Clockworkmod Recovery or Team Win Recovery Project. Then after you flash the 3rd party kernel if you want to restore the stock kernel you can just restore your NANDROID backup of the stock ROM which will contain the stock kernel.
3. Binaries are the proprietary files that allow the phones hardware and sensors such as the touchscreen or GPS for example to function. You will only need to download these if you are building Android from source and/or making your own custom ROM. If you need to download the proprietary binaries for the Nexus 4 you can download them from here.
Let me know if you still have any questions .
shimp208 said:
To answer your questions:
1. Baseband is a subset of the phones system that controls radio communications and related aspects of cellular tower communications. The Kernel is the low level layer of code that interfaces directly with the phones hardware such as sensors, processor, etc
2. Included in the stock ROM or Google Factory Image for the Nexus 4 is a kernel, the kernel is contained withing the boot.img file in the ramdisk usually in the form of a zimage file. If you flash a 3rd party kernel and you want to restore the stock kernel you will have to flash the Google Nexus 4 Factory Image to restore the stock kernel. The other method is before you flash a 3rd party kernel is to make a NANDROID backup of your phones stock ROM using either Clockworkmod Recovery or Team Win Recovery Project. Then after you flash the 3rd party kernel if you want to restore the stock kernel you can just restore your NANDROID backup of the stock ROM which will contain the stock kernel.
3. Binaries are the proprietary files that allow the phones hardware and sensors such as the touchscreen or GPS for example to function. You will only need to download these if you are building Android from source and/or making your own custom ROM. If you need to download the proprietary binaries for the Nexus 4 you can download them from here.
Let me know if you still have any questions .
Click to expand...
Click to collapse
Thanks a million for the follow up.
A few more specific questions:
1. By saying Baseband (used in Android terminology) and Radio (used in WinMo terminology) mean the same thing, right? So, can we say, flashing 3rd party basebands can improve cellular connectivity?
2. [In relation to your 2nd answer]
A. So, we can also extract zimage and flash it solely without the need of flashing the whole stock ROM, just like we flash a 3rd party kernel?
B. Is NANDROID really that reliable, as in, it's just like making an .iso of a DVD, and any malwares already present in your DVD would also get backed up?
3. I have seen many kernel threads in which OP mentions CWM and non-CWM variants. Saying so, does he means to say that the kernel comes with CWM built in, right? If this is true, no dev has not integrated TWRP right into their kernel. So, devs prefer CWM over TWRP? And
4. CWM has an app in the Play Store and I'm sure it's not that recovery mod. So what's that? How is it different from the flashable mod and the Touch version?
Lastly, a humble request, there can be more queries as I dive more deep into Android Dev., please do answer them.
Thanks
ngr.hd said:
Thanks a million for the follow up.
A few more specific questions:
1. By saying Baseband (used in Android terminology) and Radio (used in WinMo terminology) mean the same thing, right? So, can we say, flashing 3rd party basebands can improve cellular connectivity?
2. [In relation to your 2nd answer]
A. So, we can also extract zimage and flash it solely without the need of flashing the whole stock ROM, just like we flash a 3rd party kernel?
B. Is NANDROID really that reliable, as in, it's just like making an .iso of a DVD, and any malwares already present in your DVD would also get backed up?
3. I have seen many kernel threads in which OP mentions CWM and non-CWM variants. Saying so, does he means to say that the kernel comes with CWM built in, right? If this is true, no dev has not integrated TWRP right into their kernel. So, devs prefer CWM over TWRP? And
4. CWM has an app in the Play Store and I'm sure it's not that recovery mod. So what's that? How is it different from the flashable mod and the Touch version?
Thanks
Click to expand...
Click to collapse
To answer a few more of your questions :
1. Yes you can flash different basebands (Used pretty much interchangeably with radio) often referred to as modems to improve cellular connectivity.
2. A. You can in theory extract the zimage and bundle it with a ramdisk and boot the system from that or flash that using the command syntax in fastboot:
Code:
boot <kernel> [ <ramdisk> ]
flash:raw boot <kernel> [ <ramdisk> ]
I have never done it this way, the safer easier way is to flash the stock boot.img file that contains the stock kernel. For example:
Code:
fastboot flash boot boot.img
2. B. NANDROID is very reliable, it is the go to standard for completely backing up an Android using a custom recovery. In a sense it is like making an ISO disk on windows, as you mentioned since it backs up the whole system anything good or bad will be included in the backup. NANDROID also has advanced options to only restore part of your backup I.E only restore the boot.img or system.img file. So say you wanted to restore the stock kernel you could go into recovery mode and restore only the stock boot.img (Containing the stock kernel) file without having to restore your entire backup.
3. Kernels do not come with CWMR built in (Except on some older Sony devices and other exceptions to this rule) the recovery partition that contains CWMR or TWRP is separate from the boot.img partition where the kernel is stored. Developers don't necessarily prefer CWMR over TWRP for the most part they are completely compatible with each other it's more of a personnel preference on the user's part.
4. I believe you are talking about ROM Manager (Correct me if you are talking about a different app), ROM Manger is outdated and should not be used to flash CWMR on most modern devices as it can brick the device rather then installing the custom recovery image. I would recommend not using ROM Manager to try and flash anything to your device.
First question is the title basically, wanna flash miui if i happen to not like PE. Can i flash it with twrp?
Second question, If I flash PE without any custom kernels. And flash miui after that. Will i have my original kernel? Or does flashing custom roms change to a custom kernel?
Sorry a bit new to this. Thanks for your time.
1 - Yes, you can flash miui with twrp, just use rom recovery package.
2 - Any rom zip package comes bundled with the kernel. flashing will install the kernel contained in the package.
csleo17 said:
1 - Yes, you can flash miui with twrp, just use rom recovery package.
2 - Any rom zip package comes bundled with the kernel. flashing will install the kernel contained in the package.
Click to expand...
Click to collapse
What is rom recovery package?
thanks for your time man
ParsaMrrelax said:
What is rom recovery package?
thanks for your time man
Click to expand...
Click to collapse
Android devices predominantly followed by following partitions!
/system
/boot
/recovery
/vendor
/storage
/persist
/ta (in xperia)
/overlay (optional)
now RECOVERY (beside parition name) refers to a operating system DESIGNED ONLY to change size of these partitions (ADVANCE) and basic need to spread out(FLASH) operating system according to command by package in certain partitions. -- TWRP is one OUTSTANDING Recovery project over the years. back in old days Philztouch recovery was also popular for Xperia models-
the term "rom recovery package" means, READ ONLY MEMORY ( a android operating system File ) Designed for RECOVERY TO READ and spead the data in /system + / boot & /data partitions for your Poco (or any android based) for boot in to android operating system.
MIUI mainly releases TWO filetypes of SAME ROMS , for example miui10.3.6 has
1. RECOVERY ROM (1.6gb) (to be flashed by TWRP
2. FASTBOOT ROM (2.8gb) which can be flashed by FLASHER running on WINDOWS based System (some times iMac too)
3. Android devices uses many types of processor, SNAPDRAGON processors are famouss (poco uses Snapdragon or SD845) hence Two type of Flashers can be USED to FLASH POCO, 1 MI FLASH (RECOMENDED) (supports Two Mods, on fastboot rom, fastboot & EDL) or QUALCOMS QLOADER flasher (ADVANCE and NOT RECOMENDED)
coming back to twrp,
all custom roms are designed keeping in mind that RECOVERY (such as TWRP) will be FLASHING it on ANDROID DEVICE. so the sequence of flashing such roms are like
1. flashing vendor firmware , from a. vendor firmware , download from https://mirror.akhilnarang.me/MIUI/b...r-firmware.zip
b. flashing pixel experience ROM ( you should also try Crdroid and Havoc)
c. flashing google apps from openapps.org (take arm64>android9.0>MICRO package and hit download) 250+mb filesize
d. (optional) optimus drunk kernel (check development forum for post)
e. flashing magisk18.3.zip (if you want your Device to WAKEUP ROOTED)
now answering you question
1. YES YOU CAN TOGGLE BETWEEN MIUI AND CUSTOM ROMS, but don't make it habit! there is always chance for you to BRICK your device. also you will loose all your data if MIUI uses Encryption method which TWRP cannot READ to operate /data partition. then you must RE FORMATE /data partition via twrp in order to make it accesable for custom rom(s)
2.ANY TIME WHEN TWRP FLASH ANY ROM, MIUI OR ANY CUSTOM ROM, THE OLD KERNEL IS OBSOLETE AND NEW ONE IS PLACED thats why you need to flash magisk everytime you clean flash any rom in order to get root access
please do ask if you need any clarification
might be a old thread.
but i installed a custom rom on my moms phone but i thinking going back to stock. the custom rom is old and has scroll problems...
but i see stable miui has no updates. but can i flash official miui rom from twrp over the custom lingeos rom?
or is it better to update her phone to a more recent custom rom.
either way she will lose her data. plus camera has bugs but i never had the time with work and she working to put it back in a mint working state. cause the scrolling being broking is fuking stupid
tought about miui stable. just to flash it true trwp.
or update it to a more recent custom rom.
Hi all,
I have been looking into compiling the kernel and TWRP for this device.
For the kernel, it compiles but does not boot (Will invvestigate later ).
The TWRP does not boot, most likely related to boardconfig.mk. I am unable to find the kernel base or offsets. Can anyone assist in discovering this information? I have tried unpacking boot.img and the current tools does not show this information.
Shaky156 said:
Hi all,
I have been looking into compiling the kernel and TWRP for this device.
For the kernel, it compiles but does not boot (Will invvestigate later ).
The TWRP does not boot, most likely related to boardconfig.mk. I am unable to find the kernel base or offsets. Can anyone assist in discovering this information? I have tried unpacking boot.img and the current tools does not show this information.
Click to expand...
Click to collapse
Hello. I manage to create TWRP for this device.
It is currently tested on a device running the laster firmware RUI 4.0_C.13 but it should work in RUI 3.0. Decryption works, MTP didn't yet.