Battery Charged in 30 Seconds? Maybe in 2016

Phones and tablets are getting more and more power hungry with each passing generation. Their … more

ZArchive Manages Your File Archives

Today smartphones are quite powerful devices that can handle multiple processes at once. In fact, some of … more

Regain Double Tap to Wake Functionality on the Nexus 6

A few months ago, Google announced its newest flagship device, the Nexus 6, alongside … more

Clean Your Recent Apps – XDA Xposed Tuesday

In this day and age, you have quite a few apps installed and running on your Android … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

JesusFreke auto-updater in the works.

OP Darkrift

26th January 2009, 06:15 AM   |  #1  
Darkrift's Avatar
OP Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
 
530 posts
Join Date:Joined: Oct 2006
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
Last edited by Darkrift; 13th February 2009 at 03:17 AM. Reason: Changed title to be more relevant. This project is no longer about a .sh script.
26th January 2009, 07:05 AM   |  #2  
Senior Member
Thanks Meter: 0
 
203 posts
Join Date:Joined: 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.
26th January 2009, 07:22 AM   |  #3  
Darkrift's Avatar
OP Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
 
530 posts
Join Date:Joined: Oct 2006
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.
26th January 2009, 07:46 AM   |  #4  
Darkrift's Avatar
OP Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
 
530 posts
Join Date:Joined: Oct 2006
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)
26th January 2009, 03:06 PM   |  #5  
Senior Member
Thanks Meter: 1
 
135 posts
Join Date:Joined: Dec 2008
More
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.
26th January 2009, 03:35 PM   |  #6  
Senior Member
Flag Yorba Linda
Thanks Meter: 31
 
266 posts
Join Date:Joined: Jan 2009
More
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
26th January 2009, 03:53 PM   |  #7  
Senior Member
Thanks Meter: 103
 
146 posts
Join Date:Joined: 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 ?
26th January 2009, 05:30 PM   |  #8  
Senior Member
Thanks Meter: 0
 
203 posts
Join Date:Joined: Jul 2007
Quote:
Originally Posted by ido

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.
26th January 2009, 06:11 PM   |  #9  
n1kon's Avatar
Senior Member
Thanks Meter: 59
 
366 posts
Join Date:Joined: Mar 2006
More
this will be awesome. can you make it for uk versions too please
26th January 2009, 06:53 PM   |  #10  
Junior Member
Thanks Meter: 0
 
15 posts
Join Date:Joined: 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.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes