Notes on iTMSTransporter (autoupdate)

Published 2019-03-07, 16:29

Topic(s): Kram No comments - :(

Proxy iTMSTransporter traffic on Windows

Published 2019-03-07, 16:26

  1. Install iTMSTransporter on Windows
  2. Install your proxy application, e.g. Charles Proxy
  3. Use Java’s keytool to add the Charles Root Certificate to your Java installation
    • to add: keytool -import -alias charles -keystore ..\lib\security\cacerts -file c:\root.cer (password: changeit)
    • to check: keytool -list-keystore ..\lib\security\cacerts (same password)
  4. Execute the iTMSTransporter command with the proxy parameters: iTMSTransporter.cmd -m diagnostic -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8888 (via)
    • Depending on the command you might have to change the transport via -t DAV
  5. Make sure SSL proxying is enabled for the relevant Apple domains (probably contentdelivery.itunes.apple.com and itmsdav.apple.com)
  6. Profit?

Topic(s): Kram No comments - :(

How to reload environment variables (including PATH) in Windows Command line / cmd.exe

Published 2019-01-23, 18:30

Do you know all those installation instructions that tell you to restart your Windows console after installing a tool that adds itself to your PATH so its binary can directly be called?

Well, today I learned there is a much easier way to achieve this:

refreshenv
>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait...Finished..

Thanks to meteor for telling me about this in its Chocolatey/choco output:

Environment Vars (like PATH) have changed. Close/reopen your shell to see the changes (or in powershell/cmd.exe just type `refreshenv`).
Topic(s): Notiz, Windows No comments - :(

How to change the color scheme of Windows Command Prompt / cmd.exe

Published 2019-01-23, 16:37

Last week we announced the exciting news that Windows Console has a new default color scheme, and also promised you that we would release a tool to make it easier to change the console to your desired scheme. The Windows Console team is proud to present the ‚Colortool‚ which you can use to apply the new default color scheme, and several alternate pre-defined color schemes or even schemes of your own!

https://blogs.msdn.microsoft.com/commandline/2017/08/11/introducing-the-windows-console-colortool/

Download from https://github.com/Microsoft/console/releases, unzip to folder that is in your PATH environment variable, use via colortool solarized_dark for example.

Topic(s): Link No comments - :(

TIL: How to Fix a Slow-Opening Windows Downloads Folder

Published 2019-01-22, 15:10

Opening my Downloads folder from Firefox or Chrome always was slow. Reaaaaaally slow. So finally I googled „opening downloads folder from firefox is slow“ and found this short article, the explains a simple and perfectly fine solution:

https://www.laptopmag.com/articles/slow-windows-downloads-folder

Yay!

Topic(s): Link 1 single comment - :/

npm link: What the first `npm link` really does and how it can also be used

Published 2018-11-28, 13:39

There are loads of articles about npm link, how it works (npm link in library dir, then npm link library in project that should use that local library as a dependency) and what it can be used for (linking to a local folder for a dependency instead of having a npm downloaded version in node_modules).

But most skip over or only scrape what the first of the two steps really does – and how that can be used besides the default use case.

TLDR: npm link not only creates a symlink to the library in the global node_modules (that can be used in the second step of npm link ...), but also makes the library main script or binary accessible via a global npm module, similar to what happens when you npm install -g something.

The details:

When you run npm link as the first step of the two-step linking process, you create a „symlink in the global folder„.

Let’s follow the individual sub steps:

C:\Projects\Cordova
λ npm list -g --depth=0 
C:\Program Files\nodejs
+-- npm@6.4.1

We start in a specific folder (C:\Projects\Cordova in my example) and check our globally installed packages: We have nothing besides npm installed on this machine.

C:\Projects\Cordova              
λ cd cordova-paramedic 
 
C:\Projects\Cordova\cordova-paramedic
λ npm link
removed 1 package in 3.649s
C:\Program Files\nodejs\cordova-paramedic -> C:\Program Files\nodejs\node_modules\cordova-paramedic\main.js
C:\Program Files\nodejs\node_modules\cordova-paramedic -> C:\Projects\Cordova\cordova-paramedic

Now we switch the directory of our library that we want to link, cordova-paramedic here. We run npm link which creates two symlinks:

  1. C:\Program Files\nodejs\cordova-paramedic -> C:\Program Files\nodejs\node_modules\cordova-paramedic\main.js
  2. C:\Program Files\nodejs\node_modules\cordova-paramedic -> C:\Projects\Cordova\cordova-paramedic

The first one is a symlink for the „binary“, the main script, of our library.
The second is a symlink for the whole library into the global node_modules.
(C:\Program Files\nodejs\ is our global node/npm folder on this machine)

That first symlink is not mentioned in most of the articles about npm link on the web as the example libraries being linked don’t include a main script in their package.json.

λ npm list -g --depth=0
C:\Program Files\nodejs
+-- cordova-paramedic@0.6.0-dev -> C:\Projects\Cordova\cordova-paramedic
`-- npm@6.4.1

When we check the globally installed modules again, we see that our library was added to that list.

So not only can we now use npm link cordova-paramedic, the second command in the npm link two step process, to add this library to any project from our local checkout – but we can also use it as a global command cordova-paramedic!

C:\Projects\Cordova
λ cordova-paramedic
Error missing args.
...

So using npm link you can not only link local development versions of libraries to use in another project, but you can also create a global command that uses a local version of your command code. This is very useful when developing such a library.

Topic(s): Development No comments - :(

Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

Published 2018-11-16, 17:38

Debugging and fixing a broken Android SDK setup is always „fun“ – especially on a CI environment where you don’t control the actual installation.

It gets worse when all the StackOverflow answers and other Google results for the error you are getting are basically „I executed some slightly related, but otherwise random commands, and after that it worked“.

In my specific case I was getting this error message when trying to start an Android Emulator:

PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value

It was really hard to find out what „AVD system path“ actually meant and how my ANRDOID_SDK_ROOT could be connected to that.

So to maybe make this search a bit easier for future people having this problem, I write a solution down here:

Continue reading Android Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value…
Topic(s): Development, Link No comments - :(

How to create an empty file in cmd.exe / Windows Command Line

Published 2018-11-14, 16:45

copy NUL EMptyFile.txt
copy /b NUL EmptyFile.txt

 https://stackoverflow.com/a/1702790/252627

Topic(s): Kram No comments - :(

Azure Devops Pipelines: Software available on Microsoft hosted agents

Published 2018-11-14, 15:27

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=vsts&tabs=yaml#software contains links to READMEs on GitHub that list the available software

Topic(s): Development, Link No comments - :(

Azure Devops Pipelines: Install and start an Android Emulator

Published 2018-11-14, 15:17

#!/usr/bin/env bash

echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-27;google_apis;x86'

$ANDROID_HOME/platform-tools/adb devices

echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n test_android_emulator -k 'system-images;android-27;google_apis;x86' --force

nohup $ANDROID_HOME/emulator/emulator -avd test_android_emulator -no-snapshot > /dev/null 2>&1 & $ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'

echo "Emulator started" 

https://developercommunity.visualstudio.com/content/problem/340547/azure-devops-unable-to-run-the-android-emulator-on.html

https://github.com/MicrosoftDocs/vsts-docs/issues/1677#issuecomment-433858827

Topic(s): Link No comments - :(

15 queries. 0,253 seconds.