[REF] Kernel compiled from Source boots with fastboot [CONFIRMED] - Milestone XT720 Android Development

I've tried fastboot mode on xt720 and it actually worked. It can flash (without signature check) separate partitions system, userdata... But it seems that it checks signature on boot. It also can flash custom boot.img (kernel + ramdisk) but it can't boot because of sig checks. But the most interesting thing is that it can boot custom boot.img without flashing it. It is achieved with "fastboot boot boot.img" command. So we can run custom kernel without checking it. I've created custom boot.img with custom init.rc and it booted fine. Then I've changed one byte in the stock kernel and it also booted fine (many thanks to #milestone-modding devs). I've tried to build custom kernel but unfortunately I haven't figured out how to configure the build for xt720.
For booting to fastboot mode you should do this steps
1. Connect your phone to PC in debug mode
2. Run the following command
adb reboot bootloader
3. Download fastboot for windows from http://forum.xda-developers.com/showthread.php?t=463627
4. Then you can boot custom boot.img with command
fastboot boot boot.img

what revision of the boot is your phone? it might actually be a solution to booting custom roms, ie. 1st boot original kernel, then a hijack in mot_boot_mode to reboot using fastboot with custom boot.img, and wupti! you got your custom kernel loaded.
maybe the same boot loader works on milestone, as it has been tested upto 90.78 and did not work with fastboot, only developer phones has this enabled.

I had alreay do.. like a 2.6.32.9 kernel for milestone
but it doesn't work to my xt720(kor skt)
In my case I made a boot.img(kernel + ramdisk into original boot.img with hex edit)
it works and memory more available
but display 2.6.29-omap1
kernel & ramdisk from froyoModV1 boot.img

Dexter_nlb said:
what revision of the boot is your phone? it might actually be a solution to booting custom roms, ie. 1st boot original kernel, then a hijack in mot_boot_mode to reboot using fastboot with custom boot.img, and wupti! you got your custom kernel loaded.
maybe the same boot loader works on milestone, as it has been tested upto 90.78 and did not work with fastboot, only developer phones has this enabled.
Click to expand...
Click to collapse
The version of bootloader on xt720 is 80.89, there is a dump of mbm and mbmloader on and-developers, but there is no sbf file.

totoro1233 said:
I had alreay do.. like a 2.6.32.9 kernel for milestone
but it doesn't work to my xt720(kor skt)
In my case I made a boot.img(kernel + ramdisk into original boot.img with hex edit)
it works and memory more available
but display 2.6.29-omap1
kernel & ramdisk from froyoModV1 boot.img
Click to expand...
Click to collapse
There is mkbootimg tool which can make boot.img from kernel and ramdisk. Here is the guide http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
what do you mean by "memory more available" is it more then 256MB? how much is it exactly now?

korean motoroi(xt720) is available memory about 30MB
but lots of memory leak
(kr xt720 have 256MB RAM)
so I try to make a boot.img
prepare file list
original boot.img in xt720 2.6.29-omap1 dump file
boot.img in milestone 2.6.32.9 dump file
you have to split boot.img for milestone to kernel and ramdisk
now you have 2.6.29 boot.img and kernel, ramdisk
open the boot.img, kernel,ramdisk with hex edit program
boot.img : find 00 00 A0 E1 hex code (first item)
if you find, kernel all things copy and paste write to boot.img
boot.img : find 1F 8B 08 00 hex code (last item)
if you find, ramdisk all things copy and paste write to boot.img
and than save custom boot.img and boot possible
p.s
your custom boot.img file have to same MB with origin
I'm using HxD edit program

Thanks for sharing
I would like to try, but my milestone xt720 is bricked Hope that others will try...

totoro1233: you just booted with fastboot boot boot.img or you actually flashed boot.img with fastboot? If you have just booted then after restarting the phone stock kernel is booted.

resar said:
totoro1233: you just booted with fastboot boot boot.img or you actually flashed boot.img with fastboot? If you have just booted then after restarting the phone stock kernel is booted.
Click to expand...
Click to collapse
sorry ..
I had already flashed in GOT recovery(change the script to md5 checking remove)

So does it work??????

Dexter_nlb said:
what revision of the boot is your phone? it might actually be a solution to booting custom roms, ie. 1st boot original kernel, then a hijack in mot_boot_mode to reboot using fastboot with custom boot.img, and wupti! you got your custom kernel loaded.
maybe the same boot loader works on milestone, as it has been tested upto 90.78 and did not work with fastboot, only developer phones has this enabled.
Click to expand...
Click to collapse
Wow, subscribed to this thread, hopefully totoro1233 can provide more files and information as to how he got it to work.

totoro1233 said:
korean motoroi(xt720) is available memory about 30MB
but lots of memory leak
(kr xt720 have 256MB RAM)
so I try to make a boot.img
Click to expand...
Click to collapse
why make a custom boot.img?
- Milestone 2.6.32 kernel + ramdisk is the only parts in the boot.img
- a Custom boot.img with Milestone kernel + ramdisk xt720 is a NO-GO!!!
2.2 froyo require correct services loaded,and thats not gonna happen with a xt720 ramdisk.
- if you think a XT720 kernel + froyo ramdisk, im sure its not gonna free up any memory like that.
So purpose of splitting boot.img and remerging is less to 0 or lower than 0.

Dexter_nlb said:
why make a custom boot.img?
- Milestone 2.6.32 kernel + ramdisk is the only parts in the boot.img
- a Custom boot.img with Milestone kernel + ramdisk xt720 is a NO-GO!!!
2.2 froyo require correct services loaded,and thats not gonna happen with a xt720 ramdisk.
- if you think a XT720 kernel + froyo ramdisk, im sure its not gonna free up any memory like that.
So purpose of splitting boot.img and remerging is less to 0 or lower than 0.
Click to expand...
Click to collapse
Dexter can't we just boot milestone boot.img? If it can boot milestone kernel then maybe it can boot kernel + ramdisk. If not then we must find a way to configure xt720 build configuration.

Here's any idea: Grab any boot.img (the most inappropriate one, like one from some HTC phone), grab the fastboot tool, reboot into fastboot (not the one where you can flash RSDlite!), then:
Code:
fastboot boot boot.img
...if it crashes, then we know it at least tried to boot the file. [EDIT]This means you lucky people can boot custom kernels![/EDIT] Since we aren't doing the flash command (fastboot flash boot boot.img)....
It should be 20000% safe.
[EDIT]I just tried it on my Milestone - I took a boot.img from a Droid rom (bugless beast, to be exact) and unfortunately it didn't transfer at all. Seems like they locked this one down? According to Dexter, they sure did! It would be nice if someone can confirm my findings.

It seems that no one interested to try....

Can anyone try to boot Milestone boot.img?

If you wanna flash tune image, your phone have to stock firmware
If you not than you'll should brick the phone..
In my case also brick my phone
so I had flashed sbf image
In addition fastboot isn't recommanded, fastboot is force flashing not available

Interested to try but it seems that it can brick the phone... So i wait for you to find a way resar..... loool
And sorry but i don t know a thing about boot img so you ll have to explain more what to do....

B_e_n said:
Interested to try but it seems that it can brick the phone... So i wait for you to find a way resar..... loool
And sorry but i don t know a thing about boot img so you ll have to explain more what to do....
Click to expand...
Click to collapse
As Lollipop_Lawlipop said you can just boot custom boot.img(kernel + ramdisk). It won't brick your phone. If it won't boot you can just restart your phone and and it will boot fine. There is no risk in booting boot.img. If you flash boot image it can of course brick your phone, but we don't need to flash.

totoro1233 said:
If you wanna flash tune image, your phone have to stock firmware
If you not than you'll should brick the phone..
In my case also brick my phone
so I had flashed sbf image
In addition fastboot isn't recommanded, fastboot is force flashing not available
Click to expand...
Click to collapse
You can flash only signed images to your phone but fastboot can boot custom image. If the milestone image won't work, we'll have to build custom kernel for xt720, and I'm 90% sure that it'll work.

Related

[Q] Trying to flash images (zImage) onto Nexus 7

Hi everyone,
I pulled down images made from AOSP for the Nexus 7 device successfully. I am trying to flash the zImage onto the Nexus 7 device via fastboot. But in the terminal I get a "Invalid partition" error after doing "fastboot flash zimage zImage". I can flash the boot.img, userdata.img, and system.img just fine. But I get an error for zImage.
I also tried a different method. I did a "make otapackage" and flashed the zip through CWM to I get a "no file_context warning". Afterwards when rebooting, the device shows the google logo but is a blank black screen after a few seconds.
That is when I fastboot flash all the stock images back on and try again... but no success.
Has anyone encountered something similar? Or has some idea of what I steps I can take to remedy this?
Thanks!
mdrdroid said:
Hi everyone,
I pulled down images made from AOSP for the Nexus 7 device successfully. I am trying to flash the zImage onto the Nexus 7 device via fastboot. But in the terminal I get a "Invalid partition" error after doing "fastboot flash zimage zImage". I can flash the boot.img, userdata.img, and system.img just fine. But I get an error for zImage.
I also tried a different method. I did a "make otapackage" and flashed the zip through CWM to I get a "no file_context warning". Afterwards when rebooting, the device shows the google logo but is a blank black screen after a few seconds.
That is when I fastboot flash all the stock images back on and try again... but no success.
Has anyone encountered something similar? Or has some idea of what I steps I can take to remedy this?
Thanks!
Click to expand...
Click to collapse
Not sure if your question was answered in another post as I found this thread searching on google for my own issue.
You can't fastboot flash zImage at all. You may be able to fastboot boot zImage but trying to flash the zimage is an incomplete image. You'd have to add the zimage to a boot.img to flash it with fastboot. Then you'd fastboot flash boot boot.img.
You should be able to fastboot boot zImage to boot the kernel from your pc with the existing boot.img. Hope this helps. I may not even see a response to this thread but I check Nexus 7 Q&A so I hope I hear it helps.
tiny4579 said:
Not sure if your question was answered in another post as I found this thread searching on google for my own issue.
You can't fastboot flash zImage at all. You may be able to fastboot boot zImage but trying to flash the zimage is an incomplete image. You'd have to add the zimage to a boot.img to flash it with fastboot. Then you'd fastboot flash boot boot.img.
You should be able to fastboot boot zImage to boot the kernel from your pc with the existing boot.img. Hope this helps. I may not even see a response to this thread but I check Nexus 7 Q&A so I hope I hear it helps.
Click to expand...
Click to collapse
Thank you for the reply!!! I really appreciate it as I didn't really know what to do about this issue. I don't know how to add the zimage to the boot.img, but I will look into it... do you have any more advice on this?
Before, when after building, I did flash boot.img, zImage (which failed), system.img, and userdata... and I did get it to boot, and everything seems to be working okay in general but I have an inkling that the zImage generated will be needed for what I aim to accomplish.
Anyhow, thanks again for the information I'm new to android development and am glad for any help!
Google decompiling a boot.Img
You can't flash a zimage (ramdisk) because it is not a partition
The boot partition or boot.Img contains both the kernel and the ramdisk
So what you need to do is decompile the boot.Img of your rom
Then put your new ramdisk into the decompiled one
Then recompile the boot and flash that
Sent from my Nexus 7

ZE550ML boot.img unpacking

I have compiled a kernel for the Ze550ml using ASUS released kernel sources and I got a kernel file. Usually when unpacking boot.img file, I usually see just two files.... the kernel and the ramdisk. With this original boot.img I found a third one which is "second bootloader" file. I included it in remaking the boot.img with my compiled kernel (but won't release it due to possible brick). Any ideas?
If anyone is very close to a ASUS repair shop and have no issues repairing or replacing their ze550ml... LMK if you want to try the boot.img to boot (not flash) and see how it goes.
Just got a hold of support and says that our bootloaders are LOCKED... so a modified boot.img will brick the device hopefully they release an unlock tool soon so we can start developing.
There are "Bootstub" strings in the 2nd bootloader. And from this link, the bootstub is "fixed content" in ZF5/6. Although ZF2's boot.img format is different from 5/6, the function of bootstub should be the same, so I think we can re-use the 2nd bl from official boot image to repack our homemade kernels. (That's only what I think, and thus no guarantee on this)
clemsyn said:
Just got a hold of support and says that our bootloaders are LOCKED... so a modified boot.img will brick the device hopefully they release an unlock tool soon so we can start developing.
Click to expand...
Click to collapse
Yep. Even just a simple ro.secure=0 ro.debuggable=1 in the ramdisk and reassembled to boot.img was diceless..
I should try bullying Asus into providing optional unlocked bootloaders. Unlocked everything dammit.. Last I checked, its my phone.
Hi clemsyn!
Blades said:
Yep. Even just a simple ro.secure=0 ro.debuggable=1 in the ramdisk and reassembled to boot.img was diceless..
I should try bullying Asus into providing optional unlocked bootloaders. Unlocked everything dammit.. Last I checked, its my phone.
Hi clemsyn!
Click to expand...
Click to collapse
BLADES!!!!!! Been awhile =)
http://forum.xda-developers.com/zenfone2/orig-development/tool-zenfone-2-boot-repack-t3146088
When you do get unlocked, recompile the boot.img with the second file added into it.
Just build it with the mkbootimg with
Code:
--kernel zImage --ramdisk initramfs.cpio.gz --second second.gz
And then whatever else you have after it, and of course the boot.img name you want.
That's what I had to do to make the insecure boot.img on the 551.

Flashing kernel boot.img

Hi all,
I have OEM Unlock option checked and already flashed TWRP recovery.
After building a kernel image file called boot.img, I want to flash it, but dont know how
With other devices it is simply fastboot flash boot boot.img, but it seems there is no way to enter fastboot mode with this one
How can I flash the boot.img file? Preferably with Ubuntu, as I am building kernels with it
No one? Really?

repack boot.img

Hello.
I would like to use custom kernels with enabled modprobe supporting. But I am afraid to flash third party modules with magisk because of potential data lost or boot loops or something like that.
So I want to loading kernel without flashing with fastboot like a:
Code:
fastboot boot boot.img
However, I don't know why, all custom kernels ditribute with 'zImage' file. Therefore I need to repack boot.img manualy:
Code:
abootimg -x boot.img
(abootimg deb package)
or
Code:
unpack boot.img
(whiteboard[at]ping[at]se/Android/Unmkbootimg)
or
Code:
mkboot boot.img out/
(github[at]com/xiaolu/mkbootimg_tools)
In all cases I have the same result (files have identical md5sum).
But when I try to build boot.img I've obtain not bootable image.
Also I noticed that after rebuilds boot.img lose 100MB:
original boot.img - 128M
new_boot.img - 17M
Also notice, I didn't make anything changes!
Please tell me, what I do wrong?
Thank you.

8T on OOS A12 - C.16 Recovery with ADB Enabled

Tested on my own KB2003, work flawlessly. Useful for many cases.
I followed the GUIDE of @s3axel here : https://forum.xda-developers.com/t/...n-os-stock-recovery-with-adb-enabled.4084487/
All credits to him.
Basically, this modded Recovery just saved my a** )))) Just unzip using 7z then flash it to Recovery as normal.
LinhBT said:
Tested on my own KB2003, work flawlessly. Useful for many cases.
I followed the GUIDE of @s3axel here : https://forum.xda-developers.com/t/...n-os-stock-recovery-with-adb-enabled.4084487/
All credits to him.
Basically, this modded Recovery just saved my a** )))) Just unzip using 7z then flash it to Recovery as normal.
Click to expand...
Click to collapse
Can you share your file?
Rootk1t said:
Can you share your file?
Click to expand...
Click to collapse
Sure man, find attachment
Hi, I am facing a strange issue on OOS12 not able to factory reset or enter stock recovery it says boot/recovery.img damaged flash the correct one or contact support can any one help me out with this issue.
houstontaxi said:
Hi, I am facing a strange issue on OOS12 not able to factory reset or enter stock recovery it says boot/recovery.img damaged flash the correct one or contact support can any one help me out with this issue.
Click to expand...
Click to collapse
unpack your firmware, extract stock recovery.img and flash it.
But for flashing do I need to unlock bootloader or it can be done without unlocking?
houstontaxi said:
But for flashing do I need to unlock bootloader or it can be done without unlocking?
Click to expand...
Click to collapse
As far as i remember to flash partitions with stock firmware you don't need unlocked bootloader.
Rootk1t said:
As far as i remember to flash partitions with stock firmware you don't need unlocked bootloader.
Click to expand...
Click to collapse
If it needs to flash recovery the same way as we do for custom roms like fastboot flash recovery in platform tools then i tried that doesn't work to make it work bootloader needs to be unlocked I did that(unlocked the boot loader) then flashed stock recovery and it worked but after locking the boot loader with fastboot oem lock same issue happened again couldn't boot into recovery.
houstontaxi said:
But for flashing do I need to unlock bootloader or it can be done without unlocking?
Click to expand...
Click to collapse
To flash ANY partitions, u must unlock bootloader even if the partition is critical or not. And to prevent the boot/recovery image damaged error, u must flash stock boot/recovery images along with vbmeta.img ( also extracted from stock, same build ).
LinhBT said:
To flash ANY partitions, u must unlock bootloader even if the partition is critical or not. And to prevent the boot/recovery image damaged error, u must flash stock boot/recovery images along with vbmeta.img ( also extracted from stock, same build ).
Click to expand...
Click to collapse
I'm gonna try this also need to know if I have to flash boot.img and recovery.img as there are two files when extracted from the stock rom
houstontaxi said:
I'm gonna try this also need to know if I have to flash boot.img and recovery.img as there are two files when extracted from the stock rom
Click to expand...
Click to collapse
Both, boot.img and recovery.img , also in some case, u must flash dtbo.img too. I dont know the exact situation of you so my advise is to flash both boot.img recovery.img dtbo.img and vbmeta.img
LinhBT said:
Both, boot.img and recovery.img , also in some case, u must flash dtbo.img too. I dont know the exact situation of you so my advise is to flash both boot.img recovery.img dtbo.img and vbmeta.img
Click to expand...
Click to collapse
I'm gonna try that thanks for the help and I hope it resolves my issue with OOS A12 recovery as I don't face this kind of issue on OOS11
1
LinhBT said:
Both, boot.img and recovery.img , also in some case, u must flash dtbo.img too. I dont know the exact situation of you so my advise is to flash both boot.img recovery.img dtbo.img and vbmeta.img
Click to expand...
Click to collapse
Hello, tell me that your recovery cannot decrypt the date section? I need to extract data from the phone, the phone won't boot into the system, I tried to boot into your recovery but I can't access the folders.
lenox30 said:
Hello, tell me that your recovery cannot decrypt the date section? I need to extract data from the phone, the phone won't boot into the system, I tried to boot into your recovery but I can't access the folders.
Click to expand...
Click to collapse
This is simply Stock Recovery with ADB enabled bro. It only can help u in some tasks which need to access adb via Recovery, it won't help to decrypt ur device and/or have any functions as other custom recovery

Categories

Resources