MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Kindle Developer's Corner (https://www.mobileread.com/forums/forumdisplay.php?f=150)
-   -   AcXE - ACX Enabler (https://www.mobileread.com/forums/showthread.php?t=235859)

dsmid 03-14-2014 12:48 PM

AcXE - ACX Enabler
 
4 Attachment(s)
This hack enables using custom ACXs (Active Content Extensions, W3C Widgets activated on text selection).

These extensions can be installed by placing to folder system/acw/ in user store or to folder /opt/amazon/acw on the system partition (this is the preferred location as the firmware can remove/recreatesystem/acw/ content any time).

See https://wiki.mobileread.com/wiki/Kindle_Touch_ACX for more information.

Everything needed for ACX signing (signing app in Java, appropriate private key) can be found here:
https://github.com/dsmid/kindle-pw2-...master/signing

Attached sample ACXs adds ability to translate selection with Google Translate to your Kindle.

Install AcXE (Update_acxe_*_install.bin from acxe_*.zip), put gtranslator.acx (the one for your device) in [userstore]/system/acw/, reboot Kindle and you should see a new "Google Translate" item in the "More" menu after you highlight some text.

Supported languages:
Spoiler:
English
French
German
Portuguese
Spanish
Italian
Dutch
Japanese
Korean
Russian
Chinese Simplified
Chinese Traditional
Finnish
Norwegian
Hindi
Danish
Latin
Czech
Slovak
Polish
Ukrainian
Greek
Hebrew
Turkish
Croatian
Serbian
Romanian
Latvian
Lithuanian
Estonian
Hungarian
Bulgarian
Arabian
Swedish
Icelandic

I can add other languages if needed.

This works on PW2, PW1 and Touch.

shamanNS 03-22-2014 11:57 AM

Could you add Serbian and Croatian language to Google Translate ACX?

edit: Tested & works on PW1 fw 5.4.4 :)

dsmid 03-22-2014 03:39 PM

Added these languages:
Code:

Ukrainian
Greek
Hebrew
Turkish
Croatian
Serbian


thomass 03-22-2014 04:11 PM

Quote:

Originally Posted by dsmid (Post 2792613)
Added these languages:
Code:

...
Turkish
...


thanks

eschwartz 03-27-2014 05:12 PM

This does not work on the Kindle Touch (v5.3.7). I tried installing the "Update_acxe_1_install.bin" but it was deleted when I disconnected, and Update Your Kindle stayed grayed out.

dsmid 03-28-2014 03:57 AM

Quote:

Originally Posted by eschwartz (Post 2796555)
This does not work on the Kindle Touch (v5.3.7). I tried installing the "Update_acxe_1_install.bin" but it was deleted when I disconnected, and Update Your Kindle stayed grayed out.

Try the new version, it's repackaged to support installing on Touch.
It hasn't been tested on Touch though. Please report back to me after you test it.

eschwartz 03-28-2014 11:53 AM

Thanks! Updating now... Update is running....

eschwartz 03-28-2014 02:42 PM

The enabler hack seems to have worked -- no error message, and I now have an empty folder "/mnt/us/acxe/" :blink: is this folder necessary?

But adding gtranslator.acx at {$KindleDrive/}"system/acw/" does nothing. I should see an extra option when tapping on a word, correct? I see no changes... It hasn't overwritten the default translation acx (I didn't think it would, but checked anyway) since it still shows default languages, not your list.

I haven't tried adding it to "/opt/amazon/acw/" but I will grab kterm extension and cp it over.

eschwartz 03-28-2014 06:23 PM

...and apparently it's a read-only filesystem, so I will have to do this via USBnet?

knc1 03-28-2014 07:50 PM

Quote:

Originally Posted by eschwartz (Post 2797227)
The enabler hack seems to have worked -- no error message, and I now have an empty folder "/mnt/us/acxe/" :blink: is this folder necessary?

But adding gtranslator.acx at "/mnt/us/system/acw/" (over USB connection) does nothing. I should see an extra option when tapping on a word, correct? I see no changes... It hasn't overwritten the default translation acx (I didn't think it would, but checked anyway) since it still shows default languages, not your list.

I haven't tried adding it to "/opt/amazon/acw/" but I will grab kterm extension and cp it over.

When viewing user storage area over the usb cable, the /mnt/us portion of the filepath is suppressed.

When viewing the user storage area from the command line (ssh, telnet, serial port) then the full path is required.

I.E:
USB storage mode: /documents
Is actually (viewed from the internal system) /mnt/us/documents

eschwartz 03-28-2014 07:56 PM

I know that. :)

On my computer, it is located at "/media/Kindle/system/acw/"; note the reference to root at the beginning of "/mnt/us/system/acw/"; maybe I should've made this clearer though.

eureka 03-29-2014 05:22 AM

I installed AcXE on KT 5.3.7 (but not through update bundle, just by copying Upstart job and data files).

It works fine and performs bind mounts without errors. eschwartz, existence of /mnt/us/acxe/ is required by Upstart job, though, it would be nice if it would be optional (as well as debug log).

Installing gtranslator.acx gives me following log:
Spoiler:
Code:

scan[1337]: I mesquiteextractor:extract::No thumbnail to extract from widget
scan[1337]: I mesquiteextractor:extract::failed to extract application thumbnail
acxmgrd[1337]: D acxmgrd:acxManagerStringHandler:propName=ACX_RefreshList,arguments=com.lab126.gtranslation:Got event
acxmgrd[1337]: I acxmgrd:AcxManager.handleRefreshAcxList:eventName=ACX_RefreshList,arguments=com.lab126.gtranslation:
acxmgrd[1337]: D acxmgrd:AcxManagerRefreshAction.execute:acxId=com.lab126.gtranslation:
acxmgrd[1337]: D acxmgrd:AcxManager.refreshAllAcxList::
acxmgrd[1337]: D acxmgrd:UnusedAcxPolicyManager.tryUpsertAcx:acxId=com.lab126.gtranslation:
acxmgrd[1337]: D acxmgrd:AppRegistryAcxConfigRegistry.forceUpsertAcx:acxID=com.lab126.gtranslation:
acxmgrd[1337]: D acxmgrd:AppRegistryAcxConfigRegistry.findAcxInfoById:id=com.lab126.gtranslation:
acxmgrd[1337]: D acxmgrd:AppRegistryAcxConfigRegistry.installRegisteredACXs:HandlerId=com.lab126.gtranslation,Location=/mnt/us/system/acw/gtranslator.acx,EventTypes=onbutton,UUID=b5f5baab-5853-45e1-820f-65ea87827640,AcxAppDataDir=com.amazon.kindle.ns.widgets.gtranslation,TopAppDataDir=.active_content_sandbox,DisplayName=Google Translation:Found ACX Data
acxmgrd[1337]: D acxmgrd:AcxManager.refreshAllAcxList::ACX Manager refresh successful. Requesting reader plugin refresh
cvm[1337]: I ACXReaderPlugin:InstallingACX:displayName=Google Translation,eventTypes=onbutton,viewMode=windowed,requiresRegistration=false:
cvm[1337]: W ACXReaderPlugin:Warning::Failed to parse button priority
acxmgrd[1337]: D acxmgrd:UnusedAcxPolicyManager.executePolicy:Request=0,wuaCount=0,runningACXs=0:checking policy
acxmgrd[1337]: D acxmgrd:UnusedAcxPolicyManager.executePolicy::entering lock
acxmgrd[1337]: D acxmgrd:UnusedAcxPolicyManager.executePolicy::exiting lock
cvm[1337]: I IndexerThread:CIIM_INDEX_CLOUD_FROM_CCAT:asin=lua_nil:
cvm[1337]: I IndexerThread:ASIN_OR_GUID_NULL:asin=lua_nil,uuid=9d644da7-fee4-4b8a-8640-1c104eea448c,contentType=0:
cvm[1337]: I CIIM_LUA_CCAT_C_INDEX_TITLE::asin=lua_nil:
cvm[1337]: I lipc:evts:name=updated, origin=com.lab126.ccat:Event sent
cvm[1337]: I pc:dbMem:used=119,high=1158,lua=408:sqlite and lua memory stats
cvm[1337]: I IndexedContentModel:ChunkInfo:start=0,cursor=0,size=0:
cvm[1337]: I IndexerThread:Information::allowed to index: ALL CONDITIONS MET
scan[1337]: I mesquiteextractor:addapp:id=http://kindle.amazon.com/ns/widgets/gtranslation:Added application
scan[1337]: I mesquiteextractor:thumbnail::received thumbnail events


And as I see in stock KT 5.3.7 ACX, button priority is recognized here through <kindle:buttonPriority> element in config.xml.

So, AcXE should work fine on KT, but ACX metadata format is possibly changed in later firmwares, so it should be adapted to KT.

EDIT: BTW, uninstall.sh in source code package removes /etc/upstart/binder.conf.

dsmid 03-29-2014 06:38 AM

Quote:

Originally Posted by eureka (Post 2797649)
existence of /mnt/us/acxe/ is required by Upstart job, though, it would be nice if it would be optional (as well as debug log).

/mnt/us/acxe/ serves as a flag that AcXE is installed & enabled and it also serves as a switcher - delete it, reboot and AcXE is disabled. Recreate it, reboot and AcXE is enabled again.
I consider such approach to be a good idea - at least the user will get what he/she often thinks he/she will get by resetting to factory defaults.

Quote:

Originally Posted by eureka (Post 2797649)
And as I see in stock KT 5.3.7 ACX, button priority is recognized here through <kindle:buttonPriority> element in config.xml.

So, AcXE should work fine on KT, but ACX metadata format is possibly changed in later firmwares, so it should be adapted to KT.

It should be easy to adapt gtranslator for KT by making a diff between KT translator.acx and KPW translator.acx .
Does anybody have KT translator.acx around ? (there should be a copy in [userstore]/system/acw/ )

Quote:

Originally Posted by eureka (Post 2797649)
EDIT: BTW, uninstall.sh in source code package removes /etc/upstart/binder.conf.

Thanks for the report, I've fixed that in version 3.

eureka 03-29-2014 08:05 AM

Quote:

Originally Posted by dsmid (Post 2797671)
Does anybody have KT translator.acx around ? (there should be a copy in [userstore]/system/acw/ )

Official 5.3.7 update bundle contains complete rootfs image.

dsmid 03-29-2014 08:58 AM

Sure, that's just me being lazy to download the whole bundle to get a tiny file ;)


All times are GMT -4. The time now is 05:09 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.