Skip to main content

Posts

Android: Disabling Battery full alert

I keep hearing in my dreams a sort of "ding" sound made by my phone (running Android 4.1). It's trying to tell me to disconnect the charger from the wall socket (to be greener), but unfortunately it's doing this in the middle of the night, and it's annoying. There is no risk to damage your phone if you keep it plugged in beyond this point anyway. Well, there seem to be apps that let you manage the notification sound (like Battery full notification ), but they seem overkill for what I want. Luckly, I found this thread in my searches: http://androidforums.com/samsung-galaxy-s2-international/331058-stopping-fully-charged-sound.html#post2819281 If you have a rooted phone, you can follow the instructions in the thread, or follow these steps in a terminal emulator on your phone: su cd /system/media/audio/ui mount -o remount,rw /system mv TW_Battery_caution.ogg TW_Battery_caution.ogg.bak mount -o remount,ro /system exit exit  It renames the notification s...

Android: Adding scp/sftp support to dropbear and mounting with sshfs

I have recently received an android smartphone, and one of the first things I did with it was to root it :). This allows power-usres to get the most out of their hardware. The next thing on my list was to set up a SSH server and to be able to transfer files between my Linux system and my phone (by the way, I'm running Android 4.1 and it seems USB mass storage support has been removed. MTP/PTP modes have either horrible transfer speed or are poorly supported in Ubuntu). With the above in mind, the plan was to: Enable tethering on the phone Run a SSH server to support issuing remote commands and file transfer (FTP might have been an alternative, but I'm a SSH adept). Browsing the market I found  SSHDroid which does all that it advertised. Problem is - the free version conflicts with my add-blocking apps and requests that they are disabled to run. For me, this is a big nuisance, so I kept looking. I found Dropbear SSH Server 2 , which is completely free, but doesn'...

Extracting the firmware for Edimax IC-7110W IP Camera

I got an Edimax IC-7110W IP camera a nd I liked their firmware, but I was curious what was happening behind the curtains , so I decided to take a look. Step 1: Get the firmware - I got the firmware update binary package from the ir site for version 1. 7 - other ve rsions are probably similar: http://www.edimax.com/en/support_detail.php?pd_id=415&pl1_id=8 Step 2: Prepare your environment - I am using Ubu ntu Linux 12.04 . You will need to do wnload and install the following softw are: a build env ironment (gcc, g++, make , tar, zlib1g-dev, tar, gzip) firmware -mod-kit: http://bitsum.com/firmware_mod_kit.htm subversion ( sudo apt-get install subversion ) Step 3: Install firmware-mod-kit and compile binwalk and unsquashfs: adrianp@frost: ~/temp$ mkdir - p edima x /1.7 edimax/fmk adrianp@frost: ~/temp$ cd edimax adrianp@frost: ~/temp/edimax$ svn checkout http://firmware-mod-kit.googlecode.com/svn/trunk/ fmk ... output omitted ... adrianp@frost: ~/temp/edimax$...

RTSP streaming over dual nat with RTSP Interleaved mode

I have an IP Camera that supports RTSP streaming (most IP cameras seem to support it - Axis, Edimax, etc). This allows you to view mpeg4 or h264 live streams either by using a proprietary ActiveX control (via their web interface) or via a RTSP client. If you are in the same LAN as the camera, you can easily connect to it by using VLC or even ffmpeg (to save or transcode the stream): vlc rtsp://192.168.1.10/ipcamera_h264.sdp ffmpeg -i rtsp://192.168.1.10/ipcamera_h264.sdp test.ts ffmpeg -i rtsp://192.168.1.10/ipcamera_h264.sdp -f mpegts | vlc - The problem is if you want to access that camera over the Internet. RTSP usually transports the data over UDP and negotiates the UDP ports over a control session on port 554 TCP. This gets difficult if you use NAT at either end or if you have firewalls you need to get through. Let's consider this typical scenario: The packets need to go through 2 NATs to travel between the source and destination. To make this happen, y...

Converting shapefiles (SHP) to a different projection

I've written a small perl script to handle converting the coordinates in shapefiles to a different coordinate set. You must specify the source EPSG projection and the destination EPSG projection, and the script will walk through the data and create a new shapefile with the coordinates transformed by using the new projection. The new files are saved next to the original files, with the projection number appended to the file names. Currently the script supports POINT data and LINESTRING data. All other geometries are ignored. In order to use this script you will need to have the following packages installed (example for ubuntu): shapelib, proj-bin, gdal-bin Sample usage: adrianp@frost:~/bin$ ./convertSHPProjection.pl epsg:4326 epsg:31700 ofm_fiber.shp Going to save data as ofm_fiber_31700.[shp/shx/dbf] Depending on your data size, this may take a while... Copying dbf file... Code: #!/usr/bin/perl use strict; use warnings; # Author: Adrian Popa # License:...

Using AnyData ADU-510A under Linux (Ubuntu 10.04)

Using AnyData ADU-510A CDMA modem under Linux is a bit of a challenge because the device will appear like a virtual CD-ROM instead of a modem. You will need to "switch" the device (meaning turning it from being a CD-ROM to a modem), and then connect through PPP to your provider's network. Here are detailed steps on how to accomplish this on Ubuntu 10.04, using the modem associated with Romtelecom Clicknet Mobile service. It should work the same for other providers. 1. Download Saki's3g - a script that automatically switches your device from a CD-ROM state to a modem. You can get the latest version from http://www.sakis3g.org/ (great work, Saki!) Even if the site says it doesn't support CDMA networks, it can still be used to switch our modem using the embedded usb_modeswitch. Download the full version for your architecture and gunzip it somewhere in your home directory (~/bin for example). Also, give execute permissions to the script: adrianp@stingray:~/b...