Replicant: Issueshttps://redmine.replicant.us/https://redmine.replicant.us/favicon.ico?15984615062020-01-19T02:03:19ZReplicant
Redmine Replicant - Feature #1988 (New): Safe mode is accidentally triggered too easily (Was "Safer" 'Saf...https://redmine.replicant.us/issues/19882020-01-19T02:03:19Zdoak complex
<a name="TLDR"></a>
<h3 >TL;DR<a href="#TLDR" class="wiki-anchor">¶</a></h3>
<p><em>Safe Mode</em> is triggered too easily.</p>
<a name="Details"></a>
<h3 >Details<a href="#Details" class="wiki-anchor">¶</a></h3>
<p><em>Safe Mode</em> will delete all not-yet-synced data which is connected to an account. This is harmful if you are unable or don't want to be online (i.e. connected to the provider) all the time.<br />I was hit by this several times because I have used a <em>calDAV</em> / <em>cardDAV</em> server within a local VM which was only started from time to time to "backup" that data.</p>
<p>The (updated) Wiki [1] states:</p>
<blockquote>
<p>To boot into Safe Mode, press and hold down the <code>Volume Down</code> button during boot.<br />In fact it is enough to hold the button for approximately one second during the short vibration near the end of the boot sequence. It does not matter if the key was hold down all the time nor if other keys are pressed/held as well.</p>
</blockquote>
That sounds hard, but imho it is not. <em>Safe Mode</em> is triggered quite too easy by accident. At least it happened for me several times:
<ol>
<li>Phone rebooted due of an SW crash and was placed in the "drawer" between driving and passenger seat of my car which is quite narrow. It seems some button had been pressed which led to -- tadaa -- <em>Safe Mode</em> purging my account data.</li>
<li>My mobile fell into water, I got it out of it pretty fast. After some cleaning it seems to be dry. I tried to boot it, which works. Unfortunately some buttons were short circuited which led to -- tadaa -- <em>Safe Mode</em> purging my account data.</li>
<li>Small kids, getting their bruteforce hands on some device, are a great opportunity to boot into <em>Safe Mode</em> as well, though it did not (yet) happen to me.</li>
</ol>
<p>Anyway, imho it's just to easy to purge data. Even in case it had been synchronised, you would need to setup all accounts, restore a backup etc. Very annoying if you are on the road. Furthermore this can be done by any malicious person flying by.</p>
<p>I would suggest to add a patch which enforces another confirmation before purging user data or, alternatively, make it possible to restore these data afterwards.<br />I don't know how hard it is to implement such a patch but it guess it should be straight forward. But I can be wrong, for sure. Any comments?</p>
<p>[1] <a class="external" href="https://redmine.replicant.us/projects/replicant/wiki/SafeMode">https://redmine.replicant.us/projects/replicant/wiki/SafeMode</a></p> Replicant - Issue #1986 (New): Safe mode can loose/erase data ('Safe Mode' purges accounts, and c...https://redmine.replicant.us/issues/19862020-01-18T18:23:33Zdoak complex
<p>After the device was started in <em>Safe Mode</em>, all accounts including their configuration are lost.<br />This affects e.g. <em>Nextcloud</em> and <em>DAVx5</em>. It does not affect e.g. <em>Offline Calendar</em> which seems to add some kind of account as well, but this one is never shown in <code>Settings|Accounts</code> at all.</p>
Reproducable on:
<ul>
<li>i9300: <em>Replicant 6.0 003</em> (own build)</li>
<li>i9305: <em>Replicant 6.0 003</em> (prebuild)</li>
<li>i9305: <em>Replicant 6.0 004 RC1</em> (prebuild)</li>
</ul>
<p>Steps to reproduce:<br />1) Ensure that some account is set-up.<br />2) Restart phone and hold <code>Volume Down</code> button during start of OS (it has to be held when vibration occurs).<br />4) Have a look at accounts: They are vanished (which is okay, since they should be disabled).<br />5) Restart to exit <em>Safe Mode</em>.<br />6) <em>Safe Mode</em> is off, but accounts are still missing</p>
<p>Expected behaviour:<br />After 5) the accounts are still present, data is re-fetched from server. (Data which has not been synchronised will be lost.)</p>
<p>This bug does not occur on LineageOS 14.1-20170927-NIGHTLY-i9305.</p>