Monday, August 19, 2013

Create Partition on your SD Card

This tutorial will help you create partition on your SD card using MiniTool Partition Wizard Home Edition














Simplest way is to use "MiniTool Partition Wizard Home Edition"

sd card partition in androidThis tool is compatible with Windows 2000/XP/Vista & Windows 7

Requirements: USB SD Card reader.

Pull SD card from phone, insert into USB SD Card reader. Windows should report new drive and content of the drive should be visible.

step 1: delete old partitions on SD card

Note: this partition manager QUEUES the operations. So nothing is deleted and changed UNTIL you click "APPLY" and then confirm by clicking "OK".

WARNING!
  • Make sure you are deleting partition on SD card! (not your hard drive for example)
  • This step deletes everything on SD card, so backup files first!
  • Dont be afraid, just read everything and think twice before selecting correct drive.
  • Do you see three gray icons on the bottom? Under each of them the capacity of each drive is listed, and SD CARD has slightly different icon.
  • Hard drives on the screenshot have 465.8GB and 74.5GB, and on the bottom, the SD card, with 3.8GB capacity.


step 2: create FAT or FAT32 partition
  • select "Create As": PRIMARY
  • Select "File System:" FAT when you have 2GB or smaller card.
  • Select "File System:" FAT32 when you have 4GB or greater card.
create new partition
step 3: create ext2 or ext3 or swap partition*
  • select "Create As": PRIMARY
  • Select "File System:" ext2 - for App2SD
OR
  • Select "File System:" swap to make swap :)
If you want to create both: do not assign all the space for the first one :) this way you will have space for creating second one.

ext2 partition

step 4: finish
  • finally, click "apply" button on top left corner.
  • partitions will be created and card will be formatted.



Friday, August 16, 2013

How to Root your Asus Memo HD 7, TF300T, M173x



I received a Asus Memo HD 7 today. I did this from a Windows 7 Machine, so I will be writing from that perspective. I couldn't find an exact set of instructions from start to finish for this, so I wanted to whip one up.

Step 1: Enable USB Debugging on your ASUS HD 7
  • Navigate to Settings > About Tablet
  • Then tap 7 times on the Build Number section.
    • You will see it say "You are now a developer!”
  • Now navigate to Settings > Developer Options > Debugging > USB Debugging
  • Press to enable
Step 2: Attach Tablet to PC
  • Use the included USB cable to hook up the tablet to your PC
  • Let windows find the drivers for it. It may take a few minutes, but it should work fine.
Step 3: Rooting the Device
  • Download MotoChopper
  • Extract zip file
  • Run the run.bat file that is included
  • When it hangs, go to your tablet and Disagree to let Google check your installed apps.
  • MotoChopper should continue
  • It will then ask you to press any key to reboot and root
Step 4: Enjoy your rooted device
I will be using this tablet for a single function in an industrial setting. I needed to root this only to install all the crapware. I did not need to install a custom ROM.

If you want to install CyanogenMod, go here to get the download, then follow the instructions on the Wiki.

If you need a good Micro-SD card for the device, I highly recommend the SanDisk Extreme series. Also, if you are looking for a good case, start here.

References:
http://forum.xda-developers.com/showpost.php?p=40129120&postcount=1

Thursday, August 15, 2013

Ultimate How To: Raspberry Pi Web Kiosk - Simple, Complete, and Clear Instructions



Raspberry Pi clear caseThis project came about as a need to have a web portal for our HR software installed in our break rooms. I needed a low budget, easy to deploy solution that anyone can use. The goals for the project were to have a web browser that allowed user access to only a few websites, a locked down browser, and an inability to access the OS. There are a ton of mini-PC's available at a wide array of prices. As a Windows admin, I was initially considering Windows 7 Pro in an effort to minimize OS creep across my systems. After examining the available mini-computers, I discovered that by the time I had a viable Windows 7 machine, I was looking at $350 or more minimum for the completed system hardware without the Windows license. The Android machines all had touch screen interfaces or seemed like they may be more of a hassle to work with than I'd like. I kept coming back to the Raspberry Pi. I ended up purchasing the following:

Hardware for the project:

Software for the Project:
The CanaKit comes with a pre-loaded SD card that includes the same version of Debian Wheezy that I used for this project.  However, in an effort to get a little more speed out of the system, I used the 95MB/s Sandisk extreme listed above. It seemed to help, but I did not bench mark it beyond observation. 

Anyway, lets get down to building a Raspberry Pi Web Kiosk.

Step 0: Get all of the hardware.
Step 1: Get all of the software.
Step 2: Assemble all your pieces. No need to insert SD card or Power cord at this point.
Step 3: Unzip the Raspbian package
Step 4: Use Win Disk Imager to write the image to the SD Card
Step 5: Insert SD card into Raspberry Pi
Step 6: Plug in your Raspberry Pi
Step 7: You will use the config tool screen to do the following:

  • Expand File System
  • Change Password (to something you can remember)
  • Change Hostname (to something you can remember)
  • Enable Boot to Desktop
  • Define Keyboard Layout (select Type, Language, Layout, No to Alt-G, No to Compose, No to Ctrl-Alt-Backspace)
  • Advanced > Enable SSH (if you want to be able to remote into it)
  • Advanced > Overclock to Medium
    • Notes on overclocking: High and turbo both corrupted SD cards. The Turbo issue is documented.
  • Finish to reboot
Step 8: Changing the display configuration:

Once the desktop boots, launch the terminal window
If your display loaded properly, skip this step. Otherwise, we are going to customize the monitor settings. Do that by entering the following command.

sudo nano /boot/config.txt

The display I am using for this project is 24 inches. It loaded with black bars around the edges. For me I had to uncomment the overscan section and change the values to -50.  I also uncommented hdmi_group=1 and changed hdmi_mode to equal 31. This sets it to 1080p. As a note, I turned overscan on, but it didn't change anything. 

Step 9: Installing the programs we need:

You have to love how easy it is to install program son Linux.  These are the commands to upgrade apt-get to the current version as well as download and install Chromium, x11-server-utils, and unclutter.

sudo apt-get update
sudo apt-get install chromium x11-xserver-utils unclutter jwhois dnsutils

Step 10: Setting up the Web Kiosk portion
The goal here is to get the Raspberry Pi to boot into Chromium which is displaying your desired web page. You'll need to edit the Auto start script to get this to work. To do this, enter the following command:

sudo nano /etc/xdg/lxsession/LXDE/autostart

Add a # before @xscreensaver to comment out (turn off) the screen saver and a # in front of the @lxpanel line.
add the following lines:
@xset s off
@xset -dpms
@xset s noblank
@chromium --kiosk http://yoursitehere
@xmodmap -e "pointer = 1 10 9 8 7 6 5 4 3 2"

Step 11: Disable keyboard shortcuts
Next we need to edit  ~/.config/openbox/lxde-rc.xml
You can either use nano or navigate to it through the file manager and use Leafpad. The editing is extensive, so I preferred Leafpad.

Don't forget to back this file up in case you screw it up.

Find the sections <Desktop>
Change <number> from 2 to 1
Remove the line that is <name>2</name>

Navigate to the Keybindings section.

Here we will be removing all the keyboard shortcuts.  You can also download my pre-configured file.
I changed all keybindings, except Alt-F4, to not work. 
I simply copy and pasted over the existing <action> content in all keybindings using this line:

<action name="Execute"><command>false</command></action> 

I also added Chromium shortcuts so I could null them out. There are about 30-40 of them. See the pre-configured file for the full list. 

I left Alt-F4 active so that if you made a typo it would be easy to exit Chromium and edit the file.

Step 12: Disabling Right Click in Raspbian / Debian
The xmodmap command in to the autostart file disables right click by remapping the middle and right buttons to non-existent keys (assuming you have a 3 button mouse)

Even so, by editing /etc/xdg/openbox/menu.xml and clearing out all the items between the <menu> tags, you can eliminate the desktop context right click menu if you so desire.  I could find no way, aside from xmodmap, to disable right click on desktop icons or in Chromium. Ultimately, I could get away with disable the right click key. If you know how to suppress the right click menus or selectively define them, please let me know with a comment below.

You also already disable the menu bar by commenting out the lxpanel in the auto start script. If you need that, go remove the # sign from in front of lxpanel line in the auto start script.

I tried wiping out the bindings in the lxde-rc.xml file to eliminate right click, but it didn't make a difference. The xmodmap remapping was the only way to completely disable right click altogether.

If you have a solution, please comment below.

Step 13: Disabling all web pages but a few select ones
I am going to discuss my attempt to use iptables to do this in the next paragraph so that someone out there can tell me what I was doing wrong.  However, I ended up downloading and installing Whitelist for Chrome. Then selecting the checkbox to deny all sites except approved ones. Then I added the few sites I needed.

Now, the reason you had dnsutils and jwhois in your apt-get command earlier is so that we could figure out which ip address you needed to add to the iptables. I couldn't this to work. I also couldn't get whois to work as it kept telling me "command not found." That is where jwhois comes in.

I had 3 static web pages that I wanted to approve. I used the following iptable commands:
 sudo iptables -A INPUT -i eth0 -s <destination-ip-address1>/32 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -i eth0 -s <destination-ip-address2>/32 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A INPUT -i eth0 -s <destination-ip-address3>/32 -m state --state RELATED,ESTABLISHED -j ACCEPT
Sudo iptables -A INPUT -p all --destination xyz.com -m state --state RELATED,ESTABLISHED -i eth0 -j ACCEPT
sudo iptables -A INPUT -p all --destination 0/0 -m state --state NEW -i eth0 -j DROP

iptables-save > /etc/iptables.conf
sudo nano /etc/rc.local then add the line iptables-restore < /etc/iptables.cong

Step 14: Install Flash player for Chromium (if you need it)
There are lots of forums on how to install flash for Chromium.  All the advice there didn't help me. The forums basically said you should be able to type sudo apt-get install flashplugin-nonfree  and if you got an error you needed to update your install location repositories.

I just googled adobe flash, clicked on the get flash player now button, downloaded the tarball, extracted it, and moved libflashplayer.so to /usr/lib/chromium/plugins. Didn't see that advice in any forums, so I wanted to share it with you.

Other notes:
  1. To get back to the Raspi configuration menu just type: sudo raspi-config
  2. If you use Vim to edit files, you can overwrite a read-only file by using this command: :w !sudo tee %
  3. Turbo mode will corrupt our SD card (I had it happen in High mode also)
  4. To backup your image, use Win32DiskImg and click read instead of write.
  5. How to create a desktop icon that will launch google in chromium:
    1. I couldn't find this exact instruction anywhere else either, so I hope it helps:
      1. Fire up your command line and type: sudo nano /home/pi/Desktop/google.desktop
      2. In the file, type the following:
                                 [Desktop Entry]
                                 Type=Application
                                 Name=Google Shortcut
                                 Comment=Launches Google in Chromium
                                 Icon=location of a google icon you saved somewhere
                                 Exec=/usr/bin/chromium http://www.google.com
                         3. Press ctrl+x to begin exit, select Y to Save.
                         4. File will appear on your desktop.
                        












    Friday, August 9, 2013

    Changing Flashboot in Your Cherry Mobile Flare S100 (ICS Only)

    Are you tired of always seeing the default splash screen of your android phone? In Cherry Mobile Flare, if you are running ICS, you could be able to change its default fastboot/splash screen by using AIO Flasher.














    Requirements:

    a. Your phone must be rooted
    b. You must have the correct drivers for the CM Flare.

    1. Download AIO_Flasher
    2. Extract the file.
    3. Open the program Android AIO Flasher.exe

    android all in one flasher
    4. Boot your phone into Fastboot Mode (shutdown your phone then hold Power Button + Volume Up and wait until screen becomes GREEN).
    5. Select Splash Image Maker tab.

    change flashboot using all in one flasher

    6. Browse the image with 480x800 resolution that you want as splashboot.
    7. Click convert.
    8. Tick the 'In Fastboot Mode?'.
    9. Click Flash the Spla$h.
    10. Enjoy your new Flashboot! :D