URL and Link repository

Sunday, December 29, 2013

How Not to Brick a Samsung Galaxy Tab PT-3113 with a Kit Kat

This will only point out the obstacles that I encountered. Below are links that started my research and eventually successful install of the Cyanogenmod build 4.4 or Kit Kat.

First stop DroidCheats YouTube channel, which is an excellent resource in such matters. However, I followed his excellent step by step instructions but did not pay attention to the file versions that I was using, my first mistake.

This mistake resulted in further errors with the Android soft keyboard and thus the inability to type text into the tablet.

My second mistake involved tracking down the pop up dialog message, "Unfortunately Android AOSP keyboard has stopped." But, don't bother following any of the instructions that you may encounter, which was my last and final mistake.

Lesson learned: A successful install of Cyanogenmod build 4.4* starts with pairing up the right files.

So I started over again and followed the install steps that can be found at web sites like xda-developers and the previously sited DroidCheats YouTube channel.

Here are the files that I used and why.

  • cm-11-20131229-NIGHTLY-p1.zip : If I'm going to do this, might as well get Kit Kat.
  • pa-gapps-stock-4.4.2-20131215-signed.zip : After rebooting only with ROM installed, I discovered that the build version is 4.4.2, therefore I want the Google Apps install for that version.
  • That's it. Save yourself from panic and move slowly and purposefully.

    Wednesday, December 25, 2013

    Monday, December 16, 2013

    Augmented Reality Trends

    My augmented reality social networking app for Android is described on the blog: Augmented Reality Trends.

    Saturday, December 14, 2013

    Text Animation on Android App for Augmented Reality

    Two flavors of Widespread Augmented Reality (W.A.R.) or Warmixare
  • Android Jelly Bean+
  • Android Ice Cream Sandwich Tablets
  • Here is the XML layout.

    Here is the slide_in_left layout in the the /res/anim folder

    Here is the Java code

    public class SplashScreen extends Activity {
    private TextSwitcher ts1, ts2, ts3;
    final String wordsToShow[]={"idespread ","ugmented ","eality "};
    int wordCount=wordsToShow.length;
    public void onCreate(Bundle savedInstanceState) {
    Animation slide =
    Animation fade =
    final TextView w = (TextView) findViewById(R.id.w1);
    final TextView a = (TextView) findViewById(R.id.a1);
    final TextView r = (TextView) findViewById(R.id.r1);
    w.setAnimation(fade); a.setAnimation(fade); r.setAnimation(fade);
    ts1 = (TextSwitcher) findViewById(R.id.widespread2);
    ts2 = (TextSwitcher) findViewById(R.id.augmented2);
    ts3 = (TextSwitcher) findViewById(R.id.reality2);
    ts1.setFactory(new ViewFactory() {
    public View makeView() {
    TextView myText = new TextView(SplashScreen.this);
    myText.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
    return myText;
    ts2.setFactory(new ViewFactory() {
    public View makeView() {
    TextView myText2 = new TextView(SplashScreen.this);
    myText2.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
    return myText2;
    ts3.setFactory(new ViewFactory() {
    public View makeView() {
    TextView myText3 = new TextView(SplashScreen.this);
    myText3.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL);
    return myText3;

    Thursday, December 5, 2013

    Android 2,2 Fragments

    Since my app at Google Play targets Android 2.2 or higher, there a few things that need to be in place for fragments.

  • import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentActivity;
  • ActivityThatCallsFragment extends FragmentActivity
  • Use getSupportFragmentManager() instead of getFragmentManager()
  • Monday, December 2, 2013

    Android ArrayList, HashMap and Clickable ListView

    I am coding a delete screen for the Android W.A.R. app. Get it here at Google Play before I break it.

    Meanwhile, in order to list the geotags that can be deleted, I will need a list of geotags with "id" as the key.

    So first, I use an Async task to make the HTTP call to my server and select geotags by "id". I will not show that proprietary code here, but I can show the Async's onPostExecute method where the following occurs:

  • Receive a table with two columns: id and title
  • Populate a HashMap with the columns named: "id" and "title"
  • Assign the HashMap values to an ArrayList
  • Send the ArrayList to a clickable ListView that uses android.R.layout.simple_list_item_2
  • Convert the ArrayList row back to a HashMap to retrieve "Id".
  • There must be a more elegant way to do this, but you get what you pay for. I do this for fun and for free.

    Just the bare bones...
    protected void onPostExecute(String[][] result)
    final ArrayList> alist = new ArrayList>();
    int size = result.length;
    for (int i = 0; i < size; i++) {
      HashMap cols = new HashMap();
      cols.put("id", result[i][0]);
    // release result table
    result = null;
    //Identify the column names
    String[] from = { "id", "title" };
    //Send corresponding values to fields in android.R.layout.simple_list_item_2
    int[] to = { android.R.id.text1, android.R.id.text2 };
    ListView delview = (ListView) findViewById(R.id.list3);
    //Set up the adapter to hold the two column table
    SimpleAdapter adapter = new SimpleAdapter(getBaseContext(), alist,
          android.R.layout.simple_list_item_2, from, to);
    //The Click Listener on each row
    delview.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView parent, View view, int position1, long id) {
        Map mid = alist.get(position1);
        String sid = mid.get("id");
        Toast.makeText(getBaseContext(), "Clicked on tag Id: "+sid,

    Wednesday, November 6, 2013

    Malware Analysis

    I am compelled to permanently link to this Info Sec article on malware analysis.

    Saturday, October 26, 2013

    Starting Cryptolocker Thread

    Heard this on Leo Laporte, The Tech Guy, radio show. Leo Laporte provided the following link. http://www.computerworld.com/s/article/9243537/Cryptolocker_How_to_avoid_getting_infected_and_what_to_do_if_you_are_

    It's my business to know what to do when customers arrive with this problem.

    Friday, October 18, 2013

    Enhancing W.A.R. - Widespread Augmented Reality

    I have been busy enhancing my Android app on Google Play that uses the camera as a view finder to locate your friends at places that interest them, a.k.a. points of interest.

    There are actually two apps: 1. Ice Cream Sandwich and lower; 2. Jelly Bean and up. This was necessary because version 1 was crashing on the Samsung Galaxy 3.

    Below are typical screen shots of geotags in Los Angeles.

    Note that this Android app also creates the geotags, so points of interest are relevant to your clique or set of friends. You can also create geotags remotely with the companion website at SpiderOnFire. Your W.A.R. handles are anonymous and all content can be deleted at your discretion.

    Wednesday, September 25, 2013

    Implementing the Android Dialog Fragment

    This is how my code works for a Yes|No fragment dialog box when clicking an item in the ListView activity. Download the full source code here. GitHub repository here.

    Sunday, September 8, 2013

    Android Fragment Class Coded Directly on Samsung Galaxy Tab 7 inch

    Using AIDE and Droid Edit to create extra class files in the AppProjects directory, I threw together a simple Dialog Fragment class like so:
    I. Filename: MyDiagFrag.java
    public class MyDiagFrag extends DialogFragment {
    Context myContext;
    public MyDiagFrag() {
    //myContext = getActivity();
    //empty constructor

    public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder aDb = new AlertDialog.Builder(getActivity());
    aDb.setMessage("Sure about this?");
    aDb.setPositiveButton("Yes", null);
    aDb.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
    public void onClick(DialogInterface d, int which) {
    return aDb.create();
    II. Filename: DataActivity.java
    public class DataActivity extends Activity
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState)
    ActionBar actbar = getActionBar();
    // Declare Screen output
    // Bunch of code omitted for this example...
    lv = (ListView)findViewById(R.id.list);
    lv.setOnItemClickListener(new OnItemClickListener() {
    public void onItemClick(AdapterView parent, View view, int position1, long id)
    {new MyDiagFrag().show(getFragmentManager(), "MyDiag");}});
    // More processing omitted for this example....

    Thursday, August 29, 2013

    Final, Adventures in Coding Directly on a Samsung Galaxy Tablet 2.0 - 7 Inch

    Here are my final tips for using AIDE to code Android apps directly on a Samsung tablet.
  • Use a File Manager to copy folders among projects.
  • Remember that the software may not always track your changes in real time, so use AIDE's action bar menu | More | Refresh Build.
  • Also, you may need to exit and close files occasionally to synchronize all your changes. It seems that the built in code hints occasionally conflict and override manual edits.
  • Despite closing this thread, I still intend to use AIDE for my Cash Tracking app with SQLite and to code fragments that integrate my thirteen stock and options trading apps at Google Play
  • Cont'd, Adventures in Coding Directly on a Samsung Galaxy Tablet 2.0 - 7 Inch

    I must report that I have had to reinstall AIDE three times due to unexplained crashes, but I do not mind as I have had good practice coding on the soft keyboard. Another caveat, this app is no Eclipse where you can easily configure the build path and import .jar libraries. In conclusion of this thread, coding Android apps directly on the Samsung Galaxy Tablet 7 inch, I have been able to write simple constructs with fragments, compile source and run  .dex modules from the palm of my hand. This is all I ever expected.

    Saturday, August 24, 2013

    Cont'd, Adventures in Coding Directly on a Samsung Galaxy Tablet 2.0 - 7 Inch

    Back to plugging away at this simple cash tracking app with SQLite, I discovered that AIDE has an option called Refresh Code Anaysis under the action bar menu icon and More. However, I must warn you that serious run time abends have frozen my tablet and forced a hard reboot (power and up volume keys). In future posts I hope to share an elegant solution that will dump the log cat and force close the app. BTW, I still refuse to buy a keyboard as it negates the purpose of a tablet.

    Monday, August 19, 2013

    ...Continued, Adventures in Coding Directly on a Samsung Galaxy Tab 2.0 7 Inch

    Continued from the August 16, 2013 post.

    After a half hour of puzzlement trying to debug a new XML layout, I realized that when creating a new file in the res/ folder, you must include the file type e.g., main_row.xml not just main_row.

    Friday, August 16, 2013

    ...Continued, Adventures in Coding Directly on a Samsung Galaxy Tab 2.0 7 Inch

    Continued from the August 13, 2013 post.

    Welcome back. The previous posts on this subject failed to include a Teminal Emulator app and SQLite3.

    Developing on a rooted phone, I have found these tools to be essential as my programs send and receive data to SQLite. The root process is not included here.

    From a terminal window command line, I enter the following lines to view SQLite data.

  • su
  • cd data/data/"insert your app package name"/databases
  • ls
  • sqlite3 "insert your database name"
  • .tables
  • While on an SQLite> command line, you can enter the usual "Select" and so forth SQL commands.

    Specific design and coding challenges are forthcoming.

    Tuesday, August 13, 2013

    ...Continued, Adventures in Coding Directly on a Samsung Galaxy Tab 2.0 7 Inch

    Continued from the August 2, 2013 post.

    After creating a project folder and using the "Create a new App Project here..." option in AIDE, I found that the built in editor is not as robust as using a third party code editor like DroidEdit. You will see what I mean when trying to insert a new line with the [Return] key. To be continued...

    Tuesday, August 6, 2013

    SEO Friendly Coding...

    Generating text inside the JavaScript:
    <'script type="text/javascript"'>
    function onMouseOver1() {
    var infoText = "info about button";
    document.getElementById('infoblock').innerHTML = infoText;
    <'img src ="some.jpg" onmouseover="onMouseOver1()" />
    <'div id="infoblock"><'/div>
    Reportedly some search engines may skip over the infoText inside the JavaScript. Instead, try placing informational text inside the HTML code like this:
    <'style type="text/css">
    #infoblock1 {
    <'script type="text/javascript"'>
    function onMouseOver1() {
    document.getElementById('infoblock').innerHTML =
    } <'/script>
    <'img src ="some.jpg" onmouseover="onMouseOver1()" />
    <'div id="infoblock"><'/div>
    <'div id="infoblock1">
    info about button

    Friday, August 2, 2013

    Adventures in Coding on the Samsung Galaxy Tab 2.0 7 inch

    1. Get the AIDE app from Google Play 2. Update your Dropbox. 3. Create an app directory using a file manager. 4. Get yourself a hacker's keyboard here. 5. Fire up AIDE and specify default directory.. .To be continued ...

    Wednesday, July 3, 2013

    Ahaaa ! Gotcha with CAPTCHA

    'CAPTCHA (an acronym of “Completely Automated Public Turing test to tell Computers and Humans Apart”)' - Security Week

    Thursday, June 20, 2013

    PHP/MySQL ending in JSON that Needs Optimization

    I am testing this code versus "Insert ... where Select ..." and testing MySQL return codes.

    function sql_safe($s) { if (get_magic_quotes_gpc()) $s = stripslashes($s); return mysql_real_escape_string($s); }

    $flag = "0"; // set flag to good at the start of program
    // The user is coming in as the integer id
    $user = trim(sql_safe($_POST["User"]));

    if ($user == '') $user = 0;
    // The member is coming as the text input
    $member = trim(sql_safe($_POST["Member"]));
    // could do a sub select query, but broke out for clarity.

    if ($member != '') {
    $sel=mysql_query("SELECT `idmembers` from `a5035822_mya55`.`members` where `handle` = '$member';") or trigger_error ('Error on select handle'.mysql_error(),E_USER_ERROR);

    $r1 = mysql_fetch_array($sel);
    //echo "r1 is".$r1['idmembers'];
    // make sure not trying to delete the owner userid.
    // will perform check on the device first with next version of app

    if (($r1['idmembers'] != '') && ($r1['idmembers'] != $user)) {
    // No composite key on SETS table so no checking for MySQL ret code 1062.
    // Separate check to see if row exists first, then delete if it does.
    $memberid = $r1['idmembers'];
    $checkSet = MySQL_query("select `member` from sets where owner = $user and member = $memberid;") or trigger_error('Failed on check'. mysql_error(), E_USER_ERROR);
    $r2 = MySQL_fetch_array($checkSet);

    if ($r2['member'] != '') { $del = mysql_query("delete from sets where owner = $user and member = $memberid;") or trigger_error('Failed on delete'. mysql_error(), E_USER_ERROR);

    if (mysql_error() == 0) {
    $flag = 0;

    } else {
    $flag = 3; // no row to delete

    } else { $flag = 3; }

    } else {
    $flag = 3;
    $memberid = $user;

    } else { $flag = 5; };
    $data = array (
    'Flag' => $flag,


    Monday, June 10, 2013

    NSA, PRISM and Tor

  • NSA = National Security Agency
  • PRISM = Planning Tool for Resource Integration, Synchronization, and Management
  • Tor = The Onion Router.
  • PRISM vs Tor

    Sunday, May 26, 2013

    Technical Sales

    I recently transitioned from strictly programming to retail sales of computers and peripherals. This requires a significant learning curve as my minimalist existence precludes me from possessing the latest technology with all the bells and whistles. For example, I do not get text messages nor do I own a smart phone. Oddly enough, however, folks trust my ability to help them, because I look Asian, where glasses, assess their needs and logically explain what I would do given their requirements.

    Saturday, May 11, 2013


    PayPal Says It's Time to Ditch Passwords and PINs http://shar.es/lSu1g via @CIOonline.

    So let me get this straight...Hmmm...Let us no longer trust the individual to come up with secure passwords, but rather standardize account authentication through some oversight organization. Does this sound like a good idea or just another liberal ploy to remove individual responsibility in favor of a larger and much smarter collective that knows what is best.

    Thank God for these smart people to help me with my life, because I am too stupid to realize the importance of passwords.

    Saturday, May 4, 2013

    Windows 8 shortcuts

    The future is touch interface, but keyboards are still essential as evidenced by Windows 8 shortcuts. See 10 useful keys by LifeHacker.

    Tuesday, April 23, 2013

    Friday, April 12, 2013


    This video of ARGUS (Advanced Remote Ground Unattended Sensor?) describes a high resolution camera floating in the air. Also, it is a good reminder of the megapixel myth

    Monday, April 8, 2013

    USB Forensics Kit

    Hacking is illegal unless you play with your own computer using COFFEE or Backtrack. Read article at TechRadar.

    Friday, April 5, 2013

    Thursday, April 4, 2013

    Sunday, March 24, 2013

    802.11ac Packet Capture

    Live web show April Wednesday 3rd at 1200 EST titled: "802.11ac Packet Capture and RF Behavior for Client Device Analysis" with Joe Bardwell. Learn more and subscribe to the Concise Courses Hacker Hotshots Web Show Community.

    Concise Courses host a weekly web show called "Hacker Hotshots" with speakers from security conferences like DefCon, Black Hat and Hacker Halted. These guys interview the best hackers on the planet! The live video will also be recorded in case you miss it - same link as above. Enjoy!

    Sunday, March 3, 2013

    Thursday, February 28, 2013

    Wednesday, February 27, 2013

    PDF Zero Day Exploits with 666

    "The attackers left a small clue in the code, in the form of the number 666 (0x29A hex) before one of the decryption subroutines: ..." -
  • SecureList
  • MiniDuke
  • Thursday, February 14, 2013

    Wednesday, February 13, 2013

    SpiderOnFire and Android Augmented Reality

    Web Binoculars for The Spider on Fire

    I will likely limit the number of free uploads to 5 geotags. An unlimited version of the Augmented Reality browser will cost .99 cents to cover server and programming costs.

    Use the current desktop interface at SpiderOnFire and download the current free unlimited Android browser at Google Play while you can.

    Come get you some.

    Friday, February 8, 2013

    Multiple-pages-in-one Method of Mobile Web Design

    I mention this here as it is relevant to the previous post that describes mimicking pop up windows with CSS. One can create mobile pages by the same method to load one HTML file that contains multiple DIVs one for each page. jQuery mobile makes this possible. Here is a sample.
    <div data-role='page'>
    <header data-role="header"><h1>Main Page</h1></header>
    <section data-role='content'>
    <h3>Main Page</h3>
    <a href="#secondPage">
    Some text for link
    <footer data-role='footer'><h4>© 2013</h4></footer>
    <div data-role='page' id='secondPage'>
    <header data-role="header"><h1>Second Page</h1></header>
    <section data-role='content'>
    Content for second page
    <footer data-role='footer'><h4>© 2013</h4></footer>

    Wednesday, February 6, 2013

    Tuesday, February 5, 2013

    CSS and Javascript for Pop-Up Window effect

    I used this code to effect pop up windows at #SpiderOnFire. The problem is that all the content is loaded at once, but then only displayed upon surfer clicking. function colorin(content) { document.getElementById(content).style.background='#9999ff'; }
    function colorout(content, color) { document.getElementById(content).style.background=color; }
    function showinfo(content) { document.getElementById(content).style.display='block'; }
    function hideinfo(content) { document.getElementById(content).style.display='none';
    style> #infopan { display:none; // NOT DISPLAYING upon PAGE LOAD overflow:auto; z-index: 7; position: absolute; top:50px; left:50px; height: 235px; width: 525px; border: 6px solid white; box-shadow: 5px 5px 10px #000000; background-color:#000000; } /style "
    " a href="javascript:;" onclick="showinfo('infopan');" onmouseout="colorout('infopan', '#99ccff'); " // onmouseover="colorin('infopan');"> button> Show Info Panel /button /a"
    " div id='infopan' Blah...blah...blah /div "

    Saturday, February 2, 2013

    Old School Ripping CD's that I Own

    This FreeRip is pretty straight forward.

    If you want a full image of the CD I have used MagicISO successfully in the past.

    This last one is a bonus. Tired of putting the game CD in the drive in order to play? Then you want to rip a game CD and then play it on your PC with a Virtual Drive

    Friday, February 1, 2013

    Record Android Screen to PC for Presentation

    This instructional assumes that you are a developer who already has the Android SDK installed, has a c:/Java folder with JDK, JRE6 and JRE7, has an Android phone set to debug mode and has an Android to PC USB connector. If you identify with the above characteristics, then all you have to do is the following.
    1. Download great program called Droid@Screen
    2. Save the "droidAtScreen-1.0.1.jar" to a folder like "../Downloads"
    3. Set up your environment variables by clicking [Start], type "Environment" and then click [Edit system environment variables]
    4. Add entries for ANDROID_HOME and ANDROID_SDK_HOME with the paths set to c:/android/platform-tools/. Or set it to wherever the ADB (Android Debug Bridge) program is located.
    5. Open a command line window by clicking [Start] and typing "command"
    6. Navigate to the folder containing droidAtScreen-1.0.1.jar and type: "java -jar droidAtScreen-1.0.1.jar.
    7. Start your Android device with the USB cord plugged in to the PC.
    8. Enjoy the fantastic tool created by Jens Riboe

    Monday, January 21, 2013

    Android, Eclipse, Memory Analyzer Tool (MAT)

    Been a little while since I last needed to analyze memory leaks on an Android application written in Java and compiled through Eclipse.

    Things have changed in both Eclipse and MAT, so I am listing my current steps here for all to enjoy.

    1. Fire up Eclipse Indigo with Java 6 +
    2. In Eclipse, Select [Help] | [Install new Software]
    3. Add http://download.eclipse.org/mat/1.2/update-site/.
    4. Select All []IDE and []Stand Alone
    5. In Eclipse top menu bar, select [Window] | [Preferences] | [Android] | [DDMS]
    a. HPROF Action: "open in Eclipse"
    6. In Eclipse top menu bar, select [Window] | [Preferences] | [Plug-in Development] | [Target Platform]
    7. Highlight Active Platform, then press [Edit].
    8. Click [Arguments] tab: Type -XX:+HeapDumpOnOutOfMemoryError in VM Arguments,[Finish]
    9. A heap dump is written on the first Out Of Memory Error.
    10. Run project with emulator as the process must be on the local machine.
    11. In Eclipse top menu bar, select [Window] | [Open Perspective] | [Other] | [Memory Analysis]
    12. From inside the Memory Analysis perspective select [File] | [Acquire Heap Dump]
    13. [Configure] | Select HPROF -jmap dump | -jdkhome = C:\Java\jdk1.7.0
    14. [Next] | Select HPROF -jmap dump | [Finish]
    15. Follow remaining prompts in Eclipse.

    Compare and augment the previous steps with BonitaSoft.org

    Also, try to perform these steps on a machine greater than an Acer Aspire netbook with 1GB of RAM. Otherwise, the process could take days.

    Wednesday, January 16, 2013

    Android - Declaring Static Variables

    Because the Eclipse debugger occassionally suggests declaring a variable static to fix a Lint error, I decided to post this link on Java Memory Leaks.

    Monday, January 14, 2013

    SpiderOnFire is Catching

    SpiderOnFire a.k.a. W.A.R. for Widespread Augmented Reality.
    Never mind typing in text searches and scrolling through results, then clicking the desired result or what you think is the desired result only to repeat the process all over again many times.
    See how cumbersome that last sentence was?
    How about just pointing your camera in the direction that you want to go and seeing what is beyond your line of sight? That's it. That's a spider on fire.

  • Spideronfire, the website
  • W.A.R., the Android app
  • Wednesday, January 2, 2013

    W.A.R. - Widespread Augmented Reality

    Imagine leaving your images, comments and content hovering at or above real physical locations. Imagine others nearby interacting with your marks through their cameras. In fact, imagine scanning the horizon or your surroundings with your own mobile camera to reveal the floating marks left by others. Well stop imagining and do it with this app. The possibilities are endless with the sky as the limit. The Android app is in beta at the website SpiderOnFire. One can use the website to place markers at locations without having to be there. The Android app's camera view reveals content beyond your line of site. After testing and adding more features, the app will be published to Google Play with mad props out to MixARE for providing the augmented reality engine.