I see here and there requests about re-packing boot.img for ZF2.
Here are tools i'm using to re-pack my images for ZF2. This is for Linux. Just unpack attached archive to some directory. Put boot.img (or recovery.img renamed to boot.img) to the same directory and run extract_boot. Everything will be unpacked to boot sub-directory. Then you can modify boot/ramdisk directory as much as you want. When you finish, run make_boot and you will get boot.img ready to flash to ZF2.
Note1:
Generated boot.img set SELinux mode to permissive. This is better mode for modified boot/ROM. It will solve most problems you may encounter on custom ROMs.
Note2:
You HAVE to have unlocked bootloder in order to be able to boot the boot.img.
Note3:
Do not flash modified droidboot.img to ZF2! If somehow your bootloader will re-lock, you won't be able to boot anywhere if all three bootable partitions (boot.img, recovery.img, droidboot.img) will be modified. So, you will get bricked ZF2.
sorg said:
I see here and there requests about re-packing boot.img for ZF2.
Here are tools i'm using to re-pack my images for ZF2. This is for Linux. Just unpack attached archive to some directory. Put boot.img (or recovery.img renamed to boot.img) to the same directory and run extract_boot. Everything will be unpacked to boot sub-directory. Then you can modify boot/ramdisk directory as much as you want. When you finish, run make_boot and you will get boot.img ready to flash to ZF2.
Note1:
Generated boot.img set SELinux mode to permissive. This is better mode for modified boot/ROM. It will solve most problems you may encounter on custom ROMs.
Note2:
You HAVE to have unlocked bootloder in order to be able to boot the boot.img.
Note3:
Do not flash modified droidboot.img to ZF2! If somehow your bootloader will re-lock, you won't be able to boot anywhere if all three bootable partitions (boot.img, recovery.img, droidboot.img) will be modified. So, you will get bricked ZF2.
Click to expand...
Click to collapse
nice..thank you @sorg.. eventho I dont know on how to develop custom kernel..
can only wait for developers to release their custom kernel tester..
<deleted>
Great tool.
+1
Btw can you create same program for Windows?
can i use this to my asus ze500cl?
themonyo666 said:
can i use this to my asus ze500cl?
Click to expand...
Click to collapse
Maybe yes.
Try it.
Any love for windows?
S#@DY said:
Any love for windows?
Click to expand...
Click to collapse
mr_gourav2000 said:
Click to expand...
Click to collapse
Irrelevant reply, but I've got it. Thanks to @cieffe54
S#@DY said:
Irrelevant reply, but I've got it. Thanks to @cieffe54
Click to expand...
Click to collapse
Please share with us.
mr_gourav2000 said:
Please share with us.
Click to expand...
Click to collapse
Check your pm
S#@DY said:
Check your pm
Click to expand...
Click to collapse
Wow
Related
Hi to all.
I have a rooted Incredible S (through HTCDev), stock ics rom and S-ON.
Is there a way to install a modded kernel on stock rom?
jauffre said:
Hi to all.
I have a rooted Incredible S (through HTCDev), stock ics rom and S-ON.
Is there a way to install a modded kernel on stock rom?
Click to expand...
Click to collapse
theres a guide in xics kernel thread
Can you give me the link, please?
I tried XS ICS 2.2, and followed some advices to make it work, but it didn't.
jauffre said:
Can you give me the link, please?
I tried XS ICS 2.2, and followed some advices to make it work, but it didn't.
Click to expand...
Click to collapse
l0st.prophet said:
Changelog
Instructions for S-OFF Users
Simply flash XS-ICSvX.X.zip in your favourite recovery!
Instructions for manual flashing (HTCDev.com unlocked S-ON Users)
Thanks to MrToastbrot for instructions
Step 1: Download the XS-Kernel.zip, then open the Zip on your computer and extract the file mkbootimg.sh in "kernel"
Step 2: Open mkbootimg.sh in a texteditor like notepad++ or notepad, then edit the following in line 3:
Code:
output /tmp/newboot.img
to
Code:
output /sdcard/newboot.img
Step 3: Save your edited file and place it back in your zip, copy your modified zip to your phone-sdcard and install it in the recovery. Then reboot your phone and connect it to pc and take the newboot.img from the root of the sdcard.
Step 4: Now reboot your phone into bootloader and flash it via fastboot flash boot newboot.img
Step 5: Once you phone has booted, mount the system as r/w using something like ES file explorer or Root explorer, then type the following:
Code:
adb push bcm4329.ko /system/lib/modules
Set permissions to rw-r--r--, reboot and enjoy!
Sweep2Wake: Q&A
Q: How do I disable / enable the feature?
A: Two options
Change the value in the file /sys/android_touch/sweep2wake to either 0 for disabled, 1 for enabled and 2 for enabled with backlight. This will be reset upon rebooting.
If your ROM supports init.d scripts, then flash the zip to enable or disable, this will stick over a reboot.
Q: It keeps taking screenshots when I lock the screen!?
A: This is due to an incompatibility with this feature and the native screenshot in Sense. TO stop the screen shots, you need to edit your build.prop and change the property ro.htc.framework.screencapture to false, and then reboot.
Click to expand...
Click to collapse
there
Thanks!
The problem is that although i changed the mkbootimg.sh file, i cannot find the newboot.img.
jauffre said:
Thanks!
The problem is that although i changed the mkbootimg.sh file, i cannot find the newboot.img.
Click to expand...
Click to collapse
Try looking on your sdcard. Assuming you followed the guide correctly...
I followed the guide as it is, i modified the file as the guide says, and there's no newboot.img file on sdcard.
jauffre said:
I followed the guide as it is, i modified the file as the guide says, and there's no newboot.img file on sdcard.
Click to expand...
Click to collapse
Upload your modded zip file.
Nonverbose said:
Upload your modded zip file.
Click to expand...
Click to collapse
here it is
jauffre said:
here it is
Click to expand...
Click to collapse
Your modded zip is working on my phone but It's s-off. I found the newboot.img on sdcard root. Run your flashable zip again then go to tools>copy recovery.log to sdcard. It will be in your 4ext directory. Have a look and see if you can spot any errors. Upload here if you need any help.
Nonverbose said:
Your modded zip is working on my phone but It's s-off. I found the newboot.img on sdcard root. Run your flashable zip again then go to tools>copy recovery.log to sdcard. It will be in your 4ext directory. Have a look and see if you can spot any errors. Upload here if you need any help.
Click to expand...
Click to collapse
This is the log.
I don't understand it very much, but it seems that it copies the boot.img file, and then there are some errors.
could you upload the newboot.img file?
jauffre said:
This is the log.
I don't understand it very much, but it seems that it copies the boot.img file, and then there are some errors.
could you upload the newboot.img file?
Click to expand...
Click to collapse
I'm not on stock Rom, so my newboot.img will not work on your phone because it has a different ramdisk. You might want to try changing your recovery to 4ext touch.
Nonverbose said:
I'm not on stock Rom, so my newboot.img will not work on your phone because it has a different ramdisk. You might want to try changing your recovery to 4ext touch.
Click to expand...
Click to collapse
ok; i changed recovery to 4ext, and here is the log.
jauffre said:
ok; i changed recovery to 4ext, and here is the log.
Click to expand...
Click to collapse
Wow still got that BOARD_KERNEL_CMDLINE error happening. Try flashing tpbklakes unsecured boot.img and then update http://forum.xda-developers.com/attachment.php?attachmentid=1238549&d=1343964381
Nonverbose said:
Wow still got that BOARD_KERNEL_CMDLINE error happening. Try flashing tpbklakes unsecured boot.img and then update http://forum.xda-developers.com/attachment.php?attachmentid=1238549&d=1343964381
Click to expand...
Click to collapse
Thank you Nonverbose!! It worked!!
I know how to fastboot flash .img files and understand it includes the radio and kernel components. I'm rooted and have TWRP recovery. But which .img file contains the radio and which the kernel? I ask because I'll be going from the latest T-Mo rom (LYZ28J) to Project Fi having just received my sim. If I flash just the system.img from LYV48E (Fi rom) will I have the correct kernel and radio or will I have to flash boot.img also or something else? Since kernels and radios can be flashed separately I'm just not sure where everything comes from. I would appreciate some clarity.
Groid said:
I know how to fastboot flash .img files and understand it includes the radio and kernel components. I'm rooted and have TWRP recovery. But which .img file contains the radio and which the kernel? I ask because I'll be going from the latest T-Mo rom (LYZ28J) to Project Fi having just received my sim. If I flash just the system.img from LYV48E (Fi rom) will I have the correct kernel and radio or will I have to flash boot.img also or something else? Since kernels and radios can be flashed separately I'm just not sure where everything comes from. I would appreciate some clarity.
Click to expand...
Click to collapse
have you ever unzipped a factory.img .tar file to see what files it contains?
Groid said:
I know how to fastboot flash .img files and understand it includes the radio and kernel components. I'm rooted and have TWRP recovery. But which .img file contains the radio and which the kernel? I ask because I'll be going from the latest T-Mo rom (LYZ28J) to Project Fi having just received my sim. If I flash just the system.img from LYV48E (Fi rom) will I have the correct kernel and radio or will I have to flash boot.img also or something else? Since kernels and radios can be flashed separately I'm just not sure where everything comes from. I would appreciate some clarity.
Click to expand...
Click to collapse
simms22 said:
have you ever unzipped a factory.img .tar file to see what files it contains?
Click to expand...
Click to collapse
If I were a betting man, I'd be backing the horse called "Wish I'd done that before posting"
Tiptonian said:
If I were a betting man, I'd be backing the horse called "Wish I'd done that before posting"
Click to expand...
Click to collapse
Hahaa. Unzip and you shall receive. LMAO
simms22 said:
have you ever unzipped a factory.img .tar file to see what files it contains?
Click to expand...
Click to collapse
Not sure what you mean by this. I have the system, boot, recovery, and userdata .img files. I don't know which one has the kernel or which one has the radio. You imply I can unzip, for example, system.img to see what files are there, but I cannot unzip it or any of the .img files. My main question still is unanswered which is which .img files do I need to (m)fastboot flash to insure I have the correct (stock) kernel and radio for the Project Fi rom? I may just flash them all, flash TWRP, re-root and start clean, but I wanted to consider the option of keeping data. Any helpful answers?
Tiptonian said:
If I were a betting man, I'd be backing the horse called "Wish I'd done that before posting"
Click to expand...
Click to collapse
prdog1 said:
Hahaa. Unzip and you shall receive. LMAO
Click to expand...
Click to collapse
So glad my post was such a source of amusement for you. Sorry I didn't make it clear I know how download factory images, unzip the .tgz file to get the .tar file. Unzip the .tar file to get to the .zip file. Unzip the .zip file to get the boot, recovery, system, and userdata .img files. But no one actually tried to answer my question.
Groid said:
So glad my post was such a source of amusement for you. Sorry I didn't make it clear I know how download factory images, unzip the .tgz file to get the .tar file. Unzip the .tar file to get to the .zip file. Unzip the .zip file to get the boot, recovery, system, and userdata .img files. But no one actually tried to answer my question.
Click to expand...
Click to collapse
kernel is boot.img, radio is radio.img
Thank you for your reply. I suspected boot.img is the kernel but wanted to make sure. I notice that the radio-shamu-. . .02.78.02.img and boot-shamu. . .71.10.img are in the shamu-lvy48e folder in the .tar file with the flash batch files. The enclosed .zip file has the system, boot, userdata, recovery, and cache .img files along with the text file specifying the bootloader (kernel) and baseband (radio). I now understand that the boot.img is the kernel which is the same version my current one in LYZ28J, so I need not flash it. The radio is different based on the android-info.txt file. So, the last piece of the puzzle for me is will I get the updated radio by flashing the system.img or must I separately flash the radio-shamu -. . .-02.78.02.img?
Groid said:
Thank you for your reply. I suspected boot.img is the kernel but wanted to make sure. I notice that the radio-shamu-. . .02.78.02.img and boot-shamu. . .71.10.img are in the shamu-lvy42e folder in the .tar file with the flash batch files. The enclosed .zip file has the system, boot, userdata, recovery, and cache .img files along with the text file specifying the bootloader (kernel) and baseband (radio). I now understand that the boot.img is the kernel which is the same version my current one in LYZ28J, so I need not flash it. The radio is different based on the android-info.txt file. So, the last piece of the puzzle for me is will I get the updated radio by flashing the system.img or must I separately flash the radio-shamu -. . .-02.78.02.img?
Click to expand...
Click to collapse
youll get the updated radio in the factory.img, but you can always flash the radio itsrlf via fastboot(fastboot flash radio radioname.img).
Groid said:
Thank you for your reply. I suspected boot.img is the kernel but wanted to make sure. I notice that the radio-shamu-. . .02.78.02.img and boot-shamu. . .71.10.img are in the shamu-lvy48e folder in the .tar file with the flash batch files. The enclosed .zip file has the system, boot, userdata, recovery, and cache .img files along with the text file specifying the bootloader (kernel) and baseband (radio). I now understand that the boot.img is the kernel which is the same version my current one in LYZ28J, so I need not flash it. The radio is different based on the android-info.txt file. So, the last piece of the puzzle for me is will I get the updated radio by flashing the system.img or must I separately flash the radio-shamu -. . .-02.78.02.img?
Click to expand...
Click to collapse
If have updated SDK will get everything in flash-all.bat. If not and have to do all separate they are all separate. Bootloader, radio, boot, system, cache, userdata. There is no radio in system.img. It is the radio. img. On first unzip get bootloader, radio, flash-all and the folder for the rest of the images. If want radio fastboot flash radio (radio.img).
Thank you for answering my question about whether or not the radio gets updated by flashing system.img. Unfortunately, I cannot get ADB to work properly. I initially seem to have it working with the ADB devices statement from the command prompt, it returns the serial #, but when I try to execute the batch file ADB seems to be disconnected. At least I have experience with (m)fastboot and will just flash the radio and system .imgs since the bootloader is the same. I'll keep TWRP recovery, format cache, update supersu for root and I should be good to go.
Groid said:
Thank you for answering my question about whether or not the radio gets updated by flashing system.img. Unfortunately, I cannot get ADB to work properly. I initially seem to have it working with the ADB devices statement from the command prompt, it returns the serial #, but when I try to execute the batch file ADB seems to be disconnected. At least I have experience with (m)fastboot and will just flash the radio and system .imgs since the bootloader is the same. I'll keep TWRP recovery, format cache, update supersu for root and I should be good to go.
Click to expand...
Click to collapse
well, adb doesnt work in the bootloader, and its only fastboot that can flash those files..
Thanks, I was responding to using adb to sideload with the flash(all).bat. Fastboot works fine for me so I don't really miss using adb commands.
Hello!
I looked for this, but can't seem to find a clear answer. The other thread on this is over 3,000 posts (can't look through all that).
I am currently on 6.0.1 with February 1 security update on rooted Nexus 6, stock, with TWRP recovery. I want to apply the latest security patches using NRT....How to?? What is my easiest method to doing this? Thanks in advance, cheers!
The easiest method is not to use NRT. Much as I'm a fan of it, having contributed to Wug several times, the manual method is simpler. Boot into bootloader, start a CMD session, flash system.img & boot.img, and radio.img if you want to be particularly careful, and reboot. Job done. No data loss, everything as normal apart from the new security patches.
If the above isn't familiar, you need to read these forums a lot more. Not trying to be funny - I had to before I had the balls to offer advice to others.
Would we have to flash SuperSU again to reroot?
iluvatrix said:
Would we have to flash SuperSU again to reroot?
Click to expand...
Click to collapse
yes
dahawthorne said:
. Boot into bootloader, start a CMD session, flash system.img & boot.img, and radio.img if you want to be particularly careful, and reboot. Job done. No data loss.......
Click to expand...
Click to collapse
.....with the newest twrp-recovery (v3.0.0.1) it is possible to flash the boot.img and system.img, directly from the internal memory.
so what we do is dl the factory image , extract the boot.img and system.img , drag over to phone internal memory, boot twrp 3.0.0.1 then flash?
"flash the boot.img and system.img, directly from the internal memory"
"boot twrp 3.0.0.1 then flash?"
I don't believe you can install an img file in TWRP, and I've never tried. If you extract everything from the factory ROM image, including the zip within the zip, you'll find boot.img, system.img & radio.img. Copy them across to your PC folder where ADB.exe & fastboot.exe live, open a CMD window, boot your phone into bootloader mode, attach via USB, and separately fastboot flash the 3 img files. Then install TWRP, and from there you can install SuperSU v2.70 if you want to root.
dahawthorne said:
"flash the boot.img and system.img, directly from the internal memory"
"boot twrp 3.0.0.1 then flash?"
I don't believe you can install an img file in TWRP, and I've never tried. If you extract everything from the factory ROM image, including the zip within the zip, you'll find boot.img, system.img & radio.img. Copy them across to your PC folder where ADB.exe & fastboot.exe live, open a CMD window, boot your phone into bootloader mode, attach via USB, and separately fastboot flash the 3 img files. Then install TWRP, and from there you can install SuperSU v2.70 if you want to root.
Click to expand...
Click to collapse
You can flash images in TWRP 3.0.0-1
Recovery, system and boot. My PC is down and that's how I flashed N preview. Works great
Sent from my Nexus 6 using XDA Free mobile app
iluvatrix said:
so what we do is dl the factory image , extract the boot.img and system.img , drag over to phone internal memory, boot twrp 3.0.0.1 then flash?
Click to expand...
Click to collapse
Yes ?
---------- Post added at 01:11 PM ---------- Previous post was at 01:06 PM ----------
dahawthorne said:
...
I don't believe you can install an img file in TWRP, and I've never tried...
Click to expand...
Click to collapse
Try and you will believe. ?
That's why we're here - to learn...
Thanks, people.
31ken31 said:
You can flash images in TWRP 3.0.0-1
Recovery, system and boot. My PC is down and that's how I flashed N preview. Works great
Sent from my Nexus 6 using XDA Free mobile app
Click to expand...
Click to collapse
Do we then have to re-root after going this method? Also, will everything be the way it was before flashing (no data loss, no settings loss, etc.)?
Shaundiesel said:
Do we then have to re-root after going this method? Also, will everything be the way it was before flashing (no data loss, no settings loss, etc.)?
Click to expand...
Click to collapse
None and yes flash appropriate su to restore root
Sent from my Nexus 6 using XDA Free mobile app
http://forum.xda-developers.com/showpost.php?p=65136208&postcount=13
Works like a charm Every time.
hi guys, all custom roms are flashable. how can i fastboot flash the system partition of any custom rom, lile aicp or others? is that possible someway? tia!
I believe unpacking the system.new.dat from a ROM zip gives you a system.img, which I can only assume is fastboot flashable with fastboot command
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
FcukBloat said:
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
Click to expand...
Click to collapse
you can extract your system.new.dat by following this guide
thanks both! I suceeded in installing aicp's system image via fastboot after unpacking system.new.dat with a tool found on xda similar to the one you linked
thanks again!
Hi all, I want to clean install stock rom via fastboot. I used to do this on my oneplus one a while back. I think that I need to install img files to five partitions (boot.img, recovery.img, system.img, userdata.img and cache.img). Are there any other files that need to installed (eg bin or mbn files)?
I think I should be able to get the img files by unzipping the stock rom files. Has anyone tried to get the img files from unzipped stock rom and install via fastboot?
Any help is greatly appreciated.
Thanks
Don't know exactly, but also interested to learn about this!
OnePlus does not provide fastboot flashable roms, the only way to get them would be to update uusing the recovery first and extracting the .img files afterwards, but then you don't need them anymore since you are already upgraded.
Jo_Jo_2000 said:
OnePlus does not provide fastboot flashable roms, the only way to get them would be to update uusing the recovery first and extracting the .img files afterwards, but then you don't need them anymore since you are already upgraded.
Click to expand...
Click to collapse
The system.new.dat format is not unique to oneplus, but the standard for flashable android zips since version 6 (aka marshmellow). The system.new.dat, system.patch.dat and system.transfare.list are build from system.img while building a rom (aka compile rom from source). This process is NOT unidirectional; you can easily revert it. I'm on linux, so you have to google, how this is accomblished on win or darwin. For linux users:
https://github.com/xpirt/sdat2img