[ROM][OFFICIAL][I002D] HavocOS by ComicoX

Search This thread

IronSingh

Senior Member
Nov 2, 2010
400
82
Kuwait
Xiaomi Mi 11
Hello
I would like to explain preparation method of vendor repository, I don't provide it. But I create it by below steps.
1. Get stock rom
2. Extract file of payload.bin from zip file
3. Extract img files from payload.bin
4. Prepare extract script
5. Expand proprietary files from img files
6. Create vendor directory in source tree
7. misc

The specific method is to refer to below explanations.

1. Get stock rom
Download UL-I002D-ASUS-31.0210.0210.287-1.1.1-2207-user.zip
Stock rom for zenfone7

2. Extract file of payload.bin from zip file
Extract by below command
Code:
$ unzip UL-I002D-ASUS-31.0210.0210.287-1.1.1-2207-user.zip payload.bin

3. Extract img files from payload.bin
First visit to payload-dumper-go
Code:
$ payload-dumper-go payload.bin

4. Prepare extract script
Add below code to your ~/.bashrc

Code:
function MyExtratImageStock () {
    str=${1}
    echo "Preprocessing"
    if [ -d ./"$str" ]; then
        sudo rm -rfv "$str"
    fi
    if [ -e ./"$str"_tmp ]; then
        sudo umount "$str"_tmp
        sudo rm -rfv "$str"_tmp
    fi
    echo "Main processing"
    mkdir "$str" "$str"_tmp
    sudo mount -o ro,noload "$str".img "$str"_tmp
    sudo chown -R $USER:$USER "$str"_tmp
    sudo cp -r "$str"_tmp/* "$str"
    sudo chown -R $USER:$USER "$str"
    echo "post-processing"
    sudo umount "$str"_tmp
    sudo rm -rfv "$str"_tmp
    if [ -e ./"$str"/lost+found ]; then
        sudo rm -rfv ./"$str"/lost+found
    fi
}
alias MyExtratImgS=MyExtratImageStock

5. Prepare extract script
Code:
$ mkdir 01_ExtractedFiles && cd $_
$ cp ../extracted*/product.img .
$ cp ../extracted*/system.img .
$ cp ../extracted*/system_ext.img .
$ cp ../extracted*/odm.img .
$ cp ../extracted*/vendor.img .
$ MyExtratImgS product
$ MyExtratImgS system
$ MyExtratImgS system_ext
Regarding vendor.img and odm.img, unnecessary to extract. Use them as is.

6. Create vendor directory in source tree

Code:
# Create a directory for the source files
# This can be located anywhere (as long as the fs is case-sensitive)
$ mkdir RomName
$ cd RomName
$ source build/envsetup.sh

# Move to device directory
$ cd device/asus/zenfone7

# Confirm if there are source files to create vendor directory
$ ls proprietary-files*.txt
proprietary-files-product.txt  proprietary-files.txt

# Run script to create vendor directory
$ ./extract-files.sh -p <path to 01_ExtractedFiles>/01_ExtractedFiles 2>&1 | tee ExtractResult.txt

# Copy vendor.img and odm.img
$ croot
$ cd vendor/asus/zenfone7
$ mkdir images && cd $_
$ cp <path to 01_ExtractedFiles>/01_ExtractedFiles/vendor.img .
$ cp <path to 01_ExtractedFiles>/01_ExtractedFiles/odm.img .

7. misc

Regarding library of libantradio.so, if this labrary is lacking in vendor directory, device installed the build rom can't boot correctly and boot loop occur.
Unfortunately, there are not them in general stock rom.
These libraries are only in the firmware named below. This firmware is one most first issued at 2020/9/2.
UL-I002D-WW-29.12.18.12-user.zip

This is relating to below code in proprietary-files.txt
Code:
-lib/libantradio.so
-lib64/libantradio.so


If you like this post please press like
 
Last edited:
  • Like
Reactions: IronSingh

IronSingh

Senior Member
Nov 2, 2010
400
82
Kuwait
Xiaomi Mi 11
OK I have been on it since morning. I am stuck on

Code:
vendor/lineage/config/crdroid.mk:55: error: _nic.PRODUCTS.[[device/asus/zenfone7/roms_mk/omni_zenfone7.mk]]: "vendor/lineage/config/gsm.mk" does not exist.
14:15:12 dumpvars failed with: exit status 1

As you can guess building crDroid
Was able to get further


cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basena
me "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --t
op "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d"
-t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-g
lobs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.
available --used_env out/soong/soong.environment.used Android.bp
error: vendor/lineage/build/soong/Android.bp:24:8: module "generated_kernel_incl
udes": cmd: unknown variable '$(PATH_OVERRIDE_SOONG)'
15:07:27 soong bootstrap failed with: exit status 1
 
OK I have been on it since morning. I am stuck on

Code:
vendor/lineage/config/crdroid.mk:55: error: _nic.PRODUCTS.[[device/asus/zenfone7/roms_mk/omni_zenfone7.mk]]: "vendor/lineage/config/gsm.mk" does not exist.
14:15:12 dumpvars failed with: exit status 1

As you can guess building crDroid
In my build, error in vendor/lineage/config/crdroid.mk does not occur.
Because I does not update in vendor/lineage/config/crdroid.mk.

If you have made any changes, please show those too in the question.
Only current error message is not enough to guess the detail of error.

Or, It might be better to have the your changes cancel.
 

IronSingh

Senior Member
Nov 2, 2010
400
82
Kuwait
Xiaomi Mi 11
In my build, error in vendor/lineage/config/crdroid.mk does not occur.
Because I does not update in vendor/lineage/config/crdroid.mk.

If you have made any changes, please show those too in the question.
Only current error message is not enough to guess the detail of error.

Or, It might be better to have the your changes cancel.
It is looking for vendor/lineage/config/gsm.mk

This is not part of crDroid. I changed the line to point to telephony.mk but now it throws the other error
 

IronSingh

Senior Member
Nov 2, 2010
400
82
Kuwait
Xiaomi Mi 11
  • Like
Reactions: IronSingh

IronSingh

Senior Member
Nov 2, 2010
400
82
Kuwait
Xiaomi Mi 11
As I explained,
Code:
# Run script to create vendor directory
$ ./extract-files.sh -p <path to 01_ExtractedFiles>/01_ExtractedFiles 2>&1 | tee ExtractResult.txt
I figured out my mistake I have to do brunch lineage_zenfone7-user I was doing omni


but now I am getting
Code:
[ 96% 1220/1260] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:57: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been
deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
system/sepolicy/Android.mk:62: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been
 deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
[ 99% 1259/1260] finishing build rules ...
FAILED:
hardware/qcom-caf/sm8250/display/composer/../common.mk: error: "vendor.qti.hardw
are.display.composer-service (EXECUTABLES android-arm64) missing libthermalclien
t (SHARED_LIBRARIES android-arm64)"
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is inten
tional, but that may defer real problems until later in the build.
hardware/qcom-caf/sm8250/media/mm-video-v4l2/vidc/venc/Android.mk: error: "libOm
xVenc (SHARED_LIBRARIES android-arm64) missing libfastcvopt (SHARED_LIBRARIES an
droid-arm64)"
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is inten
tional, but that may defer real problems until later in the build.
hardware/qcom-caf/sm8250/media/mm-video-v4l2/vidc/venc/Android.mk: error: "libOm
xVenc (SHARED_LIBRARIES android-arm) missing libfastcvopt (SHARED_LIBRARIES andr
oid-arm)"
You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if this is inten
tional, but that may defer real problems until later in the build.
build/make/core/main.mk:1120: error: exiting from previous errors.
20:18:07 ckati failed with: exit status 1
 
Hello
I would like to explain preparation method of vendor repository, I don't provide it. But I create it by below steps.
1. Get stock rom
2. Extract file of payload.bin from zip file
3. Extract img files from payload.bin
4. Prepare extract script
5. Expand proprietary files from img files
6. Create vendor directory in source tree
7. misc

The specific method is to refer to below explanations.

1. Get stock rom
Download UL-I002D-ASUS-31.0210.0210.287-1.1.1-2207-user.zip
Stock rom for zenfone7

2. Extract file of payload.bin from zip file
Extract by below command
Code:
$ unzip UL-I002D-ASUS-31.0210.0210.287-1.1.1-2207-user.zip payload.bin

3. Extract img files from payload.bin
First visit to payload-dumper-go
Code:
$ payload-dumper-go payload.bin

4. Prepare extract script
Add below code to your ~/.bashrc

Code:
function MyExtratImageStock () {
    str=${1}
    echo "Preprocessing"
    if [ -d ./"$str" ]; then
        sudo rm -rfv "$str"
    fi
    if [ -e ./"$str"_tmp ]; then
        sudo umount "$str"_tmp
        sudo rm -rfv "$str"_tmp
    fi
    echo "Main processing"
    mkdir "$str" "$str"_tmp
    sudo mount -o ro,noload "$str".img "$str"_tmp
    sudo chown -R $USER:$USER "$str"_tmp
    sudo cp -r "$str"_tmp/* "$str"
    sudo chown -R $USER:$USER "$str"
    echo "post-processing"
    sudo umount "$str"_tmp
    sudo rm -rfv "$str"_tmp
    if [ -e ./"$str"/lost+found ]; then
        sudo rm -rfv ./"$str"/lost+found
    fi
}
alias MyExtratImgS=MyExtratImageStock

5. Prepare extract script
Code:
$ mkdir 01_ExtractedFiles && cd $_
$ cp ../extracted*/product.img .
$ cp ../extracted*/system.img .
$ cp ../extracted*/system_ext.img .
$ cp ../extracted*/odm.img .
$ cp ../extracted*/vendor.img .
$ MyExtratImgS product
$ MyExtratImgS system
$ MyExtratImgS system_ext
Regarding vendor.img and odm.img, unnecessary to extract. Use them as is.

6. Create vendor directory in source tree

Code:
# Create a directory for the source files
# This can be located anywhere (as long as the fs is case-sensitive)
$ mkdir RomName
$ cd RomName
$ source build/envsetup.sh

# Move to device directory
$ cd device/asus/zenfone7

# Confirm if there are source files to create vendor directory
$ ls proprietary-files*.txt
proprietary-files-product.txt  proprietary-files.txt

# Run script to create vendor directory
$ ./extract-files.sh -p <path to 01_ExtractedFiles>/01_ExtractedFiles 2>&1 | tee ExtractResult.txt

# Copy vendor.img and odm.img
$ croot
$ cd vendor/asus/zenfone7
$ mkdir images && cd $_
$ cp <path to 01_ExtractedFiles>/01_ExtractedFiles/vendor.img .
$ cp <path to 01_ExtractedFiles>/01_ExtractedFiles/odm.img .

7. misc

Regarding library of libantradio.so, if this labrary is lacking in vendor directory, device installed the build rom can't boot correctly and boot loop occur.
Unfortunately, there are not them in general stock rom.
These libraries are only in the firmware named below. This firmware is one most first issued at 2020/9/2.
UL-I002D-WW-29.12.18.12-user.zip

This is relating to below code in proprietary-files.txt
Code:
-lib/libantradio.so
-lib64/libantradio.so


If you like this post please press like
Before conducting above, read README
 
So far the Arrow build has been my favorite rom, thanks for building it. Bluetooth connects ok but no audio comes through. That's the only thing I can find that's buggy. Thanks!
I'm struggling to improve bluetooth function. I have "Sony wireless headphones WH-1000XM4". By improving my souce, my build rom can recognise codec of "AAC" and "SBC".
But sound is not stil worked due to there is error on log.
I don't know if I can solve but I will continue to search solution.
 

Top Liked Posts