Related
I think I've found the cause of this, where you download something from the Market and it says downloaded but just sits there forever. Google has something called a "checkin" service that sends them anonymous usage data, bug reports, crash logs, etc, but it fails a lot. When you download something from the Market, it sends a message to Google about it, and if it fails it just freezes.
You can turn this off easily with a system property. I haven't seen any issues with doing this except that it will break the setup wizard if you have this set during boot after a wipe.
All you need to do is add this line to the end of /system/build.prop:
Code:
ro.config.nocheckin=1
So, something like this:
Code:
adb pull /system/build.prop .
(edit file with notepad, vim, emacs if you hate yourself)
adb remount
adb push build.prop /system
adb shell reboot
Hopefully this helps someone and Google doesn't shoot me down from space
build.prop reverts after reboot
hey
followed instructions
- pulled build.prop
- added ro.config.nocheckin=1 to end
- adb remount (RW filesystem)
- pushed new build.prop, says 2593 bytes written
- rebooted device
upon reboot: /system/build.prop reverts back to original
any idea for a Rogers Dream user here
Just wanted to clarify that the steps should actually be:
Code:
adb remount
adb pull /system/build.prop .
*(edit file with notepad, vim, emacs, whatever)*
adb push build.prop /system
adb shell reboot
Otherwise, people are going to reboot their computers willy-nilly, and not their androids.
cyanogen said:
Hopefully this helps someone and Google doesn't shoot me down from space
Click to expand...
Click to collapse
Google is going to have you wacked for figuring this out.
terminal commands plz?
G1-evolve said:
terminal commands plz?
Click to expand...
Click to collapse
Code:
su
mount -o remount,rw /system
echo "ro.config.nocheckin=1" >> /system/build.prop
reboot
cyanogen said:
Code:
su
mount -o remount,rw /system
echo "ro.config.nocheckin=1" >> /system/build.prop
reboot
Click to expand...
Click to collapse
Thanks alot! What would be the "Undo" to this incase one day I need to wipe/flash a rom?
edit: seems to still "hang" and not work. Only works if I log into "gtalk"
After having completed this procedure, I've still managed to "hang" the market once. Though in all fairness, once is fine, because it used to happed daily.
However, I've noticed something that some people might consider a "down side" - when you uninstall apps, they remain in your downloads. That's exactly the same behavior that people were complaining about before cupcake came out.
besides anonymous usage data, bug reports and crash logs, what else would i be disabling by doing this?
AlfaTrion said:
besides anonymous usage data, bug reports and crash logs, what else would i be disabling by doing this?
Click to expand...
Click to collapse
Well, as I've mentioned in my post above yours, all apps that you ever downloaded while having check-in disable, will stay in your My Downloads. Again, it doesn't bug me as I use aTrackDog primarily for update checks, but I know some people don't like this.
Have you tried clearing the market cache in Settings > Applications > Manage Applications > Market? I'm curious to know if that assist with that at all.
jordanjay29 said:
Have you tried clearing the market cache in Settings > Applications > Manage Applications > Market? I'm curious to know if that assist with that at all.
Click to expand...
Click to collapse
I haven't, but I'll try. Though I am quite sure it will not do anything because that list remains the same through flashes and upgrades, so I'm sure it's pulled from Google servers.
my solution......
Whenever the market hangs when I download [email protected] reboot and it works fine. I don't get the hang problem a lot so it doesn't bother me to reboot.
pistol4413 said:
Whenever the market hangs when I download [email protected] reboot and it works fine. I don't get the hang problem a lot so it doesn't bother me to reboot.
Click to expand...
Click to collapse
It's not only about Market hanging. After disabling check-in, Market actually works much faster because data does not get sent to Google every time you do something (download / remove / update / etc.)
Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.
jordanjay29 said:
Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.
Click to expand...
Click to collapse
The framework could be modded for that, but thats a lot of work. Right now, the checkin code is a listener, and just wakes up for certain events (like an app install).
I THINK this could happen if one changes or deletes the APN of the phone.. for me it started to freeze the download after I completely closed the 3g/2g connection. So maybe google uses that connection in order to gether the data instead of the wifi. Can that be changed so that both use the wifi?
script to disable checkin service:
Code:
#!/bin/sh
su
if ! grep -q "^ro.config.nocheckin=" /system/build.prop; then
echo "Mounting system as read/write"
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo "Disabling Checkinservice"
echo "ro.config.nocheckin=1" >> /system/build.prop
echo "rebooting.."
reboot
else
echo "CheckinService already disabled"
fi
jordanjay29 said:
Would there be a way to schedule this checkin? Or make it run only once every x times? That might bridge the difference between no hangs and retaining all past downloads, and many hangs but clearing the downloads list.
Click to expand...
Click to collapse
I disassembled the classes.dex from the checkin.apk with baksmali and in the CheckinService.smali these fields are defined:
Code:
.field private static final CHECKIN_INTERVAL:J = 0x6ddd00L
.field private static final CHECKIN_INTERVAL_MAX:J = 0xa4cb800L
.field private static final CHECKIN_INTERVAL_MIN:J = 0x927c0L
Values in decimal(dont take the last character for conversion!). I think they should represent milliseconds:
0x6ddd00L: 7200000
0xa4cb800L: 172800000
0x927c0L: 600000
Maybe you can "schedule" the checkin service by changing these values, assemble the dex again with smali, replace the original classes.dex in the apk and push it back to the Phone.
Code:
adb remount
adb pull /system/app/checkin.apk .
Make a backup copy of the apk ;)
extract the classes.dex
java -jar -Xmx512m baksmali-0.94.jar -o ./checkin classes.dex
Edit the File
java -jar -Xmx512m smali-0.94.jar -o classes.dex ./checkin
Replace the classes dex in the pulled checkin.apk
adb push checkin.apk /system/app/checkin.apk
adb shell reboot
You can get smali and baksmali from here:
http://code.google.com/p/smali/
I was talking about the explicit checkin that happens after apps are installed, etc..
I was woken up last night at 3:30am this morning to the sound of my phone rebooting itself.
Is there anyway to determine why it rebooted? I've never seen it do it before on its own! I'm running CM6 rom.
"adb logcat" would probably do it.
open your command prompt, navigate to your c:\android-sdk-windows\tools folder and run the following command
Code:
adb remount
adb logcat
and it should return a bunch of stuff to you. scrolling through this log will probably show you some kind of error, failure, termination, etc. at some point.
I'm trying to start busybox's httpd at boot w/o success. However, I can start it manually post-boot w/o problems. Can I enable a syslog facility so I can see what happens when the bootup script calls it?
Code:
httpd -p 80 -u 80 -h /sdcard/www -c /etc/httpd.conf
I've tried running the process as -u 80 and as -u 0, both work post-boot, not before.
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
KaiserLinux said:
It's Linux - if there is an rc.local you should be able to drop a string in there to make it start.
Click to expand...
Click to collapse
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
KaiserLinux said:
Go into applications and turn on debugging mode. Plug your phone into your computer and run 'adb logcat' or something to that effect. You can play around with your phone and watch the log scroll by.
Your gonna need the whole ADB setup. Go to the samsung epic 4G wiki and check the article about getting root and flashing a new kernel. This will have the instructions for getting ADB on your system as well.
Click to expand...
Click to collapse
I've compiled my own rooted kernel and a new busybox with syslogd to see if I can diagnose why bb's httpd isn't starting at boot. As I mentioned, it starts manually w/o a problem. adb logcat isn't very useful in this particular situation. Thanks for the reply though.
jocala said:
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
coldguy said:
I'm kind of a noob myself, but I recall reading that init.rc isn't really a shell script. It has a special syntax that is parsed by Android init, I'm not sure just throwing shell commands in there is going to work. I'd post a link to the doc but I can't post links yet
Click to expand...
Click to collapse
Weird, the first 500 lines of init.rc are nothing BUT shell commands.
i.e. chmod 0666 /dev/input/event0
Anyway, further along in init.rc the daemon processes are started up. syntax looks like:
Code:
service playlogo /system/bin/playlogo
user root
oneshot
I've tried setting up my programs (httpd,syslogd) as services, no joy.
jocala said:
Not that simple
There is no rc.local, but I inserted
Code:
/sbin/syslogd -O /data/log/syslog
into the beginning of init.rc, but it logs nothing.
Click to expand...
Click to collapse
sorry to hijack your post.
but i want to know how do you modify the /init.rc,
because when i reboot, the /init.rc will automatic recovery the old verison.
did you check the /init.rc, is it modified, after your phone reboot?
Does logcat not give you the info you want?
You can go here to find out how to redirect stdout and stderr to the logcat as well.
init.rc is part of the root fs, which is compiled into the kernel. So, a custom kernel is required. Search for custom kernel for details.
Ok. I had the android sdk installed before and was able to easily "adb shell" "su"
but a few months ago my phone stopped being recognized by the pc (stock cable) so i uninstalled it since i couldnt use adb nor odin (i thought it was my phone though)
but now i got a BB cable and the drivers all installed wonderfully and there was no headaches so now i believe the hype with getting a new usb cable because the stock one sucks.
So i followed the "Setting up Android SDK for beginners" by bthomas and i ollowed it to a t because i couldnt remember how to set up the sdk, and after setting it up, when i type in adb shell, it gives me a "~#" (which never happened before) and then when i type "su" it gives me a "sh-3.2#"
Im not sure what couldve went wrong except for the fact that before i would install everything (1.5sdk, 1.6, etc.etc) because i didnt know any better, but the guide showed me that all we needed to get adb to wrok was the platform tools one, but its not working.
I need advice because i dont wanna mess up anything in my phone since ive never seen those prompts
TL;DR
ADB gives me a "~#" when i adb shell, and i dont know why
Also, im running urban regeneration with genocide 2.0
The '~' means you are in your home directory. The '#' means you already have root so the 'su' command is not necessary. Sounds like your rom has a non-stock shell installed and is kernel rooted?
machx0r said:
The '~' means you are in your home directory. The '#' means you already have root so the 'su' command is not necessary. Sounds like your rom has a non-stock shell installed and is kernel rooted?
Click to expand...
Click to collapse
but i cd to the sdk directory (Cd:/ android/sdk/platform-tools) so idk why it would think im still in the home directory (that would be cd: users/etc, right?)
and yes the kerna is rooted. its Genocide v2.0 and im undervolted.
im also ext4 if that makes a difference...as for the rom idk its Urban Regeneration
im such a noob now i never had problems before i was forced to stop using my phone with my pc
A_Flying_Fox said:
but i cd to the sdk directory (Cd:/ android/sdk/platform-tools) so idk why it would think im still in the home directory (that would be cd: users/etc, right?)
and yes the kerna is rooted. its Genocide v2.0 and im undervolted.
im also ext4 if that makes a difference...as for the rom idk its Urban Regeneration
im such a noob now i never had problems before i was forced to stop using my phone with my pc
Click to expand...
Click to collapse
After you 'adb shell' it's showing you the filesystem on the phone, not your computer. I assume the the cd platform-tools command you are mentioning is what you are doing in a Windows command prompt to get to where your adb.exe is located.
Edit: Do this, it's safe, 'pwd' shows your current directory (in Linux/Android)
adb shell
pwd
cd /
pwd
Chances are it will show your home directory and then /
http://en.wikipedia.org/wiki/Pwd
machx0r said:
After you 'adb shell' it's showing you the filesystem on the phone, not your computer. I assume the the cd platform-tools command you are mentioning is what you are doing in a Windows command prompt to get to where your adb.exe is located.
Edit: Do this, it's safe, 'pwd' shows your current directory (in Linux/Android)
adb shell
pwd
cd /
pwd
Chances are it will show your home directory and then /
http://en.wikipedia.org/wiki/Pwd
Click to expand...
Click to collapse
yeah adb.exe is in platformtools
but anyways, this is what happened
adb shell
~# pwd
pwd
~ # cd /
cd /
~ # pwd
pwd
/
and then i exited lol
could it be a problem with my computer? like the place i saved it or something?
A_Flying_Fox said:
could it be a problem with my computer? like the place i saved it or something?
Click to expand...
Click to collapse
I don't think you have a problem it's just different than what you remember. Probably because of a difference in your mod. The prompt itself can be modified with environment variables (it's the PS# variables, you can look with 'set') so I wouldn't worry about that. My pwd output on stock looked very similar to what you pasted.
My PS# variables on stock:
# set
set
.
.
.
PS1='# '
PS2='> '
PS4='+ '
machx0r said:
I don't think you have a problem it's just different than what you remember. Probably because of a difference in your mod. The prompt itself can be modified with environment variables (it's the PS# variables, you can look with 'set') so I wouldn't worry about that. My pwd output on stock looked very similar to what you pasted.
My PS# variables on stock:
# set
set
.
.
.
PS1='# '
PS2='> '
PS4='+ '
Click to expand...
Click to collapse
i typed that in and i got a whole list of things and under them PS1='\w \$ '
PS2='> '
PS4='+ '
PWD=' '
TMPDIR= '/data/local/tmp
how would i get it back to #? Im willing to go back to stock odin if i have to, but im getting more intrigued by this as you help...
A_Flying_Fox said:
i typed that in and i got a whole list of things and under them PS1='\w \$ '
PS2='> '
PS4='+ '
PWD=' '
TMPDIR= '/data/local/tmp
how would i get it back to #? Im willing to go back to stock odin if i have to, but im getting more intrigued by this as you help...
Click to expand...
Click to collapse
Ok so you can see how your PS1 environment variable is different than mine. Depending on the shell you are using it might support escape characters such as \w which should display the current directory and \$ which should show # if you are root or $ if not. Here's some non-Android specific info on the subject http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html (stop at the colors part, no clue about which if any character are supported in the stock android shell, just using to give the basic idea)
To temporarily change the command prompt you could do:
PS1="# "
But most likely your shell has a settings file that sets the default prompt when you login. Unfortunately I do not know where this is located. Going back to stock would certainly undo any custom shells or settings your current rom has set if you don't like it.
i think that directory might be sbin/sh. because it calls to it whenever i enter something like ADB REBOOT it says sbin/sh.: adb not found
but when i type in adb shell
and then reboot recovery, etc it works
i dont think i need to go to stock, i just need to not type certain things before commands i guess...
but thanks alot! youve enlightened me quite a bit hahah i wish i had more thanks to give
I wanted to get the kmsg from `/proc/kmsg` so I went to the TWRP File Manager and tried copying this file to my external sd card but it's taking forever to copy. Should I be interrupting this process or should I wait more (already 5 mins). I can't afford to lose data in the internal storage and the data partition.
Device: Moto g4 plus xt1643
ROM: Stock MM 6.0.1 MPJ24.139-63
TWRP: 3.1 by oadam11
MagiskSU v12.0 installed.
Anyone who can help please do so and also guide me how to get the kmsg from the phone without using any app.
EDIT: Interrupted by `adb reboot bootloader` and nothing went wrong. But how do I get the kmsg?
EDIT: doing this in terminal emulator gets the log:
# cat /proc/kmsg > /sdcard/kmsg.txt
tywinlannister7 said:
I wanted to get the kmsg from `/proc/kmsg` so I went to the TWRP File Manager and tried copying this file to my external sd card but it's taking forever to copy. Should I be interrupting this process or should I wait more (already 5 mins). I can't afford to lose data in the internal storage and the data partition.
Device: Moto g4 plus xt1643
ROM: Stock MM 6.0.1 MPJ24.139-63
TWRP: 3.1 by oadam11
MagiskSU v12.0 installed.
Anyone who can help please do so and also guide me how to get the kmsg from the phone without using any app.
EDIT: Interrupted by `adb reboot bootloader` and nothing went wrong. But how do I get the kmsg?
Click to expand...
Click to collapse
Have you tried copying it to internal? Copying to SD has been super funky at times with TWRP.
Same results.
negusp said:
Have you tried copying it to internal? Copying to SD has been super funky at times with TWRP.
Click to expand...
Click to collapse
The process of copying the file never ends. I tried copying to both the external and the internal sd card.
tywinlannister7 said:
But how do I get the kmsg?
Click to expand...
Click to collapse
Use the following command, it creates a kmsg.txt file on your current directory from where you ran cmd:
Code:
adb shell cat /proc/kmsg > kmsg.txt
Or run the following command in any terminal emulator, it'll save it in your sdcard/internal storage:
Code:
cat /proc/kmsg > /sdcard/kmsg.txt
tywinlannister7 said:
The process of copying the file never ends. I tried copying to both the external and the internal sd card.
Click to expand...
Click to collapse
Strange it gets easily copied to both internal & sdcard for me. Tried that on RR
lCrD512 said:
Use the following command, it creates a kmsg.txt file on your current directory from where you ran cmd:
Or run the following command in any terminal emulator, it'll save it in your sdcard/internal storage:
Click to expand...
Click to collapse
The terminal emulator thing worked. ? Thanks.
How to get last_kmsg?
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @tywinlannister7 @lCrD512 @negusp or anyone
Nikki Singhania said:
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @[email protected]@negusp or anyone
Click to expand...
Click to collapse
I had seen an old XDA TV video where they had explained the procedure. But imo instead of 'last_kmesg' directly doing:
# cat /proc/kmsg > /sdcard/kmsg.txt
in terminal emulator or by
# adb shell cat /proc/kmsg > /sdcard/kmsg.txt
You get the log.
Nikki Singhania said:
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @tywinlannister7 @lCrD512 @negusp or anyone
Click to expand...
Click to collapse
tywinlannister7 said:
I had seen an old XDA TV video where they had explained the procedure. But imo instead of 'last_kmesg' directly doing:
# cat /proc/kmsg > /sdcard/kmsg.txt
in terminal emulator or by
# adb shell cat /proc/kmsg > /sdcard/kmsg.txt
You get the log.
Click to expand...
Click to collapse
To view
Code:
adb shell
cat /sys/fs/pstore/console-ramoops-0
cat /sys/fs/pstore/dmesg-ramoops-0
To pull
Code:
adb pull /sys/fs/pstore/console-ramoops-0
adb pull /sys/fs/pstore/dmesg-ramoops-0
Silesh.Nair said:
To view
Code:
adb shell
cat /sys/fs/pstore/console-ramoops-0
cat /sys/fs/pstore/dmesg-ramoops-0
To pull
Code:
adb pull /sys/fs/pstore/console-ramoops-0
adb pull /sys/fs/pstore/dmesg-ramoops-0
Click to expand...
Click to collapse
Thanks this working:highfive: so on android 7.x they changed to this location
Nikki Singhania said:
so on android 7.x they changed to this location
Click to expand...
Click to collapse
This was changed from Android 6.0 Marshmallow & above