Question Propietary blobs/files for Odin

Search This thread

radoinc

Member
Jun 5, 2015
20
7
My question is, do the makefiles from the devicetree need to be adjusted or completely rebuild to android 11 parameters? I.e. rhe command "add_lunch_combo" is obsolete and "COMMAND_LUNCH_CHOICES" took its place..

Sorry in advance for this nooby questions...
Maybe, but I still think the Omni source is a dead end. Notice that the About on the github page says:

Minimal manifest for building TWRP for devices shipped with Android 5.1 through Android 10
 
  • Like
Reactions: SanHelios
Don't we need this https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp as that one is stated to support android 11

Already tried it with the AOSP-repository... here's what the system gave me back


maybe i need to use the odin-kernel, since the prebuilt-kernels are not recommended
 

radoinc

Member
Jun 5, 2015
20
7
Already tried it with the AOSP-repository... here's what the system gave me back


maybe i need to use the odin-kernel, since the prebuilt-kernels are not recommended
I was able to get
#### build completed successfully (29 seconds) ####
with the AOSP repo and some modifications in the device tree files. However I can't find boot.img (or I don't know where to look at).

Here's what I did:

Code:
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11

repo sync

python3 -m twrpdtgen -o ~/twrp11/device ~/boot.img

The problem here is that, as you correctly guessed, twrpdtgen is meant to work with omni 10 manifest and the device trees it creates have values that are per-configured for Omni. So I made the following edits:

AndroidProducts.mk
change from:
$(LOCAL_DIR)/omni_odin.mk
to:
$(LOCAL_DIR)/twrp_odin.mk

Add at the end:
COMMON_LUNCH_CHOICES := \ twrp_odin-userdebug \ twrp_odin-eng

omni_odin.mk
Rename the file to twrp_odin.mk

change from:
$(call inherit-product, vendor/omni/config/gsm.mk)
to:
#$(call inherit-product, vendor/omni/config/gsm.mk)

change from:
$(call inherit-product, vendor/omni/config/common.mk)
to:
$(call inherit-product, vendor/twrp/config/common.mk)

change from:
PRODUCT_NAME := omni_odin
to:
PRODUCT_NAME := twrp_odin

vendorsetup.sh
change from:
add_lunch_combo omni_odin-userdebug add_lunch_combo omni_odin-eng
to:
#add_lunch_combo omni_odin-userdebug #add_lunch_combo omni_odin-eng


device.mk
delete this part:
PRODUCT_STATIC_BOOT_CONTROL_HAL := \ bootctrl.lahaina \ libgptutils \ libz \ libcutils



Then I continued following the instructions:

Code:
export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
lunch twrp_odin-eng
mka bootimage

At the end I get a message saying that the build has completed successfully and a bunch of files in /out, but I'm not sure what to do next.
 
Last edited:
I was able to get
#### build completed successfully (29 seconds) ####
with the AOSP repo and some modifications in the device tree files. However I can't find boot.img (or I don't know where to look at).

Here's what I did:

Code:
repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11

repo sync

python3 -m twrpdtgen -o ~/twrp11/device ~/boot.img

The problem here is that, as you correctly guessed, twrpdtgen is meant to work with omni 10 manifest and the device trees it creates have values that are per-configured for Omni. So I made the following edits:

AndroidProducts.mk
change from:
$(LOCAL_DIR)/omni_odin.mk
to:
$(LOCAL_DIR)/twrp_odin.mk

Add at the end:
COMMON_LUNCH_CHOICES := \ twrp_odin-userdebug \ twrp_odin-eng

omni_odin.mk
Rename the file to twrp_odin.mk

change from:
$(call inherit-product, vendor/omni/config/gsm.mk)
to:
#$(call inherit-product, vendor/omni/config/gsm.mk)

change from:
$(call inherit-product, vendor/omni/config/common.mk)
to:
$(call inherit-product, vendor/twrp/config/common.mk)

change from:
PRODUCT_NAME := omni_odin
to:
PRODUCT_NAME := twrp_odin

vendorsetup.sh
change from:
add_lunch_combo omni_odin-userdebug add_lunch_combo omni_odin-eng
to:
#add_lunch_combo omni_odin-userdebug #add_lunch_combo omni_odin-eng


device.mk
delete this part:
PRODUCT_STATIC_BOOT_CONTROL_HAL := \ bootctrl.lahaina \ libgptutils \ libz \ libcutils



Then I continued following the instructions:

Code:
export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
lunch twrp_odin-eng
mka bootimage

At the end I get a message saying that the build has completed successfully and a bunch of files in /out, but I'm not sure what to do next.
i'm doing it right now... keep you posted.

Update 28/09/21

I was able to reproduce the same... i have an output-folder with tons of files, but no img-file. The file is supposed to be in
out/target/odin
but i couldn't find anything...
 
Last edited:
  • Like
Reactions: radoinc

jjjhitel

Senior Member
Feb 7, 2016
722
2,286
Incheon
There's a significant progress on twrp I'm working on.

수정됨_20210928_094123.png
 

radoinc

Member
Jun 5, 2015
20
7
Oh, this looks great... can you tell us, what you used as repositories and commands?

Seems like soong is running correctly, but when ninja is about to continue the build process, it stops.
Hi, I found another workaround that seem to give results: use the omni manifest and the original tree, but in BoardConfig.mk replace:
BOARD_BOOTIMG_HEADER_VERSION := 3
with
BOARD_BOOTIMG_HEADER_VERSION := 2

Compiling like this creates a boot.img file. I don't have the device yet, but even if I did I don't know if I would flash it. I have a feeling that changing this value may not be safe (also I'm a total noob in this so I wouldn't trust a recovery created by myself :) )
 
  • Like
Reactions: SanHelios
Hi, I found another workaround that seem to give results: use the omni manifest and the original tree, but in BoardConfig.mk replace:
BOARD_BOOTIMG_HEADER_VERSION := 3
with
BOARD_BOOTIMG_HEADER_VERSION := 2

Compiling like this creates a boot.img file. I don't have the device yet, but even if I did I don't know if I would flash it. I have a feeling that changing this value may not be safe (also I'm a total noob in this so I wouldn't trust a recovery created by myself :) )
As far as i learned is, that Bootloader Header Version 2 is native to Android 10/Omni anyways, so it should work

I think i'm going to try it... it wanted to setup my device anyways. And if anything goes wrong, the fastboot-weeklys always fixed any problem for me.. ;)

Btw, i found a video tutorial for building twrp from source. I'm not sure, if i can apply this week (maybe friday) to see how this turns out. I'll keep you posted.

 
Last edited:
  • Like
Reactions: radoinc

vamsi209

Senior Member
Nov 15, 2010
90
48
As far as i learned is, that Bootloader Header Version 2 is native to Android 10/Omni anyways, so it should work

I think i'm going to try it... it wanted to setup my device anyways. And if anything goes wrong, the fastboot-weeklys always fixed any problem for me.. ;)

Btw, i found a video tutorial for building twrp from source. I'm not sure, if i can apply this week (maybe friday) to see how this turns out. I'll keep you posted.

so mate, one suggestion is, dont flash the twrp image, go to fastboot, and use fastboot boot twrp.img, so even if the build isnt correct, it just tries to boot the image flash rather than replacing the boot partition
 
  • Like
Reactions: SanHelios

vamsi209

Senior Member
Nov 15, 2010
90
48
Hi, I found another workaround that seem to give results: use the omni manifest and the original tree, but in BoardConfig.mk replace:
BOARD_BOOTIMG_HEADER_VERSION := 3
with
BOARD_BOOTIMG_HEADER_VERSION := 2

Compiling like this creates a boot.img file. I don't have the device yet, but even if I did I don't know if I would flash it. I have a feeling that changing this value may not be safe (also I'm a total noob in this so I wouldn't trust a recovery created by myself :) )
did you make these changes along with the once u mentioned here? and then did it make the twrp image?
AndroidProducts.mk
change from:
$(LOCAL_DIR)/omni_odin.mk
to:
$(LOCAL_DIR)/twrp_odin.mk

Add at the end:
COMMON_LUNCH_CHOICES := \ twrp_odin-userdebug \ twrp_odin-eng

omni_odin.mk
Rename the file to twrp_odin.mk

change from:
$(call inherit-product, vendor/omni/config/gsm.mk)
to:
#$(call inherit-product, vendor/omni/config/gsm.mk)

change from:
$(call inherit-product, vendor/omni/config/common.mk)
to:
$(call inherit-product, vendor/twrp/config/common.mk)

change from:
PRODUCT_NAME := omni_odin
to:
PRODUCT_NAME := twrp_odin

vendorsetup.sh
change from:
add_lunch_combo omni_odin-userdebug add_lunch_combo omni_odin-eng
to:
#add_lunch_combo omni_odin-userdebug #add_lunch_combo omni_odin-eng


device.mk
delete this part:
PRODUCT_STATIC_BOOT_CONTROL_HAL := \ bootctrl.lahaina \ libgptutils \ libz \ libcutils



Then I continued following the instructions:

Code:
export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
lunch twrp_odin-eng
mka bootimage
At the end I get a message saying that the build has completed successfully and a bunch of files in /out, but I'm not sure what to do next.
 

radoinc

Member
Jun 5, 2015
20
7
did you make these changes along with the once u mentioned here? and then did it make the twrp image?
AndroidProducts.mk
change from:
$(LOCAL_DIR)/omni_odin.mk
to:
$(LOCAL_DIR)/twrp_odin.mk

Add at the end:
COMMON_LUNCH_CHOICES := \ twrp_odin-userdebug \ twrp_odin-eng

omni_odin.mk
Rename the file to twrp_odin.mk

change from:
$(call inherit-product, vendor/omni/config/gsm.mk)
to:
#$(call inherit-product, vendor/omni/config/gsm.mk)

change from:
$(call inherit-product, vendor/omni/config/common.mk)
to:
$(call inherit-product, vendor/twrp/config/common.mk)

change from:
PRODUCT_NAME := omni_odin
to:
PRODUCT_NAME := twrp_odin

vendorsetup.sh
change from:
add_lunch_combo omni_odin-userdebug add_lunch_combo omni_odin-eng
to:
#add_lunch_combo omni_odin-userdebug #add_lunch_combo omni_odin-eng


device.mk
delete this part:
PRODUCT_STATIC_BOOT_CONTROL_HAL := \ bootctrl.lahaina \ libgptutils \ libz \ libcutils



Then I continued following the instructions:

Code:
export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
lunch twrp_odin-eng
mka bootimage
At the end I get a message saying that the build has completed successfully and a bunch of files in /out, but I'm not sure what to do next.
No, when I compiled with the Omni 10 repo I changed only BOARD_BOOTIMG_HEADER_VERSION and a boot image was created.
 

jjjhitel

Senior Member
Feb 7, 2016
722
2,286
Incheon
Oh, this looks great... can you tell us, what you used as repositories and commands?

Seems like soong is running correctly, but when ninja is about to continue the build process, it stops.

My device tree is based on the official twrp tree for zenfone 8. And it will be open to the public if I release twrp someday.

Commands are already well documented in this thread.
 
  • Like
Reactions: Puksom and radoinc
so mate, one suggestion is, dont flash the twrp image, go to fastboot, and use fastboot boot twrp.img, so even if the build isnt correct, it just tries to boot the image flash rather than replacing the boot partition
Hey, i was able to create a boot.img file by using the twrp10 repository and the bootheader-workaround. I used fastboot to boot the image, but my phone just went black and i had to restart it. Sooooo, back to the drawing board for us.
 

vamsi209

Senior Member
Nov 15, 2010
90
48
Hey, i was able to create a boot.img file by using the twrp10 repository and the bootheader-workaround. I used fastboot to boot the image, but my phone just went black and i had to restart it. Sooooo, back to the drawing board for us.
try taking the log, connect your mix 4 to computer, use command
Code:
adb logcat > logcat.txt
and check the logcat.txt file for references of whats going wrong.
you can use official twrp pages for help
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    There's a significant progress on twrp I'm working on.

    수정됨_20210928_094123.png
    3
    Hey @vamsi209, is there any new information about the custom rom for the Mix 4?
    I just bought a Mix 4 and it is an amazing phone, but sadly MIUI breaks the whole experience of using it
    3
    Already tried it with the AOSP-repository... here's what the system gave me back


    maybe i need to use the odin-kernel, since the prebuilt-kernels are not recommended
    I was able to get
    #### build completed successfully (29 seconds) ####
    with the AOSP repo and some modifications in the device tree files. However I can't find boot.img (or I don't know where to look at).

    Here's what I did:

    Code:
    repo init --depth=1 -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-11
    
    repo sync
    
    python3 -m twrpdtgen -o ~/twrp11/device ~/boot.img

    The problem here is that, as you correctly guessed, twrpdtgen is meant to work with omni 10 manifest and the device trees it creates have values that are per-configured for Omni. So I made the following edits:

    AndroidProducts.mk
    change from:
    $(LOCAL_DIR)/omni_odin.mk
    to:
    $(LOCAL_DIR)/twrp_odin.mk

    Add at the end:
    COMMON_LUNCH_CHOICES := \ twrp_odin-userdebug \ twrp_odin-eng

    omni_odin.mk
    Rename the file to twrp_odin.mk

    change from:
    $(call inherit-product, vendor/omni/config/gsm.mk)
    to:
    #$(call inherit-product, vendor/omni/config/gsm.mk)

    change from:
    $(call inherit-product, vendor/omni/config/common.mk)
    to:
    $(call inherit-product, vendor/twrp/config/common.mk)

    change from:
    PRODUCT_NAME := omni_odin
    to:
    PRODUCT_NAME := twrp_odin

    vendorsetup.sh
    change from:
    add_lunch_combo omni_odin-userdebug add_lunch_combo omni_odin-eng
    to:
    #add_lunch_combo omni_odin-userdebug #add_lunch_combo omni_odin-eng


    device.mk
    delete this part:
    PRODUCT_STATIC_BOOT_CONTROL_HAL := \ bootctrl.lahaina \ libgptutils \ libz \ libcutils



    Then I continued following the instructions:

    Code:
    export ALLOW_MISSING_DEPENDENCIES=true
    . build/envsetup.sh
    lunch twrp_odin-eng
    mka bootimage

    At the end I get a message saying that the build has completed successfully and a bunch of files in /out, but I'm not sure what to do next.
    2
    Oh, this looks great... can you tell us, what you used as repositories and commands?

    Seems like soong is running correctly, but when ninja is about to continue the build process, it stops.

    My device tree is based on the official twrp tree for zenfone 8. And it will be open to the public if I release twrp someday.

    Commands are already well documented in this thread.