Edify sleep/pause, is there a function? - HTC EVO 3D

Whats up, everyone?
Does anyone know if there is a function for edify scripting that will cause it to sleep/pause. I have some text in my script that I would like to display for a few extra seconds.
Thanks for any help

i dont know it myself, but check out the synergy format all zip. it has a 10 second delay, so it'll be in there.

Sweet!
Thanks dude

dkdude36 said:
i dont know it myself, but check out the synergy format all zip. it has a 10 second delay, so it'll be in there.
Click to expand...
Click to collapse
Looking at the script it seems like the pause is caused by the deletion process it is running, not by an actual pause function.
Thanks though...

would
Code:
run_program("sbin/sleep", "6")
work like
Code:
sleep(6);
does in C when working on a *NIX system?

Bamba1260 said:
would
Code:
run_program("sbin/sleep", "6")
work like
Code:
sleep(6);
does in C when working on a *NIX system?
Click to expand...
Click to collapse
Nope, sure doesn't lol.

Bamba1260 said:
Looking at the script it seems like the pause is caused by the deletion process it is running, not by an actual pause function.
Thanks though...
Click to expand...
Click to collapse
my bad. that's the only place i've seen anything pause before so yeah i have no idea.

dkdude36 said:
my bad. that's the only place i've seen anything pause before so yeah i have no idea.
Click to expand...
Click to collapse
It's all good, thanks for the tip.
Anyone else want to chime in?? You are more then welcome too

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

Bamba1260 said:
Anyone else want to chime in?? You are more then welcome too
Click to expand...
Click to collapse
Bamba1260 said:
would
Code:
run_program("sbin/sleep", "6")
work like
Code:
sleep(6);
does in C when working on a *NIX system?
Click to expand...
Click to collapse
short answers: no, updater-script will not use C functions or codes. although the custom recovery is mostly coded and compiled in C/C++, the actual update-script binary reads and executes "edify" commands from the updater-script.
although, the first command you quote, could work, run_program("sbin/sleep","6"). i'll give the technical explanation below since both of the ppl posting in this thread seem to be fairly knowledgable!
long more technical answers with some background:
sleep is an applet/binary compiled as part of busybox. all *good* custom recoveries include a busybox binary. most of them compile in the majority of busybox functions so their included busybox has all the standard features.
now, with all that said, recoveries generally install their busybox binary to the /sbin directory and generally also install all the applets whether actual separate binaries or symlinks back to the main busyboxy in the /sbin directory too.
you can include in your updater-script, the simple call to the /sbin/sleep binary, assuming the custom recovery has the sleep applet compiled into the busybox binary they distribute packaged with their custom recovery.
worse case, there is no sleep binary compiled into their busybox included in the custom recovery.
quick work around would be to include your own sleep binary in your .zip file. simply extract the sleep binary to /tmp and run_program from /tmp/sleep. similar to how we extract flash_image to /tmp and run_program /tmp/flash_image .. or any other binary really.
for starters, if the sleep binary is compiled as part of busybox and included as a symlink or separate applet, this command should work: run_program("/sbin/sleep","6") (notice i added a / infront of /sbin which wasnt in the original post quoted above).
if /sbin/sleep is not present, try /sbin/busybox sleep 6 and see if sleep is present in the busybox binary.
if that doesn't work, the sleep binary is not present and will probably have to be supplied in the update .zip file.
if you're interested in alternatives to accomplish the same goal, provide a delay, might put some type of load or heavy processing of random junk in order to delay the system before continuing to the next argument. this approach, is definitely less than ideal.
hope that helps!

joeykrim said:
short answers: no, updater-script will not use C functions or codes. although the custom recovery is mostly coded and compiled in C/C++, the actual update-script binary reads and executes "edify" commands from the updater-script.
although, the first command you quote, could work, run_program("sbin/sleep","6"). i'll give the technical explanation below since both of the ppl posting in this thread seem to be fairly knowledgable!
long more technical answers with some background:
sleep is an applet/binary compiled as part of busybox. all *good* custom recoveries include a busybox binary. most of them compile in the majority of busybox functions so their included busybox has all the standard features.
now, with all that said, recoveries generally install their busybox binary to the /sbin directory and generally also install all the applets whether actual separate binaries or symlinks back to the main busyboxy in the /sbin directory too.
you can include in your updater-script, the simple call to the /sbin/sleep binary, assuming the custom recovery has the sleep applet compiled into the busybox binary they distribute packaged with their custom recovery.
worse case, there is no sleep binary compiled into their busybox included in the custom recovery.
quick work around would be to include your own sleep binary in your .zip file. simply extract the sleep binary to /tmp and run_program from /tmp/sleep. similar to how we extract flash_image to /tmp and run_program /tmp/flash_image .. or any other binary really.
for starters, if the sleep binary is compiled as part of busybox and included as a symlink or separate applet, this command should work: run_program("/sbin/sleep","6") (notice i added a / infront of /sbin which wasnt in the original post quoted above).
if /sbin/sleep is not present, try /sbin/busybox sleep 6 and see if sleep is present in the busybox binary.
if that doesn't work, the sleep binary is not present and will probably have to be supplied in the update .zip file.
if you're interested in alternatives to accomplish the same goal, provide a delay, might put some type of load or heavy processing of random junk in order to delay the system before continuing to the next argument. this approach, is definitely less than ideal.
hope that helps!
Click to expand...
Click to collapse
Thanks Joey, I appreciate the insight!
I know C code won't work in an updater-script lol, I was just using it as a familiar reference point.
As for the the sleep binary, I had no Idea about it! Makes complete sense now though. I just fixed my "test" script with the proper placements of /, and unfortunately still no luck. I also tried seeing if busybox had a sleep binary, and no luck either.
So my question now is, where would I go about finding a sleep binary for android phones?
EDIT:
Nevermind I found one!

Alright well I found a sleep binary, but I still can't get it to work..
Is this correct? Assuming the sleep binary is not in any folders other then the zip.
Code:
package_extract_file("sleep", "/tmp/sleep");
run_program("/tmp/sleep", "6");

Bamba1260 said:
Alright well I found a sleep binary, but I still can't get it to work..
Is this correct? Assuming the sleep binary is not in any folders other then the zip.
Code:
package_extract_file("sleep", "/tmp/sleep");
run_program("/tmp/sleep", "6");
Click to expand...
Click to collapse
yea, that is a good start.
1) the above command assumes the sleep binary is in the root of your .zip file.
2) i'd recommend one tweak, set the binary chmod 755 to make sure you have permission to execute before sending the execute command.
set_perm(0, 0, 0755, "/tmp/sleep");
also, you can manually test before you setup the updater-script code. boot into recovery, adb push sleep to /tmp. chmod 755 /tmp/sleep. try sleep 6 and the command prompt should hang for 6 seconds and then return. we're also assuming the sleep binary takes input in seconds, which seems most logical.
assuming all works according to plan the final updater-script should be something similar:
package_extract_file("sleep", "/tmp/sleep");
set_perm(0, 0, 0755, "/tmp/sleep");
run_program("/tmp/sleep", "6");
if that works, feel free to post up your sleep binary and help anybody else who might come across this thread searching.
hope that helps!
for reference, i used the following to links to make sure my updater-script syntax on perfectly correct. no typos allowed in programming!
http://forum.xda-developers.com/showpost.php?p=11027417&postcount=1
http://www.synfulgeek.com/main/inde...d-off-of-kernel-source-code&catid=57:articles

joeykrim said:
yea, that is a good start.
1) the above command assumes the sleep binary is in the root of your .zip file.
2) i'd recommend one tweak, set the binary chmod 755 to make sure you have permission to execute before sending the execute command.
set_perm(0, 0, 0755, "/tmp/sleep");
also, you can manually test before you setup the updater-script code. boot into recovery, adb push sleep to /tmp. chmod 755 /tmp/sleep. try sleep 6 and the command prompt should hang for 6 seconds and then return. we're also assuming the sleep binary takes input in seconds, which seems most logical.
assuming all works according to plan the final updater-script should be something similar:
package_extract_file("sleep", "/tmp/sleep");
set_perm(0, 0, 0755, "/tmp/sleep");
run_program("/tmp/sleep", "6");
if that works, feel free to post up your sleep binary and help anybody else who might come across this thread searching.
hope that helps!
for reference, i used the following to links to make sure my updater-script syntax on perfectly correct. no typos allowed in programming!
http://forum.xda-developers.com/showpost.php?p=11027417&postcount=1
http://www.synfulgeek.com/main/inde...d-off-of-kernel-source-code&catid=57:articles
Click to expand...
Click to collapse
Haha yeah I know all about strict syntax. I taught myself C, C++, python and now Java lol. I'll work on it more tonight and let you know how it goes, sadly I'm in class now lol.
Thanks for the links, I'll definitely check them out.

joeykrim said:
yea, that is a good start.
1) the above command assumes the sleep binary is in the root of your .zip file.
2) i'd recommend one tweak, set the binary chmod 755 to make sure you have permission to execute before sending the execute command.
set_perm(0, 0, 0755, "/tmp/sleep");
also, you can manually test before you setup the updater-script code. boot into recovery, adb push sleep to /tmp. chmod 755 /tmp/sleep. try sleep 6 and the command prompt should hang for 6 seconds and then return. we're also assuming the sleep binary takes input in seconds, which seems most logical.
assuming all works according to plan the final updater-script should be something similar:
package_extract_file("sleep", "/tmp/sleep");
set_perm(0, 0, 0755, "/tmp/sleep");
run_program("/tmp/sleep", "6");
if that works, feel free to post up your sleep binary and help anybody else who might come across this thread searching.
hope that helps!
for reference, i used the following to links to make sure my updater-script syntax on perfectly correct. no typos allowed in programming!
http://forum.xda-developers.com/showpost.php?p=11027417&postcount=1
http://www.synfulgeek.com/main/inde...d-off-of-kernel-source-code&catid=57:articles
Click to expand...
Click to collapse
Well, I can get it to work when I shell in, but not from a flashable. I am going to keep trying different ways.

Bamba1260 said:
Well, I can get it to work when I shell in, but not from a flashable. I am going to keep trying different ways.
Click to expand...
Click to collapse
lol i know this is a really old thread, but do you know if there is a way to do this?

Punchieo said:
lol i know this is a really old thread, but do you know if there is a way to do this?
Click to expand...
Click to collapse
run_program("/sbin/sleep", "10");
sleep is part of recovery binaries,
what they didn't set proper permissions on the sleep binary they copy to tmp
set_perm(0, 0, 0777, "/tmp/sleep");

Related

Securing your android after ROOT

Hello everyone,
Its been great to have root on your X10 using the method posted here:
http://forum.xda-developers.com/showthread.php?t=711907
Well, this method works all right but I did some investigating of my own to audit the state of the system after its been rooted. Thanks to the discussions you may find here: http://forum.xda-developers.com/showthread.php?t=712178, the original developers soon chose to update the Rooting tutorial with some additional steps (See post #2 and #4 of the rooting thread). This is all good, because now you have the real power to act as a the *real* superuser i.e uid 0.
Most of the discussions that follow are only intended for users who are well versed with general *NIX security and concepts about user ids, permissions and other things. So please disregard this post if you have no ideas of these concepts.
Ok, so first things first. I basically followed the root tutorial as it is all the way upto step3 (or step3a as in my case). Remember, you essentially have a rooted phone right after step2, step3/3a just adds the updated baseband firmware, which has no effect whatsoever on the subsequent things that you do to your phone.
Well essentially, what I did do was install the "su" binary and the "Superuser.apk" following in the lines of step4v2 (post #2 in root thread). These are essential to give you control over your system as without them you are simply relying on a hacked "sh" binary which runs with elevated privileges. Here are the file permission masks for the "sh" binary which gets installed after the FOTA in step2:
Code:
# ls -l sh
ls -l sh
-rwsrwsrwx root root 86944 2010-06-28 18:08 sh
#
Wait!!! This is *not* quite ok. What this means is that any process can use this binary to gain super user privileges. This binary is setuid and setgid root!!!
Well you might say that... so is the case for "su":
Code:
# ls -l su
ls -l su
-rwsrwsrwx root root 22120 2010-06-28 08:08 su
#
But, this is different because its use is controlled by the Superuser Whitelist application that was installed with Superuser.apk.
This difference is crucial because if any non-privileged application and process forks and execs "su", the Superuser Whitelist app would immediately post a notification screen on the phone and provide options to allow or disallow.
With the "sh" binary installed on your phone as it is, you are basically inviting *any* application to be able to do anything it wants to your phone... and all this without your knowledge!!!
To test this theory, all you need to do is simply install one of the terminal emulators floating around the market or use the one provided in the rooting thread under the step4/app folder and launch it. It straight away, launches you into a root shell. Here is a screen shot of what you can do this way:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(Remember, no warnings, no notifications and all this can be done by any app under the hood)
Here is what you can do to make your phone more secure.
Step1: Download an alternative shell or simply change the permissions on the "sh" binary:
Code:
# cd /system/bin
# chmod 755 sh
Step2: In case you downloaded an alternative shell like "bash" and copied it under your /system/bin folder, simply get rid of the original "sh" binary and create a symlink to the one you download, for ex: bash:
Code:
# cd /system/bin
# rm sh
# ln -s bash sh
(Note: the above steps assume that you have /system mounted as rw, if you don't know what that means, then you should not be reading this, sorry)
Remember, when installing any alternative shell make sure that its permission mode is set to 755 or lower. I recommend to *never* set the setuid and setgid bits on the shell!!!
Here is what I did personally:
Installed bash from here: http://forum.xda-developers.com/showthread.php?t=537827
Installed it under /system/bin *without* the setuid and setgid bits
Removed the "sh" binary
Created a symlink named "sh" to the binary "bash"
This way, whenever I launch "adb shell" or use any terminal emulator on my phone, I always get a un-privileged shell. To get root, simply fire "su".
PS: This information is not intended for casual users who have limited or no knowledge of UNIX or UNIX like sytems like Linux, Adrdoid SDK commands like adb or don't know their way around if faced with a command line!!!
PS: Another post with some steps to properly secure the system: http://forum.xda-developers.com/showthread.php?t=712945
lmao..
http://forum.xda-developers.com/showthread.php?t=712945
zephyrix said:
lmao..
http://forum.xda-developers.com/showthread.php?t=712945
Click to expand...
Click to collapse
lol, you must've done this while I was writing mine!!
Anyways, its good to have this info out and I do point out some concepts detailing *why* this is a problem.
Definitely.
Make sure people have installed a proper way to elevate to root before attempting to change sh to not setuid, or they may screw themselves over lol
Thanks for your guide! Much appreciated would be an understatement.
is there any other way of testing that as using tht method in ur given picture now says read only error does this mean i successfully secured my root?
bcool15 said:
is there any other way of testing that as using tht method in ur given picture now says read only error does this mean i successfully secured my root?
Click to expand...
Click to collapse
Oh... I think I forgot to show this, but essentially you need to get the system partition into read/write mode as well. So it will be one more command before the write is attempted:
# mount -o remount,rw -t yaffs2 /dev/mtdblock2 /system
...
...
# echo "I can...
j4mm3r said:
Oh... I think I forgot to show this, but essentially you need to get the system partition into read/write mode as well. So it will be one more command before the write is attempted:
# mount -o remount,rw -t yaffs2 /dev/mtdblock2 /system
...
...
# echo "I can...
Click to expand...
Click to collapse
thats the command which stoppped wrkin so i just redid whole rooting procedure with new v3 update does it still need securing?
bcool15 said:
thats the command which stoppped wrkin so i just redid whole rooting procedure with new v3 update does it still need securing?
Click to expand...
Click to collapse
Dont worry about the example shown in the screen shot. That is just to illustrate what a setuid "sh" binary can do to your system.
j4mm3r said:
Dont worry about the example shown in the screen shot. That is just to illustrate what a setuid "sh" binary can do to your system.
Click to expand...
Click to collapse
this securing procedure isnt working on my new root any suggestions?
please
Regards,
bcool15 said:
this securing procedure isnt working on my new root any suggestions?
please
Regards,
Click to expand...
Click to collapse
Exactly what procedure are you referring to? The post is just meant to be a set of guidelines of a vulnerability that existed on the phone after it was rooted using "the root procedure" at the time this was posted.
If you have a "sh" binary on your phone which is setuid and setgid, then you have this vulnerability. I haven't updated the post with results from any new root procedures that have been posted since, but I suspect even the newer methods posted so far in the "root thread" don't get rid of the compromised "sh" binary.
Please ignore if you don't know what setuid and setgid means.

Clean and pre-rooted 2.1 ROM

All credits go to pulpoff2 for this! This is not by me, I am merely the messenger. Only thing I did was to ask pulpoff for the files and a tutorial With his permission I will share it with you.
This will provide you with a fresh and unmodified 2.1-system, exactly like you would do the official update - only exception is that it is rooted. So all the apps and games of the official firmware are available and nothing else. You can remove the crap (like the games or timescape for example) by yourself after doing the steps below.
UPDATE:
There is a newer ROM by propc you can use instead of this one. Look here:
http://forum.xda-developers.com/showthread.php?t=888427
-- NEW --
propc kindly provides us with a shellscript to automate the steps below. See here for the script and a short manual:
http://forum.xda-developers.com/showpost.php?p=10067921&postcount=120
If the script doesn't work for you or you prefer to do things the manual way, you may use the steps below.
Download these files:
x8-2.1rooted.img.yaffs.rar
and
ISO-8859-1__unyaffs-arm.rar
Also download the 2.1-firmware from here or here. Unpack it on your computer and delete the "system.sin".
Unpack "x8rooted.img", "busybox" and "unyaffs" to SDcard.
You need 1.6 with root on your phone. By the way, all the data on your phone will be lost after doing the following steps, so making a backup is advised.
Use "adb shell" to connect to your phone and become su:
Code:
su
Copy "busybox" and "unyaffs" to /data/local/tmp. (Pulpoff says you should copy to /sbin, but this requires remounting with busybox. I copied to /sbin, but I think /data/local/tmp should work just fine)
Code:
cd /data/local/tmp
cat /sdcard/busybox > busybox
cat /sdcard/unyaffs > unyaffs
chmod the files to make them executable:
Code:
chmod 755 busybox
chmod 755 unyaffs
EDIT: If you want to copy the files to /sbin (like pulpoff2 advises), you can do this OPTIONAL step:
EDIT2: It was confirmed that this is indeed not necessary!
Remount the root directory to make /sbin writable. Then copy the files over and change the working directory to /sbin:
Code:
[strike]
./busybox mount -o remount,rw /
./busybox cp -prf busybox /sbin/
./busybox cp -prf unyaffs /sbin/
cd /sbin[/strike]
Remount /system as writable:
Code:
mount -o remount,rw /dev/block/mtdblock0 /system
Switch to busybox shell:
Code:
./busybox sh
Remove /system (yes, really!). It's normal to get errors because of the "lost+found"-folders. Ignore the errors.
Code:
./busybox rm -r /system
Unpack pre-rooted image to system. It should output "end of image" if it finishes correctly.
Code:
./unyaffs /sdcard/x8rooted.img /system
Your phone won't boot anymore now and it will crash as soon as you try to use it - that's normal! Go to next step.
Just remove the battery and the usb-cable from the phone, then re-attach the battery. Flash 2.1-kernel (without system.sin !!) using the flasher-tool by Bin4ry. If the flasher gives you an error because of a missing "loader.sin" you can take this file from the 1.6-firmware. Refer to Bin4ry's thread to learn how to use his flasher and how to enter flash-mode on your phone.
The phone should now boot, although the first boot can take a little while. If you get into a boot-loop or you just see the white sony ericsson logo (not the green one after the animation) for several minutes, it probably didn't work and you have to start over again by flashing 1.6.
This was written as I remember how I did it by myself. It worked for me at first try! If it works for you, please click the thanks-button. It will make me feel better
After you have your nice rooted 2.1 you probably want to enable JIT for a nice performance boost.
But does it have root? Bad reading.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
a-k-t-w said:
But does it have root?
Click to expand...
Click to collapse
Absolutely. But no busybox. So if you plan to enable JIT, you have to copy busybox to /system/bin by yourself.
a-k-t-w said:
But does it have root? Bad reading.
Click to expand...
Click to collapse
of course it is rooted.
now we know what to do with unyaffs.
2 things:
1. I've bought the phone with 1.6 android, but I was unable to root it with any method, then I've upgraded to 2.1 update 1. Is there any way to root it?
2. I have Hungarian language. Does it contain Hungarian language?
csengoi said:
2 things:
1. I've bought the phone with 1.6 android, but I was unable to root it with any method, then I've upgraded to 2.1 update 1. Is there any way to root it?
2. I have Hungarian language. Does it contain Hungarian language?
Click to expand...
Click to collapse
1: There is no way to directly root a phone with 2.1. You need to go back to 1.6, root it and then follow the above steps.
2: I guess so. As far as I know the firmware is the same for all countries.
Works like a charm! I removed the /system folder contents one by one though, using the method from the previous thread. Anyway, the first time I tried, unyaffs exited before extracting all the files (maybe the phone ran out of memory?). I didn't notice it and went on to flash the phone, ending up stuck at the Sony Ericsson logo. So, make sure that unyaffs reports that it has reached the "end of image" before moving on to the next step!
Thanks!!
cat /sdcard/busybox > busybox invalid lenght
cat /sdcard/unyaffs > unyaffs invalid lenght
how to proceed?
isaac12 said:
cat /sdcard/busybox > busybox invalid lenght
cat /sdcard/unyaffs > unyaffs invalid lenght
how to proceed?
Click to expand...
Click to collapse
in adb shell:
enter su and you have to look your mobile screen because it will ask you to allow su. (if you rooted well your phone)
i had this problem when i didn't press the allow button in superuser confirmation.
---dobule post--- sorry
trapacska said:
in adb shell:
enter su and you have to look your mobile screen because it will ask you to allow su. (if you rooted well your phone)
i had this problem when i didn't press the allow button in superuser confirmation.
Click to expand...
Click to collapse
rooted phone yes
su confirmed
cd /data/local/tmp
cat /sdcard/busybox > busybox invalid lenght
cat /sdcard/unyaffs > unyaffs invalid lenght
does it mount data.img on sdcard???
or i'll need to use chargemon from previous way?
WARR10r said:
does it mount data.img on sdcard???
or i'll need to use chargemon from previous way?
Click to expand...
Click to collapse
This has nothing to do with App2SD. Also the ROM gets loaded from internal flash, not from sdcard. The result is the same as with the official update, but with root.
If you want to have /data on sdcard, use the modified chargemon or neptun2's method.
I'm totally new to android but somehow i managed to get to number 8, and I have no idea how to switch to busybox shell, can somebody explain this bit in lamens terms please.
gully666uk said:
I'm totally new to android but somehow i managed to get to number 8, and I have no idea how to switch to busybox shell, can somebody explain this bit in lamens terms please.
Click to expand...
Click to collapse
try adding ./ before
gully666uk said:
I'm totally new to android but somehow i managed to get to number 8, and I have no idea how to switch to busybox shell, can somebody explain this bit in lamens terms please.
Click to expand...
Click to collapse
You should still be in "/data/local/tmp" as the working directory (check with "pwd"-command). If you followed the steps correctly, you should have a working busybox-file in there. So just type "busybox sh". If it looks like it does nothing, it's all right
isaac12 said:
rooted phone yes
su confirmed
cd /data/local/tmp
cat /sdcard/busybox > busybox invalid lenght
cat /sdcard/unyaffs > unyaffs invalid lenght
Click to expand...
Click to collapse
try to use another su. i rooted my x8 with superoneclick 1.5.0
I got stuck at SE logo for at least 10mins, it doesnt re-boot cycle although..
Sectoras said:
I got stuck at SE logo for at least 10mins, it doesnt re-boot cycle although..
Click to expand...
Click to collapse
That's way too long, something isn't right there. To start over again you have to flash back to 1.6.
Ok I had not realised the superuser permissions was not popping up on my phone that's sorted now. I get to number 8 again and it said permission denied

[Boot Animation] GingerBlur - with previews and Installer!

03.30.2011 -=*[ working on automation of backup/install of the Boot Animation... ]*=-
!!COMPLETED!! see bottom of OP
i made a few Boot Animations to go with my GingerBlur'd phone if anyone is interested in them. they're nothing fancy, just something different to look at.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
GingerBlur-bootanimation-1.zip
GingerBlur-bootanimation-2.zip
GingerBlur-bootanimation-3.zip
you will need to rename the respective GingerBlur-bootanimation-x.zip to bootanimation.zip.
original design was by ZeliardM for the Eris. i made some changes for GingerBlur.
Installation Instructions:
The script that's run on your phone WILL back up your existing /system/media/bootanimation.zip file ONE time and that's it. As long as the backup (/system/media/bootanimation.zipORG) exists from then on, it will simply overwrite the /system/media/bootanimation.zip file each time you run the install. this script should work for any of the Boot Animations that you get your hands on as long as there is a bootanimation.zip file in the same directory as the batch and script file (explanation(s) below). you can always revert back to your original bootanimation.zip, but you'll need to do so manually using adb to copy the /system/media/bootanimation.zipORG -> /system/media/bootanimation.zip
Download your Boot Animation of choice from the above links
Download the zip file (GB-BootAni.zip) below containing the install .bat and .sh file.
unzip the GB-BootAni.zip file you downloaded (should create you a GB-BootAni directory)
place your downloaded Boot Animation zip file in the above directory and either rename it bootanimation.zip or copy the file to bootanimation.zip
run the GB-BootAni.bat and the rest should take care of itself.
Download GB-BootAni.zip (installation helper for the GingerBlur Boot Animations)
md5sum: f20838c2d293f181f1f2d5650f6e8f83
i welcome any and all feedback...good, bad or indifferent.
Looks good! I'm loving all the boot screen's that have come out so far, great work!
Looks nice, and how would you go about installing this to your phone? Asking b/c I've never done this before.
crea78 said:
Looks nice, and how would you go about installing this to your phone? Asking b/c I've never done this before.
Click to expand...
Click to collapse
i'll try to post a script to facilitate things, but basically:
copy/rename the .zip file to bootanimation.zip
adb push bootanimation.zip /data/local/tmp
adb shell
<the above is done from your windows/linux machine>
<here down is done on your phone>
$ su
# cp /data/local/tmp/bootanimation.zip /system/media
# rm /data/local/tmp/bootanimation.zip (optional)
# reboot
...sit back and watch the magic happen.
itsonlym3 said:
i'll try to post a script to facilitate things, but basically:
copy/rename the .zip file to bootanimation.zip
adb push bootanimation.zip /data/local/tmp
adb shell
<the above is done from your windows/linux machine>
<here down is done on your phone>
$ su
# cp /data/local/tmp/bootanimation.zip /system/media
# rm /data/local/tmp/bootanimation.zip (optional)
# reboot
...sit back and watch the magic happen.
Click to expand...
Click to collapse
Thanks, and a script would be much easier to use
Can I do this on a stock atrix 4g
Always_Jonezen said:
Can I do this on a stock atrix 4g
Click to expand...
Click to collapse
you have to have "root" access in order to write to /system/media/
itsonlym3, I'm trying to do this manually via adb. First, does it matter where we put the bootanimation.zip because when I insert adb push bootanimation.zip /data/local/tmp in the command terminal, I get a "cannot start bootanimation.zip: No such file or directory"
Not sure what I'm doing wrong here...
itsonlym3 said:
you have to have "root" access in order to write to /system/media/
Click to expand...
Click to collapse
that sucks i lost my root with that update to 1.5.7
Always_Jonezen said:
that sucks i lost my root with that update to 1.5.7
Click to expand...
Click to collapse
you know you can get it back, right? you'll have to revert back and what not, but you can still have your update and get your root back.
check out this [SCRIPT] Root for 4.1.57 (RELEASED!) (requires 4.1.26 rooted) thread.
crea78 said:
itsonlym3, I'm trying to do this manually via adb. First, does it matter where we put the bootanimation.zip because when I insert adb push bootanimation.zip /data/local/tmp in the command terminal, I get a "cannot start bootanimation.zip: No such file or directory"
Not sure what I'm doing wrong here...
Click to expand...
Click to collapse
you need to issue the push (adb push) from your Winxx or Linux machine. if you've got adb in your path (which you probably do), then go into the directory where you downloaded the new bootanimation.zip and issue:
adb push bootanimation.zip /data/local/tmp/
that better?
i'm kind of assuming there's a /data/local/tmp. hopefully i'm correct in my assumption....?
sorry, i'm working on a script to automate this, just been busy. :/
also, you should probably back up your existing bootanimation.zip file before overwriting it if you'd like to keep it. PM me and i'll walk you through it if you need help. i'll add manual instructions to the OP once i finish up the automated script.
itsonlym3 said:
you need to issue the push (adb push) from your Winxx or Linux machine. if you've got adb in your path (which you probably do), then go into the directory where you downloaded the new bootanimation.zip and issue:
adb push bootanimation.zip /data/local/tmp/
that better?
i'm kind of assuming there's a /data/local/tmp. hopefully i'm correct in my assumption....?
sorry, i'm working on a script to automate this, just been busy. :/
also, you should probably back up your existing bootanimation.zip file before overwriting it if you'd like to keep it. PM me and i'll walk you through it if you need help. i'll add manual instructions to the OP once i finish up the automated script.
Click to expand...
Click to collapse
That clears things up. I'm patient on you making a script, and good point on making a backup.
added installer and its usage to OP.
itsonlym3 said:
added installer and its usage to OP.
Click to expand...
Click to collapse
Even while using the script, the installer failed because of the data/local/temp not being found. Not sure how to find the path in order to see if bootanimation.zip is located in there.
Edit: when I type in %temp% in the start - search, it pops up my local temp files, but there is nothing in that folder?? I'm using Chrome as a browser if that makes a difference.
crea78 said:
Even while using the script, the installer failed because of the data/local/temp not being found. Not sure how to find the path in order to see if bootanimation.zip is located in there.
Edit: when I type in %temp% in the start - search, it pops up my local temp files, but there is nothing in that folder?? I'm using Chrome as a browser if that makes a difference.
Click to expand...
Click to collapse
/data/local/tmp is a path on your phone.
you should take whichever Boot Animation file you would like to use, copy it to the directory where you unzipped the installer and name it: bootanimation.zip
then while in that directory, you should run GB-BootAni.bat file and it should do the rest for you.
first off, when you get to a command line on your PC and type:
adb devices
does it return return/display something like this:
List of devices attached
TB30607H83 device
Stupid me!! I named the zip as bootanimation.zip so it read "bootanimation.zip.zip" so that is why it never worked. The new bootanimation works perfectly after I figured out my error
Stupid me!! I named the zip as bootanimation.zip so it read "bootanimation.zip.zip" so that is why it never worked. The new bootanimation works perfectly after I figured out my error
Click to expand...
Click to collapse
glad u figured it out and got it installed!
Thanks for the update
Sent from my MB860 using XDA Premium App
where do you put the script folder to run it? im having no luck getting it to take
Spaztazim said:
where do you put the script folder to run it? im having no luck getting it to take
Click to expand...
Click to collapse
you should be able to put it anywhere on your machine, as long as you have adb.exe in your path somewhere. i didn't add it to the zip file, but i suppose i could.
is that what you were asking?
Yep didn't do the adb part, I got creative and made my own animation by combining the peking droid and honeycomb takeover then figured out how to install it manually
Sent from my Atrix 3g

<[TOOL 7/13]> Jeremy's Fre3vo Sticky-Root Windows/Linux/Mac v2.5

This script will run on Windows, Linux and Mac. No longer do you have to worry about having adb in your path, as i have included the binaries for all the operating systems.
The Linux and Mac script will automatically detect what O/S your using and use the correct binary.
You should be all set right out of the box, as long as you have the adb drivers installed for your device if you are in Windows. Linux/Mac users need not worry about the drivers.
COMING SOON.
overclocking capability and more
For Windows Users:
1. REBOOT YOUR PHONE BEFORE RUNNING
2. Extract the zip.
3. Make sure your drivers are installed.
Youtube Video from a user
http://www.youtube.com/watch?v=ZcWqeYQjjk0
older version of the script but same principal
4. Run Root.bat
5. Select your device
6. Hit #1
7. Profit!!!
Drivers For Windows:
Evo3D 32-bit Windows drivers:
Download HERE
Evo3D 64-bit Windows drivers:
Download HERE X64
For Linux/Mac Users:
1. REBOOT YOUR PHONE BEFORE RUNNING
2. Extract the zip.
3. Enter the directory.
4. Set the script permissions to allow it to execute.
Code:
chmod +x root
5. Plug in your device.
6. Run the script.
Code:
./root
7. Select your device.
8. Select #1
9. Profit!
Notes:
After the script starts all you have to do is choose option #1
The script remounts the file system R/W by itself. The other options are just there for convenience if you were to need to remount for hackery. sorry for the confusion.
All files are included including Fre3vo, su, busybox and superuser.apk
I get absolutely no superuser force closes with this. Titanium backup works perfectly. This is also the newest version of the superuser beta.
I have tested these scripts on my phone 10x each, 20 reboots if your counting If you are having problems REBOOT the phone to wipe all the changes you may have made with other scripts/errors.
Also if you install the Terminal Emulator from the market and type "su" you will get a superuser pop up to allow permissions and you will get a root prompt in the Terminal.
Let me know how it works for you.
Changelog:
v2.5
[Linux/Mac] Auto-detect Os
[Linux/Mac] Linux and Mac binaries now included so no more adb having to be in your PATH
v2.4
[Linux/Mac] Fix stupid error on my part in linux script
v2.3
[Linux/Mac]
[Windows]
Script Tweaks
New sticky temp root method (Installs to /vendor/bin/)
v2.2
[Linux/Mac]
[Windows]
HTC Sensation Support!
v2.1
[Linux/Mac] script tweaks
[Windows] rewrote script & added tools
v2.0
[Linux/Mac] rewrote script & added tools
[Windows] SORRY WINDOWS USERS NEW SCRIPT ISNT DONE FOR WINDOWS YET
v1.1
[Windows] Added Windows .bat
v1.0
[Linux/Mac] Initial Release
[Windows] Release SOON!
Download it here
http://dl.dropbox.com/u/11406774/Jeremy_Fre3vo2.5.zip
------Linux
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
------Windows
Dam sweeeet
Can someone make one for a win XP setup
I plan on making a .bat soon but if someone that knows what they are doing wants to try to convert it over for me ill update the op. I use my only windows computer to watch netflix on my tv. LOL
Pew Pew
I got Linux but how do I run this one tho?
Sent From My "Desperate For Root" 3VO...
You Sir are Amazing. Thank You. (Moves my own script into trash =) )
Eagerly awaiting a .bat file for this.
I *THINK* this should work for Window users... I made it really quick like and haven't even tested it myself..
Put this in the SDK folder "platform-tools" and run it as Admin. Make sure you extract all of the files to the root directory of the platform-tools folder and it should work.
platform-tools > root.bat
platform-tools > bin
platform-tools > apk
That should be your folder structure.
Let me know if it works
I got a mac, but from reading the OP it says I need ADB in my path? Not sure exactly what that means...
Stericson said:
I *THINK* this should work for Window users... I made it really quick like and haven't even tested it myself..
Put this in the SDK folder "platform-tools" and run it as Admin. Make sure you extract all of the files to the root directory of the platform-tools folder and it should work.
platform-tools > root.bat
platform-tools > bin
platform-tools > apk
That should be your folder structure.
Let me know if it works
Click to expand...
Click to collapse
Testing now.. ill edit once it (hopefully) completes
EDIT:
steps one thru 3 work great...
cant seem to 4 to work... any ideas?
**************
Your choices:
**************
(1) Set PATH variable for SDK platform-tools directory
(2) List devices found by adb
(3) Temp Root your Evo3d or Sensation with Fre3vo
(4) Install su, Superuser.apk and busybox
(5) Mount /system as R/W
(6) Mount /system as R/O
(7) Check mount points
(8) ADB Shell
(9) Exit
Type choice number: 4
********** su, Superuser.apk and busybox ***********
---------------------------------------------------------
Mounting /system as R/W
mount: Read-only file system
Done!!
---------------------------------------------------------
Installing su and busybox
failed to copy 'bin/su' to '/system/bin//su': Read-only file system
Unable to chmod /system/bin/su: Read-only file system
link failed File exists
failed to copy 'bin/busybox' to '/system/bin//busybox': Read-only file system
Unable to chmod /system/bin/busybox: Read-only file system
[1] Segmentation fault busybox --instal...
Done!!
---------------------------------------------------------
Installing Superuser
failed to copy 'apk/Superuser.apk' to '/system/app//Superuser.apk': Read-only fi
le system
Done!!
---------------------------------------------------------
Installing user and group
cannot create /system/etc/passwd: read-only file system
cannot create /system/etc/group: read-only file system
Unable to chmod /system/etc/passwd: No such file or directory
Unable to chmod /system/etc/group: No such file or directory
Done!!
---------------------------------------------------------
Complete, Press ENTER to return back to the main menu
Click to expand...
Click to collapse
Not sure what I'm doing wrong, copied all the folder elements into c:/android-sdk-windows/platform-tools, ran root.bat, pressed 3, waited until process finished, then pressed 4, installation says Okay. I see SU.apk installed on my phone but whenver I open up any rooted apps, it says cannot find root.
EDIT: this is through the windows version of the script.
Hmmm... I just tried it and it worked for me first go....using adb shell, do you have root?
Stericson said:
Hmmm... I just tried it and it worked for me first go....using adb shell, do you have root?
Click to expand...
Click to collapse
I'm retrying, let me test again after reboot.
fowenati said:
I got a mac, but from reading the OP it says I need ADB in my path? Not sure exactly what that means...
Click to expand...
Click to collapse
here is the mac binary for adb.
what you have to do is copy it into the /usr/bin/ folder.
Code:
sudo cp adb /usr/bin/
you need to make sure you are in the directory that adb is in when you execute that.
spunks3 said:
Testing now.. ill edit once it (hopefully) completes
EDIT:
steps one thru 3 work great...
cant seem to 4 to work... any ideas?
Click to expand...
Click to collapse
try using step 5 first then step 4?
EDIT: Well you shouldn't have to do that...try running step 3 again and show us the output?
Stericson said:
try using step 5 first then step 4?
EDIT: Well you shouldn't have to do that...try running step 3 again and show us the output?
Click to expand...
Click to collapse
my first time 3 worked okay i believe.
when i adb shell i get #
rebooting and trying again
This is my setup. Fresh reboot, fresh file extraction (directly from your .zip into platform-tools). Failed.
http://i642.photobucket.com/albums/uu150/Deflectant/Cropped.png
This picture is cropped, much easier to read.
EDIT: root.bat is in c:/android-sdk-windows/, I cropped it out of the picture though.
SuperUser keeps crashing for me....that might be the problem...
Thanks J.eremy. You asked to let you know how it went in your OP, so I'm reporting back. It worked excellent and quick, as advertised. Couldn't have been simpler, thanks. I've had it running for about an hour now, and have had no super user FC. How long have you had this lasting so far? Prior to this, I would only be able to go about a half hour or so before i got FC on super user, and would have to start over again. Is something different here? It seems to be sticking far longer...at least so far.
k2buckley said:
Thanks J.eremy. You asked to let you know how it went in your OP, so I'm reporting back. It worked excellent and quick, as advertised. Couldn't have been simpler, thanks. I've had it running for about an hour now, and have had no super user FC. How long have you had this lasting so far? Prior to this, I would only be able to go about a half hour or so before i got FC on SU, and would have to start over again. Is something different here? It seems to be sticking far longer...at least so far.
Click to expand...
Click to collapse
Your welcome
it lasts me until reboot every time normally, im pretty sure the main problem with some other scripts are they are not setting the permissions right and not modifying the passwd and group files correctly.
no f/c on my end either
spunks3 said:
my first time 3 worked okay i believe.
when i adb shell i get #
rebooting and trying again
Click to expand...
Click to collapse
yea Stericson is right, looks like the batch file isn't auto mounting the /system as R/W.
gonna go take a look at it now
Overstew said:
This is my setup. Fresh reboot, fresh file extraction (directly from your .zip into platform-tools). Failed.
http://i642.photobucket.com/albums/uu150/Deflectant/Cropped.png
This picture is cropped, much easier to read.
Click to expand...
Click to collapse
interesting...your picture shows it cannot find /bin/fre3vo
either it cant find the folder, or it cant find the file....

[2015/03/07] BotBrew: *nix tools for Android

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
The remainder of this post contains historical information. Please read the update. Thank you.
__________________
​ BotBrew is
a repository of *nix software (such as bzip2, curl, openssl, python, and ruby) for ARM-based Android
a package manager powered by Opkg, a lightweight program that feels like dpkg+apt
a service manager powered by runit
a build system for anyone looking to build and package his/her own scripts and programs
Thanks: mateorod and xela92 for testing the heck out of this thing; racks11479 for delicious artwork; you for using this project, reporting bugs, and making it better
If I missed anyone, let me know!
Warning: BotBrew has been used successfully on a variety of rooted ARM devices, and is developed using a Nook Color, but you should still make backups before trying, just in case.
Install BotBrew
[ Google Play | BotBrew.apk | BotBrew.debug.apk ]
Read the Quick-Start Guide & Manual
[ botbrew.com/manual.htm ]​
Click to expand...
Click to collapse
Alternative (Command Line) Installation
If the BotBrew app fails to bootstrap, you might be able to bootstrap using the command line:
Code:
wget http://repo.botbrew.com/anise/bootstrap/install.sh -O- | su
Such a setup should be compatible with the app, though it may not work perfectly. The manual has more tips for command line usage.
Enjoy!
Install BotBrew+1
The next release of BotBrew, named basil, will be powered by Debian's Dpkg and Apt. This is a non-trivial update, so the app is being rewritten from scratch. I've posted some usage instructions, in case you are adventurous enough to try. Thanks! This app may be used in parallel with the current-stable BotBrew release, without conflict.
[ Google Play | GitHub ]​
Click to expand...
Click to collapse
Changes
5/20: the next release of BotBrew is in development!
4/20: improve support for long package names; fix list of repairable packages
4/16: new UI for devices with wide-enough screens; experimental support for moving to /sd-ext
4/9: Google Play release of BotBrew "anise"; previous release is now BotBrew.oldstable.apk; lots of updates since oldstable
3/16: lots of installer and filesystem changes for cross-device compatibility, work started on multiuser support
3/10: installers now depend on botbrew-core, which will (in the future) pull in basic packages that everyone should have
3/4: swipe left and right to see all/installed/upgradable packages
3/3: added ability to start installation of *.opk files from file managers
3/2: added ability to start installation from browser after clicking *.opk link
3/1: fixed some BotBrew.apk bugs; updated command line installer
2/27: reworked BotBrew.apk; new packages in stable repo
2/18: testing repository now open; new opkg -- please read before upgrading
2/16: make BotBrew.apk display latest versions in the package list
2/2: bugfix release of BotBrew.apk
Well, I now have python, ncurses, openssl and a couple other packages running on my nook. I have indeed printed 42, and even wrote my own (proprietary) code to advance the project some that printed 43. Advanced scripting.
But seriously, this is sweet. I am all over anything that opens up this device. I don't think I have ever bought a piece of hardware that has so outstripped my expectations.
Thanks for the program. I will report back after I play with it some.
Wow, what a great idea! Looks like my Nook will be used for a bit more than entertaining my family with casual games; nice to have some productivity back I was thinking about installing Ubuntu on my Nook for this sort of thing, but there's no need anymore.
It would be great to get this a bit more recognition, and getting more useful things such as gcc or even the GNU toolchain installable with this package manager. Might put a link in my signature, if you don't mind.
Now to look for an affordable lightweight bluetooth keyboard...
You read my mind I got binutils, gmp, mpfr, and mpc working earlier today... and gcc is in the pipeline. My main reason for wanting a native gcc is that some software (such as python) do not like to be cross-compiled at all. I'm having a bit of trouble with gcc, but I'll keep hacking away at it.
Please, go right ahead and share this thread; this is a young project but I think it could be more useful. On the one hand, there's a whole lot of free software (such as the GNU stuff) just asking to be built and packaged; on the other hand, many people who hang out around here have a few scripts/programs of our own to distribute.
In case you're interested, here's where all the packages live. There are actually two more ways to install (remote and local) stuff using Opkg:
Code:
opkg install http://host/path/to/package.opk
Code:
opkg install path/to/package.opk
Very nice project !!!
I have python 2.7 standalone on android.
One problem, in python commandline i can't import hashlib, i can fix this?
Thanks.
So, I just got a working build of GCC+binutils and pushed the packages to the stable repo. Please keep in mind that for now, stable means I tested it a couple of times and it works, so be careful and use at your own risk.
To install gcc and binutils, make sure you have about 160mb of storage free in /system and run:
Code:
opkg update
opkg install gcc-4.6
That's about 70mb's worth of downloads, and my server's underpowered, so please wait patiently and retry if it fails (failure when receiving data from the peer). When that's done, you might want to compile something:
Code:
cd /cache
wget http://dl.dropbox.com/u/1213413/htdocs/agcc/hello.c
gcc -o hello hello.c
And if that completed successfully, you should have a new executable, which you could run for a classic greeting. I was not able to get the C++ libraries compiled, but C code should compile alright.
@Fritos2: I've been trying to fix this issue, but I'm not confident that I could do it without help. Python (and Perl) are very resistant to cross-compilation, and even after I hammered it into submission, some modules do not work. Another module that I'd really like is readline, which gives you enhanced editing capabilities in the interactive interpreter. I'm a Pythonista, but I've got to say: Ruby does cross-building right. Even sqlite3 supports readline. I suspect that Python might have to be compiled natively, and this is where native gcc comes in.
I'd appreciate any help, of course
I'll follow this project with great interesting.
Hey guys, there have been a few updates:
opkg's lock file has been moved to /cache/opkg/lock so there's no need for a read-write /system just to query packages
gnupg has been packaged, for those who like to sign their stuff
python... well, I'm still working on it >.<
Anyway, I thought I'd do something to make this project more accessible. I don't have any apk's for you yet, but I've attached a screenshot of the work-in-progress
I am very impressed with the progress. I am a super-noob but have enjoyed toying with the packages from your opening post. I haven't had time to do much but explore, but this sure does open up a whole new world for the nook, from an accessability stand point alone. I wouldn't be suorised to see an uptick in interest as some if the more experienced coders are able to turn their attention from cm9.
I will probably install those latest packages sometime this weekend. Just real strong stuff.
Edit. Ok, o I just went ahead and did it now. Obviously, I couldn't get it to work. Have downloaded the FCC and got the hello file fro the dropbox. I ran the gcc -o hello hello.c and was returned a hashtag only. If I ran gcc hello, it outputted the hello program code. I tried several things basically willynilly until I got tired of getting a fatal error and having the build canceled.
If this is too basic and will clog the thread, I would happily accept a pm with a good tutorial. Thanks a bunch.
The problem with python maybe relationed with python-devel package?
Sorry is the question is stupid, i'm so noob.
The Python build process has two steps: first, you get the main Python executable, and then you get the modules. The executable built in the first step is used to test the modules in the second step. So, naively cross-compiling Python would result in most modules not passing the test (because you cannot actually run the Python you just built), and these modules would be removed. As it turns out, you could patch the build scripts to run the tests using a host-native Python, but even then, there are a few modules with particular requirements that still don't pass. This is where we are now, but I think we could do better.
Okay, so more progress: BotBrew.apk is out in the wild! I decided to put it off until I got some basic functionality working. What is this?
a basic GUI for package management
lists all packages
searches for packages by name
shows package information
installs/upgrades/removes packages
manages list of repositories
I've only really tested it with CM7, but it works on the latest CM9 previews as well.
Screenshots
​
mateorod said:
Edit. Ok, o I just went ahead and did it now. Obviously, I couldn't get it to work. Have downloaded the FCC and got the hello file fro the dropbox. I ran the gcc -o hello hello.c and was returned a hashtag only. If I ran gcc hello, it outputted the hello program code. I tried several things basically willynilly until I got tired of getting a fatal error and having the build canceled.
Click to expand...
Click to collapse
No worries. If gcc did not complain and dropped you back in the shell, this means it's done! Just list the directory to find a new file named hello, which you could run:
Code:
# gcc -o hello hello.c
# ls
backup download hello.c opkg
dalvik-cache hello lost+found recovery
# ./hello
hello world
#
I hope this helps!
Sorry if this sounds ignorant but is there any future usage aside from being a very interesting project? Will we be able to distribute open source projects / software specifically made for Android devices like on common Linux distributions?
BobbyBest said:
Sorry if this sounds ignorant but is there any future usage aside from being a very interesting project? Will we be able to distribute open source projects / software specifically made for Android devices like on common Linux distributions?
Click to expand...
Click to collapse
A valid question, I think. BotBrew has the potential of becoming a Cydia of sorts, distributing system extensions, interface customizations, and other useful software for rooted Android devices. Android has a vibrant community of programmers and scripters, but there isn't any standard way to manage software that are not apps. And there's a large body of open source Linux software that might work well on Android. Of course, BotBrew is also able to handle root apps that live in /system/app (i.e. gapps); for user-level apps, the various app stores already work quite well.
In order for this to become a serious platform, we'll need a couple of things: a solid technical foundation, developer support, and a user base. I've been making progress mostly towards the first point; hopefully the rest would follow.
Well I'll be. Yeah it worked. Who knew?
Okay, so that's great! I have printed 43 (my own design) and now the standard greeting has been successfully built and ran as well. I must toodle with it some more. What would you recommend to try? Remember, i am slow-witted and totally inexperienced.
If you say print 44 i will totally understand. : )
How about this, i would like to learn and i would like to help you with your program. I will probably be of most use as a guinea pig, but since i spend a fair amount of time jiggering system files and databases, I have to complete wipe about once a week. failure or risk doesn't bother me.
---------- Post added at 02:27 AM ---------- Previous post was at 01:51 AM ----------
Okay, i just got the apk. I autoremoved all installed packages. I installed opkg, python, gcc (binutils came along as a dependency) and the hello executable. But when i went into a terminal once i cd cache, it only lists opkg out of the five packages. This worked when i did the wget through the terminal. The packages show as installed within the botbrew app (nice icon and UI, btw).
I known I am doing something very simple incorrectly. Do you have enough information to be able to tell me what that is?
Congrats on a successful build! Now that you have a working program, you could package it up for distribution
What's more, you could do it directly on Android. Let's call this package mateorod-hello, prefixing it with the vendor's (your) name to avoid conflicts with other variants. We'll also rename the executable itself.
We'll install the program to /system/bin, where it would feel at home with all the other programs; so we create a staging directory tree that mimics the structure of an Android system, but contains just the one program:
Code:
cd /cache
mkdir -p system/bin
cp hello system/bin/mateorod-hello
Next, we need a control file to describe what's in the package. It might be easier to create the file on a computer and push it over, but we could also create it using the command line:
Code:
echo "Package: mateorod-hello" > control
echo "Version: 1.0" >> control
echo "Architecture: armeabi" >> control
echo "Description: a greeting from mateorod" >> control
And, finally, a magic value to signify what kind of package this is:
Code:
echo -n "2.0" > debian-binary
Okay, now let's pack this up:
Code:
tar zcvf data.tar.gz system
tar zcvf control.tar.gz control
ar -r mateorod-hello.opk debian-binary data.tar.gz control.tar.gz
We now have mateorod-hello.opk, which we could test by installing:
Code:
opkg install mateorod-hello.opk
Now that it's installed, the program within is also available:
Code:
mateorod-hello
This is quite a bit of work for something that could just be pushed over adb, but it could be automated and it works tremendously well for more complex software. The control file helps keep track of versions, and lets you specify dependencies too.
Oh, and to clean up a bit: (the first command makes sure you're in /cache and do not accidentally erase /system)
Code:
cd /cache
rm -r system control data.tar.gz control.tar.gz debian-binary
/edit:
mateorod said:
But when i went into a terminal once i cd cache, it only lists opkg out of the five packages. This worked when i did the wget through the terminal. The packages show as installed within the botbrew app (nice icon and UI, btw).
Click to expand...
Click to collapse
What did you do, cd /cache then ls? If so, you're most likely looking at the /cache/opkg directory, which contains temporary data. If you want to see what's installed using the command line, try opkg list-installed
I uh... picked a random icon I had lying around, and I plan to swap it out when I have time to make one. Thanks, though :3
The amount of help you're offering is just staggering. I will put the above together tonight and will report back.
I have a bug here in the GUI.
Rotation makes the app start looking for updates again.
edit: Reentering does the same...
opkg has then problems with set locks.
(CM7 KANG by MiRaGe)
Currently trying to install gcc to compile and run a small program...
edit2: gcc-4.6 installed. Still trying to compile a small prog. Will continue tomorrow...
Edit3: Well, problem with GUI fixed itself somehow.
Still, maybe you should check out how the GUI behaves during the installation process when rotated.
Yes, I can see how this bug could occur, and it should only happen during the first run. When the package cache is empty, the app tries to update by itself, and it seems that rotation causes something to restart. I've uploaded an update, which hopefully fixes this issue. Thanks for the report.
/edit:
Bug fixed for real. You may now rotate with impunity. Man, why can't Android have sensible defaults?
Okay, took me awhile, but...
$ export PATH=/data/local/bin:$PATH:.
$su
# cd cache/
# wget http://dl.dropbox.com/u/1213413/htdocs/agcc/hello.c
Connecting to dl.dropbox.com (174.129.218.194:80)
hello.c 100% |************************************| 93 0:00:00 ETA
# gcc -o hello hello.c
#ls
dalvik-cache hello lost+found recovery
download hello.c opkg
# ./hello
hello world
#mkdir -p system/bin
# cp hello system/bin/mateo-hello
#echo "Package: mateo-hello" > control
#echo "Version: 1.0" >> control
#echo "Architecture: armeabi" >> control
# echo "Description: a word from Mateo" >> control
#echo -n "2.0" > debian-binary
# tar zcvf data.tar.gz system
system/
system/bin/
system/bin/mateo-hello
# tar zcvf control.tar.gz control
control
# ar -r mateo-hello.opk debian-binary data.tar.gz control.tar.gz
ar: creating mateo-hello.opk
#opkg install mateo-hello.opk
Installing mateo-hello (1.0) to root...
Collected errors:
Two sets of collected errors related to system not being mounted R/W excised
Installing mateo-hello (1.0) to root...
Configuring mateo-hello.
#mateo-hello
hello world
#
So there it is. I just followed your more-then-generous guide, with some phrasing changes to show i didn't just copy/paste.
Some notes from the inexperienced:
-As you can see, I had to use the wget command to work on the hello.c script. I had hello as an installed package through the Botbrew GUI already, but no matter what permutation of hello command I ran, gcc would not recognize it as an input file. Just to say that your guide to the initial build, as written, i don't think will work for anyone who installs the packages through the apk. I don't know the solution, but i bet it's simple.
Edit: I guess the package you get through your apk is a fully built executable? I hadn't gone through the later steps when I first tried to build it, so I never thought to simply enter "hello". Output a much fancier greeting then the one I built. Capital letters and an exclamation mark! Very nice.
- For other newbies- make sure that system is mounted R/W through root explorer or some such. And if you employ a firewall, if you intend to use the wget command, not only do you need to allow your terminal through, you also need to allow applications running as root! I am sure this is news to no one, but it cost me FOREVER!
I feel like this constitutes progress. Thanks for all the work!

Categories

Resources