AOSPAlliance / android-prepare-vendor

Set of scripts to automate AOSP compatible vendor blobs generation from factory images
25 stars 8 forks source link

redfin - Pixel 5 #48

Closed chirayudesai closed 3 years ago

chirayudesai commented 3 years ago
chirayudesai commented 3 years ago

For: https://github.com/AOSPAlliance/android-prepare-vendor/pull/47

hackoder commented 3 years ago

Some testing notes using the changes in #47:

chris42 commented 3 years ago

Did an aosp build (including microg) with naked configuration out of #47

Still have to check logs. First look did not have any repeating issues, however have to check boot and library errors. I put this now on my daily driver and will see if any issues come up.

Regarding microg: Seems to work as expected, but longer use will show.

chris42 commented 3 years ago

@sdh4 On following libs I get errors. libdiag_system.so is available in the factory image system_ext, hence simple add to the libs should solve this.

The other two, I could not find. It seems to be connected to the camera, however I have little knowledge with that.

01-01 11:27:18.800  2437  2437 E ims_media_jni: Error loading library lib-imsvt.so: dlopen failed: library "libdiag_system.so" not found: needed by /system_ext/lib64/lib-imsvt.so in namespace classloader-namespace-shared

01-01 11:27:20.282   878   878 E GAF     : TuningManager: gaf_tuning_manager.cc: 67: Load:/vendor/lib64/com.google.af.tuning.imx355.so: dlopen failed: library "/vendor/lib64/com.google.af.tuning.imx355.so" not found

01-01 11:27:20.282   878   878 E GAF     : TuningManager: gaf_tuning_manager.cc: 67: Load:/vendor/lib64/com.google.af.tuning.imx481.so: dlopen failed: library "/vendor/lib64/com.google.af.tuning.imx481.so" not found
sdh4 commented 3 years ago

I added libdiag_system to #47 (commit ab3d331). I have not tested this change so far.

The imx355 and imx481 are probably parallel libraries to the com.google.af.tuning.imx363.so that is included in /vendor. Supposedly (https://twitter.com/MishaalRahman/status/1297417288333905920?s=20) the imx355, imx363, and imx481 are the three camera sensors in the Pixel 5. Presumably the 355 and 481 didn't need any special autofocus tuning (or something like that) or Google would have included the libraries.

chris42 commented 3 years ago

Ok, might be, that the different cameras are not tuned, however we are missing all tuning libraries? O_o In the vendor files there are (of which are none in the current config): in vendor/lib64

com.google.af.tuning.imx363.so

and in vendor/lib64/camera

com.google.gabc.tuning.imx355.so
com.google.gabc.tuning.imx363.so
com.google.gabc.tuning.imx481.so
com.google.ghawb.tuning.imx355.so
com.google.ghawb.tuning.imx363.so
com.google.ghawb.tuning.imx481.so

I will read up on the pixel cameras and see if I can make sense out of this "gabc, ghawb" and distribution on different sensors.

I tested the libdiag_system with a rough build and the error was gone, will check for any follow up errors today or tomorrow.

chris42 commented 3 years ago

So i checked on the camera setup out of the tweet and searched the other libraries.

So it makes sense, what you said, that only the primary main camera IX363 has autofocus. The gabc and ghawb seem to be noise reduction and white balancing libraries for each camera. All of them are included in the factory image and in the driver files. Hence I guess all of them should go in naked?

EDIT: Of course the files are included. I am always getting confused, that the config changes mid way from include to exclude ;-)

chris42 commented 3 years ago

Having a build with libdiag_system.so, that dlopen error is gone and device seems to behave. Besides the af.tuning library errors, I only have one dlopen error left in the logs:

01-02 23:29:56.590  5430  5430 E a2dp_vendor_ldac_decoder: A2DP_VendorLoadDecoderLdac: cannot open LDAC decoder library libldacBT_bco.so: dlopen failed: library "libldacBT_bco.so" not found

ImsService seems to be in trouble and repeatedly gets "no ImsService available":

01-02 23:40:42.297  2385  2385 W Telephony: registerMmTelCapabilityCallback: registration failed, no ImsService available. Exception: CapabilityCallbackManager - MmTelFeature binder is dead. (code: 1)
01-02 23:40:42.298  2385  2385 E MmTelFeatureConnection [0]: ImsRegistrationCallbackAdapter: ImsRegistration is null
01-02 23:40:42.299  2061  2061 D KeyguardUpdateMonitor: handleSimStateChange(subId=-1, slotId=0, state=0)
01-02 23:40:42.299  2061  2061 W KeyguardUpdateMonitor: invalid subId in handleSimStateChange()
01-02 23:40:42.299  2385  2385 W Telephony: registerImsRegistrationCallback: registration failed, no ImsService available. Exception: ImsRegistrationCallbackAdapter: MmTelFeature isnot available! (code: 1)

Will need to search where that craps out...

sdh4 commented 3 years ago

@chris42 -- libldacBT_bco.so does not seem to exist even in the Google images, so presumably it is unnecessary.

With respect to your IMS messages, on mine about a second after the messages you quote, the ImsService seems to start up OK.

sdh4 commented 3 years ago

The only remaining problem I notice are:

chris42 commented 3 years ago

@chris42 -- libldacBT_bco.so does not seem to exist even in the Google images, so presumably it is unnecessary.

With respect to your IMS messages, on mine about a second after the messages you quote, the ImsService seems to start up OK.

For me always hard to tell, what is needed and what not.

The IMS exceptions caught my attention as I had them 15-20 times in the log, which seemed a bit excessive.

chris42 commented 3 years ago

@chirayudesai As I saw the carrier_list conversion in the commits, I wondered that CarrierIdProvider is still looking for the .pb:

01-04 21:34:46.552 2418 2418 E CarrierIdProvider: read carrier list from ota pb failure: java.io.FileNotFoundException: /data/misc/carrierid/carrier_list.pb: open failed: ENOENT (No such file or directory)

Might be a cosmetic and irrelevant...

chirayudesai commented 3 years ago

Thanks for testing everyone, I updated the list in the description, and added one more item I tested (VoLTE)

chirayudesai commented 3 years ago

The only remaining problem I notice are:

  • Touching events or free spaces in the built-in calendar app doesn't do anything. This is probably just general AOSP brokeness.

Yeah...

  • It's not clear both rear-facing cameras are working. Camera apps only seem to show two cameras (one front, one rear) and all the test pictures I have tried seem to use the sensor that is one the right hand side when using the display. Logcat messages imply that the phone is trying to treat both rear cameras as a single logical camera, but obviously if that is working properly some pictures would use each sensor.

I'd check Google Camera for this, can grab 7.6 from the stock factory images. It will need some sort of GMS, either the full thing or microG or a stub, it should work then.

chris42 commented 3 years ago

I'd check Google Camera for this, can grab 7.6 from the stock factory images. It will need some sort of GMS, either the full thing or microG or a stub, it should work then.

I actually tested it on a AOSP with microg and arnova GCAM beta, I observe the same, that only one camera is used (I cover the other to test). It seems that not all functionality of the camera is working. E.g. night mode is different on a build with drivers and binaries in comparison to this build.

chirayudesai commented 3 years ago

The two cameras on these phones are 1) Primary 12.2MP wide lens, the outer camera 2) Ultrawide 16MP, the inner camera

Both work fine here with the official Google Camera (no modded apk)

If I cover the first / outermost lens, 1x and 2x won't work. If I cover the second / inner lens, .6x won't work.

arnodorian-r commented 3 years ago

@chirayudesai 02-10 23:47:40.172 2359 2359 E MmTelFeatureConnection [0]: ImsRegistrationCallbackAdapter: ImsRegistration is null 02-10 23:47:40.172 2359 2359 W Telephony: registerImsRegistrationCallback: registration failed, no ImsService available. Exception: ImsRegistrationCallbackAdapter: MmTelFeature isnot available! (code: 1) 02-10 23:47:40.172 2359 2359 I Telephony: TelecomAccountRegistry: setupAccounts: Phone with subscription id -1 02-10 23:47:40.172 2359 2359 D Telephony: TelecomAccountRegistry: setupAccounts: skipping invalid subid -1

can i know how you got this solved?

chirayudesai commented 3 years ago

@arnodorian-r IMS has always worked fine here (even on plain AOSP without any other changes), maybe retry with the latest changes?

This can be closed now, everything works, and this has been running fine for months!