[Guide]Noobs Guide to creating a logcat[All methods explained as of 20.1.2013] - Samsung Galaxy Fit GT 5670

Q. What is a logcat?
Ans. A logcat is a sort of written report for what things(operations like starting processes lot of dev related technical things) the phone is doing at a given time.
this guide shall provide simple step by step method (Will try to be very short and direct)
Why create this guide cause i found a lot of guides on this topic(Really a lot !!!)
But were written in a fairly roundabout manner so here is my attempt to simplify things.
Prerequisites : (Please read before doing anything)
For creating a logcat via computer :
1.ADB(Android Debugging Bridge) you can get a smaller version from here : ADB & logcat tools.zip else you can get it along with android SDK.
For creating a logcat via phone :
1.alogcat/catlog[APP]
OR
2.Terminal Emulator.[APP]
Ok down to business...
Via Computer (ADB) :
very useful cause you can start logcatting(Is there such term) even before booting.
open terminal at the location for ADB example for me its C:/ADB>
so now your teminal should look like this :
Code:
C:/ADB>
now connect your phone via USB and don't forget to tick Android Debugging option under app>development(2.3.x) or Developer Option>usb debugging(4.0.x & above) on your phone
now type this in the terminal
Code:
adb logcat -v long > name of problem.txt
nothing will happen on the terminal don't worry its working to end the logcat press ctrl+c.
you shall have a log file called name of problem.txt or whatever you thought of substituting that name of problem with inside your ADB folder.
Via Phone :
1.Via Terminal Emulator :
its same as for adb except you are already in the shell that is rather than doing adb to reach your phone and then command just enter the command simple
type this in your terminal emulator :
Code:
logcat -v long > name of problem.txt
to finish logging press vol down button + c
you will find a text file on your SD Card.
2.Via logcatting(still don't think its a word) APP
here are the links.
1.CatLog
2.aLogCat(free)
Sources :
http://developer.android.com/tools/help/adb.html
http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
and tutorial by paxChristos just a blatant ripoff by me just Noobyfied(is there such a word ???) by me.

If you have any doubts or problem Private message me ...(I do not reply to hate mail,controversies,or doubts that i feel have been adressed to the best of my knowledge here)
Good Luck and hope this helps you to get other developers address your problems convincingly:good::highfive:

good tutoiral you could add some basic adb commands to the op..

Via Phone don't works for me. Do I need to install something before this?

Can we make a logcat through our phone? ?

brady_4u said:
Can we make a logcat through our phone? ?
Click to expand...
Click to collapse
yes, you can do it from phone using terminal emulator!!!

sudarshan_mehta said:
yes, you can do it from phone using terminal emulator!!!
Click to expand...
Click to collapse
What command?
And then can we copy all the data from there? ?

Brady_4love said:
What command?
And then can we copy all the data from there? ?
Click to expand...
Click to collapse
search from google!!! i am too lazy to type all that commands!!!!
which data are you taking about?
Sent from my GT-S5670 using xda premium

taking logcat via phone (apps and terminal) is explained in the first post please look.
if confused pm me.

thankx
Dark Passenger said:
Q. What is a logcat?
Ans. A logcat is a sort of written report for what things(operations like starting processes lot of dev related technical things) the phone is doing at a given time.
this guide shall provide simple step by step method (Will try to be very short and direct)
Why create this guide cause i found a lot of guides on this topic(Really a lot !!!)
But were written in a fairly roundabout manner so here is my attempt to simplify things.
Prerequisites : (Please read before doing anything)
For creating a logcat via computer :
1.ADB(Android Debugging Bridge) you can get a smaller version from here : ADB & logcat tools.zip else you can get it along with android SDK.
For creating a logcat via phone :
1.alogcat/catlog[APP]
OR
2.Terminal Emulator.[APP]
Ok down to business...
Via Computer (ADB) :
very useful cause you can start logcatting(Is there such term) even before booting.
open terminal at the location for ADB example for me its C:/ADB>
so now your teminal should look like this :
Code:
C:/ADB>
now connect your phone via USB and don't forget to tick Android Debugging option under app>development(2.3.x) or Developer Option>usb debugging(4.0.x & above) on your phone
now type this in the terminal
Code:
adb logcat -v long > name of problem.txt
nothing will happen on the terminal don't worry its working to end the logcat press ctrl+c.
you shall have a log file called name of problem.txt or whatever you thought of substituting that name of problem with inside your ADB folder.
Via Phone :
1.Via Terminal Emulator :
its same as for adb except you are already in the shell that is rather than doing adb to reach your phone and then command just enter the command simple
type this in your terminal emulator :
Code:
logcat -v long > name of problem.txt
to finish logging press vol down button + c
you will find a text file on your SD Card.
2.Via logcatting(still don't think its a word) APP
here are the links.
1.CatLog
2.aLogCat(free)
Sources :
http://developer.android.com/tools/help/adb.html
http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
and tutorial by paxChristos just a blatant ripoff by me just Noobyfied(is there such a word ???) by me.
Click to expand...
Click to collapse
Thankx a lot man . Am a newbie and it helped me a lot!!!!! Thanks !!!:highfive::victory::good:

ADB Push
flasherruts said:
Thankx a lot man . Am a newbie and it helped me a lot!!!!! Thanks !!!:highfive::victory::good:
Click to expand...
Click to collapse
Are there any tricks to using ADB push and install? I hae been trying and cannot get it to work.

thanks a lot

Flashing NC2 Kernel
Installed NC4 firmware via Odin 3.09 version and used the safestrap by Hashcode, 3.75, posted on XDA. Installed "Towel Root" as well, but the problem is everytime I attempt to flash NC2 kernel it fails Looking for advice.

Bluedio777 said:
Installed NC4 firmware via Odin 3.09 version and used the safestrap by Hashcode, 3.75, posted on XDA. Installed "Towel Root" as well, but the problem is everytime I attempt to flash NC2 kernel it fails Looking for advice.
Click to expand...
Click to collapse
Sorry mate, you're on the wrong forum. Do you even check the title of OP before posting anything?

That's good work

please help
Dark Passenger said:
Q. What is a logcat?
Ans. A logcat is a sort of written report for what things(operations like starting processes lot of dev related technical things) the phone is doing at a given time.
this guide shall provide simple step by step method (Will try to be very short and direct)
Why create this guide cause i found a lot of guides on this topic(Really a lot !!!)
But were written in a fairly roundabout manner so here is my attempt to simplify things.
Prerequisites : (Please read before doing anything)
For creating a logcat via computer :
1.ADB(Android Debugging Bridge) you can get a smaller version from here : ADB & logcat tools.zip else you can get it along with android SDK.
For creating a logcat via phone :
1.alogcat/catlog[APP]
OR
2.Terminal Emulator.[APP]
Ok down to business...
Via Computer (ADB) :
very useful cause you can start logcatting(Is there such term) even before booting.
open terminal at the location for ADB example for me its C:/ADB>
so now your teminal should look like this :
Code:
C:/ADB>
now connect your phone via USB and don't forget to tick Android Debugging option under app>development(2.3.x) or Developer Option>usb debugging(4.0.x & above) on your phone
now type this in the terminal
Code:
adb logcat -v long > name of problem.txt
nothing will happen on the terminal don't worry its working to end the logcat press ctrl+c.
you shall have a log file called name of problem.txt or whatever you thought of substituting that name of problem with inside your ADB folder.
Via Phone :
1.Via Terminal Emulator :
its same as for adb except you are already in the shell that is rather than doing adb to reach your phone and then command just enter the command simple
type this in your terminal emulator :
Code:
logcat -v long > name of problem.txt
to finish logging press vol down button + c
you will find a text file on your SD Card.
2.Via logcatting(still don't think its a word) APP
here are the links.
1.CatLog
2.aLogCat(free)
Sources :
http://developer.android.com/tools/help/adb.html
http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
and tutorial by paxChristos just a blatant ripoff by me just Noobyfied(is there such a word ???) by me.
Click to expand...
Click to collapse
I followed the steps you gave, but when I try to open powshell in the ADB folder using "shift+right click" the option to open powershell is not there until 100 attempts later... you please tell me what Im doing wrong?

Related

[HOWTO] Guide to running ADB under Fedora 11 (and equivalent distros)

Ok, I have fedora 11 installed on most of my computers, since i love this distro to death. My big thing was trying to get adb to work. This is my guide to get it to work, for now.
First things first. Navigate to /etc/udev/rules.d as root. Create a rules file called 50-android.rules (touch 50-android.rules). NOTE: You are better off looking at the contents and picking a rules number set other than what is listed. Sometimes udev is picky. For the newbies, so if any rules start with '50', then change the number by one or two, like 51 or 52. Paste this into the file:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",SYMLINK+="android_adb",MODE="0666"
Make sure you use ATTRS, not ATTR or SYSFS, since this is a newer updated udev system.
After that, run udevadm control --reload-rules to reload your rules files. Now just run ./adb devices as root to make sure it recognized your HTC dream. I am working on this fix right now so you don't need to be root, keep patient. Now you can adb shell into your device either as root OR normal user, just as long as you start the server as root. This is a permissions problem, and hopefully I can fix this and/or find a fix soon.
I wrote this because i searched high and low through google, and only found a few good parts as far as a fix. Hopefully this helps a few people out there.
Just wondering if this has helped anyone. If not, delete this thread or do whatever with it....
I have adb on my eeepc 900 with f11 I believe this method works too as well. although it says it has been tested with ubuntu, it works pretty well with f11.
http://www.talkandroid.com/android-sdk-install-guide/
Installing The Android SDK
First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.
Please note: This installation location will be referred to as $SDK_ROOT from now on through this tutorial
Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.
To add /tools:
Linux
1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable.
2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable.
3. If no PATH line exists you can add the line by typing the following:
4. export PATH=${PATH}:<path to your $SDK_ROOT/tools>
Click to expand...
Click to collapse
It helped me, since the creation of the file my OpenSuSE 11.0 recognizes the phone perfectly
Thanks a lot for your hint.
thanks it helped me. ill be looking forward to getting it to work without root
just use sudo instead
Just a heads up for user's using Ubuntu 9.10, this isn't needed. I connected my G1 to it and ran ADB with no adjustments to udev or anything else.
Pretty much it works out of the box.
Here is my version
download the .tgz file from googlecode
http://developer.android.com/sdk/index.html
sudo tar -xzvf android-sdk_r3-linux.tgz
Click to expand...
Click to collapse
Code:
sudo gedit ~/.bash_profile
heres my bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH=$PATH:/android-sdk-linux/tools
Click to expand...
Click to collapse
logout
login
connect android g1 device via usb to pc
open a terminal
Code:
adb devices
if you cant get a device try it with superuser.
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Another option is to edit the /etc/profile and add
PATH=$PATH:/<Path to android-sdk>/tools
This option will allow any user to use the adb tools when logged in or if you
su -
into another user
I wrote a short guide as well for Windows and Ubuntu. Might help others.
Unfortunately, as anyone with a passing acquaintence with ADB knows, the scrolling issue can be a killer. I swear the other day I pressed "up" twice and it composed "rm /sdcard/rootfs.img /sdcard/system.ext2" and executed it. We run Android on our SD's btw.. Was not cool. Instead, I use ADB via telnet and it works beautifully. Here's how:
Code:
adb shell telnetd &
adb forward tcp:9999 tcp:23
Now type this: "telnet localhost 9999"
Enter "root" and hit enter
Finally update PATH: "export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin"
Okay, so 4 lines to enter and you have a "regular, sane" shell connection to the phone and you can actually scroll through history and text without it jumbling the text and executing random code. Enjoy.
lbcoder said:
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Click to expand...
Click to collapse
that works too as well but i would rather open up a terminal and type
sudo adb devices
sensimila said:
that works too as well but i would rather open up a terminal and type
sudo adb devices
Click to expand...
Click to collapse
WHY would you want to make it *MORE COMPLICATED*??
There is NO NEED for root.
/path/to/adb ...
THATS ALL.
This is kind of funny... i wrote this because i had trouble with it, so i am just sharing my fix...
In case this is interesting to someone:
The fix mentioned in the first post has to be applied to open SuSE x86 and x64 edition to make the G1 work. The external device works without it, but not the adb device.
Thanks again!
Just wanted to come and post that this does work with OpenSUSE 11.2 x86. Did this hoping to get adb to work with my LG Ally and it does. Thanks!
(Still) works for me on 64bit SUSE 11.4.
Before adding this file, I could not access my device with adb, received permissions errors.
Added this file, and I can shell into my device.
Permissions on adb itself was not the problem, it was access to the device when udev found it.
[edit]Actually used the lines from http://developer.android.com/guide/developing/device.html[/edit]

Android Rooting (Simplified)

Hello everyone!
I know some of you are still roaming around here and there trying to root your phone; others wanting to root the phone without knowing what rooting is...
Wandering if it's illegal or not; and why should they be Rooting their Devices.
Well that's why i've done this tutorial with a lot of help from different sources.
It has been almost 2 days reading; reading; reading; and writing this tutorial to simplify and compact information scattered around this forum and the web.
Knowing the Basics
In order to explain everyone (specially noobs / starters); please follow this link.
(I advise you to open it in a "new Tab" or "Window"; so you don't loose yourself)
One thing before starting:
I found out that it is important to reboot the device and the PC after installing and Updating the following apps: "Super one Click" and SDK with your firmware version API's.
Some errors that occur during the Rooting with the "Super One Click" happen due to some kind of need to reboot of the machine and device.
As mentioned in Step #9
[...]
Now that you understand what rooting is; let's ROOT your Android.
P.S - As you already know; you are responsible for doing this process; or for anything that goes wrong.
“Rooting Your Android Phone”
Requirements:
Download: "android-sdk_r15" or Later Version.
After Downloading and Installing SDK; download the API's according to your Firmware Version.
(Check Step #1 and #12 of the Easy Rooting Method)
Download: "Super One Click Program"
(Link Goes to XDA Developers "Super one Click Program" Thread)
Download: "Java SE Development Kit 7" (or later)
I. (Easy Method - Using “One Click Rooting Program”)
Note: This method works for almost every Android phone.
1) Take a note of you brand model and android Firmware/ROM installed on you device.
(You need to know the version of your O.S to download your SDK API's later)
i.e:
“Model: Acer C4 Liquid Mini (E310)”
“O.S: Android Froyo v2.2”
2) Download/Install your Android Drivers. (PC)
3) Download/Install your Android SDK/ADB. (PC)
4) Open SDK (as Administrator) and mark the following things to download:
- “Tools” (Select the entire Folder)
- “Your Firmware/ROM Version Installed” (i.e: “Android 2.2 API”) (Select the entire Folder)
5) Now press “Install Packages” (The download will start; follow the next step after it’s completed)
6) Download / Install the Latest version of the rooting program (Super One Click Rooting Program); unzip it and install it on your computer.
7) Make sure that your phone has the "USB Debugging Mode" ON.
NOTE: To turn it on go to your device and press: “Menu” > “Settings” (Icon) > “Applications” > “Debug / Development” > “USB Debug”
8) Make sure you turn Off your Device and Remove the SD Card. It must be done without the SD Card.
9) Safely disconnect your Phone from the PC; and restart. (PC and Device)
10) When your Phone and Windows are ready; connect your phone to the PC.
Note: Just plug the cable. Do NOT select any option in the Phone.
Also you will notice that a small Android Icon will appear at the top left of the screen.
That means that you phone is prepared for debugging Mode.
11) Once again make sure that your phone has the "USB Debugging Mode" ON.
12) Run SDK/ADB as Administrator.
(Windows XP Users just double click to open)
13) Right Click the “Super One Click Rooting Program” and open it as Administrator.
(Or just double click; if you are using Windows XP)
14) Press "Update Check"; just to make sure you have the latest files. (Don't worry with the app version error; if it happens means you just downloaded it/you have the latest version)
14) Click the "Root" button and wait it to finish. (There should be no errors)
15) Once done; you should see “Superuser” permission in your phone’s apps.
Note: If so; your Device is Rooted. Congratulations!
II. (Advanced Method - Manually Rooting)
Pre-requisites
There are a few things that you need to have before you start rooting.
Obviously, you will need an Android device with Android 1.5 or higher and a USB cable to connect it to your computer.
You will also need to have some files for this:
SuperOneClick.zip and the Android SDK/ADB up and running on your computer.
(Run as Administrator if not using Windows XP)
If you are unfamiliar with ADB, GoodAndEvo site has an awesome ADB tutorial that should get you up to speed.
(Note that the tutorial in the Good and Evo Page is for HTC Devices)
First, we need to move some files around to make running commands a bit easier.
Unzip the SuperOneClick.zip and copy the following files: su-v3, busybox, Superuser.apk, psneuter, and GingerBreak; to the Android “ADB Platform-Tools folder”; which is contained in the Android SDK folder on your computer.
i.e: C:\Program Files\Android\Android-SDK\Platform-Tools\
These files can be found in the following SuperOneClickv2.1.1-ShortFuse folders:
- “Busybox” -> “Dependencies” folder
- “psneuter” -> “Exploit” folder
- “GingerBreak” -> “Exploits” folder
- “SuperUser.apk” -> “Root” folder
- “SU-V3” -> “Root” folder
Once copied rename “su-v3” to “su”.
If you are on Windows, you will also need to have proper drivers for your phone installed.
These can usually be found by going either to the manufacturer website or searching for the name of your phone and the word "Drivers."
Once you find drivers, download and install them like any other application.
Rooting your device
Now that you have ADB setup and the proper exploit files, you are finally ready to Root.
Before you start running commands, you need to put your phone in "USB Debugging" mode.
(Menu > Settings > Applications > Development > Enable USB Debugging) and connect the device to your computer.
Note: Just plug the cable and do not select any option in you device.
Now, open command prompt to run some commands.
Windows Vista/7 Users:
(Press "Windows Key" > Type: "CMD" > Right Click on "CMD" and Run it as Administrator)
In Linux, open whichever terminal emulator suits you. Once you have a command prompt, you need to enter your platform-tools folder, also called a directory.
You can use the "CD" or Change Directory command to accomplish this.
If your SDK folder is called "android-sdk" the command should look like this: cd android-sdk_r11-windows/platform-tools.
This command will leave you with a shell prompt in the platform-tools directory.
From here, you can run the commands that will actually root your phone.
Be sure to run these commands exactly as they are written.
The commands with an "$" or "#" will only run after the "adb shell" command.
First, here are the commands that run the” psneuter” exploit and gain a root shell.
Type them in the following order.
…Yes after the ADB and the “$” there is a “Space”.
• adb devices
• adb push psneuter /data/local/tmp
• adb shell
• $ cd /data/local/tmp
• $ chmod 777 psneuter
• $ ./psneuter
At this point, the exploit will run and close the shell.
You will need to run these commands to restart the ADB server.
• adb kill-server
• adb devices
Now comes the moment of truth.
Type:
• adb shell
...command to open a shell.
If you see a "#" sign, you have root access, so go ahead and continue to the next part of this tutorial.
If not, you can go back and try the previous steps again, or ask for help in the comments.
We now need to make this root permanent.
From the root shell you just opened, type the following commands.
• # mount -o remount,rw -t rfs /dev/block/st19 /system
• # exit
• adb push busybox /system/bin
• adb push su /system/bin
• adb install Superuser.apk
• adb shell
• # chmod 4755 /system/bin/busybox
• # chmod 4755 /system/bin/su
• # mount -o remount,ro -t rfs /dev/block/st19 /system
• # exit
• adb reboot
At this point, your device should reboot.
You can check for the Superuser icon in the app drawer, and then try a root only app like Titanium Backup.
If that app works, congratulations!
You have successfully rooted your Android device.
Prepare to enjoy all the benefits of root.
If you are having trouble with this tutorial or want to offer others a tip, please leave a comment.
Me or every XDA developer/user shall gladly help you out clarifying any error message or issue. (at least if i know how i will help)
Just make sure you did exactly as described; and only then post your question / expose your issue(s).
P.S
- Use “Code” Tags to report Logs.
- Remember to "Thank" if this tutorial helped you or if you find it usefull.
Special thanks to:
XDA Developers (Users & Staff)
Pocketables.net (Aaron Orquia)
CLShortFuse (For bringing such Great App)
I can´t do this with method #1 (freeze on step #6)
In method #2 ....
$ cd /data/local/tmp
cd /data/local/tmp
$ chmod 777 psneuter
chmod 777 psneuter
$ ./psneuter
./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
$
Some help?
Regards
niki40 said:
I can´t do this with method #1 (freeze on step #6)
In method #2 ....
$ cd /data/local/tmp
cd /data/local/tmp
$ chmod 777 psneuter
chmod 777 psneuter
$ ./psneuter
./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
$
Some help?
Regards
Click to expand...
Click to collapse
Greetings;
What's your device Make and Model?
Try/Check the following:
- Download the "Super One Click Program" Again. Since there is a new Fix for it.
Follow this Link to download and get more detailled info:
http://forum.xda-developers.com/showthread.php?t=803682
- Check that you have the USB Debug Turned ON (in your device)
---> List > Settings > Applicatons > Development > USB Debugging
- Check what version do you have in your device; and verify that SDK Manager has downloaded your Version API's; and Tools folder. (Look at status tab; it should say installed)
- Did you Restart the machine after the install of Super One Click and SDK Manager? (Only then Root the Device)
- In a Last case there's a small percentage that your phone isn't compatible with "Super One Click".
Thanx a lot bro
You Can Add This To The OP If You Want .
Press Thank If I Help .
For Sony Ericsson Xperia Only .
I Use A Sony Ericsson Xperia X10 And It Work Well .
The File Name Is Call Flash Tool .
The Fuction It Has Is ( Latest 4.2 )
Root
Flash Kernel
Flash Rom
One Click Unlocked Bootloader .
Click to expand...
Click to collapse
Thing You Need To Do Is :
Download The Two File .
Install In The Same Place .
Open The File .
Open Driver Folder .
Install The Driver .
And Open Flash Tool exe .
See If The Computer Detect Your Phone .
USB Debugging Must On .
Click to expand...
Click to collapse
Thing Your Need ( For Rooting Only ) :
https://github.com/Androxyde/Flashtool/downloads
==================================================
Unlocked Bootloader Try At Your Own Risk . Sony Ericsson Xperia X10 Success ) :
Only For Sony Ericsson Xperia Phone .
Download Generic version 2.3.3 build 3.0.1.G.0.75 ( http://www.multiupload.com/564T6TLUD8 )
Download DoomLoard Boot Manager . ( http://doomlord.sylvester20007.com/...tmanager/X10_2.3.3_Stock-BootManager-v1.3.ftf )
Put This Two File In Flash Tool Frimware Folder .
Open Flash Tool .
Press Flash .
Select All The File Inside .
Reboot Your Phone .
Root Your Phone .
And Install DoomLoard Boot Manager .
You Can Now Install Unlocked Bootloader Rom .
Click to expand...
Click to collapse
If Anyone Know Anything And Notice I Say Wrong Here Please Private Message Me Or Comment Here To Tell Me
Special Thank To :
Every One That Teach Me Last Time .
Androxyde For Flash Tool . http://forum.xda-developers.com/showthread.php?t=920746
DooMLoRD For DoomLoard Kernel And Boot Manager . http://forum.xda-developers.com/showthread.php?t=1278318
Every Body Who Click Thank .
Every Body Who Read .
Click to expand...
Click to collapse
==================================================
Do It At Your Own Risk . Press Thank If I Help
And Yes It Work For New Xperia ( 2011 Lines )
nice share...but i already rooted my xperia

Tutorial: How to properly post a bug

Alright guys, I was on an irc channel when I considered posting this since it's rather important. There has been a lot of disappointing posts all over the forum with people complaining about bugs, while not providing any kind of information for the developers aside from "X doesn't work" or "I get random reboots".
Well, without the proper knowledge, how are we going to fix it? We don't know what kernel you may be running, what version number you're on, or any information that the system spits out to let you know there's an error. So, I decided to start this thread, to hopefully teach newbies how to give us (developers) proper knowledge when complaining about issues.
This thread will have 3 sections, Logcat (App / system debug log.), Dmesg (active kernel output) and last_ksmg (Typically if you get a random reboot or something of that sort {this is the same as dmesg except it gets the info from the last shutdown [like a kernel panic]})
Section 1: Logcat
This log should almost always be included just because it provides more info than just saying something doesn't work. It will essentially tell you which apps are crashing and why and it also gives output of what they're doing. (Your system is running through apps, the dialer, wireless radio's, etc are all ran through apps.) so, if something is general, like a system force close, please just include a logcat.
How to get a logcat:
Well, this is REALLY simple, all you need to do is just get adb up and running (google how to do that, I don't feel like writing a 'how to use adb' tutorial for everyone's phone.) and then type
Code:
adb logcat
then you just right click, select, and paste to the thread. It's really that simple!
Section 2: Dmesg
This is getting into issues such as wifi not working, sleep of death, etc. Basically, things that make us go "OH F***" when we use our devices. Note: You will need adb access for this to work, same as logcat.
What this will do is get us live kernel output so we can know things like "What driver is the kernel loading {or not loading for that matter}" and similar things. This is linux, so kernel output is important if a hardware aspect isn't working right.
How to get a dmesg:
This is simple as well, no matter what operating system you're on (mac, windows, linux) just type
Code:
adb shell dmesg > dmesg.txt
and then it will have written the output to a .txt file in your current directory. Either paste the contents to the thread, or attach it to your post.
You can also get the dmesg by using terminal emulator. Instead though, you dont type adb shell, you need to also include it to somewhere you will be able to save it. Like /sdcard so, the command goes
Code:
dmesg > /sdcard/dmesg.txt
Just get it off your sdcard and get the contents to the developer!
Section 3: last_kmsg
Ok, the last thing is last_kmsg. When android kernels crash, they right to last_kmsg so then you can find out what's going on. This is usually for issues such as random reboots and other various kernel panic symptoms. A kernel panic happens when the kernel tries to do something it can't. It doesn't mean wrong permissions, it could just have errored out on something and died which can cause a few things. Anyway, developers REALLY need this if debugging a kernel because it gives us a viable way to see WHAT it's trying to do instead of trying to guess what it is trying to do
How to get a last_kmsg:
This is super simple and the same on all phones no matter what, what you need is adb up and running (or terminal emulator) and either in adb shell, or terminal emulator just type
Code:
cat /proc/last_kmsg > /sdcard/last_kmsg.txt
or you can do
Code:
adb shell cat /proc/last_kmsg > kmsg.txt
and that will write it to your current working directory from cmd.
Hopefully, this way we developers can have our lives be a little bit easier and you can learn more about android.
I'm glad to have written this and devs, feel free to link to this guide as a "bug reporting FAQ"
HALP! I BRICKD MY FONE!!1!
I JAILBROKED IT LAST NIGHT AND NOW I NO GET SIGNEL!! PLASE HALP!!!1
but on a more serious note, good tut
Thanks dude!!! I was looking for some kind of guide. Only thing I still don't understand is when are we supposed to give dmesg and when do we give the logcat? I understand the last_kmsg is for kernel panics and random reboots, but the rest two are still ambiguous to me... Could you please explain the other two in a simpler way with an easy example for each?... Sorry.. I'm a noob... but am trying to learn these things..
There also is this app called 'Bootlog Uptime' that tries to auto-detect a crash and subsequently exports the log to sdcard.
When I get in to cmd in bootloader mode and type adb shell cat /proc/last_kmsg > kmsg.txt, I get a message Error: Device not found. I checked the ADB drivers, the are loading well. Am I doing something wrong?
If you're in boot loader mode, that's not adb.
Sent from my Full Android on Crespo4G using xda premium
anshumandash said:
When I get in to cmd in bootloader mode and type adb shell cat /proc/last_kmsg > kmsg.txt, I get a message Error: Device not found. I checked the ADB drivers, the are loading well. Am I doing something wrong?
Click to expand...
Click to collapse
You need to boot into the ROM, then grab the logs.
Sent from my GT-I9100 using xda app-developers app
Thank you for this
Sent from my Nexus 4 using Xparent BlueTapatalk 2
Can someone help me please.
I am from the HTC One S (Ville C2) community. I am testing a new kernel by one of the devs who doesnt have the phone. Now after installing the new kernel the phone is on bootloop. I need to extract the last_kmsg. the only way I can get out of the boot loop to do anything is by pressing the power button and simulate battery out. This it seems erases the last_kmsg cuz when I enter recovery to get it. It either says no such file or sometimes ends up showing me the recovery kernels last_kmsg. I am at a total loss as to how I the last_kmsg file.
There is also no way to install a working boot image as the kernel uses a zip to install files on the phone so we must use recovery to restore to previous state. This leads to the original condition. I tried looking for a solution but cant find it anywhere.
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
piyush_soni said:
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
Click to expand...
Click to collapse
I have the same problem.
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
Just solved the last kmsg problem. Instead of making the terminal do the job and getting "there is no such directory", just go above one level from sdcard and find proc folder. There will be a file named last_kmsg.
Hope it helps someone
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
---------- Post added at 10:13 AM ---------- Previous post was at 10:08 AM ----------
piyush_soni said:
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
Click to expand...
Click to collapse
Wait a few minutes it will be there
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
Kaiyes said:
Just solved the last kmsg problem. Instead of making the terminal do the job and getting "there is no such directory", just go above one level from sdcard and find proc folder. There will be a file named last_kmsg.
Click to expand...
Click to collapse
Kaiyes said:
Wait a few minutes it will be there
Click to expand...
Click to collapse
Nope. It's still not there for me ... I have a file called kmsg, but not last_kmsg.
Good stuff!
I'm on JB 4.3, Galaxy Note 2 and I've Flash Davil Kernel.
Two Bugs for me:
1) when the Phone, in switch off, is charging... the LED will not light. No Red Light (when in charging), nor Green one, when it has reached the 100%.
2) When Phone is connect to PC it isn't recognized by the PC in any way. To transfer files I have to use some app via Wi-Fi.
Are Two knows Bugs? Thanks in advance.
Hey glowerita I have this same problem minus the devil kernel. I don't think devil works with the FTW rom
Sent from my SPH-L900 using Tapatalk
Aquarius169 said:
Hey glowerita I have this same problem minus the devil kernel. I don't think devil works with the FTW rom
Sent from my SPH-L900 using Tapatalk
Click to expand...
Click to collapse
Hi! About PC recognize I've done so and now it's ok.
With Terminal emulator digit;
su
Press Enter.
Now digit; setprop persist.sys.usb.config mtp,adb
Enter, exit and reboot device and PC. [emoji1]
About led light... have you same problem like me?
Inviato dal mio GT-I9100 utilizzando Tapatalk
Take a look at
https://play.google.com/store/apps/details?id=com.bassel.andylog
... [email protected]
dmesg kmsg not permitted
Here's the dmesg.txt file when issuing C:\platform-tools>adb shell dmesg > dmesg.txt
"klogctl: Operation not permitted"
So I tried:
"C:\platform-tools>adb shell
←7←[r←[999;999H←[[email protected]:/ $ su
su
←7←[r←[999;999H←[[email protected]:/ # dmesg > dmesg.txt
dmesg > dmesg.txt
sh: can't create dmesg.txt: Read-only file system"
Results of issuing "C:\platform-tools>cat /proc/last_kmsg > /sdcard/last_kmsg.txt
The system cannot find the path specified.
C:\platform-tools>adb shell cat /proc/last_kmsg > kmsg.txt
/system/bin/sh: cat: /proc/last_kmsg: Operation not permitted"
Same results running terminal on phone also.
-Running PecanCM's CM11 Beta10 on LG L5 e610-
So neat and simple. Thanks for clarifying that.

[GUIDE] Installing ADB/SDK and How to make a logcat

I'm doing this simple guide on how to achieve a logcat when an issue is received
It's very simple but some people on here don't know how to do one.
1. Download Android SDK from here:
Code:
http://developer.android.com/sdk/index.html
2. Extract Android SDK to any area
3. Once Android SDK is extracted, be sure to put the path and download Android SDK Tools:
Examples:
Windows
Open your start menu, right click on 'My Computer' and select 'Properties'
Once another window opens go to 'Advanced settings'
Followed by selecting 'Environmental Variables'
Look for PATH and enter the following:
Code:
C:\Android-sdk-windows; C:\Android-sdk-windows\platform-tools; C:\Android-sdk-windows\tools;
Now java will need to be installed
Go to the following link:
Code:
http://www.java.com/en/
Go into Android SDK folder and open 'SDK Manager.exe'
Only check 'Android SDK Tools' and Android SDK Platform-tools
Linux
Go into your Home folder and Press CTRL+H (This is done to show hidden folders and files)
Look for the file '.bashrc'
Open it and put the following or similar:
Code:
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools
You will need to add something for any devices to be recognized:
Open terminal and enter:
Code:
sudo gedit /etc/udev/rules.d/51-android.rules
Enter the following in the file:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Now save and close the file, in terminal enter:
Code:
sudo chmod +x /etc/udev/rules.d/51-android.rules
Now you will need to install java
Open terminal and enter:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
Now that everything is installed
Open terminal either type:
Code:
android
OR, if that doesn't work
Code:
cd ~/android/sdk/tools
./android
4. How to do a logcat:
This is very simple as now you have installed Android SDK and ADB
First connect the device via USB to your computer
Be sure to have usb debugging enabled
To verify the device is connected type:
Code:
adb devices
Windows
Open Command Prompt
Enter the following (Yes there's a space in between the '>'):
Code:
adb logcat > logcat.txt
Linux
Open Terminal
Enter the following (Yes there's a space in between the '>'):
Code:
adb logcat > logcat.txt
*The logcat.txt is your logcat that you can copy and paste for developers
5. Now that you've created a logcat copy and paste it to:
http://pastebin.com/
Now if someone in any sensation development thread ask you how do create a logcat
Be sure to give them the link to this guide
Thanks
blahbl4hblah said:
Now if someone in any sensation development thread ask you how do create a logcat
Be sure to give them the link to this guide
Thanks
Click to expand...
Click to collapse
Should keep it in your sig too. Good work.
aNYthing24 said:
Should keep it in your sig too. Good work.
Click to expand...
Click to collapse
Good point
I'm tired of people reporting issues and there's no logcat
Now they have no excuse
Be sure to read step by step everyone
blahbl4hblah said:
Now you will need to install java
Open terminal and enter:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin
Click to expand...
Click to collapse
Why not OpenJDK? The Android stuff works fine with it
TamCore said:
Why not OpenJDK? The Android stuff works fine with it
Click to expand...
Click to collapse
When it comes to just adb I don't really care for openjdk but when it comes to compiling a rom I don't want it near my pc
Sent from my HTC Sensation
When I write
adb logcat > logcat.txt
answer is:
Access is denied. Why?
Can you post a screen shot of what you are doing?
GhostXSeries said:
Can you post a screen shot of what you are doing?
Click to expand...
Click to collapse
[Q]First do "adb logcat" then do "adb logcat > logcat.txt" ?
......
and this "Access is denied" is disappear.
now I am waiting to finish "adb logcat" then I well do "adb logcat > logcat.txt".
If doesn't Work I will post a screen shot
---------- Post added at 01:07 PM ---------- Previous post was at 12:42 PM ----------
what is this? :|
https://www.dropbox.com/s/9ubqfwhevpfetqi/Loop.bmp
GhostXSeries said:
Can you post a screen shot of what you are doing?
Click to expand...
Click to collapse
May be, but I don't see the point since it's an EASY GUIDE.
Adb logcat part tells you before to open terminal.
Is that really hard to follow?
Sent from my Sensation
azoz123456 said:
When I write
adb logcat > logcat.txt
answer is:
Access is denied. Why?
Click to expand...
Click to collapse
Probably because you didn't enable us debugging in your phone
Sent from my Sensation
azoz123456 said:
[Q]First do "adb logcat" then do "adb logcat > logcat.txt" ?
......
and this "Access is denied" is disappear.
now I am waiting to finish "adb logcat" then I well do "adb logcat > logcat.txt".
If doesn't Work I will post a screen shot
---------- Post added at 01:07 PM ---------- Previous post was at 12:42 PM ----------
what is this? :|
https://www.dropbox.com/s/9ubqfwhevpfetqi/Loop.bmp
Click to expand...
Click to collapse
You sir don't follow instructions do you?
I said do adb logcat > logcat.txt for a reason. It's to save your logcat to a text file to give developers of your issues
Sent from my Sensation
blahbl4hblah said:
May be, but I don't see the point since it's an EASY GUIDE.
Adb logcat part tells you before to open terminal.
Is that really hard to follow?
Sent from my Sensation
Click to expand...
Click to collapse
sorry
This is what I did:Here
blahbl4hblah said:
Probably because you didn't enable us debugging in your phone
Sent from my Sensation
Click to expand...
Click to collapse
I do it bro.
blahbl4hblah said:
You sir don't follow instructions do you?
I said do adb logcat > logcat.txt for a reason. It's to save your logcat to a text file to give developers of your issues
Sent from my Sensation
Click to expand...
Click to collapse
I do every thing.
My phone is Incredible s.
S-OFF & Rooted $ I have recovery
now I am use this ROM:
[ROM] ★ TSM UltimateKangBang v3.5 Rev. C ★ ICS 4.0.3 • Sense 4.0a • Updated 12/06/12
and I need the adb logcat because I am going to learn how to port ROM HTC one V to my Inc s.
I am use this thread :
http://forum.xda-developers.com/showthread.php?t=1222746
and this:
http://forum.xda-developers.com/showthread.php?t=1563857(although
but the result is:
ROM successfully insulted when I do reboot stay in HTC page.
......................................................
[Q] When I port ROM from ONE v to my phone, must be use ROM ICS4.0 or I can use any ROM "2.3.5"?!
because I use RUU stock for my phone." When I do porting"
[Q] how time take to finsh " adb logcat"?!
I know my English is bad sorry
I hope you get the point
Oh now I see what you did wrong, you didn't put any spaces in between the '>'
Try it with the spaces
adb logcat > logcat.txt
Click to expand...
Click to collapse
Just so I'll be more specific and make this 'noob proof' I'll update it
I'm in a good mood XD
After I enter "adb logcat > logcat.txt" nothing happens. ADB recognizes my devices. I have debugging enabled. It does say adb server is out of date, if that means anything.
Running 8-10-2012 tamcore nightly on HTC sensation. with tamcore kernel. Boot loader is locked with S-off. if that means anything.
how do you do one without a computer
Sent from my HTC Sensation using xda app-developers app
melo563 said:
how do you do one without a computer
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Look in the market. But those aren't as reliable
Sent from my Sensation
Paste bin says my log cat is too big. How can I fix this?
Sent from my HTC Sensation using xda premium
Hello, I'm having some trouble on win 7 . when i type in cmd adb devices i get adb is not recognized as a internal or external command. i installed the sdk manager in c\Android , installed java and i changed the environment variables to, path c:\Android-sdk-windows etc.... per the instructions. but i did something wrong since it's not working...i could use some help.... Thanks...

[WINDOWS][TUT]ADB tutorial, setting up ADB, usefull commands, collecting debug info.

Hi all.
Everyone here on our forum wants to help devs by testing different stuff but devs wants testers to send debug info to them so they can resolve bugs. Notifying bugs without logcats is useless and some users don't know how to collect these debug data.
To collect debug info there is a tool named ADB (Android Debugging Bridge). we r very small community and there are not plenty of sgr users around here so we have to worry about knowledgeable testers. so i m making this basic instructional guide to ADB. about how to set up ADB on windows and some basic usage.
Setting up ADB on windows.​
Know this first.
> ADB requires usb drivers. So first of all install kies so that ur pc detects ur phone and ADB can recognise ur phone.
> Android is linux based and in linux commands are case sensitive so while typing these command use propare case otherwise commands won't execute.
> Windows uses back slash [\] and linux uses forward slash [/] so while typing file locations. For location of file in ur pc use back slash and for files in ur phone/sd card use forward slash.
there are two ways to setup adb on ur windows pc.
1 > download the android sdk, it includes the adb
u can download latest android sdk from HERE.
2 > only download adb package, no need of downloading the whole sdk.
look at the end of post to find the zip file of adb package.
now after downloading:
if u have downloaded sdk read this:
> after downloading sdk, extract it to ur desired location.
> after extracting, open that folder and goto "platform-tools" folder.
> now hold the shift key and hit right click in that directory
> click "open command window here"
> u will see command promp, type "adb" in command prompt. if adb executes means u have successfully setup adb on ur windows.
if u r using without sdk:
> just extract the package
> hold shift key, hit right click and choose "open command prompt here"
> type "abd" in command prompt and check if adb executes.
now as we have successfully setup adb lets begin to some basic commands.
first of all connect ur phone using usb cable. make sure u have checked usb debugging in settings>applications>development>check usb debugging.
now open adb as mentioned above and type
Code:
adb devices
u should see
Code:
list of attached devices
xyz device
xyz will be name of ur device, as default it will be some number.
Basic usefull ADB commands​
1.
Code:
adb pull
this command can be used copy files from ur device to ur pc.
for eg.
Code:
adb pull /system/app/Camera.apk
this will copy the camera app to the directory where adb is extracted.
if u know the path u can copy anything using this command.
2.
Code:
adb push
this command can be used to push files to ur phone.
type the command, drag and drop the file in command prompt and than type location where u want to push that file and hit enter.
for eg, if i want to push image named android.jpg stored in my C drive.
Code:
adb push C:\android.jpg /sdcard/
this will push that image to sdcard.
sometimes we have to push some packages in specified folders. just type the location after file name.
for eg
Code:
abd push C:\sanim.zip /system/media
3.
Code:
adb install
with help of this command we can install apps to our phone dorectly from pc.
for eg. type "adb install" than leave one space with mouse choose apk file of app u want to install and drag and drop it in command prompt. path of that app will be displayed in command prompt. like this.
Code:
adb install C:\adb\Camera.apk
by executing this command u can install the app u have dragged and dropped in command prompt.
As i have written for windows but these commands can be used on ADB on linux/MacOS as well but i have only mentioned the set-up guide for windows only.
Credits/Source.​
http://developer.android.com/tools/help/index.html
Getting Debug Infos (Logcats)​
1. logcat
logcat is a report from android logging system which runs in background from the moment u boot ur phone. and it haves all the info what went wrong with system.
generally we can see logcat by typing
Code:
adb logcat
but that will show the constant data flow so better save it as file so can be sent to dev or u can study it later.
Code:
adb logcat > log.txt
this will store the logcat to directory of adb and collect log in text file.
2. bugreport
Code:
adb bugreport
bug report prints dumpsys, dumpstate, and logcat data to the screen. which can be used for bug reporting.
3. Java Debug Wire Protocol
Code:
adb jdwp
this command prints the list of available JDWP processes on connected device in command prompt.
Logcats On Mobile​u can directly generate logcat on ur mobile using Terminal Emulator app, there are many terminal apps in market. CM comes with pre-loaded Terminal Emulator.
some terminal apps:
Android Terminal
Terminal Emulator
RomToolbox
u will need root access to generate logs
open terminal app, u will see following screen
Code:
$ export PATH=/data/local/bin:$PATH
$
now type su and hit enter.
allow super user permissions.
now to get a logcat type following command.
Code:
logcat > /mnt/sdcard/logcat.txt
this will generate text file named logcat.txt on root of ur sdcard which is containing logcat.
to get DMESG (Kernel Debug)
open terminal and type following command
Code:
su
dmesg > /mnt/sdcard/dmesg.txt
this will generate text file named dmesg.txt on root of ur sdcard which is containing kernel debug log.
Kernel Debugging.​
we can use adb to debug kernel issues.
Code:
adb shell
dmesg
this will generate a log which is very helpful to resolve kernel issues, we just have to send this log to dev, he will look after it.
sometimes after flashing kernel we go into bootloop in that cases generate logcat using this commands and send to dev it will be very helpfull for dev to know and resolve reason causing bootloop.
Code:
adb shell
cat /proc/last_kmsg > /sdcard/last_kmsg
this command should be executed immediately on reboot otherwise it will be over written by new kernel message. the file will be stored on root of ur sdcard named last_kmsg. send this file to kernel dev it will help him great to resolve the problem.
Read this if u dont know how to get files from ur sdcard even if ur phone is not booting and stuck at bootloop.
u must have CWM to do this.
>boot ur phone in recovery mode (by holding VOL UP and HOME key together on boot)
>goto "Mounts and Storage"
>Select "Mount USB Storage" and plug in your data cable.
>Now u can access ur sdcard on ur pc, after ur work is done click "Unmount"
Hi,
Just a noob question... if my phone is stuck in a bootloop, is there anyway for me to get a logcat without flashing a new rom???
Sent from my GT-I9103 using xda app-developers app
JoJo2012 said:
Hi,
Just a noob question... if my phone is stuck in a bootloop, is there anyway for me to get a logcat without flashing a new rom???
Sent from my GT-I9103 using xda app-developers app
Click to expand...
Click to collapse
If you have enabled USB Debugging , yes
"I have to go. It's just....they really need me." - Sora
Re: Toggle mobile data on and off via adb
Does anybody know how to toggle mobile data on and off via ADB?? IM WILLING TO PAY FOR THIS INFO lol I NEED IT THAT BAD!! PM ME PLEEEASE!!!!!
12manytimes said:
Does anybody know how to toggle mobile data on and off via ADB?? IM WILLING TO PAY FOR THIS INFO lol I NEED IT THAT BAD!! PM ME PLEEEASE!!!!!
Click to expand...
Click to collapse
'adb shell su -c "svc data disable"' and 'adb shell su -c "svc data enable"'. You must be rooted.
Sent from my GT-I9103 with CM10
Adam77Root said:
'adb shell su -c "svc data disable"' and 'adb shell su -c "svc data enable"'. You must be rooted.
Sent from my GT-I9103 with CM10
Click to expand...
Click to collapse
Thanks alot, i just sent you a PM but it shows that i didn't send anything, so if you didn't get the message please send me one cuz id like to buy you a beer!
I wish i could hit your thanks button a million times right now lol
Hello I am trying to create a batch file that has an infinite loop and was wondering if there are any adb commands that can do this.
I am also looking for an adb command that waits x amount of seconds before performing the next command.?
Any help would be greatly appreciated

Categories

Resources