<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Android Environment Setup | Student Projects</title>
	<atom:link href="https://studentprojects.in/category/software-development/android/environment-setup/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 04:03:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>ADB commands for Android</title>
		<link>https://studentprojects.in/software-development/android/environment-setup/adb-commands-for-android/</link>
					<comments>https://studentprojects.in/software-development/android/environment-setup/adb-commands-for-android/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Thu, 04 Sep 2014 03:12:48 +0000</pubDate>
				<category><![CDATA[Android Environment Setup]]></category>
		<category><![CDATA[adb commands]]></category>
		<category><![CDATA[android adb]]></category>
		<category><![CDATA[keyevent]]></category>
		<category><![CDATA[Start an activity]]></category>
		<category><![CDATA[adb log]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=7268</guid>

					<description><![CDATA[<p>ADB Stands for Android Debug Bridge, ADB is a command line tool which you can use to debug or communicate with any android device. In order to run ADB from your machine, first you must install android SDK in your computer. ADB is the command line tool which comes in android SDK. In order to</p>
<p>The post <a href="https://studentprojects.in/software-development/android/environment-setup/adb-commands-for-android/">ADB commands for Android</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>ADB Stands for Android Debug Bridge, ADB is a command line tool which you can use to debug or communicate with any android device.</p>
<p>In order to run ADB from your machine, first you must install android SDK in your computer. ADB is the command line tool which comes in android SDK.</p>
<p>In order to run ADB from your machine, we need to have latest adb executable along with the corresponding device drivers. ADB is the command line tool which is part of android SDK. You can download complete sdk or adb executable alone, we can download.</p>
<p>Download from: <a href="http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html</a></p>
<p>Now enable USB debugging in the device settings, under Developer options. After Installing SDK, to provide ADB Commands through command line you need to make “android sdk tools or adb executable” path available to systems environment variable to run from anywhere in the system environment. Otherwise, you need to run the adb commands only from the place, where the adb executable is present.</p>
<p>Let’s see ADB Commands.</p>
<p><img decoding="async" loading="lazy" class="aligncenter size-full wp-image-8730" src="https://studentprojects.in/wp-content/uploads/2014/09/android-adb-commands.png" alt="" width="728" height="380" srcset="https://studentprojects.in/wp-content/uploads/2014/09/android-adb-commands.png 728w, https://studentprojects.in/wp-content/uploads/2014/09/android-adb-commands-300x157.png 300w" sizes="(max-width: 728px) 100vw, 728px" /></p>
<p><strong>ADB Command to view connected device(s)</strong></p>
<p>This command prints a list of all attached emulator/device instances.</p>
<blockquote><p>adb devices</p></blockquote>
<p>If multiple devices are attached, use adb -s DEVICE_ID to target a specific device.</p>
<p><strong>ADB Command to push and pull files</strong></p>
<blockquote><p>adb push &lt;Source&gt; &lt;Destination&gt;</p></blockquote>
<p>This command sends files to your phone from local PC.</p>
<p>Example: adb push c:/example.apk /sdcard/</p>
<blockquote><p>adb pull &lt;Source&gt; &lt;Destination&gt;</p></blockquote>
<p>This command receives files from your phone to local PC.</p>
<p>Example: adb pull /system/app/example.apk c:/</p>
<p><strong>ADB Command to Install and Uninstall an application</strong></p>
<p><strong>Install:</strong></p>
<blockquote><p>adb install -r APK_PATH</p></blockquote>
<p>This command installs a given application to your device. Optional &#8216;-r&#8217; argument reinstalls and keeps any data if the application is already installed on the device.</p>
<blockquote><p>Ex: adb install -r c:/application.apk</p></blockquote>
<p><strong>Uninstall:</strong></p>
<blockquote><p>adb uninstall &lt;PACKAGE_NAME&gt;</p></blockquote>
<p>This command uninstalls the given package from the device.</p>
<blockquote><p>Ex: adb uninstall com.electrofriends.example</p></blockquote>
<p><strong>To start adb with root permissions:</strong></p>
<blockquote><p>adb root</p></blockquote>
<p><strong>ADB command to remount the device:</strong></p>
<blockquote><p>adb remount</p></blockquote>
<p><strong>ADB Command to enter into shell</strong></p>
<blockquote><p>adb shell</p></blockquote>
<p><strong>ADB Command to reboot the device</strong></p>
<blockquote><p>adb reboot</p></blockquote>
<p><strong>ADB Command to reboot the phone into bootloader</strong></p>
<blockquote><p>adb reboot bootloader</p></blockquote>
<p><strong>ADB Command to wipe data/factory reset</strong></p>
<p>Suppose if you have forgotten the device password or for any reason if you want to factory reset your android device, here are the simple 3 steps to do the same.</p>
<p>1. First reboot your device in fastboot or bootloader mode:</p>
<blockquote><p>adb reboot bootloader</p></blockquote>
<p>2. Next erase all data</p>
<blockquote><p>fastboot –w</p></blockquote>
<p>3. Restart your device.</p>
<p><strong>ADB Command Remount your device</strong></p>
<blockquote><p>adb remount</p></blockquote>
<p><strong>ADB Command to take device log</strong></p>
<p>Below command will display the device logs on your command prompt.</p>
<blockquote><p>adb logcat</p></blockquote>
<p><strong>Command to save device logs to a file</strong></p>
<blockquote><p>adb logcat &gt; log</p></blockquote>
<p>If you feel you are getting lots of unwanted logs, then filter by tagname</p>
<blockquote><p>adb logcat -s TAG_NAME<br />
adb logcat -s TAG_NAME_1 TAG_NAME_2</p></blockquote>
<p>You can also filter logs by log priority.</p>
<blockquote><p>adb logcat &#8220;*:PRIORITY&#8221;</p></blockquote>
<p># example</p>
<blockquote><p>adb logcat &#8220;*:W&#8221;</p></blockquote>
<p>Here are the priority levels of logs:</p>
<p>V &#8211; Verbose (lowest priority)<br />
D &#8211; Debug<br />
I &#8211; Info<br />
W &#8211; Warning<br />
E &#8211; Error<br />
F &#8211; Fatal<br />
S &#8211; Silent (highest priority, on which nothing is ever printed)</p>
<p><strong>Filter using grep</strong></p>
<p>Alternatively the output of logcat can be piped to grep on a system that supports it.</p>
<blockquote><p>adb logcat | grep &#8220;ERROR&#8221;<br />
adb logcat | grep &#8220;ERROR\|Exception&#8221;</p></blockquote>
<p><strong>ADB Command to clear the device log</strong></p>
<p>This command will clear the device log buffer.</p>
<blockquote><p>adb logcat -c</p></blockquote>
<p><strong>ADB Command to create and delete users</strong></p>
<p>First you need to enable the multiuser support on your Android device. Then only the user menu will be visible in Android settings.</p>
<blockquote><p>adb shell setprop fw.max_users 8</p></blockquote>
<p>Now run bellow command to create new android device user</p>
<blockquote><p>adb shell pm create-user Test_User</p></blockquote>
<p>Below command is used delete the user based on user ID. There is no direct method is available to delete user based on user name.</p>
<blockquote><p>pm remove-user User_ID</p></blockquote>
<p><strong>ADB Command to Start an activity</strong></p>
<p>Use below command to start any activity</p>
<blockquote><p>adb shell am start PACKAGE_NAME/ACTIVITY_NAME</p></blockquote>
<p>Example:</p>
<p><strong>ADB Command to start and stop settings app.</strong></p>
<blockquote><p>adb shell am start -n com.android.settings/.Settings<br />
adb shell am force-stop com.android.settings</p></blockquote>
<p><strong>ADB Command to open device applications directly.  </strong></p>
<blockquote><p>adb shell am start -a android.intent.action.MAIN -n com.android.settings/.applications.ManageApplications</p></blockquote>
<p><strong>ABD Command to start and stop camera</strong></p>
<blockquote><p>adb shell am start -n com.android.camera2/com.android.camera.CameraLauncher<br />
adb shell am force-stop com.android.camera2</p></blockquote>
<p><strong>ADB Command to launch camera in image capture mode and take picture</strong></p>
<blockquote><p>adb shell am start -a android.media.action.IMAGE_CAPTURE<br />
adb shell input keyevent 27</p></blockquote>
<p><strong>ADB Command to launch camera in video capture mode and take video</strong></p>
<blockquote><p>adb shell am start -a android.media.action.VIDEO_CAPTURE<br />
adb shell  input keyevent 27</p></blockquote><p>The post <a href="https://studentprojects.in/software-development/android/environment-setup/adb-commands-for-android/">ADB commands for Android</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/android/environment-setup/adb-commands-for-android/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
