赞
踩
涉及到framwork的修改一般都在QSSI文件夹下。
1、Android设备,发现耳机插入了设备,但是设备statusbar并没有显示耳机插入的状态。
frameworks/base/packages/SystemUI/res/values/config.xml
下修改:
- <string-array name="config_statusBarIconsToExclude" translatable="false">
- <item>@*android:string/status_bar_rotate</item>
- - <item>@*android:string/status_bar_headset</item>
- + <!-- <item>@*android:string/status_bar_headset</item> -->
- </string-array>
2、连接Wifi,WiFi连接成功却显示感叹号或问号,不能使用。实际访问网络是可以的。
/packages/modules/NetworkStack/res/values/config.xml
每当Wifi连接后,系统会通过访问一个网站来确定网络的联通性。Google默认用的是https://www.google.com/generate_204 这个网站,在国外可以访问,国内不一定可以访问。需要替换成 一个国内和国外都可以访问的网站即可。
- <!-- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.gstatic.com/generate_204</string> -->
- <string name="default_captive_portal_http_url" translatable="false">http://connectivitycheck.platform.hicloud.com/generate_204</string>
- <!-- HTTPS URL for network validation, to use for confirming internet connectivity. -->
- <!-- default_captive_portal_https_url is not configured as overlayable so
- OEMs that wish to change captive_portal_https_url configuration must
- do so via configuring runtime resource overlay to
- config_captive_portal_https_url and *NOT* by changing or overlaying
- this resource. It will break if the enforcement of overlayable starts.
- -->
- <!-- <string name="default_captive_portal_https_url" translatable="false">https://www.google.com/generate_204</string> -->
- <string name="default_captive_portal_https_url" translatable="false">https://connectivitycheck.platform.hicloud.com/generate_204</string>
-
- <!-- List of fallback URLs to use for detecting captive portals. -->
- <!-- default_captive_portal_fallback_urls is not configured as overlayable
- so OEMs that wish to change captive_portal_fallback_urls configuration
- must do so via configuring runtime resource overlay to
- config_captive_portal_fallback_urls and *NOT* by changing or overlaying
- this resource. It will break if the enforcement of overlayable starts.
- -->
- <string-array name="default_captive_portal_fallback_urls" translatable="false">
- <item>http://connectivitycheck.platform.hicloud.com/generate_204</item>
- <item>http://www.google.com/gen_204</item>
- <item>http://play.googleapis.com/generate_204</item>
- </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文件。
- LOCAL_PATH := $(my-dir)
-
- #ANIMATION_PATH := packages/apps/Thirdapp/BootAnimation
- #MEDIA_OUTDIR := out/target/product/qssi/product/media
- #$(shell mkdir -p out/target/product/qssi/product/media)
- #$(shell cp -rf $(ANIMATION_PATH)/*.zip $(MEDIA_OUTDIR))
-
- include $(CLEAR_VARS)
- LOCAL_MODULE := appstore
- LOCAL_MODULE_CLASS := APPS
- LOCAL_MODULE_TAGS := optional
- LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
- LOCAL_PRODUCT_MODULE := true
- LOCAL_CERTIFICATE := PRESIGNED
- LOCAL_SRC_FILES := appstore/appstore.apk
- LOCAL_MODULE_PATH := $(PRODUCT_OUT)/system/app
- include $(BUILD_PREBUILT)
-
-
- #/build/make/target/product/handheld_system.mk
在/build/make/target/product/handheld_system.mk的文件里的
PRODUCT_PACKAGES += \
后面加上
- $(call inherit-product-if-exists, frameworks/base/data/keyboards/keyboards.mk)
- $(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
-
- PRODUCT_PACKAGES += \
- BasicsDreams \
- BlockecdNumberProvider \
- Bluetooths \
- BluetoothsMidiServices \
- appstore \
-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。