-
09-18-2011, 01:14 PM #1Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts
How to write a "postinst" file FULL GUIDE {mods plz sticky}
This isn't necessarily a guide on how to make a deb, but it gives you almost the whole idea.
I need some one to help me re-write this, using eye candy coding, so that I can get it stickied!!
If you just post a reply with sections that should be changed, I'll post your name & what ever links you want for you on that section!!
If your on windows, make a folder on your desktop, lets call this "GameMod".
In "FileMod", make a folder called "DEBIAN" (yes in all caps).
Go into there, right click the folder & make a new text document. Name it: "postinst".
Hopefully you have file extensions showing, because this file is NOT supposed to have an extension, it's just called "postinst".
Now open up "postinst", and choose to choose to open with... "NotePad"
Here is a sample:
MAKE SURE THERE IS A BLANK LINE UNDER exit 0 IT HAS TO BE THERE#!/bin/bash
cd /var/mobile/Applications/*/Game.app
mkdir Backups
cp -a ./Original_File.ext ./Backups/Original_File.bak
killall Game
mv -f /var/mobile/Documents/GameMod/Game/* ./
exit 0
Now the 1st part is the command to run the file, it will ALWAYS have to be there, the #!/bin/bash part
The 2nd part changes the directory (cd) to where the game it located, the * is because we don't know the directory of the Game.
Just try to imagine that your in a command prompt entering in these commands one, by one.
The "mkdir" makes a new folder, we need this made BEFORE we move the files, otherwise it will fail to make backups.
"cp -a" means to "copy & archive" which allows you to rename a file once you move it.
So: "copy & archive (cp -a) ./ (this means to add the cd command before, shortening the amount of code needed) Original_File.ext to (the space means to) ./Backups (the folder we just made) /Original_File.bak (.bak means backup)
"killall Game" will exit the app, weather it be a game or not, so that the files will absolutely copy over.
In most cases, the files wont copy over cause their open in the game.
Now remember: just because an app FOLDER has .app doesn't mean the actual running process also has .app, that is JUST the folder name.
Now, since this is a postinst guide, you already know to have a folder in your GameMod that matches the iPhone directory structure, so that's where this command comes in.
"mv-f" forces a "move" of files from your directory you created, into the game directory, very similar to the cp command.
Now the last thing you need is: "exit 0" & make sure there is another line under it, but blank, like this:
line1: exit 0
line2: -blank-
That's it! now you should also know how to make the deb, if not:
dpkg -b GameMod
LAST THING!!! YOU MUST DO THIS IF YOU ARE ON WINDOWS ====BEFORE==== YOU PACKAGE THE DEB
If you are on windows, and are using WinSCP, navigate into the remote directory: /private/var/root/YourHack/DEBIAN/
and open the WinSCP Terminal by holding crtl and pressing T
Then type in the command:
Then just delete the postinst & rename postinst2 to postinsttr -d '\15\32' <postinst> postinst2
YOUR ALSO going to have to set the permissions back to 0755, just right click on the file & go to Properties & at the bottom, change the 0653 (or what ever it is) to 0755
If you have questions or need a command to use, post here & I'll try to help you as best as I can!Last edited by NicholasLAranda; 09-18-2011 at 11:08 PM.
-
09-18-2011, 01:22 PM #2
Q? Run "dpkg -b Gamemod" on windows?
-
09-18-2011, 10:57 PM #3Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts
If you are on Windows, you need: WinSCP
The right side is your iPhone, and the left is your computer.
Once you navigate to /private/var/root this is where your FileMod should be.
Go into the DEBIAN folder, then simply hold Ctrl and then Press T to open up the terminal.
This is where you can run the dpkg -b command.
-
09-18-2011, 10:59 PM #4
So you're saying .... everything in your procedure is done within WinSCP?
-
09-18-2011, 11:05 PM #5Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts
-
09-18-2011, 11:07 PM #6
That little but important detail is not clear. Might I suggest a modification for clarity?
-
09-18-2011, 11:08 PM #7Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts
-
09-18-2011, 11:14 PM #8
The 3 lines still don't make it clear that the procedure is run from a computer 'within' a WinSCP session.
-
09-18-2011, 11:18 PM #9Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts
the 1st 3 lines say that this isnt a guide on how to make a .deb file.
On top of that: I need help re-writing the guide, so feel free to post your suggestion & I'll quote you on it, into the guide so that you get credit
-
09-18-2011, 11:23 PM #10
Thanks, but I don't have the time.
Your information is good, but lacking important details.
I have found ... if you take several pictures or screen shots of the major areas, it really helps. Helps the writer to create the guide, helps the user to understand the procedure
I'll keep an eye on this for future sticky potential.
-
09-19-2011, 10:12 AM #11Green Apple
- Join Date
- Sep 2011
- Location
- Hayward, California, United States
- Posts
- 36
- Thanks
- 0
- Thanked 0 Times in 0 Posts



LinkBack URL
About LinkBacks
Reply With Quote
, litterally.