Dietrich Schroff

Subscribe to Dietrich Schroff feed
Dietrich Schroffhttp://www.blogger.com/profile/18397485256708620180noreply@blogger.comBlogger533125
Updated: 9 hours 55 min ago

Mission accomplished: OpenHack: Migrating Microsoft Workloads to Azure

Thu, 2020-09-24 14:42

 After three days of hard work i got my first OPENHACK badge:


Authorized by Microsoft

Here the details from Microsoft:

Earners of the OpenHack: Migration badge understand how to execute an end-to-end migration through optimization. They have shown that they can utilize Azure Migrate to migrate virtual machines to Microsoft Azure and can modernize legacy applications by migrating to PaaS services such as Azure SQL Database and Azure App Service. They have also have a foundational understanding of Azure identity, including hybrid identity with Azure AD and how to leverage Azure RBAC to govern and secure workloads.

It was really a great challenge to discuss and implement all the goals. Thanks to the excellent coaches and for providing the infrastructure!

Cloning my dual boot ubuntu to a larger SSD

Sat, 2020-09-05 12:22

 After working a while with my laptop i reached the disk limit with my SSD (256GB). First impression: Oh no - how to migrate onto a new, larger SDD...

But the prices have dropped so i bought a 1TB SSD and an external SSD box:

Now i was thinking about copying the partitions with dd from the original disk to the other - or better doing a dd for the complete disk?

A friend offered me to use acronis, but the software refused to start on my laptop...

I googled a bit around and found the following solution (inspired by http://www.geekyprojects.com/storage/how-to-clone-hard-drive-to-smaller-drive/):

clonzilla.org

And this worked excellent.
After cloning my old ssd to the new one i removed the CD with clonzilla and my laptop immediately bootet from the new SSD which was still inside the SSD box.

Really cool!

I checked windows without replacing the SSD inside my laptop and this worked as well as the Ubuntu.

Next step was to boot with an GPARTED iso (can be found here) and resize the linux partition up to the new limits.

So last step was to open up my laptop and insert the 1TB SSD...

(Totally amazing that i did not have to run grub or change the uefi settings.)

Review: Container Storage for Dummies

Fri, 2020-09-04 14:56

After reading Running Containers in Production for Dummies this book fell into my hands:


 
 

Container Storage for Dummies is promoted by RedHat and consists of 5 chapters with 35 pages. 

The first chapter gives a short summary about containers. I liked this statement very much: "For example, a VM is like a heavy hammer. It assumes you’re running a server and that the server can host multiple applications. [...] And the container can run just about anywhere, even on a bare metal machine or in a VM — the container doesn’t care." The chapter ends with a motivation why containers need persistent storage: ephemeral containers are transient....
Chapter 2 has the title "Looking at Storage for and in Containers". The key argument here is: "Software-defined storage (SDS) separates storage hardware from storage controller software, enabling seamless portability across multiple forms of storage hardware. You can’t slice and dice storage using appliances or typical SAN/NAS as easily, readily, or quickly as you can with SDS." Both terms (Storage for Containers + Storage in Containers) are given a defintion (just take a look inside the book ;-)).
In chapter 3 the authors want to convince the reader about the coolness of container-native storage with phrases like "Container-Native Storage Is the Next Sliced Bread". I think the main argument in this section is, that RedHat contributes a substantial parts to open source Kubernetes so that RedHats Openshift container storage fits easily in there. And this is done by introducing the Container Storage Interface which can be used by all storage providers.
Chapter 4 motivates why developers like Container-Native storage: because it can be easily managed without SAN administrators....
The last chapter closes with ten reasons to move to Cantainer-Native storage: simplified management, more automation, scalibility, ....

As summary i think, this book is a nice starting point about the problems and possible solutions with storage for containers. It is a little bit disappointing, that openshift is not really explained - but within only 35 pages this is really impossible.
If you are working or starting to work with containers i require you to read this booklet - it is a good start into the container world!



Review: Running Containers in Production for dummies

Tue, 2020-08-25 12:42

 Last evening i read the following booklet:

Here my review:

Chapter one gives within 7 pages an excellent introduction into "Containers & Orchestration Platforms". From Kubernetes over Openshift/Docker Swarm up to Amazon EKS - many services are described. In my opinion Azure AKS is missing, but it is clear, that every hyperscaler will provide you its managed Kubernetes environment. At the end even Apache Mesos is listed - which is out of scope for the most of us. Building & Deploying Containers is the headline of chapter 2 and a brief, solid description of these topics is given. If you want to know what all the buzzwords like CI/CD/CS, Pipelines, Container Registries are about: Read that chapter and you have a good starting point.

Nearly 33% of the book(let) is abount Monitoring Containers (chapter 3). This points in to the right directions. You have to know what your containers are doing and what you have to change with continuous delivery and continuous deployment. If you are running tens or hundreds of containers, the monitoring has to be  automatic as well - or you are lost. "A best practice for using containers is to isolate workloads by running only a single process per container.  Placing a monitoring agent — which amounts to a second process or service — in each container to get visibility risks destroying a key value of containers: simplicity." - So building up a monitoring is not such easy, as is was on full-stack servers...

Chapter 4 is about Security. This focuses on the following topics: Implementing container limits against resource abuse, how to avoid outdated container images, management of secrets and image authenticity.

The last chapter closes with "Ten Container Takeaways".
 

Within 43 pages a really nice starting point to learn about the world of docker and container orchestration.

openssl: strange error.... (on the first look)

Fri, 2020-08-07 14:13
Some days ago i wanted to do a check of a certificate of an ip address. No big deal - so i did:
schroff@zerberus:~$ openssl s_client -showcerts  -connect 82.165.229.87.87:443 

140011908769088:error:2008F002:BIO routines:BIO_lookup_ex:system
lib:../crypto/bio/b_addr.c:726:Name or service not known
connect:errno=22
So i opened google to find a solution.
But on google i found nothing really helpful.

?

The answer was very easy:
If i read the command line carfully, i would have detected my error:

THE IP ADDRESS WAS INVALID

I wrote an ipv4 with 5 numbers and not with 4...

After using a correct ipv4 number the command worked like expected:
schroff@zerberus:~$ openssl s_client -showcerts  -connect 82.165.229.87:443 #
CONNECTED(00000003)
Can't use SSL_get_servername
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = GeoTrust RSA CA 2018
verify return:1
depth=0 C = DE, ST = Rheinland-Pfalz, L = Montabaur, O = 1&1 Mail & Media GmbH, CN = gmx.net
verify return:1
---

Google GSI: Generic System Images for Smartphones

Sat, 2020-06-13 16:03
After building my own ROM i got some problems with the devices drivers for the modem (the dual SIM was not recognized).
I discussed that with a few very skilled Android developers and the device drivers are the most important problem for building ROMs.

But there is something called GSI: Generic System Images.

(s. https://source.android.com/setup/build/gsi)

and:

The good point is that for my Samsung J530 there was a developer which built a project which allows to install GSIs:


With this plus Havoc 3.5



And here the steps to Android 10 (which where provided to me by Micro[ice]:
  1. install TWRP
  2. install create vendor 2.0
  3. reboot recovery
  4. install project spaget x
    (if u get symlink error 7 flash revert vendor 2.0 and repeat from step 1 without revert vendor 2.0)
  5. install GSI (Havoc)-OS
    (dont reboot after u flash project spaget x)
  6. if u need to flash gapps first u need to go
    Wipe -> Advanced Wipe -> Tick System -> Repair -> Resize
    (if u get error 1 resize again it will be successful) then u flash gapps
  7. flash areskernel rc2
  8. (optional) flash magisk
  9. reboot
  10. enjoy
And after that i have a running Android 10 on my Samsung J5... (without any Samsung Bloatware)

Lineage OS: Building my own system from scratch...

Fri, 2020-06-05 13:48
For my Samsung J5 is was only able to find a lineage 15.1 image but no lineage 16 or even 17.
So i decided to build the image on my own.

I followed this guide:
https://github.com/lineage-doge/device-j5y17lte/tree/lineage-16.0

But on this page the roomservice.xml is wrong:

 

Just change it to








The rest was following the instructions:
mkdir -p android/lineage-16.0
cd android/lineage-16.0
repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
repo sync

Create .repo/local_manifests/roomservice.xml with the content shown above.
Then run "repo sync" once again.

Most important point it to extract the binaries from your device. To get a background just read this:
https://wiki.lineageos.org/extracting_blobs_from_zips.html


I extracted /system from my Android device via TWRP (under advanced you can find a file explorer and this can copy the partition to your sd card).
After that point STOCK_ROM_DIR to your sd card and run:
cd device/samsung/j5y17lte
STOCK_ROM_DIR=/path/to/system ./extract-files.sh
Now we are ready to rumble:
cd ../../
source build/envsetup.sh
brunch lineage_j5y17lte-userdebug
But after some minutes:
LD      kernel/built-in.o
/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/kernel/samsung/exynos7870/drivers/net/wireless/Makefile:62: android version 1: 90000
/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/kernel/samsung/exynos7870/drivers/net/wireless/Makefile:63: MAJOR_VERSION version 1: 9
/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/kernel/samsung/exynos7870/drivers/net/wireless/Makefile:107: platform version 3 : 9.0.0
/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/kernel/samsung/exynos7870/drivers/net/wireless/Makefile:108: MAJOR_VERSION version 3: 9
  LD      drivers/built-in.o
make[1]: Leaving directory '/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/target/product/j5y17lte/obj/KERNEL_OBJ'
Makefile:145: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
make: Leaving directory '/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/kernel/samsung/exynos7870'
[  1% 555/35382] target StaticLib: libv8src_32 (/media/schroff/895337b7-c4eb-44a4-...arget/product/j5y17lte/obj_arm/STATIC_LIBRARIES/libv8src_intermediates/libv8src.a)
ninja: build stopped: subcommand failed.
19:21:20 ninja failed with: exit status 1

#### failed to build some targets (05:29 (mm:ss)) ####
But this error is easy to fix:
cd ~/android/lineage-16.0/out/target/product/j5y17lte/obj/KERNEL_OBJ/firmware/tsp_imagis
cp ~/android/lineage-16.0/kernel/samsung/exynos7870/firmware/tsp_imagis/ist3038h_a3x_cmcs.bin .
~/android/lineage-16.0/kernel/samsung/exynos7870/firmware/tsp_imagis/ist3038h_a3x.fw .
schroff@zerberus:~/android/lineage-16.0/out/target/product/j5y17lte/obj/KERNEL_OBJ/firmware/tsp_imagis$

and try once again!

And after a while:
  Imgdiff Stats Report 
========================

Compressing system.new.dat with brotli
  running:  brotli --quality=6 --output=/tmp/tmpAOkKFk/system.new.dat.br /tmp/tmpAOkKFk/system.new.dat
using prebuilt boot.img from BOOTABLE_IMAGES...
  running:  java -Xmx2048m -Djava.library.path=/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/host/linux-x86/lib64 -jar /media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmptUxdfx.zip /tmp/tmpSgxnBy.zip
  running:  zip -d /tmp/tmpSgxnBy.zip META-INF/com/android/metadata
  running:  java -Xmx2048m -Djava.library.path=/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/host/linux-x86/lib64 -jar /media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpSgxnBy.zip /media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/target/product/j5y17lte/lineage_j5y17lte-ota-eng.schroff.zip
done.
[100% 453/453] build bacon
Package Complete: /media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/lineage-16.0/out/target/product/j5y17lte/lineage-16.0-20200502-UNOFFICIAL-j5y17lte.zip

#### build completed successfully (27:31 (mm:ss)) ####


Custom ROMs: Installing via TWRP (e.g. Prometheus ROM)

Sun, 2020-05-31 02:15
After installing TWRP and installing some ROMs via adb sideload, (or this story with my old Nexus 7) i learned that there is another way for installing Custom ROMs:

  • Boot in to recovery (Samsung: Home Button + Power + Volume Up)
  • Copy the ROM.zip to the SD card of the smartphone
  • and then follow this screenshots
Click on "Install"

Click "Select Storage"

Select your SD card

Select the ROM you want to install:

Swipe to the right

Then some of the ROMs (like Prometheus) will guide you through an installation wizard, where you can chose some options.

If you want to try Prometheus you can download it here.

Building my own Recovery ROM for a Samsung J5 2017 (j5y17lte, TWRP)

Mon, 2020-05-18 05:50
After several hours of sideloading a custom ROM and flashing a TWRP recovery image i thought the next step is to build a TWRP recovery image on my own.


So how to do that?

My startpoint was
(just search github for your device with TWRP)

But this is not the way to begin.
First you have to follow this page:
and do
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-7.1
and
repo sync
Then add the j5y17lte.xml to .repo/local_manifests. After that the repo sync works but the
$ lunch omni_j5y17lte-eng
ends up with a warning:

WARNING: device/samsung/j5y17lte/omni.dependencies file not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
TARGET_PRODUCT=omni_j5y17lte
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a53
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-88-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/media/schroff/895337b7-c4eb-44a4-9063-00f629e5149f/omni/out
============================================

The good point: just ignore this warning and do the mka recoveryimage.

Here i got two errors:

/bin/bash -c "prebuilts/misc/linux-x86/flex/flex-2.5.39 -oout/target/product/generic/obj/STATIC_LIBRARIES/libedify_intermediates/lexer.cpp bootable/recovery/edify/lexer.ll"
flex-2.5.39: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
Aborted (core dumped)
Here i followed this hint:
https://groups.google.com/forum/?hl=tr#!topic/android-building/0kzPnw3akxg
and copied the provided flex to "prebuilts/misc/linux-x86"
   cp ~/Downloads/build/flex flex-2.5.39
You have to change the name from flex to flex-2.5.39 and you have to rerun source build/envsetup.sh again.

Then i got the following errors:

bootable/recovery/gui/../twrp-functions.hpp:24:10: fatal error: 'ext4_utils/ext4_crypt.h' file not foundbootable/recovery/gui/../twrp-functions.hpp:24:10: error: 'ext4_utils/ext4_crypt.h' file not found with <angled> include; use "quotes" insteadbootable/recovery/twrp.cpp:49:10: fatal error: 'base/strings.h' file not foundThis i could resolve with:

cd bootable/recovery
ln -s ../../system/extras/ext4_utils
vi twrp-functions.hpp # add the quotes!
ln -s ../../system/core/base/include/android-base base

After that the build went through and i got a TWRP image:
-rw-rw-r--  1 schroff schroff 26937344 Mai 17 23:40 recovery.img
This ran without a problem on my J5 after a
heimdall flash --RECOVERY recovery.img



Samsung J5 2017 (aka j5y17lte) installing STOCK ROM

Sat, 2020-05-16 09:37
After installing a custom ROM (s. here) i wanted to flash the STOCK  ROM onto my smartphone again.
So what to do?

First: Download a ROM (e.g. sammobile.com)

and you will get something like
J530FXXU6CSK9_J530FDBT6CSL1_DBT.zip
this zip cannot be sideloaded. So you have to unzip and the you have:
AP_J530FXXU6CSK9_CL16642474_QB27583084_REV00_user_low_ship_meta_OS9.tar.md5
BL_J530FXXU6CSK9_CL16642474_QB27583084_REV00_user_low_ship.tar.md5
CP_J530FXXU6CSK9_CP14486297_CL16642474_QB27583084_REV00_user_low_ship.tar.md5
CSC_DBT_J530FDBT6CSL1_CL17419960_QB27658856_REV00_user_low_ship.tar.md5
HOME_CSC_DBT_J530FDBT6CSL1_CL17419960_QB27658856_REV00_user_low_ship.tar.md5
Within this you have to do a:
 for a in *md5; do echo $a;  tar -xvf $a; done
and the result should be:
boot.img   cm.bin      modem.bin  recovery.img  system.img
cache.img  hidden.img  param.bin  sboot.bin     userdata.img
or just type:

~/bin/heimdall flash --BOOT boot.img --SYSTEM system.img --CACHE cache.img --HIDDEN hidden.img --PARAM param.bin --CM cm.bin --USERDATA userdata.img --RADIO modem.bin --BOOTLOADER sboot.bin --RECOVERY recovery.img
and after nearly 10 minutes of anxious waiting you J5 boots up with the STOCK ROM again.

Corona-Homeoffice: second monitor for my laptop - portable!

Sat, 2020-05-09 15:03
After several weeks working in homeoffice and my children in homeschooling i had to increase my efficieny. And the best thing is to get a second monitor running which meets the following requirements:
  • Single Plug (for signal and power)
  • Easy movable from living room to workspace and back
  • Touchscreen would be nice
 So i decided to buy a wimaxit 15.6" portable monitor and today it arrived:




The second screen is only connected (and charged) via USB-C.
Even connecting my smartphone just works out of the box - really cool! 

My Samsung Galaxy J5 (2017) aka j5y17lte with lineage os

Sat, 2020-05-02 15:21
In the last weeks i did some tests with installing custom ROMs to my old devices:
and
The next step was to try this with my Samsung J5:
root@zerberus:~/bin# ./heimdall print-pit
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...
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...
PIT file download successful.

Entry Count: 29
Unknown 1: 1598902083
Unknown 2: 844251476
[.....]
File Size (Obsolete): 0
Partition Name: USERDATA
Flash Filename: userdata.img
FOTA Filename: remained

Ending session...
Rebooting device...
Releasing device interface...
But for the next step (flashing the boatloader with TWRP) i got the follwoing error:
root@zerberus:~/bin# ./heimdall flash --RECOVERY ../Downloads/twrp-3.3.1-1-j5nlte.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...
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...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
ERROR: Failed to receive session end confirmation!
Releasing device interface...
The smartphone showed this:
  
RMM STATE: Prenormal
KG STATE: Checking
Only official released binaries are allowed to be flashed(RECOVERY)
KG = Knox Guard
RMM = Remote Monitoring and Management
(https://chimeratool.com/fr/docs/samsung-knox-guard-kg-and-remote-monitoring-and-management-rmm-unlock-functions)

I found a solution for this problem (https://www.android-hilfe.de/forum/root-custom-roms-modding-fuer-samsung-galaxy-s9-s9.3273/s9-sm-g960f-nach-android-9-kein-installieren-von-custom-recoverys-moeglich.898725.html): It just says: wait 7 days...

Grrrrr!!!!!!!

And after 7 days:
And then:

 /bin# ./heimdall flash --RECOVERY ../AndroidDevices/TWRP-3.2.3-TwrpBuilder-j5y17lte-2018-09-13_15-34.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...
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...
PIT file download successful.

Uploading RECOVERY
100%
RECOVERY upload successful

Ending session...
Releasing device interface...

And after that i was able to install the lineage os plus the Google playstore:

adb sideload ../Downloads/lineage-15.1-20180510-UNOFFICIAL-j5y17lte.zip
adb sideload open_gapps-arm-8.1-j5y17lte-pico-20200418.zip The only problem:
Only an unofficial lineage version 15.1 was available for the Samsung J5 2017 aka "j5y17lte". I found one build with version 16 but there the WLAN was broken...

So this was a step back from Android 9 to Android 8.1 - but system space moved from 800MB free to 7GB free ;-)

GPay and TWRP: NFC payment not possible / forbidden

Fri, 2020-04-24 03:36
After flashing my old Samsung smartphone to TWRP (s. this posting) and before installing a custom OS, i did some tests with the original Android OS.
Everything worked but GPay refuses to work:


Your Phone can't make contactless payments
Check your phone software to see if it meets standards
Check software"
and the button "Check software" opens this popup:


Your phone doesn't meet software standards

You can't make contactless payments with this device. It may be rooted or running uncertified software. Contact your device manufacturer or visit Google Pay Help for more info.You can still use Google Pay to pay online.
OK
So GPay does not only check the OS - it checks the bootloader, too.
Even if you did not rooting/jailbreaking your OS...

My Nexus 7 (2012) is online again (with lineageos and external battery)

Thu, 2020-04-16 15:28
In 2014 i did the last update for my Nexus 7 (s. here).
It was the last update which was provided by Google for this device:
I bought the Nexus 7 seven and a half year ago and on the weekend i found the tablet in the back of the cupboard. It did not work, because the battery was completely discharged and the device refused to charge it.
Without a battery it is not possible to startup the device - only power over USB is not enough.

So i disassembled it like described here and added some cables to connect a battery from outside:

And with that modification i was able to start it  - but running Android 5 with 8GB disk space is no fun.
So i booted TWRP onto this device:

root@zerberus:~/bin# fastboot oem unlock
                                                   (bootloader) erasing userdata...
(bootloader) erasing userdata done
(bootloader) erasing cache...
(bootloader) erasing cache done
(bootloader) unlocking...
(bootloader) Bootloader is unlocked now.
OKAY [193.432s]
Finished. Total time: 193.433s

root@zerberus:~/bin#fastboot boot  ~/Downloads/twrp-3.0.2-0-grouper.img
After that i was able to install lineageOS via adb sideload.

 adb sideload  ~/Downloads/lineage-14.1-20171122_224807-UNOFFICIAL-aaopt-grouper.zip 
 adb sideload  ~/Downloads/open_gapps-arm-7.1-pico-20200415.zip
Now the device has nearly 6GB space left:

 I can use the play store and the device runs on Android version 7 - and it runs youtube movies without any interruptions...

Using a video capture usb stick with Linux / Ubuntu

Tue, 2020-04-07 13:04
Three weeks ago i ordered a video capture usb stick at banggood and today it arrived:




So will this device work with my ubuntu?

I inserted the stick on my laptop and dmesg showed:

[123483.143071] hid-generic 0003:534D:0021.0002: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4

That was all...
But there was a module missing:

modprobe uvcvideo
and after that:
[125822.751366] usb 1-1: new high-speed USB device number 19 using xhci_hcd
[125822.901442] usb 1-1: New USB device found, idVendor=534d, idProduct=0021
[125822.901449] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[125822.901454] usb 1-1: Product: AV TO USB2.0
[125822.901458] usb 1-1: Manufacturer: MACROSILICON
[125822.901478] usb 1-1: SerialNumber: 20150130
[125822.902702] uvcvideo: Found UVC 1.00 device AV TO USB2.0 (534d:0021)
[125822.902835] uvcvideo: UVC non compliance - GET_DEF(PROBE) not supported. Enabling workaround.
[125822.904681] uvcvideo 1-1:1.0: Entity type for entity Processing 2 was not initialized!
[125822.904691] uvcvideo 1-1:1.0: Entity type for entity Camera 1 was not initialized!
[125822.911070] hid-generic 0003:534D:0021.0004: hiddev0,hidraw1: USB HID v1.10 Device [MACROSILICON AV TO USB2.0] on usb-0000:00:14.0-1/input4
Checking with
root@zerberus:~# ffmpeg -sources |grep video
Auto-detected sources for video4linux2,v4l2:
  /dev/video1 [AV TO USB2.0]
  /dev/video0 [HD WebCam: HD WebCam]
plus:
root@zerberus:~#  ffmpeg -list_formats all -i /dev/video1

[video4linux2,v4l2 @ 0x55b0d1ca38c0] Compressed:       mjpeg :          Motion-JPEG : 480x320 640x480 720x480
[video4linux2,v4l2 @ 0x55b0d1ca38c0] Raw       :     yuyv422 :           YUYV 4:2:2 : 480x320
/dev/video1: Immediate exit requested

Now i was able to open /dev/video1 with VLC:



The video came from a camera connected via TS832 --[5.8GHz]--> RC832...





Smartphone: Installing lineageOS + Googles Play Store (and getting 9GB system space freed up)

Sat, 2020-04-04 15:04

After installing TWRP as bootloader i was wondering, how much effort is is to install an alternative to android on my old smartphone.

Heimdall & ADB were in place (see TWRP posting) - so let's start!

I downloaded the appropriate image from https://lineageos.org/ and i did the following on my smartphone:
Click on "Wipe"
 Click on "Format Data"
 Type "Yes"
 Wait
 Step two times back and click "advanced wipe"
Choose "Cache" and "System" and swipe to the left

Step back to home screen and choose "Advanced"
 Swipe to the left
and then type:

sudo ./adb sideload ~/Downloads/lineage-16.0-20200325-nightly-a3xelte-signed.zip 

[sudo] password for schroff:

Total xfer: 1.02x                                                                                 
and then REBOOT...
(if you want a clean lineage OS)

If you want the google play store, then go to https://opengapps.org/


Download the appropriate package (i chose "pico" - https://github.com/opengapps/opengapps/wiki/Package-Comparison)

Then repeat the steps on TWRP (smartphone) for sideloading and type

sudo ./adb sideload ~/Downloads/open_gapps-arm-9.0-pico-20200403.zip

Total xfer: 1.43x



And after that the smartphone starts up with lineage OS and play store (To avoid problems: do not connect to mobile networks neither wifi within the startup wizard - this can result in a black screen and the wizard will never end).
The best thing: with Samsungs stock Android about 13GB was blocked by the system. Now only 4GB from 16GB are used. So i got additional 9GB free space. Really cool!

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

    Pages