-
-
Save kumar303/5054083 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# You may of course prefer not to trust this script and do the below | |
# manually, step by step, with an editor, etc., ;-). | |
# | |
# make /system/bin writable | |
# | |
DISK_DEVICE=`adb shell mount | grep '/system' | awk '{ print $1 }'` | |
adb shell "mount -o remount,rw $DISK_DEVICE /system" | |
# | |
# Put busybox in place | |
# | |
# downloaded from http://busybox.net/downloads/binaries/1.20.0/busybox-armv6l | |
adb push /home/jrgm/busybox-armv6l /system/bin | |
adb shell chmod 755 /system/bin/busybox-armv6l | |
# /system/xbin is the last dir in the default $PATH atm, but unused. So we'll | |
# put busybox links in there. Someday, I'll regret this ;-). | |
adb shell mkdir -p /system/xbin | |
adb shell /system/bin/busybox-armv6l --install -s /system/xbin | |
# | |
# pull a copy of b2g.sh, add our lines and push it back | |
# | |
adb pull /system/bin/b2g.sh . | |
LINES=`wc -l b2g.sh | awk '{ print $1 }'` | |
head -n 1 b2g.sh > b2g.sh.new | |
# Make `adb logcat` show timestamped lines about HTTP and cookies. Yay! | |
echo 'export NSPR_LOG_MODULES=timestamp,cookie:5,nsSocketTransport:5,nsHttp:5' >> b2g.sh.new | |
tail -n `expr $LINES - 1` b2g.sh >> b2g.sh.new | |
adb push b2g.sh.new /system/bin/b2g.sh | |
adb shell chmod 755 /system/bin/b2g.sh | |
adb shell chown root.shell /system/bin/b2g.sh | |
adb shell ls -l /system/bin/b2g.sh | |
echo @@@ | |
adb shell cat /system/bin/b2g.sh | |
echo @@@ | |
# reboot the phone to pick up the change | |
# adb reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment