Dietrich Schroff

Subscribe to Dietrich Schroff feed
Dietrich Schroffhttp://www.blogger.com/profile/18397485256708620180noreply@blogger.comBlogger517125
Updated: 3 hours 12 min ago

Using a custom bootloader for my smartphone: TWRP on Samsung Galaxy A3

Fri, 2020-04-03 15:09
I read about /e/ some days ago and i decided to install this on my old smartphone (a samsung A3).

So first: What is /e/?
https://doc.e.foundation/
So i started at

https://doc.e.foundation/devices/a3xeltexx/install
where i learned, that i have to install a custom bootloader on my smartphone. This is very good explained at /e/:

(You will find there the description how to install "heimdall" and "adb")

schroff@zerberus:~/bin$ sudo ./heimdall flash --verbose --RECOVERY ~/Downloads/twrp-3.3.0-0-a3xelte.img --no-reboot
Heimdall v1.4.2

Copyright (c) 2010-2017 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://www.glassechidna.com.au/donate/

Initialising connection...
Detecting device...
Manufacturer: "SAMSUNG"
Product: "Gadget Serial"

length: 18
device class: 2
S/N: 0
VID:PID: 04E8:685D
bcdDevice: 021B
iMan:iProd:iSer: 1:2:0
nb confs: 1

interface[0].altsetting[0]: num endpoints = 1
Class.SubClass.Protocol: 02.02.01
endpoint[0].address: 83
max packet size: 0010
polling interval: 09

interface[1].altsetting[0]: num endpoints = 2
Class.SubClass.Protocol: 0A.00.00
endpoint[0].address: 81
max packet size: 0200
polling interval: 00
endpoint[1].address: 02
max packet size: 0200
polling interval: 00
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
WARNING: Empty bulk transfer after receiving packet failed. Continuing anyway...
PIT file download successful.

Uploading RECOVERY
0%ERROR: Failed to unpack received packet.

ERROR: Failed to receive file part response!
3%
7%
10%
14%
17%
21%
25%
28%
32%
35%
39%
42%
46%
50%
53%
57%
60%
64%
68%
71%
75%
78%
82%
85%
89%
93%
96%
100%
RECOVERY upload successful

Ending session...
Releasing device interface...
and then:
For more information take a look at https://twrp.me/

Ubuntu: Disable screenlock after resuming from hibernation

Wed, 2020-03-18 14:46
There are many tutorials out there, how to disable the screen locking.

The problem with these solutions is, that still after resuming from hibernation / standby the screenlock is triggered.

To disable this behaviour you can check this:
schroff@zerberus:~/$ gsettings get org.gnome.desktop.screensaver ubuntu-lock-on-suspend
true
and then do:

gsettings set org.gnome.desktop.screensaver ubuntu-lock-on-suspend false
If you want to do it via gui you have to install dconf-editor
apt install dconf-editor
    Here you have to change the second last line "ubuntu-lock-on-suspend".

    Streaming a live-stream... [ffmpeg + vlc for m3u8]

    Sun, 2020-03-15 16:15
    After writing about how to stream a file to some smartphones or tablets, now the commands for streaming a live-stream to other devices.

    And like before: VLC is needed.


    But in addition to vlc you have to use ffmpeg:
    A complete, cross-platform solution to record, convert and stream audio and video.
    First thing you need is the url of the live-stream you want to re-stream. In my case is took the "Zweites Deutsches Fernsehen" (secondary channel of germany) and their url is
    https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8(In most of the tv channels it is something like "master.m3u8")
    m3u is the acronym for MP3 URL and m3u8 uses UTF-8.

    So the command for streaming is:
    ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - | vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep
     which consists of

    ffmpeg -i https://zdf-hls-01.akamaized.net/hls/live/2002460/de/high/master.m3u8 -c copy -f nut - which is piped into
     vlc - :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep(this is the command i build up in the last posting.)

    Have fun!

    Streaming a video file with vlc to other devices (like smartphones, etc.)

    Sun, 2020-03-15 03:29
    If you want to look a video on a tablet or smartphone (or laptop) and the file is on a server in your network, you can do this very easily with vlc.
    One big advantage: The video can be consumed by many devices - so the movie can be watched on e.g. 3 tablets...

    What do you have to do?
    Install vlc on your computer (i used a ubuntu laptop) and start vlc.
    Next step is to open the menu: media -> stream... (or press Strg-S):

    Then select the video on your disc with "+Add":
     After that click on "Stream" and this window will open:
     Click "Next" and then choose "HTTP" and press "Add"
     On the next window you have to enter the port and URL, where the devices have to connect to (in my example, the ip of my laptop was 192.168.178.39 - so the URL is 192.168.178.39:8080/test)
     Then you should select this setting and click on the wrench (="settings"):
     Here you have to select "Keep original audio track", otherwise audio will not work:

    Last window before the streaming starts:
    Copy the string to your clipboard
    :sout=#transcode{vcodec=h264,scale=Auto,scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/test} :no-sout-all :sout-keep
     After that install vlc on your device, start it and enter the URL:
     Press "Verstanden und weiter" ;-)
     and here we go:

    If you want to skip the wizard, just open vlc with the string from your clipboard
    (you have to escape the curled brackets!):

    vlc test.mp4 :sout=#transcode\{vcodec=h264,scale=Auto,scodec=none\}:http\{mux=ffmpeg\{mux=flv\},dst=:8080/test\} :no-sout-all :sout-keep

    Squid: How to setup a proxy...

    Sat, 2020-03-14 03:35

    If you are limited on bandwidth and you want to setup several machines, using a caching proxy will speed up your installation process significantly.



    What is a caching proxy:
    https://en.wikipedia.org/wiki/Proxy_server#Improving_performance

    But proxies have some issues, that you should be aware of:
    https://en.wikipedia.org/wiki/Proxy_server#Content-control_software

    If you are sure, to use a proxy, just enter these commands:

    root@zerberus:~# apt install squid
    Reading package lists... Done
    Building dependency tree      
    Reading state information... Done
    The following additional packages will be installed:
      libdbi-perl libecap3 squid-common squid-langpack
    Suggested packages:
      libmldbm-perl libnet-daemon-perl libsql-statement-perl squidclient squid-cgi
      squid-purge resolvconf smbclient winbindd
    [....]

    Unpacking squid (3.5.27-1ubuntu1.5) ...
    Setting up libecap3:amd64 (1.0.1-3.2) ...
    Setting up squid-langpack (20170901-1) ...
    Setting up squid-common (3.5.27-1ubuntu1.5) ...
    Setting up libdbi-perl (1.640-1) ...
    Setting up squid (3.5.27-1ubuntu1.5) ...
    [....]
    To check the default configuration you can use this command:
    (to suppress the documentation and comments)

    root@zerberus:/etc/squid# cat squid.conf |grep -v \# |grep -v -e "^$"

    acl SSL_ports port 443
    acl CONNECT method CONNECT
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports
    http_access allow localhost manager
    http_access deny manager
    http_access allow localhost
    http_access deny all
    http_port 3128
    coredump_dir /var/spool/squid
    refresh_pattern ^ftp:        1440    20%    10080
    refresh_pattern ^gopher:    1440    0%    1440
    refresh_pattern -i (/cgi-bin/|\?) 0    0%    0
    refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
    refresh_pattern .        0    20%    4320

    After the installation the squid process should be visible and listening to its default port 3128. Check this with
    netstat -lntup
    and you will find the following lines in the output:

    tcp6       0      0 :::3128                 :::*                    LISTEN      25638/(squid-1)     
    udp        0      0 0.0.0.0:45167           0.0.0.0:*                           25638/(squid-1)    
    udp6       0      0 :::45347                :::*                                25638/(squid-1)    

    To use this proxy just enter the proxy settings inside your system settings:


    After that all of your connections are made over your proxy. You can check this via the file /var/log/squid/access.log and /var/log/squid/cache.log.

    Review: Blockchain for dummies

    Fri, 2020-02-21 16:11
    The book "blockchain for dummies" provided by IBM contains 6 chapters on 41 pages. (Download from IBM)

    The chapters 1 & 2 describe the basic of blockchain technology.
    From my point of view, this part is a bit too shallow, because there is no single formular inside this book ;-)
    But there are some nice illustrations given:

    and the differences between a public blockchain and corporate blockchains are good explained including their  consequences.

    Chapter 3 is about where companies can use blockchains. This chapter i did not understand. It is all about frictions which companies have to overcome. But these frictions are not special to blockchain (like "innovation restrictions").

    In chapter 4 some examples are shown. These examples are very universal examples, which are too abstract in my eyes.

    Chapter 5 contains information about a project of the Linux Foundation: Hyperledger.
    This is very nice opening for https://www.hyperledger.org/.

    Chapter 6 comes up with ten steps to your first blockchain application.
    Skippable.

    My conclusion: a very nice book and really ok for free. But I wouldn't spend any money on it...

    Oracle BPEL: What's up with it?

    Fri, 2020-01-31 15:22
    Nearly 20 years ago there was a new standard for modelling business processes: BPEL (https://en.wikipedia.org/wiki/Business_Process_Execution_Language)
    Oracle bought Collaxa and released the Oracle BPEL Process Manager.
    In 2009 i wrote some posts over tutorials, which where from collaxa and which were very useful for starting with Oracle BPEL product:
    http://dietrichschroff.blogspot.com/search?q=lost+collaxa

    And what is left today?

    The product is still listed on Oracle homepage:

    And there is a section with some "news":


    But the version number 10.1.3.4 is not really somehing new and if you open the white paper you will see:

    I think a whitepaper from 2014 is not really something new. 

    If you take a look on the BPEL specification at oasis (http://docs.oasis-open.org/wsbpel/2.0/OS/wsbpel-v2.0-OS.html), you can see, that there was no update to the BPEL standard for more than 10 years. 

    It is very sad, that this concept of modelling processes in a graphical way was unsuccessful...

    Oracle VM Server: OVMAPI_2005E and OVMEVT_003503D_000

    Sat, 2020-01-25 07:16
    In my OVM environment i was trying to delete a server from a pool and this did not work. The error i got signalled was:
    OVMAPI_2005E "[ServerDbImpl] xx:yy:zz:... (oraclevm)" contains a component "xx:yy:zz:..." in error. Error event: server.cluster.failure., Summary: Server Cluster Failure, Description: Failed to leave cluster OVMEVT_003503D_000 Server reboot is required.. I rebootet the server: still the same error.
    I rebootet the ovm manager: still the same error.

    Then i realized, that there was a red cross at my server:

    The solution was: Select events from the drop down for this server:

    There i had to "Acknowledge" the events and after that i was able to remove the server without any further error...

    Oracle VM Server: Pool is locked forever

    Mon, 2019-12-23 15:27
    If you are using Oracle VM Server it is possible that you are hitting the following problem:

    After changing something on a server pool the pool gets locked and the lock stays there:
    Even a reboot of your OVMM (oracle vm manager) does not remove the lock.

    The solution can be very easy:
    Just edit the pool and add (or change) the description.

    This edit triggers an update and removes the lock. I think every other change would do the job, but this is a minimal change, which solves the problem...

    Hopefully there will be an update, so this problem will disappear in future versions.


    Microsofts Visual Studio Code on Linux

    Tue, 2019-12-10 14:04
    On the last weekend i was wondering, what kind of IDE i can use for doing some small programs with javascript. My first idea was eclipse, but a friend mentioned Microsofts Visual Studio Code:
     So i opened https://code.visualstudio.com/ and got
    So i downloaded the .deb and after a dpkg -i of that file i was able to run Visual Studio Code on my Linux machine:
    schroff@zerberus:~$ code 
    The startup was amazing fast - less a second.

    Within Visual Studio Code it is very easy to install some extensions:

    Running a small javascript program is very easy. I just entered these lines and without any further configuration running the program or debugging was no problem:


    Linux ser2net: no connection to /dev/ttyUSB0

    Sun, 2019-12-01 13:17
    If you are running some java application on a Linux box (especially ARM architecture) and this application accesses the serial interface (/dev/ttyUSB0, /dev/ttyUSB1 or just /dev/ttyX), then a easy way to do this, is running ser2net.

    For all who are not familiar with the serial port:
    https://en.wikipedia.org/wiki/Serial_port



    But there is one tricky thing, you have to consider when using ser2net:

    Inside ser2net.conf you will find some lines like this here:

    15000:raw:0:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT
    This means: on port tcp 15000 you can access the serial port /dev/ttyUSB0 (if you have a USB to serial adapter in place).

    If this does not work, check the ports with

    root@ubuntu:/home/ubuntu/dfld# netstat -lntup |grep ser2net
    tcp6       0      0 :::15000                :::*                    LISTEN      1361/ser2net       
    As you can see, it only listens on TCP6. So you have to reconfigure this to


    127.0.0.1,15000:raw:0:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT
    If you only want to access this on localhost (which is very nice security enhancement ;-) ).
    And after a restart of ser2net everything works like expected:


    root@ubuntu:/home/ubuntu/dfld# netstat -lntup |grep ser2net

    tcp        0      0 127.0.0.1:15000         0.0.0.0:*               LISTEN     

    How to run a java software which needs RXTX on a raspberry pi

    Sat, 2019-11-23 12:35
    In my last posting i wrote about migrating my aircraft noise measurement station to alpine linux. There i had some problems with getting the RXTX library for Java running on a linux, which uses musl and not GNU libc6.

    Why does my java application require RXTX? As stated on the RXTX page:
    RXTX is a Java library, using a native implementation (via JNI), providing serial and parallel communication for the Java Development Toolkit (JDK).Now i wanted to move to a raspberry pi. But this runs on ARM and the RXTX is only provided for x86/x64 systems.

    But there is another way: ser2net


    With this proxy /dev/ttyUSB0 can be mapped to a tcp port and java can access this without using RXTX.

    Alpine Linux, Oracle Java JDK and musl?! - why it does not work...

    Sun, 2019-11-17 06:45
    Sometime ago i did some work with Alpine Linux (s. here) and i was impressed how tiny this Linux distro was and how fast it was running.


    So i decided after nearly 6 years of running an aircraft noise measuring station (for dfld.de) with Ubuntu to change to Alpine Linux.

    This station runs a software on Java and needs RXTX, because the microphone is connected via USB and is read over /dev/ttyUSB0.

    What is the problem with this setup?
    • RXTX needs a Java which is running on glibc
    • Alpine Linux does not run on glibc
    If you are not aware of this problem, you get some errors like
    ./javaash: java: command not foundand this happens even if you are in the right directory and java got the execute bit configured.

    Alpine Linux changed to musl:
    There are some other libc implementations (take a look here).
    The homepage is https://www.musl-libc.org/:

     And a comparison to other libc can be found at http://www.etalabs.net/compare_libcs.html:

    There are some workarounds to get applications build with glibc running on Alpine Linux, but i did not get to run my aircraft noise measuring station - i switched to Debian - because i needed a 32bit Linux for my very old UMPC...


    Oracle Cloud: Feature Set

    Sun, 2019-11-10 04:34
    For all readers, who want to get a short overview to the services which can be configured inside Oracle Cloud, here a walkthrough the menus.
    The Main menu shows the following items:
    • Core infrastructure
      • Compute
      • Block Storage
      • Object Storage
      • File Storage
      • Networking 
    • Database
      • Bare Metal, VM, and Exadata
      • Autonomous Data Warehouse
      • Autonomous Transaction Processing
      • Data Sale
      • Exadata Cloud Connector
    • Solution and Patterns
      • Analytics
      • Resource Manager
      • Email Delivery
      • Application Integration
      • Monitoring
      • Developer Services Marketplace
    • Governance and Administration
      • Account Management
      • Identity
    Inside the Compute item the following services can be found:
    • Compute
      • Instances
      • Dedicated Virtual Hosts
      • Instance Configurations
      • Cluster Networks
      • Autoscaling Configurations
      • Custom Images
      • Boot Volumes
      • Boot Volume Backups
    • Block Storage
      • Block Volumes
      • Block Volume Backups
      • Volumes Groups
      • Volume Group Backups
    • Object Storage
      • Object Storage
      • Data Transfer
    • File Storage
      • File Systems
      • Mount Targets
    • Networking
      • Virtual Cloud Networks
      • Dynamic Routing Gateways
      • Customer-Premises Equipments
      • IPSec Connections
      • Load Balancers
      • FastConnect
      • Public IPs
      • DNS Zone Management
      • Traffic Management Steering Policies

    • Administration
      • Tenancy Details
      • Announcements


    The menu Database has no subitems.

    For most of these services you can find documentation here:
    https://docs.cloud.oracle.com/iaas/Content/home.htm




    Oracle cloud: Login

    Fri, 2019-10-11 15:01
    Main problem for login into Oracle cloud is to there is no generic login URL.
    Inside the mail Oracle sent after the registration there is a specific URL. Something like:
    http://app.response.oracle-mail.com/e/er?elq_mid=920.......But this ends after some seconds at:

    https://cloud.oracle.com/en_US/sign-in

    There is also another login page, but this one does not work for my setup:

    https://login.eu-frankfurt-1.oraclecloud.com/v1/oauth2/authorize


    For this one i did not find any documentation at all, so i somebody knows how this login page can be used, please add a comment...

    Oracle Cloud: my first VM

    Tue, 2019-10-01 14:15
    After some problems with signing up i created my first vm inside Oracle Cloud:






     and then a short stop for provisioning:


     And finally:


    The machine runs and a login can be done with:

    schroff@zerberus:~/.ssh$ ssh 130.61.89.226 -l opc
    [opc@myVmInstanceDS ~]$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    devtmpfs        459M     0  459M   0% /dev
    tmpfs           486M     0  486M   0% /dev/shm
    tmpfs           486M   13M  473M   3% /run
    tmpfs           486M     0  486M   0% /sys/fs/cgroup
    /dev/sda3        39G  1,9G   37G   5% /
    /dev/sda1       200M  9,7M  191M   5% /boot/efi
    tmpfs            98M     0   98M   0% /run/user/1000
    [opc@myVmInstanceDS ~]$

    Oracle cloud: sign up: after nearly 2 weeks...

    Fri, 2019-09-27 13:20
    After trying to get around my problems with my
    i was able to sign up at Oracle cloud services.
    Thanks to Oracle support for the e-mails with tips and explanations what i have to do!

    And after some seconds i got the following e-mail:

    And the sign in worked:

    With the next postings i will try to get some VMs etc. running inside Oracle Cloud...

    500 blog posts (in 12 years)

    Tue, 2019-09-24 15:30
    Last week i did my 500th posting - not really "run like hell" but i think better than nothing.
    Here some statistics:




    I think, i will continue for another 500. The exciting point is, wether i will find enough topics, which i am interested in...

    Oracle Sign up: more problems

    Fri, 2019-09-13 14:03
    I thought, i was successful, but:

    I received a mail with the following content:

    "We have re-authorized a new, specific amount on the credit/debit card used during the sign up process."

    and

    "To verify the account you have created, please confirm the specific amount re-authorized."


    My problem: there is not any "re-authorized amount" on my banking account. I do not know, what is "re-authorized"?
    Is this: this amount is charged on my credit card (then i should see it).
    Or is this process buggy and i was for some reason not charged?
    Or is re-authorization something else?



    Oracle Cloud: First login

    Thu, 2019-09-12 13:53
    After signing up to Oracle cloud i tried my first login:

    https://cloud.oracle.com/en_US/sign-in


    but i only got:
    I think the problem is, that there i a manual review step on Oracle's side which i have not passed for now:
    So let's wait for a day or two...

    Pages