<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>lm2</title>
    <link>https://write.tedomum.net/lm2/</link>
    <description></description>
    <pubDate>Tue, 26 May 2026 15:20:52 +0000</pubDate>
    <item>
      <title>HTC sensation/pyramid, workaround about lk2nd/postmarketos</title>
      <link>https://write.tedomum.net/lm2/htc-sensation-pyramid-workaround-about-lk2nd-postmarketos</link>
      <description>&lt;![CDATA[This is about htc-pyramid device (sensation ; maybe sensation XE and sensation 4G) &#xA;&#xA;Three parts :&#xA;&#xA;UART Logs&#xA;S-OFF process&#xA;LK2ND&#xA;&#xA;UART logs&#xA;&#xA;in order to get uart logs :&#xA;&#xA;you need :&#xA;&#xA;htc pyramid device of course&#xA;&#xA;usb to uart converter&#xA;&#xA;linux with the minicom tool&#xA;&#xA;tools to unscrew and disassembly the device&#xA;&#xA;lot of time and patiency&#xA;&#xA;process :&#xA;&#xA;save the content of your device&#xA;&#xA;power it off&#xA;&#xA;disassembly it&#xA;&#xA;unplug the screen (it&#39;s not possible to reach &#xA;the uart pinout with the screen connected&#xA;&#xA;connect the usb/uart converter in USB to the computer&#xA;&#xA;connect the GND from converter, to a piece of metal (the one covering the microsdcard slot, for example (see picture 1)&#xA;&#xA;connect the RX from the converter, to the &#34;purple&#34; mark, among the pinout of the PCB (see picture 1)&#xA;&#xA;in linux, just open minicom -d /dev/ttyUSB0&#xA;&#xA;UART logs should appear&#xA;&#xA;Picture 1:&#xA;&#xA;Mirror of Picture 1:&#xA;https://img.tedomum.net/data/pyramidUART-156999.png&#xA;&#xA;example of UART log (to be completed) at:&#xA;&#xA;https://paste.debian.net/hidden/147f9804/&#xA;https://paste.debian.net/hidden/abc2e7e7/&#xA;&#xA;s-off process&#xA;&#xA;On windows 7:&#xA;&#xA;obtained the (right model that time) RUU exe for htc-pyramid, and restored it to manufacturer&#39;s default ROM : &#xA;&#xA;  RUUPYRAMIDLEICS35SHTCEurope3.33.401.153Radio11.76A.3504.00U11.24A.3504.31Mrelease281004signed&#xA;&#xA;[what is weird, that i looked here and here, that RUU -to restore&#39;s htc&#39;s oem default software- has been &#34;commented&#34; as on topic for HTC Sensation XE/4G. Here, device is from 2011/3G...]&#xA;&#xA;Result is that one flashes well on the device, whom goes back to complete factory defaults.&#xA;&#xA;To flash the RUU :&#xA;&#xA;(requires that both htc&#39;s drivers are installed, plus adb/fastboot are present into the computer, and command lines executed from the adb/fastboot directory)&#xA;&#xA;a.  first  save/backup your device&#xA;&#xA;b. then reboot in fastboot mode&#xA;&#xA;c. after, with device connected to computer in USB,  do either :&#xA;&#xA;c1: launch directly the RUU[..].exe from Windows 7&#xA;&#xA;or &#xA;&#xA;c2:  &#xA;  fastboot flash oem.zip&#xA;&#xA;the required files are stored on :&#xA;&#xA;for fastboot flash zip, the oem zip is at :&#xA;&#xA;  https://archive.org/download/HTC-files/rom.zip&#xA;&#xA;for the RUU exe for windows&#39;s htc wizard :&#xA;&#xA;  https://archive.org/download/HTC-files/RUUPYRAMIDLEICS35SHTCEurope3.33.401.153Radio11.76A.3504.00U11.24A.3504.31Mrelease281004signed.exe&#xA;&#xA;for temproot + controlbear / s-off process, all files can be found at :&#xA;&#xA;dont forget to enable the usb debug from android&#39;s developper menu, the process to unhide it is well known.&#xA;&#xA;https://archive.org/download/HTC-files/htc-pyramid-sensation-allfiles-soff-temproot.7z&#xA;&#xA;applied the temproot script&#xA;&#xA;log of temproot  at :&#xA;&#xA;https://paste.debian.net/hidden/470bf608&#xA;&#xA;applied the controlbear to remove s-off : this step required to disassembly a bit the device (back cover with battery, removed), plus took ~4 hours of attempts&#xA;&#xA;the &#34;wire trick&#34; is very hazardous and hard to do/follow/understand, and i do not wish to anybody to encounter this step. Worst ever than volte injection on android.&#xA;&#xA;[then the device is s-off, i can&#39;t believe it]&#xA;&#xA;Notice that controlbear&#39;s step requires absolutely to get a ready-to-be-formated microsd card inside the phone, or will never continue the process.&#xA;&#xA;log of controlbear at :&#xA;&#xA;https://paste.debian.net/hidden/fb6489c4&#xA;&#xA;LK2ND &#xA;&#xA;this device can run LK2ND by usb output, it doesnt brings screen output.&#xA;&#xA;  /!\ lk2nd can not run if the device is in s-on  /!\\ &#xA;&#xA;lk2nd&#39;s watchdog deactived is required to get lk2nd not rebooting&#xA;&#xA;Adaptation of LK2ND to the htc-pyramid device :&#xA;&#xA;  /!\ please notice, the lk2nd could be accessed by usb, will not show up on the screen (on htc logo or hboot) /!\\&#xA;&#xA;  /!\ lk2nd can not run if device is in S-ON, device in S-OFF mode needed for lk2nd /!\\&#xA;&#xA;for this part, various files can be downloaded from :&#xA;&#xA;https://archive.org/download/HTC-files/htc-pyramid-lk2nd-files.zip&#xA;&#xA;copy those two lines :&#xA;&#xA;  / Disable WDG0 /&#xA;  writel(0, MSMWDT0EN);&#xA;&#xA;into this file : /target/msm8660/init.c   &#xA;&#xA;at this place, as result looks like :&#xA;&#xA;https://paste.debian.net/hidden/6f216878/&#xA;&#xA;then compile :&#xA;&#xA;  make TOOLCHAINPREFIX=arm-none-eabi- lk2nd-msm8660  DEBUG=2&#xA;&#xA;then patch the lk2nd image, with the htc&#39;s boot one, to make it bootable :&#xA;&#xA;  python3 /pyramid-files/patch-boot-img.py /pyramid-files/htc-pyramid/boot_htc-pyramid.img /path/to/lk2nd/build-lk2nd-msm8660/lk.bin /tmp/lk2nd-patched.bin&#xA;&#xA;patch-boot-img.py can be found both on the archive.org repository, plus as raw (plain text) at the following :&#xA;&#xA;https://paste.debian.net/hidden/d268c92e/&#xA;&#xA;then attempt to boot, as device powered on in fastboot mode :&#xA;&#xA;  fastboot boot /tmp/lk2nd-patched.bin&#xA;&#xA;  fastboot getvar result :&#xA;&#xA;https://paste.debian.net/hidden/d7c5d938/&#xA;&#xA;admire the output logs :&#xA;&#xA;https://paste.debian.net/hidden/936a028b/&#xA;&#xA;https://paste.debian.net/hidden/0606e9c9/&#xA;&#xA;contact the author : @lm2@piaille.fr or @tkr@piaille.fr on mastodon (be patient)]]&gt;</description>
      <content:encoded><![CDATA[<p>This is about htc-pyramid device (sensation ; maybe sensation XE and sensation 4G)</p>

<p>Three parts :</p>
<ol><li>UART Logs</li>
<li>S-OFF process</li>
<li>LK2ND</li></ol>

<h2 id="uart-logs">UART logs</h2>

<p>in order to get uart logs :</p>

<h3 id="you-need">you need :</h3>
<ol><li><p>htc pyramid device of course</p></li>

<li><p>usb to uart converter</p></li>

<li><p>linux with the minicom tool</p></li>

<li><p>tools to unscrew and disassembly the device</p></li>

<li><p>lot of time and patiency</p></li></ol>

<h3 id="process">process :</h3>
<ol><li><p>save the content of your device</p></li>

<li><p>power it off</p></li>

<li><p>disassembly it</p></li>

<li><p>unplug the screen (it&#39;s not possible to reach
the uart pinout with the screen connected</p></li>

<li><p>connect the usb/uart converter in USB to the computer</p></li>

<li><p>connect the GND from converter, to a piece of metal (the one covering the microsdcard slot, for example (see picture 1)</p></li>

<li><p>connect the RX from the converter, to the “purple” mark, among the pinout of the PCB (see picture 1)</p></li>

<li><p>in linux, just open minicom -d /dev/ttyUSB0</p></li>

<li><p>UART logs should appear</p></li></ol>

<p>Picture 1:
<img src="https://pix.milkywan.fr/CNtRvGVp.png" alt=""></p>

<p>Mirror of Picture 1:
<a href="https://img.tedomum.net/data/pyramidUART-156999.png" rel="nofollow">https://img.tedomum.net/data/pyramidUART-156999.png</a></p>

<p>example of UART log (to be completed) at:</p>

<p><a href="https://paste.debian.net/hidden/147f9804/" rel="nofollow">https://paste.debian.net/hidden/147f9804/</a>
<a href="https://paste.debian.net/hidden/abc2e7e7/" rel="nofollow">https://paste.debian.net/hidden/abc2e7e7/</a></p>

<h2 id="s-off-process">s-off process</h2>

<p>On windows 7:</p>
<ol><li>obtained the (right model that time) RUU exe for htc-pyramid, and restored it to manufacturer&#39;s default ROM :</li></ol>

<blockquote><p>RUU<em>PYRAMID</em>LE<em>ICS</em>35<em>S</em>HTC<em>Europe</em>3.33.401.153<em>Radio</em>11.76A.3504.00U<em>11.24A.3504.31</em>M<em>release</em>281004_signed</p></blockquote>

<p>[what is weird, that i looked here and here, that RUU -to restore&#39;s htc&#39;s oem default software- has been “commented” as on topic for HTC Sensation XE/4G. Here, device is from 2011/3G...]</p>

<p>Result is that one flashes well on the device, whom goes back to complete factory defaults.</p>

<p>To flash the RUU :</p>

<p>(requires that both htc&#39;s drivers are installed, plus adb/fastboot are present into the computer, and command lines executed from the adb/fastboot directory)</p>

<p>a.  first  save/backup your device</p>

<p>b. then reboot in fastboot mode</p>

<p>c. after, with device connected to computer in USB,  do either :</p>

<p>c1: launch directly the RUU[..].exe from Windows 7</p>

<p>or</p>

<p>c2:<br>
&gt; fastboot flash oem.zip</p>

<p>the required files are stored on :</p>

<p>for fastboot flash zip, the oem zip is at :</p>

<blockquote><p><a href="https://archive.org/download/HTC-files/rom.zip" rel="nofollow">https://archive.org/download/HTC-files/rom.zip</a></p></blockquote>

<p>for the RUU exe for windows&#39;s htc wizard :</p>

<blockquote><p><a href="https://archive.org/download/HTC-files/RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.33.401.153_Radio_11.76A.3504.00U_11.24A.3504.31_M_release_281004_signed.exe" rel="nofollow">https://archive.org/download/HTC-files/RUU_PYRAMID_LE_ICS_35_S_HTC_Europe_3.33.401.153_Radio_11.76A.3504.00U_11.24A.3504.31_M_release_281004_signed.exe</a></p></blockquote>

<p>for temproot + controlbear / s-off process, all files can be found at :</p>

<p>dont forget to enable the usb debug from android&#39;s developper menu, the process to unhide it is well known.</p>

<p><a href="https://archive.org/download/HTC-files/htc-pyramid-sensation-allfiles-soff-temproot.7z" rel="nofollow">https://archive.org/download/HTC-files/htc-pyramid-sensation-allfiles-soff-temproot.7z</a></p>
<ol><li>applied the temp_root script</li></ol>

<p>log of temproot  at :</p>

<p><a href="https://paste.debian.net/hidden/470bf608" rel="nofollow">https://paste.debian.net/hidden/470bf608</a></p>
<ol><li>applied the controlbear to remove s-off : this step required to disassembly a bit the device (back cover with battery, removed), plus took ~4 hours of attempts</li></ol>

<p>the “wire trick” is very hazardous and hard to do/follow/understand, and i do not wish to anybody to encounter this step. Worst ever than volte injection on android.</p>

<p>[then the device is s-off, i can&#39;t believe it]</p>

<p>Notice that controlbear&#39;s step requires absolutely to get a ready-to-be-formated microsd card inside the phone, or will never continue the process.</p>

<p>log of controlbear at :</p>

<p><a href="https://paste.debian.net/hidden/fb6489c4" rel="nofollow">https://paste.debian.net/hidden/fb6489c4</a></p>

<h2 id="lk2nd">LK2ND</h2>

<p>this device can run LK2ND by usb output, it doesnt brings screen output.</p>

<blockquote><p>/!\ lk2nd can not run if the device is in s-on  /!\</p></blockquote>

<p>lk2nd&#39;s watchdog deactived is required to get lk2nd not rebooting</p>

<p>Adaptation of LK2ND to the htc-pyramid device :</p>

<blockquote><p>/!\ please notice, the lk2nd could be accessed by usb, will not show up on the screen (on htc logo or hboot) /!\</p>

<p>/!\ lk2nd can not run if device is in S-ON, device in S-OFF mode needed for lk2nd /!\</p></blockquote>

<p>for this part, various files can be downloaded from :</p>

<p><a href="https://archive.org/download/HTC-files/htc-pyramid-lk2nd-files.zip" rel="nofollow">https://archive.org/download/HTC-files/htc-pyramid-lk2nd-files.zip</a></p>
<ol><li>copy those two lines :</li></ol>

<blockquote><p>      /* Disable WDG0 */
       writel(0, MSM<em>WDT0</em>EN);</p></blockquote>

<p>into this file : /target/msm8660/init.c</p>

<p>at this place, as result looks like :</p>

<p><a href="https://paste.debian.net/hidden/6f216878/" rel="nofollow">https://paste.debian.net/hidden/6f216878/</a></p>
<ol><li>then compile :</li></ol>

<blockquote><p>make TOOLCHAIN_PREFIX=arm-none-eabi- lk2nd-msm8660  DEBUG=2</p></blockquote>

<p>then patch the lk2nd image, with the htc&#39;s boot one, to make it bootable :</p>

<blockquote><p>python3 /pyramid-files/patch-boot-img.py /pyramid-files/htc-pyramid/boot_htc-pyramid.img /path/to/lk2nd/build-lk2nd-msm8660/lk.bin /tmp/lk2nd-patched.bin</p></blockquote>

<p>patch-boot-img.py can be found both on the archive.org repository, plus as raw (plain text) at the following :</p>

<p><a href="https://paste.debian.net/hidden/d268c92e/" rel="nofollow">https://paste.debian.net/hidden/d268c92e/</a></p>
<ol><li>then attempt to boot, as device powered on in fastboot mode :</li></ol>

<blockquote><p>fastboot boot /tmp/lk2nd-patched.bin</p>

<p>fastboot getvar result :</p></blockquote>

<p><a href="https://paste.debian.net/hidden/d7c5d938/" rel="nofollow">https://paste.debian.net/hidden/d7c5d938/</a></p>
<ol><li>admire the output logs :</li></ol>

<p><a href="https://paste.debian.net/hidden/936a028b/" rel="nofollow">https://paste.debian.net/hidden/936a028b/</a></p>

<p><a href="https://paste.debian.net/hidden/0606e9c9/" rel="nofollow">https://paste.debian.net/hidden/0606e9c9/</a></p>

<p>contact the author : <a href="https://write.tedomum.net/@/lm2@piaille.fr" class="u-url mention" rel="nofollow">@<span>lm2@piaille.fr</span></a> or <a href="https://write.tedomum.net/@/tkr@piaille.fr" class="u-url mention" rel="nofollow">@<span>tkr@piaille.fr</span></a> on mastodon (be patient)</p>
]]></content:encoded>
      <guid>https://write.tedomum.net/lm2/htc-sensation-pyramid-workaround-about-lk2nd-postmarketos</guid>
      <pubDate>Wed, 16 Jul 2025 18:53:38 +0000</pubDate>
    </item>
  </channel>
</rss>