-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for the Universal lagfix kernel.
- fixes multiple issues with how samsung handles stuff - backups (but does not restore) efs partition - added graphsh command to display messages pre-init - added truncate command to create large files fast (alternate to dd skip) - added lagfixing and rooting options - some other modifications
- Loading branch information
Showing
12 changed files
with
898 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* Copyright (C) 2010 Zsolt Sz Sztupák | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <ctype.h> | ||
#include <errno.h> | ||
#include <fcntl.h> | ||
#include <getopt.h> | ||
#include <limits.h> | ||
#include <linux/input.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <sys/reboot.h> | ||
#include <sys/types.h> | ||
#include <time.h> | ||
#include <unistd.h> | ||
#include <sys/stat.h> | ||
|
||
#include "bootloader.h" | ||
#include "common.h" | ||
#include "cutils/properties.h" | ||
#include "install.h" | ||
#include "minui/minui.h" | ||
#include "minzip/DirUtil.h" | ||
#include "roots.h" | ||
#include "recovery_ui.h" | ||
|
||
#include "extendedcommands.h" | ||
#include "commands.h" | ||
#include "lagfixutils.h" | ||
|
||
extern char **environ; | ||
// runs the program and redirects it's output to the screen using ui_print | ||
int graphsh_main(int argc, char** argv) { | ||
if (argc>=2) { | ||
ui_init(); | ||
ui_print(EXPAND(RECOVERY_VERSION)" - script runner\n"); | ||
|
||
ui_set_show_text(1); | ||
|
||
FILE* f = popen(argv[1],"r"); | ||
char buff[255]; | ||
int l; | ||
if (!f) { | ||
ui_print("Could not open process\n"); | ||
sleep(1); | ||
gr_exit(); | ||
ev_exit(); | ||
return -1; | ||
} | ||
while(fgets(buff,250,f)) | ||
{ | ||
ui_print("%s",buff); | ||
} | ||
pclose(f); | ||
gr_exit(); | ||
ev_exit(); | ||
return 0; | ||
} else { | ||
printf("Usage: graphsh command\n command with it's optional parameter(s) must be in quotes.\n"); | ||
return -1; | ||
} | ||
} | ||
|
Oops, something went wrong.