Integrate USB modeswitch with odroid aosp

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Integrate USB modeswitch with odroid aosp

Post by taimed »

Hello guys,
I want to add the usb modeswitch configuration with my aosp build(before building) for 4G huawei usb modules
I've found a way to add it , but after installing the os.
How can I add it to the build ?
regards

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Maybe you can ask @voodik. He has integrated it into his LineageOS. It would be a good idea if Hardkernel does integrate it also into the aosp so no one would need to do it of it's own.
If not, you would need to make a folder for the usb_modeswitch source, e.g. in vendor/hardkernel/external and create a Android.bp file as makefile. Then you need to add it in e.g. device.mk with PRODUCT_PACKAGES +=.
In vendor/hardkernel/external you can find an Android.bp from wiringPi as an example.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Sat Feb 20, 2021 6:46 pm
Maybe you can ask @voodik. He has integrated it into his LineageOS. It would be a good idea if Hardkernel does integrate it also into the aosp so no one would need to do it of it's own.
If not, you would need to make a folder for the usb_modeswitch source, e.g. in vendor/hardkernel/external and create a Android.bp file as makefile. Then you need to add it in e.g. device.mk with PRODUCT_PACKAGES +=.
In vendor/hardkernel/external you can find an Android.bp from wiringPi as an example.
Thank you , I'll follow your way, while waiting for @voodik to help us

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

what about the usb_modeswitch.conf.template in the build ?
found in device/hardkernel/odroidn2/files

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

It seems that Hardkernel has already made it. Look if external/usb_modeswitch exists, then you only need to learn how to use it:
viewtopic.php?p=292349#p292349
BTW. I don't have the actual sources and I am too lazy to sync, only for looking at this. ;)

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

any help guys ? @voodik

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

@voodiks project can be found here: https://github.com/voodik/android_vendo ... modeswitch
You can add it to .repo/manifests/odroid.xml as this:

Code: Select all

  <remote  name="voodik"
           fetch="https://github.com/voodik/" />

  <project path="vendor/hardkernel/external/usb-modeswitch" name="android_vendor_hardkernel_external_usb-modeswitch" remote="voodik" revision="refs/heads/master" />
Then do a repo sync, maybe with --force-sync.
These users thanked the author joerg for the post:
taimed (Mon Feb 22, 2021 4:57 pm)

Luke.go
Posts: 596
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 74 times
Been thanked: 82 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by Luke.go »

Please edit the device/hardkernel/<board name>/files/usb_modeswitch.conf.template. :)
These users thanked the author Luke.go for the post:
taimed (Mon Feb 22, 2021 4:57 pm)

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

Luke.go wrote:
Mon Feb 22, 2021 8:21 am
Please edit the device/hardkernel/<board name>/files/usb_modeswitch.conf.template. :)
how do I edit it ?

Luke.go
Posts: 596
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 74 times
Been thanked: 82 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by Luke.go »

Please change both DefaultVendor & DefaultProduct id to fit your 4g huewei usb module's.
These users thanked the author Luke.go for the post:
taimed (Mon Feb 22, 2021 5:28 pm)

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

build/make/core/base_rules.mk:260: error: external/usb_modeswitch/jni: MODULE.TARGET.EXECUTABLES.usb_modeswitch already defined by vendor/hardkernel/external/usb-modeswitch.
09:48:03 ckati failed with: exit status 1

what shall I do ?

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

This means you have two modules with same name. When you have integrated the one from @voodik, you need to delete the one you created in externel/usb_modeswitch.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

delete the whole folder ?

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Mon Feb 22, 2021 11:14 pm
This means you have two modules with same name. When you have integrated the one from @voodik, you need to delete the one you created in externel/usb_modeswitch.
delete the whole folder ?

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

vendor/amlogic/common/external/busybox/Android.mk:307: warning: ignoring old commands for target `out/target/product/odroidn2/recovery/root/sbin/sh'
ninja: error: 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
15:16:49 ninja failed with: exit status 1

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

so, any help ?

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

taimed wrote:
Mon Feb 22, 2021 11:15 pm
delete the whole folder ?
@taimed, if there is existing an external/usb_modeswitch, and you don't have created it by yourself, means that it was already there in Hardkernels source code. You need to decide by yourself if you stay with the Hardkernel solution or with the solution from @voodik. I only know the solution of @voodik, it's woking great. If you consider to go with @voodik, you need to delete the folder usb_modeswitch in external. After a repo sync it will come back, so you need to find where it is declared in .repo/manifests and remove it from there.
You need also to find if there is existing a PRODUCT_PACKAGES that references to it.

The other error you have, better you remove the whole out folder to compile from beginning.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 12:00 am
taimed wrote:
Mon Feb 22, 2021 11:15 pm
delete the whole folder ?
@taimed, if there is existing an external/usb_modeswitch, and you don't have created it by yourself, means that it was already there in Hardkernels source code. You need to decide by yourself if you stay with the Hardkernel solution or with the solution from @voodik. I only know the solution of @voodik, it's woking great. If you consider to go with @voodik, you need to delete the folder usb_modeswitch in external. After a repo sync it will come back, so you need to find where it is declared in .repo/manifests and remove it from there.
You need also to find if there is existing a PRODUCT_PACKAGES that references to it.

The other error you have, better you remove the whole out folder to compile from beginning.

I stll get the same error of the no known rule to make

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

what's next ?

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 12:00 am
taimed wrote:
Mon Feb 22, 2021 11:15 pm
delete the whole folder ?
@taimed, if there is existing an external/usb_modeswitch, and you don't have created it by yourself, means that it was already there in Hardkernels source code. You need to decide by yourself if you stay with the Hardkernel solution or with the solution from @voodik. I only know the solution of @voodik, it's woking great. If you consider to go with @voodik, you need to delete the folder usb_modeswitch in external. After a repo sync it will come back, so you need to find where it is declared in .repo/manifests and remove it from there.
You need also to find if there is existing a PRODUCT_PACKAGES that references to it.

The other error you have, better you remove the whole out folder to compile from beginning.

Code: Select all

[ 99% 1444/1445] glob vendor/hardkernel/interfaces/odroidthings/1.0/src
ninja: error: 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
16:16:30 ninja failed with: exit status 1

#### failed to build some targets (58 seconds) ####
after deleteing the folder

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Do you compile on a physical Linux system?
How much ram has your system?
Have you ever compiled the aosp before on this machine?
I normally download the sources and compile it without any changes. That makes sure the process is running. Then I apply my changes, so I can be sure the error I get is relating to my changes.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 12:29 am
Do you compile on a physical Linux system?
How much ram has your system?
Have you ever compiled the aosp before on this machine?
I normally download the sources and compile it without any changes. That makes sure the process is running. Then I apply my changes, so I can be sure the error I get is relating to my changes.
1- Yes Linux system
2- 20 GB RAM
3- Yes I built many times

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

1- Yes Linux system
2- 20 GB RAM
3- Yes I built many times
This are very good conditions. ;)

BTW. I have no idea why you have this error. Maybe you return to the initial state, means you go one or two steps backward and try to compile without the usb-modeswitch from @voodik, but with the original usb_modeswitch in external. I have no better idea.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 12:51 am
1- Yes Linux system
2- 20 GB RAM
3- Yes I built many times
This are very good conditions. ;)

BTW. I have no idea why you have this error. Maybe you return to the initial state, means you go one or two steps backward and try to compile without the usb-modeswitch from @voodik, but with the original usb_modeswitch in external. I have no better idea.
Ok, that's what I'm doing, i'm downloading the repo again and going step by step

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Downloading again takes a lot of time.
Maybe with this you can return to initial without to download:

Code: Select all

repo forall -c 'git reset --hard ; git clean -fdx'
rm -rf out

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 2:16 am
Downloading again takes a lot of time.
Maybe with this you can return to initial without to download:

Code: Select all

repo forall -c 'git reset --hard ; git clean -fdx'
rm -rf out
after returning to inital, I shall make changes on manifest and redownload @voodik's files and build ? and which folder exactly to be deleted ?

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 2:16 am
Downloading again takes a lot of time.
Maybe with this you can return to initial without to download:

Code: Select all

repo forall -c 'git reset --hard ; git clean -fdx'
rm -rf out
@joerg : still same error

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

@tobetter any suggestions ?
@voodik
@odroid

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

OK. I will reset my Pie sources and do a sync and compile it. To see if the same happens...

[edit]
- removed usb-modeswitch from voodiks github entry in odroid.xml
- removed vendor/external/hardkernel/usb-modeswitch
- repo sync --force-sync

[edit]
- repo forall -c 'git reset --hard ; git clean -fdx'
- rm -rf out

Now the sources should be new and actual.

- source build/envsetup.sh
- lunch odroidn2-eng
- make -j12

Waiting...

[edit]
Forgot:
- export ARCH=arm64
- export CROSS_COMPILE=aarch64-linux-gnu-
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-aarch64-none-elf-4.9-2014.09_linux/bin
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-arm-none-eabi-4.8-2014.04_linux/bin
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin

[edit]
Too much errors. :(
- Have to uninstall gcc-9-aarch64-linux-gnu-base. It dominates over the gcc6.31 toolchain.
- Need to figure out Python2 / Python3 alternatives. Installed python-is-python2
- make -j12

Error gone, waiting...

[edit]
The above errors, because i have updated two weeks ago to Linux Mint 20.1 Ulyssa
Still waiting: [ 7% 8572/109485]

[edit]
It failed at [ 27% 30235/109485], need to check...Sometimes it fails because of limit of ram, then start make again...

[edit]
It failed with external/libxml2. Compiled only module: mmm external/libxml2 ... success
- make -j12, waiting...

[edit]
Only ~2000 packages missing, but failed now:

Code: Select all

vendor/hardkernel/interfaces/odroidthings/1.0/default/OdroidThings.cpp:231:14: error: no member named 'uart_ops' in 'hardware::hardkernel::odroidthings::things_device'
[edit]
changed odroid.xml because of version conflict of odroidThings:

Code: Select all

<project path="vendor/hardkernel/interfaces" name="android_vendor_hardkernel_interfaces" remote="origin" revision="s922_9.0.0_master" />
- mmm vendor/hardkernel/interfaces works, but not the latest version of Things now.
@codewalker, please look at this.

next, the build is nearly ready, but:

Code: Select all

FAILED: out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/classes.dex
- commented out in art/build/Android.bp: //"-msse4.2", //"-mpopcnt",
Some thousand packages need to be compiled again ... but no solution, only some hundreds of packages missing ...
Last edited by joerg on Wed Feb 24, 2021 12:21 am, edited 9 times in total.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 7:19 pm
OK. I will reset my Pie sources and do a sync and compile it. To see if the same happens...
a new update : i've download an other build (same odroid n2 aosp, but not modified ) and built it , but I always get the error

Code: Select all

vendor/amlogic/common/external/busybox/Android.mk:307: warning: ignoring old commands for target `out/target/product/odroidn2/recovery/root/sbin/sh'
ninja: error: 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
11:21:55 ninja failed with: exit status 1

#### failed to build some targets (01:07 (mm:ss)) ####

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 7:19 pm
OK. I will reset my Pie sources and do a sync and compile it. To see if the same happens...

[edit]
- removed usb-modeswitch from voodiks github entry in odroid.xml
- removed vendor/external/hardkernel/usb-modeswitch
- repo sync --force-sync

[edit]
- repo forall -c 'git reset --hard ; git clean -fdx'
- rm -rf out

Now the sources should be new and actual.

- source build/envsetup.sh
- lunch odroidn2-eng
- make -j12

Waiting...

[edit]
Forgot:
- export ARCH=arm64
- export CROSS_COMPILE=aarch64-linux-gnu-
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-aarch64-none-elf-4.9-2014.09_linux/bin
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-arm-none-eabi-4.8-2014.04_linux/bin
- export PATH=$PATH:/home/joerg/Development/odroid_n2/toolchain/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin

[edit]
Too much errors. :(
- Have to uninstall gcc-9-aarch64-linux-gnu-base. It dominates over the gcc6.31 toolchain.
- Need to figure out Python2 / Python3 alternatives. Installed python-is-python2
- make -j12

Error gone, waiting...

[edit]
The above errors, because i have updated two weeks ago to Linux Mint 20.1 Ulyssa
Still waiting: [ 7% 8572/109485]

[edit]
It failed at [ 27% 30235/109485], need to check...Sometimes it fails because of limit of ram, then start make again...

[edit]
It failed with external/libxml2. Compiled only module: mmm external/libxml2 ... success
- make -j12, waiting...
so , what's next ?

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

My libamadec has already compiled...
Try to compile only and see what errors do occur: mmm hardware/amlogic/LibAudio/amadec
Note, not all modules can be compiled this way, please try.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 9:40 pm
My libamadec has already compiled...
Try to compile only and see what errors do occur: mmm hardware/amlogic/LibAudio/amadec
Note, not all modules can be compiled this way, please try.
still get the same error :

Code: Select all

build/make/core/base_rules.mk:426: warning: ignoring old commands for target `out/target/product/odroidn2/vendor/etc/init/android.hardware.gnss@1.0-service.rc'
ninja: error: 'out/target/product/odroidn2/obj/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
13:49:40 ninja failed with: exit status 1

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Is there not more log information?
Sorry, can't try it right now. The build I started is at ~50% and I don't want to interrupt...

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Tue Feb 23, 2021 9:56 pm
Is there not more log information?
Sorry, can't try it right now. The build I started is at ~50% and I don't want to interrupt...
a normal build :

Code: Select all

taieb@taieb-HP-ProDesk-400-G6-MT:~/android9od$ make -j10
hardware/hardkernel/wifi/config/bluetooth.mk:17: warning: BOARD_HAVE_BLUETOOTH is true
hardware/hardkernel/wifi/config/bluetooth.mk:18: warning: BLUETOOTH_MODULE is 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=odroidn2
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-65-generic-x86_64-Ubuntu-18.04.5-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PQ3A.190801.002
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
wildcard(out/target/product/odroidn2/clean_steps.mk) was changed, regenerating...
hardware/hardkernel/wifi/config/bluetooth.mk:17: warning: BOARD_HAVE_BLUETOOTH is true
hardware/hardkernel/wifi/config/bluetooth.mk:18: warning: BLUETOOTH_MODULE is 
wildcard(/home/taieb/android9od/out/target/product/odroidn2/vendor/lib/firmware/video) was changed, regenerating...
hardware/hardkernel/wifi/config/bluetooth.mk:17: warning: BOARD_HAVE_BLUETOOTH is true
hardware/hardkernel/wifi/config/bluetooth.mk:18: warning: BLUETOOTH_MODULE is 
[26/962] including development/build/Android.mk ...
development/build/build_android_stubs.mk:43: warning: android_stubs_current 
development/build/build_android_stubs.mk:43: warning: metalava_android_stubs_current metalava_android_stubs_current
development/build/build_android_stubs.mk:43: warning: android_system_stubs_current 
development/build/build_android_stubs.mk:43: warning: android_test_stubs_current 
development/build/build_android_stubs.mk:43: warning: metalava_android_system_stubs_current metalava_android_system_stubs_current
development/build/build_android_stubs.mk:43: warning: metalava_android_test_stubs_current metalava_android_test_stubs_current
[316/962] including hardware/amlogic/audio/Android.mk ...
"---------ott audio mode, compiler configure 2 channels output by default--------"
[319/962] including hardware/amlogic/camera/Android.mk ...
/bin/bash: ifconfig: command not found
************************************************************
pdk or not:    
target board:  odroidn2
git version:   "c5329526e6b74e4bddb995e08c5ae09bf16efb0e"
uncomment:     0 files
last changed:  "Date:   Thu Feb 4 15:20:07 2021 +0900"
build time:    " Tue Feb 23 13:54:11 CET 2021"
builder name:  " taieb"
branch name:   "* (no branch)"
build mode:    eng
host name:     "taieb-HP-ProDesk-400-G6-MT"
/bin/bash: ifconfig: command not found
host IP:       ""
path:          "/home/taieb/android9od/hardware/amlogic/camera/v3/fake-pipeline2/tests"
************************************************************
[321/962] including hardware/amlogic/gralloc/Android.mk ...
hardware/amlogic/gralloc/Android.mk:79: warning: "the value of GPU_ARCH is bifrost"
hardware/amlogic/gralloc/Android.mk:135: warning: "the value of BOARD_RESOLUTION_RATIO is 1080"
hardware/amlogic/gralloc/Android.mk:141: warning: "the value of HWC_PRIMARY_DISP_SUPPORT_AFBC is "
hardware/amlogic/gralloc/Android.mk:142: warning: "the value of HWC_EXTEND_DISP_SUPPORT_AFBC is "
hardware/amlogic/gralloc/Android.mk:154: warning: "the value of GPU_TYPE is gondul"
[323/962] including hardware/amlogic/hwcomposer/Android.mk ...
"Build HWC 2.0"
[535/962] including system/sepolicy/Android.mk ...
system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[947/962] including vendor/amlogic/common/frameworks/Android.mk ...
vendor/amlogic/common/frameworks/core/jni/screencontrol/Android.mk:7: warning: libnativehelper/include_jni
vendor/amlogic/common/frameworks/core/jni/systemcontrol/Android.mk:10: warning: libnativehelper/include_jni
[948/962] including vendor/amlogic/common/gpu/lib/Android.mk ...
"the value of BOARD_INSTALL_VULKAN is true"
TARGET_PRODUCT is odroidn2
[952/962] including vendor/amlogic/common/prebuilt/Android.mk ...
"no bootaccelerate source code, add prebuilts"
"no exoplayer source code, add prebuilts"
[958/962] including vendor/amlogic/common/tv/tvserver/Android.mk ...
"have hardware/amlogic/media"
"have hardware/amlogic/media"
[962/962] including vendor/widevine/Android.mk ...
device/hardkernel/odroidn2/Kernel.mk:106: warning: overriding commands for target `out/target/product/odroidn2/obj/lib_vendor/mali.ko'
vendor/amlogic/common//gpu/gpu-v2.mk:23: warning: ignoring old commands for target `out/target/product/odroidn2/obj/lib_vendor/mali.ko'
build/make/core/base_rules.mk:412: warning: overriding commands for target `out/target/product/odroidn2/system/usr/icu/icudt60l.dat'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/odroidn2/system/usr/icu/icudt60l.dat'
build/make/core/base_rules.mk:412: warning: overriding commands for target `out/host/linux-x86/usr/icu/icudt60l.dat'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/host/linux-x86/usr/icu/icudt60l.dat'
build/make/core/base_rules.mk:412: warning: overriding commands for target `out/target/product/odroidn2/vendor/lib/teetz/526fc4fc-7ee6-4a12-96e3-83da9565bce8.ta'
build/make/core/base_rules.mk:412: warning: ignoring old commands for target `out/target/product/odroidn2/vendor/lib/teetz/526fc4fc-7ee6-4a12-96e3-83da9565bce8.ta'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/odroidn2/vendor/etc/init/android.hardware.wifi@1.0-service.rc'
build/make/core/base_rules.mk:426: warning: ignoring old commands for target `out/target/product/odroidn2/vendor/etc/init/android.hardware.wifi@1.0-service.rc'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/odroidn2/vendor/etc/init/android.hardware.gnss@1.0-service.rc'
build/make/core/base_rules.mk:426: warning: ignoring old commands for target `out/target/product/odroidn2/vendor/etc/init/android.hardware.gnss@1.0-service.rc'
build/make/core/Makefile:28: warning: overriding commands for target `out/target/product/odroidn2/recovery/root/sbin/sh'
vendor/amlogic/common/external/busybox/Android.mk:307: warning: ignoring old commands for target `out/target/product/odroidn2/recovery/root/sbin/sh'
ninja: error: 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
13:54:46 ninja failed with: exit status 1

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Sorry, no no idea. I myself struggle about the hiddenapi error, but not about the error you have.
I think you need to search in your source from where do come the call to libdtvad. I don't have this lib nor the sources to it in my sources.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Wed Feb 24, 2021 1:04 am
Sorry, no no idea. I myself struggle about the hiddenapi error, but not about the error you have.
I think you need to search in your source from where do come the call to libdtvad. I don't have this lib nor the sources to it in my sources.
I just downloaded from the odroid wiki the source code and same error

Luke.go
Posts: 596
Joined: Mon May 30, 2016 1:55 pm
languages_spoken: english
Has thanked: 74 times
Been thanked: 82 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by Luke.go »

Please try with the below.

Code: Select all

$ repo init -b g12_9.0.0_64_master
$ repo sync
These users thanked the author Luke.go for the post:
joerg (Wed Feb 24, 2021 3:18 pm)

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

Luke.go wrote:
Wed Feb 24, 2021 11:44 am
Please try with the below.

Code: Select all

$ repo init -b g12_9.0.0_64_master
$ repo sync
I see, haven't made init since long time. I missed that there exists newer branch. Today I can't try, maybe tomorrow.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

Luke.go wrote:
Wed Feb 24, 2021 11:44 am
Please try with the below.

Code: Select all

$ repo init -b g12_9.0.0_64_master
$ repo sync
I have tried this , and always get this error

Code: Select all

vendor/amlogic/common/external/busybox/Android.mk:307: warning: ignoring old commands for target `out/target/product/odroidn2/recovery/root/sbin/sh'
ninja: error: 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libdtvad_intermediates/export_includes', needed by 'out/target/product/odroidn2/obj_arm/SHARED_LIBRARIES/libamadec_intermediates/import_includes', missing and no known rule to make it
18:51:01 ninja failed with: exit status 1

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

After syncing to newer branch I can confirm the same error as @taimed!
But I can't look deeper in it. Need to go to far away customer now and don't now when I will be back. :cry:
Last edited by joerg on Wed Feb 24, 2021 4:37 pm, edited 1 time in total.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »


taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Wed Feb 24, 2021 4:35 pm
After syncing to newer branch I can confirm the same error as @taimed!
But I can't look deeper in it. Need to go to far away customer now and don't now when I will be back. :cry:
@odroid

User avatar
odroid
Site Admin
Posts: 36930
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1595 times
Been thanked: 1072 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by odroid »

We are making a new PC to confirm the build process in the WiKi. We will install Ubuntu 20.04.2 image freshly and double check the instruction in the Android build wiki page.
We can share the test result tomorrow or the day after tomorrow.

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

odroid wrote:
Wed Feb 24, 2021 6:14 pm
We are making a new PC to confirm the build process in the WiKi. We will install Ubuntu 20.04.2 image freshly and double check the instruction in the Android build wiki page.
We can share the test result tomorrow or the day after tomorrow.
hoping it's already solved
viewtopic.php?p=322483#p322483
These users thanked the author taimed for the post:
odroid (Thu Feb 25, 2021 11:16 am)

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

After syncing again the error with libdtvad is gone, but error with hiddenapi not.
Who ever will struggle about this error with hiddenapi compiling on Ubuntu 20.04 or Mint 20.1 Ulyssa:

Code: Select all

FAILED: out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/classes.dex
The solution I found here: https://stackoverflow.com/questions/647 ... -hiddenapi

Code: Select all

$ make clean-apache-xml
$ make clean-ims-common
$ make ims-common
$ make apache-xml
$ make -j12
Finaly it compiled ready.

@taimed, what is your solution with usb-modeswitch now?
These users thanked the author joerg for the post (total 2):
Luke.go (Fri Feb 26, 2021 8:11 am) • odroid (Fri Feb 26, 2021 9:57 am)

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Fri Feb 26, 2021 4:37 am
After syncing again the error with libdtvad is gone, but error with hiddenapi not.
Who ever will struggle about this error with hiddenapi compiling on Ubuntu 20.04 or Mint 20.1 Ulyssa:

Code: Select all

FAILED: out/target/common/obj/JAVA_LIBRARIES/apache-xml_intermediates/dex-hiddenapi/classes.dex
The solution I found here: https://stackoverflow.com/questions/647 ... -hiddenapi

Code: Select all

$ make clean-apache-xml
$ make clean-ims-common
$ make ims-common
$ make apache-xml
$ make -j12
Finaly it compiled ready.

@taimed, what is your solution with usb-modeswitch now?
Building ...
62%

EDIT : Fails here

Code: Select all

l/usb_modeswitch/jni/usb_modeswitch.c"
external/usb_modeswitch/jni/usb_modeswitch.c:1695:24: error: unused parameter 'configuration' [-Werror,-Wunused-parameter]
                int targetClass, int configuration, int mode)
                                     ^
external/usb_modeswitch/jni/usb_modeswitch.c:1902:8: error: variable 'token' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
                        if (file==NULL) {
                            ^~~~~~~~~~
external/usb_modeswitch/jni/usb_modeswitch.c:1909:10: note: uninitialized use occurs here
                while (token != NULL && numLines < MAXLINES) {
                       ^~~~~
external/usb_modeswitch/jni/usb_modeswitch.c:1902:4: note: remove the 'if' if its condition is always false
                        if (file==NULL) {
                        ^~~~~~~~~~~~~~~~~
external/usb_modeswitch/jni/usb_modeswitch.c:1883:13: note: initialize the variable 'token' to silence this warning
        char *token, *configPos;
                   ^
                    = NULL
2 errors generated.
[ 68% 74799/109606] target  C: wpa_cli...8/wpa_supplicant/src/common/wpa_ctrl.c
external/wpa_supplicant_8/wpa_supplicant/src/common/wpa_ctrl.c:291:9: warning: 'readdir_r' is deprecated: readdir_r is deprecated; use readdir instead [-Wdeprecated-declarations]
        while (readdir_r(dir, &entry, &result) == 0 && result != NULL) {
               ^
out/soong/.intermediates/bionic/libc/libc.llndk/android_arm64_armv8-a_vendor_shared/gen/include/dirent.h:87:92: note: 'readdir_r' has been explicitly marked deprecated here
int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer) __attribute__((__deprecated__("readdir_r is deprecated; use readdir instead")));
                                                                                           ^
1 warning generated.
[ 68% 74806/109606] target  C++: libfb...rvices/fbc_tool/libfbc/CFbcUpgrade.cpp
In file included from vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/CFbcUpgrade.cpp:21:
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:133:15: warning: private field 'LAYOUT_VERSION_OFFSET' is not used [-Wunused-private-field]
    const int LAYOUT_VERSION_OFFSET = 0x40000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:134:15: warning: private field 'LAYOUT_VERSION_SIZE' is not used [-Wunused-private-field]
    const int LAYOUT_VERSION_SIZE = 0x1000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:135:15: warning: private field 'KEY_OFFSET' is not used [-Wunused-private-field]
    const int KEY_OFFSET = 0x0;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:136:15: warning: private field 'KEY_SIZE' is not used [-Wunused-private-field]
    const int KEY_SIZE = 0x41000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:139:15: warning: private field 'FIRST_BOOT_INFO_SIZE' is not used [-Wunused-private-field]
    const int FIRST_BOOT_INFO_SIZE = 0x1000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:143:15: warning: private field 'FIRST_BOOT_OFFSET' is not used [-Wunused-private-field]
    const int FIRST_BOOT_OFFSET = 0x44000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:144:15: warning: private field 'FIRST_BOOT_SIZE' is not used [-Wunused-private-field]
    const int FIRST_BOOT_SIZE = 0x5000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:145:15: warning: private field 'SECTION_SIZE' is not used [-Wunused-private-field]
    const int SECTION_SIZE = 0xAD000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:146:15: warning: private field 'SECTION_0_OFFSET' is not used [-Wunused-private-field]
    const int SECTION_0_OFFSET = 0x49000;
              ^
vendor/amlogic/common/frameworks/services/fbc_tool/libfbc/include/CFbcUpgrade.h:147:15: warning: private field 'SECTION_1_OFFSET' is not used [-Wunused-private-field]
    const int SECTION_1_OFFSET = 0xF6000;
              ^
10 warnings generated.
[ 68% 74809/109606] target  C++: syste...temcontrol/keymaster_hidl_hal_test.cpp
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:411:32: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                verify_result, i);
                               ^
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:421:71: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
            ALOGE("Cert %d has wrong issuer.  (Possibly b/38394614)", i);
                        ~~                                            ^
                        %zu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:428:76: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                ALOGE("Cert %d has wrong subject.  (Possibly b/38394614)", i);
                            ~~                                             ^
                            %zu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:1184:70: warning: format specifies type 'int' but the argument has type 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::size_type' (aka 'unsigned long') [-Wformat]
        ALOGE("challenge's length %d not equal att_challenge's %d!", challenge.length(), att_challenge.size());
                                  ~~                                 ^~~~~~~~~~~~~~~~~~
                                  %lu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:1184:90: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
        ALOGE("challenge's length %d not equal att_challenge's %d!", challenge.length(), att_challenge.size());
                                                               ~~                        ^~~~~~~~~~~~~~~~~~~~
                                                               %zu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:1250:72: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
        ALOGE("RsaAttestation cert_chain size failed! actual size %u", cert_chain.size());
                                                                  ~~   ^~~~~~~~~~~~~~~~~
                                                                  %zu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
vendor/amlogic/common/frameworks/services/systemcontrol/keymaster_hidl_hal_test.cpp:1323:71: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
        ALOGE("EcAttestation cert_chain size failed! actual size %u", cert_chain.size());
                                                                 ~~   ^~~~~~~~~~~~~~~~~
                                                                 %zu
system/core/include/log/log_main.h:242:52: note: expanded from macro 'ALOGE'
#define ALOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
                                                   ^~~~~~~~~~~
system/core/include/log/log_main.h:308:67: note: expanded from macro 'ALOG'
#define ALOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
                                                                  ^~~~~~~~~~~
system/core/include/log/log_main.h:72:69: note: expanded from macro 'LOG_PRI'
#define LOG_PRI(priority, tag, ...) android_printLog(priority, tag, __VA_ARGS__)
                                                                    ^~~~~~~~~~~
system/core/include/log/log_main.h:63:34: note: expanded from macro 'android_printLog'
  __android_log_print(prio, tag, __VA_ARGS__)
                                 ^~~~~~~~~~~
7 warnings generated.
[ 68% 74810/109606] target  C++: libwp...a_supplicant/hidl/1.1/hidl_manager.cpp
ninja: build stopped: subcommand failed.
12:18:49 ninja failed with: exit status 1

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

But please tell us, what you have done so far.
Are you compiling without any modification and the one from hardkernel is failing?
Or do you have made modifications?

taimed
Posts: 85
Joined: Tue Dec 08, 2020 4:09 pm
languages_spoken: english
Has thanked: 17 times
Been thanked: 2 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by taimed »

joerg wrote:
Fri Feb 26, 2021 9:06 pm
But please tell us, what you have done so far.
Are you compiling without any modification and the one from hardkernel is failing?
Or do you have made modifications?
I did some modifications, I have changed those files with voodik's

User avatar
joerg
Posts: 1306
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 82 times
Been thanked: 180 times
Contact:

Re: Integrate USB modeswitch with odroid aosp

Post by joerg »

I have modified odroid.xml as stated above and it compiles ready.
If you want to use @voodiks usb-modeswitch, modify .repo/manifests/odroid.xml as this:
Adding

Code: Select all

  <remote  name="voodik"
           fetch="https://github.com/voodik/" />

  <project path="vendor/hardkernel/external/usb-modeswitch" name="android_vendor_hardkernel_external_usb-modeswitch" remote="voodik" revision="refs/heads/master" />
Comment out

Code: Select all

<!--
  <project path="external/usb_modeswitch" name="android_external_usb_modeswitch" remote="origin" />
-->
Then you need to do a repo sync.
It will remove the external/usb_modeswitch and adds the vendor/hardkernel/external/usb-modeswitch.
Maybe the repo sync fails because of not synced modifications. Then delete the folder external/usb_modeswitch and do repo sync again.
After compiling, you will have:

Code: Select all

out/target/product/odroidn2/vendor/bin/usb_modeswitch
out/target/product/odroidn2/vendor/etc/init/usb_modeswitch.rc
But as you can see in usb_modeswitch.rc, you will need a /odm/usb_modeswitch.conf.
You can see here how it must look: viewtopic.php?p=291709#p291709
Create one for your modem, then you can edit device.mk and add it to the build with PRODUCT_COPY_FILES.
If I missed something, we would need to ask @voodik for help.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest