Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,682 Members 42,289 Now Online
XDA Developers Android and Mobile Development Forum

JesusFreke auto-updater in the works.

Tip us?
 
Darkrift
Old
(Last edited by Darkrift; 13th February 2009 at 02:17 AM.) Reason: Changed title to be more relevant. This project is no longer about a .sh script.
#1  
Darkrift's Avatar
Senior Member - OP
Thanks Meter 7
Posts: 520
Join Date: Oct 2006
Location: San Tan Valley, Arizona

 
DONATE TO ME
Default JesusFreke auto-updater in the works.

OK, here is the latest. This thread topic has changed a lot since I started it so I deleted it all and am cleaning it up.

A few weeks ago I wrote a .sh script that would check a file to find if there was a new version of the JF roms available. Updating is a pain and I wanted to make it easier. Not knowing Java I decided to write a .sh script which worked but was not very easy to use itself. To make it easier I asked for help here in making a frontend Android app to go with it. Since then, [RiS] has written a nice client that not only does what my script did, but does it without needing my script. The whole process is taken care of within the application. This makes it easier to use, faster and able to do a lot more than my script ever. The app is still in beta at this time but is coming along nicely.

The app name is JFupdater and currently it read a text file on my server (http://android-dls.com/up.txt). The info in that file tells the app if there is a new JF Rom available. I update this file whenever JesusFreke releases a new rom. There are fields for US G1, UK G1 and ADP1 which allows roms for all 3 to be tracked and updated. The version, description, md5sum and a list of mirrors to download. The application checks your phone type (or the phone type you select in the settings) and then checks this file to see if a newer version is available. IF there is it will let you know which are ready for download and give you a download button. Once downloaded the file can be applied by rebooting into recovery.

I believe he is working on making the reboot to recovery/apply update more automates so that after download you would be asked if you want to apply it now, and by choosing yes it would reboot and auto install the update like an official OTA would do.

There is currently a service set that allows you to set it to look for an update ever 1 hour, 24 hours or on boot.

The url where this project is located is: jfupdater.googlecode.com
 
LPChris
Old
#2  
Senior Member
Thanks Meter 0
Posts: 203
Join Date: Jul 2007
I'm not sure how to run shell commands through an app. If anyone knows how I can definitely write the service to do this.
 
Darkrift
Old
#3  
Darkrift's Avatar
Senior Member - OP
Thanks Meter 7
Posts: 520
Join Date: Oct 2006
Location: San Tan Valley, Arizona

 
DONATE TO ME
I know its possible because someone in #android wrote one. Also another thing that might need to be done would be to copy this file to /cache and chmod it (if its on sdcard it cannot be executed). I will try to ask around how to run a shell command for you.
 
Darkrift
Old
#4  
Darkrift's Avatar
Senior Member - OP
Thanks Meter 7
Posts: 520
Join Date: Oct 2006
Location: San Tan Valley, Arizona

 
DONATE TO ME
ok, not sure if this helps, but this is from the source of Koush's superuser whitelist (thanks for making that available for us):

String command = String.format("echo \"mount -oremount,rw /dev/block/mtdblock3 /system\" | %s\nexit\n", suCommand);
Process p = Runtime.getRuntime().exec("sh");
OutputStream writer = p.getOutputStream();
writer.write(command.getBytes("ASCII"));
Thread.sleep(500);


and


if (superuser.exists())
{
// return device to original state
Process process = Runtime.getRuntime().exec("superuser");
DataOutputStream os = new DataOutputStream(process.getOutputStream());

os.writeBytes("busybox cp /system/bin/superuser /system/bin/su\n");
os.writeBytes("busybox chown 0:0 /system/bin/su\n");
os.writeBytes("chmod 4755 /system/bin/su\n");
os.writeBytes("rm /system/bin/superuser\n");
os.writeBytes("exit\n");
os.flush();
}


Hopefully the info you need is in this (i dont know java, but that looks like the code to me)
 
[RiS]
Old
#5  
Senior Member
Thanks Meter 1
Posts: 135
Join Date: Dec 2008
What about "running" the script code directly in the service? I mean, translate the script into java code.
This would remove the need of executing a shell script, and you wouldn't rely on system tools (that may change or crash in future updates / new devices).
Moreovew, it would also allow to add more options (Like check for updates, and when an update is found, ask the user if they want to download it or not. This could be useful if he is on a slow connetion, or it has not an unlimited data plan...)


I can start/work with LPChris on this.
 
APrinceAmongMen
Old
#6  
Senior Member
Thanks Meter 31
Posts: 266
Join Date: Jan 2009
Location: Yorba Linda
I was just looking at your update.sh script.
Just to clean it up a little, you can use a split function.
myString = jlatest.split("|")
That would split the text at everyone and give you
myString(0) = "version"
mystring(1) = "md5sum"
mystring(2) = "mirror1"
mystring(3) = "mirror2"
etc...
So yeah. I'm glad that you're doing this though.
I'm not any good at java so I can't help sadly enough.
I should start learning though. O_o
 
ido
Old
#7  
Senior Member
Thanks Meter 101
Posts: 145
Join Date: May 2006
I'm also interested in an app the can run scripts (which I can make shortcuts for..)

I'm not an java developer, however I've started writing something that could do that using a code similar to the above.

any other developers that can assist ?
 
LPChris
Old
#8  
Senior Member
Thanks Meter 0
Posts: 203
Join Date: Jul 2007
Quote:
Originally Posted by ido View Post
I'm also interested in an app the can run scripts (which I can make shortcuts for..)

I'm not an java developer, however I've started writing something that could do that using a code similar to the above.

any other developers that can assist ?
I'm actually building out the service now, I'll work on it more after I get home from work tonight. If you're good with building services too, by all means have a crack at it.
 
n1kon
Old
#9  
n1kon's Avatar
Senior Member
Thanks Meter 59
Posts: 366
Join Date: Mar 2006
this will be awesome. can you make it for uk versions too please
 
neerhaj
Old
#10  
Junior Member
Thanks Meter 0
Posts: 15
Join Date: Nov 2008
I have started working on this, hopefully will have a working version by tommorow.

Also, we have some bandwidth available at modmygphone.com which we can use for the mirror.

Tags
auto update, jesusfreke, jfupdater
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...