Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.pbl language packs support #23

Closed
a-andreyev opened this issue Mar 28, 2016 · 12 comments
Closed

.pbl language packs support #23

a-andreyev opened this issue Mar 28, 2016 · 12 comments

Comments

@a-andreyev
Copy link

It is possible to apply language packs via android and ios. Would be great to add this feature.

P.S.: thanks a lot for your work!

@abranson
Copy link
Owner

I think Pebbled could handle this too.

@petRUShka
Copy link

Yes, same request!

@abranson
Copy link
Owner

The support in Pebbled wasn't as advanced as I'd hoped, there's just example code:
https://github.com/smokku/pebble/blob/master/daemon/bankmanager.cpp#L11
This might be enough though. I'll see what it does. Anyone know where you get pbl files from?

@petRUShka
Copy link

There is list of seems to be unofficial language files: https://github.com/MarSoft/pebble-firmware-utils/wiki/Language-Packs

I believe it is possible to intercept request from Pebble Time for Android or iOS to their pebble server.

@petRUShka
Copy link

I found link here to seems to be old official pbl files: http://lp.getpebble.com/v1/languages

@petRUShka
Copy link

I wrote email to @MarSoft. I hope he will cast light on that subject. If there will be any updates I will redirect them here.

@MarSoft
Copy link

MarSoft commented Mar 30, 2016

Actually, the link @petRUShka privided above is still the/ actual one. In Android APK of Pebble Time app there is a default_boot_config.json file which defines this link as well as list of known languages for voice recognition: (I write this in JS syntax for simplicity)

config.links["i18n/language_packs"] = "https://lp.getpebble.com/v1/languages";

Under this link there is a JSON endpoint which returns something like this:

{"languages": [
    {
        "ISOLocal": "ru_RU",
        "hardware": "ev2_4",
        "file": "https://language-packs.s3.amazonaws.com/sNN1m33-ru_RU.pbl",
        "name": "English+Russian",
        "localName": "English + Русский",
        "firmware": "3.8.0",
        "version": 3,
        "mobile": {
            "name": "ios",
            "version": "2.6.0"
        },
        "id": "56b28b6ce21e461b00734c16"
    },
    ...
]}

As far as I can see, you just need to fetch this list, find entries corresponding to current watch's hardware version, and then (after user choose locale) just fetch file from url in file field.
For what I could see, firmware and mobile fields are not necessary to check.

@abranson
Copy link
Owner

Yes, I noticed that none of the firmware version numbers don't correspond to the current one (v3.10.1). Looks like it might be a last modified version. Katharine kindly gave me some pointers in the telegram chat too, so I'll look there too. Thanks very much.

@abranson
Copy link
Owner

abranson commented Apr 6, 2016

It seems that the example language upload code from pebbled doesn't work, although maybe it did for the v2 firmware. I can't seem to get anything by NACKs back from the watch. I'll see if I can find out the right way to do it. Any tips would be welcome...

@petRUShka
Copy link

@MarSoft, do you have any code examples of uploading .pbl to pebble?

@MarSoft
Copy link

MarSoft commented Apr 9, 2016

Unfortunately no, the only thing I could suggest is to try reversing Pebble's android application...
Did you try to simply send it as if it would be a firmware bundle? According to my investigations in apk internals, they associate some numeric value with various types of uploadable resources: firmware(.pbz) is 1, app(.pbw) is 2, language(.pbl) is 3, and unknown type (.error) is 0. May it helps.

@abranson
Copy link
Owner

I have this enum in the source, which comes from libpebble2. It doesn't seem to overlap with that list past the first one.

enum UploadType {
    UploadTypeFirmware = 1,
    UploadTypeRecovery = 2,
    UploadTypeSystemResources = 3,
    UploadTypeResources = 4,
    UploadTypeBinary = 5,
    UploadTypeFile = 6,
    UploadTypeWorker = 7
};

I was trying UploadTypeFile, as suggested by the pebbled source. Maybe I should try UploadTypeSystemResources, but that seems to be the firmware's resources.

rufferson added a commit to rufferson/rockpool that referenced this issue Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants