Knowledge base2018-09-26T11:12:07+00:00

Knowledge base

You’re in the right place. A lot of knowledge about URVE in one place.

How to rotate screen on URVEBoard A17 linux with X server ?2018-10-24T03:18:23+00:00
Add to  /etc/init.d/
sleep 1 && DISPLAY=:0.0 xrandr –output HDMI-1 –rotate left –fb 1080×1920  
And make new file
touch /usr/share/X11/xorg.conf.d/60-server.conf 
Section “ServerFlags”
Option “BlankTime” “0”
Option “StandbyTime” “0”
Option “SuspendTime” “0”
Option “OffTime” “0”
How to merge VMWARE virtual disk files into one?2018-10-06T21:18:30+00:00

Use this command:

vmware-vdiskmanager.exe” -r “source.vmdk” -t 0 “result.vmdk”

It’s good idea to do defragmentation of linux drive before merging:

sudo e4defrag /dev/sda1; cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill

How to upgrade URVEPlayer on Android?2018-10-03T08:16:44+00:00

There are more than three ways for it:

  1. Using menu locally on player (in this scenario player need to have access to our internet webpage):
    1. Connect mouse and reboot board.
    2. While URVEPlayer is starting there are few seconds to enter menu.
    3. Move your mouse from left to right or from  right to left (while R from URVE logo is red)
    4. Enter password (1981).
    5. Choose “Upgrade player”.
  2. Remotely from LAN Windows based PC:
    1. Download URVE Config
    2. Click link below “Newest player available”. It will download newest “URVEPlayer for Android” locally.
    3. Add player IP address with “+” button, click on IP address
    4. Click “Update player”. It should upgrade player on remote URVEBoard.
  3. Bulk upgrade (many players at once) from LAN Windows based PC:
    1. Download URVE Config
    2. Then run RemoteConfig2.exe.
    3. Add list of IP addresses one by one.
    4. Click Update all.
    5. You should have newest URVEPlayer.APK inside tools directory. To download it automatically from our website, use URVE Config and click link below “Newest player available”.

How to rotate screen on X11, play video over html5 page displayed in QT app2018-09-18T09:09:10+00:00




export DISPLAY=:0.0

export URVE_KMS_X=550
export URVE_KMS_Y=40
export URVE_KMS_W=400
export URVE_KMS_H=720

case $1 in
##nohup ./Carmachine &
##wylacza wygaszanie ekranu
xset s off -dpms
##obraca ekran i ustawia odwrotna rozdzialke
xrandr –output HDMI-1 –rotate left –fb 1080×1920
nohup /home/root/test1 “” &
nohup gst-launch-1.0 -v filesrc location=”/home/root/” ! qtdemux ! h264parse ! mppvideodec ! rgaconvert ! “video/x-raw,format=BGRA” ! rgaconvert hflip=false vflip=false rotation=270 output-io-mode=dmabuf capture-io-mode=dmabuf ! kmssink connector-id=78 display-ratio=false &
killall test1
killall gst-launch-1.0

GStreamer cheatsheet2018-09-18T00:58:43+00:00

# Plays hardware accelerated video on HDMI (works from URVE Linux 2.0)

URVE_KMS_X=0 URVE_KMS_Y=0 URVE_KMS_W=1920 URVE_KMS_H=300 DISPLAY=:0.0 gst-launch-1.0 -v filesrc location=”/home/root/” ! qtdemux ! h264parse ! mppvideodec ! kmssink connector-id=78 display-ratio=false

# on LVDS (display-ratio=false is for disable aspect ratio)

URVE_KMS_X=0 URVE_KMS_Y=0 URVE_KMS_W=1920 URVE_KMS_H=300 DISPLAY=:0.0 gst-launch-1.0 -v filesrc location=”/home/root/” ! qtdemux ! h264parse ! mppvideodec ! kmssink display-ratio=false

# Plays video on different device than KMSSink (areas, etc). On A17 only 720p is supported with software videoconvert

DISPLAY=:0.0 gst-launch-1.0 -v filesrc location=”/home/root/” ! qtdemux ! h264parse ! mppvideodec ! videoconvert n-threads=4 ! fbdevsink

How to backup and restore (migrate) postgres database?2018-09-10T17:48:39+00:00

@SET PGUSER=postgres

We need to export everything to all.sql

pg_dumpall > all.sql

Then, on new server we need to close all database connections:



SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'urve'; DROP DATABASE "urve";

C:\URVE\Server\bin>psql -d urve -f e:\all.sql


That's all.

How to make OWNCLOUD works over the internet ?2018-09-07T19:30:14+00:00

You need to edit config.php file, like this and add $_SERVER[‘HTTP_HOST’]

nano /var/www/owncloud/config/config.php

array (
0 => ‘’,

How to get newest sourcecode in Yocto package?2018-10-26T05:00:47+00:00

#in .bb file

SRC_URI = “git:///home/urve/Desktop/gstreamer-rockchip”


# after sourcecode changes

git commit -a
bitbake -c clean gstreamer1.0-rockchip
bitbake -f -c compile gstreamer1.0-rockchip
bitbake qt5-image

#having problems with license file checksum? add to recipe this line


How to play udp stream on Linux URVEBoard?2018-09-02T23:10:15+00:00

On PC:

C:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe -v dx9screencapsrc ! queue ! videoconvert ! videoscale ! video/x-raw,width=1920,height=1080 ! x264enc tune=zerolatency bitrate=2048 pass=qual threads=4 ! video/x-h264, profile=high, clock-rate=100000 ! h264parse config-interval=10 ! rtph264pay pt=127 config-interval=10 ! udpsink host= force-ipv4=true port=5001

echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
echo performance > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor


sysctl -w net.core.rmem_max=8388608
sysctl -w net.core.wmem_max=8388608
sysctl -w net.core.rmem_default=65536
sysctl -w net.core.wmem_default=65536
sysctl -w net.ipv4.tcp_rmem=’4096 87380 8388608′
sysctl -w net.ipv4.tcp_wmem=’4096 65536 8388608′
sysctl -w net.ipv4.tcp_mem=’8388608 8388608 8388608′
sysctl -w net.ipv4.route.flush=1

sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.rmem_default=8388608


sysctl -w net.core.rmem_max=10485760


DISPLAY=0:0.0 gst-launch-1.0 udpsrc uri=udp:// port=5001 ! application/x-rtp, payload=127 ! rtpjitterbuffer latency=1500 ! rtph264depay ! h264parse ! queue ! mppvideodec ! kmssink connector-id=78


DISPLAY=0:0.0 gst-launch-1.0 udpsrc uri=udp:// port=5001 ! application/x-rtp, payload=127 ! rtpjitterbuffer latency=1500 ! rtph264depay ! h264parse ! queue ! mppvideodec ! kmssink connector-id=98



ffmpeg -hwaccels

give drm

ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i /tmp/ -f null – -benchmark

ffmpeg -hwaccel drm -hwaccel_device /dev/dri/card0 -c:v h264_rkmpp -i /tmp/ -f null – -benchmark

gives 400 fps for 720 and 200 for 1080p


#MPV trials (on A72)

mpv –hwdec=rkmpp –vo=gpu –gpu-api=opengl –no-audio –gpu-context=drm –drm-connector=89 /tmp/

#A17 hardware decoding
mpv –vo=gpu –gpu-context=drm –hwdec=rkmpp ./1.mp4

#A17 hardware decoding (ffmpeg server must be started later)
DISPLAY=:0 mpv –vo=gpu –gpu-context=drm –hwdec=rkmpp udp://
#PC: (1440×900)
ffmpeg–.exe -rtbufsize 902000k -pix_fmt yuv420p -fflags nobuffer -flags low_delay -framerate 30 -re -f dshow -i video=”screen-capture-recorder” -vcodec libx264 -vsync drop -profile:v main -preset ultrafast -tune zerolatency -x264opts crf=21:vbv-maxrate=4200:vbv-bufsize=4000:intra-refresh=1:slice-max-size=5500:keyint=10:ref=1 -threads 0 -an -f mpegts “udp://”

How to install ffmpeg on x86 Debian?2018-08-19T10:35:01+00:00

Two options:

  • Install avconv

apt-get install libav-tools

Then we “avconv” command which is almost compatible with ffmpeg.

  • Install real ffmpeg

echo deb testing main non-free >>/etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring
apt-get update
apt-get upgrade
apt-get install ffmpeg



Flashowanie komputerów x86 programem Paragon2018-08-18T16:43:36+00:00


Link do obrazu pendrive z obrazami dla MZA dla komputerów dostarczonych przez Macrosystem. Aby przenieść obraz na pendrive należy użyć aplikacji ….Paragon…..
W tej chwili plik zawiera obraz Linuxa i Windows (do wyboru podczas odtwarzania dysku)

[Download not found]

Instrukcja odtwarzania dysku komputera z Linuxem

  1. Bootujemy pendrive z Linuxem (klawisz bootowania F11)
  2. Wybieramy domyślną opcję bootowania
  3. W ekranie powitalnym Clonezilla naciskamy enter
  4. Wybieramy obraz o nazwie 2016-07-25-14-img-stable 2016-0725-1420_sda_60.0GB
  5. Następnie potwierdzamy wpisując klawiszem Y i zatwierdzamy klawiszem Enter
  6. Po zakończonym procesie komputer uruchomi się ponownie
  7. Po wystartowaniu systemu zobaczymy czarny ekran, konieczne będzie przejście do konsoli kombinacją klawiszy Ctrl+Alt+F3 lub Ctrl+Alt+F4
  8. Zostaniemy automatycznie zalogowani na użytkownika urve, konieczne jest przelogowanie na roota wpisując polecenie su root, hasło to 1981

  9. Następnie wpisujemy mount -o remount,rw / i zatwierdzamy Enterem

  10. Teraz wpisujemy mount /dev/sdb2 /media/pendrive
  11. Sprawdzamy czy zamontowaliśmy dobry pendrive wpisując ls /media/pendrive
  12. Jeśli zobaczymy autorun.ico autorun.inf boot itd. to jest to zły pendrive i musimy go odmontować wpisując umount /media/pendrive i zamontować drugiego poleceniem mount /dev/sdc1 /media/pendrive
  13. Wykonujemy instalację playera wpisując komendę /media/pendrive/

  14. Po instalacji konfigurujemy player wpisując komendę python configurator.pyc
    Adres serwera to:
    Nazwa playera: numer boczny autobusu
    Player id: zostawić puste
  15. Po skonfigurowaniu wpisujemy komendę reboot -f
  16. Po ponownym uruchomieniu po chwili powinno pojawić się ogłoszenie z pracą dla kierowców oraz ogłoszenie “Weź paragon”

Instrukcja odtwarzania dysku komputera z Windows

  1. Bootujemy pendrive z Linuxem (klawisz bootowania F11)
  2. Wybieramy domyślną opcję bootowania
  3. W ekranie powitalnym Clonezilla naciskamy enter
  4. Wybieramy obraz o nazwie …………………
  5. Następnie potwierdzamy wpisując klawiszem Y i zatwierdzamy klawiszem Enter
  6. o zakończonym procesie komputer uruchomi się ponownie
  7. Po uruchomieniu systemu Windows wyłączamy player klawiszem ESC i zmieniamy za pomocą aplikacji konfiguracyjnej IP playera aby zostało ono pobrane z serwera. Po restarcie player jest gotowy do pracy.
How to configure IEEE8021X on ethernet connected Linux URVEBoard?2018-08-13T13:07:32+00:00

Add to

ip link set eth0 down;ifconfig eth0 hw ether 00:8A:0E:02:42:11; ifconfig eth0 up # only if you need to change MAC adddress
wpa_supplicant -i eth0 -c /etc/wpa_supplicant.conf -D wired   # this will run

and add lines below to /etc/wpa_supplicant.conf



Files with certificates should be in format :










How to change MAC address of Linux URVEBoard?2018-08-06T04:57:36+00:00

while booting (/etc/init.d/

ip link set eth0 down;ifconfig eth0 hw ether 00:8a:0e:02:45:90; ifconfig eth0 up

# static IP address setting

ifconfig eth0 netmask broadcast gateway
ip route add default via


How to use URVEBoard SDK with linux based URVEBoards?2018-06-26T02:57:04+00:00

Default login is root without password. You can use our USB => RS232 => URVEBoard debug UART” dongle to check IP address with “ifconfig”. You need to run terminal (PuTTY for example), use right COM port and set speed to 115200.

Right after you can start URVEBoard SDK which is UBUNTU with all tools needed to start porting or designing your new application. Ofcourse you can install other packages, it’s standard UBUNTU installation. Default user/password is urve/urve and you can optain root access with “sudo -i” and typing password “urve”.


INSTALLS += target
target.path = /root

to .pro file,

-platform eglfs

to arguments

Adding webbrowser to your app (chromium):

QT += webenginewidgets
target.path = /root
INSTALLS += target



#include "mainwindow.h"
#include <QApplication>
#include <QWebEngineView>

QUrl commandLineUrlArgument()
const QStringList args = QCoreApplication::arguments();
for (const QString &arg : args.mid(1)) {
if (!arg.startsWith(QLatin1Char('-')))
return QUrl::fromUserInput(arg);
return QUrl(QStringLiteral(""));

int main(int argc, char *argv[])
QApplication app(argc, argv);

QWebEngineView view;
view.resize(1280, 1000);
return app.exec();


How to hide error message when playing video?2018-06-22T13:53:31+00:00




/* If an error handler has been supplied, use it and finish. */
if (mOnErrorListener != null) {
if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err)) {
return true;

return true;


How to turn off HDMI and turn on HDMI when needed?2018-06-12T16:07:37+00:00

Turn off

# echo 4 > /sys/class/graphics/fb0/blank

Turn on

# echo 0 > /sys/class/graphics/fb0/blank

How to enable stay awake in AOSP ?2018-06-12T16:07:59+00:00

In file /frameworks/base/packages/SettingsProvider/res/values/defaults.xml


<!– Development settings –>
<bool name=”def_stay_on_while_plugged_in”>true</bool>

How to cleanup Windows directory?2018-03-27T09:16:17+00:00

Dism.exe /online /Cleanup-Image /StartComponentCleanup

How to add new extension (file type) to webmanager2018-03-25T17:12:38+00:00

File urve/protected/config/file_extensions.php

‘media_file_extensions’ => array(‘jpg’, ‘jpeg’, ‘gif’, ‘png’, ‘bmp’, ‘pdf’, ‘pps’, ‘avi’, ‘mpg’, ‘mpeg’, ‘mp4’, ‘mov’, ‘wmv’, ‘swf’, ‘mp3’, ‘pptx’, ‘ppsx’, ‘ppt’, ‘exe’, ‘sh’, ‘html5’, ‘jar’, ‘tif’, ‘tiff’, ‘m4v’, ‘webm’, ‘doc’, ‘docx’, ‘ogv’, ‘ps1’, ‘qt’),
‘allowed_media_file_extensions’ => array(‘jpg’, ‘jpeg’, ‘gif’, ‘png’, ‘bmp’, ‘pdf’, ‘pps’, ‘avi’, ‘mpg’, ‘mpeg’, ‘mp4’, ‘mov’, ‘wmv’, ‘swf’, ‘mp3’, ‘pptx’, ‘ppsx’, ‘ppt’, ‘exe’,’sh’, ‘html5’, ‘jar’, ‘tif’, ‘tiff’, ‘m4v’, ‘webm’, ‘doc’, ‘docx’, ‘ogv’,’zip’, ‘ps1’, ‘qt’),
‘movie_file_extensions’ => array( ‘avi’, ‘mpg’, ‘mpeg’, ‘mp4’, ‘mov’, ‘wmv’, ‘mp3’, ‘m4v’, ‘webm’, ‘ogv’),
‘image_file_extensions’ => array(‘jpg’, ‘jpeg’, ‘gif’, ‘png’, ‘bmp’, ‘tif’, ‘tiff’)

How to set IP address manually?2018-03-18T07:42:58+00:00

Once it is disabled, use ifconfig to set your static, OR edit your /etc/network/interfaces file to include something like:

auto eth0
iface eth0 inet static

Run ifup -a to bring up the interfaces you have in your /etc/network/interfaces file.

How to remove ADB confirmation dialog2018-02-15T01:13:38+00:00

Yo need to add to build.prop (remount /system), files in /data/misc/adb/adb_keys and in AOSP source

In file add

public void onCreate(Bundle icicle) {

if (0==0)

if (SystemProperties.getInt(“service.adb.tcp.port”, 0) == 0) {
mDisconnectedReceiver = new UsbDisconnectedReceiver(this);

How to prepare Ubuntu for AOSP2017-12-09T17:53:03+00:00


Then add two new lines to the file :

deb trusty main universe
deb trusty-updates main universe

sudo apt-get install build-essential zlib1g-dev flex libx11-dev gperf libncurses5-dev bison lsb-core lib32z1-dev g++-multilib lib32ncurses5-dev u-boot-tools g++-4.4-multilib python lzop libxml2-utils

Since Oracle has moved the download link and requires login credentials to download older versions of java, follow the following steps to install java 7:

1) Download latest java version from You will need to login.

2) Delete jdk-7uXX-linux-x64.tar.gz from /var/cache/oracle-jdk7-installer/ where XX is the version number.

3) Move the downloaded version into /var/cache/oracle-jdk7-installer/ using the following command

sudo mv jdk-7u(downloadedversion)-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/

4) Now run the following command

sudo apt-get install oracle-java7-installer

update-alternatives –config javac

Choose Java version 7

How to compile Rockchip MPP library ( and

You need two NDKs, r14b and r16

$ git clone

Now enter build/android/cmake and modify file


# Run this from within a bash shell
HOST_IP=`hostname –all-ip-addresses`
if [[ ${HOST_IP} == *”″* ]] || [[ ${HOST_IP} == *”″* ]];

rm -rf build lib



${CMAKE} \
-H../../../ \
-B${PWD}/build \
-DANDROID_ABI=armeabi-v7a \
-DCMAKE_TOOLCHAIN_FILE=/data/mpp/android-ndk-r16/build/cmake/android.toolchain.cmake \
-G”Unix Makefiles” \

# —————————————————————————-
# usefull cmake debug flag
# —————————————————————————-
#–trace \
#–debug-output \

#cmake –build . –clean-first — V=1
cmake –build build

mv ${PWD}/lib/ ${PWD}/lib/
mv ${PWD}/lib/ ${PWD}/lib/
# —————————————————————————-
# test script
# —————————————————————————-
#adb push osal/test/rk_log_test /system/bin/
#adb push osal/test/rk_thread_test /system/bin/
#adb shell sync
#adb shell logcat -c
#adb shell rk_log_test
#adb shell rk_thread_test
#adb logcat -d|tail -30

$ ./ make-Android.bash
$ ./ make

How to make standalone Android toolchain2017-11-27T06:44:15+00:00

Download NDK r15c (less problematic with GStreamer) and

/data/local/build/android-ndk-r15c/build/tools$ ./ –platform=android-23 –install-dir=/home/clone/android-toolchain –toolchain=arm-linux-androideabi-4.9

How to check if GPU accelerate Video playback/encoding2017-11-24T22:05:18+00:00

When movie is being played/encoded type :

# cd /sys/kernel/debug/pm_genpd
# cat *

pd_gpu off
/devices/platform/ff9a0000.gpu suspended
pd_vdu off
/devices/platform/ff660000.rkvdec suspended
pd_vcodec off
/devices/platform/ff650000.vpu_service suspended

// suspended = software acceleration
// active = hardware acceleration

How to root Android board2017-11-17T18:21:05+00:00

If you have su binary it’s very easy 🙂

mount -o rw,remount /system
chmod 06755 /system/xbin/su
chown root:root /system/xbin/su
mount -o ro,remount /system

Combo: How to check temperature, CPU frequencies on RK33992017-10-27T04:11:15+00:00

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
cat /sys/devices/system/cpu/cpu4/cpufreq/stats/time_in_state
cat /sys/class/thermal/thermal_zone0/temp

How to hide “Unfortunately app has stopped.” dialog?2017-09-20T16:28:45+00:00


static final long DISMISS_TIMEOUT = 500 * 1;


WindowManager.LayoutParams attrs = getWindow().getAttributes();
attrs.y = -1000;

Add new package to AOSP2017-08-20T01:55:42+00:00


contains packages, for example


Copy /system/extras/su to another directory, modify file and change names, then you can compile aosp or this package only with command

# mmm

or clean and make

#mm -b

How to modify filesystem permissions in AOSP?2017-08-16T13:44:02+00:00

For Android 5.1.x it would be in file


static const struct fs_path_config android_files[] = {
{ 00440, AID_ROOT, AID_SHELL, 0, “system/etc/init.goldfish.rc” },
{ 00550, AID_ROOT, AID_SHELL, 0, “system/etc/” },
{ 00440, AID_ROOT, AID_SHELL, 0, “system/etc/init.trout.rc” },
{ 00550, AID_ROOT, AID_SHELL, 0, “system/etc/” },
{ 00550, AID_ROOT, AID_SHELL, 0, “system/etc/init.testmenu” },
{ 00550, AID_ROOT, AID_SHELL, 0, “system/etc/” },
{ 06755, AID_ROOT, AID_ROOT, 0, “system/xbin/su” },

For Android 6.1 and newer it has changed to /system/core/libcutils/fs_config.c file

How to modify su binary file2017-08-16T13:36:40+00:00

adb root

adb shell


# mount -o rw,remount /system
# chmod 755 /system/xbin/su
# chown root:root /system/xbin/su
# mount -o ro,remount /system



How to debug kernel “online” with dmesg2017-08-15T23:54:09+00:00

# while true; do dmesg -c; sleep 0.1; done

Minimum system requirements2017-08-07T22:35:38+00:00

The following OS are supported:

  • Microsoft Windows Server 2012 R2 (64-bit).
  • Microsoft Windows Server 2008 R2 (32-bit and 64-bit versions).
  • Microsoft Windows 7 with Service Pack 1 (32-bit and 64-bit versions)
  • Microsoft Windows 8.1 (32-bit and 64-bit versions)
  • Microsoft Windows 10  (32-bit and 64-bit versions)

PC or Server requirements:

1 GHz or faster 32-bit (x86) or 64-bit (x64) processor (2 GHz or faster is recommended)
1 GB RAM (2 GB or more is strongly recommended)
2 GB available hard disk space
A permanent network connection is not required but recommended

Hosting the application within VMWare Workstation and other VM software is also supported.

URVEScript commands2018-09-08T23:02:36+00:00

Play 1;

Plays dynamic clip with ID=1 (set in properties). It can take parameter with URL address if necessary. Example: Play 1;

Wait 1000;

Wait one second (1000 miliseconds) before running command after semicolon. Example Wait 1000; Play 1; will play clip with ID=1 after one second.

ChangeCollection Area_1 Playlist2 true true true true ;

Change playlist in area. Start now – True/False, Change onTop parameter for all clips in playlist – True/False, Force play (from begininning) of Playlist2 even if it is already played – True/False, Remember last clip and time on playlist before change – True/False

SetVolume 0; SetVolume 100;

Change player’s volume. 0 is silent, 100 max.

PlayPrevInArea Area_1;

Change clip in Area_1 to previous one. If player plays first movie clip, last will be played.

PlayNextInArea Area_1;

Change clip in Area_1 to next one. If player plays last movie clip, first will be played.

SyncPlay – play synchronized between URVE players2017-08-07T18:51:20+00:00

Both players Windows and Android can play synchronized video. If you want to use it, you need to enter Properties of selected video and set SyncPlay property to 1.

Windows 10: How to debloat OS?2017-07-30T16:53:14+00:00

Run powershell as Administrator

Set-ExecutionPolicy Unrestricted

Download script and run

Execute this command

Get-AppXPackage | where-object {$ –notlike “*store*”} | Remove-AppxPackage

How to use ADB when two or more devices connected ?2017-08-05T22:26:10+00:00
adb devices -l

and then

adb -s device_id shell


adb devices -l

List of devices attached device product:urveboard_v3 model:urveboard_v3 device:urveboard

adb -s shell

How to catch Segmentation Fault exception in Android?2017-04-25T02:20:06+00:00

void segfault_sigaction(int signal, siginfo_t *si, void *arg)
// we cannot use variables in here,

struct sigaction sa;
Cruntime::memset(&sa, 0, sizeof(struct sigaction));
sa.sa_sigaction = segfault_sigaction;
sa.sa_flags = SA_SIGINFO;
sigaction(SIGSEGV, &sa, NULL);



How to change CPU frequency (RK3399) ?2017-08-13T22:27:36+00:00

echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo userspace > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor

echo 408000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed
echo 408000 > /sys/devices/system/cpu/cpufreq/policy4/scaling_setspeed

# Way to list processes

top -m 10

# and cores

busybox mpstat -P ALL 1

# checking temperature

cat /sys/class/thermal/thermal_zone0/temp

How to check CPU temperature ?2017-08-05T22:25:39+00:00
echo $((`cat /sys/class/thermal/thermal_zone0/temp|cut -c1-2`)).$((`cat /sys/class/thermal/thermal_zone0/temp|cut -c3-5`))
How to change user and home directory2017-08-05T22:26:27+00:00

In file /etc/lightdm/lightdm.conf.d/20-lubuntu.conf change autologin-user=old_user  na  autologin-user=new_user and execute commands

sudo usermod -l new_user old_oser
usermod -d /home/new_user -m new_user

After reboot, new_user is new user name with new home directory.
How to start daemon by adb2017-08-05T22:26:46+00:00
adb shell su -c "/dir > /dev/null 2> /dev/null < /dev/null &"


shell su -c /data/local/tmp/

/data/local/tmp/daemon <portn_number> & 
How to use dual link lvds for 1920×1080 output instead of 1280×800?2017-08-05T22:26:54+00:00

Change /home/urve/Desktop/URVEBoardPOE/kernel/drivers/video/rockchip/hdmi/rockchip-hdmi.h

/* HDMI default vide mode */ /* HDMI_1280X720P_60HZ HDMI_1920X1080P_60HZ */

Change lines in  /kernel/arch/arm/boot/dts/lcd-b101ew05.dtsi with this template



* RockChip. LCD_B101ew05

/ {

disp_timings: display-timings {
native-mode = <&timing0>;
timing0: timing0 {
screen-type = <SCREEN_DUAL_LVDS>;
lvds-format = <LVDS_8BIT_1>;
out-face = <OUT_P888>;
color-mode = <COLOR_RGB>;
clock-frequency = <72000000>;
hactive = <1920>;
vactive = <1080>;
hback-porch = <200>;
hfront-porch = <36>;
vback-porch = <8>;
vfront-porch = <6>;
hsync-len = <10>;
vsync-len = <6>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
swap-rb = <0>;
swap-rg = <0>;
swap-gb = <0>;
cabc-lut = <
/*gamma = 2.0*/
0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
0x00000001 0x00000001 0x00000001 0x00000001 0x00000001 0x00000001 0x00000001 0x00000002
0x00000002 0x00000002 0x00000002 0x00000002 0x00000003 0x00000003 0x00000003 0x00000003
0x00000004 0x00000004 0x00000004 0x00000004 0x00000005 0x00000005 0x00000005 0x00000005
0x00000006 0x00000006 0x00000006 0x00000007 0x00000007 0x00000007 0x00000008 0x00000008
0x00000009 0x00000009 0x00000009 0x0000000a 0x0000000a 0x0000000b 0x0000000b 0x0000000b
0x0000000c 0x0000000c 0x0000000d 0x0000000d 0x0000000e 0x0000000e 0x0000000f 0x0000000f
0x00000010 0x00000010 0x00000011 0x00000011 0x00000012 0x00000012 0x00000013 0x00000013
0x00000014 0x00000014 0x00000015 0x00000016 0x00000016 0x00000017 0x00000017 0x00000018
0x00000019 0x00000019 0x0000001a 0x0000001b 0x0000001b 0x0000001c 0x0000001d 0x0000001d
0x0000001e 0x0000001f 0x0000001f 0x00000020 0x00000021 0x00000021 0x00000022 0x00000023
0x00000024 0x00000024 0x00000025 0x00000026 0x00000027 0x00000028 0x00000028 0x00000029
0x0000002a 0x0000002b 0x0000002c 0x0000002c 0x0000002d 0x0000002e 0x0000002f 0x00000030
0x00000031 0x00000032 0x00000032 0x00000033 0x00000034 0x00000035 0x00000036 0x00000037
0x00000038 0x00000039 0x0000003a 0x0000003b 0x0000003c 0x0000003d 0x0000003e 0x0000003f
0x00000040 0x00000041 0x00000042 0x00000043 0x00000044 0x00000045 0x00000046 0x00000047
0x00000048 0x00000049 0x0000004a 0x0000004b 0x0000004c 0x0000004d 0x0000004f 0x00000050
0x00000051 0x00000052 0x00000053 0x00000054 0x00000055 0x00000057 0x00000058 0x00000059
0x0000005a 0x0000005b 0x0000005d 0x0000005e 0x0000005f 0x00000060 0x00000061 0x00000063
0x00000064 0x00000065 0x00000066 0x00000068 0x00000069 0x0000006a 0x0000006c 0x0000006d
0x0000006e 0x00000070 0x00000071 0x00000072 0x00000074 0x00000075 0x00000076 0x00000078
0x00000079 0x0000007a 0x0000007c 0x0000007d 0x0000007f 0x00000080 0x00000081 0x00000083
0x00000084 0x00000086 0x00000087 0x00000089 0x0000008a 0x0000008c 0x0000008d 0x0000008f
0x00000090 0x00000092 0x00000093 0x00000095 0x00000096 0x00000098 0x00000099 0x0000009b
0x0000009c 0x0000009e 0x000000a0 0x000000a1 0x000000a3 0x000000a4 0x000000a6 0x000000a8
0x000000a9 0x000000ab 0x000000ac 0x000000ae 0x000000b0 0x000000b1 0x000000b3 0x000000b5
0x000000b6 0x000000b8 0x000000ba 0x000000bc 0x000000bd 0x000000bf 0x000000c1 0x000000c3
0x000000c4 0x000000c6 0x000000c8 0x000000ca 0x000000cb 0x000000cd 0x000000cf 0x000000d1
0x000000d3 0x000000d4 0x000000d6 0x000000d8 0x000000da 0x000000dc 0x000000de 0x000000e0
0x000000e1 0x000000e3 0x000000e5 0x000000e7 0x000000e9 0x000000eb 0x000000ed 0x000000ef
0x000000f1 0x000000f3 0x000000f5 0x000000f7 0x000000f9 0x000000fb 0x000000fd 0x000000ff>;

How to set HDMI rotation to portrait2017-08-05T22:27:18+00:00

# to rotate screen use
adb shell setprop persist.demo.hdmirotation portrait
# prevent lock rotation
adb shell setprop persist.demo.hdmirotationlock false
# to start mirroring only
shell setprop persist.demo.singledisplay true

#and after reboot
adb shell wm size 1080×1920

# to bring back landscape
adb shell setprop persist.demo.hdmirotation landscape
adb shell setprop persist.demo.hdmirotationlock true

How to map SMB network resource?2017-08-05T22:27:30+00:00

It’s as easy as typing:

busybox mount -o username=UserName,rw,noperm,iocharset=utf8,password=Password -t cifs // /data/media/0


How to start webbrowser with url specified by adb/shell command2017-08-05T22:27:38+00:00
 am start -a android.intent.action.VIEW -d
FFMPEG: How to stream H264 1080p 60fps to URVE Player2017-08-05T22:27:47+00:00

Simple batch with zeranoe ffmpeg build do the job. You need fast CPU

start “FFMPEG – Stream” /wait /MIN /HIGH utils\ffmpeg.exe -re -i “AnyMovieWith60fps.mp4” -vcodec libx264 -preset superfast -tune zerolatency -x264opts vbv-maxrate=12000:vbv-bufsize=1:slice-max-size=1500:keyint=60 -s 1920×1080 -threads 4 -r 60 -an -f mpegts “udp://”
timeout 5
goto 1

You can use URVE StreamServer to achieve reliable 24/h playback.

Converting TOleVariant to String2017-08-05T22:28:29+00:00


How to show contents of all variables in /sys/class subfolder2017-08-05T22:28:38+00:00

grep “” ./*

or recursively

grep -R “” ./*



How to change resolution permanently ?2017-08-05T22:29:00+00:00

In file /etc/rc.local add this line, thight after fist line.

echo 60 > /sys/devices/fb.7/graphics/fb0/fps
fbset -a -xres 1920 -yres 1080 -vxres 1920 -vyres 1080 -t 6434 168 88 60 4 60 5 -hsync high -vsync high

You can use for example Midnight Commander, which can be installed with

# apt install mc

How to install QT Creator directly on URVEBoard?2017-08-05T22:29:08+00:00

Open Terminal from UBUNTU desktop

$ sudo -i
# passwd

enter root password twice

# ifconfig

check IP address, use ssh console (Putty for example) and login as root with password provided with passwd command

# apt update
# apt upgrade
# apt-get install software-properties-common
# add-apt-repository ppa:ubuntu-sdk-team/ppa

confirm question

# apt-get update
# apt-get install qtcreator qt4-dev-tools

Now you can run QT Creator from system menu / Programming.

Sometimes QT Creator do not start at first time (you need to start it twice).

Now you need to configure GCC as your compiler. Make new project (widgets app). Projects -> Manage kits -> Build & Run. From Compilers sheet click Add -> GCC -> Browse -> /usr/bin/gcc -> Apply -> OK.

You can build your empty project now.

How to add file to android image before build?2017-08-05T22:29:17+00:00

In file


look for line with

PRODUCT_COPY_FILES += device/rockchip/rk3288/

and make similar line for new file

How to change framebuffer FPS in android?2017-03-18T16:22:54+00:00

# echo 60 > /sys/devices/fb.7/graphics/fb0/fps

How to change HDMI resolution2017-08-05T22:29:24+00:00

In the kernel source, we can see:


have include the lcd define: #include “lcd-b101ew05.dtsi”

so we change the file:


hactive = <1280>;
vactive = <800>;

change these two item for your use resolution,such as:

hactive = <1920>;
vactive = <1080>;

Rebuild the source and burn: resource.img and kernel.img to your board. If you want to change default Android resolution on HDMI port you need to change



How to compile kernel2017-08-05T22:29:33+00:00

Install the Cross Compile toolchain

# mkdir /usr/local/arm
# tar xvfj arm-eabi-4.6.tar.bz2 -C /usr/local/arm/
# export ARCH=arm
# export CROSS_COMPILE=/usr/local/arm/arm-eabi-4.6/bin/arm-eabi- 4. Compile the Source

After you have set the arm-eabi-4.6 compiler effective,then, # tar zxvf RK3288-kernel.tar.gz
# cd RK3288-kernel
# ./

How to change resolution on HDMI port?2017-08-05T22:29:41+00:00

Modify HDMI default resolution only need to modify kernel:

#define HDMI_VIDEO_DEFAULT_MODE HDMI_1280x720p_60Hz //HDMI_1920x1080p_60Hz

After the system is powered on

echo “1920x1080p-60” > /sys/class/display/HDMI/mode

Check current HDMI resolution: cat /sys/class/display/HDMI/mode
Check HDMI resolution supported list: cat /sys/class/display/HDMI/modes

Alternative method of hiding navigation bar2017-08-05T22:29:47+00:00

Hide command:

settings put global policy_control immersive.full=*

Show command:

settings put global policy_control null

How to shrink VMWARE virtual disk with android source2017-08-05T22:29:52+00:00

Defrag and zero fill /dev/sda1:

sudo e4defrag /dev/sda1; cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill

On vmware host run vmware_vdiskmanager with -k sda1.vmdk as in this example:

“C:\Program Files (x86)\VMware\VMware Workstation”\vmware-vdiskmanager.exe -k URVEBoardSDK.vmdk

How to use watchdog2017-08-05T22:29:55+00:00

Watchdog can be started by command echo 1 > /dev/watchdog. At this time if kernel do not get this command every 60 seconds, it will reboot PCBA. You can disable watchdog with command echo V > /dev/watchdog

How to recursively find something in AOSP2017-08-05T22:29:58+00:00

grep -iR ‘getDisplayInfo: displayId’ *
grep -iR ‘if (DEBUG)’ *

only in .h and .java files


grep -r –include=*.h –include=*.java ‘1280’ ./

How to rotate screen2017-08-05T22:30:02+00:00

Make /system writable ( mount -o remount,rw /system )

add in build.prop file


or you can do it when you modify AOSP source:

Add this line

echo “ro.sf.hwrotation=180”

to /home/urve/Desktop/EM3288Std/build/tools/


How to compile android image and kernel for RK3288 URVEBoard2017-08-05T22:30:07+00:00

You need some tools:

16GB RAM, 64 bit Ubuntu 12.04, 60GB dysku (najlepiej SSD)

In Ubuntu console:

sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
g++-multilib mingw32 tofrodos gcc-multilib ia32-libs \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386

sudo apt-get install ccache
sudo apt-get install openjdk-7-jdk
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin


Enter source directory

export USE_CCACHE=1
ccache -M 30G

cd kernel

make rockchip_defconfig
make -j4 rk3288-tb_8846.img
cd ..

make -j8



How to underclock/overclock RK3288 CPU2017-08-05T22:30:11+00:00

In kernel/arch/arm/boot/dts/rk3288-tb_8846.dts file there are lines that need to be changed

&clk_core_dvfs_table {
operating-points = <
/* KHz uV */
126000 900000
216000 900000
312000 900000
408000 900000
600000 900000
696000 950000
816000 1000000
1008000 1050000
//1200000 1100000
//1416000 1200000
//1512000 1300000
//1608000 1350000
//1704000 1350000
//1800000 1400000
support-pvtm = <1>;
pvtm-operating-points = <
/* KHz uV margin(uV)*/
126000 900000 25000
216000 900000 25000
312000 900000 25000
408000 900000 25000
600000 900000 25000
696000 950000 25000
816000 1000000 25000
1008000 1050000 25000
//1200000 1100000 25000
//1416000 1200000 25000
//1512000 1300000 25000
//1608000 1350000 25000
//1704000 1350000 25000
//1800000 1400000 25000

How to change CPU frequency to maximum2017-08-21T00:18:00+00:00

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo 1608000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed


or set scaling_governor to ondemand


echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

How to change most of default settings in AOSP2017-08-05T22:30:51+00:00

There are two files for it


How to switch off device and switch on with Wake On LAN2016-11-02T20:51:28+00:00

To switch off

echo mem >/sys/power/state

To switch off with Wake On LAN use any WoL software

How to change wallpaper in my AOSP2017-08-05T22:31:03+00:00

Change file in AOSP source “/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.jpg” and build your image

How to use external LEDs2017-08-05T22:31:07+00:00

Type in console:

echo 252 > /sys/class/backlight/rk32_bl/brightness # to light up green leds
echo 252 > /sys/class/backlight/rk_bl/brightness # to light up red leds

echo 0 > /sys/class/backlight/rk32_bl/brightness # to disable
echo 0 > /sys/class/backlight/rk_bl/brightness

How to check what frequency CPU has2017-08-20T21:29:55+00:00

Type in any console “cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state”

To check cpu cores usage :

# busybox mpstat -P ALL 1


How to run something while URVEBoard boots2017-08-05T22:31:15+00:00

Edit file /system/etc/, but before it you need to make /system directory writable “mount -o remount,rw /system”

Cheat sheet with some useful commands2018-08-19T18:18:27+00:00

How to check URVEBoard IP address

  • ifconfig eth0


  • tar -xjf /path/to/
  • tar -zxvf /path/to/archive.tar.gz

Compress directory to tar.gz

  • tar -zcvf archive-name.tar.gz directory-name

Compress directory with all hidden files

  • tar czf all.tar.gz ./.

use all cores

  • tar cf – ./. | pigz > all.tar.gz

Change system date and time

  • date -s 20170831.112800

Make more columns ADB

  • busybox stty cols 400

Generate resolution in linux

  • cvt 1440 900

Play stream with VLC hardware accelerated on Intel x86 board

  • cvlc –intf dummy –avcodec-hw=vaapi -v udp://@
  • mpv -vo=vaapi –hwdec=vaapi udp://
  • mpv -vo=vaapi:scaling=hq –hwdec=vaapi –fullscreen udp://   #rescale to fullscreen