当前位置:   article > 正文

高通平台android的Framework开发遇到的一些问题总结

高通平台android的Framework开发遇到的一些问题总结

涉及到framwork的修改一般都在QSSI文件夹下。

1、Android设备,发现耳机插入了设备,但是设备statusbar并没有显示耳机插入的状态。

frameworks/base/packages/SystemUI/res/values/config.xml

下修改:

  1. <string-array name="config_statusBarIconsToExclude" translatable="false">
  2. <item>@*android:string/status_bar_rotate</item>
  3. - <item>@*android:string/status_bar_headset</item>
  4. + <!-- <item>@*android:string/status_bar_headset</item> -->
  5. </string-array>

2、连接Wifi,WiFi连接成功却显示感叹号或问号,不能使用。实际访问网络是可以的。

/packages/modules/NetworkStack/res/values/config.xml

每当Wifi连接后,系统会通过访问一个网站来确定网络的联通性。Google默认用的是https://www.google.com/generate_204 这个网站,在国外可以访问,国内不一定可以访问。需要替换成 一个国内和国外都可以访问的网站即可。

  1. <!-- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> -->
  2. <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.platform.hicloud.com/generate_204</string>
  3. <!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
  4. <!-- default_captive_portal_https_url is not configured as overlayable so
  5. OEMs that wish to change captive_portal_https_url configuration must
  6. do so via configuring runtime resource overlay to
  7. config_captive_portal_https_url and *NOT* by changing or overlaying
  8. this resource. It will break if the enforcement of overlayable starts.
  9. -->
  10. <!-- <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> -->
  11. <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.platform.hicloud.com/generate_204</string>
  12. <!-- List of fallback URLs to use for detecting captive portals. -->
  13. <!-- default_captive_portal_fallback_urls is not configured as overlayable
  14. so OEMs that wish to change captive_portal_fallback_urls configuration
  15. must do so via configuring runtime resource overlay to
  16. config_captive_portal_fallback_urls and *NOT* by changing or overlaying
  17. this resource. It will break if the enforcement of overlayable starts.
  18. -->
  19. <string-array name="default_captive_portal_fallback_urls" translatable="false">
  20. <item>http://connectivitycheck.platform.hicloud.com/generate_204</item>
  21. <item>http://www.google.com/gen_204</item>
  22. <item>http://play.googleapis.com/generate_204</item>
  23. </string-array>

3、如何添加GMS包。一般GMS包在partner_gms 文件夹下。

将 partner_gms 文件夹全部复制到vendor目录下。

在 QSS/device/qcom/qssi/qssi.mk文件上写一段命令:

$(call inherit-product, vendor/partner_gms/products/gms.mk)

4、修改默认的壁纸

/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpeg

frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.jpeg
frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.jpeg

替换成你想要的壁纸即可。

5、如何内置apk

在packages/apps/ 下创建一个文件夹Thirdapp

路径:/packages/apps/Thirdapp/

在Thirdapp创建一个文件夹名为: appstore

路径:/packages/apps/Thirdapp/appstore

把需要安装的apk放在在该文件夹下。 apk 命名为  appstore.apk

路径:/packages/apps/Thirdapp/appstore/appstore.apk

在/packages/apps/Thirdapp/ 创建一个Android.mk文件。

  1. LOCAL_PATH := $(my-dir)
  2. #ANIMATION_PATH := packages/apps/Thirdapp/BootAnimation
  3. #MEDIA_OUTDIR := out/target/product/qssi/product/media
  4. #$(shell mkdir -p out/target/product/qssi/product/media)
  5. #$(shell cp -rf $(ANIMATION_PATH)/*.zip $(MEDIA_OUTDIR))
  6. include $(CLEAR_VARS)
  7. LOCAL_MODULE := appstore
  8. LOCAL_MODULE_CLASS := APPS
  9. LOCAL_MODULE_TAGS := optional
  10. LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
  11. LOCAL_PRODUCT_MODULE := true
  12. LOCAL_CERTIFICATE := PRESIGNED
  13. LOCAL_SRC_FILES := appstore/appstore.apk
  14. LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/app
  15. include $(BUILD_PREBUILT)
  16. #/build/make/target/product/handheld_system.mk

在/build/make/target/product/handheld_system.mk的文件里的

PRODUCT_PACKAGES += \

后面加上

  1. $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
  2. $(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
  3. PRODUCT_PACKAGES += \
  4. BasicsDreams \
  5. BlockecdNumberProvider \
  6. Bluetooths \
  7. BluetoothsMidiServices \
  8. appstore \

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/835654
推荐阅读
相关标签
  

闽ICP备14008679号