JesusFreke auto-updater in the works. - G1 Android Development

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

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.

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.

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)

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.

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.

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 ?

ido said:
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 ?
Click to expand...
Click to collapse
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.

this will be awesome. can you make it for uk versions too please

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.

As I said I am a n00b when it comes to .sh scripts, and this is probably my third. If you have a way to make it work better, by all means let me know. As for making a java app that does all of this, if you can do it, great! I do not really care about the script other than the fact that I couldnt do this any other way and didn't want to be begging for a developers help unless I had already done what I could myself.

I have been working on a similar concept myself. I even got the /cache/recovery/command stuff working. Just write the following commands to that file:
Code:
boot-recovery
--update_package=partition:file
Then you can run 'reboot recovery' from the terminal and the phone will automatically reboot into recovery mode and apply the update. It won't go back into user mode on its own though (you have to hold home+back to do so).
I would much prefer this to be a GUI based utility, instead of a shell script that just runs in the background. We could apply ROM updates, themes etc right on the phone by simply giving a URL to the location of the file and have the phone do the rest

Datruesurfer said:
Then you can run 'reboot recovery'
Click to expand...
Click to collapse
Thanks for this, we were looking into how to do this. How did you find that out? I guess the android app that does all this can now force the reboot also

Datruesurfer said:
I have been working on a similar concept myself. I even got the /cache/recovery/command stuff working. Just write the following commands to that file:
Code:
boot-recovery
--update_package=partition:file
Then you can run 'reboot recovery' from the terminal and the phone will automatically reboot into recovery mode and apply the update. It won't go back into user mode on its own though (you have to hold home+back to do so).
I would much prefer this to be a GUI based utility, instead of a shell script that just runs in the background. We could apply ROM updates, themes etc right on the phone by simply giving a URL to the location of the file and have the phone do the rest
Click to expand...
Click to collapse
That's too easy! good find

Any word on the progress?

Darkrift said:
Any word on the progress?
Click to expand...
Click to collapse
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!

For some reason my Subclipse isn't playing nice with the Google Code repository right now so I haven't been able to get any of my code up there yet, but hopefully we'll have something going fairly soon. I'm going to rewrite as much of it as I can in Java so that the user can be notified and authorize the download in two separate steps.

[RiS] said:
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!
Click to expand...
Click to collapse
Any details for this?

[RiS] said:
LPChris and myself have started a project on google code, we expect to have some working code soon.
Anyone who wants to contribute with ideas, testing, etc.. is welcome!
Click to expand...
Click to collapse
I had actually registered a domain with this type of thing in mind in the past. androidupdatetracker.com. I would be happy to donate it to the cause

Darkrift said:
Any details for this?
Click to expand...
Click to collapse
So far we have an empty Google Code project going. Like I said before, I haven't been able to connect my environment to the google code cvs. I'm hoping to be able to spend some time on it tonight if I can. If anyone else wants to help out here that has some free time then I'm open to it. I've just been busy with work and my GasBot application.

Related

SwitchRom from computer

Ok well I am working on making a switchrom rom .exe and so you can Backup and Restore and everything through your computer so you dont have to type any code or anything and I have the backup part done.
My only problem is that I am using C++ to do it and I really need to enter a string into a system command, for example
system("adb shell sh /system/sd/switchrom.sh -s "mystring;""); but whatever I do I can't get it to work
if anyone knows how to do this please help. I am kinda a noob at C++
kickfliprock13 said:
Ok well I am working on making a switchrom rom .exe and so you can Backup and Restore and everything through your computer so you dont have to type any code or anything and I have the backup part done.
My only problem is that I am using C++ to do it and I really need to enter a string into a system command, for example
system("adb shell sh /system/sd/switchrom.sh -s "mystring;""); but whatever I do I can't get it to work
if anyone knows how to do this please help. I am kinda a noob at C++
Click to expand...
Click to collapse
understandable you are wanting help, but im not so sure i would trust a noob that is making a .exe file to backup/restore my phone lol
nothing against you of course, just sayin.
kickfliprock13 said:
Ok well I am working on making a switchrom rom .exe and so you can Backup and Restore and everything through your computer so you dont have to type any code or anything and I have the backup part done.
My only problem is that I am using C++ to do it and I really need to enter a string into a system command, for example
system("adb shell sh /system/sd/switchrom.sh -s "mystring;""); but whatever I do I can't get it to work
if anyone knows how to do this please help. I am kinda a noob at C++
Click to expand...
Click to collapse
There are probably two issues with what you are trying to do:
1. 'adb' from toolkit version less than 1.5r3 doesn't work like that. So, you need to upgrade to 1.5r3 if you want to invoke "adb shell sh /system/sd/switchrom.sh...."
2. You need to escape the inner string's quotation marks, otherwise your string argument to 'system' ends with the first quote. Something like:
Code:
system("adb shell sh /system/sd/switchrom.sh -s \"mystring\"");
Of course, you need to make sure /system/sd is mounted before you can run switchrom.sh from it. And you need to make sure that the phone is in recovery mode. If its not in recovery mode, don't run switchrom.sh.
I like this idea
I would love the option to do this, however, I primarily use a linuxbox, and in all honesty, don't like switching on my VM or for that matter rebooting my machine (adb under windows sux bawlz anyway )
I would however, consider it, if this turns out all right! could be similar to the few android phone managers we have already out there, maybe if you can get it to work right they could help you implement it (or you could ask some assistance in the C area)
ComplexMinded is writing an android manager also, and it runs on windows OS, maybe you coudl take a look at that program?
link: (under dream apps/games) My Android Manager
Good idea, but wouldn't it be a whole lot simplier to make a batch file?
senior member finally !!!
Batch File
yeah it would be alot easier to create a batch file and if you guys want me to do that I could have that out by tomorrow, but I have made alot of android batch files on other sites and people always ask me to convert to .exe,
and I am not a total noob (and it's totally understandable not to trust a noob and if that is the case then just don't run my application)
getting all that out of the way I think that I have figured it out.
batch file
ive tried making my own batch files, but as soon as i enter the adb shell, the next lines in the batchfile are ignored
skeeedup said:
ive tried making my own batch files, but as soon as i enter the adb shell, the next lines in the batchfile are ignored
Click to expand...
Click to collapse
You can't enter the shell, you have to execute shell commands in the following manner:
adb shell [command] [-switches] [args]
For example, to delete a folder you would do
adb shell rm -rf /data/data/[name_of_folder]
Personally I'd prefer BAT files so you can see what is going on in them. The only problem with a BAT file is anybody can grab it and change it causing damage to somebody elses device.
I create .bat files at home all the time for doing things that require command line or could use command line, but thats just my preference.
palosjr said:
understandable you are wanting help, but im not so sure i would trust a noob that is making a .exe file to backup/restore my phone lol
nothing against you of course, just sayin.
Click to expand...
Click to collapse
I learned a long time ago not to discount someone just because there's a "Junior Member" next to their username. Some of the greatest developments on here have come from a one time JM, even when they were JM's. Good luck with this, and welcome to the community. That being said, you'd better not [email protected]#$ up anyone's phone or computer!!! Just Kidding
overground said:
I learned a long time ago not to discount someone just because there's a "Junior Member" next to their username. Some of the greatest developments on here have come from a one time JM, even when they were JM's. Good luck with this, and welcome to the community. That being said, you'd better not [email protected]#$ up anyone's phone or computer!!! Just Kidding
Click to expand...
Click to collapse
i wasnt discounting his abilities with the phone/computers, but when he said he was a noob at C++... thats what i was referring to..
I have worked a lot but I don't think the problem I have been having is possible. I have posted questions of it everywhere and I even asked my C++ instructors if it was possible and they didn't even know.
So I will either write it in a batch or in python or maybe both. It will take a little longer cause now I have to throw away my entire last project and start all the way over!
Oh yeah and here is my twitter I have gotten some PM's asking for it.
http://twitter.com/kickfliprock13
dont mind the last few tweets I did I was testing out plurk
http://www.plurk.com/kickfliprock13
palosjr said:
i wasnt discounting his abilities with the phone/computers, but when he said he was a noob at C++... thats what i was referring to..
Click to expand...
Click to collapse
Gotcha...wasn't aiming at you either, notice I did not quote you in my previous post. Just a general statement. However, now that you point out the C++ thing, I ain't gonna use any of this noob's shyt!!!
Just kidding again!!!
if you already have the batch file ready, it would be easier to port it over to C# ... if you need any help with that, i gotcha ... C++ really shouldnt be dealt with unless you really know what you're doing with it
overground said:
I learned a long time ago not to discount someone just because there's a "Junior Member" next to their username. Some of the greatest developments on here have come from a one time JM, even when they were JM's. Good luck with this, and welcome to the community. That being said, you'd better not [email protected]#$ up anyone's phone or computer!!! Just Kidding
Click to expand...
Click to collapse
Agree 1000000%
and I will be more than happy to be a tester. I will be following this thread from now on. Thanks for your time and effort. Keep the good work
isn't just the same thign using the command promt with adb? x_x is what i use..
kickfliprock13 said:
Ok well I am working on making a switchrom rom .exe and so you can Backup and Restore and everything through your computer so you dont have to type any code or anything and I have the backup part done.
My only problem is that I am using C++ to do it and I really need to enter a string into a system command, for example
system("adb shell sh /system/sd/switchrom.sh -s "mystring;""); but whatever I do I can't get it to work
if anyone knows how to do this please help. I am kinda a noob at C++
Click to expand...
Click to collapse
It's been a few years since I've done C++, but I *think* you can just concatenate the strings together, also using the \ to escape the needed " marks. Something like this:
Code:
#include <string>
int main() {
string mystring;
string command;
mystring = "nandroidBackupROMName"; // or whatever your string is
command = "adb shell sh /system/sd/switchrom.sh -s \""; //first partt
command = command + mystring; //add the mystring
command = command + "\""; //close the command with the "
system(command);
return 0;
}

HTC Android Stay Safe Project

Table of Contents:
Status
Purpose
Audience
Instructions
Download
ROM list to use with the app
STATUS:
UPDATE:
I'm abandoning this project for the time being. I would like to have this integrated into the installer as a separate option and not rely on an app to handle this. If anyone wants to pick it up or extend things further, I'm definitely open to it. I just don't see a need for this at this time.
However, the source is still on GC and should help aspiring app makers get an idea for a basic UI and some interesting features.
Beta is out. It's working and ready to install on Cupcake and Donut.
If you are using it to create Hero, make sure you're running it. If you want Donut.. make sure you're running that, etc. It uses the currently running ROM for apps so it must match the new one or you might have issues with it. Requires root access. No way around that.
---------------------------------------------------------------------------------------
Purpose:
Due to issues regarding distribution of closed sources for ports of Android, this will handle backing up your licensed proprietary sources, an update you want to try and will put the sources into a final image and eventually partition if desired. You then rename NEW_system.ext2 to system.ext2 on your SD card's root folder and reboot.
---------------------------------------------------------------------------------------
Instructions
There will be a single app released soon!
1.) Install the APK
2.) Create a folder "update" on the SD card
3.) Place the update.sh file in /sdcard/update/
4.) Place a system.sqsh in the same folder.
5.) Run the app on the phone, click "Begin!" and let it do its thing.
6.) Take the "NEW_system.ext2" file on the SD card, rename it to "system.ext2" and remove or rename any existing system files.
7.) Reboot and enjoy
---------------------------------------------------------------------------------------
Download it here:
Google Code Page
Installable APK v1.0 BETA
Currently requires update.sh
---------------------------------------------------------------------------------------
This is an open project to be developed with others to bring a simple, shared interface that is compatible for any device running Android but of course with our phones in mind.
---------------------------------------------------------------------------------------
I wish I knew anything about development then I'd help, this is a good idea though. I'll try and support it in some way.
TheKartus said:
I wish I knew anything about development then I'd help, this is a good idea though. I'll try and support it in some way.
Click to expand...
Click to collapse
if you can't develop, I'd love feedback, bugs, ideas. I will eventually spin this into an open Market and later a Maps app. There's been talk about replacing these apps but nothing actually done. I was up all night with the Internet in one hand and Eclipse in the other and got this far for never having made anything like this.
This is a fantastic. I will support it fully. I am currently using a 1.5 build but I don't call which one it is because I've gone through so many versions and different roots, images and edits to my default.txt. It's a MUTT, I guess.
I am a Kaiser/Tilt user and was going to leave ATT until I decided to look into Android builds you and others offer.
Thanks a ton.
im getting fc/waits with the beta... by the way how long should the process take to backup. thanks nate
Running Cupcake or Donut? Is that once it starts running? It does not like to have a command run this long so it might just be that. Hasn't happened once for me running my Dark Donut though.
The backup is about 5 minutes or so mostly for dd'ing an ext2 image and then copying the apps. Once I hard code the script in I can make it show the progress. Also, each step will be a separate command so it shouldn't FC/wait on you. You can watch the progress by running:
Code:
tail -f /sdcard/update/update.log
which is what the app will do when I can get the update.sh verified by others that it's working correctly
And it is working for you right?
enatefox said:
Running Cupcake or Donut? Is that once it starts running? It does not like to have a command run this long so it might just be that. Hasn't happened once for me running my Dark Donut though.
The backup is about 5 minutes or so mostly for dd'ing an ext2 image and then copying the apps. Once I hard code the script in I can make it show the progress. Also, each step will be a separate command so it shouldn't FC/wait on you. You can watch the progress by running:
Code:
tail -f /sdcard/update/update.log
which is what the app will do when I can get the update.sh verified by others that it's working correctly
And it is working for you right?
Click to expand...
Click to collapse
it worked, i kept hitting wait and it didnt tell me when it was finished(the ui just froze idk). it gets the job done thanks man!
update.log
Code:
Backing up apps...
Mounting sqsh image...
Creating new system image
Transfering update sqsh to ext2...
edit i was running jeterblur but i was using the ion09/09/09.sqsh
It should say it finished. The log looks like it didn't finish. I'll try testing the script in the app itself and that should alleviate the strain on the system. It taps like 30-40% of CPU while it's running so if you have a bunch of processes it could be interfering. At least you're saying it's working too
I must be doing something wrong.
1. I put the dark donut clean build in my /storage card/updae folder along with the update.sh;
2. Ran android with an old Ion build (brand new data.img file)
3. Installed and ran stay safe
I had to press wait 5 times, and after 5 minutes it finished.​4. Before I reset the phone I moved the NEWsystem file into a new folder off the sdcard root
5. Then restarted the phone
6. In W.M. moved the ion data and system files to another folder
7. Renamed the NEWsystem (200mb) file to system
8. Put on root and ran harnet.
It booted, created a data file and is running great.​
The issue is, no added apps. It is exactly the same as the clean version.
Any ideas?
If you're making a Donut image, you should be running Donut on the phone to keep the versions correct. I'm going to make an update probably tomorrow that will have better error handling. It does do a cleanup at the end. If you edit update.sh (which is all the app runs) to remove these lines it will keep the apps it backs up:
rm -r "$app_base"
rm -r "$app_mountbase"
rm -r "$app_updatefolder/cmd"
rm -r "$app_ext2mount"
rm -r "$app_sqshmount"
Click to expand...
Click to collapse
It finds the apps through a grep pattern. On the full ROM, run this in ADB/terminal and see if it matches the apps:
ls /system/app/ | egrep -i 'vending|office|maps|street|gmail|market|youtube|setupwizard
Click to expand...
Click to collapse
enatefox said:
If you're making a Donut image, you should be running Donut on the phone to keep the versions correct. I'm going to make an update probably tomorrow that will have better error handling. It does do a cleanup at the end. If you edit update.sh (which is all the app runs) to remove these lines it will keep the apps it backs up:
It finds the apps through a grep pattern. On the full ROM, run this in ADB/terminal and see if it matches the apps:
Click to expand...
Click to collapse
I just tried it with the tmo donut build and your clean dark donut build; same result. So I removed the lines from the update.sh file and now the phone freezes. I let it sit for 30 mins, the rebooted the phone. It did grab the obdx? and apk files, but when I tried to manually install them, (after allowing non market apps) I get a "Program Name couold not be installed on this phone"
slight edit; I re-edited the file, now i does not freeze, but it still does not load the apps and the pulled apps will not install
I'm abandoning this project at this point. I'd like to have this integrated into the rootfs.img as an option at install time. If someone wants to pick it up or wants to take this further, I'm open to that. The source should help people out who would like to make an app though.

Got Gapps working on 2.0, but I need some guidance from experienced devs..

I've been trying to get a build going from aosp-master for the past week and I think I've finally cracked it.. As far as I can tell I've got all the google apps working, everything syncs up properly including contacts.. but I need some help setting up what have become the standard features of a custom rom. I asked some of this in Q&A the other day but I don't think any devs go in there any more, and I don't blame you. These questions probably belong here anyway..
1) Whats the proper process for rooting a self-built rom? I managed to hack something together by changing the permissions on sh and su, but it won't work on my current build and it probably opened up security holes everywhere. How do you lot do it?
2) What's the correct way to set up a2sd? I've put cyanogen's script in my init script (launched as a one shot service from init.rc) but I'm not sure if it's working properly, or if that's the accepted way of doing things.
3) Where should I set up the links for busybox, in my init script or somewhere else? It doesn't seem to be working from there..
4) The initial boot of my current build is a bit messy.. I get a selection box asking me to choose from 2 setup apps (google or the default), but I don't know how to remove the default one. I'm not using the SdkSetup package or anything..
Any help would be very much appreciated.
1) Make sure adb runs as root (init.rc), and add the modified su binary and Superuser.apk's from one of the other builds.
2) Usually, A2SD scripts are launched as one-shot services via init.rc.
3) Not in the init script... Not sure where, exactly, as the shell doesn't bother to read any "on-launch" scripts
4) To remove that, i'm pretty sure you have remove one of them completely, by deleting the APK.
Hope that helps...
Oh, and POST IT NAUW!
I didn't think there were any eclair video drivers available yet for the G1?
goldenarmZ said:
I've been trying to get a build going from aosp-master for the past week and I think I've finally cracked it.. As far as I can tell I've got all the google apps working, everything syncs up properly including contacts.. but I need some help setting up what have become the standard features of a custom rom. I asked some of this in Q&A the other day but I don't think any devs go in there any more, and I don't blame you. These questions probably belong here anyway..
1) Whats the proper process for rooting a self-built rom? I managed to hack something together by changing the permissions on sh and su, but it won't work on my current build and it probably opened up security holes everywhere. How do you lot do it?
2) What's the correct way to set up a2sd? I've put cyanogen's script in my init script (launched as a one shot service from init.rc) but I'm not sure if it's working properly, or if that's the accepted way of doing things.
3) Where should I set up the links for busybox, in my init script or somewhere else? It doesn't seem to be working from there..
4) The initial boot of my current build is a bit messy.. I get a selection box asking me to choose from 2 setup apps (google or the default), but I don't know how to remove the default one. I'm not using the SdkSetup package or anything..
Any help would be very much appreciated.
Click to expand...
Click to collapse
If you still need help, hit me up somewhere other than here where we can have more than a post-to-post convo. I can help ya sort it out.
bkmo said:
I didn't think there were any eclair video drivers available yet for the G1?
Click to expand...
Click to collapse
There aren't. That just means no HW acceleration. I think barak got them working though.
Got them working too, tried the one from the Milestone GSM dump and it worked.
But they won't sync, they won't find the server, any idea?
Got them working too, tried the one from the Milestone GSM dump and it worked.
But they won't sync, they won't find the server, any idea?
I got Calendar working on Twisted's mod of the x3 rom. I pulled and pushed a whole bunch of apk's dealing with Google and Google Service Providers, but I didn't note which wound up working. Couldn't get any of the other GApps working though and I continually get gapps and acore FCs. I'll poke around and see if I can remember how I got Calendar up and working so I can actually contribute to this conversation next time
I can't get the su binary to work.. i just get permission denied, it doesn't even try to call the superuser app.
My sync is definitely working, but it seems slow.. It just took me 5 minutes to get an email on the device.. I'm not sure what's happening there, I'll look into it tomorrow.. at which point I'll also try to remember how I got the damn thing working in the first place so I can maybe help others out.
Right now I'm so tired my eyes are bleeding... I think I'll go to bed.
goldenarmZ said:
I can't get the su binary to work.. i just get permission denied, it doesn't even try to call the superuser app.
My sync is definitely working, but it seems slow.. It just took me 5 minutes to get an email on the device.. I'm not sure what's happening there, I'll look into it tomorrow.. at which point I'll also try to remember how I got the damn thing working in the first place so I can maybe help others out.
Right now I'm so tired my eyes are bleeding... I think I'll go to bed.
Click to expand...
Click to collapse
adb remount
adb shell
cd /system/bin
cat sh > su
chmod 04755 su
Should work now.
Hey, SUID'd sh is cheat! It's not real su!
Joushou said:
Hey, SUID'd sh is cheat! It's not real su!
Click to expand...
Click to collapse
Its a step forward
if you don't mind my asking, how did you get the google apps to sync up?

[DEV] PSFreedom(PSJailbreak) Android Port

I think all of you PS3 owners here already know about the Jailbreak tool that allows you too execute unsigned code on the PS3. That opens the console for a lot of homebrew possibilities(mplayer port maybe?). The source code for the exploit leaked and a dev called KaKaRoTo managed to get it to be executed from a N900. Yesterday KaKaRoTo released his souce code and today someone already ported it to the Palm Pre. This quick port was possible because the N900 and Palm Pre both share the same USB controller(mUSB) which happens to be the controller used by the Droid/Milestone.
Here is some info from KaKaRoTo's blog:
Q: How hard is it to port it to a new device ?
A: Well, I’ve just separated my code from the N900 specific stuff, so it’s quite easy, there are mainly two functions to write, one to get and one to set the USB address.. two other functions that only return some static result depending on the configuration of the controller (the name of the endpoints, and whether the controller supports high speed or full speed mode).
Read the README file provided with PSFreedom, and check the psfreedom_machine.c file for specifics on what to implement.
Q: How can I port it to a new device.
A: Well, first, you need to figure out what controller your device uses, in the case of the N900, it’s ‘musb’..
Then go to the driver code for that controller (probably in drivers/usb/gadget) and look for ‘SET_ADDRESS’. In the case of musb, it was in drivers/usb/musb/musb_gadget_ep0.c. In there it was setting the address to the USB device, so just copy that code into the psfreedom_machine.c to allow setting the address, and add a similar function to be able to retreive the address.
Then add a function to return 0 or 1 depending on whether the controller supports HIGH, FULL or LOW speed mode (go to usb_gadget_register_driver for your controller, and in the first lines, it should validate the speed argument, it will tell you which ones are acceptable), set LOW speed mode to return TRUE only if FULL speed isn’t available .
Finally, add a function to return the endpoint names.. it will usually be something like ‘epXin’ and ‘epXout’ (where X is the endpoint number), or “epXin-bulk”, etc.. look at how the driver initializes its endpoints or grep for “->name” in the file to find where it sets it…
That should be enough!
Ok this is it for now with the FAQ. Next time, I’ll tell you all about my experience, what problems I encountered and how I fixed them, maybe it will help others!
Click to expand...
Click to collapse
http://kakaroto.homelinux.net/
Some people over the HTC Desire boards are already working on a port but Desire's controller is a different one(MSM72K) so they might take some time and it will be of no use for us
http://forum.xda-developers.com/showthread.php?t=772795
So, any dev here willing to give it a try?
according to zzg in the desire forum, this is what you need to do. no source changes.
Well you don't really need any changes to get it compiled against Droid's kernel, a quick and dirty way by looking at psfreedom's make file:
make -C /path/to/droid/kernel/source M=/path/to/psfreedom/source ARCH=arm CROSS_COMPILE=/path/to/android_ndk/tree/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/arm-eabi- EXTRA_CFLAGS=-DENABLE_MUSB_CONTROLLER modules
Click to expand...
Click to collapse
You can get the source from motorola.
Has anyone been successful with the exploit?
On the wiki it shows that it's in progress, but no info on who is working on it
hxxp://psfreedom.com/wiki/index.php?title=Device_compatibility_list
The guys over in the Milestone thread are beginning to get somewhere it seems, and someone in the desire thread said they've almost got the Milestone version working.
Not sure it means anything to the droid-ers though
Ahhhh I want a Droid version! I wish I could code!
Patiently waiting for the Motorola Droid Port....
Anybody know who is working on milestone/droid port?
desolateone1 said:
according to zzg in the desire forum, this is what you need to do. no source changes.
You can get the source from motorola.
Click to expand...
Click to collapse
Tried that. It didn't work, though I'm not familiar with configuring kernels. I have a compsci degree, but I just haven't ever played with them. Didn't figure it'd be as simple as this but thought I'd give it a go for the community... anyone want to give me a new clue?
Edit: I configured the kernel with 'make defconfig'
Where did you get the motorola source kernel?
https://opensource.motorola.com/sf/projects/droid
http://tinyurl.com/droid-ks-ese81
http://android.git.kernel.org/?p=ke...1;hb=34485287cb92a298eb6110926b729bf40bf3ba69
The third link is to the kernel space tree and I took the "snapshot" from there.
Got the NDK from here...
http://developer.android.com/sdk/ndk/index.html
Confirmed working!!!
place linked files on root of sdcard
First do nandroid backup!
Then reboot into recovery fire up adb and
"adb shell"
"#cd /sdcard"
"#flash_image boot boot.img"
reboot into ROM normally
open a terminal
"$su"
"#mount -o remount,rw /system"
"#mv psfreedom.ko /data/psfreedom.ko"
"#insmod /data/psfreedom.ko"
Then do the normal Jailbreak/PSgroove/PSFreedom power off on and quickly hit eject
It will take a little longer to boot (this is good)
Then under the "Game" tab it will show two new icons "/app_home/PS3/Game" and "Install Package Files"
Done using Cyanogenmod 6
Excellent job devs!
Links: hxxp://dl.dropbox.com/u/8949251/psfreedom.ko
hxxp://dl.dropbox.com/u/8949251/boot.img
freehood4all said:
Confirmed working!!!
place linked files on root of sdcard
First do nandroid backup!
Then reboot into recovery fire up adb and
"adb shell"
"#cd /sdcard"
"#flash_image boot boot.img"
reboot into ROM normally
open a terminal
"$su"
"#mount -o remount,rw /system"
"#mv psfreedom.ko /data/psfreedom.ko"
"#insmod /data/psfreedom.ko"
Then do the normal Jailbreak/PSgroove/PSFreedom power off on and quickly hit eject
It will take a little longer to boot (this is good)
Then under the "Game" tab it will show two new icons "/app_home/PS3/Game" and "Install Package Files"
Done using Cyanogenmod 6
Excellent job devs!
Links: hxxp://dl.dropbox.com/u/8949251/psfreedom.ko
hxxp://dl.dropbox.com/u/8949251/boot.img
Click to expand...
Click to collapse
So just to make sure I am understanding correctly you are saying that this method is confirmed working for the droid? If so where did the work come from? Was this recompiled from another platform and if so what is the source?
-Z
zerosignal0 said:
So just to make sure I am understanding correctly you are saying that this method is confirmed working for the droid? If so where did the work come from? Was this recompiled from another platform and if so what is the source?
-Z
Click to expand...
Click to collapse
Yes I have tested and it works, I have already backed up a game, and used the ftp server.
The work came from several people in #PSFreedom on irc.freenode.net
I think you are asking how was the module compiled, afaik it was from a 2.6.32 droid kernel.
Also you should note that when you flash the modded boot image Charging does NOT work you should have adequate battery BEFORE trying and you should flash back to your old boot image with an advanced nandroid restoring the boot image.
freehood4all said:
Yes I have tested and it works, I have already backed up a game, and used the ftp server.
The work came from several people in #PSFreedom on irc.freenode.net
I think you are asking how was the module compiled, afaik it was from a 2.6.32 droid kernel.
Also you should note that when you flash the modded boot image Charging does NOT work you should have adequate battery BEFORE trying and you should flash back to your old boot image with an advanced nandroid restoring the boot image.
Click to expand...
Click to collapse
Awesome! Thanks for the info, I was just wondering where the dev work was coming from. Also thanks a bunch for the boot_image heads up because I was just about to flash it over but wouldnt have been able to test it for a few hours.
-Z
So this may seem like a dumb question but I have the backup manager files and such but am not sure where on the sdcard to place it. Also what is the path you are supposed to use on the hdd (both internal and external) to place backups and write backups?
zerosignal0 said:
So this may seem like a dumb question but I have the backup manager files and such but am not sure where on the sdcard to place it. Also what is the path you are supposed to use on the hdd (both internal and external) to place backups and write backups?
Click to expand...
Click to collapse
Place any .pkg files on the root of a thumb drive thats formated to FAT32
As for backups you can put backups under /dev_hdd0/game/LAUN12345/GAMEZ "This is the path if you are using the original backupmanager.pkg and not some stealth backupmanger"
For games on an external I believe you put a folder named "GAMEZ" on the root of HDD. I haven't tried with external yet, so correct me if I'm wrong.
I will let you know when I get out of work. I have setup and saved my rom with the kernel changes so I can quick change when necessary. Thanks for the update on the file paths as well.
-Z
I'm totally lost right now can someone walk me through on how to do this? I have cm6 on my droid
You essentially are kinda following the same steps for flashing the boot image for getting manual root and some older roms. The instructions are pretty straightforward but make sure that you take a nandroid backup before making any changes.
I am running chevys SS 4.7 rom but I believe the kernel versions should be the same. As soon as I get out of here Ill update with the results.
-Z

[Tool]Noob proof(ish) android helper

Hello people who are interested, I created a program!!!! This program is mainly for beginners since they don't know adb commands (including fastboot), but I use this program just to make it easier on me, especially as an easier way to do backups. How it works is that once you hit the execute (or similar) button it just puts the properly formatted command into the command prompt.
I have to put this part in so that someone doesn't sue me or something because they accidentally bricked their phone or tablet from my program and I'm pretty sure that it isn't my program's, but I'd be more than glad to help, but back to the subject: I am not responsible for any and all damages done to your phone due directly because of my program or whatever you've used my program for. I'd be glad to help you with any problems, but I only have limited knowledge of Android, so I'll probably end up just telling you somewhere you could go to maybe find the answer, if I can.
One of the last things I want to do is thank Hashcode because without him I wouldn't have gotten into android as much because he's basically the only person who will work with Kindle as he's made numerous advances with it, making it a tablet I actually like. THANKS HASHCODE.
PLEEEEZ pm me, post a reply, or thank me if you use this at all and like it, if you don't I'll probably end up destroying any evidence of it (except my own copy) and plus it'll make me feel happy that I'm actually helping people by making this. If you tell me any suggestions you have, I will try to work it in if at all possible, but no guarantees.
Download for v2.0 attached. Download link (dropbox) for v1.1 at bottom.
Features of v1.1:
FireFlash installer (with necessary files)
easy adb connect
restore with boot, recovery, and system .img's
moving of .zips
moving of files
Unlock device walk through for HTC phones
Flash .zips with adb sideload
Flash file into a partition using fastboot
Install .apks
Root with Restore
Install Drivers
Able to set colors of the command prompt window
Features of v3.1
fixed adb sideload not working at all
Improved backup (Now it's checkboxes not radio buttons and asks if you want to overwrite if the custom named backup already exists)
Features of the future (features that may appear in future versions):
Root with Restore in program form (will need permission from Bin4ry)
Driver installer (will just link to the program that's already packaged in the program)
HTC unlock walkthrough
ability to save configuration in fastboot (saves variables and maybe partition)
remember last session (text boxes will already be filled in with previous info)
An installer (only if its requested by people, since I'd have to learn how to make the installer)
if you'd like to see other features added, I'm open to suggestions (pm me or post right here on the thread)
Dropbox Links for v1.1:
.zip download
.exe (self extracting 7z) download No uncompression program needed!:victory:
Note: Sorry about not updating in a while, I'm actually having a life this summer so I might actually update this LESS until school gets back in, unless people tell me to update it more (Pleeez tell me, I realllllllly would like to know if I'm helping people, it would make my day!)
Beta!
This area is for BETA!!
Current features in beta:
NONE! No beta right now, but v4.0 beta will be coming soon
Click to expand...
Click to collapse
Soon updating will become more regular as school is letting out this week. If you want to see my source code, I'd be glad to post my vb solution, but at this point it would just take up time I don't have much of.

Categories

Resources