android perl boilerplate

July 6th, 2013


#!/data/data/com.android.perl/files/perl/perl

use strict;
use warnings;

use Android;
use Data::Dumper;

my $droid = Android->new();

#print Dumper $droid->wifiGetScanResults();
#print Dumper $droid->readPhoneState();
#print Dumper $droid->getDeviceId();

for my $f qw ( checkNetworkRoaming
getCellLocation
getDeviceId
getDeviceSoftwareVersion
getLine1Number
getNeighboringCellInfo
getNetworkOperator
getNetworkOperatorName
getNetworkType
getPhoneType
getSimCountryIso
getSimOperator
getSimOperatorName
getSimSerialNumber
getSimState
getSubscriberId
getVoiceMailAlphaTag
getVoiceMailNumber
prefGetAll
getScreenTimeout
) {
print "$f\n";
print Dumper $droid->$f;
}

cut/split mpeg2 files without re-encoding with ffmpeg

June 9th, 2013
ffmpeg.exe -i input.mpeg -c copy -ss 00:02 -to 24:32 output.vob

-ss time_off set the start time offset
-t duration record or transcode “duration” seconds of audio/video
-to time_stop record or transcode stop time

.vob extension is important because it forces stream container to MPEG v2 for output file.

Changing Android’s disk encryption password

June 2nd, 2013
$ su -c vdc cryptfs changepw newpass
su -c vdc cryptfs changepw newpass
200 0 0

What are these ro.secure and ro.adb.secure properties in Android?

June 2nd, 2013

ro.secure=1 run adbd as unprivileged user
ro.adb.secure=1 adbd needs authentication

Can wordpress search inside post?

May 28th, 2013

This is a test post. Android.

How to prevent network interface renaming with udev and persistent-net.rules

April 18th, 2013
MATCHADDR=xx:xx:xx:xx:xx:xx INTERFACE=eth0 /lib/udev/write_net_rules

How to set compiler flags to dpkg-buildpackage

April 16th, 2013
export DEB_CFLAGS_SET=-DDEBUG=1
dpkg-buildflags --get CFLAGS
dpkg-buildpackage -uc -us

SUPPORTED FLAGS
CFLAGS Options for the C compiler. The default value set by the vendor includes -g and the default optimization level (-O2 usually, or -O0 if the
DEB_BUILD_OPTIONS environment variable defines noopt).

CPPFLAGS
Options for the C preprocessor. Default value: empty.

CXXFLAGS
Options for the C++ compiler. Same as CFLAGS.

FFLAGS Options for the Fortran compiler. Same as CFLAGS.

LDFLAGS
Options passed to the compiler when linking executables or shared objects (if the linker is called directly, then -Wl and , have to be
stripped from these options). Default value: empty.

ip network profile switcher for windows

April 1st, 2013

Whenever mobile user moves to different network, has to change particular IP address, gateway address, subnet mask, proxy server and default printer, etc., to particular network environment. In order to do it, he has to remember TCP/IP settings information of every network. Also, he has to reboot the computer to apply it to the system and to access the Internet.

Don’t waste your time reconfiguring computer network settings every time you change your location. Free IP Switcher is a perfect solution for you.

http://www.eusing.com/ipswitch/free_ip_switcher.htm

Access Denied Error Messages When Accessing Hidden Shares in Windows 7

March 19th, 2013

1. Start Registry Editor (Regedit.exe). If you get the UAC prompt, acknowledge it.

2. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

3. On the Edit menu, select New and then click DWORD (32-bit) Value.

4. Type LocalAccountTokenFilterPolicy to name the new entry, and then press Enter.

5. Right-click LocalAccountTokenFilterPolicy, and then click Modify.

6. In the Value data box, type 1, and then click OK.

7. Exit Registry Editor. There is no need to reboot the machine.

Disable Google Contacts Sync & Force Store Contacts Locally on Android

March 19th, 2013

Delete GoogleContactsSyncAdapter.apk file in /system/app directory.