Huawei browser provides below UAs(User Agents) data, based on whether the device is the HMS or GMS. The following are four cases (Note : browser version, HMS version, GMS version, and device information will change accordingly):
1. If both the HMS and GMS are installed, the following information is displayed:
Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00; HMSCore/4.0.0 GMS/10.4)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.64
HuaweiBrowser/10.0.3.102
Mobile Safari/537.36
2. If only the HMS is installed, the following information is displayed:
Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00; HMSCore/4.0.0)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.64
HuaweiBrowser/10.0.3.102
Mobile Safari/537.36
3. If only the GMS is installed, the command output is as follows:
Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00; GMS/10.4)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.64
HuaweiBrowser/10.0.3.102
Mobile Safari/537.36
4. If there is no HMS or GMS, the following information is displayed:
Mozilla/5.0 (Linux; Android 6.0.1; LYA-AL00)
AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.64
HuaweiBrowser/10.0.3.102
Mobile Safari/537.36
Get above values using navigator.userAgent
For details about Huawei developers and HMS, visit the website.
https://forums.developer.huawei.com/forumPortal/en/home?fid=0101246461018590361
Related
Hope this is the right place to post this, but I wanted to know if I could get people to post their UI Strings from Various ROM's for a Web Development project I am working on.
Need:
Device:
Carrier:
ROM Name and Version:
UA String:
To get your UA String, just use your device and browse to: http://whatsmyuseragent.com/
You will see your User Agent at the top of the page, Copy/Paste that if you can.
Any help would be appreciated.
Mine:
Device: Nexus One (T-Mobile)
Carrier: T-Mobile
ROM Name and Version: Eclair 2.1-update1 Build ERE27
UA String: Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Nexus One Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17
Mines the default for CM506, there is an option to modify it.
HTTP_USER_AGENT:Mozilla/5.0 (Linux Android 2.1-update1; en-us; Nexus O EPE54B) AppleWebKit/530.17 (KHTML Gecko) Version/4.0 Mobile Safari/530. HTTP_X_VIA:Harmony proxy
Opera/9.80 (12ME/MIDp; Opera Mini/5.0.18302/812; U; en) Presto/2.4.15
britoso said:
Mines the default for CM506, there is an option to modify it.
HTTP_USER_AGENT:Mozilla/5.0 (Linux Android 2.1-update1; en-us; Nexus O EPE54B) AppleWebKit/530.17 (KHTML Gecko) Version/4.0 Mobile Safari/530. HTTP_X_VIA:Harmony proxy
Click to expand...
Click to collapse
In the option to edit it, would it allow you to put in the stock UA String and be identified as that?
Talderon said:
In the option to edit it, would it allow you to put in the stock UA String and be identified as that?
Click to expand...
Click to collapse
Cant easily edit it, It has four options: Android,Desktop,iPhone,IE6
Hi,
I've been trying to change Streak's stock browser's default UA (as I know a lot of people have been trying for a while). I went and pulled Browser.apk from the /system/app and extracted the files inside.
(/system/app/Browser.apk/classes.dex)
I then went through each of the files and found the following in classes.dex:
At data offset:
0x00030DD1 to 0x00030E4A
Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16
and
0x00030E4D to 0x00030EDA
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17
These are the exact same UA strings I get when I switch to the Iphone and Desktop user agent through about:debug in the browser.
I assume changing these strings will change the UA of the respective settings under about:debug settings mode in the default browser. However, I haven't tried as the actual ua string I am looking for is the default.
The default user agent string on my Dell Streak is:
Mozilla/5.0 (Linux; U; Android 2.2; en-gb; Dell Streak Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
(currently using DJ_Steve's 1.4.6 Froyo rom)
Ultimately, I have these few questions, and am hoping someone out there can help:
1. I can't seem to find it in the Browser.apk, and am just wondering if it is a shared UA in webview for all the different network accessing applications?
2. If I change the default UA, would it affect all applications that uses the network?
3. Where is the default UA string kept?
4. For the about:debug method of changing the user agent string, is there a way to force the settings to persist after exit and restart of the browser application?
I apologize if I sound like I don't know what I am talking about, as this is my first android device, and my knowledge of linux/computers is generally quite limited.
Thanks ahead of time to anyone who can help out.
Original link: https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201309395572810143&fid=0101187876626530001
When using the HMS Drive Kit, if the user's cloud storage is insufficient, the developer can determine whether the user has installed the HUAWEI MOBILE CLOUD app on the mobile phone through PackageManager.
If the app has been installed, the developer can invoke the upgrade purchase page of the Huawei MOBILE Cloud app in intent mode.
There is advised developer to use the dialog pop-up mode, which can allow users to determine whether to invoke the intent to access the HUAWEI MOBILE CLOUD upgrade page.
The core code for determining whether the HUAWEI MOBILE CLOUD app has been installed is as follows:
Code:
final PackageManager packageManager = activity.getPackageManager();
// Obtaining the Package Information of All Installed Programs
List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);
for (PackageInfo info : pinfo) {
if (info.packageName.equals("com.huawei.hidisk")) {
// Here is used to process the logic of the Huawei Mobile Cloud app that has been installed.
}
}
The core code for invoking the upgrade purchase page of the Huawei Mobile Cloud app is as follows:
Code:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("hicloud://cloudDrive/getInfo?path=PackageInfoActivity"));
startActivity(intent);
For more details, you can go to:
Official website
Development Documentation page, to find the documents you need
Reddit to join our developer discussion
GitHub to download demos and sample codes
Stack Overflow to solve any integration problems
Dear developer,
HMS Core SDKs have undergone some version updates recently. To further improve user experience, update the HMS Core SDK integrated into your app to the latest version.
HMS Core SDKVersionLinkKeyringcom.huawei.hms:keyring-credential:6.4.0.302LinkLocation Kitcom.huawei.hms:location:6.4.0.300LinkNearby Servicecom.huawei.hms:nearby:6.4.0.300LinkContact Shieldcom.huawei.hms:contactshield:6.4.0.300LinkVideo Kitcom.huawei.hms:videokit-player:1.0.12.300LinkWireless kitcom.huawei.hms:wireless:6.4.0.202LinkFIDOcom.huawei.hms:fido-fido2:6.3.0.304
com.huawei.hms:fido-bioauthn:6.3.0.304
com.huawei.hms:fido-bioauthn-androidx:6.3.0.304LinkPanorama Kitcom.huawei.hms: panorama:5.0.2.308LinkPush Kitcom.huawei.hms: push:6.5.0.300LinkAccount Kitcom.huawei.hms:hwid:6.4.0.301LinkIdentity Kitcom.huawei.hms:identity:6.4.0.301LinkSafety Detectcom.huawei.hms:safetydetect:6.4.0.301LinkHealth Kitcom.huawei.hms:health:6.5.0.300LinkIn-App Purchasescom.huawei.hms:iap:6.4.0.301LinkML Kitcom.huawei.hms:ml-computer-vision-ocr:3.6.0.300
com.huawei.hms:ml-computer-vision-cloud:3.5.0.301
com.huawei.hms:ml-computer-card-icr-cn:3.5.0.300
com.huawei.hms:ml-computer-card-icr-vn:3.5.0.300
com.huawei.hms:ml-computer-card-bcr:3.5.0.300
com.huawei.hms:ml-computer-vision-formrecognition:3.5.0.302
com.huawei.hms:ml-computer-translate:3.6.0.312
com.huawei.hms:ml-computer-language-detection:3.6.0.312
com.huawei.hms:ml-computer-voice-asr:3.5.0.301
com.huawei.hms:ml-computer-voice-tts:3.6.0.300
com.huawei.hms:ml-computer-voice-aft:3.5.0.300
com.huawei.hms:ml-computer-voice-realtimetranscription:3.5.0.303
com.huawei.hms:ml-speech-semantics-sounddect-sdk:3.5.0.302
com.huawei.hms:ml-computer-vision-classification:3.5.0.302
com.huawei.hms:ml-computer-vision-object:3.5.0.307
com.huawei.hms:ml-computer-vision-segmentation:3.5.0.303
com.huawei.hms:ml-computer-vision-imagesuperresolution:3.5.0.301
com.huawei.hms:ml-computer-vision-documentskew:3.5.0.301
com.huawei.hms:ml-computer-vision-textimagesuperresolution:3.5.0.300
com.huawei.hms:ml-computer-vision-scenedetection:3.6.0.300
com.huawei.hms:ml-computer-vision-face:3.5.0.302
com.huawei.hms:ml-computer-vision-skeleton:3.5.0.300
com.huawei.hms:ml-computer-vision-livenessdetection:3.6.0.300
com.huawei.hms:ml-computer-vision-interactive-livenessdetection:3.6.0.301
com.huawei.hms:ml-computer-vision-handkeypoint:3.5.0.301
com.huawei.hms:ml-computer-vision-faceverify:3.6.0.301
com.huawei.hms:ml-nlp-textembedding:3.5.0.300
com.huawei.hms:ml-computer-ner:3.5.0.301
com.huawei.hms:ml-computer-model-executor:3.5.0.301LinkAnalytics Kitcom.huawei.hms:hianalytics:6.5.0.300LinkDynamic Tag Managercom.huawei.hms:dtm-api:6.5.0.300LinkSite Kitcom.huawei.hms:site:6.4.0.304LinkHEM Kitcom.huawei.hms:hemsdk:1.0.4.303LinkMap Kitcom.huawei.hms:maps:6.5.0.301LinkWallet Kitcom.huawei.hms:wallet:4.0.5.300LinkAwareness Kitcom.huawei.hms:awareness:3.1.0.302LinkCrashcom.huawei.agconnect:agconnect-crash:1.7.0.300LinkAPMcom.huawei.agconnect:agconnect-apms:1.5.2.310LinkAds Kitcom.huawei.hms:ads-prime:3.4.55.300LinkPaid Appscom.huawei.hms:drm:2.5.8.301LinkBasecom.huawei.hms:base:6.4.0.303
Required versions for cross-platform app development:
Platform: React Native
Plugin NameVersionLinkreact-native-hms-analytics6.3.2-301Linkreact-native-hms-iap6.4.0-301Linkreact-native-hms-location6.4.0-300Linkreact-native-hms-map6.3.1-304Linkreact-native-hms-push6.3.0-304Linkreact-native-hms-site6.4.0-300Linkreact-native-hms-nearby6.2.0-301Linkreact-native-hms-account6.4.0-301Linkreact-native-hms-ads13.4.54-300Linkreact-native-hms-adsprime13.4.54-300Linkreact-native-hms-availability6.4.0-303Link
Platform: Cordova (Ionic-Cordova Ionic-Capacitor)
Plugin NameVersionLinkcordova-plugin-hms-analytics
ionic-native-hms-analytics6.3.2-301Linkcordova-plugin-hms-location
ionic-native-hms-location6.4.0-300Linkcordova-plugin-hms-nearby
ionic-native-hms-nearby6.2.0-301Linkcordova-plugin-hms-account
ionic-native-hms-account6.4.0-301Linkcordova-plugin-hms-push
ionic-native-hms-push6.3.0-304Linkcordova-plugin-hms-site
ionic-native-hms-site6.4.0-300Linkcordova-plugin-hms-iap
ionic-native-hms-iap6.4.0-301Linkcordova-plugin-hms-availability
ionic-native-hms-availability6.4.0-303Linkcordova-plugin-hms-ads
ionic-native-hms-ads13.4.54-300Linkcordova-plugin-hms-adsprime
ionic-native-hms-adsprime13.4.54-300Linkcordova-plugin-hms-map
ionic-native-hms-map6.0.1-305Linkcordova-plugin-hms-ml
ionic-native-hms-ml2.0.5-303Link
Platform: Flutter
huawei_safetydetect6.4.0+301Linkhuawei_iap6.2.0+301Linkhuawei_health6.3.0+302Linkhuawei_fido6.3.0+304Linkhuawei_push6.3.0+304Linkhuawei_account6.4.0+301Linkhuawei_ads13.4.55+300Linkhuawei_analytics6.5.0+300Linkhuawei_map6.5.0+301Linkhuawei_hmsavailability6.4.0+303Linkhuawei_location6.0.0+303Linkhuawei_adsprime13.4.55+300Linkhuawei_ml3.2.0+301Linkhuawei_site6.0.1+304Link
Platform: Xamarin
Huawei.Hms.Hianalytics6.4.1.302LinkHuawei.Hms.Location6.4.0.300LinkHuawei.Hms.Nearby6.2.0.301LinkHuawei.Hms.Push6.3.0.304LinkHuawei.Hms.Site6.4.0.300LinkHuawei.Hms.Fido6.3.0.304LinkHuawei.Hms.Iap6.4.0.301LinkHuawei.Hms.Hwid6.4.0.301LinkHuawei.Hms.Ads-prime3.4.54.302LinkHuawei.Hms.Ads3.4.54.302LinkHuawei.Hms.Maps6.5.0.301Link
If you have any further questions or encounter any issues integrating any of these kits, please feel free to contact us.
RegionEmailEurope[email protected]Asia Pacific[email protected]Latin America[email protected]Middle East & Africa[email protected]wei.comRussia[email protected]
I have a somewhat strange problem and trying to describe it.
Currently I am on stock ROM 9.1.0.132
I am using Outlook and O365. When I log in to O365 account, the webview sends the useragent:
Browser: Mozilla/5.0 (Linux; Android 12; ANE-LX1 Build/HUAWEIANE-L21; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/107.0.5304.105 Mobile Safari/537.36 PKeyAuth/1.0
If Android "9" or if HUAWEI is in the text of the useragent my company blocks the access.
Some time ago I was using an EMUI ROM greater than 9.1.0.132 and I was able to change the text entry "HUAWEIANE-L21" in one of the build.props
Android "9" I was able to change to "12" (ro.build.version.release=12).
In Stock ROM 9.1.0.132, unfortunately I can't find "HUAWEIANE-L21" in the biuld.props anymore and I don't remember how I changed it back then.
Can someone please look in the build.props in /system and /vendor at Stock ROM > 9.1.0.132
Or does anyone have a tip, where the webview takes the useragent information from.
I'm on Magisk root and i dont want to update > 9.1.0.132
I found the solution in Magisk Module MagiskHideProps. If this module installed, the default /system/build.props will ignored.
Set "ro.build.id" by MagiskHideProps command in terminal -> "props ro.build.id Samsung" (Usage: props NAME VALUE)
https://github.com/Magisk-Modules-Repo/MagiskHidePropsConf/blob/master/README.md
This will change the default "ro.build.id=HUAWEIANE-L21" to ""ro.build.id=Samsung"
Can check by "getprop | grep ro.build.id
UserAgent is changed now.