streda 11. septembra 2013

Ingress keys on intel map (iitc importkeys plugin) tutorial

To have successfully running import keys plugin in IITC you need to make some small steps. It is not working immediately out of the box. The reason is that the pull request to IITC was not merged as it (really softly) breaks the rules of Ingress by getting the agent inventory via a request that's dedicated to the application.

What you need to do:
  1. Have IITC installed
    read more and download at
  2. Download and install IITC plugins: Keys, Keys on map
    download current version at
  3. Download Keys import plugin files from divergentdave's github repository
    head to github if you have problems with direct downloading
  4. Turn off the IITC plugins (turn off the layer or the extension in browser) that are showing information on map, such as Portal level number. It would collide.
  5. Find the Ingress app version in keys-import.user.js file

    encodeURIComponent(window.JSON.stringify({'nemesisSoftwareVersion': '2013-08-07T00:06:39Z a52083df5202 opt', 'deviceSoftwareVersion': '4.1.1'}));
    Replace the version by current one '2013-10-15T22:32:58Z 438a6fac0786 opt' for 1.38.0 (or search the web for actual version just simply by putting nemesisSoftwareVersion keyword in github code as lot of ingress hobby projects are hosted there
    UPDATE: No luck on github today. Another and the 100% working method is to decompile the com.nianticproject.ingress.apk with apktool and search for the string in .smali files. I found it in three different files, the code looks like this:
    const-string/jumbo v1, " 2013-09-19T02:22:36Z d1073636dce6 opt"
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    Any search for "2013-09-" or current month should do it.

    So now it should look like this:
    encodeURIComponent(window.JSON.stringify({'nemesisSoftwareVersion': '2013-11-05T00:10:10Z c0bfd67a2024 opt', 'deviceSoftwareVersion': '4.1.1'}));
    (Updated 2013-09-26 with new version and a more effective search method for version string)

    UPDATE 2013-10-09: v1.37.2 string is "
    2013-10-07T21:02:13Z a7cb9f5402e7 opt"
    UPDATE 2013-10-23: v1.38.0 string is "2013-10-15T22:32:58Z 438a6fac0786 opt"
    UPDATE 2013-11-07: v1.39.2 string is "2013-11-05T00:10:10Z c0bfd67a2024 opt"
    UPDATE 2013-12-09: v1.40.0 string is "2013-11-27T00:17:25Z 2b5ffb29b701 opt"
  6. Find the last line in keys-import.user.js


    and replace it by the content of the keys-import-inject.js file. That's done automatically if you build it, but that's the easy way to get it done manually.
  7. Install the keys-import.user.js as a browser extension. In chrome it's done by dragging the file into the extensions list (Menu / Tools / Extensions).
    Chrome asks persmissions for the extension to access data on and That's OK, allow it.

    The m-dot site is actually the communication endpoint of Ingress app. (Thank for your comments).
  8. Now you see an "Import keys" menu item in IITC.

    Yes, go on and click on it!
  9. A dialog windows shows up.

    For the first time, you must authorize the m-dot site for your Ingress account. I had it done always in new windows (as suggested).
  10. Choose the account which you use for Ingress. Close the new windows, the access is granted if you see a lot of json output (a lot of text).
  11. Click OK to close the Import keys dialog.
  12. And now, click on Import keys menu item again and be patient. Might take a while, you can watch the progress in your browsers debugger. Or just wait :)
    Et voila:

  13. TROUBLESHOOTING: If you don't see the numbers at portals
    You can check the status of imported key amounts at the portal detail pane to make sure if it's a data problem or just about displaying it (e.g. colliding iitc plugin)

    Another possible issue is hidden keys layers. You can correct it in layers selector (top right)

    Cool Music: I Got 5 On It - Reggae / Dubstep / Original