i have debian and icewm successfully setup on my g1. im wondering how to make a script to launch debian. right now i have to type: "su" then " cd /sdcard/debian" then "sh ./bootdeb". i would like to be able to just type "bootdeb" at the first prompt to launch it. im assuming this is possible but i just dont know how to go about it. thank you for your help!
anyone?? im just looking for some help with a script to simplify what i have to type.
go to this thread http://forum.xda-developers.com/showthread.php?t=488928&highlight=gscripts and read up on gscripts, then get the app, then program your script into it, and there you go.
Related
If you don't know what this is, then you don't need to know!
I successfully compiled Nano to run on Android!
http://android.modaco.com/content/software/291983/nano-editor-for-android/
It will run perfectly on any ROM that has terminfo set up, if your ROM doesn't, you may need to do this before running nano:
Code:
su
export TERMINFO=/etc/terminfo
export TERM=linux
Any problems, holler! I'll be putting this in my next Hero pack too...
P
That's cool!
Definitely will give it a try. Use nano every day on my ubuntu system. It would be nice to see that familiar item on my phone . Screen would be pretty wild as well. Screen's another one of those utilities that is hard to explain but easy to show
I'd like to get rsync working on my phone as well since I use it for backups all the time on my desktop now. Think it would be really handy to have a gnu-utils package that people could add.
What owner permissions should I set for it? I get a Permission Denied error on CyanogenMod 4.0.4.
EDIT: Nevermind, forgot to run chmod +x on it.
sweet! I was looking for this about a week ago. glad someone did it. THANKS!
I've mailed you concerning this. I've been through hell trying to compile that *****, hope you are willing to help out. So far I've compiled bash4.0 and busybox 1.15.1 with no problems, but im stuck on nano2.0.9. Anyway check the mail, hope you can help! And congrats for pulling it off hehe.
wops, doublepost.
guys, i wanna learn abt nano for ndroid. how to make it run in android mobile?
i'm using ra-ion1.6.1 donut. already push nano into /system/xbin and /system/bin. but how to make it run? and how to use command in ms-dos?
su
export TERMINFO=/etc/terminfo
export TERM=linux
i dun understand this.
i'm currently using vista.
do i need linux os to do anythg?
how to enable syntax highlighting???
I am currently using nano taken from here http://android.modaco.com/content/software/291983/nano-editor-for-android/ on my G1 (SuperD 1.9.3).
I really want to enable syntax highlighting, and I went through this guide:
http://www.technotizie.it/frame/74510/nano-syntax-highlighting-how-to-enable-syntax-highlighting-in-nano-text-editor
I installed nano binary into /system/xbin and gave it executable permissions.
I created a /system/home dir and created a .nanorc file as stated here:
http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting#Alt_C.2FC.2B.2B.2Fh
I also set up a $HOME var, with value = /system/home
nano starts up but doesn't highlight my .cpp syntax.
what am I missing???
Thanks,
Genesio
Anyone have the terminfo directory saved off by chance? Seems to be missing from my htc evo stock 2.2 rom.
Edit: And naturally five seconds after posting I find it. See androidforums.com/evo-4g-all-things-root/124506-guide-full-bash-shell-nano-tab-completion-color-over-ssh.html
Hi all,
i've got a problem with my nano...
The "enter" button just do an LF, so I do not know how to give the "ok" for saving file,exiting, etc ... any help ?
mpmilestogo said:
Screen would be pretty wild as well. Screen's another one of those utilities that is hard to explain but easy to show
Click to expand...
Click to collapse
I second this... I even have screen on my .bash_rc. It is pretty convenient!
I made it run, but in another note, I have always thought the terms' screen size is quite small.
Nevertheless, nice utility!
Hi, I have a problem with nano..
when I try execute them, it writes
Code:
Error opening terminal: linux.
What can i do?
(miui 2.8.31) (4.0.4)
SEmp91 said:
Hi, I have a problem with nano..
when I try execute them, it writes
Code:
Error opening terminal: linux.
What can i do?
(miui 2.8.31) (4.0.4)
Click to expand...
Click to collapse
I have the same problem.
The link you seek. terminfo should be in /etc
paulobrien said:
If you don't know what this is, then you don't need to know!
I successfully compiled Nano to run on Android!
http://android.modaco.com/content/software/291983/nano-editor-for-android/
It will run perfectly on any ROM that has terminfo set up, if your ROM doesn't, you may need to do this before running nano:
Code:
su
export TERMINFO=/etc/terminfo
export TERM=linux
Any problems, holler! I'll be putting this in my next Hero pack too...
P
Click to expand...
Click to collapse
I've just got this :
oad $ bash
[localhost /mnt/sdcard/Download]$ nano
Error opening terminal: screen.
EDIT : [SOLVED!]
If you are a termux user and want to install a nano or vi or any other binaries of termux in Andriod su mode. Here is the link to Termux superuser.
Give it a star if it was helpful !!!
I'd like to run adblock.sh and Nimbuzz after the phone has booted and connected to the internet. So far I've been able to write code that launches nimbuzz via a shell script like this:
Code:
am start -n com.nimbuzz/com.nimbuzz.InitScreen
but nothing happens when I save that to a file called autostart.sh in /data/opt/
However, issuing that command via adb or a terminal session does launch the app. I looked at other .sh files (userinit.sh etc) and saw that the PATH variable was defined so I added that but still nothing.
I figure running adblock.sh should be easy enough but have no idea how to make the script check for an internet connection. I figure I'd have to wait about 120 seconds for the phone to boot and acquire net connectivity (either 3g or wifi), so I could use something like sleep 120 to pause the script for two minutes before attempting to continue.
Could someone help me build an autostart.sh file? I'd really appreciate the help.
well... could someone please point me to a tutorial on shell scripts for android then? I've applied fu but have yet to come up with anything functional.
Hey bud,
Try saving the script in /system/sd, and naming it userinit.sh
If there already is a userinit.sh, just add the line to the very end of the file. You'll need to edit it in the computer
adb pull /system/sd/userinit.sh "C:/userinit.sh"
open the file in wordpad, make your addition,
adb push "C:/userinit.sh" /system/sd/userinit.sh
PM me if that doesn't work.
Is it possible to do this?
how can i run script commands without having to connect my phone to a laptop computer?
I have root explorer app installed, if someone knows how to do it with that app please give me a simple tutorial.
also, i found this other app on the android market called "ScriptMe" by gilsken.
the app has no reviews, but the description doesnt say how to use it to execute scripts.
in case any of you haven't noticed, yes I am a newbie when it comes rooting phones, any help is appreciated, let me know, thanks.
Do you want to use adb natively on the phone or just general scripts? You can run commands and scripts by installing a terminal from the market, I think Better Terminal Emulator Pro is the best. I think you can run most adb commands from the terminal but I'm not sure if they all work. I mean, push and pull don't seem like they'd work without somewhere to transfer files to, but maybe they push and pull to the sdcard or something. I'm really kinda clueless when it comes to adb because I've only used it to root the phone and use standard terminal tools for everything else.
I think I tried ScriptMe. You have to put the script on the sdcard, select it with the app, tap "execute" then it says "script ran". I'm not sure how that's useful. The only scripting app I've found useful is GScript, but there is another called "Scripter" which stores the scripts so you can select them from a list to execute them. Kinda like a no frills GScript.
Yeah just use the terminal app. It comes loaded on cyanogen and most ROMs out of the box.
I am looking for anyone who can help me with installing adb on Ubuntu I've posted a topic in Q&A but received no response so I'm asking here I partition my hard drive and installed Ubuntu I've downloaded the sdk and I've gotton as far as placing the tg file in my home directory but still no go I think I'm missing something but don't know what I'm native to windows and I have adb working on that just fine but Ubuntu is all the way different like I said I'm really new to Linux so I'm asking for a step by step guide to install adb on Ubuntu and a list of commands for adb on Linux as well also I've been asking for a while now and still no answer does anyone know how to disable the force In call touch UI in CM6 its checked and blackend out the setting I'm speaking of can b found in setting /call settings I would like to b able to uncheck it also I'm very fond of the bx theme was wondering if anyone could help me to get it to work on CM6 stable any help with any of these would b greatly appreciated thanks
Root-Hack-Mod-Always™
what happens when you execute adb?
if your getting something like "can't execute blah blah" make sure that adb has execute permissions.
#chmod +x adb
its been awhile since I been on ubuntu you may have to sudo to execute chmod on ubuntu.
Wen I plug in my phone it does not recongize it also wen I hit adb says no command adb found did you mean then gives me a list of commands for something I'm not familiar with lol
Root-Hack-Mod-Always™
laie1472 said:
Wen I plug in my phone it does not recongize it also wen I hit adb says no command adb found did you mean then gives me a list of commands for something I'm not familiar with lol
Root-Hack-Mod-Always™
Click to expand...
Click to collapse
first are you executing adb from the folder its in. If so and it says that the command is not found then make sure that the abd executable has executable perms on it.
Sorry if if I'm not precise on the instruction as I'm trying to do it from memory, I haven used linux in about a year or so and most of my nix time is solaris lately.
But you should by able to #chmod +x adb so that its has execute perms.
if you gets errors trying to run chmod try typing sudo first so that you can switch into root.
I'm not sure on running it threw the window its in I opened up terminal its the only thing open besides a search window on how to install this and when I did type in a command I hit sudo didn't try the other commands u gave yet I'm mobile and to my dismay ill b for a few hours but as soon as I get to my laptop I will and post results anything else you can think of is more than welcome to I don't shun knowledge thanks in advanced
Root-Hack-Mod-Always™
this might help getting adb and your phone working in ubuntu, if you need any more assistance pm me and i'll try my best to help.
http://forum.xda-developers.com/showpost.php?p=7874321&postcount=11
codejunkie78 said:
this might help getting adb and your phone working in ubuntu, if you need any more assistance pm me and i'll try my best to help.
http://forum.xda-developers.com/showpost.php?p=7874321&postcount=11
Click to expand...
Click to collapse
This will work. That was posted in the thread I started with the same question. Been running Ubuntu for over a month and use adb all the time.. Thanks again codejunkie!
Man I knew u guys would come threw I love Google but love xda more ill b home in less than an hr can't wait thanks a million
Root-Hack-Mod-Always™
Thought I had posted this here well unfortunately I ripped out a USB port on my laptop. Besides that I had to pop out my hard drive and send it in to HP because of a warranty repair. I should have it back by Friday and I'll post and let you guys know if I got it thanks again for the info
Root-Hack-Mod-Always™
Update
Got it installed and I posted a thread on how we did it in case anyone needs it thanks for the responses and I started a thread about anything hero so feel free to post and check it out all knowledge on heros is most definitely welcomed and encouraged by
Laie1472
Thanks in advanced
Root-Hack-Mod-Always™
Is there any way to have ash read a .ashrc or .profile or whatever file automatically upon startup from "adb shell"? Of course I can create such a file, and execute it with "ash -l", but no matter where I put it (I've tried /.profile /.ashrc /etc/profile /etc/.ashrc), it never gets read automatically.
This is on an att captivate running cognition 4.1.1
you can install bash and make a /etc/profile. Then when you type bash, it will load the .profile. From the terminal, you can create a /sdcard/.profile and then your terminal will take commands from there.
I'm trying to not have to fire up another shell, be it bash or ash or whichever. Does ash not use a default .profile somewhere?
Did anyone get this to work?