Dr.Ketan Brings The S6 Theme Store To The Note 4

Dr.Ketan has submitted a video to the forums showing a functional port of the Galaxy S6 … more

Do You Have Insurance on Your Smartphone?

While affordable smartphones are becoming more available, the majority of high-end flagships … more

Apple Music Will Increase iTunes Match to 100,000 Songs

The battle for music streaming subscription dominance is starting to really heat … more

Xposed Framework Updated to v65

Xposed Framework is an extremely popular modification platform for Android, so much so that we included … more

JesusFreke auto-updater in the works.

530 posts
Thanks Meter: 12
By Darkrift, Senior Member on 26th January 2009, 05:15 AM
Post Reply Subscribe to Thread Email Thread
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 ( 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:
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.
26th January 2009, 06:05 AM |#2  
Senior Member
Thanks Meter: 0
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, 06:22 AM |#3  
Darkrift's Avatar
OP Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
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, 06:46 AM |#4  
Darkrift's Avatar
OP Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
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();


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");

Hopefully the info you need is in this (i dont know java, but that looks like the code to me)
26th January 2009, 02:06 PM |#5  
Senior Member
Thanks Meter: 1
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, 02:35 PM |#6  
Senior Member
Flag Yorba Linda
Thanks Meter: 31
I was just looking at your 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"
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, 02:53 PM |#7  
Senior Member
Thanks Meter: 105
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, 04:30 PM |#8  
Senior Member
Thanks Meter: 0
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, 05:11 PM |#9  
n1kon's Avatar
Senior Member
Thanks Meter: 59
this will be awesome. can you make it for uk versions too please
26th January 2009, 05:53 PM |#10  
Junior Member
Thanks Meter: 0
I have started working on this, hopefully will have a working version by tommorow.

Also, we have some bandwidth available at which we can use for the mirror.
Post Reply Subscribe to Thread

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

Advanced Search
Display Modes