Learning MSIXHERO To Create or Mod MSIX Applications - Windows 11

==================
MSIXHERO
==================​
Spoiler: WHAT IS IT?
Msixhero Is an Open Source MSIX Package Manager.
About - MSIX Hero
About MSIX Hero - the ultimate, freeware toolkit and a must-have utility for every MSIX packagers and system administrator.
msixhero.net
Spoiler: WHAT IS AN MSIX PACKAGE MANAGER?
This is a tool that will allow you to be able to create, pack, and sign your own MSIX bundles.
You could also use this tool to Edit an Existing Package like the android subsystem or any other app.
We will use WSA in this example~!
I am putting this up now so we can learn the commands to edit the MSIX bundle, windows subsystem for android,
in CLI~!
I will update when I figure out how to unpack and edit wsa using this tool~!
Peace and Love
<3
Spoiler: COMMAND LINE INTERFACE REFERENCE
Spoiler: SIGN
Signs one or more MSIX packages.
Spoiler: PARAMETERS
Spoiler: STOREMACHINE
--sm (as in StoreMachine)
Specifies that a machine store, instead of a user store, is used. This is a boolean switch, it does not have to be followed by any value. If omitted, the certificate will be looked up in the machine store. This switch makes only sense when combined with --sha1 value.
Spoiler: SHA1
--sha1 <thumbprint>
Selects the certificate based on its thumbprint value. May not be combined with –file.
Spoiler: FILE
--file <pfx-file>
The full path to PFX file used for signing. May not be combined with --sha1.
Spoiler: PASSWORD
--password <password>
Specifies the password for the selected PFX file. May not be combined with --sha1, requires that –file switch is used.
Spoiler: TIMESTAMP
--timestamp <timestamp-url>
The timestamp URL. Ensures that the package will be still signed, even if the original certificate is expired.
Spoiler: INCREASEVERSION
--increaseVersion Major|Minor|Build|Revision|None
Specifies, that the package version should be automatically increased by one when signing. By providing the value, you may choose which component should be increased. The default value (used when no switch is present) is None which means that the package version will stay the same after signing.
Spoiler: NOPUBLISHERUPDATE
--noPublisherUpdate
Prevents MSIX Hero from updating the publisher name. By default, the publisher name is taken from the certificate subject – both of them must be the same for the signing to succeed. If you want to control the publisher name on your own or have a granular error reporting in case of mismatches, use this switch. In case of a mismatch, an error will be reported.
Spoiler: DG
--dg (as in Device Guard)
Specifies that Device Guard Signing is to be used. The login will be performed interactively, that is in a pop-window that will be spawned after executing the command. This option should not be used for silent, unattended signing, because it will wait for a dialog to be confirmed by the user. This switch must not be combined with –dgf.
Spoiler: DGF
--dgf <file-path> (as in Device Guard File)
Specifies that Device Guard Signing is to be used. The JSON file path must contain valid access and refresh token, which you should create on your own using the technique outlined here: https://docs.microsoft.com/en-us/wi...ce-guard-signing#get-an-azure-ad-access-token. This switch must not be combined with –dg.
Spoiler: DGVL
--dgv1 (as in Device Guard V1)
Specifies that the DGSS v1 API will be used. Usage of V1 is not recommended because the API is obsolete and will be deprecated soon. This switch must be used together with –dg or –dgf.
Spoiler: DGP
--dgp <publisher-name> (as in Device Guard Publisher)
Specifies the name (publisher name) used for signing. If this parameter is omitted, MSIX Hero will determine the name for you. This option is recommended if you know the name, because signing without this switch requires an extra round trip to AzureAD and making a test signing. If this switch is used, you should make sure that the value matches the actual certificate subject, otherwise an error will be returned. This switch must be used together with –dg or –dgf. This switch has no effect if --noPublisherUpdate is used.
Signing an MSIX package (sign) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: PACK
Packs a folder of files, containing a manifest and creates MSIX package out of it.
Spoiler: PARAMETERS
Spoiler: NC
–nc (as in NoCompression)
Disables package compression. This is a boolean switch, it does not have to be followed by any value. If omitted, the package is going to be compressed using the default compression algorithm.
Spoiler: NV
–nv (as in NoValidation)
Disables the semantic validation. This is a boolean switch, it does not have to be followed by any value. If omitted, the package will not be validated for the full correctness of the manifest file. Using this switch is not recommended.
Creating an MSIX from a directory (pack) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: UNPACK
Unpacks an MSIX package to the specified folder.
Spoiler: EXAMPLE
MSIXHeroCLI.exe unpack --package <path-to-package.msix> --directory <extraction-path>
Unpacking a package (unpack) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: NEWCERT
Creates a new certificate for package signing (self-signed)
Spoiler: PARAMETERS
Spoiler: IMPORT
–import (-i)
If defined, the new certificate will be automatically imported to the Trusted People store. You must run MSIX Hero as an administrator in order to be able to use this switch. Otherwise, access denied error will be returned when trying to import the certificate.
Spoiler: VALIDUNTIL
–validUntil
The expiration date (in a format returned by default by Get-Date cmdlet). If not provided, one-year validity period will be used. Note that this option has been available since MSIX Hero 1.4.3.
Creating a new certificate for signing (newcert) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: TRUST
Imports a selected certificate (.cer/.pfx) or imports a certificate from a selected MSIX package to the Trusted People store.
Trusting a publisher (trust) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: APPATTACH
Creates VHD file from a selected MSIX package (for MSIX app attach).
Spoiler: PARAMETERS
Spoiler: CREATESCRIPTS
–createScripts (shorthand -c)
When defined, sample scripts for app attach (registering, staging, de-staging and de-registering) will be created and saved together in the directory, specified by the --directory (-d) switch. Four scripts will be created: stage.ps1, register.ps1, deregister.ps1 and destage.ps1.
Spoiler: FILETYPE
–fileType <vhd|vhdx|cim>
Declares the output format. The default value is VHD. This parameter is available in MSIX Hero 2.2 and newer.
Spoiler: EXTRACTCERT
–extractCert (shorthand -e)
When defined, the digital certificate will be extracted from the MSIX package and put in the directory, specified by the --directory (-d) switch. The name of the file will be the same as the name of the MSIX file or as the value of the optional parameter --name (-n).
Spoiler: SIZE
–size <#> (shorthand -s <#>)
Specifies the maximum dynamic size of VHD disk. If not set, MSIX Hero uses an optimal size, which ensures that the package fits and has a reasonable buffer. The size specified by this parameter should be expressed in megabytes. If you provide a value lower than the total size of expanded files, an error will be returned.
Spoiler: NAME
–name <X> (shorthand -n <X>)
By default, the names of the VHD file and the extracted certificate file (if switch --extractCert or -e was used) are equal to the name of the MSIX package. By providing this optional parameter you can choose the name you want.
Creating VHD for MSIX app attach (appattach) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: EDIT
Edits a package specified by the first argument.
Creates a new modification package.
Spoiler: PARAMETERS
Spoiler: PACKAGENAME
--packageName
The new package name. This must be a valid value, according to MSIX requirements.
Spoiler: PUBLISHER
--publisher
The new publisher name. This must be a valid DN string, for example CN=User, DN=domain, DN=local. Because the value may contain spaces, you should always enclose it with double quotes.
Spoiler: PACKAGEVERSION
--packageVersion <new-package-version-or-update-pattern>
The new package version, either as a full version string (for example 1.2.3.4) or a literal tag auto, which will increase the current version on its fourth position (for example, changing current version 1.2.3.4 to 1.2.3.5), or a pattern used to adapt the current package version. In the latter case, use * or x to take over the current value, and + or ^ to increase the current value by one. For example, using the following pattern *.*.+.0 would keep the major and minor version from the current value, increase the third position by one, and reset the fourth position to 0.
Spoiler: PROCESSORARCHITECTURE
--processorArchitecture <new-processor-architecture>
The new processor architecture, for example neutral or x64. This must be a valid value, according to MSIX requirements.
Spoiler: RESOURCEID
--resourceId <new-resource-id>
The new resource ID. This must be a valid value, according to MSIX requirements.
Editing a package (edit) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: NEWMODPACK
Spoiler: PARAMETERS
Spoiler: REGISTRY
–registry
Specifies the full path to a Windows Registry (.reg) file with extra registry keys and values that will be written to the new modification package.
Spoiler: FOLDER
–folder
Full path to a folder with files and subfolders that will be added to the root folder of the new modification package.
Spoiler: COPYFOLDERSTRUCTURE
–copyFolderStructure
This option is only valid if the parameter –parentPath is used AND the output path does not have .msix extension. If the parameter is present, MSIX Hero extracts the structure of VFS folder from the parent package and put it as a placeholder in a place relative to the newly created AppxManifest.xml.
Creating an MSIX Modification Package (newmodpack) - MSIX Hero
This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command…
msixhero.net
Spoiler: DOCUMENTATION
Spoiler: CREATING VHD FOR MSIX APP ATTACH
Creating VHD for MSIX app attach - MSIX Hero
Learn how to create VHD files for the purpose of WVD MSIX app attach with a freeware tool MSIX Hero, a must-have utility for MSIX packagers and administrators.
msixhero.net
Spoiler: SIGNING MSIX PACKAGES
How to sign MSIX packages? - MSIX Hero
Signing MSIX packages is easy with MSIX Hero. Just select a certificate (store or PFX) and let the program sign the app + adjust the manifest.
msixhero.net
Spoiler: SIGNING MSIX PACKAGES WITH DEVICE GUARD
Signing MSIX packages with Device Guard - MSIX Hero
MSIX Hero 1.5.0 can sign packages with Device Guard Signing Service. According to Microsoft: Device Guard signing is a Device Guard feature that is available in…
msixhero.net
Spoiler: VIEWING VIRTUAL REGISTRY KEYS FROM AN MSIX APP
Viewing virtual registry keys from an MSIX app - MSIX Hero
MSIX Hero mounts the registry file in order to make it browsable. Alternatively, start regedit in the package context to see the merged registry.
msixhero.net
Spoiler: PUBLISHING WINGET AND EDITING YAML FILES
Publishing to winget with MSIX Hero – Marcin Otorowski
marcinotorowski.com
Spoiler: UPDATE PACKAGES INSTALLED VIA APPINSTALLER FILE
Update packages installed via appinstaller file - MSIX Hero
What is app installer? App installer files (https://docs.microsoft.com/en-us/windows/msix/app-installer/app-installer-root) are a handy technique of a single-click installation of MSIX packages from any source (local, web), at…
msixhero.net
Spoiler: CREATING CERTIFICATE FOR MSIX SIGNING
Creating certificate for MSIX signing - MSIX Hero
Introduction to code signing All Windows 10 packages must be digitally signed so that they can be deployed. The process of signing requires, that the…
msixhero.net
A resource for gathering the Microsoft Store Application's MSIX Bundle, For Editing
https://store.rg-adguard.net/
Just paste in the store link, like for instance , if you want WSA's MSIX Bundle,
Get Windows Subsystem for Android™ with Amazon Appstore from the Microsoft Store
Windows Subsystem for Android™
www.microsoft.com
You would copy the link above, or your preffered app, then paste it on store.rg-adguard.net
Then, scroll all the way to the end of the list to extract the MSIX file...
Spoiler: MAKE A WORK FOLDER
For this case, we will go into C:\ and make a new folder called WSAMOD
We will add a folder called APP, and a Folder called UNPACK
Spoiler: LIKE THIS
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Then paste your MSIX package into the APP folder
Spoiler: LIKE THIS
Spoiler: LASTLY, EXTRACT THE MSIX BUNDLE WITH 7ZIP
IT WILL LOOK LIKE THIS
Spoiler: WHAT ARE WE LOOKING FOR?
DO NOT DECOMPILE FURTHER~! THIS IS JUST TO SHOW YOU WHAT'S IN THIS FILE
Spoiler: WHAT'S IN IT?
Spoiler: HERE'S THE APPXMANIFEST
Interesting~!
XML:
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5" xmlns:desktop8="http://schemas.microsoft.com/appx/manifest/desktop/windows10/8" xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap4="http://schemas.microsoft.com/appx/manifest/uap/windows10/4" xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2" xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10" xmlns:com2="http://schemas.microsoft.com/appx/manifest/com/windows10/2" xmlns:com3="http://schemas.microsoft.com/appx/manifest/com/windows10/3" IgnorableNamespaces="uap uap3 uap4 uap10 desktop desktop2 desktop6 rescap com com2 com3 desktop8 build">
<Identity Name="MicrosoftCorporationII.WindowsSubsystemForAndroid" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.8.32838.0" ProcessorArchitecture="x64" />
<Properties>
<DisplayName>ms-resource:WsaDisplayName</DisplayName>
<PublisherDisplayName>Microsoft Corp.</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
<desktop6:FileSystemWriteVirtualization>disabled</desktop6:FileSystemWriteVirtualization>
<desktop6:RegistryWriteVirtualization>disabled</desktop6:RegistryWriteVirtualization>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.120" MaxVersionTested="10.0.22000.120" />
<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.30035.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.UI.Xaml.2.6" MinVersion="2.62108.18004.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00" MinVersion="14.0.30035.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="EN-US" />
<Resource Language="EN-GB" />
<Resource uap:Scale="200" />
</Resources>
<Applications>
<Application Id="App" Executable="WsaClient\WsaClient.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="ms-resource:WsaDisplayName" Description="ms-resource:WsaDescription" BackgroundColor="transparent" Square150x150Logo="Images\MedTile.png" Square44x44Logo="Images\AppList.png" AppListEntry="none">
<uap:DefaultTile Wide310x150Logo="Images\WideTile.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" />
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<desktop:Extension Category="windows.toastNotificationActivation">
<desktop:ToastNotificationActivation ToastActivatorCLSID="18AF5090-C390-45D6-9FF1-CA3E608503B0" />
</desktop:Extension>
<uap:Extension Category="windows.protocol">
<uap3:protocol Name="wsa" Parameters="/launch %1" />
</uap:Extension>
<uap:Extension Category="windows.protocol">
<uap3:protocol Name="wsa-client" Parameters="/deeplink %1" />
</uap:Extension>
<uap5:Extension Category="windows.startupTask" uap10:parameters="/restart 0">
<uap5:StartupTask TaskId="PrelaunchVirtualMachine" Enabled="false" />
</uap5:Extension>
<uap3:Extension Category="windows.appExecutionAlias">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="WsaClient.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
<com2:Extension Category="windows.comServer">
<com2:ComServer>
<com3:ServiceServer ServiceName="WsaService" LaunchAndActivationPermission="O:SYG:SYD:(A;;11;;;IU)">
<com3:Class Id="D738F5F3-7527-4DD6-BA47-D75688104C46" DisplayName="CLSID_WsaServer" />
</com3:ServiceServer>
<com:ExeServer Executable="WsaClient\WsaClient.exe">
<com:Class Id="18AF5090-C390-45D6-9FF1-CA3E608503B0" DisplayName="CLSID_WsaToastActivator" />
<com:Class Id="df32c7a1-a920-458d-a5c5-0e627f222be9" DisplayName="CLSID_WsaWnsRefreshHandler" />
<com:Class Id="5c3e8567-7095-47c0-98e5-1d196ffcc857" DisplayName="CLSID_WsaWnsPushHandler" />
</com:ExeServer>
<com:SurrogateServer DisplayName="WslDeviceHost_VirtioFs" AppId="58AC9971-23C7-45EA-933F-7B155AA16FC2">
<com:Class Id="5a918e2f-d58a-48d9-be09-36ea1615a7f2" Path="wsldevicehost.dll" ThreadingModel="Both" />
</com:SurrogateServer>
<com:SurrogateServer DisplayName="WslDeviceHost_VirtioFsNoTelem" AppId="d5f8fb32-5694-4d90-9247-0e2bef84489d">
<com:Class Id="9ad48ff0-bd99-41a0-8d93-903239e9d617" Path="wsldevicehost.dll" ThreadingModel="Both" />
</com:SurrogateServer>
<com:SurrogateServer DisplayName="WslDeviceHost_VirtioPmem" AppId="5F30756B-EE0F-4F44-991D-0D51493AF284">
<com:Class Id="BF8A4ADD-EC57-4C12-BB29-263A2DA959B1" Path="wsldevicehost.dll" ThreadingModel="Both" />
</com:SurrogateServer>
<com:SurrogateServer DisplayName="WslDeviceHost_VirtioPmemNoTelem" AppId="a0bfe2b6-75f0-4d35-833c-b5ead384e1ac">
<com:Class Id="0d391720-9780-4575-88ff-bb89716b081f" Path="wsldevicehost.dll" ThreadingModel="Both" />
</com:SurrogateServer>
<com:ExeServer Executable="WsaClient\WsaClient.exe" LaunchAndActivationPermission="O:SYG:SYD:(A;;11;;;IU)(A;;9;;;S-1-15-2-4120862662-1149765626-4064695116-299589112-4208539117-2961988684-1460418210)S:(ML;;NX;;;ME)">
<com:Class Id="286DD941-F692-41ED-A20D-8E8AA9181B10" DisplayName="CLSID_WsaClient" />
</com:ExeServer>
<com:ExeServer Executable="WsaSettingsBroker\WsaSettingsBroker.exe" LaunchAndActivationPermission="O:SYG:SYD:(A;;11;;;IU)(A;;11;;;S-1-15-2-4120862662-1149765626-4064695116-299589112-4208539117-2961988684-1460418210)S:(ML;;NX;;;ME)">
<com:Class Id="92E5D48B-DD18-4339-884F-D6087F81E797" DisplayName="CLSID_WsaSettingsBroker" />
</com:ExeServer>
</com2:ComServer>
</com2:Extension>
<com2:Extension Category="windows.comInterface">
<com2:ComInterface>
<com:Interface Id="C6415BE5-A445-4E28-A0C8-E64B5CE27534" ProxyStubClsid="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B" />
<com:Interface Id="5B40E367-7419-4130-A4F2-A7C5B02DC9A5" ProxyStubClsid="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B" />
<com:Interface Id="6A0E8133-9C70-4193-821F-A6FF231D5665" ProxyStubClsid="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B" />
<com:Interface Id="3C80B0C2-966E-4AC8-BA88-793970E0650B" ProxyStubClsid="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B" />
<com:proxyStub Id="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B" Path="WsaProxy\WsaProxy.dll" />
</com2:ComInterface>
</com2:Extension>
<desktop6:Extension Category="windows.service" Executable="WsaService\WsaService.exe" EntryPoint="Windows.FullTrustApplication"><desktop6:Service Name="WsaService" StartupType="manual" StartAccount="localSystem" /></desktop6:Extension></Extensions>
</Application>
<Application Id="SettingsApp" Executable="WsaSettings.exe" EntryPoint="WsaSettings.App">
<uap:VisualElements DisplayName="ms-resource:WsaSettingsDisplayName" Description="ms-resource:WsaSettingsDescription" Square150x150Logo="Images\MedTile.png" Square44x44Logo="Images\AppList.png" BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Images\WideTile.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" />
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol">
<uap3:protocol Name="wsa-settings" />
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Extensions>
<desktop6:Extension Category="windows.customInstall">
<desktop6:CustomInstall Folder="CustomInstall" desktop8:RunAsUser="true">
<desktop6:RepairActions>
<desktop6:RepairAction File="WsaSetup.exe" Name="Repair" Arguments="repair" />
</desktop6:RepairActions>
<desktop6:UninstallActions>
<desktop6:UninstallAction File="WsaSetup.exe" Name="Uninstall" Arguments="uninstall" />
</desktop6:UninstallActions>
</desktop6:CustomInstall>
</desktop6:Extension>
<Extension Category="windows.activatableClass.proxyStub">
<ProxyStub ClassId="76913B52-F9EB-4FAE-8DE7-24C20BDCF37B">
<Path>WsaProxy\WsaProxy.dll</Path>
<Interface Name="IWsaClient" InterfaceId="A7170AB5-15F2-48BF-B2A3-2F08AA4A9DCC" />
</ProxyStub>
</Extension>
<desktop2:Extension Category="windows.firewallRules">
<desktop2:FirewallRules Executable="WsaClient\WsaClient.exe">
<desktop2:Rule Direction="in" IPProtocol="TCP" LocalPortMin="58526" LocalPortMax="58526" Profile="private" />
</desktop2:FirewallRules>
</desktop2:Extension>
</Extensions>
<build:Metadata>
<build:Item Name="cl.exe" Version="19.29.30139.0 built by: vcwrkspc" />
<build:Item Name="CodeSharingProject" Value="248F659F-DAC5-46E8-AC09-60EC9FC95053" />
<build:Item Name="VisualStudio" Version="16.0" />
<build:Item Name="OperatingSystem" Version="10.0.17763.1 (WinBuild.160101.0800)" />
<build:Item Name="Microsoft.Build.AppxPackage.dll" Version="16.0.31910.33" />
<build:Item Name="ProjectGUID" Value="a2be7e6a-792a-4530-8614-bc091a63d7bb" />
<build:Item Name="OptimizingToolset" Value="None" />
<build:Item Name="TargetRuntime" Value="Native" />
<build:Item Name="Microsoft.Windows.UI.Xaml.Build.Tasks.dll" Version="0.0.0.0" />
<build:Item Name="WindowsDesktop" Version="10.0.22000.0" />
<build:Item Name="MakePri.exe" Version="10.0.22000.194 (WinBuild.160101.0800)" />
<build:Item Name="Microsoft.Build.DesktopBridge.Tasks.dll" Version="4.6.30319.200" />
<build:Item Name="TargetFrameworkMoniker" Value=".NETFramework,Version=v4.5.1" />
</build:Metadata>
<mp:phoneIdentity PhoneProductId="dd5d7f57-f9ab-4533-8aa3-8b7325addf8a" PhonePublisherId="d949d1ab-24a8-4463-9586-acee62f6de38" />
<Capabilities><Capability Name="internetClient" /><Capability Name="internetClientServer" /><Capability Name="codeGeneration" /><uap:Capability Name="sharedUserCertificates" /><uap:Capability Name="removableStorage" /><uap4:Capability Name="userDataTasks" /><rescap:Capability Name="localSystemServices" /><rescap:Capability Name="packagedServices" /><rescap:Capability Name="runFullTrust" /><rescap:Capability Name="unvirtualizedResources" /><rescap:Capability Name="packageManagement" /><rescap:Capability Name="packageQuery" /><rescap:Capability Name="customInstallActions" /><rescap:Capability Name="allowElevation" /><uap4:CustomCapability Name="Microsoft.classicAppInstaller_8wekyb3d8bbwe" /></Capabilities></Package>
OKAY~! So what did I learn?
WSA is stupid if you aren't running a buisness that relies on the emulator's high encryption standards. The emulator can absolutely be cracked with MSIXHERO, But the process to do so is silly and not trivial.
The best Idea is to build Our Own Emulator, with Android Studio~! I will teach you how in another thread~!
Spoiler: GET ANDROID STUDIO, IF YOU NEED IT
You will need Android Studio~! For the remainder of my tutorials, I will be using Chocolatey Packages.
To install, paste into a terminal:
choco install androidstudio
Spoiler: LEARN CHOCOLATEY
How To Use Chocolatey
========================= ============================================ HOW TO USE CHOCOLATEY ============== ============= Hi Friends~! This amazing package manager changed my Windoz life
forum.xda-developers.com
PITFALLS~! TO KNOWLEDGE~!

I have to say, Android Studio's emulators have gotten significantly better in the last 6 years.. haha
Spoiler: AVD
are we learning how to just bypass All these Corporate Emulators? Tee Hee IDK what I am doing. We will see~!
Apparently Android Studio Uses QEMU to create it's emulators~! I keep hearing good things about QEMU but I am not smart enough to program it yet x.x

Apparently We can run CalyxOs in Android Studio~!
Lol this dissembling of WSA may be STUPID~! If we can just make our own~!
-----EDIT...
I OFFICIALLY DEEM THIS PROJECT TOO STUPID TO CARRY ON~! WHEN WE CAN MAKE OUR OWN <3
How To Build Your Own Android Emulator~!
========================= ===================== BUILDING OUR OWN ANDROID EMULATOR ============================= ============================= Hello Friends~! Today I will be walking you through building Your Own Android Emulator Using Android...
forum.xda-developers.com

Related

how to make a mui file for application

I want to make a chinese mui file for application,how to do it?
you can do it with a resource editor like resource hacker but you must have the mui in english
i think it's th e good answer but i'm a newbee on the subject
I have the english mui,and I use the resource editor edit the language option,but the mui file cannot work.
then i think it's necessary to sign your new mui but i never do this so i can't explain
if somone can confirm please
sam
I have tried to get someone to answer this question but it seems to me like no one can do this on XDA forum Because me to want to translate the mui file for TouchFlo2D.
Have tried a couple of things but nothing works when using the mui file on the device.
So if there's anyone who can do this, please explain where to start...
ToddeSwe
Hi i had a similar problem with the dll i was trying to modify but i cracked it in the end with a few tools lucky for you schreda has brought them all to one place so i hope this will help your situation
Now I found a way to Edit DLL, EXE, MUI and all other files for WM5 and WM6!
I ever had problems with the Signature in the Files bur now i have the Solution!
Click to expand...
Click to collapse
here:
http://forum.xda-developers.com/showthread.php?t=432041
Also some languages already done here:
http://forum.xda-developers.com/showthread.php?t=432965
when yu want to make one at youre own,, take a look at http://msdn.microsoft.com/en-us/library/ms776216(VS.85).aspx
Using MUIRCT to Build Resources
MUIRCT (Muirct.exe) is a command-line utility for splitting a standard Win32 portable executable file into a language-neutral (LN) file and a .mui file containing language-specific Win32 resources. Each of the resulting files contains resource configuration data that associates the files. MUIRCT is included in the Microsoft Windows SDK for Windows Vista.
Placing Win32 MUI Resource Files
A typical MUI application that uses Win32 MUI resource configuration consists of an LN file and language-specific resource (.mui) files . This topic discusses the placing of resource files on the target computer for optimal use by the application loading logic and the resource loader.
Loading Win32 MUI Resource Files
This topic discusses the loading of user interface resources on Windows Vista and on pre-Windows Vista operating systems. For an MUI application targeted at Windows Vista, the Windows Vista resource loading functions contain the proper logic to retrieve the correct language resources in the language-specific resource (.mui) files at runtime. However, the Windows Vista resource loading technology does not exist on pre-Windows Vista operating systems. Therefore, you must modify your MUI application code to load the appropriate resources on such an operating system.
The MUILoad library furnished by the Microsoft Windows SDK for Windows Vista includes the LoadMUILibrary and FreeMUILibrary functions. These functions can be used by your MUI applications targeted at either Windows Vista or a pre-Windows Vista operating system to load and unload resources based on operating system user interface settings. The LoadMUILibrary function returns a handle to the appropriate language-specific files based on operating system user interface language settings, and the FreeMUILibrary function closes the handle. The fallback priority used in LoadMUILibrary is user UI language, followed by system UI language and system default UI language. If the function cannot find an LN file in these languages, it returns the handle of the .mui file located in the same folder as the code .dll. If the .mui file does not exist either, the function returns a handle to the binary file that contains the code.
Note: MUILoad library functions are based on the assumption that the MUI application uses Win32 MUI resource configuration. If your application uses another resource technology, it must implement its own approach to loading resources.
Note: Because a particular user's language preferences might include languages that are not supported by your MUI application, the application should always handle these languages by loading the appropriate fallback resources.
Loading Win32 MUI Resources on Windows Vista Only
Using RC Compiler to Build Resources
RC Compiler (Rc.exe) is a command-line utility for compiling a resource definition script file (.rc extension) into resource files (.res extension). RC Compiler is included in the Windows SDK. This document explains the use of RC Compiler with MUI-related capabilities of the resource loader introduced in Windows Vista. For complete information about the compiler, see About Resource Files .
RC Compiler allows you to build, from a single set of sources, an LN file and a separate .mui file containing language-specific Win32 resources. The resulting LN file and .mui file each contain resource configuration data, which associates the two files with each other.
Windows Vista supports two ways to build an LN file-.mui file pair. One technique, described here, is to use the RC compiler. The other technique is to use MUIRCT.
Preparing a Resource Configuration File
This topic describes the preparation of a resource configuration file, used in Win32 MUI resource configuration to associate resource configuration data in an LN file with that in the associated .mui files. The resource configuration file is a public, human-readable XML file.
The RC Compiler and the MUIRCT utility both provide mechanisms for building an LN file and associated .mui file. Each utility has an optional command line switch that allows you to specify a resource configuration file. Use of the file allows more control over the splitting of resources than can be obtained using the regular command line switches of these utilities. However, even if you do not provide a resource configuration file as an input, the LN and .mui files contain resource configuration data.
This topic focuses on the aspects of the XML schema that are useful in building Win32 unmanaged code using Windows Vista. In particular, it is only concerned with the behavior of the win32Resources element. All resource configuration files for Win32 applications begin and end identically:
<?xml version="1.0" encoding="utf-8"?>
<localization>
<resources>
<!-- a single win32Resources element goes here -->
</resources>
</localization>
so take a look on http://msdn.microsoft.com/en-us/library/aa365064(VS.85).aspx
good luck

Earn money from your huge uninsall

[Appjolt] Get money from uninstalls
Hello everybody, I just found a system allow you earn money from uninstalls, this is Appjolt, show advertisements when user uninstall your app. Sound’s good, right? I will guide you in detail:
1. Register your account with this link:
https://admin.appjolt.com/Landings/Monetize?rf=6F/+V7zzEdpJM73Iydu0EQ==
You will have 50$ in your account. The minium money to withdraw is 100$. You can use your paypal or bank account.
2. Download SDK in Android SDK or iOs SDK, it has unity plugin for android and ios, just 200kb
3. In Applications, click +Add Application
4. After submited your app, click +Add Campain to creat a campain (4 type):
- Monetize: show advertisements
- Winback: offer the user to re-install your app and win a prize (gem, gold, virtual item or something real)
- Cross Promote: present your another app
- Survey: asking the user why they are uninstalling your app
5. Analyze uninstall: mixpanel, omniata, appsee, coolaData
Example with Mixpanel, you register an Mixpanel account and copy the Token and paste to appjolt
6. Import Appjolt plugin to your unity game
- The first step of the integration is to import the appjolt Unity package. To do so, simply drag and drop Appjolt.unitypackage into the assets folder of your project in the Unity editor, and the following window will come up, Make sure all the resources are selected and press import:
- The next step is to add a GameObject to any scene that will integrated with Appjolt. To do so, create a new GameObject in the root of the scene’s hierarchy and rename it to “Appjolt”. Next, add an existing script component to the new Appjolt GameObject, select the AppjoltUnity.cs
script from your scripts. Your scene editor should then be configured to and look similar to the following screenshot:
Now, whenever you’ll need to call Appjolt in a Unity scene, to access the SDK’s main object, use the following code:
appjoltUnity = GameObject.Find ("Appjolt").GetComponent<AppjoltUnity> ();
That’s it. Your project’s now set up with Appjolt, now all that’s left is to implement specific
features.
End User License Agreement
(EULA)
We find great importance being in compliance with Google Play Developer Program Policies
If you are operating within Google's Play store and interacting with ads out of your application, it requires the user's consent in a form of an EULA. In the context of our service, if you're using Monetize or Ad
-Based Winback/Cross
-Promotion campaigns, please add the following code to your main menu or splash screen:
if (appjoltUnity.isGooglePlayInstall()) {
appjoltUnity.showEULA();
}
- Android manifest:
<!-- Appjolt - Required -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<!-- Appjolt - Highly Recommended (Guaranteed $10 CPM US)-->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Trong tag <Application>
<!-- Appjolt -->
<!-- Appjolt Activity -->
<activity android:name="com.appjolt.sdk.AppjoltActivity"
android:taskAffinity="com.appjolt.sdk.twentyeight"
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="false"/>
<!-- Appjolt Service -->
<service
android:name="com.appjolt.sdk.AppjoltService"
android:enabled="true"
androidrocess=":appjolt"
android:exported="true" />
<!-- Appjolt BOOT receiver -->
<receiver
android:name="com.appjolt.sdk.AppjoltReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
</receiver>
So simple. And now, lets earn money from the huge uninstall.
Cheers,

Windows Appx Tools

This is Windows Studios Package Installer/Packager! It has the option to make advanced Certificates tht allow Server/Client Authentication diable early driver enforcement and can be used to bypass intnded security features Windows has made and is still making. CHECK THE CERTIFICATES PURPOSES for option you use and do not Use!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
https://drive.google.com/open?id=1MMdLcHTlbtQ3D7-OXY5_XpXoI-rzshAoEQ[/IMG
===================================================================================
Step 1 Obtaining access to Appx Folder
===================================================================================
-Put Tools in your Documents folder or it will not run without changing the RUME.bat
-Open Program files folder
-Type WindowsApps
-Click Security on Pop up
-Click General uncheck hidden
-Click Security Advanced
-Change Owner at top from trusted installer to USER account
-Click Advanced Find Now (User account)
-Click Apply
-Wait then Click Ok
-in Program Files Folder Type WindowsApps
-Click the back button
-Right Click Properties General Uncheck Hidden
-Customize Change Icon
==================================================================================
Step 2 Making Certificate and Directories for Certificates made.
==================================================================================
Go to program files make sure Windows Apps is visible (FOLDERDIR used to be C:\Program Files/Windows/Apps/WindowsApps)
Open and Copy all folders to documents Tools Appx ORINGINAL-APPX folder
-Win R notepad
-Copy Appx folder name to Notepad do not save
-open ORIGINAL-APPX folder name you put in notepad
-Copy all
-go to Tools/Appx (root)
-go to x64/NewAppx/Appx
-Paste contents there
-Copy reources.pri
-Paste resources.pri in x64/NewAppx/PRIdump
(these are the resources for verifiying the appx Container during Compiliation of Appx)
-go to root Click RunMe.bat
-Make certificate
-no password (use encrypt option) .der extended Attributes ^READTOP^
-make pvk-pfx no password
-Save as .PFX not .pk8
Check x64 folder for .cer .pvk .pfx SHould be Labeled Windows *(Check bottom Step 5 Certifcate error for Edit bat Certain Appxs need a certificate made with different certificate names simple fix)*
===================================================================================
Step 3 Importing Certificates to Microsoft Management Console MMC
===================================================================================
[IMG]https://drive.google.com/open?id=1HyLtvp5HBUkrIu6f1qpqgqgzk1AbXrAXeQ
-Win R MMC
-Click enter
-Click file new snapin
-Check Certificates, Event viewer, Ip Security Monitor
-Click advanced Allow Parent Snapin Changing (allows snapin to Run configuration without mmc open and changes through Cmd/Powershell(I suggest Setting Firewall dissallowing remote connections to mmc, explorer, regedit, regserver, Dism ect. NTS0Kernel((System) dont forget about object types OTHER is garbage .visx Due to ^Step above^)
-Make one for Local Computer and User
-Do Local first
-Click Certificates Personal Certidficates
-Right click whitespace alltask>import
-go to tools/appx/x64 import .cer
-repeat and import all files .ext Windows.pfx
-Click WhiteSpace refresh Should be a little key and New certificate above certificate.
-Right CLick Certificate Properties Enable only the Following Purposes needed -Windows Store -Signing -Autentication ect
(Make Extended certificates to correlate with Windows Authentication to Windows if needed with Password same as Login Password)
-Right Click on that certificate Copy and paste in Following dirs for LOCALCOMPUTER
-Trusted Root (may Prompt an Overwrite of the Original Windows Certificate) Export current Cert if needed for reimport
-Enterprise
-Trusted Publisher
-Client Authenication
-Trusted Devices
-Windows Live Token *
- Refresh after each paste for PFX to show correlating certificate
-Save
-again with User account
-Save
Now you can sign Appxs with windows signature or Appx Signature
==============================================================================================
Step 4 RUNME.bat and funtionality
==============================================================================================
this tool is not completly finished
allows compilation, unpack, encryption, decryption of any APPX. Allows editing of Contents as well as new resource files for modified Appxs or System apps Under Windows Folder. Some features do not work as they need to be edited.
========================================================================================
=======================================================================================
@ECHO %USERNAME% AppxTools!
:INTRO_SW
echo _______________________________________________________________________________
echo ----------------------------------------------------------------------------
echo Welcome, %USERNAME% AppxTools!
echo ----------------------------------------------------------------------------
echo
echo 1=MakeAppx
echo 2=Makecert
echo 3=pvk2pfx
echo 4=signtool
echo 5=Encrypt
echo 6=Decrypt
echo _____________________________________________________________________________
1 makes extracts appx
--does disable language verification while making Appx
2 Certificates
--Makes Advanced Purposes Certificates (can be used on Androids)
3 Pvk2pfx
--Makes certificate pvk and Pfx for signing
4 Signtool
--Signs Appx with certificate after matching MMC certificate installation/import
5 Encrypt
--Encrypts Package after signing
6 Decrypt
--Decrypts Package
=======================================================================================
Commands for installing/Removing Appxs
=======================================================================================
get-AppxPackage
--List all installed Appxs and Certificates
add-AppxPackage
--Installs Appx Package
remove-AppxPacakge
--Removes/Uninstalls Appx Package
You have to use Powershell or Powershell_Ise to install/remove Appxs
--If its allready installed you need to uninstall it before installing
=======================================================================================
Win R Powershell_Ise enter
needs to be ran as Admin (win x task manager running process right click open file location or open process open file location (Make a shortcut properties Advanced run as Admin)
cd /
cd C:\%USERNAME%\Documents\Tools\Appx\x64 add-AppxPackage NEWPackage.appx
=======================================================================================
Step 5 Checking Appx Certificate and Certificate Editing in RunMe.bat
=======================================================================================
Some packages you sign will recieve and error untill you remake them
-Appx\NewAppx\Appx
-right click AppxAminifest
-click edit
-find PackageDependency Name= VLIBS
-Copy " " Certificate Name
-Appx (root Folder)
-edit RUNME.bat
-scroll down to :MAKEcert
-replace all 256 512 SHA1
-I suggest Labeleing Certs PVKs and PFX Check SHA folder and saving them
-Import to MMC then resign and install
========================================================================================
Fairly quick way of editing Appxs Assests ect I suggest installing Visual Studio
mediafire.com
/file/jjlp81s4ujkp5sy/Appx-Tools-2017.7z

How to implement High-Speed, Data-Free File Transmission between Smart Devices?

Introduction
When you integrate Nearby Service into your apps, they'll be able to transmit files between smart devices without using mobile data. The service uses Huawei's own protocols, and the integration process is quick and easy.
Many mobile apps need to transmit files between devices. Social networking apps transmit images, files, and chat records; file management apps transmit files, data backups, and cloned phone data; and audio and video apps transmit songs and videos. To achieve this, these apps have to rely on web disks and cloud servers, which means users have to either use their own mobile data or be connected to Wi-Fi. Previously, implementing near-field data transmissions backed by Bluetooth or Wi-Fi required complex network protocols and hardware devices, and the transmission rate was average. Now, thanks to Nearby Service, this is easier and more effective than ever.
Advantages of Using Nearby Service
1. Easy integration: You only need two file transmission APIs to integrate Nearby Service, and it doesn't require any complex network protocols.
2. Ultra-fast transmission: It achieves file transmission rate of up to 60 MB/s, so transmitting a 1 GB file takes only 20 seconds.
3. Offline transmission: Nearby Service doesn't require routers or any other network devices. Data is transmitted through Bluetooth and Wi-Fi, so it doesn't consume the user's mobile data.
4. Platform support: The service supports all Android platforms, and will work with other platforms soon.
Demo (NearbyTransfer)
Here, take NearbyTransfer as an example. You can see how NearbyTransfer uses QR codes to transmit files between devices. NearbyTransfer has integrated with Nearby Service and Scan Kit.
NearbyTransfer Development
You can find the open source code for NearbyTransfer on GitHub.
Now, I'll show you how to create the demo based on the source code, so that you can better understand the implementation process.
Preparations
Tools
1. Two Huawei phones (recommended)
2. Android Studio (3.X or later)
Register as a Developer
Register as a Huawei developer.
Create an App
Create an app on Huawei AppGallery. For details, please refer to HUAWEI Developers-App Development.
Create a Demo
• Import the source code to Android Studio (3.X or Later).
• Download the agconnect-services.json file for the new demo, and save it on your local computer in the app directory (\app) of the sample code.
Run the Demo
3. Install the demo on test devices A and B.
4. Tap Send File on device A and select the file you want to transmit. A QR code will be generated.
5. Tap Receive File on device B.
6. Wait until the file transmission is complete.
Let's see the demo effect!
https://www.reddit.com/r/HMSCore/comments/jj1o9z/how_to_implement_highspeed_datafree_file/
Code Development
Add Huawei Maven Repository to the Project-Level build.gradle File of Your Project
Add the following Maven address to the build.gradle file in the root directory of your Android Studio project:
HTML:
buildscript {
repositories {
maven { url 'http://developer.huawei.com/repo/'}
} }allprojects {
repositories {
maven { url 'http://developer.huawei.com/repo/'}
}}
Add SDK Dependencies to the App-Level build.gradle File
HTML:
dependencies {
implementation 'com.huawei.hms:nearby:5.0.2.300'
implementation 'com.huawei.hms:scan:1.2.3.300'
}
Declare the System Permission in the AndroidManifest.xml File
Nearby Service is implemented based on Bluetooth, Wi-Fi, storage, and location information, so the corresponding permissions need to be declared. (The barcode scanning permission is to be added.)
HTML:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!--Camera permission-->
<uses-permission android:name="android.permission.CAMERA" />
The ACCESS_FINE_LOCATION, WRITE_EXTERNAL_STORAGE, and READ_EXTERNAL_STORAGE permissions are dangerous system permissions, so you need to apply for them dynamically. If your app does not have these permissions, Nearby Service will not let it broadcast or scan.
Key Code
Main code path: com\huawei\hms\simpleNearbyDemo\MainActivity.java
If you want to integrate Nearby Service's file transmission function, take MainActivity for reference and integrate nearbyAgent.sendFile() and nearbyAgent.receiveFile() into your app.
1. Sending a file.
The sender selects a file and calls nearbyAgent.sendFile(uri) to send the file.
[HTML @override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case FILE_SELECT_CODE:
if (resultCode == RESULT_OK) {
// Get the URI of the selected file.
Uri uri = data.getData();
nearbyAgent.sendFile(uri);
}
break;
case NearbyAgent.REQUEST_CODE_SCAN_ONE:
nearbyAgent.onScanResult(data);
default:
break;
}
super.onActivityResult(requestCode, resultCode, data);
}
[/HTML]
2. Receiving a file.
The receiver calls nearbyAgent.onScanResult(data) to receive a file.
HTML:
recvBtn.setOnClickListener(new View.OnClickListener() {
[user=439709]@override[/user]
public void onClick(View v) {
nearbyAgent.receiveFile();
}
});
References
Official Huawei Developers website:
https://developer.huawei.com/consumer/en/hms/huawei-pushkit
Development Guide:
https://developer.huawei.com/consum...-Guides/service-introduction-0000001050040060
Official HMS Core community on Reddit:
https://www.reddit.com/r/HuaweiDevelopers/
Demo and sample code:
https://github.com/HMS-Core
Discussions on Stack Overflow:
https://stackoverflow.com/questions/tagged/huawei-mobile-services?tab=Newest
If you have any needs or suggestions, please contact us:
[email protected]

Beginner: Integration of Text Translation feature in Education apps (Huawei ML Kit-React Native)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Overview
Translation service can translate text from the source language into the target language. It supports online and offline translation.
In this article, I will show how user can understand the text using ML Kit Plugin.
The text translation service can be widely used in scenarios where translation between different languages is required.
For example, travel apps can integrate this service to translate road signs or menus in other languages to tourists' native languages, providing those considerate services; educational apps can integrate this service to eliminate language barriers, make content more accessible, and improve learning efficiency. In addition, the service supports offline translation, allowing users to easily use the translation service even if the network is not available.
Create Project in Huawei Developer Console
Before you start developing an app, configure app information in App Gallery Connect.
Register as a Developer
Before you get started, you must register as a Huawei developer and complete identity verification on HUAWEI Developers. For details, refer to Registration and Verification.
Create an App
Follow the instructions to create an app Creating an App Gallery Connect Project and Adding an App to the Project. Set the data storage location to Germany.
React Native setup
Requirements
Huawei phone with HMS 4.0.0.300 or later.
React Native environment with Android Studio, NodeJs and Visual Studio code.
Dependencies
Gradle Version: 6.3
Gradle Plugin Version: 3.5.2
React-native-hms-ml gradle dependency
React Native CLI: 2.0.1
1. Environment set up, refer below link.
2. Create project using below command.
Code:
react-native init project name
3. You can install react native command line interface on npm, using the install -g react-native-cli command as shown below.
Code:
npm install –g react-native-cli
Generating a Signing Certificate Fingerprint
Signing certificate fingerprint is required to authenticate your app to Huawei Mobile Services. Make sure JDK is installed. To create one, navigate to JDK directory’s bin folder and open a terminal in this directory. Execute the following command:
Code:
keytool -genkey -keystore <application_project_dir>\android\app\<signing_certificate_fingerprint_filename>.jks -storepass <store_password> -alias <alias> -keypass <key_password> -keysize 2048 -keyalg RSA -validity 36500
This command creates the keystore file in application_project_dir/android/app
The next step is obtain the SHA256 key which is needed for authenticating your app to Huawei services, for the key store file. To obtain it, enter following command in terminal:
Code:
keytool -list -v -keystore <application_project_dir>\android\app\<signing_certificate_fingerprint_filename>.jks
After an authentication, the SHA256 key will be revealed as shown below.
Adding SHA256 Key to the Huawei project in App Gallery
Copy the SHA256 key and visit AppGalleryConnect/ <your_ML_project>/General Information. Paste it to the field SHA-256 certificate fingerprint.
Enable the ML kit from ManageAPIs.
Download the agconnect-services.json from App Gallery and place the file in android/app directory from your React Native Project.
Follow the steps to integrate the ML plugin to your React Native Application.
Integrate the Hms-ML plugin
Code:
npm i @hmscore/react-native-hms-ml
Download the Plugin from the Download Link
Download ReactNative ML Plugin under node_modules/@hmscore of your React Native project, as shown in the directory tree below:
Code:
project-dir
|_ node_modules
|_ ...
|_ @hmscore
|_ ...
|_ react-native-hms-ml
|_ ...
|_ ...
Navigate to android/app/build.gradle directory in your React Native project. Follow the steps:
Add the AGC Plugin dependency
Code:
apply plugin: 'com.huawei.agconnect'
Add to dependencies in android/app/build.gradle:
Code:
implementation project(':react-native-hms-ml')
Navigate to App level android/build.gradle directory in your React Native project. Follow the steps:
Add to buildscript/repositories
Code:
maven {url 'http://developer.huawei.com/repo/'}
Add to buildscript/dependencies
Code:
classpath 'com.huawei.agconnect:agcp:1.3.1.300')
Navigate to android/settings.gradle and add the following:
Code:
include ':react-native-hms-ml'
project(':react-native-hms-ml').projectDir = new File(rootProject.projectDir, '../node_modules/@hmscore/react-native-hms-ml/android')
Use case:
Huawei ML kit’s HMSTranslate API can be integrate for different applications and to translation between different languages.
Set API Key:
Before using HUAWEI ML in your app, set Api key first.
Copy the api_key value in your agconnect-services.json file.
Call setApiKey with the copied value.
Code:
HMSApplication.setApiKey("api_key").then((res) => {console.log(res);})
catch((err) => {console.log(err);})
Add below permission under AndroidManifest.xml file.
XML:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Translation
Text translation is implemented in either asynchronous or synchronous mode. For details, please refer to HMSTranslate.
JavaScript:
async asyncTranslate(sentence) {
try {
if (sentence !== "") {
var result = await HMSTranslate.asyncTranslate(this.state.isEnabled, true, sentence, this.getTranslateSetting());
console.log(result);
if (result.status == HMSApplication.SUCCESS) {
this.setState({ result: result.result });
}
else {
this.setState({ result: result.message });
if (result.status == HMSApplication.NO_FOUND) {
this.setState({ showPreparedModel: true });
ToastAndroid.showWithGravity("Download Using Prepared Button Below", ToastAndroid.SHORT, ToastAndroid.CENTER);
}
}
}
} catch (e) {
console.log(e);
this.setState({ result: "This is an " + e });
}
}
Obtaining Languages
Obtains language codes in on-cloud and on-device translation services. For details, please refer to HMSTranslate.
JavaScript:
async getAllLanguages() {
try {
var result = await HMSTranslate.getAllLanguages(this.state.isEnabled);
console.log(result);
if (result.status == HMSApplication.SUCCESS) {
this.setState({ result: result.result.toString() });
}
else {
this.setState({ result: result.message });
}
} catch (e) {
console.log(e);
}
}
Downloading Prepared Model
A prepared model is provided for on-device analyzer to translate text. You can download the on-device analyzer model. You can translate the text in offline using the download Model. For details, please refer to HMSTranslate.
JavaScript:
async preparedModel() {
try {
var result = await HMSTranslate.preparedModel(this.getStrategyConfiguration(), this.getTranslateSetting());
console.log(result);
if (result.status == HMSApplication.SUCCESS) {
this.setState({ result: "Model download Success. Now you can use local analyze" });
}
else {
this.setState({ result: result.message });
}
} catch (e) {
console.log(e);
this.setState({ result: "This is an " + e });
}
}
Read full article continue reading
Output:
Tips and Tricks
Download latest HMS ReactNativeML plugin.
Copy the api_key value in your agconnect-services.json file and set API key.
Add the languages to translate in Translator Setting.
For project cleaning, navigate to android directory and run the below command.
Code:
gradlew clean
Conclusion:
In this article, we have learnt to integrate ML kit in React native project.
Educational apps can integrate this service to eliminate language barriers, make content more accessible, and improve learning efficiency. In addition, the service supports offline translation, allowing users to easily use the translation service even if the network is not available.
Reference
https://developer.huawei.com/consum...uides-V1/text-translation-0000001051086162-V1
Read full article link
good
Actually huawei devices are very good in term of build quality and in software side too.
Offline too.. am down
Not exactly on topic, but who made the first image of the post (the one with "hello") ?
It shows a wrong word in Hebrew . A mirrored version of the correct word.
Meaning:
םולש
instead of:
שלום
(means "Hello" or "Peace").
If you don't understand what I mean, it's as if instead of "Hello" you would see "olleH".

			
				
Very interesting.
Which languages it supports for text translation?
All things considered, it would be decent if such stages as, for instance, had such an element. In the event that my English isn't great yet I need to pass a course at an American college. It is very muddled to do that without the important abilities. I buckle down with my private English guide who assists me with accomplishing my objective. more

Categories

Resources