Jump to content


Photo

[HOW TO] Install ADB and Logcat For G300

* * * * * 1 votes

  • Please log in to reply
6 replies to this topic

#1
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300
TUTORIAL FOR G300 : Just doing my contribution.


Hello this is just to teach newbie users on how to install adb and get it working, I will also teach you how to logcat to help devs with particular issues, okay lets get into it, I will try to be as formal and understandable is I can, I'm still a 15 year old so bare with my written language, not that its bad but we Kiwi's use weird slangs...

1. Okay first of all we need to enable Android debugging.

1a. To do so head into settings>development and check android debugging, If you're on CM10 you will need to set Developer Options to "ON" then select Android Debugging.

2. Get a usb adapter and connect it to your pc and connect your device. Let it install drivers "If it's the first time.

​3. Download this "SDK Tools". and install it to your desktop for now, you can move it later when you want.

4. Now create a new folder on the desktop and copy all SDK contents into it so its neat and tidy.

5. Open "SDK Manager" and un-check everything except "Android SDK Platform-Tools" and click install packages, wait till it's done then close the window now you should be in the folder that contains the SDK Tools etc... if you see the "platform-tools" folder you're good to go.

6. Now open the "platform-tools" folder and copy the destination output at the top.

7. Now we need to set the new destination to CMD, click the start button type "cmd".

8. When it opens type "cd" obviously without the ", now hit space and click paste now your command should look something like this
cd C:\Users\Your PC name\Desktop\the folder that contains the sdk tools name\platform-tools here's mine : cd C:\Users\Lenovo\Desktop\ADB\platform-tools. Now hit enter, your target folder will change.

9. Once its done type " adb devices" make sure your phone is connected! now hit enter and it'll show your device, now you know ADB Is up and running! If doesn't show your device continue to the next step, if it does continue from step "11".

10. Download "this" and install it, plug your phone again and wait for it to install all components if MTP fails to install just ignore it. now repeat the procedure from "7" again.

11. Now lets Logcat, Now there are 2 different approaches to the logcat i will be showing you how to do both in this tutorial. Neither one is more correct than the other it is 100% personal preference. Feel free to try both and see where you get.


LOGCAT PROCEDURE

Doing logcat form inside the CMD window.

1. Make sure your phone is plugged in and debugging is on, now repeat procedure "7" to set target folder if it isn't already done.

2. Type "adb logcat" without the " and hit enter. It will then show a list of random writing whether you understand or not, we do that is all that matters.

3. To save the logcat for devs to use, once the logcat is running, please RECREATE the bug/issue you are having. so that it logs the error into it, now to stop the logcat hit "ctrl" + "C".

4. Once this is done please RIGHT CLICK choose "Select All" then press "Enter" on your keyboard this will copy the entire log to the clipboard. you can the npaste it into a txt file to upload and show to devs.


Doing logcat to text file.

1. Now repeat procedure "7" to set target folder if it isn't already done, make sure your phone is plugged in and usb debugging mode is enabled. Once this is done we are going to type the following command "adb logcat > logcat.txt" without the ", this should initiate the logcat it will appear as though nothing is happening, this is correct!!

2. Once the logcat is running, please RECREATE the bug/issue you are having. to stop the logcat on your keyboard press "ctrl" + "C".

3. Now your done the logcat, note the logcat.txt file will be located in the platform-tools folder, just open it and you will see logcat.txt upload it for the dev and he/she will investigate.

More ADB Commands for various logcats Thanks to "Tcpaulh"
External adb folder, just needed :) thanks man : Download
1. radio logcat for Wifi issues

adb logcat -b radio > radiolog.txt


2. kernel logs

adb shell

su

cat /proc/kmsg > /sdcard/kmsg.txt

exit

adb pull /sdcard/kmsg.txt


3. kernel message buffer (on request)

adb shell

dmesg > /sdcard/dmesg.txt

exit

adb pull /sdcard/dmesg.txt


​IF THIS TUTORIAL HELPED DON'T FORGET TO REP ME :)
IF YOU HAVE ANY ISSUES ASK ON THE THREAD THANKS.

Edited by krishang3, 27 December 2012 - 04:36 AM.

  • 6
Thanks, If I helped in anyway don't forget to rep me :)

#2
PACOSH

PACOSH

    Regular

  • Members
  • PipPip
  • 94 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
hopefully people start to use logcats to help developers a bit.. thx for posting this

  • 0

#3
ScutulatusCrotalus

ScutulatusCrotalus

    Regular

  • Members
  • PipPip
  • 149 posts
  • Gender:Male
  • Devices:Huawei Ascend G300
How about appending path to SDK platform tools to a PATH variable? It makes my life with android development easier, I do not need to know the path to SDK tools.

  • 0

#4
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300
I will write up more tutorials. Thanks.

  • 0
Thanks, If I helped in anyway don't forget to rep me :)

#5
Rico_89

Rico_89

    Addict

  • Members
  • PipPipPipPipPip
  • 767 posts
  • Gender:Male
  • Location:London, UK
  • Devices:Huawei Ascend G300, Vowney V5.
  • Twitter:@Rico_89_
Nice job :) .

  • 0

#6
tcpaulh

tcpaulh

    Addict

  • Members
  • PipPipPipPipPip
  • 947 posts
  • Gender:Male
  • Devices:Moto G, Huawei G300, ZTE Blade
  • Twitter:@tcpaulh
..alternative less comprehensive/simpler instructions without needing sdk tools @ http://goo.gl/3lhwy :) Feel free to nick the adb.zip if you like.

Edit: Also covers kernel logs

Edited by tcpaulh, 26 December 2012 - 07:20 PM.

  • 0

How To Provide Error Logs

 

There's a problem on KitKat with text wrap / reflow not working. Issue raised here. Please Star and Reply if you think it's a stupid regression


#7
krishang3

krishang3

    Addict

  • Members
  • PipPipPipPipPip
  • 581 posts
  • Gender:Male
  • Location:Auckland
  • Interests:lots
  • Devices:Huawei Ascend G300
Thanks bro

I sure will I might nick some commands off it but if you wrote that up I'll give you credit thanks..

Edited by krishang3, 26 December 2012 - 08:37 PM.

  • 0
Thanks, If I helped in anyway don't forget to rep me :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users