Why only system/lib/hw/ ?
I build library for gps, and it puts 32bit library on system/lib/hw and 64bit library on system/lib64/hw automatically.
Sorry, I thought you only compiled 32-bit libraries.
Also, I have two phone with Pie, and first has gps.default.so in vendor/lib/hw and vendor/lib64/hw folders.
But second has gps.default.so in vendor/lib64/hw folder only.
They have not gps.default.so files in system folder…
You can try the vendor folder too, just make sure they aren’t in the system partition too.
You might need to modify the source code of your gps driver.
Most Rockchip lib files are stored in the vendor instead of system partition now.
I tried to copy in vendor folder from system folder manually, but library does not work.
replace gps.default.so,Try making the following changes:
hlm@Server:/users/hlm/9_Edge/vendor/rockchip/common$ ls -l gps/ap6xxx
total 1836
-rwxrwxr-x 1 hlm hlm 1785780 Jun 27 17:32 glgps
-rwxrwxr-x 1 hlm hlm 54756 Jun 27 17:32 gps.default.so
-rwxrwxr-x 1 hlm hlm 10456 Jun 27 17:32 gpsconfig.xml
-rwxrwxr-x 1 hlm hlm 21864 Jun 27 17:32 gpslogd
hlm@Server:/users/hlm/9_Edge/vendor/rockchip/common$ git diff
diff --git a/gps/gps.mk b/gps/gps.mk
index d343134..199fbfe 100755
--- a/gps/gps.mk
+++ b/gps/gps.mk
@@ -1,11 +1,11 @@
###############################################################################
# GPS HAL libraries
LOCAL_PATH := $(call my-dir)
-ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
+#ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)gps/ap6xxx/gps.default.so:system/lib/hw/gps.default.so \
$(LOCAL_PATH)gps/ap6xxx/glgps:system/bin/glgps \
$(LOCAL_PATH)gps/ap6xxx/gpslogd:system/bin/gpslogd \
$(LOCAL_PATH)gps/ap6xxx/gpsconfig.xml:system/etc/gps/gpsconfig.xml
-endif
+#endif
These two lines of code may also need to be removed.
$(LOCAL_PATH)gps/ap6xxx/glgps:system/bin/glgps \
$(LOCAL_PATH)gps/ap6xxx/gpslogd:system/bin/gpslogd \
Yes, I understand.
ROM has system/lib/hw/gps.default.so and system/lib64/hw/gps.default.so files, but library does not work…
That’s what you need to analyze through logcat.
I don’t understand what is issue…
I built gps library, it has in system/lib/hw and system/lib64/hw, but it does not work. But this library (I built it in khadas EDGE Pie source!!!) works perfect on other device with android Pie and CPU rockchip px5.
I want to see logcat, but adb devices list is empty. USB debugging is turned on. EDGE does not see connect via usb, but I can flash EDGE via USB.
What is the issue?
Logcat and dmesg have anything about gps library. Android Pie does not start library. Why?
I build android Nougat for EDGE. I put library into system/lib/hw and system/lib64/hw (I built library in EDGE Pie source!!!). Library works perfect!!!
Please fix issue in Pie.
You compare 7.1 OK LOG with 9.0 NG LOG. In addition, what are the specific phenomena that you say does not start library?
Nougat has library log, but Pie has not log from gps library.
Send out corresponding logs to see.
This is my logs.
LOG_TAG: gps_serial
Nougat gps lib works fine.
Pie gps lib does not work.
I can provide prebuilt lib for test.
Can you also provide the prebuilt lib files, perhaps also upload the source code of the gps to Github or a tar zip file and a link to the gps device?
It might help so Khadas or others can fix it easier.
Gps lib works perfect on vim1, 2, EDGE nougat, geekboox and many other boards. Need to fix Pie source.
I can send prebuilt lib on e-mail, without any upload and including on ROM.
device\rockchip\rk3399
diff --git a/device.mk b/device.mk
index 127d2cb..ea7ae57 100755
--- a/device.mk
+++ b/device.mk
@@ -601,6 +601,11 @@ PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.0-impl \
android.hardware.bluetooth@1.0-service
+# GPS HAL
+PRODUCT_PACKAGES += \
+ android.hardware.gnss@1.0-impl \
+ android.hardware.gnss@1.0-service
+
# for realtek bluetooth
PRODUCT_PACKAGES += \
bluetooth_rtk.default \
cd device\rockchip\rk3399
diff --git a/manifest.xml b/manifest.xml
index 409da27..3da69d8 100755
--- a/manifest.xml
+++ b/manifest.xml
@@ -171,6 +171,15 @@
<instance>default</instance>
</interface>
</hal>
+ <hal format="hidl">
+ <name>android.hardware.gnss</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
<sepolicy>
<version>26.0</version>
</sepolicy>
Try adding, give me instant feedback.
I modified:
diff --git a/device.mk b/device.mk
index f4e279f..13574a6 100755
--- a/device.mk
+++ b/device.mk
@@ -70,6 +70,11 @@ PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.4-external-service
endif
+# GPS HAL
+PRODUCT_PACKAGES += \
+ android.hardware.gnss@1.0-impl \
+ android.hardware.gnss@1.0-service
+
# setup dalvik vm configs.
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
diff --git a/manifest.xml b/manifest.xml
index 80f4ef0..afffa58 100755
--- a/manifest.xml
+++ b/manifest.xml
@@ -210,6 +210,15 @@
<instance>armnn</instance>
</interface>
</hal>
+ <hal format="hidl">
+ <name>android.hardware.gnss</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
</manifest>
and add debug logs in gps library. This is logcat from Nougat with debug messages.
Some information: ROM Pie has:
/system/lib/android.hardware.gnss@1.0.so
/system/lib/android.hardware.gnss@1.1.so
/system/lib64/android.hardware.gnss@1.0.so
/system/lib64/android.hardware.gnss@1.1.so
/vendor/lib/hw/android.hardware.gnss@1.0-impl.so
/vendor/lib64/hw/android.hardware.gnss@1.0-impl.so
- Logcat from ROM without /system/lib/hw/gps.default.so and /system/lib64/hw/gps.default.so
- Logcat from ROM with /system/lib/hw/gps.default.so and /system/lib64/hw/gps.default.so
- Logcat from ROM with /vendor/lib/hw/gps.default.so and /vendor/lib64/hw/gps.default.so - It has gps_serial messages, but gps does not work.