octave + gnuplot + os x 10.6 : nothing happens - osx-snow-leopard

On my first-gen Macbook Pro, with OS X 10.6.1, I can launch gnuplot and get a plot, after I set the terminal to x11, with a command like
plot [-6:6] sin(x).
But when I launch octave, and try a plot command, like
plot([2 3],[4 5]) or plot([-6:0.01:6],cos([-6:0.01:6]))
I get no error messages and no plot. Just another octave prompt. I installed from octave-3.2.3-i386.dmg. What gives?
Any suggestions appreciated.

If gnuplot works after setting the terminal to x11 (set term x11), then you could try the same in octave:
octave-3.2.3:1> setenv GNUTERM 'x11'
I believe that the default terminal of gnuplot on OS X is aquaterm, so it is probably the default terminal when octave is plotting with gnuplot as well.

If you have aqua it will work fine.
It seems to me that you have port installed aquaterm and xcode also
Verify with:
sudo port installed
if exists aqua and you have xcode installed try
sudo port uninstall aqua

Related

syntax error when running iperf through adb

I am trying to execute iperf through adb shell, however I am getting following error:
syntax error: unexpected 'newline'
here are the steps:
push android compiled iperf binary to /data/local/tmp
enter adb shell, go to /data/local/tmp folder.
chmod +x ./iperf2.0.10
./iperf2.0.10
I tried executing command from outside like: adb shell "command"
I tried few other phones.
I tried few iperf versions.
host machine: tried both mac and windows. on windows version info:
Android Debug Bridge version 1.0.41
Version 31.0.3-7562133
phone info: adb shell getprop ro.product.cpu.abilist
arm64-v8a,armeabi-v7a,armeabi
I made sure to pick relevant iperf binary form: https://github.com/KnightWhoSayNi/android-iperf
This is a galaxy S7 SM-G930U, android version 8.0.0, kernel version 3.18.71-14970140
I looked at the iperf source code and could not find any place which would print this error message, so seems like some issue with how adb is treating my command.
Please suggest what can I do now ?
Edit: updated some details

xcrun: error: invalid active developer path [duplicate]

I just upgraded from Yosemite to El Capitan (and replicated the problem upgrading from El Capitan to Sierra), and when I try to type for example git status inside a terminal, I get the following error:
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
I don't have Xcode installed, never did.
Anyone have a solution?
Found the fix for the problem here.
xcode-select --install
This will bring up a prompt to install the necessary command line tools.
If you have issues with the xcode-select --install command; e.g. I kept getting a network problem timeout, then try downloading the dmg at developer.apple.com/downloads (Command line tools OS X 10.11) for Xcode 7.1
In macOS 10.14 this issue may also occur if you have two or more versions installed. If you like xCode GUI you can do it by going into preferences - CMD + ,, selecting Locations tab and choosing version of Command Line Tools. Please refer to the attached print screen.
I tried the solution xcode-select --install but it don't help me, I update from Sierra to High and happened this, my solution:
sudo xcode-select --reset
Reassigning the path Xcode is configured with worked for me.
sudo xcode-select -switch /Applications/Xcode.app
You'll then likely be prompted (after trying a command) to agree to the license agreement.
I had the same issue after upgrading to macOS Catalina.
This didn't work for me:
xcode-select --install
Downloading and installing Command Line Tools for Xcode 12 did it!
For me, after I've removed Xcode, I have to switch active developer path as follows:
sudo xcode-select -s /
I just updated to High Sierra and I couldn't just run xcode-select --install. First, I had to actually install xcode from the app store. Then I ran xcode-select --install. Then I had to run sudo xcodebuild -license, agree to the terms, then I could finally run git commands again.
Updated to High Sierra 10.13.2
xcode-select --install ALONE did not work for me.
Download X-code from app store
$xcode-select --install
a. May need to update after install using softwareupdate in command line. $sudo softwareupdate -i "Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.1"
$sudo xcodebuild -license
For Mojave
Uninstall Any old version of Command Line Tools:
sudo rm -rf /Library/Developer/CommandLineTools
Download and Install Command Line Tools 10.14 Mojave.
For those also having issues with heroku command line tools after upgrading, I also had to do the following in my terminal:
xcode-select --install
brew install heroku/brew/heroku
brew link --overwrite heroku
It seems the upgrade to High Sierra messed with my symlinks in addition to forcing me to reinstall xcode tools. I kept getting 'not a directory' errors:
▸ stat /Users/mattymc/.local/share/heroku/client/bin/heroku: not a directory
▸ fork/exec /Users/mattmcinnis/.local/share/heroku/client/bin/heroku: not a directory
Hope that saves someone an hour :)
After update to macOS 10.13.3
After updating do macOS 10.13, I had to install
"Command Line Tools (macOS 10.13) for Xcode 9.3"
downloaded from https://developer.apple.com/download/more/
I upgraded mac os to macOS High Sierra - 10.13.3 and faced a similar issue while trying to install watchman (with command - brew install watchman).
ran the command: xcode-select --install, then ran "brew install watchman" - Everything works fine!
For the most recent version Mojave version 10.14.1, I use
solved by downloaded from https://developer.apple.com/download/more/ " login by apple id, and download
Command line tool newest stable version.dmg
That makes everything work
the old answer
xcode-select --install
doesn't work for me.
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
Work for me.
Even if you do xcode-select --install it was not fixing that for me as it showed some network error. The problem was that it could not connect to the app store. I did the following to fix it.
Open keystore
Go to system root and select certificates.
Open digicert high assurance EV.
Expand the trust section, mark it as never trust.
Restart system now repeat step 1, 2, 3. and mark the trust policy as
back to use system defaults.
Your app store should work now and you should be able to run xcode-select --install

How to solve this adb server version doesn't match this client error in android?

adb server version (39) doesn't match this client (40); killing...
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon
adb: error: failed to get feature set: protocol fault (couldn't read status): Connection reset by peer
* daemon not running; starting now at tcp:5037
* daemon started successfully
- waiting for device -
error: protocol fault (couldn't read status): Connection reset by peer
I have the same issue when running adb devices command.
adb devices
List of devices attached
adb server version (36) doesn't match this client (40); killing...
* daemon started successfully
2322dc3d device
I ran command which adbwhich gave me the location of the adb that the previous command was using, in my case output was:
which adb
/usr/bin/adb
Then i ran whereis adb command which gave me the location of adb's:
whereis adb
adb: /usr/bin/adb /home/arefin/Android/Sdk/platform-tools/adb
/usr/share/man/man1/adb.1.gz
I get rid of this problem by moving the adb from /usr/bin directory with mv command: (meaning this is of no use thus instead of deleting just put in desktop),
/usr/bin$ `sudo mv adb /home/arefin/Desktop/`
After this i executed this command adb kill-server then ran adb devices. I found everything is fine this time.
My Android development related path in in $HOME/.profile file is, as below:
export ANDROID_HOME=/home/arefin/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$JAVA_HOME/bin
When encountered this error in Linux,I deleted the adb file in my
/usr/bin/
and replaced with one which located in path (usually in home path)
~/Android/Sdk/platform-tools/
and it worked.
As pointed out in previous answers, this is due to having multiple adb versions installed in your system. Probably one from the android-sdk-platform-tools installed via apt and other from Android Sdk itself (which is usually newer version).
The simplest way to solve this in Ubuntu (or Ubuntu-based OS's) is to add this line at the end of ~/.bashrc file:
alias adb='~/Android/Sdk/platform-tools/adb'
#Change path according to your Android Sdk installation directory
And then reopen terminal for changes to reflect.
This avoids the need to mess with system files as well.
Probably you have two versions of adb in two different locations in your system. The running server version is 39 and the adb client version is 40. You can resolve this by keeping only one adb in your PC.
You can figure it out as shown below-
In Linux below command gives you adb location if adb binary is added to path.
which adb
if adb is not added to path and still you are getting this error then search for adb using below command.
locate adb
if your adb client is other than above location, you may add newest version to above path and delete the old adb version.
If you are using windows, you figure it out the two adb locations and keep only at single place.
I know this is a little old, but if you have this problem and you have Vysor installed, then you can resolve it by looking in the Vysor application folder for the adb.exe (and Adb*.dll files) and replacing them from your Android SDK folder. I'm on a Windows machine and the relevant paths for me were:
Vysor
C:\Users\\AppData\Roaming\Vysor\crx\gidgenkbbabolejbgbpnhbimgjbffefm\app-2.1.7.crx-unpacked\native\win32*
(I'm guessing the path will vary according to the version, etc, but this will hopefully help figure it out.)
APK
C:\Users\\AppData\Local\Android\Sdk\platform-tools
On my machine, the relevant files were:
adb.exe,
AdbWinApi.dll,
AdbWinUsbApi.dll
After this, you will need to kill the existing ADB task as described in the other answers to this post.
Solved by
Open terminal in Android studio
adb kill-server
sudo cp ~/Android/Sdk/platform-tools/adb /usr/bin/adb
sudo chmod +x /usr/bin/adb
adb start-server
Run
tasklist | findstr adb
then kill the duplicate process
TASKKILL /PID "PID_NUMBER" /f
Encountered this problem myself, none of the solutions online worked for me.
did this by chance and it solved my problem!
I'm using Android Studio on a Macbook Pro.
first I tried to install adb from brew:
brew cask install android-platform-tools
then I uninstalled it:
brew cask uninstall android-platform-tools
After the last line adb didn't work in terminal but did work in Android Studio immediately! =D
posted so it may help someone else - good luck!
For ubuntu (more precise - kubuntu) i had the similar problem.
The problem was in android-studio, to fix it you need to do these steps:
Go to SDK-Manager
In SDK-Manager click the SDK Tools menu.
Uncheck "Android SDK Command-line Tools (latest)"
I had the same issue connecting to my SFTP Server app and could solve it as follows:
The error was caused (in my case, Ubuntu 18.04.5 LTS) by conflicting adb installations. One Installation coming with AndroidStudio (IntelliJ) located in .../Sdk/platform-tools and one coming with the package manager installation apt install located in the standard directory for executables /usr/bin. The installation location for AndroidStudio (IntelliJ) can be found in the AndroidStudio (IntelliJ) Menu: Tools → Android → SDK Manager: Android SDK Location. And the installation location related to the package manager can be found invoking the command which adb.
And the solution to this problem is to uninstall one of them.
Depending on your use case, if you’re most of the time working with AndroidStudio (IntelliJ) (and this version is up to date), then remove the (outdated) version installed with the package manager as follows.
To uninstall first find out which packages relates to /usr/bin/adb with the following command: dpkg -S /usr/bin/adb.
And then call apt autoremove adb to uninstall the adb package and all its dependencies.
And last but not least in order to still being able to call adb from the command line update the PATH variable in “/etc/profile”, if it should be accessible for all users, or ~/.bash_profile or ~/.profile (whichever exists) if it should only be accessible for the current user and append the path “.../Sdk/platform-tools” (that you looked up above) at the end. And then reboot or log-out & log-in for the new path to get applied.
In ubuntu
delete the adb
-> usr/bin
-> (delete command) sudo rm -rf /usr/bin/adb
Android/Sdk/platform-tools/adb
-> copy this folderpath.
paste into
->usr/bin
->(paste command) sudo ln -s /home/yourfile/Android/Sdk/platform-tools/adb /usr/bin
restarting your system, would also work for you.
I have faced the following error and what worked in my case was just to restart the system.
could not read ok from ADB Server
* failed to start daemon
error: cannot connect to daemon code here
adb.exe: failed to check server version: cannot connect to daemon
I had a similar error. Two different adb versions were conflicting with each other which caused it to keep restarting.
Run this command in terminal => where adb.exe
This will show you where the different adb files are. You can look at the file property date to see which is the latest one. Then copy the latest one and use it to overwrite/replace the older one(s). This will make both adb versions be the same and prevent a conflict.
This generally happens when there are two adb paths are available. Uninstall one will help
--> npm uninstall adb
This worked in my case.
None of the other solutions worked for me - Windows/WSL2-Ubuntu
The error is misleading but for me it was cos the adb port 5037 was in use.
Solution: find and kill the process using port 5037
Windows: netstat -aon | findstr 5037 and Stop-Process -Id <id-from-netstat>
WSL will attempt to connect to Windows port 5037
In my case wsl Ubuntu has different adb --version than Windows, I don't have to keep my Android Studio latest(since this might not your choice and do not guarantee same version as apt) or try with $PATH(wsl run Windows exe is not make sense).
The solution is simple, I download both Linux and Windows SDK Platform-Tools from official site which guarantee same version, then invoke relevant adb on each platform.
In my case I'd installed "AirDroid" on my windows machine and it runs "AirDroid_adb.exe", I had to kill that to get things to work. I have reported that they are using an old version of adb and they will hopefully fix it.
A Working Simple Answer for Windows:
make sure you have the sideload file (whatever.bin) in a sub directory of your adb executable.
make sure your adb executable folder, and sub directories are in PATH (look up DOS commands for PATH in Windows)
open a command prompt in the same directory as the sideload file
enter your command for example:
adb sideload mynewrom-5.4.3.2.1.bin
(Your device needs to be in recovery - sideload state before you send)

Bat to run Android_Server from cmd & extra window for port forwarding

2 Questions, first is most important. 2nd is an issue that im stumped on.
First is a script for Android_Server
second is Android_Server version vs IDA compatibility.
First Question:
my goal is to run a bat file to push android_server to 1 device connected to usb or using wifi adb server on device, then run some commands in adb & dos cmd line while keeping this window open to run the Android_server for IDA. A second window needs to opened! closed after it forwards port. adb forward tcp:23946 tcp:23946 (this is the forwardport.bat)
#echo off
adb kill-server
echo [*] Pushing Android Server To Device...
adb push Android_Server /data/local/tmp/
adb shell chmod 755 /data/local/tmp/android_server
echo [*]
echo [*] Adding Super User... For Android_Server
adb shell
su
echo [*]
echo [*] Now Starting (Debug Server)...
adb /data/local/tmp/./android_server
start cmd.exe forwardport.bat
Pause
my issues are that it dont pause long enough when doing adb shell then su, it starts the server then trys to su, im stuck here so my script fails as im using cmd line & not used to sharing adb & cmd line commands together. what ever creative way this can be made would be awesome.
Second Question:
I know Android_Server is 32bit. using IDA 6.5 64bit I have android_server 1.14 & 1.17
I can only get android_Server 1.14 to work on IDA 6.5 32bit.
If I try to use IDA 6.5 64bit it wont allow me to load either 1.14 or 1.17 so I cant use IDA 6.5 64bit to debug arm processes at all.
Using IDA 64bit: v1.14 does a popup window in IDA says: Warning Incompatible debugging server: protocol version is 14, expected 17
This is what it says when using IDA 64bit switching to v1.17: says nothing on IDA only android_server cmd line window says:
IDA Android 32-bit remote debug server v1.17. Hex-Rays 2004-2013
Listening on port #23946...
Accepting connection from 192.168.0.27
Incompatible IDA version
Closing connection from 192.168.0.27
my goal is to only use IDA 64bit not 32bit. trying to figure out if its the android_server or Android NDK wrong version installed. as I have the full android SDK installed over 20gb Android 1.5-5.0, but only android-ndk-r10b do I need other versions of NDK?
Thanks for any help with either question.

Start an App right after login - Mono / Windows Forms

I tried many different ways to add an executable (winforms) created in C# using mono to start automatically after login, but any attempt was not right.
Does anyone know how can I do it? I'm running a Raspbian (Raspberry Pi).
Thanks since now!
I guess your idea was to launch the app in the desktop, but if you need it as a "kiosk", I always use:
Steps to configure the Raspberry Pi to run as a kiosk with the presentation
Software setup
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mono-complete xutils
To avoid the screen turning off
sudo nano /etc/X11/xinit/xinitrc
And now in the editor, append:
setterm -blank 0 -powersave off -powerdown 0
xset s off
xset -dpms s off
mono /path/to/your/assembly.exe
Auto start as kiosk
sudo nano /etc/rc.local
And now in the editor, replace contents with:
/bin/bash startx &
exit 0
Make sure that in sudo raspi-config start mode is configured as console
I finally found a solution. I created a myprogram.desktop and I added it to the directory /home/pi/.config/autostart. Please make sure if it exists. If don't, it is needed to create a folder called autostart and add the file there.
The myprogram.desktop should looks like:
[Desktop Entry]
Name=myprogram
Type=Application
Comment=It runs my app.
Exec=/home/pi/myprogram.exe

Resources