Posts

How to run Helium Desktop on Linux

If you want backup your Android apps, the best application to do it is Helium.
To run it, you need execute an application on your Desktop

wget http://download.clockworkmod.com/carbon/carbon-linux.tgz
tar xzvf carbon-linux.tgz 
cd linux
./run.sh .   

You will see this error:

error: device not found
adb server is out of date. killing... README adb run.sh daemon started successfully README adb run.sh
error: device not found

Or this:

/data/app/com.koushikdutta.backup-1/base.apk
CLASSPATH=/data/app/com.koushikdutta.backup-1/base.apk app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2  &
exit

hammerhead:/ $ ^[[24;80R

If you see, the bash script has an issue. To solve it, execute the following lines on your terminal:

pkg=$(adb shell pm path com.koushikdutta.backup) 
pkg=$(echo $pkg | cut -d : -f 2 | sed s/\\r//g)
echo $pkg 
adb shell << EOF
CLASSPATH=$pkg app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2 $@ &
exit
EOF

You will see this message:

adb server version (31) …

How to enable bluetooth connection in anyremote on Ubuntu 17.10

As you can see in http://anyremote.sourceforge.net/tips-tricks.html , anyremote uses sdptool.
The issue is the following:

sdptool search --bdaddr local SP
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory

To enable it on Ubuntu 17.10, you need enable compatibility mode in /etc/systemd/system/dbus-org.bluez.service file replacing:

ExecStart=/usr/lib/bluetooth/bluetoothd
by
ExecStart=/usr/lib/bluetooth/bluetoothd --compat

After that, you must restart bluetooth daemon with the following command:

sudo systemctl daemon-reload
sudo systemctl restart bluetooth

Now, change permissions and run sdptool again:

sudo chmod 777 /var/run/sdp     
sdptool search --bdaddr local SP
Searching for SP on FF:FF:FF:00:00:00 ...

Enjoy it!

How to connect a bluetooth speaker to your Raspberry Pi 3 without GUI

First, you need to download all necesary applications:

sudo apt-get update && sudo apt-get install bluez pulseaudio-module-bluetooth python-gobject python-gobject-2 bluez-tools udev

Now, add our user (pi) to the Pulse audio group so we the user can play audio through it.

sudo usermod –a –G lp pi

Now, we need enable A2DP in our bluetooth configuration file /etc/bluetooth/audio.conf the following sentences:

[General]:
Enable=Source,Sink,Media,Socket

The next step is modify the Pulse daemon resampling method in /etc/pulse/daemon.conf
adding a new line after ;resample-method with the following info:

resample-method = trivial

To automate the bluetooth source to audio sink, we need to add a new configuration to udev init.d editing file /etc/udev/rules.d/99-input.rules and add this to the file:

SUBSYSTEM="input", GROUP="input", MODE="0660"

KERNEL=="input[0-9]*", RUN+="/usr/lib/udev/bluetooth"

Now, create a new folder where we going to run a …

How to stream rtsp videos or mp4 files throught python/flask + opencv

Image
First, you need to download the code to generate your site with flask. To do this, you can use the following @miguelgrinberg project to stream your webcam or image files with flask.

git clone https://github.com/miguelgrinberg/flask-video-streaming

In app.py you need replace:

from camera import Camera
by
from camera_opencv import Camera

Now, you must edit your video source from camera_opencv.py.
video_source = 0, means that you want to stream your webcam (/dev/video0)
You can edit it, by a file or a rstp url

If you replace 0 by 'video.mp4' you will probably get the following error:

Starting camera thread.
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/nboettcher/Downloads/rtsp/flask-video-streaming/base_camera.py", line 93, in _thread
for frame in frames_i…

How to install Matlab from iso files in Ubuntu Linux

Image
If you try mount the iso files, maybe you can't change the permissions to execute (read-only files).
Try to extract both isos with:

7z x namefileDVD1.iso
7z x namefileDVD2.iso

To run matlab installer you must change the permissions from two files:

chmod +x install
chmod +x bin/glnxa64/install_unix

If you execute "sudo ./install" probably you will get this message:

Preparing installation files ...
Installing ...
Finished.

That means that you may have problem with your jre environment.
Give the JRE path to the executable to run it:

sudo ./install -javadir "/usr/lib/jvm/java-8-openjdk-amd64/jre" 

If you don't know where is your JRE path, just find jre folders with:

locate jre

Enjoy it!















How to install Freeplane 1.6.x from github in Ubuntu 16.04

First, you need to clone the project form github:

git clone https://github.com/freeplane/freeplane.git

Now, to build it, you need to install grandle to create BIN folder where will be freeplane:

sudo apt-get install gradle
cd freeplane
gradle dist test
cd BIN
./freeplane.sh

Enjoy it!

How to configure a Matlab cluster in your lan

Image
First, you need to run admincenter to mange your cluster. It route should be there:

/usr/local/MATLAB/R2016a/toolbox/distcomp/bin/admincenter

Now, you must run mdce on each member node of your cluster

cd /usr/local/MATLAB/R2016a/toolbox/distcomp/bin
sudo ./mdce start    

WARNING: The mdce script detected that the number of processes allowed
is limited by ulimit. Be sure that the limit of processes for the ROOT user
(or the user running the mdce service) is set to either "unlimited"
or at least 128 * W, where W is the maximum number of MATLAB Distributed
Computing Server workers that will run on this machine.

Creating LOGBASE directory (/var/log/mdce).
Creating CHECKPOINTBASE directory (/var/lib/mdce).
Creating SECURITY_DIR directory (/var/lib/mdce/security).
Starting the MATLAB Distributed Computing Server in the background.

To choice who is the jobmanger or workers you need run each command by separate:

sudo ./startjobmanager
or
sudo ./startworker

Now, press Add or Find to add your clust…