Tuesday, December 25, 2018

The official YouTube app no longer works on Android Gingerbread (2018). Remedies.

This is meant to be a reply in a thread at Google Product Forums. I've posted it here first. The official YouTube app stopped functioning in Android 2.3 in late-late October 2018.

Just an update: Logging out in the non-functional YouTube app in Gingerbread made it impossible to log in again. The error message (roughly translated) reads:
A problem occurred during launch. Check the network connection and system time.
It seems to me, that Error 410 probably appeared when an account is set as logged-in in the YouTube app, though I cannot claim this for certain. The error cited above now appears when attempting to log in, or when trying to play videos.

On the other hand, I got yet another opportunity to check out a device with Android 4.0 Ice Cream Sandwich (ICS), and the YouTube app does work there, provided, that some of the software components are kept up-to-date.

The example ICS setup with a working YouTube app has the following component versions:

* Android 4.0.3
* Google Play Store 8.0.76.R-all [0] [PR] 163912422
* Google Play Services 14.5.74 (000302-219897028)
* YouTube app version 11.01.70

People with Android 2.3 Gingerbread and a non-functioning YouTube app can do the following:

• Continue using the mobile YouTube site in the default browser that would launch videos in an external player.

The reason I suggest using the default browser ("Internet"), is, that while older versions of Mozilla Firefox and derivatives can run on Android 2.3, and while they do also support HTML5 video, then Firefox is resource-intensive on low-end devices. Such devices do not have enough RAM memory, and/or cannot run anything greater than Gingerbread. With these, video playback might work in Firefox, but not satisfactorily, or might not work at all.

• Or they can upgrade to at least Android 4.0 — either by updating the software, if a device manufacturer and/or mobile operator has an update on offer; or by obtaining a device installed with at least ICS.

This I left out of the reply:

It appears, that this time, the YouTube app not working on Android Gingerbread is final, hence 'no longer' in the title of this post. I don't think it will be fixed, and it would be a miracle, if it were. If someone has Android 2.3 with a working YouTube app, while most others don't have that, then the most likely explanation could be expired certificates in the app and Gingerbread itself, and updated certificates on the YouTube end. Such is life.

In this case, I follow a personal policy of not suggesting alternative apps. Therefore, if the official app doesn't work, use the browser.

Saturday, December 15, 2018

Primer: How to avoid a wall of text in comments, and in life

This was meant to be a reply to someone who submitted a wall of text in a comment in YouTube. I'd decided against posting that reply, because the person used a nickname instead of a real name and photo, and that person's comments showed early signs of aggressive behavior (calling a person who complained about lack of punctuation and grammar a "budddy"), if he felt, that my reply would escalate the debate.

Your comment text anywhere — including in social media — would be much easier to read and quite a bit more useful, if you were to use punctuation, paragraph breaks, and correct spelling. Then people will take all the written comments and the comment writer more seriously. And not just comments, but really most everything you write.

Instead of offering a long search link that tells more about you than you'd volunteer, it would be more convenient to either submit a truncated search link, like this:

https://www.google.com/search?q=q6600+for+sale

or say, that: 'if people would search for

q6600 for sale

— they'd find results starting at the ballpark of U.S. $7.95 to $10.88.'

Currently, your search link tells everyone in plaintext [the commenter posted a very long search results URL], that you have an HTC phone with Android, and it could be inferred from "android-home", that you might have possibly made a voice-based search (via speech-to-text). It could then be further deduced, that your entire comment was dictated through your phone.

It may be tedious, but you will reveal less information about yourself, when you copy the search result, and shorten it in your browser's address bar, leaving only the /search?q=searchable+thing part after the domain.

Thursday, November 1, 2018

The two forks of Pale Moon for Windows XP

This was posted as a reply at Google Product Forums. This concerned video stopping every 25 minutes on YouTube during HTML5 playback.

I got to test a long-form YouTube video with New Moon 27.6.0a1, and the 25-minute video lag still happens.

At that point (when video stops during playback), I pause, or move the video progress indicator back a little to keep the video going.
I treat the breaks every 25 minutes like the breaks during tv ads

I'm most likely stuck with that video lag stoppage, as I've chosen to keep a fork of Pale Moon Moon 27.6.x, because that branch still supports cookie prompting.

There are two forks of Pale Moon for Windows XP:

* New Moon — available at RT's Free Soft blog at Blogspot.
This browser is not my main driver.
* MyPal. Of the two, MyPal 27.6.2 is a somewhat later release than New Moon 27.6.0a1, so I just might consider replacing New Moon with MyPal.

The positive side is, that unlike Firefox, the forks support H.264 video, which should play most videos on YouTube, and clips on twitter.

To switch on support for WebM/VP9 in New Moon 27.6.0a1, one can uncheck "Use MSE asynchronously", and then check "Enable MSE for WebM video" in the Content section of the Options window.

Newer versions of forks most likely have H.264 support as built-in. Older versions of New Moon require extracting the lav extension file(s) from lav.7z into the folder where the browser is installed in Program Files.

It should be noted, that New Moon and MyPal 27.6.x are older versions, but support a few bits more functionality than a comparable version of Firefox (38.8).

Monday, October 22, 2018

Eesti ID-kaart ja Knoppix 7.2

Algupäraselt on blogipostitus kirjutatud käigupealt, mistõttu on seesinane küljendamata kujul. Artikkel on mõeldud kõigile, kes oskavad natuke terminali (käsurida) kasutada.

Kindlasti võis midagi kahe silma vahele jääda, kuid suures osas peaks andmed paika pidama.


Intro

Ehk kuidas saada tööle panka sisselogimiseks vajalik ID-kaardi tarkvara Knoppixi 7.2 Live-CD-le, ja millised on selleks vajalikud .deb-paketid. Kuna Knoppix on Debiani-põhine, on artiklis väljatoodud pakettide arv minimaalne ja vaid antud Knoppixi-versiooni jaoks, kuid võib kasuks tulla ka teiste Debiani- kui ka mitte-Debiani-põhiste distrodega opereerimisel.

Sissejuhatus

Niisiis tekkis mullegi lõpuks permanentne ID-kaardilugeja (OmniKey CardMan 1021) ja võib-olla ka võimalus seda kasutada, et sisse logida panka. Nimelt otsustas minu pank koodikaardi võimaluse (need, mis numbritega) ära kaotada. Ainult et mul on Windows XP, ning see pole ID-kaardi tarkvara poolt enam toetatud.

Estobuntu plaadile keevitamine ei aidanud, sest selle versioon on samuti aegunud ja uut pole välja lastud. Kui seda reklaamitakse kui eestikeelset distrot, mis "toetab ID-kaarti", peaks see pidevalt kaasaegne olema.

Estobuntu põhineb Lubuntu 14.04-l, mis lasti välja 17.04.2014. Estobuntu DVD-tõmmise juures on kuupäev 02.05.2014.

Lisaks: Estobuntu 14.04 DVD Live-versiooni puhul sai värskeima Firefoxi installimisel miskipärast mäluruum otsa, sest minu masinal on vaid 1 Gb RAM-mälu (muutmälu). Kõvakettale ma tõmmise sisu ei salvestanud, sest kõvakettal on teine opsüsteem; seetõttu läks käiku vaid Live-variant, mille puhul kasutatakse ramdisk-i.

Seevastu Knoppix Live-CD puhul mälu kohese otsasaamise kartust gigabaidise RAM-mahuga pole. Etteruttavalt võib juba nentida, et Knoppixist oli kasu.
• Knoppix Live-CD (mitte DVD!) ja värske Firefoxi käitamiseks on vaja vähemalt 1 Gb RAM-mälu.
• Estobuntu töötab rahuldavalt, kui arvutis on vähemalt 2 Gb RAM-mälu.
Kaalukausile jäigi Knoppix 7.2 Live-CD, mis on Estobuntust vanemgi, aga ka viimane Knoppixi CD-versioon (24.06.2013. väljalase). Sellel on näiteks Firefoxil põhinev Iceweasel 29.0 21.0.
Iceweasel 21.0 ei toeta TLS turvaprotokolli versiooni 1.1 (järgmist) ja uuemaid. Toetatud on ainult TLS 1.0. See tähendab seda, et arvestatav osa turvatud https: veebisaite ei ole kättesaadavad, kuna: nad kasutavad TLS 1.1 protokolli, nad kasutavad TLS 1.2 protokolli, ning vähesed juba TLS 1.3 protokolli. Google, GMail ja Blogger töötavad, samuti DuckDuckGo otsing. YouTube ei tööta.

19.11.2018. Üks hea uudis ka: Firefoxi ei pea eraldi all tõmbama, sest Iceweaseliga sai panka ilusti sisse. Allpool olev pakettide installimise kadalipp tuleb ikkagi läbida, misjärel Iceweaselis digiallkirjastamise mehhanism pangaülekane (PIN2) tegemiseks erinevalt allatõmmatud Firefoxist isegi kuidagimoodi eksisteerib, kuid ei tööta, ning ma kaldun arvama, et siin on tegemist lihtsalt vananenud lehitsejaga. Üks võimalik lahendus oleks installida Iceweaseli uuendus koos vajalike sõltuvustega ja siis võimaluse tekkides proovida, kas pangaülekande tegemine õnnestub.
Et Knoppix 7.2 on veidi üle aasta vanem kui Estobuntu, ning kuna Knoppix ei ole varustatud ID-kaardi kasutamise jaoks vajalike teekidega, tuleb Knoppixile peale panna terve posu pakette ja omakorda nendest sõltuvaid pakette. (Mitte, et Estobuntuga oleks vähem vaeva, aga Knoppix ei võta kõike mälu endale.)
• Knoppix 7.x versioonidel on probleeme Synaptics puutepatjadega, millest olen ma varem inglise keeles kirjutanud. Ajutine lahendus on kasutada välimist osutusseadet (USB-põhine hiir);
Tähtsamad käsud Knoppix 6.x ja uuemate käitamiseks, sh. sõrmistiku keele valik ja kasutajakeskkonna välimus (samuti inglise keeles).

Paketid

Synaptic paketihaldurit ei soovita ma praegu üldse, sest pakettide vaikimisi aktiivseks seatud allikatega andmebaasi uuendamisel tuleb Firefoxi (või sellel põhineva Iceweaseli) uuendamist valides ette sisuliselt kogu opsüsteemi uuendamise protsess, sest välja vahetada tuleks liigagi suur arv pakette. Firefox koos vajalike lisadega tuleb installida eraldi, aga sellest jutu lõpupoole.

Osad tarkvarapaketid on Knoppixil juba olemas; siin artiklis tõin välja vaid puuduvad või uuendatavad.

Valikupõhimõtted

Pakettide valikul osutus määravaks versiooniühilduvus, lähtudes printsiibist, et kui süsteemis on juba vajaliku paketi ühilduv versioon olemas, siis ei pea sellele uuendust tõmbama.

Näiteks mida vanem Linuxi-distributsooni versioon, seda rohkem uuemaid ja puuduvaid pakette ja nende sõltuvusi (omakorda pakette) peab peale panema.

Sellest johtuvalt osutus valik vähemas osas Ubuntu 14.04 LTS Trusty Tahr (edaspidi Trusty) ja suuremas osas Debian 8 Jessie (25–26.04.2015) distrodele kompileeritud ühilduvatele pakettidele — põhimõttel, et mida vanemale distrole tehtud ühilduv pakett, seda vähem tuleks selle jaoks sõltuvusi tõmmata.

Kompromissi ei saanud teha konkreetselt ID-kaarti puudutavate pakettidega, nagu opensc jt., mis tähendas, et osa vajaliku versiooniga pakette on Debian 10 Buster-nimelisest kõige värskemast enam-vähem stabiilsest distro-versioonist.

Kui mõni muu ühilduv pakett oli vanemas distros olemas, langes valik selle kasuks.

Installimisjuhis ja versioonide kontrollimine

Esialgu on targem tõmmata individuaalseid pakette, jälgida nende sõltuvusi ja alles siis need vaid dpkg kaudu installida nii:

$ sudo dpkg -i paketi_failinimi_koos_versiooniga

dpkg siis vastavalt annab teada, kas install õnnestus või mitte ja mis lisapaketti täiendavalt vaja on.

Ennetavalt on võimalik kasutada dpkg-query võimalust, et teada saada, millise paketi versioon installitud on:

dpkg-query -W paketi_nimi_suurversioon

Esmapilgul vajalike teekide paketid (info sain siit) —

Tsitaat:
* openssl (1.1.0h)
* libpcsclite1 (1.8.23)
* pcsc-lite (1.8.23)
* QT (5.9.4) (Miks küll?)See muuseas jäigi installimata.
Et hoida kokku vaba RAM-mälu, võib tarkvarapaketid tõmmata ja salvestada mitte tingimata Knoppixi Downloads või Desktop (töölaua) kataloogi, vaid kõvakettale või mälupulgale konkreetsesse kataloogi, mis tuleb ise luua.

Pakettide nimekirja loomine

Terminalis koostatud mittetäielik nimekiri tõmmatud pakettidest koos sõltuvustega, kõige varasemast kõige hilisemani:

08:51 pcsc-lite-1.8.24.tar.bz2 — Selgus, et polnud vaja
09:08 libsigsegv2_2.10-4+b1_i386.deb — Polnud ka vaja
09:14 libpcsclite1_1.8.24-1_i386.deb
09:24 dpkg_1.17.5ubuntu5.8_i386.deb
09:37 libreadline7_7.0-3_i386.deb
09:42 libtinfo5_6.0+20161126-1+deb9u2_i386.deb
09:47 libssl1.1_1.1.0f-3+deb9u2_i386.deb
09:50 opensc-pkcs11_0.19.0-1_i386.deb
14:49 libglib2.0-0_2.40.2-0ubuntu1.1_i386.deb
Kataloogis olevate failide ajaliselt sorteeritud järjekord ls käsuga:

Kui käsurea käsklus ls -l näitab nimekirja failidest ja nende atribuutidest, siis -ltr parameetrid näitavad detailset nimekirja ajalises järjekorras vanimast uuemani ("modifitseeritud" ehk salvestamise aja järgi) —

l — list — detailne nimekiri
t — time and date — kellaaeg ja kuupäev
r — reverse order — "taguridi järjestus", ehk vanima salvestusajaga fail on kõige üleval

Kuna ma aga tahtsin vaid kellaaega ja failinime, tuli käskluse väljund lasta toru abil ("piibu", i.k. pipe) läbi awk-i:

$ ls -ltr | awk '{print $8, $9}'

print käseb trükkida, ning $8 ja $9 määravad vajalike veergude numbrid. Veerude number tuleb mõistatada ls -l käsuga tehtud nimekirjast. Koma veerunumbrite parameetrite vahel on tähtis. Ilma komata võib ka, aga siis ei tule kellaaja ja failinime või muude esemete vahele tühikut.

Võib kasutada ka lihtsamat varianti

$ ls -tr

— See koostab pakettide lihtsa nimekirja ajalises järjekorras vanimast salvestatust kõige uuemani suunaga ülevalt alla.

Pakettide asukohad ja nende installimine

Tuleb tähele panna, et antud Knoppix 7.2 on 32-bitine, ning pakettide tõmbamisel tuleb valida i386 arhitektuur. Arhitektuurinimetuse puudumisel on arhitektuuri asemel kirjas all (i.k. kõik).

Vajadus on seega järgmiste pakettide järele (tabel on veel pooleli) —
Link kirjeldusele Link paketile
# Pakett Vajaminev
versioon
Knoppix 7.2-s? Paketi
versoon
distro distro
ver.
Sõltuja
libpcsclite1 1.8.24-1 — paketis olev üks või enam faile sai pakendatud xz formaadis. Sellest ka vajadus uuema dpkg versiooni järele.
Jäi meelde, et see dpkg versioon pidi olema just see konkreetne ja mitte mingi muu. Võimalik, et Ubuntu või Debiani ametlikel lehtedel olevad dpkg versioonid kas (veel) ei sisaldanud xz formaadi toetust, või olid pakettide sõltuvusversioonid liiga suured.
1. dpkg 1.17.5ubuntu5.8 1.17.5 1.16.10 1.17.5ubuntu5.8 ubuntu trusty libpcsclite1
2. libpcsclite1 1.8.24-1 uusim 1.8.8-3 1.8.24-1 debian buster
* opensc-pkcs11 0.19.0-1 uusim Puudub 0.19.0-1 debian buster
#
opensc-pkcs11 paketil on omad sõltuvused:

* libglib2.0 >= 2.39.4 (Knoppix 7.2-s: libglib2.0-0:i386 2.36.3-1)
* libssl1.1 >= 1.1.0 (Knoppix: Puudub; on libssl1.0.0:i386 1.0.1e-2)

libglib2.0-0_2.40.2-0ubuntu1.1_i386.deb ubuntu trusty

4. Mingi hetk tekkis tahtmine tõmmata peale ka uusim opensc:

opensc (0.19.0-1) debian buster

Sõltuvused:
* libglib2.0-0 >= 2.16.0 — esmapilgul polnud vaja, aga siis opensclite1 (üleval) tahtis ikkagi uuemat.
* libreadline7 >= 6.0 (Knoppix: Puudub; kõige hiljutisem on libreadline6:i386 6.2+dfsg-0.1)
libreadline7_7.0-3_i386.deb debian stretch (i386)
** Omakorda sõltuvus: libtinfo6 >= 6 (Knoppix: puudub; on libtinfo5:i386 5.9-10)

** libtinfo5_6.0+20161126-1+deb9u2_i386.deb debian stretch (i386)

* libssl1.1 >= 1.1.0 (Knoppix: puudub, on libssl1.0.0 1.0.1e-2)

libssl1.1_1.1.0f-3+deb9u2_i386.deb — ilmselt stretch; i386

* opensc-pkcs11 = 0.19.0-1 (Knoppix: puudub täielikult)

opensc-pkcs11_0.19.0-1_i386.deb debian buster i386

Edasi tuli installida opensc pakett:

opensc (0.19.0-1) buster i386 (Knoppix: Puudub täielikult)

Edasi: pcsd
pcscd (1.8.24-1) buster i386 (Knoppix: puudub täielikult)

aga sellel on õige mitu sõltuvust:

* libccid >= 1.4.1~ (Knoppix 7.2-s libccid justkui eksisteerib, aga uuendust sellele on ikka vaja)

libccid (1.4.18-1) jessie i386

* libsystemd0 (215-17+deb8u7) jessie i386 (Puudub täielikult)
Sõltuvused:

** libgcrypt20 (>= 1.6.1) 1.6.3-2+deb8u5 jessie dl (Knoppix: Antud versioon puudub, on libgcrypt11 1.5.0-5 )

Sõltuvused:

*** libgpg-error0 (>= 1.14), Knoppix 7.2-s 1.10-3.1 1.17.3

debian jessie i386

* libudev1 (>= 183) (Knoppixis puudub) 215-17+deb8u7 jessie i386

Kokku on pakette umbes kuue megabaidi jagu.

Firefoxi tõmbamine ja installimine

Nagu ülevalpool mainitud, siis eraldi Firefoxi tõmbamine ei ole tingimata kohustuslik. Seda kahel põhjusel:
*Minu panka sai Iceweasel 21.0 lehitsejaga sisse logitud;
*Eraldi tõmmatud Firefox ei toeta PIN2 koodi mehhanismi üldse. Iceweaseliga oli ka võimatu PIN2 koodi kasutada, kuid peale esmaselt vajalike pakettide installimist esitatakse päring selle järele, kui katsetasin ülekande tegemist. Iceweaseli uuendamisel versioonile 38.0 erilist abi kahjuks ei olnud, kuid asja tasub veel uurida.

Mozilla "FTP"-sait sidaldaaab (jutumärkides, sest see on http) Mozilla Firefoxi ja teiste programmide kõiki versioonie. Postituse tegemise kuupäeval on uusima eestikeelse Firefoxi asukoht see:

https://ftp.mozilla.org/pub/firefox/releases/62.0.3/linux-i686/et/firefox-62.0.3.tar.bz2

Kui Firefoxi pakitud fail on näiteks Iceweasel lehitsejaga salvestatud, avada faili kataloog pcmanfm failihalduris.

* firefox-62.0.3.tar.bz2 peale saab ühe korra peale klikkida, ja siis avaneb see XArchiver programmis.
* Alternatiiv on failile parema osutinupuga vajutada ja valida Extract To... käsk, mis aktiveerib XArchiver programmi lahtipakkimise mooduli. Selles tuleb valida Firefoxi installatsiooni asukoht. Kuna tegemist on Knoppixiga, võib Firefoxi rahumeeli pakkida lahti /home/knoppix kataloogi. Seal jääb see omakorda firefox/ kataloogi.

Firefoxi saab edasi käivitada terminalist:

$ cd /home/knoppix/firefox

Minna Firefoxi lahtipakitud kataloogi

$ ./firefox -P &

* -P avab Firefoxi profiilihalduri, sest Iceweasel ja Firefox kasutavad sama profiiliarhitektuuri. Seepärast on parem Firefoxis luua uus kasutajaprofiil.
* & tõstab graafilise programmi eraldi terminaliaknast.

Kuna Firefoxi uuendatakse tihti, siis Mozilla "ftp" releases kataloogis on kõige uuem versioon, aga mitte päris alguses. Otsida tuleb 62.0.3-st edasi.

(Synapticut või muud paketihaldurit ära kasuta, sest see tõmbab kaasa liiga suure arvu muid pakette).

Alles siis tuleb Firefoxi laadida onepin moodul.

Firefoxi ingliskeelses variandis:
  1. Mine seadistustesse (about:preferences) >
  2. Privacy & Security (ülevaltpoolt paremalt) >
  3. alaosa Certificates (lehekülje kõige all) >
  4. nupp [ Security Devices...] >
  5. uuel aknal vajuta [ Load... ] nupule >
  6. tekkinud kastis kirjuta ülemisele reale Module Name juurde mooduli nimi (mul on lihtsalt onepin)
  7. Ning siis failikorjajast leia see fail:

    /usr/lib/i386-linux-gnu/onepin-opensc-pkcs11.so

    — opensc deb-faili järgi pistab dpkg programm onepin-mooduli installimisel sinna.
Tuleb sellega siiski arvestada, et mooduli laadimise aken (kast) võib kaduda lehitseja-akna taha, kui aktiveerida samas aknas olnud muu vahekaart mõne teise leheküljega. Lahendus on siin Firefoxi aken tõsta allapoole senimaani kuni mooduli laadimise aken nähtavale tuleb.
dpkg-põhise installiprotseduuri kõige lõppeks panin peale ka esteidfirefoxplugin_3.12.2.1145beta-1404_i386.deb paketi, mille tõmbasin Ubuntu Trustyle mõeldud RIA varamust.

Kas sellest ka mingit kasu oli, ei ole selge.

esteidpks11loader paketi unustasingi peale panna, aga tuleb välja, et ülejäänust ja allolevast piisas, et sisse logida.

Selle saab kätte samuti RIA poolt Ubuntu Trustyle koostatud varamust.
Küll panin Firefoxile peale Open-eID lehitsejalisa. Kätte saab selle Firefoxis aadressilt
https://addons.mozilla.org/firefox/addon/open-eid/

Edasi tuleb Firefox sulgeda, alles siis kaart sisestada kaardilugejasse, ning lehitseja siis taaskäivitada.

Kui kaarti parasjagu enam vaja pole, siis sulgeda terve Firefox ja kaart lugejast välja võtta. Kui kaart on kaardilugejas ja lugeja indikaator vilgub, siis kaarti välja võtta ei maksa. (Kui lamp jääb pikaks ajaks vilkuma, siis tasuks proovida süsteemi kinnipanekut või restarti.)

Vähemalt eesti.ee-sse ja panka sisselogimiseks kõlbab küll, kuigi allkirjastamist pole ma proovinud (näiteks ülekande tegemiseks).

Thursday, September 27, 2018

The web browser can replace many resource-heavy smartphone apps

In a reply on a heavily-commented Slashdot article.

A web browser can supplant individual apps, because I suspect, that each such large-scale app simply comes equipped with its own WebKit/Blink rendering engine to support all the functionality that the default rendering engine might not have on an Android phone due to it being more outdated than the latest version of app.



A browser with an adblocker, or a Gecko-based browser with NoScript is also one of the solutions in fending off big apps and script-heavy sites. Many large services also have lite versions of their social (Facebook) and e-mail (GMail, Yahoo, AOL) front-ends; and on desktop, YouTube has a "lite" version with the ?disable_polymer=1 URL parameter.



In fact, Flash was a much better solution for older computers, because HTML5 playback is baked into the browser process in Firefox, and HTML5 playback was always interfered with even through simply resizing the browser window. Because Flash was out-of-process in plugin-container.exe, I could elevate its priority a notch using Process Explorer in Windows. That essentially guaranteed hiccup-free playback with Flash 18 and Firefox 39.0. This was probably an unintended, or accidental feature that software developers created, but welcome nevertheless.



The trouble starts with very interactive functionality in comms apps, where video and audio are required. Resource-intensive games are in a category of their own, as they have always been on desktop.

The case for open source flashlight apps

There is really no need to download flashlight apps off the Google Play Store, because many of them want access to one's contacts and maybe other privileged information. The solution is to get an open-source flashlight app that is much more light-weight, and won't ask for too many permissions.
Initialy written as a reply comment on YouTube.

If your Android phone is relatively basic, and does not have a built-in flashlight, then the F-Droid store of free and open-source (FOSS) software offers many small-sized flashlight apps that do not require access to contacts.

This does require (temporarily) enabling third-party installs, but the open-source flashlight apps' much smaller size removes the requirement for Play Store-based apps that want access to data that they should have no right to have access to.

In some cases, a phone may have a built-in flashlight, but no OS-level functionality to turn it on. This applies to older versions of Android, which I've seen with Android 4.0 ICS (Ice Cream Sandwich), but may as well apply to any Android 4.x version. That's why an app is still required. Some flashlight apps available on F-Droid do require camera access to control the hardware flashlight.

In the F-Droid store app, search using the 'flash' and 'torch' terms, which will match anything that contains these patterns. I've chosen MrWhite, which is only 21 KiB in size.

Depending on version, Samsung smartphones' TouchWiz UI allows adding an "Assistive Light" widget for phones that have a built-in hardware flashlight.

Android-native flashlight functionality is accessible via Google Now in Android 5.0 Lollipop. I don't know, if the function is accessible by other means. Android 6.0 and 7.0 should have the flashlight functionality built-in — check the expanded notification area.

Wednesday, September 26, 2018

Moore's law works, but not the law about efficient coding in the consumer area

Posted as an anonymous reply on slashdot

A major reason why users do not perceive performance advantages, is, that they now use a web browser almost all the time, and most people do so without adblockers, and without NoScript (in Firefox), or some other ad/scriptblocker elsewhere, such as uBlock Origin, or uMatrix (to each their own).



These tools are some of the most basic ways of optimising resource usage in a browser, and go a long way in making websites and browsers more reponsive, thereby improving speed and user experience.



Alas, most people don't have that, and advertisers are reaping great benefits thereof.



On top of that, there's the transformation of simple web pages into resource-heavy webapps. There used to be a time, when I could still use Firefox 1.0 on an older computer without having to worry too much about not getting a connection to where needed, since many sites were carefully designed to match the relatively basic abilities of their target audience. Anything fancier used Flash. But that was when desktops and notebooks were not particularly powerful as a class.



Now, though, a newer browser is a must both due to security implications, and because of video providers using newer codecs in order to increase video resolution size (4K and up), and to simultaneously seek to have a lesser load on the network in the face of more and more users gradually getting to see all that fancy 4K video on their 4K screens. Soon-to-be 8K. While most simply contend with 1080p as some sort of a standard.



Security is also a thing, and a faster rig or farm is able to break ciphers faster, too. A major gaming rig with several cores has the power comparable to any supercomputer of the days of yore, but is not necessarily faster in terms of user experience, because the software is awful (Windows 10), or a badly-coded website with terrible fonts and CSS, or a site that mines coins without the user noticing, but then complaining, that 'their computer is slow.'



Or simply lots of sites without being active on several tabs at any one time, without the browser having adblockers on. Firefox mostly has a remedy for that, and I think, Google Chrome -- despite its awful recent flaws -- is coming up (or has come up) with a suspend feature for inactive tabs.

Wednesday, July 18, 2018

2G is not dead — or the many ways of phasing it out.

This was written in reply to a post on Slashdot about the possibility of future 2G phaseouts around the world.

Developing economies, like Venezuela, are very unlikely to shut down 2G and 3G networks even in the long term. Venezuela in particular is also unlikely to introduce 5G within the next five years.

Venezuela was once a rich economy pursuant to its extensive oil wealth, but unfortunately, did not become an advanced economy, as the country did not diversify its economy, and let the generation of any form of local produce atrophy. Calling the country's sad state a 'developing economy' is at best generous, or aspirational.

wrt 2G and 3G, Africa and South Asia are just as unlikely to phase these technologies out; though 5G is likely to be introduced in some markets, after 5G implementations in Northern Europe will be rated stable. 5G was launched on 27 June 2018 in Finland and Estonia.

The situation with mobile tech adoption in India is mixed. On one hand, Reliance have switched 2G off, and their subsidiary Jio has 4G from the outset. On the other hand, Airtel have not shut their 2G network down, and I can imagine, that there may be smaller mobile providers that still offer 2G service.

Countries with large 2G-only and 3G-only userbases are unlikely to shut these networks off anytime soon, and will opt for a gradual migration.

Some of the reasons in favour of gradual migration:

* Late adoption of new technologies owing to reasons economic, or geographical: 3G was never implemented until very recently; so, the entire mobile network is based on 2G (GSM), and a large amount (if not most) people have 2G-only phones. Wealthier subscribers may have phones that support 3G, but are unable to use the technology because of non-existent infrastructure;
* 2G and 3G have become plain utilities akin to landline phones, and can therefore be harder to phase out for their entrenched status, since:

* many of their subscribers might not be able to afford anything else;
* upgrading would increase the rate of planned obsolescence (lots of useless handsets); and
* would add to large amounts of electronic waste
— despite being labeled a legacy technology.

* Countries, where the 2G/3G adoption ratio per population is small (percentage-wise), can afford to upgrade faster.

* Countries, where 2G/3G adoption is perhaps in single digits, can choose to:
** adopt 2G/3G either to quickly get more subscribers for less;
** or where there is no 2G/3G in the first place, said countries can leapfrog existing standards, and implement 4G from the outset, but with the downside, that not all people will be able to afford mobile telephony until the market is reasonably saturated, as newer technologies are also more expensive. Nepal is one of those.
* Operators in very large and very wealthy economies have both monetary and security incentives to upgrade, and most of their userbase is probably using 3G devices at the very least (think lots of iPhones with at least iPhone 3G). The United States and Australia are examples of this upgrade model.

A historical example with the quick phaseout of 1G in favour of the 2G GSM:
In Estonia, the 1G NMT (Nordic Mobile Telephone) network was launched in 1991, and sunset in December 2000. In a country of 1.3 million, the greatest amount of NMT subscribers at EMT (then a major operator; now Telia) was about 19,000. By early 2000, the number of subscribers was 9600. And by December 2000, there were only 351 hold-outs left, after EMT announced in May that year, that they were going to shut the NMT network down in that same month of December. NMT was then still working in Finland, Sweden, and Russia.[Source: Ärileht, 11.12.2000]

Reasons for the shutdown of NMT in Estonia were the overall low and declining subscriber numbers, and the legacy status of the analogue 1G NMT network, which, compared to GSM, was not secure.

In time, 2G/GSM has in Estonia become an entrenched technology, relied on by people who choose to have a featurephone because of its high reliability, or because they're unable to afford a smartphone (pensioners). In 2016, Telia (then Elion) turned off WAP. The status of 2G in Estonia is similar to the rest of Europe: Despite the reasonably early adoption of 3G, GSM remains widespread, is in some ways entrenched, and operators have chosen a softly-softly approach with gradual migration.

The approach taken in Pakistan is different to that of India. In Pakistan, 3G and 4G were launched on 23 April 2014, which is quite late compared to China and the Philippines (both 2008). While four years ago may seem like a long time, then it really isn't. This late adoption of 3G and 4G means, that the number of GSM-only subscribers with 2G-only phones is still substantial.

That GSM is entrenched in such a way, is not a bad thing. It could be called 'deep adoption', which means, that the service is essential, widespread, and available to most everyone. Especially, when landlines are scarce. GSM was the first mobile standard adopted worldwide, and joining and using a GSM network is affordable to a very large number of people. GSM is like a well-managed regional bus service: One could use it to travel across the country, but not quickly. Removing it in the absence of viable alternatives would substantially reduce the level of development in the country, and would reduce its inhabitants' quality of life.

3G and 4G are faster: 3G is like inter-city bus service, and 4G like a high-speed express train. Neither is essential, not all territories are covered by it, but they have their uses and customers.

Other parallels: Radio is like 0G; analogue tv = 1G; DVB-T (digital terrestrial tv) = 2G (MPEG-2 or 4, non-HD); DVB-T2 = 3G (with full support for Full-HD broadcasts in MPEG-4); and cable tv (based on IPtv) is like 4G.

Sunday, June 24, 2018

A snippet on using Android 2.3 in 2018.

The text below was written in reply to a comment under one video about using Android 2.3 in 2018.
Pinch-to-zoom can and does work, but several things need to be done beforehand to implement this feature.

If I heard correctly, then the phone in question is a Huawei M865C, aka Ascend II (or Ascend 2). Its 600 MHz CPU is Qualcomm Snapdragon S1, specifically MSM7627, and is based on the ARMv6 architecture.

There is 160 Mb of internal storage available to the user. That's a very small amount, but storage is expandable with a microSD card, and PhoneScoop has it, that a 2 Gb card is included (either in the package, or as installed). I recommend using the incuded 2 Gb card, if it's already been installed and set to act as extended storage for the operating system.

One must update the device's system clock to make sure that some of the certificates are (correctly) rendered invalid, and that others still remain valid. This resolves only some of the certificate issues with the native browser component.

Then, one must let the operating system auto-update Google Play Store and Google Play Services. This happens in the background, and without notifications. These two services have several update cycles each to go through, as one depends on a version of another to update.

The version numbers below are based on what they are in Android 2.3.6.

AFAIK, the most recent Gingerbread version of Google Play Store is version 6.2.0.2, and the latest Google Play Services is v. 10.0.84.

The latest or most modern installable version of Google Play Services may take well over 100 MB of local storage, so a microSD card may be in order for long-term use, if it's not already present. Some Gingerbread devices support formatting a microSD card into an extended system volume, and a bundled card — albeit relatively small at just 2 Gb — may already do just that.

While it would be possible to move the microSD card around to other devices, the phone's operating system will still depend on that card for apps and updates, and in the absence of that card, the operating system might either cease working, or not work as one would expect. If the Android system supports graceful degradation, then only some updates and apps stop working and will appear as unavailable.

Once Google Play Store is accessible, update Google Maps. The most recent version is 6.14.5.

The most recent version of YouTube is 5.5.30. Watching videos and most other activities are possible, except uploading — there, you'll get a 410 error.

If all that doesn't work, install Firefox. Since the example phone, Huawei Ascend II, has a CPU based on the ARMv6 architecture, choose Firefox 31.3esr.

If Firefox is not available at the Play Store, you can download it from the Mozilla archive here. Note, that en-US is for a U.S.-English only package, and multi is for a multilingual package.

Devices with CPUs based on the ARMv7 architecture can have a version of Firefox up to and including v. 47.0.

Firefox has its own certificate store, which is quite a bit more up-to-date.

While these versions are not the latest versions of Firefox, they are still comparably more modern than the default Internet Browser, and so, Firefox will work in Android 2.3.

Note, that while Firefox will work and render modern websites, it's slow to start up as it loads settings and extensions. Since Huawei Ascend II only has 256 Mb of RAM, then Firefox is likely to take up all available RAM memory. You will need an ad-blocker, and you will need NoScript to prevent sites from hogging system resources. Most sites will load nicely and better than the aged default browser.

Use Firefox to login to the the web-based Google Play Store, where one can also download/install the official Google Maps.

I also recommend updating to Android 2.3.6, as it has some improvements, and slightly newer security certificates. The Android version in the video was certainly v2.3.4 or less.



If there is not enough storage to update Google Play Services:

Back up all your photos and videos, then use the built-in file manager.

In file manager settings, set it to show hidden files, and to show file extensions. Go to approximately where the photos are typically saved to: /sdcard/DCIM/.thumbnails . Files and folders with a leading dot are hidden.

Go into the .thumbnails folder, select all files, and delete them. This should save plenty of space, but note, that the system may re-create the thumbnail database at any time; especially when you view the gallery. Do not delete the DCIM folder, as it's the default folder where photos are saved to. The Camera app can be configured to save to a microSD card, if one is available.

Note, that if one or more thumbnails contain a small-scale image of a valuable deleted photo, you can connect the phone to the computer as a mass storage device, if the computer has access to relevant drivers. You'll need to download and install the phone's drivers from the manufacturer's website.

To reiterate:
You might need a separate microSD card on that phone, and if your particular phone model supports it, you can format or set the microSD card as an extension of system storage. Keep in mind, that that card is then tied to the phone.

Tuesday, April 17, 2018

Eesti kelle spelleri kasutamisest

Hiljuti saatsin tagasisidet ühele ettevõttele, mille ühel leheküljel oli kirjaviga, millest võis järeldada seda, et vigase teksti avaldaja võis olla kasutanud avatud lähtekoodiga / vabatarkvaralist Hunspell spellerit ja selle eesti keele sõnastikku. Siin on tagasiside tekst:

Võib eeldada, et kasutusel oli avatud lähtekoodiga / vabatarkvaraline Hunspell speller koos eesti keele sõnastikuga. Viimane pole täiuslik, kuid see on kasutuses järgmistes levinud tarkvarapakettides, mis tarvitavad õigekirjakontrolliks Hunspell spellerikomponenti:

• avatud lähtekoodiga Mozilla Firefox ja selle derivaadid (Pale Moon, GNU IceCat, Waterfox) või sõsarprojekt (nt. SeaMonkey);
• omanduslik, kuid eri aegadel tasuta jagatud StarOffice;
• avatud lähtekoodiga / vabatarkvaralised OpenOffice.org, Apache OpenOffice või LibreOffice;
• või suuresti omanduslik Google Chrome, mis põhineb avatud lähtekoodiga Chromium projektil. Google Chrome'i lehitseja spellerikomponentide hinge-elu ma väga täpselt ei tea.
※ Saab küll oletada, et omanduslik Google Chrome võib tõenäoliselt kasutada Hunspell spellerit, kuid ei pruugi, sest võib pigem pakkuda Google'i enda spellerikomponenti või -teenust.
※ Hunspell spellerikomponent võib olla Chrome'is siiski kaasas, sest see sisaldub avatud lähtekoodiga Chromiumis.

Ülalpool mainitud kontoripakettidest on StarOffice ja OpenOffice.org mõlemad vananenud ja aegunud, ning Apache OpenOffice'i arendus toppama jäänud ja aeglane.

LibreOffice'i arendus on kõige kiirem, kuid eesti keele sõnastik pole ka siis täiuslik, sest Hunspell spellerikomponenti ja sellele mõeldud eesti keele sõnastikku arendatakse eraldi, ning eesti keele sõnastiku arendamise progress on suurte keelte sõnastike arendusega võrreldes aeglasem.

See kõik tähendab omakorda seda, et kasutajad peavad nimetatud programmides sisalduvate spellerite poolt märgatud ja eesti keele sõnastikule tundmatuna märgitud sõnade juures olema eriti tähelepanelikud, et mitte läbi lasta kirja- või trükivigu sisaldavat teksti.

Sama kehtib muuseas ka Microsofti toodete puhul, ehkki omanduslikus Microsoft Office'is kasutatud õigekirjakontroll on paremini välja töötatud, ning on aastate jooksul olnud motiveeritud arenduses.

Saturday, April 7, 2018

Delfi Flash-põhine video, Firefox ja privaatne lehitsemine

Niisiis tekkis hiljuti vajadus vaadata Delfis artikli juurde käivat videot, aga video kohe tööle ei läinud.

Tingimused olid järgmised:
* Inteli integreeritud videoadapteriga (videokaardiga) sülearvuti, mis ei toeta OpenGL-i seda versiooni, kus Firefoxis mängiks HTML5 video;
* Windows XP SP3;
* Mozilla Firefox 38.8 (eestikeelne);
* VLC Media Player (see osutub hiljem oluliseks);
* Flash Player, mida selle vanema versiooni tõttu automaatselt ei aktiveerita;
* Firefoxi privaatse lehitsemise režiim;
* Samuti annab Firefox veebilehtedele teada, et jälitamist ei soovita (küpsised jne.).

Video mitte-esinemisel osutusid peamisteks põhjusteks teatud Delfi jt. domeenidel pluginate ja küpsiste õigused, ehk nende puudumine.

Protsessi kirjeldus


Kuna HTML5 video mängimine ei tööta videoadapteri draiveris OpenGL 2.0 toetuse puudumisel, langeb Delfi pleier tagasi Flashile, mille põhjal hakkab tööle JWPlayer.

Firefox kuni versioonini 43.x (k.a.) toetab küpsiste salvestamise kohta küsimist, kuid see süsteem ei tööta privaatse veebilehitsemise režiimis, ning eeldatavasti ka siis, kui Firefox annab veebilehtedele teada, et jälitamist ei soovita. Viimane võib tähendada, et ei võeta vastu küpsiseid, aga selle protsessi hingeelu ma täpselt ei tunne.

Lahendus


Kuna aga videomängijat ei tulnud ette, selgus lähemal uurimisel, et Flash ja küpsised oleksid teatud domeenidel lubatud.

Muuhulgas asub Flashil põhinev JWPlayer näiteks g3.nh.ee domeenil.

Küpsiste ja pluginate õiguste muutmiseks tuleb teha järgmist:
  • Mine aadressile

    http://g1.nh.ee/ct/ej/arrow_250.png

    Ette tuleb PNG-formaadis olev noolepilt, ning väljaspoolt pilti tee lehitseja (musta värvi) vaatealale paremklikk ja vali hüpikmenüüst "Vaata veebilehe teavet".
  • Uues aknas "Veebilehe teave" mine vahekaardile Õigused, ning erinevate õiguste nimekirjas tee järgmised muudatused:
    • Sektsioonis Pluginate aktiveerimine vali raadionupp "Lubatud" igal real, kus on "VLC Web", sh. ka see VLC rida, kus võib olla kirjas "Plugin võib sisaldada turvaauku!" Seletuseks niipalju, et peale VLC installimist on Flash-plugin märgitud mingil põhjusel VLC-ks.
    • Keri nimekirjas alla, kuni jõuad eraldiseni Küpsiste salvestamine.
      Seal vali "Lubatud" või "Lubatud selleks seansiks".
    • Korda sama asja järgmistel aadressidel:
      • Delfi koduleht (www.delfi.ee) või vajadusel mõni muu Delfi alamleht, mille artiklis näidatakse videot, nagu näiteks Delfi Publik (publik.delfi.ee)
      • Delfit toetavad domeenid:
        • http://g1.nh.ee/ct/ej/arrow_250.png
        • http://g3.nh.ee/m/dd/nupp.png
      • JWPlayeri domeen:
        https://ssl.p.jwpcdn.com/6/12/logo.png
      • Video lähtedomeen aadressil eeds.babahhcdn.com või mõni muu babahhcdn.com alamdomeen:
        http://eeds.babahhcdn.com/crossdomain.xml
  • Videot sisaldav artikli lehekülg tuli uuesti laadida.
Suurema osa näitefailide asukohad sain kätte klikkides näiteks Delfi artiklil "Vaata veebilehe teavet" ja siis selle akna sektsioonist "Meedia". Ülejäänud asukohad sain teada Firefoxi veebiarendaja Network tööriista ja Internetiotsinguga. (Nii või teisiti olid failide asukohtad avalikult kättesaadavad.)

Monday, February 19, 2018

Remedying high CPU usage in Firefox when visiting the Esquire site

I recently visted the Esquire site, and Firefox hung for many long minutes, with Process Explorer (a Task Manager alternative) showing very high CPU usage. To stop this, I had to end the Firefox process.

I experienced this with Firefox 38.8 and 39.0.3, both on Windows XP SP3. These two browser versions are relatively close to one another, but in different computers, which led me to conclude, that the issue is server-side.

The culprit is a possibly malformed font file with the .css extension:

assets.hearstapps.com/sites/esquire/assets/css/fonts-deferred.afa78bb.css

This is the file that you have to block.

If you use NoScript already, don't visit the Esquire site yet, and go instead to NoScript Options.
• In the Other tab, there is the ABE subtab;
• Click the USER rule/set in the left pane, and paste the following code into the right pane:

#ESQUIRE HIGH RESOURCE USAGE
Site .assets.hearstapps.com/sites/esquire/assets/css/fonts-deferred*
Deny INCLUSION(FONT,CSS)

#This is a widespread tracker or ad service of some kind.
#Used by Esquire, too.
Site .nexus.ensighten.com
Deny

Click OK.

You can now try out the Esquire website. Works for me.

05.10.2018 Update: I've shortened the Site line to end with fonts-deferred*. NoScript's ABE should still match the pattern. The reason was, that the original file was fonts-deferred.afa78bb.css, which contains alphanumeric content that may be used for version tracking server-side. Removing those numbers and including a wildcard makes the line relatively future-proof from newer versions of the same file.

Saturday, January 13, 2018

Predictions of FM radio's demise are overrated. FM radio in Estonia.

This was written as an AC and as a reply to a post on Slashdot, but turned out to be too long. There's plenty of discussion, among which there's a U.S.-centric notion, that FM channels there do not play much good music, and a substantial amount of airtime is devoted to ads.

So, I'm in Estonia, and the local public (national) broadcaster ERR has five channels, of which four are broadcast nationwide, while Raadio Tallinn airs just around the capital and its surrounding counties.

Of these, Raadio 2 is like BBC Radio One. It is youth-oriented, plays current music, has some talk programmes; its evening programmes are themed by music genre. Raadio Tallinn plays adult contemporary, jazz, and world music with just news a the top of the hour. Klassikaraadio is self-explanatory. There are promos to events, but no ads. Raadio Tallinn almost has no promos at all. It's all free to listeners, and ad-free ERR channels are entirely paid for by the taxpayer.

Across the country, there are 33 channels in total, but not all are broadcast nationwide. 28 channels are privately-run; of these, there are about four or five that are Christian; six are broadcast in the Russian language (seven total with ERR). Some are only regional. In the north of the country, I could sometimes pick up two Finnish channels.

The non-Christian privately-run channels typically play music geared toward different listeners: one plays only Estonian-language music; another only Russian-language music; another one is extremely conservative, dislikes the state and does conspiracy theories; yet another one is mainstream talk radio. Most others are in-between, vacillating between retro and pop.

Across Estonia, there's music and great (and not-so-great) content available to all tastes, and I don't know of anyone who'd be complaining about radio.

With the exception of Norway with only digital radio, I can imagine, that Finland and other EU/EEA countries have a similar radio landscape.

Because of the large installed base of FM receivers, it would seem really pointless for a country -- as it seems pointless in my view -- to switch FM radio off in its entirety. While digital radio broadcasting has its advantages, then it would be better to implement it side-by-side with FM radio in order to counter planned obsolescence. The side-by-side method is transitional.

Estonia's switch-over to digital tv in 2010 was a major thing. By then, most people had already transitioned away from Soviet-made SECAM sets to those made in the West because of a need to adopt the PAL standard, so anything with a SCART outlet was good for a digital box.