URL and Link repository

Tuesday, June 28, 2016

JSON array to PHP with FOR LOOP

Here's an example of the input JSON array:

"tags":[{"id":1306,"accountID":4936,"name":"BURTON","group":"Rep","type":0,
"dateCreated":"2015-07-09 19:38:46","dateModified":"2016-04-15 15:02:00",
"isDeleted":false,
"isActive":true,"numOrders":0,"abort":false,
"currentClass":"Tag","_jsonSkipsReadOnly":false}],

Here is the PHP that will pull out the first 3 records of the tags JSON array. I realize that it would be better to create a PHP array for tags instead

foreach ($tagsarray as $tags) {
            for ($i=1; $i<4; $i++) {
             ${'tagid'.$i} = $tags->id;
             ${'tagname'.$i} = $tags->name;
               ${'taggroup'.$i} = $tags->group;
            }
           //echo "tagname1: ".$tagname1."tagname2: ".$tagname2."tagname3: ".$tagname3."
"; // do nothing after capturing first 3 tags records }
foreach ($tagsarray as $tags) {
            $tagid[] = $tags->id;
            $tagname[] = $tags->name;
            $taggroup[] = $tags->group;
          }
$tagid1 = $tagid[0]; $tagname1 = $tagname[0]; $taggroup1 = $taggroup[0];
$tagid2 = $tagid[1]; $tagname2 = $tagname[1]; $taggroup2 = $taggroup[1];
$tagid3 = $tagid[2]; $tagname3 = $tagname[2]; $taggroup3 = $taggroup[2]; 

Monday, June 27, 2016

Kindle Fire HD 6 Wall Paper Change

I downloaded a photo from an e-mail and somehow it ended up as wallpaper. I found the pesky file in /data/system/user/0/wallpaper and deleted it.

Monday, April 11, 2016

Sunday, April 10, 2016

Almost Bricked Kindle Fire HD 6 4th Generation

Now that I have successfully corrupted my tablet, e.g. I can't uninstall some apps and I cannot seem to open Google Play.
The only thing that is different is that I now have Linux running in chroot.
My solution is to start over.
Luckily I can still adb recovery boot into TWRP, because I am still on the 4.5.3 version of the software.
First, I download a newer Amazon OS on to the tablet. I found download links on XDA. In fact you can stop reading now and try to follow the XDA instructions.
Anyway here is what I did:
  • Downloaded the Amazon OS file to my PC and renamed it from .bin to .zip (this is done by disabling hide extensions in the file manager).
  • Connect Fire HD 6 to the PC and type "adb reboot recovery".
  • Copy the renamed .zip file to Downloads.
  • Choose install in TWRP and select the .zip file.
  • If all goes well, you will probably end up with the new OS and UI, but no recovery program as TWRP was overwritten.
  • Find and download the 5.2.0_stock_recovery_uboot.zip to your tablet.
  • Find, download and install Flashify. (Google Play version for reference)
  • Start Flashify and flash the stock recovery file.
  • An "adb reboot recovery" revealed that a recovery program is still not available.
  • I choose to skip loading a recovery and root the tablet via KingRoot. Be patient and try several times.
  • Once rooted, you can research your self on how to install a recovery program and Google Play.
  • I opted just to install Google Play.

    Look for my next post, which will likely be called Corrupted the Kindle Fire HD 6 4th Generation (AGAIN!). BTW I am doing all this because I essentially got the new 16 GB tablet for $40 off Amazon.

    Oops, I almost forgot that I need to turn off automatic updates. Here's a how-to on YouTube.

  • Saturday, April 9, 2016

    How I Finally Installed Kali Linux on a Kindle Fire HD 6 4th Generation

    I followed these steps but improvised when needed. Also at some point you will need to know that the default password is "changeme".
  • Linux Deploy
  • Install VNC
  • Kali documentation
  • Tech Worm

    The hard part is navigating around the tiny desktop with a mock mouse cursor. Swipe down from the top to use a keyboard.

  • Wednesday, April 6, 2016

    Part II - Kali Linux on Kinde Fire HD 6

    Okay, there is more to installing Kali Linux than what is listed in yesterday's post.
  • At first, the original Complete Linux Installer apk was not opening the Terminal.
  • I found a Kali Linux installer at Linux on Android.
  • Then I downloaded the Terminal from Google Play.
  • Now after opening the new Complete Linux Installer, the Launch button opened up the terminal.
  • After starting the VNCserver in the Terminal window, I start VNC Viewer from Google Play
  • The default password for the VNCserver is "kalilinux" and the address is "localhost::5900".
  • After connecting, I get a blank screen. Booo!
  • Stay tuned for a resolution or reply with one. Thanks.