fix draft: Swap on SSD done right

This commit is contained in:
Ali Mürteza Yeşil 2020-07-22 22:40:35 +06:00
parent 87928c42aa
commit 677b68eb27
34 changed files with 117 additions and 201 deletions

View File

@ -1,2 +1,3 @@
title: Swap on SSD done right
date: 2020-07-26
status: draft

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -51,8 +50,6 @@
<h1>Archives for Ali Murteza Yesil</h1>
<dl>
<dt>Sun 26 July 2020</dt>
<dd><a href="https://murtezayesil.me/swap-on-ssd-done-right.html">Swap on SSD done right</a></dd>
<dt>Wed 22 July 2020</dt>
<dd><a href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html">$ADB_VENDOR_KEYS is not set</a></dd>
<dt>Mon 20 July 2020</dt>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -50,33 +49,68 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="https://murtezayesil.me/swap-on-ssd-done-right.html">Swap on SSD done right</a></h1>
<footer class="post-info">
<span>Sun 26 July 2020</span>
<span>| in <a href="https://murtezayesil.me/category/draft.html">draft</a></span>
</footer><!-- /.post-info --> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<ol id="posts-list" class="hfeed">
<li><article class="hentry">
<header>
<h1><a href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html" rel="bookmark"
title="Permalink to $ADB_VENDOR_KEYS is not set">$ADB_VENDOR_KEYS is not set</a></h1>
</header>
<div class="entry-content">
<h1 class="entry-title"><a href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html">$ADB_VENDOR_KEYS is not set</a></h1>
<footer class="post-info">
<span>Wed 22 July 2020</span>
<span>| in <a href="https://murtezayesil.me/category/tech.html">Tech</a></span>
<span>| tags: <a href="https://murtezayesil.me/tag/android.html">android</a><a href="https://murtezayesil.me/tag/error.html">error</a><a href="https://murtezayesil.me/tag/100daystooffload.html">100DaysToOffload</a></span> <span>| Day <strong>7</strong> of #100DaysToOffload</span>
</footer><!-- /.post-info --> </div><!-- /.entry-content -->
</article></li>
</footer><!-- /.post-info --><h2>Story</h2>
<p>I like <a href="https://github.com/Genymobile/scrcpy" title="scrcpy by Genymobile - GitHub">scrcpy</a>. It allows me to cast my phone to computer and use it ther thanks to cable technology (wifi works too). So, after hopping to <img src="https://fosstodon.b-cdn.net/custom_emojis/images/000/025/123/static/a76f54a7dbcd8afd.png" width="15em" height="15em"> Pop_OS! I reinstalled adb and scrcpy.
But this time scrcpy didn't work. Instead it throw this error:<br>
<blockquote style="font-style: normal;">
<code>
adb: error: failed to get feature set: device unauthorized.<br>
This adb server's $ADB_VENDOR_KEYS is not set<br>
Try 'adb kill-server' if that seems wrong.<br>
Otherwise check for a confirmation dialog on your device.<br>
ERROR: "adb push" returned with value 1
</code>
</blockquote> </p>
<h2>Easy way | Grant access using prompt on the phone</h2>
<p>After enabling <a href="https://www.howtogeek.com/129728/how-to-access-the-developer-options-menu-and-enable-usb-debugging-on-android-4.2/">USB debugging in Developer options</a> connect phone to computer and run <code>scrcpy</code>. Phone should prompt you for granting access to computer. All you have to do is accept and connection will be granted 🎉️</p>
<hr>
<p>This prompt didn't appear on my phone. As it turns out, that prompt doesn't works as expected on some custom ROMS. After some digging online, I came across <a href="https://stackoverflow.com/a/26309956">this answer on stack <strong>overflow</strong></a>. Which leads to a <a href="https://android.googlesource.com/platform/system/core/+/d5fcafaf41f8ec90986c813f75ec78402096af2d">commit message for (new) adb authentication</a> implemented in 2012. This prompt copies ~/.android/adbkey.pub on computer, <code>$ADB_VENDOR_KEYS</code>, to <code>/data/misc/adb/adb_keys</code> file in phone's memory. since prompt isn't working for me I have to add that key manually 😕️</p>
<h2>Littler harder way | copy-paste using Termux + root</h2>
<p>Since <code>/data/misc/adb/adb_keys</code> file is offlimits for the user, we need root priviledges for this method.</p>
<ol>
<li>Copy ~/.android/adbkey.pub to phone's memory</li>
<li>Open Termux and install sudo &gt; <code>pkg install tsu</code></li>
<li>Navigate to where file adbkey.pub is. I'm using Redmi Note 4 and its <code>/sdcard</code> directory is used for .<br>
File is at <code>/sdcard/adbkey.pub</code> in my case &gt; <code>cd /sdcard</code></li>
<li>Copy <code>adbkey.pub</code> to <code>/data/misc/adb/adb_keys</code> with sudo priviledges &gt; <code>sudo cp adbkey.pub /data/misc/adb/adb_keys</code> </li>
<li>Double check if content of <code>/data/misc/adb/adb_keys</code> on phone and <code>~/.android/adbkey.pub</code> on computer are the same</li>
<li>Enjoy 😊️</li>
</ol>
<video width="720" height="auto" controls="controls">
<source src="https:///home/murteza/Virtual/Blog/output/videos/copying_adb_vendor_keys_using_termux_and_root.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<hr>
<h2>Hard way | copy-paste using TWRP</h2>
<p>This is the "no-root" hard method. You will still need root priviledges to edit <code>/data/misc/adb/adb_keys</code>. If your phone isn't rooted but has TWRP, GREAT. TWRP has root priviledges and a file manager.</p>
<ol>
<li>Boot into TWRP by holding Vol+ and Power keys while the phone is turned off.</li>
<li>Connect phone to computer</li>
<li>Copy ~/.android/adbkey.pub to phone's memory</li>
<li>Go to Advanced &gt; File manager</li>
<li>Navigate to where adbkey.pub was copied to. I am using Redmi Note 4 and MTP connects to <code>/sdcard</code> on this device.</li>
<li>Copy <code>adbkey.pub</code> to <code>/data/misc/adb/adb_keys</code></li>
<li>Delete <code>adb_keys</code> in </li>
<li>Rename <code>adbkey.pub</code> to <code>abd_keys</code></li>
<li>Double check if content of <code>/data/misc/adb/adb_keys</code> on phone and <code>~/.android/adbkey.pub</code> on computer are the same</li>
<li>Enjoy 😊️</li>
</ol>
<p><img alt="SCRCPY is casting Android phone's screen on to computer after manually copying computer's adbkey.pub file to phone's adb_keys file" src="images/scrcpy_casting_android_to_computer.png" title="scrcpy is finally working"></p>
<hr>
<p>It was a little annoying adventure for me to find where the adbkey.pub suppose to go. I am not immitated with having to do that thing manually. I was annoyed that this information isn't out there in Android documentations and requires reading answers from 2014 on stack__overflow__.</p>
<h3>I hope this guide was helpful to you 😉️</h3> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<ol id="posts-list" class="hfeed">
<li><article class="hentry">
<header>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -49,7 +48,7 @@
</header><!-- /#banner -->
<section id="content" class="body">
<h1>Authors on Ali Murteza Yesil</h1> <li><a href="https://murtezayesil.me/author/ali-murteza-yesil.html">Ali Murteza Yesil</a> (8)</li>
<h1>Authors on Ali Murteza Yesil</h1> <li><a href="https://murtezayesil.me/author/ali-murteza-yesil.html">Ali Murteza Yesil</a> (7)</li>
</section>
<section id="extras" class="body">

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -49,7 +48,6 @@
</header><!-- /#banner -->
<h1>Categories on Ali Murteza Yesil</h1>
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a> (1)</li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a> (1)</li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a> (6)</li>
</ul>

View File

@ -1,121 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Ali Murteza Yesil - draft</title>
<link rel="stylesheet" href="https://murtezayesil.me/theme/css/main.css" />
<link href="https://murtezayesil.me/feeds/atom.xml" type="application/atom+xml" rel="alternate" title="Ali Murteza Yesil Atom Feed" />
<link href="https://murtezayesil.me/feeds/rss.xml" type="application/rss+xml" rel="alternate" title="Ali Murteza Yesil RSS Feed" />
<!-- This border added via BLACK_LIVES_MATTER toggle in site settings -->
<style>
body {
border-width: 5em ;
border-color: #000000 ;
border-style: none solid solid solid ; /* top border : none, right bottom left : solid */
}
</style>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body id="index" class="home">
<!-- This banner added via BLACK_LIVES_MATTER toggle in site settings -->
<div style="background-color: black; padding: 1em; margin-bottom: .8em">
<h1 style="text-align: center; margin-bottom: 0em"><a href="https://blacklivesmatter.com/" style="color: #fce21b; font-size: 2em">Black Lives Matter</a></h1>
</div>
<header id="banner" class="body">
<h1><a href="https://murtezayesil.me/">Ali Murteza Yesil <strong>Blog</strong></a></h1>
<nav><ul>
<li><a href="https://murtezayesil.me/pages/about.html">About</a></li>
<li><a href="https://murtezayesil.me/pages/contact.html">Contact</a></li>
</ul>
<form id="search" action"#" onsubmit="javascript:window.open('https://duckduckgo.com/?q='+document.getElementById('keywords').value+'+site:https://murtezayesil.me');">
<input id="keywords" type="text" />
</form>
</nav>
<div id="submenu">
<ul>
<li class="active"><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
<div>
</header><!-- /#banner -->
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="https://murtezayesil.me/swap-on-ssd-done-right.html">Swap on SSD done right</a></h1>
<footer class="post-info">
<span>Sun 26 July 2020</span>
<span>| in <a href="https://murtezayesil.me/category/draft.html">draft</a></span>
</footer><!-- /.post-info --> </article>
<p class="paginator">
Page 1 / 1
</p>
</aside><!-- /#featured -->
</ol><!-- /#posts-list -->
</section><!-- /#content -->
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="https://kevq.uk">Kev Quirk</a></li>
<li><a href="https://mikestone.me">Mike Stone</a></li>
<li><a href="https://yarmo.eu/">Yarmo Mackenbach</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="https://murtezayesil.me/feeds/atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="https://murtezayesil.me/feeds/rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="https://fosstodon.org/@murtezayesil" rel="me">Fostodon</a></li>
</ul>
</div><!-- /.social -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<p>Powered by <a href="http://getpelican.com/">Pelican</a>. Theme <a href="https://github.com/blueicefield/pelican-blueidea/">blueidea</a>, inspired by the default theme.</p>
</footer><!-- /#contentinfo -->
<!-- IndieWeb Profile -->
<!-- ToDo : Make IndieWeb Profile auto generating according to site preferences -->
<!-- This profile is created by following https://kevq.uk/how-to-create-an-indieweb-profile/ blog post. Thanks to Kev Quirk -->
<section style="display: none;" class="h-card">
<!-- About me -->
<span class="p-name">Ali Murteza Yesil</span>
<span class="p-note">I'm a student, privacy advocate and SysAdmin wannabe. I was born in Turkey but I live abroad.</span>
<!-- Profile picture -->
<img class="u-photo" src="https://murtezayesil.me/images/avatar_polygon_1.png"/>
<!-- My location -->
<!-- <span class="p-locality">City, Country or Country</span> -->
<!-- Links -->
<a class="u-url u-uid" href="https://murtezayesil.me"></a>
<!-- Mail Template <a class="u-email" rel="me" href="mailto:USERNAME@SERVICEPROVIDER"></a> -->
<a class="u-url" rel="me" href="https://fosstodon.org/@murtezayesil"></a>
<!-- Twitter Example <a class="u-url" rel="me" href="https://twitter.com/USERNAME"></a> -->
<!-- Template <a class="u-url" rel="me" href="https://URL"></a> -->
<!-- Categories -->
<span class="p-category">Blogging</span>
<span class="p-category">Open Source Software</span>
<span class="p-category">Privacy</span>
</section>
</body>
</html>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li class="active"><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li class="active"><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li class="active"><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li class="active"><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -51,7 +50,7 @@
<article>
<header>
<h1 class="entry-title">
<a href="https://murtezayesil.me/swap-on-ssd-done-right.html" rel="bookmark"
<a href="https://murtezayesil.me/drafts/swap-on-ssd-done-right.html" rel="bookmark"
title="Permalink to Swap on SSD done right">Swap on SSD done right</a></h1>
</header>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Ali Murteza Yesil</title><link href="https://murtezayesil.me/" rel="alternate"></link><link href="https://murtezayesil.me/feeds/atom.xml" rel="self"></link><id>https://murtezayesil.me/</id><updated>2020-07-26T00:00:00+06:00</updated><subtitle>Blog</subtitle><entry><title>Swap on SSD done right</title><link href="https://murtezayesil.me/swap-on-ssd-done-right.html" rel="alternate"></link><published>2020-07-26T00:00:00+06:00</published><updated>2020-07-26T00:00:00+06:00</updated><author><name>Ali Murteza Yesil</name></author><id>tag:murtezayesil.me,2020-07-26:/swap-on-ssd-done-right.html</id><content type="html"></content><category term="draft"></category></entry><entry><title>$ADB_VENDOR_KEYS is not set</title><link href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html" rel="alternate"></link><published>2020-07-22T00:00:00+06:00</published><updated>2020-07-22T00:00:00+06:00</updated><author><name>Ali Murteza Yesil</name></author><id>tag:murtezayesil.me,2020-07-22:/adb_vendor_keys-is-not-set.html</id><summary type="html">&lt;p&gt;Authorizing adb when no prompt will come, the hard way.&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Story&lt;/h2&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>Ali Murteza Yesil</title><link href="https://murtezayesil.me/" rel="alternate"></link><link href="https://murtezayesil.me/feeds/atom.xml" rel="self"></link><id>https://murtezayesil.me/</id><updated>2020-07-22T00:00:00+06:00</updated><subtitle>Blog</subtitle><entry><title>$ADB_VENDOR_KEYS is not set</title><link href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html" rel="alternate"></link><published>2020-07-22T00:00:00+06:00</published><updated>2020-07-22T00:00:00+06:00</updated><author><name>Ali Murteza Yesil</name></author><id>tag:murtezayesil.me,2020-07-22:/adb_vendor_keys-is-not-set.html</id><summary type="html">&lt;p&gt;Authorizing adb when no prompt will come, the hard way.&lt;/p&gt;</summary><content type="html">&lt;h2&gt;Story&lt;/h2&gt;
&lt;p&gt;I like &lt;a href="https://github.com/Genymobile/scrcpy" title="scrcpy by Genymobile - GitHub"&gt;scrcpy&lt;/a&gt;. It allows me to cast my phone to computer and use it ther thanks to cable technology (wifi works too). So, after hopping to &lt;img src="https://fosstodon.b-cdn.net/custom_emojis/images/000/025/123/static/a76f54a7dbcd8afd.png" width="15em" height="15em"&gt; Pop_OS! I reinstalled adb and scrcpy.
But this time scrcpy didn't work. Instead it throw this error:&lt;br&gt;
&lt;blockquote style="font-style: normal;"&gt;

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Ali Murteza Yesil - draft</title><link href="https://murtezayesil.me/" rel="alternate"></link><link href="https://murtezayesil.me/feeds/draft.atom.xml" rel="self"></link><id>https://murtezayesil.me/</id><updated>2020-07-26T00:00:00+06:00</updated><subtitle>Blog</subtitle><entry><title>Swap on SSD done right</title><link href="https://murtezayesil.me/swap-on-ssd-done-right.html" rel="alternate"></link><published>2020-07-26T00:00:00+06:00</published><updated>2020-07-26T00:00:00+06:00</updated><author><name>Ali Murteza Yesil</name></author><id>tag:murtezayesil.me,2020-07-26:/swap-on-ssd-done-right.html</id><content type="html"></content><category term="draft"></category></entry></feed>

File diff suppressed because one or more lines are too long

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li class="active"><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>
@ -50,33 +49,68 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="https://murtezayesil.me/swap-on-ssd-done-right.html">Swap on SSD done right</a></h1>
<footer class="post-info">
<span>Sun 26 July 2020</span>
<span>| in <a href="https://murtezayesil.me/category/draft.html">draft</a></span>
</footer><!-- /.post-info --> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<ol id="posts-list" class="hfeed">
<li><article class="hentry">
<header>
<h1><a href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html" rel="bookmark"
title="Permalink to $ADB_VENDOR_KEYS is not set">$ADB_VENDOR_KEYS is not set</a></h1>
</header>
<div class="entry-content">
<h1 class="entry-title"><a href="https://murtezayesil.me/adb_vendor_keys-is-not-set.html">$ADB_VENDOR_KEYS is not set</a></h1>
<footer class="post-info">
<span>Wed 22 July 2020</span>
<span>| in <a href="https://murtezayesil.me/category/tech.html">Tech</a></span>
<span>| tags: <a href="https://murtezayesil.me/tag/android.html">android</a><a href="https://murtezayesil.me/tag/error.html">error</a><a href="https://murtezayesil.me/tag/100daystooffload.html">100DaysToOffload</a></span> <span>| Day <strong>7</strong> of #100DaysToOffload</span>
</footer><!-- /.post-info --> </div><!-- /.entry-content -->
</article></li>
</footer><!-- /.post-info --><h2>Story</h2>
<p>I like <a href="https://github.com/Genymobile/scrcpy" title="scrcpy by Genymobile - GitHub">scrcpy</a>. It allows me to cast my phone to computer and use it ther thanks to cable technology (wifi works too). So, after hopping to <img src="https://fosstodon.b-cdn.net/custom_emojis/images/000/025/123/static/a76f54a7dbcd8afd.png" width="15em" height="15em"> Pop_OS! I reinstalled adb and scrcpy.
But this time scrcpy didn't work. Instead it throw this error:<br>
<blockquote style="font-style: normal;">
<code>
adb: error: failed to get feature set: device unauthorized.<br>
This adb server's $ADB_VENDOR_KEYS is not set<br>
Try 'adb kill-server' if that seems wrong.<br>
Otherwise check for a confirmation dialog on your device.<br>
ERROR: "adb push" returned with value 1
</code>
</blockquote> </p>
<h2>Easy way | Grant access using prompt on the phone</h2>
<p>After enabling <a href="https://www.howtogeek.com/129728/how-to-access-the-developer-options-menu-and-enable-usb-debugging-on-android-4.2/">USB debugging in Developer options</a> connect phone to computer and run <code>scrcpy</code>. Phone should prompt you for granting access to computer. All you have to do is accept and connection will be granted 🎉️</p>
<hr>
<p>This prompt didn't appear on my phone. As it turns out, that prompt doesn't works as expected on some custom ROMS. After some digging online, I came across <a href="https://stackoverflow.com/a/26309956">this answer on stack <strong>overflow</strong></a>. Which leads to a <a href="https://android.googlesource.com/platform/system/core/+/d5fcafaf41f8ec90986c813f75ec78402096af2d">commit message for (new) adb authentication</a> implemented in 2012. This prompt copies ~/.android/adbkey.pub on computer, <code>$ADB_VENDOR_KEYS</code>, to <code>/data/misc/adb/adb_keys</code> file in phone's memory. since prompt isn't working for me I have to add that key manually 😕️</p>
<h2>Littler harder way | copy-paste using Termux + root</h2>
<p>Since <code>/data/misc/adb/adb_keys</code> file is offlimits for the user, we need root priviledges for this method.</p>
<ol>
<li>Copy ~/.android/adbkey.pub to phone's memory</li>
<li>Open Termux and install sudo &gt; <code>pkg install tsu</code></li>
<li>Navigate to where file adbkey.pub is. I'm using Redmi Note 4 and its <code>/sdcard</code> directory is used for .<br>
File is at <code>/sdcard/adbkey.pub</code> in my case &gt; <code>cd /sdcard</code></li>
<li>Copy <code>adbkey.pub</code> to <code>/data/misc/adb/adb_keys</code> with sudo priviledges &gt; <code>sudo cp adbkey.pub /data/misc/adb/adb_keys</code> </li>
<li>Double check if content of <code>/data/misc/adb/adb_keys</code> on phone and <code>~/.android/adbkey.pub</code> on computer are the same</li>
<li>Enjoy 😊️</li>
</ol>
<video width="720" height="auto" controls="controls">
<source src="https:///home/murteza/Virtual/Blog/output/videos/copying_adb_vendor_keys_using_termux_and_root.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<hr>
<h2>Hard way | copy-paste using TWRP</h2>
<p>This is the "no-root" hard method. You will still need root priviledges to edit <code>/data/misc/adb/adb_keys</code>. If your phone isn't rooted but has TWRP, GREAT. TWRP has root priviledges and a file manager.</p>
<ol>
<li>Boot into TWRP by holding Vol+ and Power keys while the phone is turned off.</li>
<li>Connect phone to computer</li>
<li>Copy ~/.android/adbkey.pub to phone's memory</li>
<li>Go to Advanced &gt; File manager</li>
<li>Navigate to where adbkey.pub was copied to. I am using Redmi Note 4 and MTP connects to <code>/sdcard</code> on this device.</li>
<li>Copy <code>adbkey.pub</code> to <code>/data/misc/adb/adb_keys</code></li>
<li>Delete <code>adb_keys</code> in </li>
<li>Rename <code>adbkey.pub</code> to <code>abd_keys</code></li>
<li>Double check if content of <code>/data/misc/adb/adb_keys</code> on phone and <code>~/.android/adbkey.pub</code> on computer are the same</li>
<li>Enjoy 😊️</li>
</ol>
<p><img alt="SCRCPY is casting Android phone's screen on to computer after manually copying computer's adbkey.pub file to phone's adb_keys file" src="images/scrcpy_casting_android_to_computer.png" title="scrcpy is finally working"></p>
<hr>
<p>It was a little annoying adventure for me to find where the adbkey.pub suppose to go. I am not immitated with having to do that thing manually. I was annoyed that this information isn't out there in Android documentations and requires reading answers from 2014 on stack__overflow__.</p>
<h3>I hope this guide was helpful to you 😉️</h3> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<ol id="posts-list" class="hfeed">
<li><article class="hentry">
<header>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li class="active"><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>

View File

@ -41,7 +41,6 @@
</nav>
<div id="submenu">
<ul>
<li><a href="https://murtezayesil.me/category/draft.html">draft</a></li>
<li><a href="https://murtezayesil.me/category/notes.html">Notes</a></li>
<li><a href="https://murtezayesil.me/category/tech.html">Tech</a></li>
</ul>