Using idevicedebug or ios-deploy library to open a (deep) link on connected iOS device in a command line - libimobiledevice

Is it possible somehow with the libraries mentioned in the title? What I've already tried:
idevicedebug run com.apple.mobilesafari 'my-link.com'

Related

How to configure build input packages/dependencies within Nix development shells?

I'm not using NixOS but I wrote a flake that I'm using to generate a dev shell to build a Rust project (this is essentially just the audio example from the Bevy repository). My issue is that I encounter the following error when attempting to run the project in the dev shell:
$ nix --extra-experimental-features nix-command --extra-experimental-features flakes develop
bash-4.4$ cargo run
Finished dev [unoptimized + debuginfo] target(s) in 6.62s
Running `target/debug/audio`
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoDevice', /home/a/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_audio
-0.5.0/src/audio_output.rs:22:67
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
bash-4.4
One of the dependencies of the project is the Bevy crate which requires ALSA, so I'm assuming the issue is because the ALSA package exposed by the dev shell is probably misconfigured. I use PipeWire on my actual system (I think it also uses ALSA as a backend) and I tried adding ALSA and PipeWire as one of the buildInputs for the flake, but I'm not sure how I'm supposed to configure these within the dev shell. According to this issue on the Bevy repository, the usual fix for this issue, at least for Arch-based distros, is to install the pipewire-alsa package. I'm not sure what the equivalent of doing that is in the context of a Nix dev shell is though, since there is no pipewire-alsa package in nixpkgs that I can add to my flake. So with that said, how should I go about configuring ALSA or PipeWire in the dev shell?

Set up kenlm for Windows

The official website makes it pretty clear that there is no support for kenlm in Windows. There is a Windows tag at the github repository but it seems to be maintained by few random contributors then and there.
How to set up kenlm for Windows then?
The new DeepSpeech PlayBook also includes instructions for setting up a Docker image and running training from within a Docker container. If you have Docker on Windows, this might be another solution.
The information for building a new Scorer is still in a PR, but may also be useful.
The solution is to use Ubuntu in Windows through Windows Subsystem for Linux
Get WSL for Windows
From your ubuntu bash navigate to the folder where you want to do the setup. You can access the Windows file system from the /mnt/c/ folder, which you can find at the root directory.
From there simply follow the official instructions, that is clone the git repo, and run cmake .. & make -j2 in order to build the project (after first making the necessary installations in your Ubuntu system).
Obviously, you must train the models or scorers using the Linux bash. You can also use these models from Windows using the kenlm python library.
E.g.
The two steps to build a scorer for the deepspeech-model as described here should be executed from your Ubuntu system. But after you have the scorer you should be able to run the command
deepspeech --model deepspeech-0.9.3-models.pbmm --scorer kenlm.scorer --audio audio.wav
from Windows. However, once you have WSL there's no need to do this work from Windows. Things will work nicely #your Ubuntu system.
I've faced the same problem and solved it by building kenlm wheel from Cygwin terminal as home page advices (pip wheel pypi-kenlm).
I've also uploaded wheel to pypi called kenlm-cygwin, but it's only python3.7.

Native library `yoda_phy_pa_x86_64` not found while installing Unet audio in macOS

macOS GateKeeper is giving me the following error message while trying to run Unet audio:
"libyoda_phy_pa_x86_64.dylib" cannot be opened because the developer cannot be verified
and the terminal reads:
> bin/unet audio
Native library yoda_phy_pa_x86_64 not found
Once you see the prompt with the message, click "Cancel".
Open "System Preferences", and go to "Security & Privacy". The message "libyoda_phy_pa_x86_64.dylib" was blocked from use because it is not from an identified developer. will be listed at the bottom part of the dialog with a button saying Allow Anyway next to it. Click the button.
Go back to the terminal, type bin/unet audio again and press Enter.
It will show a dialog with message macOS cannot verify the developer of "libyoda_phy_pa_x86_64.dylib. Are you sure you want to open it?
Click "open" and that should open a browser window with the Overview dashboard of Unet audio.
To install PortAudio:
Download source from http://files.portaudio.com/download.html
Build and install instructions: http://files.portaudio.com/docs/v19-doxydocs/compile_mac_coreaudio.html
Alternatively, you can install PortAudio using brew by typing the following in a terminal.
> brew install portaudio
NOTE: Installation instructions for brew can be found here: https://docs.brew.sh/Installation
To install Java 8:
> brew tap adoptopenjdk/openjdk
> brew cask install adoptopenjdk8
If the following error persists, it might be an issue with the path.
> bin/unet audio
Native library yoda_phy_pa_x86_64 not found
Brew installs PortAudio at /usr/local/Cellar/portaudio/ (with symlinks to /usr/local/opt/portaudio/). If you installed from source, make sure there is a symlink at the above location to your PortAudio folder.

Daydream View Controller Emulator won't work with Google VR SDK 1.1 and Unity 5.6 beta for Linux

I can't get the controller emulator to work with Google VR SDK 1.1 & Unity 5.6b3 under Arch Linux 64-bit. If I load the GVRDemo scene in Unit and click the play button to enter Play Mode, the console shows the following:
"Android Debug Bridge (adb) command not found.
Verify that the Android SDK is installed and that the directory containing adb is included in your PATH environment variable."
In Windows, you have to add the directory containing the Android Debug Bridge (adb) program to the PATH environment variable in Windows itself (not in the Unity program). Once you do that, the Controller Emulator works fine in Windows. You have to do the same in Linux, evidently, to get Unity to locate adb, and therefore get the Controller Emulator phone working for testing the game.
I've added the following line in my .bashrc and .profile files in my home directory:
"PATH=/home/jesse/Android/Sdk/platform-tools/:$PATH"
This, however, doesn't fix the issue.
I've also added the root directory of the Android SDK to my Unity Preferences > External Tools section.
I don't know how to get Unity and Google VR SDK to recognize the directory containing adb to the PATH environment variable that Unity needs to make the Controller Emulator work.
Is anyone else having this issue? Is there a fix or work-around?
I was able to locate the culprit and modify Google VR SDK scripts to make it work! Turns out there was an issue in the code of the script file titled "EmulatorClientSocket.cs" regarding non-Windows machines. Here's what I changed, and why:
Originally, in line 111 and 112 of this script, it read:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -l -c \"{0}\"", adbCommand);
The context is that when Windows is not present (forgive my layman's terms -- I've only started learning coding a month ago) the command to process is this: bash -l -c "adb forward tcp:7003 tcp:7003". The problem is when the -l option is used in the command, the command is interpreted as if coming from a login shell, which - I believe - means that bash isn't looking at the custom environment variables set in the user's .bashrc and .profile files in their home directory. Without looking at those files, bash can't locate the adb command (try running the bold command above in a terminal, and the result will be a prompt saying adb command not found).
To fix it, I simply removed the -l option from line 112, and, voila! Everything works like a charm! Lines 111 and 112 now look like this:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -c \"{0}\"", adbCommand);
The fix will work when running "unity-editor" or "unity-editor-beta" from the Terminal or Xterm, but running it from the application menu will still produce the adb error and Controller Emulator will not work.

Error: ENOENT: no such file or directory, scandir '/Documents/android-sdk-linux/build-tools' at Error (native)

I am new to Appium and I am running a selenium script with device connected and while running in terminal i am getting this error:
“Error: ENOENT: no such file or directory, scandir ‘/Documents/android-sdk-linux/build-tools’ at Error (native)”
I am running in Linux. Can you please help me out ?
You need to paste this two lines in .bashrc file
export ANDROID_HOME=/home/rijomon/Documents/android-sdk-linux/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
then you will not get that error
This error is caused when Appium can not find a valid path to the Android SDK in the ANDROID_HOME environment variable
...or when the SDK installation is corrupt.
Rijo Mon's answer is correct for his system but the ANDROID_HOME path will need to be changed to point to the actual location of your installed SDK.
Install Android Studio if you aren't already using it.
Make sure only one version of Android SDK is installed in Android studio, and make sure Android Studio does not display any errors or warnings about the SDK installation.
Go to Android Studio Preferences → Appearance and Behavior → System Settings → Android SDK
Uninstall all installed Android SDK versions here by unchecking
their boxes and clicking Apply
Uninstall any other copies of the Android SDK on your system
In Android Stduio, check only one SDK version and install it by clicking Apply.
Close and re-open Android Studio (you may want to reboot your machine)
Go back into the Android SDK window in Preferences → Appearance and Behavior → System Settings → Android SDK
Confirm that Android Studio does not display any warnings about the installed Android SDK.
Make sure the ANDROID_HOME environment variable is in your bash_profile and that it points to the location of your installed SDK. For an SDK installation managed by Android Studio on OSX, this should be ~/Library/Android/sdk
The output of "ls -l ~/Library/Android/sdk" or the ls for your correct path to your SDK should now show a directory listing with the installed SDK files and folders including "build-tools" and "emulator"
Add the following line to ~/.bash_profile (OSX) or ~/.bashrc (Linux)
export ANDROID_HOME="${HOME}/Library/Android/sdk" (replace the path with your actual SDK path)
Restart your terminal or source the modified bash profile with "source ~/.bash_profile" or "source ~/.bashrc"

Resources