Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-27-2011, 06:03 PM   #136
renatolond
Junior Member
renatolond began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2011
Location: RJ, Brazil
Device: Kindle
Well, been looking at my K3 messages log, with 3G on, and the message I got from wand was this:

110527:185736 wand[2597]: I dtp:diag: t=XXXXXXXX,MCC MNC=724 05,Channel=4414,Band=WCDMA V 850,Cell ID=XXXXXXXX,LAC=XXXXX,RAC=1,Network Time=2011/05/27 18.57.23,Local Time Offset=-3h,Selection Mode=Automatic,Test Mode=0,Bars=4,Roaming=1,RSSI=-71,Tx Power=-9,System Mode=WCDMA,Data Service Mode=HSDPA,Service Status=Service,Reg Status=Success,Call Status=Conversation,MM Attach State=Attach accept,MM LU State=LU update,GMM Attach State=Attach accept,GMM State=Registered,GMM RAU State=Not available,PDP State=Active,Network Mode=CS PS separate attach mode,PMM Mode=Connected,SIM Status=Valid; PIN okay; R3,MM Attach Error=No error,MM LU Error=No error,GMM Attach Error=No error,GMM RAU Error=Not available,PDP Rej Reason=No error,Active/Monitored Sets=0;XXX;-5,RSCP=-87,DRX=64,HSDPA Status=Active,HSDPA Indication=HSDPA HSUPA unsupp,Neighbor Cells=,Best 6 Cells=,Pathloss=,MFRM=,EGPRS Indication=,HPLMN=UMTS;XXX;XXX GSM;XXX;XXX,RPLMN=XXX;XX ,FPLMN=,n=1:

I replaced some numbers with X because I don't know if they're identifying. Even though this has the "Bars=X" like OP, don't have any info about Lat/Long. I'm thinking that was a K2 only thing?
renatolond is offline   Reply With Quote
Old 07-17-2011, 08:52 AM   #137
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 14
Karma: 20
Join Date: Jun 2011
Device: Kindle 3
del
del

Last edited by z0mtec; 09-26-2011 at 02:31 PM.
z0mtec is offline   Reply With Quote
 
Enthusiast
Old 09-19-2011, 05:22 AM   #138
richardx
Bash script Noob
richardx began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2011
Location: San Francisco, USA
Device: Kindle 3 WiFi
Sorry to exhume a relatively old thread for my first post but... :-)

I've been trying to run kindlesec.sh on my K3 3.2.1 without success. The error message that appears is:

[root@kindle us]# sh kindlesec.sh
: not foundh: line 2:
: not foundh: line 7:
: not foundh: line 8:
: not foundh: line 9:
Creating backup of loginfo, tinyrot, otaup, showlog, syslog-ng.
': No such file or directoryry '/mnt/us/.kindlesec/
: not foundh: line 13:
kindlesec.sh: line 15: syntax error: word unexpected (expecting "do")

I didn't have any luck running ./kindlesec.sh either.

Can anyone report success with kindlesec.sh on a K3 3.2.1?

If not, I would be happy to hand edit the four log files in question using vi, but I'm not sure precisely how to disable them in an elegant way. Is there a scriptmeister out there who can advise how this could be done?

Many thanks!
richardx is offline   Reply With Quote
Old 09-19-2011, 07:30 AM   #139
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
Quote:
Originally Posted by richardx View Post
Sorry to exhume a relatively old thread for my first post but... :-)

I've been trying to run kindlesec.sh on my K3 3.2.1 without success. The error message that appears is:
Richard, my first thought is that you might be running it without doing a mntroot rw first. My second thought is that DAMN people should not be running these scripts if they don't know how to debug them and fix things that they might break. I had a look at the script from this thread, which is what I presume you're talking about... and I don't see anything technically wrong with the syntax.

Assuming you've got write access to the root fs, it should create a new dir on the user partition called .kindlesec (which would show up if you plugged it into windows with usb networking off) and makes backups of the four files to there and then proceeds to replace each of them with shortcuts (links) to nowhere (/dev/null), but not before making additional backups of them in their respective folders (the 2nd backups will have the same file name with a tilde "~" appended). Should work. As for if it's a good idea, well........
ryran is offline   Reply With Quote
Old 09-19-2011, 07:58 AM   #140
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,635
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by ryran View Post
My second thought is that DAMN people should not be running these scripts if they don't know how to debug them and fix things that they might break.
You are quite right about this
thomass is offline   Reply With Quote
Old 09-19-2011, 10:46 AM   #141
richardx
Bash script Noob
richardx began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2011
Location: San Francisco, USA
Device: Kindle 3 WiFi
Quote:
Originally Posted by ryran View Post
Richard, my first thought is that you might be running it without doing a mntroot rw first.
That was my first thought, too. So I made sure. The file system was read/writeable.

Quote:
Originally Posted by ryran View Post
My second thought is that DAMN people should not be running these scripts if they don't know how to debug them and fix things that they might break.
Agreed. That's why I have to appeal to your good nature. Mind you, I haven't broken anything yet...

Quote:
Originally Posted by ryran View Post
I had a look at the script from this thread, which is what I presume you're talking about... and I don't see anything technically wrong with the syntax.
That was my impression, but I'm no expert.

Quote:
Originally Posted by ryran View Post
Assuming you've got write access to the root fs, it should create a new dir on the user partition called .kindlesec (which would show up if you plugged it into windows with usb networking off) and makes backups of the four files to there
So here's the problem. There's no new .kindlesec dir. So something is wrong, but what, I'm really not sure. The file system is writeable. I'll bet on a simple error, but I'm guessing. Any ideas?
richardx is offline   Reply With Quote
Old 09-21-2011, 03:50 AM   #142
ryran
Connoisseur
ryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with othersryran plays well with others
 
Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
Huh. I don't know. You don't even need mntroot to create that .kindlesec directory..... weird.
ryran is offline   Reply With Quote
Old 09-26-2011, 02:35 PM   #143
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 14
Karma: 20
Join Date: Jun 2011
Device: Kindle 3
Hi,

how it work on v3.2.1?

What must i change?

PHP Code:
#!/bin/sh

CONF=/etc/tinyrot.conf
NEXTFILETOSEND
=/var/local/log/nexttosendfile
LASTFILESENT
=/tmp/lastsentfile

_DEVTYPE
=/etc/sysconfig/devtypes
[ -f $_DEVTYPE ] && . $_DEVTYPE

_FEATURE
=/etc/rc.d/features
[ -f $_FEATURE ] && . $_FEATURE
# -----------------------------------------------------------------------------
# functions
# -----------------------------------------------------------------------------

print_usage () {
    echo 
"showlog will print all available logs, including old rotated logs"
    
echo "Usage:"
    
echo "showlog [-f [logfile] | -o <outfile> [logfile] | -s ] "
    
echo "    -f              follow log (tail -f)"
    
echo "    -o <outfile>    cat all available logfile(s) to outfile (default: outfile=/dev/stdout)"
    
echo "    -s              cat the zipped log files with special headers to pipe to the server"
    
echo "      --full           sending all available logs"
    
echo "      --fsn            sending logs for Customer Service (non anonymously)"
    
echo "      --nohead <logfile> sends all logfile logs with no headers to stdout"
    
echo "                         and writes log file listing to /tmp"
    
echo "    logfile         logfile to show (default: logfile=messages)"
    
echo ""
    
echo "NOTE: Don't use the full path. Just mention the file name"
    
echo "Example: showlog messages"
    
exit 1
}

print_stream_header () {
    
NUMFILES=$1
    
echo "MFBS/1.0 $NUMFILES"
    
echo ""
}

print_gzip_header () {
    if [ -
"$1" --"$2" ]; then
        
echo "showlog: print_gzip_header: incorrect arguments"
        
exit
    
fi
    CONTENTLENGTH
="$1"
    
CONTENTNAME="$2"
    
echo "Content-Length: $CONTENTLENGTH"
    
echo "Content-Name: $CONTENTNAME"
    
echo "Content-Type: GZIP"
    
echo "Content-Encoding: GZIP"
    
name=$(productid)
    echo 
"X-DeviceType: $(eval echo \\\${DEVTYPE_$name})"

    
# Convert 046-shasta-049566 to 495660046
    # Convert eng-shasta-049566 to 495660000
    #
    # first s/// converts eng- to 0-
    # second s/// extracts first and last segment, ignoring leading 0s
    # printf puts them back together with correct number of 0s
    
echo "X-DeviceFirmwareVersion:$(printf "%u%04u" $(cat /etc/version.txt | grep Version | awk '{ print $4 }' | sed 's/^[^\-]*[^0-9\-][^\-]*-/0-/; s/0*\([0-9]\+\)-.*-0*\(.\+\)/\2 \1/'))"
}

print_gzip_header_dsn () {
    
print_gzip_header "$1" "$2"
    
echo "X-DSN: $(cat /proc/usid)"
    
echo ""
}

print_gzip_header_anon () {
    
print_gzip_header "$1" "$2"
    
echo "X-Anonymous-Tag: $(cat /etc/guid)"
    
echo ""
}

print_gzip_files_anon () {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
CONTENTNAME=$FILE
        CONTENTLENGTH
=$(ls -l $FILE awk '{print $5}')
        
print_gzip_header_anon $CONTENTLENGTH $CONTENTNAME
        
# NOTE: cat'ing raw gzip file
        
cat $FILE
    done
}

print_gzip_files_dsn () {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
CONTENTNAME=$FILE
        CONTENTLENGTH
=$(ls -l $FILE awk '{print $5}')
        
print_gzip_header_dsn $CONTENTLENGTH $CONTENTNAME
        
# NOTE: cat'ing raw gzip file
        
cat $FILE
    done
}

print_gzip_files_noheaders() {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
cat $FILE
    done
}


get_inode () {
    
FILE=$1
    
return `ls -i $FILE 2>/dev/null | awk '{print $1;}'`
}

wait_for_file() {
    
FILE=$1
    
while [ ! -f $FILE ]; do
        
sleep 1
    done
}

follow_log () {
    
LOG=$1

    
while [ ]; do
        
wait_for_file $LOG
        tail 
-f $LOG &
        
TAILPID=$!
        
get_inode $LOG
        FILEINODE
=$?
        while [ 
]; do
            
get_inode $LOG
            NEWINODE
=$?
            if [ 
$FILEINODE -ne $NEWINODE ]; then
                kill $TAILPID
                
break
            
fi

            sleep 1
        done
    done
}

on_term ()
{
    if [ -
"$TAILPID]; then
        kill $TAILPID 2
>/dev/null >/dev/null
    fi
    
exit 0
}

trap 'on_term' TERM INT EXIT

# -----------------------------------------------------------------------------
# main
# -----------------------------------------------------------------------------

[ -f $CONF ] && . $CONF

if [ x$== "x--help" -o x$== "x-h" ]; then
    print_usage
    
exit 1
fi

# -----------------------------------------------------------------------------
# parse args
# -----------------------------------------------------------------------------

OUTFILE=/dev/stdout
GZIP_HEADER_TYPE
=print_gzip_files_anon
SENDING_GZIP
=
SENDING_FULL=0
NO_HEADERS
=0
LOG
="messages"

while [ -"$1" ]; do
    
__ARG=
    case $
1 in
        
-)
            if [ -
"$2" ]; then
                LOG
="messages"
            
else
                
LOG="$2"
            
fi
            follow_log 
/var/log/$LOG
            
# we dont come back here..
            
exit
            ;;
        -
)
            
shift
            
if [ -"$1" ]; then
                OUTFILE
="$1"
            
fi
            
echo "" "$OUTFILE2>/dev/null
            loginfo kitchensink
            shift
            
;;
        -
)
            
SENDING_GZIP=1
            shift
            
;;
        --
full )
            
SENDING_FULL=1
            shift
            
;;
        --
fsn )
            
GZIP_HEADER_TYPE=print_gzip_files_dsn
            shift
            
;;
        --
nohead )
            
GZIP_HEADER_TYPE=print_gzip_files_noheaders
            SENDING_FULL
=1
            NO_HEADERS
=
            shift 
            
if [ -"$1" ]; then
                LOG
="$1"
            
fi
            shift    
            
;;
        -
| --help )
            
print_usage
            
exit
            ;;
        * )
            
LOG="$1"
            
;;
    
esac
    SHOWLOG_ARGS
=$__ARGS
done


# -----------------------------------------------------------------------------
# calculate the number of files to send/show (NUMFILES) and their names
# (ALLFILES)
# -----------------------------------------------------------------------------
NUMFILES=0
ALLFILES
=
TRANSFERFILE=/tmp/last${LOG}sentfile
# prevent tinyrot from running, and do not run while tinyrot is running
(
uflock 9

# Not sending log to server (not coming from pipelog)
if [ x$SENDING_GZIP == "x" ] ; then
    ALLFILES
=`ls -1  $ARCHIVE_DIR/${LOG}_*.gz | xargs`
    if [ -
"$ALLFILES]; then
        zcat $ALLFILES 
>> "$OUTFILE"
    
fi
    cat 
/var/log/$LOG >> "$OUTFILE"
else # coming from pipelog
    # Sending partial logs
    
if [ x$SENDING_FULL == "x0" ] && [ -e $ARCHIVE_DIR/${LOG}_${OLDEST_FILE} ] ; then
        OLDEST_LZ
=`cat $ARCHIVE_DIR/${LOG}_${OLDEST_FILE}`

        if [ -
e $NEXTFILETOSEND ]; then
            OLDEST_LZ
=`cat $NEXTFILETOSEND`
        
fi


        YOUNGEST_LZ
=`cat $ARCHIVE_DIR/${LOG}_${YOUNGEST_FILE}`
        
COUNTER_LZ=$OLDEST_LZ

        OLDEST
=`echo $OLDEST_LZ|sed 's/[0]*\(.*\)/\1/g'`
        
YOUNGEST=`echo $YOUNGEST_LZ|sed 's/[0]*\(.*\)/\1/g'`
        
COUNTER=`echo $COUNTER_LZ|sed 's/[0]*\(.*\)/\1/g'`

        while [ ${
COUNTER} -lt ${YOUNGEST} ]; do
            
FILE=$ARCHIVE_DIR/${LOG}_${COUNTER_LZ}_*.gz
            
if [ -e $FILE ]; then
                ALLFILES
="$ALLFILES $FILE"
                
NUMFILES=$(($NUMFILES+1))
            
fi
            COUNTER
=$(($COUNTER+1))
            
COUNTER_LZ=`echo $COUNTER | awk '{ printf "%08d", $1 }'`
        
done
        
# update LASTFILESENT
        
if [ ${NUMFILES} -gt 0 ]; then
            
echo $COUNTER awk '{ printf "%08d", $1 }' $LASTFILESENT
        
else
            
cat $NEXTFILETOSEND awk '{ printf "%08d", $1 }' $LASTFILESENT
        fi
        print_stream_header $NUMFILES  
>> "$OUTFILE"
        
$GZIP_HEADER_TYPE $ALLFILES  >> "$OUTFILE"
    
else # Sending full logs
    
if [ "x$NO_HEADERS== "x0" ]; then   
               print_stream_header  
`ls $ARCHIVE_DIR/${LOG}_*.gz | wc -l ` >> "$OUTFILE"
        
else
            
TFILES=`ls $ARCHIVE_DIR/${LOG}_*.gz`
            echo 
$TFILES $TRANSFERFILE        
        fi
        $GZIP_HEADER_TYPE 
`ls $ARCHIVE_DIR/${LOG}_*.gz | xargs ` >> "$OUTFILE"
    
fi
fi
9$FLAG_TINYROT_LOCK 
I can´t find

PHP Code:
print_stream_header $NUMFILES
print_gzip_files $ALLFILES 
z0mtec is offline   Reply With Quote
Old 09-29-2011, 07:54 AM   #144
Kenneth_irl
Addict
Kenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplaneKenneth_irl makes transoceanic flights without the assistance of an airplane
 
Kenneth_irl's Avatar
 
Posts: 200
Karma: 55934
Join Date: Jan 2011
Location: Denmark
Device: Kindle 3
Quote:
Originally Posted by z0mtec View Post
Hi,

how it work on v3.2.1?

What must i change?

PHP Code:
#!/bin/sh

CONF=/etc/tinyrot.conf
NEXTFILETOSEND
=/var/local/log/nexttosendfile
LASTFILESENT
=/tmp/lastsentfile

_DEVTYPE
=/etc/sysconfig/devtypes
[ -f $_DEVTYPE ] && . $_DEVTYPE

_FEATURE
=/etc/rc.d/features
[ -f $_FEATURE ] && . $_FEATURE
# -----------------------------------------------------------------------------
# functions
# -----------------------------------------------------------------------------

print_usage () {
    echo 
"showlog will print all available logs, including old rotated logs"
    
echo "Usage:"
    
echo "showlog [-f [logfile] | -o <outfile> [logfile] | -s ] "
    
echo "    -f              follow log (tail -f)"
    
echo "    -o <outfile>    cat all available logfile(s) to outfile (default: outfile=/dev/stdout)"
    
echo "    -s              cat the zipped log files with special headers to pipe to the server"
    
echo "      --full           sending all available logs"
    
echo "      --fsn            sending logs for Customer Service (non anonymously)"
    
echo "      --nohead <logfile> sends all logfile logs with no headers to stdout"
    
echo "                         and writes log file listing to /tmp"
    
echo "    logfile         logfile to show (default: logfile=messages)"
    
echo ""
    
echo "NOTE: Don't use the full path. Just mention the file name"
    
echo "Example: showlog messages"
    
exit 1
}

print_stream_header () {
    
NUMFILES=$1
    
echo "MFBS/1.0 $NUMFILES"
    
echo ""
}

print_gzip_header () {
    if [ -
"$1" --"$2" ]; then
        
echo "showlog: print_gzip_header: incorrect arguments"
        
exit
    
fi
    CONTENTLENGTH
="$1"
    
CONTENTNAME="$2"
    
echo "Content-Length: $CONTENTLENGTH"
    
echo "Content-Name: $CONTENTNAME"
    
echo "Content-Type: GZIP"
    
echo "Content-Encoding: GZIP"
    
name=$(productid)
    echo 
"X-DeviceType: $(eval echo \\\${DEVTYPE_$name})"

    
# Convert 046-shasta-049566 to 495660046
    # Convert eng-shasta-049566 to 495660000
    #
    # first s/// converts eng- to 0-
    # second s/// extracts first and last segment, ignoring leading 0s
    # printf puts them back together with correct number of 0s
    
echo "X-DeviceFirmwareVersion:$(printf "%u%04u" $(cat /etc/version.txt | grep Version | awk '{ print $4 }' | sed 's/^[^\-]*[^0-9\-][^\-]*-/0-/; s/0*\([0-9]\+\)-.*-0*\(.\+\)/\2 \1/'))"
}

print_gzip_header_dsn () {
    
print_gzip_header "$1" "$2"
    
echo "X-DSN: $(cat /proc/usid)"
    
echo ""
}

print_gzip_header_anon () {
    
print_gzip_header "$1" "$2"
    
echo "X-Anonymous-Tag: $(cat /etc/guid)"
    
echo ""
}

print_gzip_files_anon () {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
CONTENTNAME=$FILE
        CONTENTLENGTH
=$(ls -l $FILE awk '{print $5}')
        
print_gzip_header_anon $CONTENTLENGTH $CONTENTNAME
        
# NOTE: cat'ing raw gzip file
        
cat $FILE
    done
}

print_gzip_files_dsn () {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
CONTENTNAME=$FILE
        CONTENTLENGTH
=$(ls -l $FILE awk '{print $5}')
        
print_gzip_header_dsn $CONTENTLENGTH $CONTENTNAME
        
# NOTE: cat'ing raw gzip file
        
cat $FILE
    done
}

print_gzip_files_noheaders() {
    
ALLFILES=$*
    for 
FILE in $ALLFILES
    
do
        
cat $FILE
    done
}


get_inode () {
    
FILE=$1
    
return `ls -i $FILE 2>/dev/null | awk '{print $1;}'`
}

wait_for_file() {
    
FILE=$1
    
while [ ! -f $FILE ]; do
        
sleep 1
    done
}

follow_log () {
    
LOG=$1

    
while [ ]; do
        
wait_for_file $LOG
        tail 
-f $LOG &
        
TAILPID=$!
        
get_inode $LOG
        FILEINODE
=$?
        while [ 
]; do
            
get_inode $LOG
            NEWINODE
=$?
            if [ 
$FILEINODE -ne $NEWINODE ]; then
                kill $TAILPID
                
break
            
fi

            sleep 1
        done
    done
}

on_term ()
{
    if [ -
"$TAILPID]; then
        kill $TAILPID 2
>/dev/null >/dev/null
    fi
    
exit 0
}

trap 'on_term' TERM INT EXIT

# -----------------------------------------------------------------------------
# main
# -----------------------------------------------------------------------------

[ -f $CONF ] && . $CONF

if [ x$== "x--help" -o x$== "x-h" ]; then
    print_usage
    
exit 1
fi

# -----------------------------------------------------------------------------
# parse args
# -----------------------------------------------------------------------------

OUTFILE=/dev/stdout
GZIP_HEADER_TYPE
=print_gzip_files_anon
SENDING_GZIP
=
SENDING_FULL=0
NO_HEADERS
=0
LOG
="messages"

while [ -"$1" ]; do
    
__ARG=
    case $
1 in
        
-)
            if [ -
"$2" ]; then
                LOG
="messages"
            
else
                
LOG="$2"
            
fi
            follow_log 
/var/log/$LOG
            
# we dont come back here..
            
exit
            ;;
        -
)
            
shift
            
if [ -"$1" ]; then
                OUTFILE
="$1"
            
fi
            
echo "" "$OUTFILE2>/dev/null
            loginfo kitchensink
            shift
            
;;
        -
)
            
SENDING_GZIP=1
            shift
            
;;
        --
full )
            
SENDING_FULL=1
            shift
            
;;
        --
fsn )
            
GZIP_HEADER_TYPE=print_gzip_files_dsn
            shift
            
;;
        --
nohead )
            
GZIP_HEADER_TYPE=print_gzip_files_noheaders
            SENDING_FULL
=1
            NO_HEADERS
=
            shift 
            
if [ -"$1" ]; then
                LOG
="$1"
            
fi
            shift    
            
;;
        -
| --help )
            
print_usage
            
exit
            ;;
        * )
            
LOG="$1"
            
;;
    
esac
    SHOWLOG_ARGS
=$__ARGS
done


# -----------------------------------------------------------------------------
# calculate the number of files to send/show (NUMFILES) and their names
# (ALLFILES)
# -----------------------------------------------------------------------------
NUMFILES=0
ALLFILES
=
TRANSFERFILE=/tmp/last${LOG}sentfile
# prevent tinyrot from running, and do not run while tinyrot is running
(
uflock 9

# Not sending log to server (not coming from pipelog)
if [ x$SENDING_GZIP == "x" ] ; then
    ALLFILES
=`ls -1  $ARCHIVE_DIR/${LOG}_*.gz | xargs`
    if [ -
"$ALLFILES]; then
        zcat $ALLFILES 
>> "$OUTFILE"
    
fi
    cat 
/var/log/$LOG >> "$OUTFILE"
else # coming from pipelog
    # Sending partial logs
    
if [ x$SENDING_FULL == "x0" ] && [ -e $ARCHIVE_DIR/${LOG}_${OLDEST_FILE} ] ; then
        OLDEST_LZ
=`cat $ARCHIVE_DIR/${LOG}_${OLDEST_FILE}`

        if [ -
e $NEXTFILETOSEND ]; then
            OLDEST_LZ
=`cat $NEXTFILETOSEND`
        
fi


        YOUNGEST_LZ
=`cat $ARCHIVE_DIR/${LOG}_${YOUNGEST_FILE}`
        
COUNTER_LZ=$OLDEST_LZ

        OLDEST
=`echo $OLDEST_LZ|sed 's/[0]*\(.*\)/\1/g'`
        
YOUNGEST=`echo $YOUNGEST_LZ|sed 's/[0]*\(.*\)/\1/g'`
        
COUNTER=`echo $COUNTER_LZ|sed 's/[0]*\(.*\)/\1/g'`

        while [ ${
COUNTER} -lt ${YOUNGEST} ]; do
            
FILE=$ARCHIVE_DIR/${LOG}_${COUNTER_LZ}_*.gz
            
if [ -e $FILE ]; then
                ALLFILES
="$ALLFILES $FILE"
                
NUMFILES=$(($NUMFILES+1))
            
fi
            COUNTER
=$(($COUNTER+1))
            
COUNTER_LZ=`echo $COUNTER | awk '{ printf "%08d", $1 }'`
        
done
        
# update LASTFILESENT
        
if [ ${NUMFILES} -gt 0 ]; then
            
echo $COUNTER awk '{ printf "%08d", $1 }' $LASTFILESENT
        
else
            
cat $NEXTFILETOSEND awk '{ printf "%08d", $1 }' $LASTFILESENT
        fi
        print_stream_header $NUMFILES  
>> "$OUTFILE"
        
$GZIP_HEADER_TYPE $ALLFILES  >> "$OUTFILE"
    
else # Sending full logs
    
if [ "x$NO_HEADERS== "x0" ]; then   
               print_stream_header  
`ls $ARCHIVE_DIR/${LOG}_*.gz | wc -l ` >> "$OUTFILE"
        
else
            
TFILES=`ls $ARCHIVE_DIR/${LOG}_*.gz`
            echo 
$TFILES $TRANSFERFILE        
        fi
        $GZIP_HEADER_TYPE 
`ls $ARCHIVE_DIR/${LOG}_*.gz | xargs ` >> "$OUTFILE"
    
fi
fi
9$FLAG_TINYROT_LOCK 
I can´t find

PHP Code:
print_stream_header $NUMFILES
print_gzip_files $ALLFILES 
From what I know they changed the script a little. However, I did it on 3.0.3, but those two lines are still the same as mine as in the 3.2.1 log from you.

I believe these two lines are those you're looking for:

print_stream_header $NUMFILES >> $OUTFILE
$GZIP_HEADER_TYPE $ALLFILES >> $OUTFILE

I've personally changed it to:

print_stream_header 0 >> "$OUTFILE"
$GZIP_HEADER_TYPE "" >> "$OUTFILE"

However, I am no expert so wait for verification from one.

Last edited by Kenneth_irl; 09-29-2011 at 09:16 AM.
Kenneth_irl is offline   Reply With Quote
Old 09-29-2011, 11:39 PM   #145
dasmoover
Connoisseur
dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.dasmoover is not intimidated by interfenestral monkeys.
 
Posts: 84
Karma: 26720
Join Date: Mar 2011
Device: Kindle 3 WIFI
http://gitbrew.org/~dasmoover/kindle/showlog

Modified according to the thread the information was posted in. I use it on all of my Kindles.
dasmoover is offline   Reply With Quote
Old 10-23-2011, 01:50 PM   #146
z0mtec
Member
z0mtec began at the beginning.
 
z0mtec's Avatar
 
Posts: 14
Karma: 20
Join Date: Jun 2011
Device: Kindle 3
Quote:
Originally Posted by dasmoover View Post
http://gitbrew.org/~dasmoover/kindle/showlog

Modified according to the thread the information was posted in. I use it on all of my Kindles.
What have you changed?
z0mtec is offline   Reply With Quote
Old 10-25-2011, 03:05 AM   #147
nielsgans
Junior Member
nielsgans began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
showlog's script in different firmware of K3 are different. Can somesone provide more helpful way to deal with it?
nielsgans is offline   Reply With Quote
Old 11-05-2011, 04:02 PM   #148
m4rius
Junior Member
m4rius began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2011
Device: Kindle 3 (Wifi)
First of all, many thanks to all the enthusiastic people in this forum, which share their knowledge and time making the kindle even better!

Recently, I'm also into disabling the big brother features and looked into the files some of you mentioned so far. I tried to understand the showlog script, which is (by the way) not in /usr/sbin/ but in /usr/bin/ (kindle version 3, wifi only, firmware 3.3) and wondered why it should be sufficient to change the two previously mentioned lines but not the rest of the lines that pass some content to $OUTFILE ?!

Wouldn't it be enough/better/easier to change the definition of $OUTFILE from /dev/stdout to /dev/null? What do you think?
m4rius is offline   Reply With Quote
Old 12-19-2011, 08:57 AM   #149
inameiname
Groupie
inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.inameiname can self-interpret dreams as they happen.
 
Posts: 156
Karma: 20390
Join Date: Feb 2009
Device: none
Easy way to disable User Logging via Jailbreak and Launchpad hacks only

If you have the Jailbreak AND Launchpad hacks installed, a very easy way to do this (without the need for the USB hack or installing any *.bin files) is to copy these three files to your launchpad folder:

disable_logging.ini
Code:
[Actions]

; Disabling/enabling logging
D L I = !source /mnt/us/launchpad/disable_logging_install.sh
D L U = !source /mnt/us/launchpad/disable_logging_uninstall.sh
disable_logging_install.sh
Code:
# Kindlesec Hack (disable Amazon.com logging)
mkdir /mnt/us/.kindlesec/
cp /usr/sbin/syslog-ng /mnt/us/.kindlesec/
cp /usr/sbin/loginfo /mnt/us/.kindlesec/
cp /usr/sbin/tinyrot /mnt/us/.kindlesec/
cp /usr/bin/showlog /mnt/us/.kindlesec/
mntroot rw
ln -s -b /dev/null /usr/sbin/syslog-ng
ln -s -b /dev/null /usr/sbin/loginfo
ln -s -b /dev/null /usr/sbin/tinyrot
ln -s -b /dev/null /usr/bin/showlog
mntroot ro
exit
disable_logging_uninstall.sh
Code:
# Kindlesec Hack (disable Amazon.com logging)
mntroot rw
mv /usr/sbin/syslog-ng~ /usr/sbin/syslog-ng
mv /usr/sbin/loginfo~ /usr/sbin/loginfo
mv /usr/sbin/tinyrot~ /usr/sbin/tinyrot
mv /usr/bin/showlog~ /usr/bin/showlog
mntroot ro
exit
Then, just refresh Launchpad (Shift > Shift > Space) and input the keystroke listed in the ini file (Shift > D > L > I) to install and (Shift > D > L > U) to uninstall, restart, and voila.
Attached Files
File Type: zip disable_logging_ini_and_scripts.zip (771 Bytes, 144 views)
inameiname is offline   Reply With Quote
Old 12-20-2011, 12:17 AM   #150
Tanga
Zealot
Tanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toysTanga shares his or her toys
 
Posts: 130
Karma: 5792
Join Date: Mar 2011
Location: Australia
Device: Kindle 3
Wow, that's really helpful. I'm guessing that I will need to uninstall it to install updates, and then install it again?
Tanga is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hacks Kindle DX - Any way to disable screensaver? schulzmc Amazon Kindle 165 01-23-2014 02:37 AM
How do I disable iPhoto from opening up? thadiyan Amazon Kindle 3 09-12-2010 07:12 PM
How to disable the accelerometer ? askyn PocketBook 4 05-23-2010 12:38 PM
Disable Synchronization help please charlesp Sony Reader 2 01-10-2009 01:18 PM
I don't understand the screensaver (+ how do I disable it?). GatorDeb Amazon Kindle 8 10-02-2008 07:05 PM


All times are GMT -4. The time now is 10:53 PM.


MobileRead.com is a privately owned, operated and funded community.