terminal emulator - Nexus One General

this may be a stupid question to some but it made sense to me.i cant do anything with adb at the moment.wont recognize device.is it possible to push something using terminal emulator instead if the file was placed in correct location?

Where are you trying to save to?
If you're rooted, you can put it anywhere you want, including system directories.
You can do that through the terminal emulator or with any file manager app such as Linda.

i would save to root of sd card as anything else.was just wondering if it was possible to "push"like adb using emulator things such as wifi driver for the custom kernels

how would these commands change using terminal emulator?
.) adb remount
2.) adb push bcm4329.ko /system/lib/modules
3.) adb reboot bootloader
4.) fastboot flash zimage zImage
5.) fastboot reboot

superg81 said:
how would these commands change using terminal emulator?
.) adb remount
2.) adb push bcm4329.ko /system/lib/modules
3.) adb reboot bootloader
4.) fastboot flash zimage zImage
5.) fastboot reboot
Click to expand...
Click to collapse
#1 would probably not be necessary. Or perhaps it would be instead: mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
#2 mv /sdcard/bcm4329.ko /system/lib/modules
#3 Turn off the phone manually, then hold Volume Down while pressing Power
#4 I think this will work the same as long as you're in the correct folder (folder with the zimage file). You need to have the recovery image though to access the terminal. (See my signature for how to get it if you don't already have it.)
#5 Reboot manually

Paul22000 said:
Where are you trying to save to?
If you're rooted, you can put it anywhere you want, including system directories.
You can do that through the terminal emulator or with any file manager app such as Linda.
Click to expand...
Click to collapse
Paul, I have been reading your rooting guide as I am new to Android OS and have not yet pulled the trigger, but I really want to root my N1.

Shut Down?
I'm curious if it's possible to power-off the device using a terminal emulator command? Not reboot, but turn off. And of course able to turn on again normally using the power button.

Bryce2010 said:
I'm curious if it's possible to power-off the device using a terminal emulator command? Not reboot, but turn off. And of course able to turn on again normally using the power button.
Click to expand...
Click to collapse
"reboot -p" I believe

Paul22000 said:
"reboot -p" I believe
Click to expand...
Click to collapse
Thanks that did work, but the shut down was instant! Not like shutting down normally using the power button. Is it wise to turn it off like that? I've never had a problem with my power button but have read all the threads where it has started failing. This is one more way to take some of the use off of the power button, but if it's not good for the system to turn it off that way maybe I shouldn't?

Bryce2010 said:
Thanks that did work, but the shut down was instant! Not like shutting down normally using the power button. Is it wise to turn it off like that? I've never had a problem with my power button but have read all the threads where it has started failing. This is one more way to take some of the use off of the power button, but if it's not good for the system to turn it off that way maybe I shouldn't?
Click to expand...
Click to collapse
Not sure, but I was thinking that if you were looking to power off via the terminal, you didn't care about the repercussions heh. Why do you need to turn off via the terminal?

superg81 said:
how would these commands change using terminal emulator?
.) adb remount
2.) adb push bcm4329.ko /system/lib/modules
3.) adb reboot bootloader
4.) fastboot flash zimage zImage
5.) fastboot reboot
Click to expand...
Click to collapse
Did you ever get this working? I need to push the same file and adb would not work for me at a all.

baseballfanz said:
Did you ever get this working? I need to push the same file and adb would not work for me at a all.
Click to expand...
Click to collapse
How far did you get?
Where are you stuck?
I believe you need to do flash_image instead of fastboot flash...
Sent from my Nexus One using XDA App

this may work.
put the file on the root of your SD card
in terminal emulator
su
mount -o rw,remount /system
cp /sdcard/bcm4329.ko /system/lib/modules/bcm4329.ko
should work.

danger-rat said:
How far did you get?
Where are you stuck?
I believe you need to do flash_image instead of fastboot flash...
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
While I can hook up my phone and put in the command to show device,
my N1 come up with the id# but that's it.
Can't do remount or any other commands, same when I had the Captivate.
ksc6000 said:
this may work.
put the file on the root of your SD card
in terminal emulator
su
mount -o rw,remount /system
cp /sdcard/bcm4329.ko /system/lib/modules/bcm4329.ko
should work.
Click to expand...
Click to collapse
I went a different route, flashed Cyanogen 6, but if I ever need to go this route I've subscribed to this thread.
Thanks all for inputs

Related

help - Overclock Patch and update.zip

i have my phone updated to 2.1 and rooted. Want to overclock it now but not sure what im supposed to do with the kernel-overclock-update-v3.zip. I have the original PB00IMG.zip i updated and rooted my phone with, am i supposed to use it somehow?? New to this would appreciate any help.
Just use this, Flash it and it will make ur life easyier.
http://forum.xda-developers.com/showthread.php?t=685581
so phone will be stock again right? have to re dload apps and sync contacts and **** again right?
hmm... or u can try to flash the kernel-overclock-update-v3.zip to the one you have
be sure to nand backup first
when i put the kernel-overclock-update-v3.zip on the root of the sd card and power up holding the volume down button it doesn't find the kernel-overclock-update-v3.zip and doesn't install it...? in other word how do i flash it, doesn't seem to be working like when i originally flashed and rooted.
did you flash recovery?
duckingzebra said:
when i put the kernel-overclock-update-v3.zip on the root of the sd card and power up holding the volume down button it doesn't find the kernel-overclock-update-v3.zip and doesn't install it...? in other word how do i flash it, doesn't seem to be working like when i originally flashed and rooted.
Click to expand...
Click to collapse
Hey man,
When you rooted did you flash the Amon-Ra recovery image? If so put the update zip on the root of your sd. Power down your handset. hold the volume UP and the power on will bring you to the recovery menu. Here you have options for back up,flash from zip etc...once there you can select whatever rom/update you want to flash. Remember nandroid is your friend always back up. Also as far as apps etc...check out Titanium back up or one of the other free back up apps in market. I hope this helps you out.
volume up + end button = Recovery
ok, im following the steps to III: Flashing a Custom Recovery. and when i get to the step :adb push recovery.img /sdcard it says :cannot start recovery.img: No such file or directory...is the recovery.img also supposed to gon on the root of my sd card? or just the tools folder, cause its there?
yes its suppose to be on the root of the sdcard too
still says cannot stat 'recovery.img': no such fire or directory
am i supposed to replace /sdcard with /J (which is what my phone comes up as in my computer) -tried that still didn't work...
can u link me to the tut u are using?
http://forum.xda-developers.com/showthread.php?t=647707
QUOTE=TopazAaron]
duckingzebra said:
did you see the tutorial i linked? still cant figure it out.
Click to expand...
Click to collapse
ok
put the Recovery image in the tools/ in the sdk
after that plug ur phone into the comp
now being there in cmd navigate to the /tools/ folder
then type or copy and paste
adb shell mount -o rw,remount /dev/block/mtdblock3 /system
adb push recovery.img /sdcard
adb push flash_image /system/bin
adb shell chmod 755 /system/bin/flash_image
adb shell flash_image recovery /sdcard/recovery.img
---
now if you still have issues, let me know, sorry i didnt reply, i got busy with other things.
thanks for ur pm tho[/QUOTE]
ok now instead of saying :cannot start recovery.img: No such file or directory
it says error: device not found, when i open my computer my sdcard in my phone shows up and i can open it...
That is really wierd, try joining the irc u may get more help there
-------------------------------------
Sent via the XDA Tapatalk App
TopazAaron said:
That is really wierd, try joining the irc u may get more help there
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
Sorry newser here, irc??
Is your phone actually rooted? To check, turn on your phone, then turn on USB debugging through Settings/Applications/Development/USB debugging. Plug your phone into the computer via the USB cable.
In the run box of your computer, type cmd, then enter.
When the command window shows up, changed you your SDK tools directory. On my system it would be:
cd c:\android-sdk-windows\tools
Then run the following command
adb shell
You're rooted if it comes back with
#
If it comes back with
$
try the typing
SU
if it does not change from $ to # then you might want to try rooting again, and be sure to install the Amon_RA recovery
typing exit multiple times will back you out of adb, and the cmd window.
Hope that helps.
Edit: Of course that works for 2.1 leak 3 users as well.
Easier way for you tho, if you boot to hboot with the send and end buttons, you should see hboot with S off if you're rooted. If it's S On you're not.

Default android lockscreen

Is it possible to change the lockscreen to the default android, i'm new to android nd still tryna get a hold of things. Thanks
-------------------------------------
Sent via the XDA Tapatalk App
lakeside00 said:
Is it possible to change the lockscreen to the default android, i'm new to android nd still tryna get a hold of things. Thanks
-------------------------------------
Sent via the XDA Tapatalk App
Click to expand...
Click to collapse
you can remove the HtcLockScreen.apk from /system/app/ and it will default to the stock android one. Problem is that is suffers from the same fate as many others where the slder is up/down and the time is jummbeled on the left side.
Oh and of course to remove/rename the file in /system/app/ you must be rooted and in recovery mode.
I'm working on how to fix the screen. Flipz did it for android 2.0 but it isn't the same fix in 2.1. If I get more info I'll post back.
I tried to remove HtcLockScreen.apk via adb but I don't think we have system write access yet. even through adb. someone correct me if I'm wrong but I believe this is true.
Edit: As said above... you have to be in recovery. I stand corrected. don't listen to me!
edit #2: tried it in recovery... couldn't even remount. I don't think I did anything wrong...
gmelchert said:
I tried to remove HtcLockScreen.apk via adb but I don't think we have system write access yet. even through adb. someone correct me if I'm wrong but I believe this is true.
Edit: As said above... you have to be in recovery. I stand corrected. don't listen to me!
edit #2: tried it in recovery... couldn't even remount. I don't think I did anything wrong...
Click to expand...
Click to collapse
LOL! love the step by step edits...
I have a script that makes it easy, it is just a modified version of Toast's. It cuts it down to one command input instead of three.
Any way here are the steps:
With phone on plug it into your computer. Open two command windows. Navigate one to the folder you have downloaded toasts recovery script to.
1) In the window that is at evo-recovery> type: adb reboot recovery
This boots you in to the stock recovery
2)in the same window type windows-recovery.bat (adjust for your OS)
This gets you into Amon-RA's recovery
3) Wait for the phone to get the new recovery screen. In the other command window type: adb shell mount -a
Step 3 can be adb remount or you can type adb shell then at the # type #mount -t yaffs2 -o remount,rw /dev/block/mtdblock4 /system
Any way after that point you can exit adb shell back to the command prompt and push/pull anything to /system
unfortunately you can't see it right away and have to wait for reboot. Also this limits some of the apps that we can install because some will need to write to /system and cannot once rebooted.

unrevoked + hosts editing "Directory not empty"

Hello, I rooted with unrevoked and then flashed the rom liberated_aria_FR006_signed.
I booted through clockwork and mounted /system /data /sdcard and then connected to my pc via usb, through the command prompt and adb I tried:
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
when I do rm /system/etc/hosts it says:
rm: can't remove '/system/etc/hosts': Directory not empty
What's wrong? Is /system not full perms through clockwork or is it a unrevoked root problem.
Thanks!
G226 said:
Hello, I rooted with unrevoked and then flashed the rom liberated_aria_FR006_signed.
I booted through clockwork and mounted /system /data /sdcard and then connected to my pc via usb, through the command prompt and adb I tried:
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
when I do rm /system/etc/hosts it says:
rm: can't remove '/system/etc/hosts': Directory not empty
What's wrong? Is /system not full perms through clockwork or is it a unrevoked root problem.
Thanks!
Click to expand...
Click to collapse
Lol...the error tells you exactly what's wrong...but kinda weird since the hosts is a file not a directory...so I can only assume that there are some permission issues...navigate to the /system/etc directory and do a "ls -al" and see what the permissions are for the hosts file...it'll be on the left side of the results of the ls.
Sent From My HTC Aria Using XDA App
Oh fyi...I'm dumb...are you already rooted? I dunno much about adb but you MIGHT have to run the above command through a terminal program on your phone...
Sent From My HTC Aria Using XDA App
I'm rooted but it's through unrevoked as mentioned, does that give me the proper permissions if I adb through clockwork recovery?
If not what would? I'll do a "ls -al" in a little.
G226 said:
I'm rooted but it's through unrevoked as mentioned, does that give me the proper permissions if I adb through clockwork recovery?
If not what would? I'll do a "ls -al" in a little.
Click to expand...
Click to collapse
I'm not sure...as I said im not too familiar with adb...I do know if you have a terminal program on your phone just open it, type the following:
su
cd /system/etc
ls -al
Once you so the ls, if you aren't familiar with *nix, you'll see the following:
-rw-r--r-- 1 root root 25 Aug 1 2008 hosts
Along with a bunch of other lines similar to this, this is the line I'd like to see though
Sent From My HTC Aria Using XDA App
Thanks for the help so far, I did what you said and after doing "ls -al" it said :
-al: No such file or directory
If I do a plain "ls" command it'll list all the files/folders in the system dir.
G226 said:
Thanks for the help so far, I did what you said and after doing "ls -al" it said :
-al: No such file or directory
If I do a plain "ls" command it'll list all the files/folders in the system dir.
Click to expand...
Click to collapse
1 are you doing this in adb or terminal?
2 are you typing "ls -al" with a space? And "al" as in alpha lima?
3 are you in the etc directory?
Sent From My HTC Aria Using XDA App
I did as you instructed, used the terminal program app and tried these commands through there, I'll try adb.
Thanks.
Well the only reason I asked was because ls -al is a legit command lol...I dunno of another way to view the permissions of files...I also don't know if there is a way or not through adb, Google may be your friend in regards to that...
Sent From My HTC Aria Using XDA App
This may be related to busybox on the phone. Can you do an "echo $PATH" from the adb shell and paste the results here?
So from the command prompt you would enter "adb shell" this should give you a new prompt like this #. At this prompt type "echo $PATH" without the quotes. Maybe you do not need all these instructions, sorry.
I see this all the time, from all the noobs (myself included)
First off the ARIA still has S-ON security, so if you are writing to /system/ you _NEED_ to be properly booted into recovery - otherwise you will not have write permissions. its in the FAQ but still completely overlooked. There is a post about this every day i swear.
STEP 1) UNPLUG THE USB <----- CRITICAL
STEP 2) POWER DOWN THE PHONE <----- AFTER STEP 1!!!!!!
STEP 3) HOLD VOLUME DOWN + PRESS POWER to load hboot
STEP 4) SELECT recovery to start clockwork
STEP 5) partitions --> mount --> /system/
STEP 6) connect USB
STEP 7) adb shell
edit: if you shortcut into recovery by just leaving the USB plugged in while you power down - you will not have full permissions.
dexmix said:
I see this all the time, from all the noobs (myself included)
First off the ARIA still has S-ON security, so if you are writing to /system/ you _NEED_ to be properly booted into recovery - otherwise you will not have write permissions. its in the FAQ but still completely overlooked. There is a post about this every day i swear.
STEP 1) UNPLUG THE USB <----- CRITICAL
STEP 2) POWER DOWN THE PHONE <----- AFTER STEP 1!!!!!!
STEP 3) HOLD VOLUME DOWN + PRESS POWER to load hboot
STEP 4) SELECT recovery to start clockwork
STEP 5) partitions --> mount --> /system/
STEP 6) connect USB
STEP 7) adb shell
edit: if you shortcut into recovery by just leaving the USB plugged in while you power down - you will not have full permissions.
Click to expand...
Click to collapse
3 sleepless nights later and dexmix comes to the rescue. This drove me crazy man, I just could not find the answer. Thanks!! Bed time!

[Q] Unrooted and needing help removing ClockworkMod Recovery.

I've rooted then unrooted with super one click but still had superuser icon so I just dropped into trash. All was good then so I decided to uninstall/delete everything associated with root including going into astro and deleting (hope this isn't the downfall) clockwork folder holding backup... Now 1st time shutting down after doing all this last night then booting up this morning I'm still getting the clockworkmod recovery green screen to reboot system now. Only thing I can see left is in phone settings>applications>mng apps>all tab> is Terminal Emulator. So of course my ? is how the hell do I get rid of this?? Someone recommended reroot then delete logwrapper.bin to logwrapper. I really don't want to SBF flash so any other recommendations would be greatly appreciated.
Running OTA 2.2
i would sbf just to be safe man if you try deleting stuff and accidently delete something wrong it wouldnt be good and then you would have to sbf anyways so i say just sbf and start from a clean slate. besides that i got nothing!
Try the following:
UNINSTALL the Recovery APK (Droid X Bootstrapper) in Settings, Applications
Reboot
Root Phone
Run "adb shell"
Run "su"
Run "mount -o remount,rw /dev/block/mmcblk1p21 /system"
Run "cp /system/bin/logwrapper.bin /system/bin/logwrapper"
Reboot
GSBJackson said:
Try the following:
UNINSTALL the Recovery APK (Droid X Bootstrapper) in Settings, Applications
Reboot
Root Phone
Run "adb shell"
Run "su"
Run "mount -o remount,rw /dev/block/mmcblk1p21 /system"
Run "cp /system/bin/logwrapper.bin /system/bin/logwrapper"
Reboot
Click to expand...
Click to collapse
Does this work??
TheSwig said:
Does this work??
Click to expand...
Click to collapse
Yes, this will work.
Removing BOOTSTRAP COMPLETELY
If you would like to completely remove Droid X bootstrap from your phone, here is what you need to do:
1) connect your phone to ur pc in charge only mode. Make sure it is recognized by adb
A) open command prompt and type "adb devices" (hit enter, your phone should show up)
2) in the command prompt, type "adb shell" (press enter)
3) type "su" (press enter)
4) type "mount -o rw, remount /dev/block/mtdblock4 /system" (press enter)
5) type "cp /system/bin/logwrapper.bin /system/bin/logwrapper"(press enter)
6) type "adb reboot" (press enter)
Your phone will reboot after typing adb reboot, and may take a little bit longer to boot the first time after bootstrap is removed (it may not, I just haven't gone through this process in a while).
Bootstrap should now be completely removed.
Note: all text in quotes is just what you should type...do not include the quotation marks when entering commands.
Disclaimer: I take no responsibility if you mess up your phone. Typing these commands incorrectly CAN mess up your phone. By following these directions, you do so at your own risk.
What can i use to do this? I dled terminal emulator but i cant get it root access for some reason, also tried sshdroid but i dont know how to connect to it from my mac....any help?
Nope, im not getting anything...i granted terminal emulator super user permissions and i tried it through sshdroid, but when i type mount -o .... all i get is the mount usage script...
I don't think he meant for you to use terminal emulator on your phone. Try using command prompt on a PC or terminal on a Mac.
Sent from my DROIDX using XDA App
dwray said:
I don't think he meant for you to use terminal emulator on your phone. Try using command prompt on a PC or terminal on a Mac.
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
Yes, use a command prompt or terminal on Mac
GSBJackson said:
Try the following:
UNINSTALL the Recovery APK (Droid X Bootstrapper) in Settings, Applications
Reboot
Root Phone
Run "adb shell"
Run "su"
Run "mount -o remount,rw /dev/block/mmcblk1p21 /system"
Run "cp /system/bin/logwrapper.bin /system/bin/logwrapper"
Reboot
Click to expand...
Click to collapse
Welp...I tried this...guess what...stuck in a boot loop. Any suggestions?
I have the r2d2 droid 2. I suppose I'll have to SBF it...I'm looking for the file now (if it's even available.)
osufans said:
Welp...I tried this...guess what...stuck in a boot loop. Any suggestions?
I have the r2d2 droid 2. I suppose I'll have to SBF it...I'm looking for the file now (if it's even available.)
Click to expand...
Click to collapse
Yes there should be one you can find on mydroidworld I believe
Sent from my DROIDX using XDA App
SBF is the way to go

[Q] Copying nandroid backups to MAC

I am sure this has been asked and answered, but I am not finding the answer. Anyone have a good method for backing up CWM backups to MAC? I know the CWM backups are stored at /data/media/clockworkmod which is not accessible to the MAC. I guess I could copy them to /data/media/0 and then access them from my mac. I guess I could also use ADB, but am looking for something simpler and less data manipulation. If this has been answered, please link me.
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Pirateghost said:
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Click to expand...
Click to collapse
I have done it with ADB. Was hoping for something more elegant. Thank you.
Sent from my Nexus 7 using xda app-developers app
Pirateghost said:
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Click to expand...
Click to collapse
Could you please write it in a more specific way? I'm a noob
I explain what I did:
I opened the terminal and I went in the folder were I keep the fastboot and adb etc..
I tried first with "./adb pull.." but nothing happened (aka: -bash: ./adb: No such file or directory)
Then I tried "./adb-mac pull.." and it didn't work either but I got the following long message:
"Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
etc..."
I tried both commands at first with the mobile on, then I reset it and I went in recovery mode with the same results..
I'm going insane, I even tried to copy the whole folder of clockworkmod with my backup to another folder, but I couldn't see it with my computer.
I'm running mac OS X, I could eventually try also to my PC windows 7.. I just need to copy my backup to a safe place :crying:
After the pull command you need to tell it what to pull
Sent from my Galaxy Nexus
Pirateghost said:
After the pull command you need to tell it what to pull
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Sorry Pirateghost, I meant that I wrote as you said:
./adb-mac pull /data/media{0, clockworkmod, twrp}
and I got just the long message from the Terminal and it doesn't work (even when using ./adb without the "-mac")
edit: ok I solved it:
I used this and it seems working (finally)
./adb-mac pull /data/media clockworkmod
ziovelvet said:
Sorry Pirateghost, I meant that I wrote as you said:
./adb-mac pull /data/media{0, clockworkmod, twrp}
and I got just the long message from the Terminal and it doesn't work (even when using ./adb without the "-mac")
edit: ok I solved it:
I used this and it seems working (finally)
./adb-mac pull /data/media clockworkmod
Click to expand...
Click to collapse
the {0, clockworkmod, twrp} was to indicate that you can pull ONE of those folders at a time, or pull /data/media and get ALL of them at once

Categories

Resources