phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.4k stars 660 forks source link

[Chuwi Hi9Air][AOSP 10.0 v213] GLES requires libstdc++ in vndk-sp #1162

Open rashydos opened 4 years ago

rashydos commented 4 years ago

I tried to install AOSP 10.0 v213 in Chuwi Hi9 Air but got this error :

C:\Program Files (x86)\Minimal ADB and Fastboot>fastboot flash system C:\Users\A148579\Desktop\Chuwi\system-quack-arm64-aonly-gapps.img target reported max download size of 134217728 bytes erasing 'system'... OKAY [ 0.358s] sending sparse 'system' 1/21 (131068 KB)... OKAY [ 5.728s] writing 'system' 1/21... FAILED (remote: sparse image size span overflow.) finished. total time: 6.102s

rashydos commented 4 years ago

Any idea please?

phhusson commented 4 years ago

Try vanilla variant, it's smaller

Le dim. 8 mars 2020 à 16:27, rashydos notifications@github.com a écrit :

Any idea please?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1162?email_source=notifications&email_token=AAAA4ORSVXB6L3XPUKPIMH3RGO2MPA5CNFSM4LDBZCJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOEY4VQ#issuecomment-596217430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OWS44EULIDV4YRT3FDRGO2MPANCNFSM4LDBZCJQ .

rashydos commented 4 years ago

I have tried it but it hang at Android logo and never finish boot

phhusson commented 4 years ago

Give me logcat for that one

Le dim. 8 mars 2020 à 16:31, rashydos notifications@github.com a écrit :

I have tried it but it hang at Android logo and never finish boot

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1162?email_source=notifications&email_token=AAAA4OUDA56EZIFUVTANOXDRGO25BA5CNFSM4LDBZCJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOEZAFA#issuecomment-596217876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OWQQU53TPLEUTYLWYDRGO25BANCNFSM4LDBZCJQ .

rashydos commented 4 years ago

This is logcat for vanilla 10.0 v213 that hang at android logo

thanks logs.zip

rashydos commented 4 years ago

here is new logcat, logo android hang with v213 logcatv213.zip

fastboot -u flash system C:\Chuwi\system-quack-arm64-aonly-vanilla.img

rashydos commented 4 years ago

@phhusson did you check the log?

Thanks

phhusson commented 4 years ago

Right sorry. Issue is: 03-09 09:13:24.673 5834 5834 E vndksupport: Could not load /vendor/lib/egl/libGLES_mali.so from sphal namespace: dlopen failed: library "libstdc++.so" not found.

I know other people on other github issues have this as well. I'll try to take a lock.

In the meantime, you can copy /system/lib/vndk-26/libstdc++ to /vendor/lib (vndk-26 is assuming this is an 8.0 vendor)

rashydos commented 4 years ago

Thanks

rashydos commented 4 years ago

work :) thanks @phhusson

Here is the method for info:

adb pull /system/lib/vndk-26/libstdc++.so c:\ adb root adb shell mount -o rw,remount /vendor adb push C:\libstdc++.so /vendor/lib

rashydos commented 4 years ago

if you can ad a symlink from /vendor/lib/libstdc++.so to /system/lib/vndk-26/libstdc++.so in next build ;)

rashydos commented 4 years ago

@phhusson

afler rebooting, I can't push again the lib :(

:/data/data # mount -o rw,remount /vendor '/dev/block/dm-0' is read-only

can't mout /vendor for RW :(

rashydos commented 4 years ago

@phhusson did V214 solve this booting problem? did you success to add symlink from /vendor/lib/libstdc++.so to /system/lib/vndk-26/libstdc++.so in init.rc?

rashydos commented 4 years ago

Thanks @yura73 and @phhusson

I finally success to boot android 10

to solve : vndksupport: Could not load /vendor/lib/egl/libGLES_mali.so from sphal namespace: dlopen failed: library "libstdc++.so" not found.

adb root adb remount adb shell cp /system/lib/vndk-26/libstdc++.so /system/lib/vndk-sp-26/libstdc++.so

also, I have updated the file /system/etc/ld.config.26.txt by adding libstdc++.so and /system/${LIB}/vndk-sp-26 at many placed (not only namespace.vndk.link.default.shared_libs didn' work for me)

use adb pull then push

as attachement my file that work with 10.0 v214

ld.config.26.txt

rashydos commented 4 years ago

Hello @phhusson is there a way to add this fix to next build v216?

L2jLiga commented 4 years ago

@rashydos thank you for your workaround! Works fine for me with v221

Here's my ldconfig ld.config.26.txt

Only one note to add: when I tried to copy files they lost SELinux context and I have to repair it:

adb shell chcon -t system_lib_file /system/lib/vndk-sp-26/libstdc++.so
adb shell chcon -t system_linker_config_file /system/etc/ld.config.26.txt