Dorado (04-17-2009),LegendaryAbbo (03-25-2009),Midrash (04-11-2009),Obama (03-20-2009),[D]evliin (03-24-2009)
Test Source Code 'name.c':
[php]#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
if(argc <= 1) {
printf("[!ERROR!] %s", "Not Enough Paramsn");
return 0;
}
char* name = argv[1];
unsigned int i;
for(i = 0; i < 10; i++)
printf("Message: %s n", name);
return 0;
}[/php]Prerequisites :
- Basic C programming knowledge.
- Slightly familiar with the unix command line
- Basic networking knowledge
- LAN\WIFI connection to PC's SSH client.
I'll explain everything but jailbreaking in this tutorial.
If it's your first time opening cydia, it will ask you which kind of user you are, select Developer. This will remove all the filters and allow you to access ToolChain(which contains GCC, the unix C++ compiler you'll be using)
Step 1 : Jailbreak your Ipod\Iphone
Step 2 : Open Cydia and download MobileTerminal
Step 3 : Open Cydia and download Automatic SSH
Step 4 : Open Cydia and download Toolchain
Step 5 : Open up windows, download and install WinSCP
- After all these have been installed, reboot your Iphone\Ipod.
- Go to setting from the SpringBoard(desktop of the Ipod)
- From setting go to Generel > Network > Wi-Fi, select the blue arrow next to your connection(it must be locally connected to the PC)
- Write down the Ip Address.
- Open WinSCP, under host name put the IP Address you just wrote down, User : root, password : alpine(default).
- Leave all the rest as they are. Now, connected to your Ipod touch by selecting "Login", if it fails, try again 3 times.
- Once you login you should see all files and directorys(even system-level files) in your Ipod Touch. All these can be modified, deleted and created.
- Open up the terminal, which can be accessed on the Ipods 'Desktop'.
- Reconnect WinSCP
- Create a fold you will place all your C and object files. I suggest (root\private\var\ccode) Remember the console is CASE-SENSITIVE, so try to keep all your file names and dirs lower-case.
- In the console type cd /var/ccode/ This will select the ccode directory you just created, set it's permissions to 0777 via MobileCommandline or WinSCP.
- Upload a source file to /var/ccode/, name it source.c. When programming this, be careful with memory\CPU usage. You can see my example of C code that I wrote to test on my compiler above.
Compiling name.c
- In MobileCommandline, navigate to your ccode directory using the cd command
- Type the following commands
- gcc name.c
- chmod 0777 a.out
- ldid -S a.out
Now the file is compiled, to run it, type ./a.out
More information :
The gcc command can be given parameters such as -o to specify the output file instead of the default a.out. Note, if you really wanted to(i have for when I'm at school) you can download a text editor and program\compile with just the Ipod touch, even though this is a bit of hassle with the onscreen keyboard.
Last edited by radnomguywfq3; 03-20-2009 at 03:15 PM.
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
Dorado (04-17-2009),LegendaryAbbo (03-25-2009),Midrash (04-11-2009),Obama (03-20-2009),[D]evliin (03-24-2009)
Wow to bad I dont have a fucking itouch. This is genius great job as usual. Hopefully more people will read this.
Last edited by Obama; 03-20-2009 at 03:18 PM.
if you do ever find how to do this on a blackberry storm let me know
Meh, an entire documentation of the iphone chipset along with any special processor facilities would be nice. Of course I don't have an iphone so what's there to even ague about
There are two types of tragedies in life. One is not getting what you want, the other is getting it.
If you wake up at a different time in a different place, could you wake up as a different person?
Even though you can use the given libraries, but I'm a guy that wants to learn everything about the hardware I'm working with. And plus, I'm working on a multi-platform OS, so it helps that I get this info. Also what's there to hack? Unless I'm doing some freaky software restricted hardware facilities I don't see why it's called hardware hacking unless you don't get full manipulation of hardware. I've always imagined a program that somewhere along the lines does neat GPS stuff. :O
Last edited by Corey Taylor; 03-24-2009 at 12:31 PM.
well my iphone is all ready jailbroken so dont really need this
Aight this looks sweet nice jeta one question what does it do lol seriously