Cyrillic app name incorrectly encoded during porting Android app to Blackberry

北城以北 提交于 2019-12-11 12:56:27

问题


I have small problem with displaying cyrillic app name on PlayBook and BB10 simulator. Looks like it's incorrectly encoded from russian. Problem appeared after updating bb eclipse plugin from version 1.3 to 1.5, with plugin v.1.3 it worked just ok.

I'll appreciate any help or ideas.

Here is screenshot from bb10 simulator:


回答1:


I found workaround myself.

When I got problems with encodding with bb eclipse plugin, I decided to do the same thing with comandline tools.

After tools setup (sing keys, debug tokens, etc), I've tried to repackage my apk file with this command (source apk file was in apk/ folder and destination for bar file was bar/ folder)

./apk2bar apk/ -d bbplaybookdebugtoken.bar -t bar/ -a "zasadnyy" -cg

When I've got .bar file, I've installed it with command:

/batchbar-deploy bar/ 192.168.1.35 mysecretpass

Unfortunatelly result was unsuccsessful, app name was incorrectly encoded again. After first fail I've read documentation a bit more and tried to use this approach: http://developer.blackberry.com/android/documentation/creating_a_custom_manifest_file_2016828_11.htm...

When I unzipped bar file and opened MANIFEST.MS - I've found this line:

Application-Name: –ì–µ—Ä–æ–∏

According to documentation solution should be quite strainforward: 1. Rename MANIFEST.MS to <you apk name>.mf 2. Update incorrect properties, in my case I've changed line from above to "Application-Name: Герои" 3. Put edited manifest file in the same folder as <your apk name>.apk and rerun apk2bar tool with **-m** parameter, e.g.:

./apk2bar apk/ -d bbplaybookdebugtoken.bar -t bar/ -a "zasadnyy" -m -cg

Repackage, deploy, run and ..... and again FAIL. Application name was "–ì–µ—Ä–æ–∏".

After second fail, I decided to make dirty hack, I've edited MANIFEST.MF directly in repackaged bar file (Unzip -> edit manifest -> zip -> change file extension to .bar).
Deploy updated .bar file to playbook and .... YEAH, we've got cyrilic app name!

Conclusion and FIX:

  • Looks like in 1.5 release if apk2bar tool manifest encoding is misconfigured (in ver. 1.3 it worked just ok)
  • In oder to FIX issue: Unzip unsigned bar file -> edit manifest -> zip -> change file extension back to .bar



回答2:


I had the same problem I believe, but the symptoms have been different. I was not even able to install the app on my test device and explicitly running blackberry-signer -verify confronted me with the Invalid signature file digest for Manifest. error.

The MANIFEST.MF file seems to be properly encoded in utf-8 by the apk2bar tool, but the following signing process seems to read this using the platform's default encoding. I added the following java parameter to the blackberry-signer.bat as well as the apk2bar.bat batch file scripts of the command line tools to make it work properly:

-Dfile-encoding=utf-8

(This is for version 1.5.2 of the tools)



来源:https://stackoverflow.com/questions/14238204/cyrillic-app-name-incorrectly-encoded-during-porting-android-app-to-blackberry

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!