Skip to content

Commit

Permalink
updated book with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nisrulz committed Sep 10, 2023
1 parent ffbb818 commit 4220ba6
Show file tree
Hide file tree
Showing 32 changed files with 1,491 additions and 436 deletions.
80 changes: 62 additions & 18 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title></title>
<title>Page not found - Android Tips &amp; Tricks</title>
<base href="/">


<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
Expand All @@ -17,25 +19,29 @@
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">

<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">

<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">

<!-- Custom theme stylesheets -->

</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>

<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
Expand All @@ -51,7 +57,7 @@
</script>

<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
Expand All @@ -63,12 +69,14 @@
</script>

<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
var sidebar = null;
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
Expand All @@ -81,11 +89,33 @@
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>

<div id="page-wrapper" class="page-wrapper">

<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
Expand All @@ -94,7 +124,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
Expand All @@ -111,6 +141,7 @@ <h1 class="menu-title">Android Tips &amp; Tricks</h1>
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>

</div>
</div>

Expand All @@ -124,8 +155,9 @@ <h1 class="menu-title">Android Tips &amp; Tricks</h1>
</ul>
</div>
</div>

<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
Expand All @@ -142,26 +174,38 @@ <h1 id="document-not-found-404"><a class="header" href="#document-not-found-404"

<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->


<div style="clear: both"></div>
</nav>
</div>
</div>

<nav class="nav-wide-wrapper" aria-label="Page navigation">

</nav>

</div>

<script type="text/javascript">



<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>


<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>

<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>

<!-- Custom JS scripts -->


</div>
</body>
</html>
84 changes: 66 additions & 18 deletions docs/adb-shell.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Get used to ADB Shell - Android Tips &amp; Tricks</title>


<!-- Custom HTML head -->
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff" />
Expand All @@ -16,25 +18,29 @@
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">

<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">

<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">

<!-- Custom theme stylesheets -->

</head>
<body>
<div id="body-container">
<!-- Provide site root to javascript -->
<script type="text/javascript">
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>

<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script type="text/javascript">
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
Expand All @@ -50,7 +56,7 @@
</script>

<!-- Set the theme before any content is loaded, prevents flash -->
<script type="text/javascript">
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
Expand All @@ -62,12 +68,14 @@
</script>

<!-- Hide / unhide sidebar before it is displayed -->
<script type="text/javascript">
<script>
var html = document.querySelector('html');
var sidebar = 'hidden';
var sidebar = null;
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
html.classList.remove('sidebar-visible');
html.classList.add("sidebar-" + sidebar);
Expand All @@ -80,11 +88,33 @@
<div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
</nav>

<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>

<div id="page-wrapper" class="page-wrapper">

<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky bordered">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<button id="sidebar-toggle" class="icon-button" type="button" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
Expand All @@ -93,7 +123,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light (default)</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
Expand All @@ -110,6 +140,7 @@ <h1 class="menu-title">Android Tips &amp; Tricks</h1>
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>

</div>
</div>

Expand All @@ -123,8 +154,9 @@ <h1 class="menu-title">Android Tips &amp; Tricks</h1>
</ul>
</div>
</div>

<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script type="text/javascript">
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
Expand All @@ -136,7 +168,7 @@ <h1 class="menu-title">Android Tips &amp; Tricks</h1>
<main>
<h1 id="adb-shell"><a class="header" href="#adb-shell">ADB Shell</a></h1>
<p>Few handy commands you can use to interact with emulator/device, through terminal.</p>
<table><thead><tr><th>Description</th><th>Command</th></tr></thead><tbody>
<div class="table-wrapper"><table><thead><tr><th>Description</th><th>Command</th></tr></thead><tbody>
<tr><td>List all connected devices</td><td><code>adb devices</code></td></tr>
<tr><td>Install an application on device<br>-s to install on the SD Card<br>-g to grant all permissions listed in the manifest <a href="https://developer.android.com/studio/command-line/adb.html">[More Info]</a></td><td><code>adb install -r ~/application.apk</code></td></tr>
<tr><td>Uninstall an application</td><td><code>adb uninstall your.app.package</code></td></tr>
Expand All @@ -154,7 +186,11 @@ <h1 id="adb-shell"><a class="header" href="#adb-shell">ADB Shell</a></h1>
<tr><td>Take a Screenshot</td><td><code>adb shell screencap -p \| perl -pe 's/\x0D\x0A/\x0A/g' &gt; screenshot.png</code></td></tr>
<tr><td>Launch an installed app using its package name</td><td><code>adb shell monkey -p com.yourapp.packagename 1</code></td></tr>
<tr><td><a href="https://developer.android.com/studio/test/monkey">Stress test</a> your app using its package name by sending a pseudo-random stream of user events into the system</td><td><code>adb shell monkey -p com.yourapp.packagename -v 500</code></td></tr>
<tr><td>Send input text to a connected device instead of typing manually.</td><td><code>adb shell input text &quot;[email protected]&quot;</code></td></tr>
<tr><td>Check device logs</td><td><code>adb logcat</code></td></tr>
<tr><td>To save Android device logs locally on your computer using ADB</td><td><code>adb logcat &gt; device_logs.txt</code></td></tr>
</tbody></table>
</div>
<ul>
<li><strong><a href="https://crushingcode.nisrulz.com/posts/do-you-like-to-adb/">Learn about various techniques involved when using ADB</a></strong></li>
</ul>
Expand All @@ -166,9 +202,11 @@ <h1 id="adb-shell"><a class="header" href="#adb-shell">ADB Shell</a></h1>
<a rel="prev" href="configure-as.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>

<a rel="next" href="android-aliases.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>

<div style="clear: both"></div>
</nav>
</div>
Expand All @@ -178,23 +216,33 @@ <h1 id="adb-shell"><a class="header" href="#adb-shell">ADB Shell</a></h1>
<a rel="prev" href="configure-as.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>

<a rel="next" href="android-aliases.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>

</div>

<script type="text/javascript">



<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
<script src="mark.min.js" type="text/javascript" charset="utf-8"></script>
<script src="searcher.js" type="text/javascript" charset="utf-8"></script>
<script src="clipboard.min.js" type="text/javascript" charset="utf-8"></script>
<script src="highlight.js" type="text/javascript" charset="utf-8"></script>
<script src="book.js" type="text/javascript" charset="utf-8"></script>


<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>

<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>

<!-- Custom JS scripts -->


</div>
</body>
</html>
Loading

0 comments on commit 4220ba6

Please sign in to comment.