<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>howto &#8211; /bin &#8211; basisgruppe informatik</title>
	<atom:link href="https://blog.diebin.at/tag/howto-2/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.diebin.at</link>
	<description>Infos, News und Updates der basisgruppe informatik</description>
	<lastBuildDate>Tue, 06 Mar 2018 15:38:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.4</generator>
	<item>
		<title>#3: Fairphone  Ubuntu 12.04 LTS</title>
		<link>https://blog.diebin.at/1508/3-fairphone-ubuntu-12-04-lts</link>
		<pubDate>Sat, 25 Jan 2014 20:19:19 +0000</pubDate>
		<dc:creator><![CDATA[Andyka]]></dc:creator>
				<category><![CDATA[Freiheit nehmen]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">https://blog.diebin.at/?p=1508</guid>
		<description><![CDATA[You know ADB? Android Debugger Bridge? It lets you interact with your device from your Desktop. If your Desktop has Windows as operating system, it&#8217;s likely that the Fairphone will be detected automatically. On my Ubuntu 12.04 LTS this was<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://blog.diebin.at/1508/3-fairphone-ubuntu-12-04-lts">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>You know ADB? Android Debugger Bridge? It lets you interact with your device from your Desktop. If your Desktop has Windows as operating system, it&#8217;s likely that the Fairphone will be detected automatically. On my Ubuntu 12.04 LTS this was not the case. The command line <code>adb devices</code> showed:</p>
<p><code> List of devices attached<br />
???????????? no permissions</code></p>
<p>This posting is about (1) granting ourselves permissions and (2) finding out that the Fairphone has a chipset from Mediatek, one of the biggest fabric-less semiconductor companies.</p>
<p><img id="irc_mi" alt="" src="http://static.mediamatic.nl/f/hkxf/image/612/2170-625-221.jpg" width="124" height="43" />                      <img id="irc_mi" alt="" src="http://cdn.eteknix.com/wp-content/uploads/2013/11/Mediatek-Logo.jpg" width="95" height="48" />                  <img title="The Ubuntu logo" alt="The Ubuntu logo" src="http://design.ubuntu.com/wp-content/uploads/ubuntu-logo14.png" width="108" height="48" /></p>
<p>Mediatek conquered the market already in the age of feature phones (you know, these mostly touchscreen-less mobile phones with a physical numpad and monochrome displays). Mediatek was one of the factors why mobile phones became so cheap and wide-spread, because Mediatek had the idea of packaging software and hardware together. Before Android and iOS made the App hype emerge, Mediatek let the Shanzhai phenomenon happen by selling a platform, not only a single chip. The hardware was shipped with a reference design and software that allowed customization. This way <a href="https://en.wikipedia.org/wiki/Shanzhai#Shanzhai_products">Shanzhai vendors</a> emerged for example in China, providing farmers and migration workers with cheap but somehow fancy cell phones. The Shanzhai vendors were kind of unofficial vendors, mostly family-driven. They imitated the look of major brands and customized the features to their needs and the needs of their relatives.</p>
<p><span id="more-1508"></span></p>
<p><strong>Why ADB?</strong><br />
Before going into the issue with ADB: Why would you want to make ADB work at all? Here is a list of ADB commands that I find useful:</p>
<ul>
<li><code>adb install /path/to/apk/myApp.apk</code><br />
Install the App myApp.apk directly to the device, for example if you develop your own app and want to install it from the command line.</li>
<li><code>adb uninstall packagename</code><br />
Uninstall a particular app. You need to know the package name (jump to list items further to see how to get a list of all package names)</li>
<li><code>adb shell</code><br />
Gives you a terminal to your device (which acts similar to a linux terminal, but with restricted commands). That&#8217;s one of the most powerful tools to tinker with your Android system!</li>
<li><code>adb shell pm list packages</code><br />
Lists all the packages that are installed on your phone</li>
<li><code>adb shell input text LONG TEXT YOU WANT TO INPUT</code><br />
Inserts a text into the currently focused text field (useful if you need to type long URLs)</li>
<li><code>adb push fromDesktop.txt toDevice.txt</code><br />
copies the file fromDesktop.txt on the desktop to the device with the filename toDevice.txt</li>
<li><code>adb pull fromDevice.txt /home/users/diebin/coolStuff.txt</code><br />
the other way around: from Phone to Desktop</li>
</ul>
<p>Further commands can be found in the <a href="https://developer.android.com/tools/help/adb.html#pm">official developers page of Android</a>.</p>
<p><strong>Permission denied?</strong></p>
<p>First things first. Why don&#8217;t we have permission to access the Fairphone? That&#8217;s not fair. The reason is that as normal user in Ubuntu we don&#8217;t have the permission to access the device out of the box.  Let&#8217;s fix it:<br />
The blog &#8220;<a href="https://rechtzeit.wordpress.com/2011/02/24/adb-devices-shows-no-permissions/">rechtzeit</a>&#8221; gave us the means to proceed further:</p>
<ol>
<li>Ubuntu allows to view verbose information on the devices that are connected via USB with the following command:<br />
<code><code><code>lsusb</code></code></code></li>
<li>The relevant line for the Fairphone is:
<p><code><code><code>Bus 001 Device 010: ID 0bb4:0c03 High Tech Computer Corp.</code></code></code><br />
You can extract the following information from this line:<br />
<code><code>Vendor ID 0bb4<br />
Device ID 0c03<br />
Bus    Nr 001<br />
Device Nr 010</code></code></li>
<li>Next, gather more information by using the busname <code>001</code> and the device number <code>010</code>:<br />
<code><code><code><code>udevadm info --attribute-walk --name=/dev/bus/usb/001/010</code></code></code></code><br />
This gives:<br />
<code><code><code>looking at device '/devices/pci0000:00/0000:00:1a.7/usb1/1-5':<br />
KERNEL=="1-5"<br />
SUBSYSTEM=="usb"<br />
DRIVER=="usb"<br />
ATTR{configuration}==""<br />
ATTR{bNumInterfaces}==" 2"<br />
ATTR{bConfigurationValue}=="1"<br />
ATTR{bmAttributes}=="c0"<br />
ATTR{bMaxPower}=="500mA"<br />
ATTR{urbnum}=="1608"<br />
ATTR{idVendor}=="0bb4"<br />
ATTR{idProduct}=="0c03"<br />
ATTR{bcdDevice}=="0255"<br />
ATTR{bDeviceClass}=="00"<br />
ATTR{bDeviceSubClass}=="00"<br />
ATTR{bDeviceProtocol}=="00"<br />
ATTR{bNumConfigurations}=="1"<br />
ATTR{bMaxPacketSize0}=="64"<br />
ATTR{speed}=="480"<br />
ATTR{busnum}=="1"<br />
ATTR{devnum}=="12"<br />
ATTR{devpath}=="5"<br />
ATTR{version}==" 2.00"<br />
ATTR{maxchild}=="0"<br />
ATTR{quirks}=="0x0"<br />
ATTR{avoid_reset_quirk}=="0"<br />
ATTR{authorized}=="1"<br />
ATTR{manufacturer}=="MediaTek"<br />
ATTR{product}=="MT65xx Android Phone"<br />
ATTR{serial}=="0123456789ABCDEF"</p>
<p></code></code></code>My personal translation of this long list is:<br />
Product: MT65xx Android Phone<br />
Manufacturer: MediaTek<br />
Serialnumber: 0123456789ABCDEF (looks kind of dummy)<br />
Hm, why MediaTek? I googled around and found: Indeed, Fairphone, uses a <a href="http://www.mediatek.com/_en/promotion/MT6589_overview.php">Mediatek 6589 chipset</a> &#8211; with Quadcore CPU btw!</p>
<p><strong><strong>Intermezzo: MediaTek and platformization before Android and iOS</strong></strong></p>
<p>I was not really following the whole Fairphone assembly process, I only briefly read their newsletters. What about this company? Mediatek is a Taiwanese company. Of course they have a <a href="http://www.mediatek.com/_en/06_citizenship/corporate.php">corporate responsibility</a> subpage. Not yet sure, what that means for the people who produce the chipsets. Especially, since Mediatek is a fabless company, that means they do not have fabrics and assembly lines. One can assume that the dirty work is outsourced in order to afford corporate responsibility.</p>
<p>Moreoever, what I have found after some web research is an interesting article about <a href="http://www.visionmobile.com/blog/2013/05/the-mediatek-phenomenon-the-new-smartphone-disruption/">platformization on the hardware level</a>: We all know operating systems as platforms. On the desktop, it was Mac OS X or Microsoft Windows. On the smartphone, it was iOS and Android. But those platforms rely on smartphone hardware. One essential physical part of a mobile phone was the baseband processor, a chip that processes signals in order to establish wireless connection between the phone and the carrier provider stations. Over time the vendors who produced the baseband processors were able to sell a set of chips (chipset) that has embedded wifi, graphical processor units, system memory, etc included. So everything comes from one vendor. The major vendors of mobile chipsets are Broadcom, Qualcomm, and&#8230; <em>MediaTek</em>. I have this information from the references article above, written by Jonathan Goldberg (UK). He actually refers to Professor Willy C. Shih at Harvard University. To <a href="http://www.hbs.edu/faculty/Pages/profile.aspx?facId=194874">judge from Shih&#8217;s profile</a>, he has quite some experience in the hardware and software field (from semiconductors to Java to intellectua property disputes ) and now transmits it in MBA programs at Harvard. Research focus is on competitive dynamics and multi-country production in technology. Unfortunately his papers are not available for free. But I found others who cite his papers about MediaTek. For example &#8220;<a href="http://www.cier.edu.tw/public/Data/2013-1.pdf">The Evolution of China&#8217;s Mobile phone Industry and good-enough Innovation</a>&#8220;.</p>
<p>Before the arrival of smartphones, bottom-up innovation was happening in Chinas production of mobile phones. Those phones were called Shanzhai phones. Shanzhai refers to kind of family-based non-official manufacturers that produce imitations of well-branded products, but low-cost and with a lot of variations and customizations. MediaTek&#8217;s baseband was increasingly incorporated in such Shanzhai phones. After the rise of smartphones, the trend is apparently towards bigger and official vendors, but MediaTek still plays a big role, as we can see in the Fairphone. But who actually produced the hardware that is now lying on my desk? Let&#8217;s keep this for another article and move on <img src="https://s.w.org/images/core/emoji/2.4/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><strong>Let&#8217;s give ourselves the permission to access our own device</strong></li>
<li>Now we need to add a rule to the system such that UDEV (the device manager) knows that it can give us (and ADB) access to the device:<br />
<code><code><code>sudo vi /etc/udev/rules.d/99-android.rules</code></code></code></p>
<p>Add the following content:<br />
<code><code>SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", OWNER="yourUsername" GROUP="yourGroupProbablySameAsUsername", MODE="666"</code></code></p>
<p>The blog &#8216;rechtzeit&#8217; mentioned<br />
<code>SYSFS{idVendor}<br />
instead of<br />
ATTR{idVendor}.</p>
<p>B</code>ut this would not identify the device in my case. You need to compare against the output of <code>udevadm</code> in step 3. The line above worked for me.</li>
<li>Reconnect the device, and check if the permissions are now properly set:<br />
<code><code><code>ls -l /dev/bus/usb/01/010</code></code></code><br />
The effect of those 5 steps is, that instead of just root having the permissions of accessing the device, also the user and group have.<br />
In other words, the output of the <code>ls</code> command line should be:<br />
<code><code><br />
crw-rw-rw- 1 yourUsername yourGroup 189, 12 Jän 18 17:20 /dev/bus/usb/001/010<br />
</code></code><br />
rather than:<br />
<code><code><code><br />
crw-rw-r-- 1 root root 189, 11 Jän 18 17:14 /dev/bus/usb/001/010</code></code></code></li>
<li>Try again <code>adb devices</code>:<br />
<code><code><code>List of devices attached<br />
0123456789ABCDEF    device</code></code></code></p>
<p>Voilà! We granted ourselves the permissions we need to exercise the possibilities that the Fairphone offers, together with ADB.</li>
</ol>
]]></content:encoded>
			</item>
		<item>
		<title>SSL-Zertifikat + HTTPS</title>
		<link>https://blog.diebin.at/817/ssl-zertifikat-https</link>
		<pubDate>Sat, 12 May 2012 20:42:18 +0000</pubDate>
		<dc:creator><![CDATA[Stefan]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kritische informatik]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">https://www.diebin.at/?p=817</guid>
		<description><![CDATA[Vielleicht ist es euch schon aufgefallen, aber diebin.at gibt&#8217;s jetzt nur mehr über HTTPS. Grund dafür ist, dass wir uns mittlerweile den Luxus eines CA-zertifizierten SSL-Zertifikates leisten, um diese dämliche Browser-Warnung zu umgehen, welche die Idee hinter SSL-Zertifizierung ein bisschen<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://blog.diebin.at/817/ssl-zertifikat-https">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>Vielleicht ist es euch schon aufgefallen, aber <a href="https://diebin.at">diebin.at</a> gibt&#8217;s jetzt nur mehr über <a href="http://en.wikipedia.org/wiki/HTTPS">HTTPS</a>. Grund dafür ist, dass wir uns mittlerweile den Luxus eines CA-zertifizierten SSL-Zertifikates leisten, um diese dämliche Browser-Warnung zu umgehen, welche die Idee hinter SSL-Zertifizierung ein bisschen konterkariert. Wenn aus Usability-Gründen, entweder eh jedes selbstausgestellte Zertifikat angenommen wird, oder die entsprechende Seite halt gemieden wird, so hat das ja keinen Zweck. Mit einem von bestimmten <a href="http://en.wikipedia.org/wiki/Certificate_authority">Autoritäten (CAs)</a> ausgestellten Zertifikat, wird diese Fehlermeldung nicht angezeigt.</p>
<p>Warum überhaupt HTTPS? Weil über HTTP alles unverschlüsselt gesendet wird. Wenn du ein Passwort eingibst, das nicht oder höchstens base64-encoded gesendet wird, dann kann im Grunde jede_r dein Passwort sehen. Bei Cookies ist es ähnlich, da kann auch fast jede_r deine schon eingeloggte Identität annehmen, was vor ein paar Jahren die <a href="http://codebutler.com/firesheep">Firesheep-Extension</a> ganz schön gezeigt hat. Diese Schwachstellen waren Sicherheitsexpert_innen seit Jahrzehnten bekannt, aber erst seit wenigen Jahren haben auch die ganz großen Fische (Google, Facebook, &#8230;) reagiert und fast ganz auf HTTPS umgestellt.</p>
<p>[Update nach Hinweis: Aber natürlich sind nicht nur das unverschlüsselte Senden von Passwort und Cookies problematisch, und die damit verbundene Möglichkeit des Identitätsdiebstahls &#8211; es geht ja prinzipiell auch darum, dass keine_r &#8211; gleich Mensch oder Maschine &#8211; mitlesen kann, wenn er_sie die Verbindung abhört. Weder die stalkende Netzwerkadministration noch unser geliebter Staat, der ja eh nur unser Bestes will, wenn er deine oder meine Privatsphäre verletzt&#8230;]</p>
<p>Ein Problem, welches sich aber auch durch die Nutzung einer CA nicht ganz lösen lässt, sind sogenannte Man-in-the-Middle (MITM) Angriffe. Zwar hilft es schon, wenn ein Server von einer CA zertifiziert wurde (insofern es das vorhin beschriebene Usability-Problem löst und das Abfangen von SSL-Zertifikaten zumindest ein bisschen erschwert), aber dieses blinde Vertrauen in die Autorität ist ein potenzielles Risiko, welches dir als Benutzer_in des Webs bewusst sein sollte. Das <a href="http://perspectives-project.org/">Perspectives Project</a>, versucht dieses potenzielle Problem zu lösen, indem es sich nicht auf das verlässt, was dein Browser sagt, sondern die Entscheidung, ob ein Zertifikat jetzt gültig sein sollte, ein bisschen demokratisiert.</p>
]]></content:encoded>
			</item>
		<item>
		<title>IRC in der Konsole</title>
		<link>https://blog.diebin.at/757/irc-in-der-konsole</link>
		<pubDate>Sat, 10 Mar 2012 12:39:21 +0000</pubDate>
		<dc:creator><![CDATA[Stefan]]></dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[free software]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[irc]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://diebin.at/?p=757</guid>
		<description><![CDATA[Als ich vor ein paar Wochen ein bisschen in unserem Archiv (bzw. hier auf der Kontakt-Seite) gestöbert habe, habe ich entdeckt (bzw. wieder realisiert), dass wir auch auf dem IRC-Netzwerk Freenode zu finden sind (im #bin Channel). Und als ich<span class="ellipsis">&#8230;</span><div class="read-more"><a href="https://blog.diebin.at/757/irc-in-der-konsole">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>Als ich vor ein paar Wochen ein bisschen in unserem Archiv (bzw. hier auf der Kontakt-Seite) gestöbert habe, habe ich entdeckt (bzw. wieder realisiert), dass wir auch auf dem <abbr title="Internet Relay Chat">IRC</abbr>-Netzwerk Freenode zu finden sind (im #bin Channel). Und als ich mich dann mal versuchsweise eingeloggt habe, bin ich draufgekommen, dass sich da tatsächlich zwei Idler bot-like eingenistet haben.</p>
<p>Da ich mittlerweile wegen dem Studium vieles an den unterschiedlichsten Rechnern mache und ich auch keine Lust hatte, mich bei der sich daraus ergebenden Vielfalt der graphischen (und nicht graphischen) Oberflächen, mit denen ich so tagtäglich konfrontiert bin, mir unterschiedliche Programmoberflächen anzutun, habe ich gedacht, dass es doch auch ein IRC-Clienten für die Kommandozeile geben müsste.</p>
<p>Gefunden hatte ich zunächst <a href="http://www.eterna.com.au/ircii/">ircII</a>, was meinen anfänglichen Bedarf (ein simpler IRC-Client, mit dem ich mich verbinden und mit anderen kommunizieren kann) durchaus erfüllte. Allerdings habe ich nach ein paar Tagen gemerkt, dass der Client ein bisschen zu simpel war und sich auch nicht einfach (wenn überhaupt) so konfigurieren ließ, wie ich es wollte.</p>
<p>Nach einer kurzen Recherche war ich dann mit zwei auf ircII aufbauenden Clienten konfrontiert (BitchX und EPIC), die mehr Konfigurationsspielraum versprachen. Die (recht spärliche) Dokumentation der beiden hat aber zum Glück meine Lust die Software meinen Wünschen anzupassen sofort getötet, so dass ich der Empfehlung eines Kollegen folgen konnte und <big><a href="http://irssi.org/">irssi</a></big> ausprobieren konnte, was mich von den Standardeinstellungen gleich so überzeugt hat, dass ich mir nicht einmal die Dokumentation durchlesen musste.</p>
<p>Ein einfaches <tt>irssi -c irc.freenode.net -n username</tt> reicht und ich bin schon verbunden, dann <tt>/join #bin</tt> und ich bin schon im richtigen Channel. Und kann chatten (bzw. auch bot-like idlen).</p>
]]></content:encoded>
			</item>
	</channel>
</rss>
