[CLOSED][Question] About boot.img and ramdisk.cpio - Android Software/Hacking General [Developers Only]

Hello,
I'm just diving into Android stuff, and I'm going through Magisk stuff to understand more about it.
When I use magiskboot unpack boot.img of pixel 6a, it only gives me a kernel file. Is it normal for a stock boot.img to not to contain ramdisk.cpio?
I was under the assumption that it essentially tells the device what files to load and whatnot. If it doesn't contain the ramdisk.cpio, how does the device work when I just fastboot flash boot boot.img? Is there ramdisk.cpio already on the device?
Thanks!

drunk_santa said:
Hello,
I'm just diving into Android stuff, and I'm going through Magisk stuff to understand more about it.
When I use magiskboot unpack boot.img of pixel 6a, it only gives me a kernel file. Is it normal for a stock boot.img to not to contain ramdisk.cpio?
I was under the assumption that it essentially tells the device what files to load and whatnot. If it doesn't contain the ramdisk.cpio, how does the device work when I just fastboot flash boot boot.img? Is there ramdisk.cpio already on the device?
Thanks!
Click to expand...
Click to collapse
drunk_santa said:
Hello,
I'm just diving into Android stuff, and I'm going through Magisk stuff to understand more about it.
When I use magiskboot unpack boot.img of pixel 6a, it only gives me a kernel file. Is it normal for a stock boot.img to not to contain ramdisk.cpio?
I was under the assumption that it essentially tells the device what files to load and whatnot. If it doesn't contain the ramdisk.cpio, how does the device work when I just fastboot flash boot boot.img? Is there ramdisk.cpio already on the device?
Thanks!
Click to expand...
Click to collapse
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com

Related

[Resolved] [Q] AOSP ICS Porting to Samsung Galaxy Tab2 10.1(GT-5100) Please Help!

Hello everyone,
I am newbie Android ROM development. Nowadays I try to port a specific custom ROM(a special ROM for my company) for Galaxy Tab2 10.1 (GT-P5100). But there is a point that I cannot figure out.
First of all I downloaded android ICS source code and apply my company's module patch to this source. Then I found device and vendor tree for my GT-5100 device and put it my source tree. Finally I built Samsung GT-P5100 kernel and put output file to correct place. At the end of these operations, I compiled all device tree successfully, now I have out/target/product/p5100 file which contains boot.img, system.img, userdata.img etc.(I attached an image file). Everything is fine untill this point. Normally in fastboot mode, I use "fastboot flashall -w" command and img files are automatically flashed to device. But GT-P5100 does not support fastboot mode.Question is this: How can I flash these img files(out/target/product/p5100 file) to the device? I searched lots of threads but cannot find a solution. I also tried to create a ROM which includes system file, boot.img and META-INF file. However it is not worked. Because create a META-INF file is very complicated and I have to find a quick flash option.
I need your helps.
Thanks,
------------------------------------------------------
Edit:
Finally I found solution. Just nedded to use command : make -j4 otapackage and then I get the ROM package to flash this AOSP.

Rooted MHA-L29C567B183 Flashable

Is there anyway to flash a full ROM already rooted older version for this model?
This would remove the step to return to factory initial condition to take the upgrade? (I know the device is young, but some established phones this is the way to do it if bootloader and modem is up to date) so the first question is possible to create such a ROM and post?
You could use https://forum.xda-developers.com/android/help/extract-dat-marshmallow-lollipop-easily-t3334117
extract system.img from update.app, unpack system.img using Imgextractor.exe.
Unpack boot.img from update.app.
Extract boot.img using Android Image Kitchen.
Preroot ramdisk.
Make a flashable zip from extracted system.img and boot.img. Set up permissions, copy files..., etc in updater-script. Make the script flash boot.img.
Done. (In theory, I've not built a rom for any Huawei device yet.)
But to answer your question: Yes.
Just look at the KangVIP roms over in Development. You could just build a stock rom with root.
Edit: Imgextractor actually saves permissions to a file.
Edit 2: You could just flash the newer boot.img in TWRP and root it there, then extract boot image using dd and include that in your rom.
OR use su in /system/bin/
Edit 3: Any rom makers here? Would VENDOR and PRODUCT need to be extracted and flashed as well? (Assuming you're on a pre B183 C567 stock rom)
Nevermind, system.img is unextractable :/
Or the tool I use is not compatible with android N.
That would be awesome I'm stuck on c636 and have no way of going to c567 without paying.
Your headed in a direction, lots of us owners have been waiting for...
Sent from my MHA-L29 using Tapatalk
Benefits of 567 over 636?

[GUIDE] Install official Pixel Expierene ROM and Google Camera Mod 7.x

Welcome to my latest Thread. Today for the Official Pixel Expierence Builds from the Official Website. This Guide does include the Installation of a custom Recovery which allows Factory Resets and flashing Updates/ROMs. Enjoy!​
1. Download and prepare everything
First of all visit: https://developer.sony.com/file/dow...-aosp-android-10-0-kernel-4-14-kumano-latest/
And download the latest Software Binaries from Sony which You will need to flash together with the Boot Image (Kernel).
After that download the ROM File from here: https://download.pixelexperience.org/ and also download the "Recovery Image" which is a Kernel/Boot Image
Get the Magisk Manager Apk from here: https://github.com/topjohnwu/Magisk
Extract the Software Binaries to get the .img File from it.
2. Flash using Fastboot
After getting the Kernel/Boot Image do a patch with the Magisk Manager App (Your Phone doesn't needs to be rooted for that) (The Output File will get called magisk_patched,img from now)
Flash the Software Binaries from SONY with:
Code:
fastboot flash oem_a SW_binaries_for_Xperia_Android...............img
Repeat that step with:
Code:
fastboot flash oem_b SW_binaries_for_Xperia_Android...............img
Now flash the Kernel You got from the Magisk Manager with:
Code:
fastboot flash boot_a magisk_patched.img
And repeat that again for the Second Slot:
Code:
fastboot flash boot_b magisk_patched.img
3. Install using a SD Card or ADB
After flashing the Kernel. Turn Off Your Device and hold the Volume- (Lower) Button together with the Power Button until You see the SONY Logo. Release both Buttons and wait for the Recovery coming up.
Search now for the Apply Update Option and select based on Your preference the ADB or SD Card Method to flash the ROM. Connect Your Xperia to Your PC again and enter:
Code:
adb sideload filename.zip
(In case of using the ADB Method)
Your Device should now flash the selected ZIP File (In our case the Pixel Expierence ROM).
4. Profit
Wipe Your Device now using the Factory Reset of the Recovery. Install the Magisk Patched Kernel Image again using the commands of the second Step of this Guide to keep Magisk functional. Connect Your Phone to a Charger and install the latest Magisk Manager to Your Phone. That's it! Enjoy
What Works:
VoLTE
Wifi Calls
Video Calls over Carrier
Camera Button (Does not start Camera Apps)
Everything!?
Bugs:
None!?
Do you feel some animation lag
Sketch. said:
Do you feel some animation lag
Click to expand...
Click to collapse
Yes. I think there is some Kernel Panic. Not sure but battery life could also be better right?
Think I can fix some stuff with MARS pretty soon.
Google Camera works just fine from Urnyx btw. First Time we can use GCAM 7.x fully!
Link: https://www.celsoazevedo.com/files/android/google-camera/f/changelog1343/#google_vignette
Are all functions of gcam work normally ? (like HDR+,Night sight,Astrophotography mode )
This guide is too difficult for inexperienced users, please make a guide on your youtube Channel, miustone. We need your help!
naygnosuw said:
Are all functions of gcam work normally ? (like HDR+,Night sight,Astrophotography mode )
Click to expand...
Click to collapse
Almost. Astro isn't available. 4K 60FPs Kills the App (don't toggle the 60FPS Button on 4K)
Tabike said:
This guide is too difficult for inexperienced users, please make a guide on your youtube Channel, miustone. We need your help!
Click to expand...
Click to collapse
It feels so simple but I got You. I'm still not sure how I should do it. I have a PC, a Chromebook and a Xperia 5 for recording. While the Xperia needs to get flashed (not usable as Camera). I could make a Video with My Chromebook maybe in 720p and combine it with Screen recording somehow. I'm not a YouTuber but I will give it a shot this week... Promised!
Xperia 1 - J8110, J8170, J9110, 802SO, SO-03L, SOV40 variants - what are they?
and what variant PE Rom support official?
Updated the Guide.
@JOKER.SOHA It's printed on the back of Your Xperia (Bottom). Model Numbers... Choose the right one for You. Don't understand the rest of Your question... Sorry
我没有移动数据。
未检测到SIM卡。
MOD EDIT: Please post only in English according to the FORUM RULES or at least add an English translation below your foreign language(Google translator for example), translation added below:
I don't have mobile data.
The SIM card was not detected.
Looks promising will try after the battery drain/lag is fixed. Also will this room be maintained or is it just take it how it is? Great work either way!
Term1nator3000 said:
Looks promising will try after the battery drain/lag is fixed. Also will this room be maintained or is it just take it how it is? Great work either way!
Click to expand...
Click to collapse
Yeah the drain sucks, but great ROM so far. I'm satisfied and use it as daily driver. You can find the Device Maintainers over the Pixel Expierence Website. This is just a Guide Thread since we don't have TWRP. So the Maintainer is free to open up a official Development Thread but they haven't yet... Someone could ask maybe, it's just copy and paste and would help to talk about Bugs and such
Miustone said:
Yeah the drain sucks, but great ROM so far. I'm satisfied and use it as daily driver. You can find the Device Maintainers over the Pixel Expierence Website. This is just a Guide Thread since we don't have TWRP. So the Maintainer is free to open up a official Development Thread but they haven't yet... Someone could ask maybe, it's just copy and paste and would help to talk about Bugs and such
Click to expand...
Click to collapse
Ahh okay np. Hopefully things will smooth out.
I found PixelExperience's J9110 Install Step and did some comparison.
(Sorry I'm not allowed to post a link by now, but it's easy to find on PE's website.)
PE's install step mentioned that flash PE need to unlocked BL, but your guide didn't mention.
And your guide have a kernel flash step, but PE's install tutorial missing this.
Here is my question:
Is it necessary to unlock the BL? (Because I did this to my old Xperia XZ once, there's a LOT problem for me lol)
Is it necessary to flash latest kernel?
Thanks in advance.
ceplavia said:
I found PixelExperience's J9110 Install Step and did some comparison.
(Sorry I'm not allowed to post a link by now, but it's easy to find on PE's website.)
PE's install step mentioned that flash PE need to unlocked BL, but your guide didn't mention.
And your guide have a kernel flash step, but PE's install tutorial missing this.
Here is my question:
Is it necessary to unlock the BL? (Because I did this to my old Xperia XZ once, there's a LOT problem for me lol)
Is it necessary to flash latest kernel?
Thanks in advance.
Click to expand...
Click to collapse
It isn't possible to flash anything besides Stock in Flashmode with a locked Bootloader. That's one of the Basic Things on Android. That's why it isn't mentioned here... You should carefully learn how everything works before thinking about to flash anything on Your Device...
The Pixel Expierence Guides for Xperias are wrong and do Not Work btw. That's the reason for My Guides...
Best Regards
Miustone said:
Yes. I think there is some Kernel Panic. Not sure but battery life could also be better right?
Think I can fix some stuff with MARS pretty soon.
Google Camera works just fine from Urnyx btw. First Time we can use GCAM 7.x fully!
Link: https://www.celsoazevedo.com/files/android/google-camera/f/changelog1343/#google_vignette
Click to expand...
Click to collapse
Hi, rom maintainer here, just to precise that a kernel panic would totally freeze your phone and you'll be unable to do anything except force reboot your phone.
Also, responding on another thing I saw on this thread, the only reason I don't open an xda thread per device supported is that I would have to update like 25 threads every month, respond the same questions for all those threads over and over etc
I have my telegram for that t.me/PixelExperienceSony
I might do 1 thread for all devices in cross platform dev section.
Cheers
can someone please make a step by step YouTube YouTube guide? I tried to follow the instructions with little sucess
Totally missed the dtbo.img flashing which prevents the Device from booting. You will need that Tool: https://androidfilehost.com/?fid=818070582850510260
To extract the payload.bin file inside of the Pixel Expierence Zips. Put the Payload Bin in the Input Folder and Start the Exe to extract the Bin File. You will get a dtbo.img file which you will need to flash like:
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
Together with the boot/magisk Images which will allow You to boot into the Recovery Mode by holding VolumeDOWN & the Power Button
Enjoy and sorry for the trouble! I will also update this Threads next just like My Rooting Threads.
Miustone said:
Totally missed the dtbo.img flashing which prevents the Device from booting. You will need that Tool: https://androidfilehost.com/?fid=818070582850510260
To extract the payload.bin file inside of the Pixel Expierence Zips. Put the Payload Bin in the Input Folder and Start the Exe to extract the Bin File. You will get a dtbo.img file which you will need to flash like:
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
Together with the boot/magisk Images which will allow You to boot into the Recovery Mode by holding VolumeDOWN & the Power Button
Enjoy and sorry for the trouble! I will also update this Threads next just like My Rooting Threads.
Click to expand...
Click to collapse
bro can you share the steps how to install.
do i need python to run the payload extract?
i cant flash the rom and cant use the phone, loop in the boot 5sec will restart ..
VOLTE not working in india with JIO network...
Were you able to get the Volte working on Indian networks?.

Question about boot.img and ramdisk.cpio

Hello,
I'm just getting into Android, and I've been messing around with boot.img with Magisk.
The boot.img that I'm specifically looking at is Pixel 6a.
I used `magiskboot unpack boot.img`, but I only got a kernel file.
Now, I'm wondering where the ramdisk.cpio. From what I read, ramdisk determines what to mount and whatnot.
Even without a ramdisk, I can fastboot flash boot boot.img it to my device and it will still work.
If there is no ramdisk in boot.img, then how does the device know what to mount or what the file hierarchy is when I flash it?
If the stock boot.img doesn't have a ramdisk, does not mean I have to generate my own?
Thanks!
init is on system, no ramdisk required.
https://source.android.com/docs/core/architecture/partitions/system-as-root#sar-partitioning
alecxs said:
init is on system, no ramdisk required.
https://source.android.com/docs/core/architecture/partitions/system-as-root#sar-partitioning
Click to expand...
Click to collapse
does that mean if I do include ramdisk.cpio, it overrides the one on system?
Yes, if you modify the kernel so ramdisk is extracted and processed (that's what Magisk does)
alecxs said:
Yes, if you modify the kernel so ramdisk is extracted and processed (that's what Magisk does)
Click to expand...
Click to collapse
Thank you so much for the link. I read up on it, and as you said, boot.img just carries a kernel file and ramdisk is in system.img.
It looks like you can also unpack, modify, and repack system.img and flash it onto pixel devices, so do you know why Magisk decided to create ramdisk.cpio and repack it into boot.img when it could have modified system.img? Is it because boot.img has a kernel file?
Thanks
Magisk also mods the DTB from "skip_initramfs" to "want_initramfs".
drunk_santa said:
It looks like you can also unpack, modify, and repack system.img and flash it onto pixel devices, so do you know why Magisk decided to create ramdisk.cpio and repack it into boot.img when it could have modified system.img?
Click to expand...
Click to collapse
Because Magisk is systemless-root method
https://topjohnwu.github.io/Magisk/boot.html

[HELP][Recovery] Unable to Find recovery.img in Motorola Moto G72 [Vicky] Firmware.zip

Hey XDA community!
I'm facing a problem while trying to build TWRP for my Motorola Moto G72 [Vicky]. I am unable to locate the "recovery.img" file in the firmware.zip of my device. I've searched extensively, including through the root storage of my device using Zarchiver, but I couldn't find any file named "recovery" or "recovery.img".
Here are some details about my device:
Device: Motorola Moto G72 [Vicky]
Partition Type: A/B (Dual-Partition System)
I've tried using MTK tools and MTK Client GUI 2.0 to extract the recovery.img file from the firmware, but unfortunately, my device fails the handshake when in BROM mode and boots directly into the bootloader.
Building TWRP requires the stock recovery image, and without it, I'm unable to proceed with the development of TWRP for my device.
I'm reaching out to the XDA community for assistance with the following:
If anyone with knowledge about the Motorola Moto G72 [Vicky] or similar devices has successfully extracted the recovery.img file from the firmware, I would greatly appreciate guidance on how to locate it.
If there's an alternative method or tool I can use to extract the recovery.img file from my device's firmware.zip, please provide suggestions or step-by-step instructions.
If there are any developers who have successfully built TWRP for the Motorola Moto G72 [Vicky] or have experience with devices using the A/B partition system, I would appreciate any insights or advice you can share.
I'm eager to contribute to the development of TWRP for my device, but this roadblock has prevented me from proceeding. Any assistance or guidance from the XDA community would be highly valuable.
Thank you in advance for your support and expertise!
Best regards,
FiniteCode
FiniteCode said:
Hey XDA community!
I'm facing a problem while trying to build TWRP for my Motorola Moto G72 [Vicky]. I am unable to locate the "recovery.img" file in the firmware.zip of my device. I've searched extensively, including through the root storage of my device using Zarchiver, but I couldn't find any file named "recovery" or "recovery.img".
Here are some details about my device:
Device: Motorola Moto G72 [Vicky]
Partition Type: A/B (Dual-Partition System)
I've tried using MTK tools and MTK Client GUI 2.0 to extract the recovery.img file from the firmware, but unfortunately, my device fails the handshake when in BROM mode and boots directly into the bootloader.
Building TWRP requires the stock recovery image, and without it, I'm unable to proceed with the development of TWRP for my device.
I'm reaching out to the XDA community for assistance with the following:
If anyone with knowledge about the Motorola Moto G72 [Vicky] or similar devices has successfully extracted the recovery.img file from the firmware, I would greatly appreciate guidance on how to locate it.
If there's an alternative method or tool I can use to extract the recovery.img file from my device's firmware.zip, please provide suggestions or step-by-step instructions.
If there are any developers who have successfully built TWRP for the Motorola Moto G72 [Vicky] or have experience with devices using the A/B partition system, I would appreciate any insights or advice you can share.
I'm eager to contribute to the development of TWRP for my device, but this roadblock has prevented me from proceeding. Any assistance or guidance from the XDA community would be highly valuable.
Thank you in advance for your support and expertise!
Best regards,
FiniteCode
Click to expand...
Click to collapse
Your not find recovery.img in most phones after Android 11 so has boot.img.
After that so depend about kernel. As we know your device Helio G99 can have 5.4 or 5.10 kernel and after that so the phones has boomi.mg but simple kmi google kernel. Not has the recovery_Ramdisk.
So these structure into vendor_boot.img now.
If you want custom recovery so that's need flash in the vendor_boot partition.
Simple
1. 3. => My friend @lopestom has knowledge and has TWRP with Helio G99 working.
You can find anything in the github.
DragonPitbull said:
Your not find recovery.img in most phones after Android 11 so has boot.img.
After that so depend about kernel. As we know your device Helio G99 can have 5.4 or 5.10 kernel and after that so the phones has boomi.mg but simple kmi google kernel. Not has the recovery_Ramdisk.
So these structure into vendor_boot.img now.
If you want custom recovery so that's need flash in the vendor_boot partition.
Simple
1. 3. => My friend @lopestom has knowledge and has TWRP with Helio G99 working.
You can find anything in the github.
Click to expand...
Click to collapse
Hey there!
I appreciate the information you provided about the changes in the file structure and the absence of the recovery.img file in newer devices. I was able to understand the concept, but I still have a question regarding the process of building a TWRP device tree without the files inside the recovery.
Specifically, I'm wondering how I can proceed further with the TWRP build if I need access to the files inside the recovery to create the device tree. Since the recovery.img is not available, I'm unsure how to extract the necessary files or gather the required information for building the device tree.
If you could provide some guidance on how I can gather the required files or extract the necessary information without the recovery.img, it would be immensely helpful. Any specific tools or methods I should consider for this purpose?
Thank you for your assistance and insights!
Best regards,
FiniteCode
FiniteCode said:
Hey there!
I appreciate the information you provided about the changes in the file structure and the absence of the recovery.img file in newer devices. I was able to understand the concept, but I still have a question regarding the process of building a TWRP device tree without the files inside the recovery.
Specifically, I'm wondering how I can proceed further with the TWRP build if I need access to the files inside the recovery to create the device tree. Since the recovery.img is not available, I'm unsure how to extract the necessary files or gather the required information for building the device tree.
If you could provide some guidance on how I can gather the required files or extract the necessary information without the recovery.img, it would be immensely helpful. Any specific tools or methods I should consider for this purpose?
Thank you for your assistance and insights!
Best regards,
FiniteCode
Click to expand...
Click to collapse
If you use the Source Code by company/carrier so you need knowledge.
If you only using stock vendor_boot.img so use this from alecxs
Issues with finding device tree blob (.dtb) file on Moto G72 running Android 12.1
Hi everyone, I'm currently having trouble finding the device tree blob (.dtb) file on my Motorola phone running Android 12. I've tried unpacking the boot image file using various tools, but I haven't been able to locate the .dtb file. Here are...
forum.xda-developers.com
& learning more about vendor_boot click
DragonPitbull said:
If you use the Source Code by company/carrier so you need knowledge.
If you only using stock vendor_boot.img so use this from alecxs
Issues with finding device tree blob (.dtb) file on Moto G72 running Android 12.1
Hi everyone, I'm currently having trouble finding the device tree blob (.dtb) file on my Motorola phone running Android 12. I've tried unpacking the boot image file using various tools, but I haven't been able to locate the .dtb file. Here are...
forum.xda-developers.com
& learning more about vendor_boot click
Click to expand...
Click to collapse
The even funnier part that thread was too started by me and you were there too!
FiniteCode said:
The even funnier part that thread was too started by me and you were there too!
Click to expand...
Click to collapse
It's very simple
Direct questions will have direct answers.
Questions about a broad subject will have broader answers.
If your goal was always about custom recovery then you should have prioritized that in your questions.
DragonPitbull said:
It's very simple
Direct questions will have direct answers.
Questions about a broad subject will have broader answers.
If your goal was always about custom recovery then you should have prioritized that in your questions.
Click to expand...
Click to collapse
I didn't, I had both the goals for roms and for custom recovery

Categories

Resources