This action might not be possible to undo. Are you sure you want to continue?
Remember Me? PORTAL FORUM WIKI XDA TV QUICK LINKS
Type To Find Your Device...
Forgot your password?
Search All Forums
> Legacy & Low Activity Devices > Samsung Galaxy Ace S5830, S5830i, Ace II > Galaxy Ace S5830i Android Development > [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies View Poll Results: How was the guide? It was intuitive and easy to understand It was dull and boring I am color blind and it was very hard
Voters: 204. You may not vote on this poll
162 4 38
79.41% 1.96% 18.63%
Page 1 of 9
Search this thread [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies iamareebjamal
Like Tweet Tip us?
10th February 2013, 12:12 PM (Last edited by iamareebjamal; 17th May 2013 at 04:01 PM.)
MOST THANKED IN THIS THREAD ALL-TIME
[GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
6 3 3
If you're stuck in a bootloop between … jamesd86 2013-Mar-30 6:30 (quote) Sorry for inconvenience And … iamareebjamal OP 2013-May-17 2:20 About Broadcom being open sourced made … Chris s5830i 2013-Feb-11 5:24
ADB:Recognized Contributor - OP Thanks Meter 3755 Posts: 3,012 Join Date: Aug 2012 Location: XDA Likes:XDA,Technology,Android Hates:Haters,Whiners,Bugs MORE INFO
Android Debug Bridge
Very useful program made itself by Google for Programmers and developers. Its based on command line and basically communicates with your Android to respond to certain commands. There is vast amount of knowledge about adb but its most useful commands limit to getting:Logcat:A real time log of what is happening in background of our devices. It is really useful for developers to see which component has malfunctioned and helps to narrow down their search for what failed and what needs to be fixed. Several times users are asked to give logcats of their devices which are giving errors. We will go in detail that how to get logcats in every and easiest way possible. App Installation and Management:adb proves really handy if you want to install apks directly from your PC or want to batch install or delete them. Shell Execution:You must have heard of Terminal Emulator. It is an app for android to execute shell commands(linux commands) which are basically present as applets in /system/bin, /system/sbin or /system/xbin(in our case) folders. A very imporant applet called busybox is installed there mainly used for execution of basic commands during root browsing or ROM installation. Many times updater script of ROMs use busybox commands to install it. Well, these commands can be initiated from your device too but they can be initiated from adb also making it easy for programmers. Pushing and Pulling:Most used commands of adb. adb makes it a piece of cake for new device developers to get an ideo of structure and basic knowledge of devices by pulling command. We can pull out i.e copy any files or folders from our devices to our PC, even the root directories without rooting the devices. It help rooters and ROM chefs of new devices to get an idea and implement their mods on them. Pushing is also very useful command. It copies your files and folders from PC to your device. Very useful in pushing some /system apps and other things Remounting and setting permissions Basic commands:Of-course basic commands such as rebooting and rebooting in recovery mode and download mode are supported. Others:There are several other features of adb such as fastboot, aapt, etc
XDA PORTAL POSTS
Create Holo-Themed Demo Overlays with ShowcaseView One week ago, we featured a guidebyXDASenior Membermarty331posted in our App Development … more BStats Brings Powerful Battery Tracking to Gingerbread With our ever expanding screen sizes, exponentially faster processors, and marginally … more Jordan Interviews XDA:DevCon 2013′s Elite Sponsor, Oppo – XDA Developer TV We’ve already seen XDA Developer TV Producer … more Wanam Xposed Brings Many Tweaks to Stock Samsung ROMs Let’s face it. Sometimes, there isn’t quite as much time for device … more
Setting up ADB
Pre Requirements:A little amount of brain PC(This is a windows guide, if asked I will add linux and mac guide later) Java Runtime environment or Java Developing kit Your Device Drivers An Android Device USB Debugging MUST be turned ON in the device for ADB to see it & Developer options is hidden in Android 4.2 and above, Hitting Build number 10 times in About Phone/Tablet reveals the menu (Thanks lilHermit for reminding me to add it) Assuming you all these ready and working properly, we continue If you are having trouble completing Pre-Requisites, there are several guides featuring them too
1. First Download Android SDK. Roughly about 70 MB 2. There may be any compressed zip file or exe file
converted by Web2PDFConvert.com
but here. Go to the directory where you have installed android-sdk. you first need to change the directory to the one where application is placed. it is your choice which package to Download. right click on it and in the settings. then it means that everything is fine for continuing. Copy cmd. you will know that to execute any application with command prompt. Howeve. 7. we will only talk about platform Tools. fastboot. Paste cmd there. Type cmd in the search bar. Next step is SKIPPING SETTING ENVIRONMENT VARIABLE (If you however want to set environment variables.com .If zip file. You will find several files there like adb. so we will only talk about most used and important commands Connect your device via USB cable And open the CMD in platform-tools folder(Make a shortcut of it on desktop).txt 3. select Run as Administrator . I prefer taking logcat this way as it neatly compiles logs of different time Code: adb logcat -v long > logcat. we will not do so. Now. Click on Show Content) CLICK TO SHOW CONTENT Many guides on internet say that it is to be done for making it easy for users and if you have some basic knowledge of Command Prompt. You are done. simply tick on Platform Tools and click on install. Right click on the Title Bar of Command Prompt. Code: adb logcat > logcat. You can have it placed in any computer and run it as it does not require registry to work 5.txt This command will create a logcat. And to skip changing the directories every time you open CMD. So. Now what to do in it? ADB Commands Type adb in command prompt. then extract it to C:\android-sdk If exe file then double click on it and install it in C:\ Drive(or any other drive you want) 3. All the things will be copied to clipboard. aapt. Once you have done it. This is the correct way of getting logcat saved. 6. many users ask me how to copy the logcat and upload it from CMD There are several methods:1. etc 4. you need to put that application is environment variable. Now to get adb and other tools. And type the suitable commands Code: adb devices Will show the list of devices attached to the PC andtheir serial numbers. you need to download 'Platform Tools' To download them.exe from there. Ofcourse you can type any name instead of logcat.txt converted by Web2PDFConvert. go to the android-sdk folder and double click on SDK Manager It will ask you which package to download? However. And several commands will show up on your screen. 2. you are just one step away from using adb.txt document in platform-tools folder with the complete logcat of the device. Select all the things you want to copy and then click enter. Go to the platform-tools folder in the directory where you installed android-sdk. Hover the cursor over edit and select mark. Now. It is very difficult to analyse these all commands. If this shows up correctly on your PC. Go to platform-tools folder. Logcat Code: adb logcat It will display the real time log of your device Best time to do it is when your device boots up Now. you can backup the whole folder of android-sdk to any external storage that will make you not download package again if you want to.
This is a very nice way to get logcat.com .txt file to be pushed in Dance folder in sdcard Code: adb push G:\Dance.txt /mnt/sdcard/Dance/ converted by Web2PDFConvert. it is necessary now to tell how to mount system partition as Read Write(R/W) Code: adb remount It is easiest way to do so. I never found any problem in tweaking with system files with adb. so the problem was that their system partition was mounted as Read Only(R/O) So.apk /system/app/ More examples G:\Dance. For eg:G:\Program Files\AreeB. if my app AreeB. but some users said that they couldn't do it. if it does not work then There is another method that we will discuss in ADB Shell commands section Pushing and Pulling For pushing.apk Be sure your apk is not in a folder that has space in its name. Type Code: adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED% Suppose I have an app named SystemUI.apk is in G:\ drive (G:\AreeB.txt /sdcard/Dance/ OR Code: adb push G:\Dance.apk) Then I will type Code: adb install G:\AreeB.apk(PATH = G:\SystemUI. Installing Apps Code: adb install %PATH OF APK% This will install an app on your Android For example. Then I would type Code: adb push G:\SystemUI. else the command will break at space bar. you can execute the command without breakage if you include the path inside quotes.apk) which I want to push in /system/app/ on my android(or in other words. install an app as a system app).apk Note: If you have spaces in path of apk. (Thanks to etcman) Eg:- Code: adb install "G:\Program Files\AreeB.apk" Mounting However.
Note:.2# Now you are in shell mode adb commands won't work here and a new set of commands will work here.prop to be extracted to desktop Code: adb pull /system/build. I am going to tell you a way of taking logcat on mobile Type Code: logcat You will see log of your device To save this Type Code: logcat > /sdcard/log.G:\Movies folder to be transferred in SDCARD in Videos Folder Code: adb push G:\Movies /sdcard/Videos/ G:\system\framework\framework-res.prop C:\Users\Areeb\Desktop\ However. But we will only go in a little detail here.apk to be pushed in /system/framework/ Code: adb push G:\system\framework\framework-res. push command replaces with pull and paths are swapped Code: adb pull %PATH TO BE PULLED FROM% %PATH TO PLACE PULLED FILE% Example.apk in this folder then.txt converted by Web2PDFConvert. type Code: adb push DeskClock. There is an app name DeskClock. these command will directly work on your mobile's Terminal Emulator As these commands can also work on mobile. But.These commands won't work if you type them alone on cmd.apk /system/app/ ADB Shell Commands This mode of adb allows you to execute linux shell commands from your PC These commands can aldo be executed through the mobile using Terminal Emulator To initiate shell mode Type Code: adb shell You will get an prompt like this sh-3. I will only type commands that will work on shell. you don't need to type full path Suppose if I type Code: adb pull /system/ system Then a folder named system will be created inside platform-tools with all the files in system in it If a file is in platform-tools folder.com . to push it to /system/app.apk /system/framework/ For pulling. then also no need to type full path For example. All system apps are to be pulled to G:\ROM\system\app Code: adb pull /system/app G:\ROM\system\app\ build. Assuming you are in adb shell mode. if a folder is in platform-tools folder.
there is an app named com.com .opera. thats it.remount /dev/block/mtdblock3 /system Miscellanous commands:su: Initiates root request du: Shows file foldrs and size date: Shows todays date ls: Shows list of directory cd: Changes working directory rm: Removes the file logcat: Displays logcat mount: Mounts the partition busybox: Busybox Applets Forgot next ones.opera. will write later Credits Google: For Android and several searchings Samsung: For Galaxy Ace s5830I paxChristos for amazing logcat guide Broadcom: For their Open Sourceness XDA Forums : For the precious knowledge My Uncle: For gifting me this Phone My Teachers: For teaching me English(I would not be here without them) You: For future Thanks Till now.browser This will uninstall the app Mounting Command:Code: mount -o rw.txt will be generated in sdcard Uninstalling Applications Code: cd /data/app This will change the directory to /data/app Code: ls This will show the list of files in there Suppose. will add some more things later If any problem.browser (Opera Mobile) you want to uninstall it Type Code: rm -r com. I will add it too Suggestion? They are welcome Before posting a question.A file named log. READ THIS. to increase the chances of your question being answered Current Project: CLICK TO SHOW CONTENT REPLY The Following 138 Users Say Thank You to iamareebjamal For This Useful Post: [ Click to Expand ] advertisement Ads by Google System Check Removal converted by Web2PDFConvert.
com iamareebjamal 10th February 2013.Whiners.Whiners.012 Join Date: Aug 2012 Location: XDA Likes:XDA.Android Hates:Haters.OP Thanks Meter 3755 Posts: 3.OP Thanks Meter 3755 Posts: 3.wiki-security.Android Hates:Haters.Technology. 12:13 PM #2 Reserved Before posting a question. 12:15 PM #4 Last One Recognized Contributor . 12:14 PM #3 Reserved Once More Recognized Contributor .Bugs MORE INFO > REPLY The Following 3 Users Say Thank You to iamareebjamal For This Useful Post: [ Click to Expand ] dabeez98 10th February 2013. How to remove System Check.Technology.012 Join Date: Aug 2012 Location: XDA Likes:XDA.Bugs MORE INFO CLICK TO SHOW CONTENT > REPLY The Following 4 Users Say Thank You to iamareebjamal For This Useful Post: [ Click to Expand ] iamareebjamal 10th February 2013.Android Hates:Haters.com .Whiners. READ THIS.xda-developers System Check Removal Remove System Check Instr.Technology. www.OP Thanks Meter 3755 Posts: 3. to increase the chances of your question being answered Current Project: Recognized Contributor .012 Join Date: Aug 2012 Location: XDA Likes:XDA. 05:50 PM #5 Reserve the guide Senior Member Thanks Meter 65 Posts: 365 Join Date: Jul 2012 Location: Malmö MORE INFO > Leaving plethora when I get an iPhone 4.Bugs MORE INFO > REPLY The Following User Says Thank You to iamareebjamal For This Useful Post: [ Click to Expand ] iamareebjamal 10th February 2013. converted by Web2PDFConvert.
06:17 AM #8 Perfect Guide to use ADB Commands. 06:47 AM #9 You can use apks to do logcats from the phone too. logcat. I use catlog. Member Thanks Meter 6 Posts: 42 Join Date: Oct 2012 Location: Dubai MORE INFO > REPLY The Following User Says Thank You to jisharka For This Useful Post: [ Click to Expand ] sgdva 11th February 2013. I tested this all and works fine.1 Member Thanks Meter 12 Posts: 85 Join Date: Apr 2012 MORE INFO > REPLY The Following 2 Users Say Thank You to sgdva For This Useful Post: [ Click to Expand ] Chris s5830i 11th February 2013. 02:43 AM #7 Re: [GUIDE][ADB]Easiest How to use adb. Member Thanks Meter 33 Posts: 50 Join Date: Jan 2013 Location: between my chair and PC MORE INFO > REPLY advertisement xda-developers Ads by Google Root Android in 5 min Root Your Android Device & Install Apps On SD Card www. Sorry. Devices/ROM: Momo9/CM10 SGAi/Simplicity V4 PipoS1/Stock JB 4. It is very clear and perfect guide to use ADB commands.com . 06:51 PM #6 install full rom how to install a full rom from adb? REPLY kubukoz Member Thanks Meter 7 Posts: 56 Join Date: Jun 2012 Location: Zduńska Wola MORE INFO DONATE TO ME 11th February 2013.root-android-pro.. etc for noobs and newbies Pretty sure it's impossible.com converted by Web2PDFConvert.sea Senior Member Thanks Meter 37 Posts: 215 Join Date: Jan 2013 Location: rome 10th February 2013. 11:24 AM #10 About Broadcom being open sourced made me laugh hahaha.REPLY The Following User Says Thank You to dabeez98 For This Useful Post: [ Click to Expand ] angel.1. Sent from my E15i using XDA Premium App > REPLY jisharka 11th February 2013...