Thursday, June 30, 2011

my stupid cable modem, and crontab entry to reboot it

My modem took a dump and stopped passing upstream data yesterday - but remained online.
My old cable modem and router setup had a crontab to test for this and remotely reboot the cable modem box:

Oh yeah and it has a stupid default password: W2402

http://www.borfast.com/blog/scientific-atlanta-webstar-2203c-how-access-locked-pages

http://superuser.com/questions/56644/url-to-reboot-a-webstar-dpc2100r2-cable-modem-with-curl

curl http://192.168.100.1/goform/gscan -d SADownStartingFrequency=687000000


combining into a crontab entry test::


curl --connect-timeout 120 --max-time 240 --fail -k -I http://www.google.com/intl/en/privacy/ || curl http://192.168.100.1/goform/gscan  -d SADownStartingFrequency=687000000



Thursday, June 23, 2011

recipe for android emulator running Maps and Market

trying to get a working android emulator with Google Maps and Market.

some guides that didn't get us a working Market (Vending.apk):
http://anythingsimple.blogspot.com/2010/09/how-to-use-android-market-on-android.html
http://techdroid.kbeanie.com/2009/11/android-market-on-emulator.html  (LOTS of comments)
best comment: http://techdroid.kbeanie.com/2009/11/android-market-on-emulator.html?showComment=1301959932119#c4444648731124403327

google apps on emulator: http://forum.cyanogenmod.com/topic/5340-android-emulator/

porting google apps/sync -- http://forum.xda-developers.com/showpost.php?p=5045511&postcount=33
clued us in on the framework/lib stuff needed copying

first good guide:  http://nookdevs.com/Honeycomb_Google_Apps_and_Market
also clued us in on what we needed to do.

resources to grab:
cyanogenmod 4 DRC83 google apps:
http://wiki.cyanogenmod.com/index.php?title=Latest_Version
-> http://android.d3xt3r01.tk/cyanogen/cm4/DRC83_base_defanged.zip

basic recipe:

1. create an AVM (SDK version 4 - android 1.6 works with the DRC83 image below)
2. copy the default system.img from the android-sdk-mac_x86/platforms/android-X/images/ directory to the AVM (on a mac it's in $USER/.android/avd/YOUR_AVM_NAME_HERE/
3. Launch the AVM (using the android AVD manager will hang you up with a full system partition)
   ~/src/android-sdk-mac_x86/tools/emulator -avd fun -partition-size 128
(wait for it to boot)
4. adb remount (remounts the /system volume read/write)
5. adb pull system/build.prop
6. comment out the line: #ro.config.nocheckin=yes in build.prop
7. push it back: adb push build.prop system/build.prop
8. copy missing files in DRC83 tree :

to copy all files missing in the emulator from the DRC83_base_defanged.zip tree:

mkdir DRC83 ; cd DRC83 ; unzip ../DRC83_base_defanged.zip


for i in $(find system) ; do \
adb shell ls $i | grep "No such file" && \
  echo adb push $i $(dirname $i) && \
       adb push $i $(dirname $i) ;
done

file permissions are not synced when doing this.
i do not claim this to be correct, but I couldn't get 'adb sync' to work


Things working:
Maps, Market


Things not working:
Gmail/Calendar/Contact sync

Tuesday, June 21, 2011

Android adb shell am broadcast: Bad component name

http://stackoverflow.com/questions/5171354/android-adb-shell-am-broadcast-bad-component-name


adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -c android.intent.category.HOME -n net.fstab.checkit_android/.StartupReceiver
Practically it turns out that you just have to add a slash after the package name.

Monday, June 6, 2011

How to record all Google Voice calls on OSX (not just incoming ones) using Google Voice and GMail "Call Phone" features.


Click image to zoom in.

Here's a diagram of how I configure my Mac to locally record voice calls made in Google Talk (inbound and outbound).

I used Soundflower, LineIn and Audacity to record the comings and goings of the Google Talk Plugin.

Be sure to use headphones as this configuration has the potential to cause feedback if you don't.

To record a call, start by opening a new recording in Audacity, and then hit the record button.
Audio from Google Talk Plugin should then start flowing thru to the system speaker output (eg. headphones).

Initiate a call in GMail by selecting the "Call Phone" entry in the Google Talk widget, and the Dialer mole appears at the bottom right of the GMail window.


If you've started a recording in Audacity -- once you enter a number and press "Call", sound should come out the speakers.

If you don't know how to use Audacity -- go read it's documentation -- it's an audio editing program.  When you're done recording -- remember to save it.

Notes:

There's a bit of delayed self-echo on the local headphones due to the echo cancellation coupled with a small (25ms?) delay incurred by using the "software play-thru" during recording in audacity, but it's reasonable, and doesn't affect call quality.

When not using Audacity to record calls, I usually either change my google talk plugin mic/speaker settings, or run a second copy of LineIn to bounce from SoundFlower(2ch) to my Internal Speakers.


[4] Google Talk Plugin -- http://www.google.com/chat/video

Enjoy.

#RSFtalks with Edward Snowden

What an intelligent, thoughtful individual. I find it difficult to forgive 44 for failing to pardon this patriot and instead pursuing him ...

Other Popular Posts: