OPTEE + Android 8

Just checked with one of our android guys and PRODUCT_FULL_TREBLE_OVERRIDE is probably not supported on HiKey yet. In any case, Treble can be tested with VTS.

https://source.android.com/devices/architecture/treble#testing-treble

Thanks for the update @vchong

I am trying to create AOSP environment on hikey board similar to my customer’s hardware setup, so, treble is required.
Anyways, I will wait for it. I hope it would be supported in days to come.
If the Android team active on the forums ? Is it possible to contact them ?
If so , I would like to know their plans/ETA for treble option

Thanks

Hi ,
In SCREEN ON condition, when power button is pressed, screen goes off and also adb connection is lost. Means , hikey is not going to sleep mode ?

I want to control hikey board via adb commands and test my S/W
So, when I give “adb shell input keyevent 26” , adb connection is lost
Is there any way to avoid this ?
Need some inputs here !!!

Thanks

Hi @vchong,
I am trying to download aosp8+optee stack from the link you gave previously :

and I am facing repo sync errors.
error: Exited sync due to fetch errors

Total size came to : 26Gig
If run sync command again, size comes to 27Gig. Its been like this from 21Gig

Is this repo latest ? Repo is stable enough to download ?

Sync command I am running is : repo sync -j1 -f --force-sync

Errors appearing :
> Fetching projects: 49% (291/592) Fetching project platform/system/hardware/interfaces

Fetching project platform/frameworks/layoutlib
fatal: Couldn't find remote ref refs/tags/android-8.1.0_r14
Unexpected end of command stream
fatal: Couldn't find remote ref refs/tags/android-8.1.0_r14
Unexpected end of command stream
error: Cannot fetch platform/frameworks/layoutlib
warn: --force-broken, continuing to sync
Fetching project platform/external/regex-re2

Thanks

It was updated to 8.1.0_r14 recently and worked for me. Did you try from the very beginning, i.e. repo init ..?

Ok. I don’t see an r14 tag for platform/frameworks/layoutlib. Will try to investigate. In the meantime, please continue to use r7 for now.

ok.
and i believe only thing to change is in “git init” command :
android-8.1.0_r14 - > android-8.1.0_r7

and remaining parts are same … right ?

Thanks

and remaining parts are same … right ?

Right

Hi @vchong,
I can successfully compile using r7 , and flashed the hikey board with image.
But , the image is not stable.

When I do some UI operations like open settings/audio app etc, after some time, screen goes blank, ANDROID boot logo appears (its not a complete reboot), and home screen appears.
There’s a crash :

--------- beginning of crash
01-01 00:02:53.269 2022 2028 F libc : Invalid address 0x75ffffffff passed to free: value not allocated
01-01 00:02:53.270 2022 2028 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 2028 (ReferenceQueueD), pid 2022 (system_server)
01-01 00:02:53.304 2022 2980 E UserRestrictionsUtils: Unknown restriction: null

Complete Log : [15:45:32]viswanath@[~/.../sw]$ adb logcat --------- beginning of main01-0 - Pastebin.com

Can you pls check if there’s already a fix for this ?

Thanks

HI, @deepakmnvl

There is a similar problem reported here: https://issuetracker.google.com/issues/71421054

but I am still not able to find the root cause for it yet.
If you have any new findings on it, please share with me.

Thanks,
Yongqin Liu

So , seems there is an issue indeed !!!

@vchong, does similar issue exist in r14 too ?
If not, can you pls fix the tag issue

Thanks

@deepakmnvl I don’t know. @liuyq have you tried r14? In any case, the r14 tag issue has been fixed, but we’re currently experiencing xtest errors. You can still test it against the stability issue though if you wish.

@deepakmnvl @vchong
The same problem exists with r14 too.

Thanks,
Yongqin Liu

itsnt there any work around for this ?
Even a rough patch is enough for me, as I am working on a local engineering setup !!!

@liuyq , have seen your comment in issue tracker, can you pls post your changes

yo...@linaro.org <yo...@linaro.org> #3 Jan 9, 2018 02:02PM
With some changes on luni/src/main/java/libcore/util/NativeAllocationRegistry.java, I am not able to reproduce the UI problem,
but the change is obviously not right, it only makes the referent not garbage collected, so that the freeFunction is not called I think.

It looks like related to ./luni/src/main/java/java/nio/charset/CharsetEncoderICU.java,but still not able to find the root cause yet.

Thanks

@deepakmnvl
You could use the NativeAllocationRegistry-no-crash.patch attached in the #comment.
https://issuetracker.google.com/issues/71421054#comment3

Or use the hack workaround here:
https://android-review.linaro.org/#/c/18093/1/icu4c/source/common/ucnv_bld.h

just doing below change :
ucnv_bld.h: add 3 pointer type fields for UConverter struct to workaround the crash problem when debug fs enabled for others !!!

Strange , will make this change and verify , thanks

@liuyq
this worked : You could use the NativeAllocationRegistry-no-crash.patch attached in the #comment.
https://issuetracker.google.com/issues/71421054#comment3

this didnt : Or use the hack workaround here:
https://android-review.linaro.org/#/c/18093/1/icu4c/source/common/ucnv_bld.h

Thanks for the patch :relieved:

@deepakmnvl

Thanks very much for the feedback.

For the workaround with ucnv_bld.h, one problem I got with it is that the problem might happened in the 2nd boot.
If possible, could you please share me what’s problem you had with it?
just want to collect more information about this problem.

Thanks,
Yongqin Liu

@liuyq ,
With ucnv_bld.h change, crash logs were pretty much same.
And I think the crash was there in 1st boot too. or I didnt observe it correctly.

I then applied native allocation patch , and crash wasn’t there
Then , I removed “ucnv_bld.h change” and UI is stable enough for me to work with !!!

HTH,
Thanks

@deepakmnvl

Thanks for the information!