Saturday, May 25, 2013

How to EASILY Dump your Android's Rom!

Well, I guess that is relative. There is no one click method for this, however, this the easiest i've found.


1. Root your device (Froyo firmware guide here). this is quite simple for and Android. Search Google for: <Android Version> root. Roots can be device specific, so check that too. <Phone name> <Android Version> root ? Look at that link for how to find the version. Most times it will involve downloading and app on your phone, or doing it from a computer.
2. Go to the Market app on your device, search for Terminal, tap the first result, and install it.
3. Go to the Browser  app and download romdump. Nothing to install, so next step
4. Open the Terminal app you installed in step 2.
5. Type: su It should give you no errors and go to another # on the next line. Rooting allows you type su which gives you permissions to do stuff in the system.
6. Type cp /sdcard/download/romdump /data/local (NOTE space between ...apk and /data...)
7. Type /data/local/romdump This will run the dumping program. It will give output like:
Dumping kernel config... done.
Dumping boot partition... done.
Dumping recovery partition... done.
Dumping system partition... done.
Creating Checksums... done.
Cleaning up... done.
All done.

7. Disable USB debugging by going to Settings app, Applications, Development, and un-checking USB Debugging.
8. Plug in your device to your computer with the (most likely) micro-USB port somewhere on the device.
9. With USB debugging disabled, the device should now prompt you to enable USB storage. Tap enable. Your computer should make the "new device sound" and a new storage device will show up just like a flash drive.
10. On your computer, go to the new storage icon the pops up on your desktop or in the Computer folder, etc. Make sure the romdump folder has the files in it and then copy it to your computer.

You now have roms of your Android device, Happy Hacking!


How to Root Any Android with Froyo (2.0)

The goal of this post is to show you how to root an Android device that runs the Froyo firmware, aka v2.0. I  found a LG Apex in the electronics recycling (pretty rare to find an android) and of course wanted to tinker with it. Just like with any other new project, you need to read as much as possible so you dont screw anything up. Rooting is actually quite simple: people have made programs that do it for you (just a few clicks).
What version do you have?
1. Tap the Grid Icon at the bottom of your homescreen to show all your apps
2. Scroll to the bottom and find Settings
3. Scroll to the end again and tap About phone
4. Scroll down till you see Android version in the list.
5. Directly underneath this heading there is a number. For example 2.2.2, or 2.1-update1

Rooting

2.2.2

1. On your Android Browser app, go to this link: GingerBreak-v1.2.0.apk. If Chrome or your Anti-virus warns you about a virus, IT IS NOT! It's because of its rooting capabilities that is seen as one!
2. Go to Settings again like above
3. Then go to Applications and check Unknown Sources
4. Scroll down to and tap on Development and check USB debugging
5. Go to your Browser's Downloads and click click on GingerBreak-v1.2.0.apk
6. Tap Install, and accept all the warnings.
7. When done, click Open.
8. This is the actual rooting app. Make sure you have a SD card in your device!
9. Under Options tap Root device. When done, it will restart your phone.
10. To check that it worked, go to the App Grid Icon from your home screen and look for a Superuser app. If it is there, then you have just rooted your device!

2.1-update1 or lower

1. On your Android Browser app, go to this link: z4root-1.3.1.apk. If Chrome or your Anti-virus warns you about a virus, IT IS NOT! It's because of its rooting capabilities that is seen as one!
2. Go to Settings again like above
3. Then go to Applications and check Unknown Sources
4. Scroll down to and tap on Development and check USB debugging
5. Go to your Browser's Downloads and click click on z4root-1.3.1.apk
6. Tap Install, and accept all the warnings.
7. When done, click Open.
8. This is the actual rooting app. Tap Permanent Root. When done, it will restart your phone.
10. To check that it worked, go to the App Grid Icon from your home screen and look for a Superuser app. If it is there, then you have just rooted your device!

Next, i'll grab the system files from the android and make a custom rom (aka edit the system).

Monday, May 6, 2013

Some Management Stuff

I have made a few changes and am thinking about a few others. I changed the templates to something a little easier to read and see hyperlinks in text. I also found some new code box html code. Do you like the new stuff? Should I do page breaks in longer posts (lots of scrolling)?

That is if anyone cares :)

Saturday, May 4, 2013

R/C Themed Car Media Controls

The goal of this project is to interface some sort of media player with my radio with media controls easily accessible. After washing my ipod and the cellphone battery not fixing it (soemthign was drawing excessive currect and kill the battery within a day of not being used (a new ipod battery didn't fix it either). So i set off with another idea: use my netbook.

Why?
-has my entire music collection
-can be interfaced with an arduino through processing.
-arduino will handle all the control interface reading.
-runs linux which is awesome
-Amarok media player
-small

Overview

I first had to come up with what controls to use with the arduino. As you might have noticed from my recent posts, i'm pretty obsessed with RC. The first RC that i got was a Firebird II ST and had only throttle and roll: aka totally shit. Long story short, i was flying it in a circle and went out of sight (couldn't turn tight enough) and crashed somewhere: never found it. I gutted it's control sticks for my media interface. pretty nerdy. Throttle is used as volume, and the roll stick is used for changing tracks). The arduino reads the analog values and sends them to processing which sets the volume /play/pause/track skip.

The Build

Arduino

First thing i had to do was check out the pots and see how they would behave on the arduino. i wrote a little arduino program below that will find the current value, the min value, and the max value of the pot. so if you move the to from one extreme to the other, it will show what the min and max was. One pot was acting weird o i replaced it with a common 5k. both original pots had weird analog read values that weren't 0 to 1023 (0v to 5v) like usual, so that was the biggest reason for this code.

#define analogPin A5

int potVal , potValMin , potValMax = 400;

void setup() {
  Serial.begin(115200);
}

void loop() {
  // read the analog in value:
  potVal = analogRead(analogPin);      

  //Get the senor range value automatically
  if(potVal > potValMax) //if current value is greater than the
  {                            //previously known max, set max to current
    potValMax = potVal;
  }
  else if(potVal < potValMin) //if current value is less than the
  {                             //previously known min, set min to current
    potValMin = potVal;
  }

  Serial.print(potVal);   //print raw val
  Serial.print("   ");
  Serial.print(potValMin); //print min
  Serial.print("   ");
  Serial.println(potValMin); // print max

  //delay so its easier to read
  delay(5);                  
}

Now that i had the ranges of the pots, i could start the actual interfacing. The arduino code:
1. reads the pots and button
2. maps the values to a useful range
3. sends them in a comma seperated string out the serial port


/////////////////////////POT CONFIG//////////////////////////
#define volInPin A5
#define nxtInPin A4
////////////////////////////////////////////////////////////

//////////////////////////BTN STUFF////////////////////////////////////////////////////////////////
#define buttonPin 3

boolean currentState;           // the current reading from the input pin
boolean previousState;    // the previous reading from the input pin

// the follow variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0;         // the last time the output pin was toggled
long debounce = 200;   // the debounce time, increase if the output flickers
///////////////////////////////////////////////////////////////////////////////////////////////////

long volVal;
int nxtVal;
int btnVal;

void setup()
{
  Serial.begin(115200);

  pinMode(buttonPin, INPUT); //set button to an input.
  previousState = digitalRead(buttonPin);

  //initiallize default ppm values
  volVal = 16384;  // or quarter volume
  nxtVal = 50; //centerd, 50
  btnVal = 0;  //0, no mute
}

void loop() {
  delay(5);//better values.
  // read the analog in value:
  volVal = analogRead(volInPin);

  delay(5);//better values.
  // read the analog in value:
  nxtVal = analogRead(nxtInPin);

  CheckPPButton(); //check the play/pause button;)

  //raw values pot val. uncomment these lines to see these values
  /*
  Serial.print(volVal);
   Serial.print(",");
   Serial.print(nxtVal);
   Serial.print(",");
   */

  volVal = map(volVal,450,720,0,65536); //vol
  nxtVal = map(nxtVal,640,1023,0,100); //nxt

  //mapped pot values . uncomment these lines to see these values
  /*
  Serial.print("         ");    
   Serial.print(volVal);
   Serial.print(",");    
   Serial.println(nxtVal);    
   */

  SerialWrite(); //makes serial string and sends it at the end of each loop.
}

void SerialWrite()
{
  while (!Serial.available());             // wait for processing to say something
  if(Serial.read() == 100) // check if we need to send data if processing sends "100"
  {
    //volume level, skip track, mute
    Serial.print(volVal); Serial.print(","); Serial.print(nxtVal); Serial.print(","); Serial.println(btnVal);
  }
}

void CheckPPButton()
{
  currentState = digitalRead(buttonPin); //get current state

  //if has passed debounce time and the is different
  if (((millis() - time) > debounce) && (currentState != previousState))
  {
    if(currentState == false)
    {
      btnVal = 0; //Playing
    }
    else // = high, closed to 5v
    {
      btnVal = 1; //Paused
    }

    previousState = currentState;

    time = millis();  
  }
}

Processing

Now for  the processing side which:
1. Reads the serial data
2. Runs the script to change volume and the mute status
3. checks the Skip track pot value to see if it needs to change the Amarok track


import processing.serial.*;
Serial port;  // The serial port object

byte needData 100; //sent when data done procssing.

boolean gotData = false;

long volVal;
int nxtVal;
int btnVal;

void setup()
{
  size(300, 200);
  // In case you want to see the list of available ports
  // println(Serial.list());

  // Using the first available port (might be different on your computer)
  port = new Serial(this, Serial.list()[0], 115200);
  // Request values right off the bat
  port.write(needData); //need data...
}

void draw()
{
  if (gotData)
  {
    exec("ChngVol.sh", "volVal", "btnVal"); //runs the volume / mute script. this needs to be in /usr/bin
 
    gotData = false;
    // When finished ask for values again
    port.write(needData);
  }
  background(0);
}// Called whenever there is something available to read


void serialEvent(Serial port) {
  // Data from the Serial port is read in serialEvent() using the readStringUntil() function with * as the end character.
  String input = port.readStringUntil(',');

  if (input != null) {
    // Print message received
    println( "Receiving:" + input);

    // The data is split into an array of Strings with a comma or asterisk as a delimiter and converted into an array of integers.
    long[] vals = int(splitTokens(input, ","));

    // Fill variables
    volVal = vals[0];
    nxtVal = (int)vals[1];
    btnVal = (int)vals[2];

    gotData = true; //now the main loop will do stuff
  }
}

This project is not yet complete, and may never be as by brother gave me his old 1g iPod Touch because his girlfriends brother gave him his because he got a new iPhone. phew.

Friday, May 3, 2013

Replace A-Arm and Steering Assembly on 1/16th scale 25A SCT RC from HobbyKing.

First off NEVER EVER drive these RCs without the body unless your are on some flat, huge surface. Hitting something will most likely break off the A-arms without the body protection. Long story short, I broke one and finally did this repair after the ~9.00$ of parts came in. I got all of these parts to be less than the first tier ~100g package, so shipping was only ~2.00$ :D.

Dogbone 2 pcs - 118B, A2023T and A20351IN STOCK
Front Shock Complete 2 pcs - 118B, A2023T and A20351IN STOCK
Front Susp.arm - L/R 2 pcs - 118B, A2023T and A20351IN STOCK
Steering Drag Link 1pc - 118B, A2023T and A20351IN STOCK

The parts.

Uh oh, wheres the other wheel, lol.

Here are all of the screws you need to fix the steering. If the A-arm is the only thing broken, you dont ahve to take these out.

Better view.

You don't have to take out the center four, I just did to clean it a bit. 

From the other side.

Once those screws are out, you can pull off the front bumper and pull off the old A-arm.

Put the new one on and make sure its in the right orientation and L or R.

Cleaning time! Check the servo saver while you're here too. 

Time to swap over the old A-arm parts to the new A-arm. For some reason when I put it back, the steering was getting caught on something. I added seem spacers on that front to back brace and it cleared fine.

There is a E-clip that holds the c-block to the A-arm: to get this off, use some fine tipped pliers (blue arrow).

I put on the dog-bones, new springs, and put the wheel back on etc. I put the ESC back together and did some waterproofing with hot glue :P.

Charging the 1800mah 2s LiPo that I got to test fit. 

Te-da! Running this thing again showed me just how ballistic this thing is for its size :D.

RC Power Wheels Jeep

This post is about the Power Wheels Jeep I found in my neighbors trash while working on the Racing Wheel project. I plan on slimming it down, PAINTING IT, and turning it into a RC Power Wheels (on a low budget).

When I saw it i was thinking it would be very unlikely any thing was severely wrong with it. 

The first thing i did though, was wash it out. I could swear there was puke in it mixed with some slightly vegetated leaves. Nasty. It has two 6v Power Wheels Lead Acid batteries in the front wired in series and I instantly thought LiPo.  

I took off the seat and realized why the wheels don't have any grip: the motors are tiny with some gear reduction. I grabbed the 12v car battery charger and tested out the motors: they work fine. Then i tested the whole system by hooking up to where the batteries were: nothing. My dad pointed out that the "gas" pedal sits in this little bowl thing (on the floor just left of the removed dash in the above picture) underneath the rest of the car which means that water eventually gathered and corroded the switch to death. Marketing, hah.

I took out that assembly and found that it wasn't the switch, but the wire connecting to it had broken off.

Recycling some of the plastic parts: seat, light bar, and the windshield. I decided to keep the dash because other wise it just looks like a big flat bed.

I have this 30A Brushed ESC from hobbyking so that should be perfect. I found this info below on amp draw. Since i'll just be adding RC stuff the weight shouldn't be any where near 90lb. So, lots of power and I may need to put some grip on these plastic tires.
no load = 3 to 5 amps
90lbs load = 6-8 amps
90lbs load up a 10 degree ramp also = thick grass = 18-29amps



I bought some blue gloss spray paint for my Racing Wheel Project (for the wheel center thingy, haha) and to paint this Jeep. They advertise 1 ~3.00$ can = 2x other cans, so i'll see just how much is in there.

I pulled out these power window motors from my 92' Taurus and found these specs; should be sufficient for steering.
Serial: E6DF-14A365-B
Watts: 22.30w
Torque 1302oz-in @ 92RPM
Amp draw 2.8A and 24.8A stall

Now I have to do the painting, wire in the ESC, and figure out how i'm going to mount and interface the power window motor. Oo

Soldered a XT-60 connector on the ESC and tested out a motor. Yes, I used adjustable wrenches to temporarily connect the motor to the ESC :D

Nice and quick with adjustable speed!

I also took apart the "shifter" turns out its just a lever and two switches  Interesting idea by the Power Wheel engineers, lol.

Poor grass :D

Freaking awesome blue. Lighter than I thought (wanted a dark blue), oh well. Now I need to paint the bumper gloss black, the under body flat black, and the wheel side walls black

Underside of the hood painted flat black as i'm almost out of black gloss. Top is gloss.

This is how I covered up things I didn't want to paint.

The contrast of black and blue makes this PW look SO much better.

Interior... awesome!!

Gotta fix that "roll cage".

Underside flat black (the pink is where the roll cage bolt was). Here are some more finished pictures.


I got some 12v 30A SPDT relays for the two drive motors and the steering motor from here. Wwo SPDT relays are required for forward and reverse capability with a motor (you can wire two motors together and still use just two relays, but be careful with amp draw.).

For someone who wants a simpler solution, a DPDT

An Intermediate relay (like a DPDT, but already wired internally for fwd / rev). Though it comes at a little higher price.

Here is a "scheme" for the SPDT double relay design. Im not sure what out put is active when the relay is active, so I don't know if the PNP will need to be pulled up or down.


Package!

Relays in package!


 First thing i had to do was figure out the pin out  I couldn't find anything online, but the below image from the datasheet helps.

This the relay inside from the datasheet. The image is kinda messy, but I think you'll see the matching layout.

Now i'm gonna solder 'em up.

Sunday, April 28, 2013

DIY Computer Racing Wheel Setup

The main goal is to build a Racing Wheel for a computer out of a soon-to-be-scrapped 92 Ford Taurus. Since it's going to the scrap, it doesnt really matter what happens to it. Hehe. So, I've been taking apart random parts to learn about them. :) The  photos area bit lacking but should get the point across.

There she is :D

ooh what's under the valve cover? And that's an intake manifold in the top left. It's not this particular model, but the Ford Taurus SHO (stock) can beat Mustangs easily. Quite interesting

This is the front dash where the steering wheel was. The two shafts are the brakes and the steering column. I've also taken off the gauge cluster as it may turn out to be a nice addition (RC car FPV?).

I took out my modded radio.

Here i have the gas and brake petals, the gauge cluster, and some awesome switches!

Here's the steering wheel after a bit of modification. I've removed most of the mechanical and electrical parts and got rid of that awful grey color


Here is the rear part of the wheel / Steering column. It was quite heavy and the mounts were to far back for this project, so after removing it (dang spring) I have something to work with.

This is the mount between the two pieces which allowed for the wheel angle adjustment.

I painted the wheel glossy black and the mechanics behind it flat black. I wanted some blue, but i couldn't find any blue spray paint. :(

Ooo whats that? :D I was working on this racing wheel project and I see this "in" my neighbors trash. I think i'll have to ... grab that. I got plans for this!

Now, back to work: I have to figure out how this whole thing will be mounted

I also took this off when the steering wheel came out of the car. :D

Electrically ignited explosives... hmmm

Any ways, I also cut off the "loops" of the wheel so it is less cumbersome while in use.

Here is a mounting bracket that i slimmed down with a dremel to fit the modded wheel better. 

Next i did some trimming on the wheel mount to get rid of excess material so I could mount it better. Here is the second mount which should allow me to have some sort of variable angle too.

More coming later.