]> pere.pagekite.me Git - homepage.git/blob - blog/archive/2016/07/07.rss
Generated.
[homepage.git] / blog / archive / 2016 / 07 / 07.rss
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries from July 2016</title>
5 <description>Entries from July 2016</description>
6 <link>http://www.hungry.com/~pere/blog/</link>
7
8
9 <item>
10 <title>Unlocking HTC Desire HD on Linux using unruu and fastboot</title>
11 <link>http://www.hungry.com/~pere/blog/Unlocking_HTC_Desire_HD_on_Linux_using_unruu_and_fastboot.html</link>
12 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Unlocking_HTC_Desire_HD_on_Linux_using_unruu_and_fastboot.html</guid>
13 <pubDate>Thu, 7 Jul 2016 11:30:00 +0200</pubDate>
14 <description>&lt;p&gt;Yesterday, I tried to unlock a HTC Desire HD phone, and it proved
15 to be a slight challenge. Here is the recipe if I ever need to do it
16 again. It all started by me wanting to try the recipe to set up
17 &lt;a href=&quot;https://blog.torproject.org/blog/mission-impossible-hardening-android-security-and-privacy&quot;&gt;an
18 hardened Android installation&lt;/a&gt; from the Tor project blog on a
19 device I had access to. It is a old mobile phone with a broken
20 microphone The initial idea had been to just
21 &lt;a href=&quot;http://wiki.cyanogenmod.org/w/Install_CM_for_ace&quot;&gt;install
22 CyanogenMod on it&lt;/a&gt;, but did not quite find time to start on it
23 until a few days ago.&lt;/p&gt;
24
25 &lt;p&gt;The unlock process is supposed to be simple: (1) Boot into the boot
26 loader (press volume down and power at the same time), (2) select
27 &#39;fastboot&#39; before (3) connecting the device via USB to a Linux
28 machine, (4) request the device identifier token by running &#39;fastboot
29 oem get_identifier_token&#39;, (5) request the device unlocking key using
30 the &lt;a href=&quot;http://www.htcdev.com/bootloader/&quot;&gt;HTC developer web
31 site&lt;/a&gt; and unlock the phone using the key file emailed to you.&lt;/p&gt;
32
33 &lt;p&gt;Unfortunately, this only work fi you have hboot version 2.00.0029
34 or newer, and the device I was working on had 2.00.0027. This
35 apparently can be easily fixed by downloading a Windows program and
36 running it on your Windows machine, if you accept the terms Microsoft
37 require you to accept to use Windows - which I do not. So I had to
38 come up with a different approach. I got a lot of help from AndyCap
39 on #nuug, and would not have been able to get this working without
40 him.&lt;/p&gt;
41
42 &lt;p&gt;First I needed to extract the hboot firmware from
43 &lt;a href=&quot;http://www.htcdev.com/ruu/PD9810000_Ace_Sense30_S_hboot_2.00.0029.exe&quot;&gt;the
44 windows binary for HTC Desire HD&lt;/a&gt; downloaded as &#39;the RUU&#39; from HTC.
45 For this there is is &lt;a href=&quot;https://github.com/kmdm/unruu/&quot;&gt;a github
46 project named unruu&lt;/a&gt; using libunshield. The unshield tool did not
47 recognise the file format, but unruu worked and extracted rom.zip,
48 containing the new hboot firmware and a text file describing which
49 devices it would work for.&lt;/p&gt;
50
51 &lt;p&gt;Next, I needed to get the new firmware into the device. For this I
52 followed some instructions
53 &lt;a href=&quot;http://www.htc1guru.com/2013/09/new-ruu-zips-posted/&quot;&gt;available
54 from HTC1Guru.com&lt;/a&gt;, and ran these commands as root on a Linux
55 machine with Debian testing:&lt;/p&gt;
56
57 &lt;p&gt;&lt;pre&gt;
58 adb reboot-bootloader
59 fastboot oem rebootRUU
60 fastboot flash zip rom.zip
61 fastboot flash zip rom.zip
62 fastboot reboot
63 &lt;/pre&gt;&lt;/p&gt;
64
65 &lt;p&gt;The flash command apparently need to be done twice to take effect,
66 as the first is just preparations and the second one do the flashing.
67 The adb command is just to get to the boot loader menu, so turning the
68 device on while holding volume down and the power button should work
69 too.&lt;/p&gt;
70
71 &lt;p&gt;With the new hboot version in place I could start following the
72 instructions on the HTC developer web site. I got the device token
73 like this:&lt;/p&gt;
74
75 &lt;p&gt;&lt;pre&gt;
76 fastboot oem get_identifier_token 2&gt;&amp;1 | sed &#39;s/(bootloader) //&#39;
77 &lt;/pre&gt;
78
79 &lt;p&gt;And once I got the unlock code via email, I could use it like
80 this:&lt;/p&gt;
81
82 &lt;p&gt;&lt;pre&gt;
83 fastboot flash unlocktoken Unlock_code.bin
84 &lt;/pre&gt;&lt;/p&gt;
85
86 &lt;p&gt;And with that final step in place, the phone was unlocked and I
87 could start stuffing the software of my own choosing into the device.
88 So far I only inserted a replacement recovery image to wipe the phone
89 before I start. We will see what happen next. Perhaps I should
90 install &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt; on it. :)&lt;/p&gt;
91 </description>
92 </item>
93
94 <item>
95 <title>How to use the Signal app if you only have a land line (ie no mobile phone)</title>
96 <link>http://www.hungry.com/~pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html</link>
97 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/How_to_use_the_Signal_app_if_you_only_have_a_land_line__ie_no_mobile_phone_.html</guid>
98 <pubDate>Sun, 3 Jul 2016 14:20:00 +0200</pubDate>
99 <description>&lt;p&gt;For a while now, I have wanted to test
100 &lt;a href=&quot;https://whispersystems.org/&quot;&gt;the Signal app&lt;/a&gt;, as it is
101 said to provide end to end encrypted communication and several of my
102 friends and family are already using it. As I by choice do not own a
103 mobile phone, this proved to be harder than expected. And I wanted to
104 have the source of the client and know that it was the code used on my
105 machine. But yesterday I managed to get it working. I used the
106 Github source, compared it to the source in
107 &lt;a href=&quot;https://chrome.google.com/webstore/detail/signal-private-messenger/bikioccmkafdpakkkcpdbppfkghcmihk?hl=en-US&quot;&gt;the
108 Signal Chrome app&lt;/a&gt; available from the Chrome web store, applied
109 patches to use the production Signal servers, started the app and
110 asked for the hidden &quot;register without a smart phone&quot; form. Here is
111 the recipe how I did it.&lt;/p&gt;
112
113 &lt;p&gt;First, I fetched the Signal desktop source from Github, using
114
115 &lt;pre&gt;
116 git clone https://github.com/WhisperSystems/Signal-Desktop.git
117 &lt;/pre&gt;
118
119 &lt;p&gt;Next, I patched the source to use the production servers, to be
120 able to talk to other Signal users:&lt;/p&gt;
121
122 &lt;pre&gt;
123 cat &amp;lt;&amp;lt;EOF | patch -p0
124 diff -ur ./js/background.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js
125 --- ./js/background.js 2016-06-29 13:43:15.630344628 +0200
126 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/background.js 2016-06-29 14:06:29.530300934 +0200
127 @@ -47,8 +47,8 @@
128 });
129 });
130
131 - var SERVER_URL = &#39;https://textsecure-service-staging.whispersystems.org&#39;;
132 - var ATTACHMENT_SERVER_URL = &#39;https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com&#39;;
133 + var SERVER_URL = &#39;https://textsecure-service-ca.whispersystems.org:4433&#39;;
134 + var ATTACHMENT_SERVER_URL = &#39;https://whispersystems-textsecure-attachments.s3.amazonaws.com&#39;;
135 var messageReceiver;
136 window.getSocketStatus = function() {
137 if (messageReceiver) {
138 diff -ur ./js/expire.js userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js
139 --- ./js/expire.js 2016-06-29 13:43:15.630344628 +0200
140 +++ userdata/Default/Extensions/bikioccmkafdpakkkcpdbppfkghcmihk/0.15.0_0/js/expire.js2016-06-29 14:06:29.530300934 +0200
141 @@ -1,6 +1,6 @@
142 ;(function() {
143 &#39;use strict&#39;;
144 - var BUILD_EXPIRATION = 0;
145 + var BUILD_EXPIRATION = 1474492690000;
146
147 window.extension = window.extension || {};
148
149 EOF
150 &lt;/pre&gt;
151
152 &lt;p&gt;The first part is changing the servers, and the second is updating
153 an expiration timestamp. This timestamp need to be updated regularly.
154 It is set 90 days in the future by the build process (Gruntfile.js).
155 The value is seconds since 1970 times 1000, as far as I can tell.&lt;/p&gt;
156
157 &lt;p&gt;Based on a tip and good help from the #nuug IRC channel, I wrote a
158 script to launch Signal in Chromium.&lt;/p&gt;
159
160 &lt;pre&gt;
161 #!/bin/sh
162 cd $(dirname $0)
163 mkdir -p userdata
164 exec chromium \
165 --proxy-server=&quot;socks://localhost:9050&quot; \
166 --user-data-dir=`pwd`/userdata --load-and-launch-app=`pwd`
167 &lt;/pre&gt;
168
169 &lt;p&gt; The script start the app and configure Chromium to use the Tor
170 SOCKS5 proxy to make sure those controlling the Signal servers (today
171 Amazon and Whisper Systems) as well as those listening on the lines
172 will have a harder time location my laptop based on the Signal
173 connections if they use source IP address.&lt;/p&gt;
174
175 &lt;p&gt;When the script starts, one need to follow the instructions under
176 &quot;Standalone Registration&quot; in the CONTRIBUTING.md file in the git
177 repository. I right clicked on the Signal window to get up the
178 Chromium debugging tool, visited the &#39;Console&#39; tab and wrote
179 &#39;extension.install(&quot;standalone&quot;)&#39; on the console prompt to get the
180 registration form. Then I entered by land line phone number and
181 pressed &#39;Call&#39;. 5 seconds later the phone rang and a robot voice
182 repeated the verification code three times. After entering the number
183 into the verification code field in the form, I could start using
184 Signal from my laptop.
185
186 &lt;p&gt;As far as I can tell, The Signal app will leak who is talking to
187 whom and thus who know who to those controlling the central server,
188 but such leakage is hard to avoid with a centrally controlled server
189 setup. It is something to keep in mind when using Signal - the
190 content of your chats are harder to intercept, but the meta data
191 exposing your contact network is available to people you do not know.
192 So better than many options, but not great. And sadly the usage is
193 connected to my land line, thus allowing those controlling the server
194 to associate it to my home and person. I would prefer it if only
195 those I knew could tell who I was on Signal. There are options
196 avoiding such information leakage, but most of my friends are not
197 using them, so I am stuck with Signal for now.&lt;/p&gt;
198
199 &lt;p&gt;&lt;strong&gt;Update 2017-01-10&lt;/strong&gt;: There is an updated blog post
200 on this topic in
201 &lt;a href=&quot;http://www.hungry.com/~pere/blog/Experience_and_updated_recipe_for_using_the_Signal_app_without_a_mobile_phone.html&quot;&gt;Experience
202 and updated recipe for using the Signal app without a mobile
203 phone&lt;/a&gt;.&lt;/p&gt;
204 </description>
205 </item>
206
207 </channel>
208 </rss>