Terminal Emulator - Hero CDMA Q&A, Help & Troubleshooting

"Hi" all.
I was wondering. If anybody could be so nice and tell if I I can push adb files with. This app... or better can I push files via phone.
Thank you in advanced. .
Sent from my HERO200 using XDA App

Adb commands are completely different than terminal commands.
First enter "su" to get substitute user (the # sign)
Then enter "mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system" to make the root r/w
to copy files use "cp" command
to move files use "mv" command
to remove files use "rm" command
to change file/dir permissions use "chmod"
to change directories use "cd" - "cd .." will bring you back one directory - "cd //" brings you back to root
to list files in the dir use "ls"
to read/mod/combine a file use "cat"
to edit a value use "echo"
to see running processes use "top"
to kill a process use "kill -9 PID#HERE"
ex) cp /sdcard/download/myapplication.apk /data/app/myapplication.apk
If you know any linux commands then you should know your way around terminal emulator. If you want i can give you more examples just let me know. Hope this helped

A terminal emlator on the phone works the exact same way at typing "adb shell" into ADB. Kyouko gave you most of the commands you'll need.

hey guys thanks for the support.. but if i want to push a .txt what command would i put in..

Depends where you want to push the text and where it's located.
For example if its located just straight on the sdcard and you want to move it to /system/etc/ you'd enter:
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cp /sdcard/nameoffile.txt /whereeveryouwantit/nameoffile.txt
its Exactly the same way as the example i had on my last post

kyouko said:
Depends where you want to push the text and where it's located.
For example if its located just straight on the sdcard and you want to move it to /system/etc/ you'd enter:
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cp /sdcard/nameoffile.txt /whereeveryouwantit/nameoffile.txt
its Exactly the same way as the example i had on my last post
Click to expand...
Click to collapse
Yo.... kyouko thank you so much..
Sent from my HERO200 using XDA App

Related

help with user.conf

can someone give me a tutorial on how to update the user.conf..i have looked at the compcache threads and linux swap but im not getting it...i want to be able to update it through terminal emulator and do i have to do nething to the userinit.sh if i change the user.conf...because numerous configs i have done for swappiness and linux swap...etc, have shown no difference..can somone give me a walkthrough...thanks so much..sry if i have a lot of questions just want to make myself more knowledgeable so i can hopefully return the favor to somone else one day
i do not know if you can edit it through the terminal sorry. i do know that you do not have to change the userinit.sh if you change user.conf, also i do know that you can open it up with PSPad (thats what i use) on a computer edit it there and push it back to phone and reboot. sorry i couldn't answer all of your questions
well i have had no problems editing it...its just putting it back nd making sure it works..now i have no problem using adb if u know of a tutorial to use it on mac...or know how to use it on mac
when you put it back on the phone did you make sure to chmod 755 it after you put it back on the phone and reboot?
then to text it with adb just type adb shell sh /system/sd/userinit.sh -s and see if the new values you put in are reflected in the output of that command
david1171 said:
when you put it back on the phone did you make sure to chmod 755 it after you put it back on the phone and reboot?
then to text it with adb just type adb shell sh /system/sd/userinit.sh -s and see if the new values you put in are reflected in the output of that command
Click to expand...
Click to collapse
delete this post; see below...
david1171 said:
when you put it back on the phone did you make sure to chmod 755 it after you put it back on the phone and reboot?
then to text it with adb just type adb shell sh /system/sd/userinit.sh -s and see if the new values you put in are reflected in the output of that command
Click to expand...
Click to collapse
this applies to tools and location of user.conf on cyanogen's roms ->
-transfer it to the root of your sdcard from your pc or mac to the g1.
-unmount sdcard from dropdown on the g1
-open up terminal on the g1
type and hit enter afterwards: cp /sdcard/user.conf /system/sd
type and hit enter afterwards: dos2unix /system/sd/user.conf
type and hit enter afterwards: chmod 664 /system/sd/user.conf
type and hit enter afterwards: exit
reboot
see this is my problem..it does not find it in system/sd...it is in system/bin so am i suppsed to copy it back to /system/bin or system/sd
and can someon explain what the difference is between chmod 664 and chmod 755 nd why i should do them
bonkasnucca said:
see this is my problem..it does not find it in system/sd...it is in system/bin so am i suppsed to copy it back to /system/bin or system/sd
and can someon explain what the difference is between chmod 664 and chmod 755 nd why i should do them
Click to expand...
Click to collapse
i think chmod 755 gives it read/write permissions. do not know about 664. try putting it in system/sd with adb then chmod 755 it and see if that works
david1171 said:
i think chmod 755 gives it read/write permissions. do not know about 664. try putting it in system/sd with adb then chmod 755 it and see if that works
Click to expand...
Click to collapse
775 = rwx-rwx-rx. conf file does not need executable in u-g nor x in o groups.
664 = rw-rw-r
if it is in /system/bin do this:
open up terminal
dos2unix /sdcard/user.conf
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cp /sdcard/user.conf /system/bin
chmod 664 /system/bin/user.conf
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
exit
exit
reboot

How to push files using busy box in the terminal emulator

Hello folks, i have a quick question... i have cyan mod 4.1.99 installed on my phone which im sure comes equipped with busybox. I am trying to find the commands that i would type into terminal emulator to push .apk files without having to use adb.. my pc went up and all i have is my g1 phone now. Is it possible to do what adb does like install, push, and pull files through terminal emulator and busybox? If so what are the commands, or is there a thread with a list of commands? Thanks in advance
to install an app
busybox install <path to apk>
there may be an arguement im missing.....but it should still work (if you put in a random argument or do -h or -help, it should give you the lists. i dont remember what they are though)
for moving files, use the mv and cp commands (mv = move, cp = copy paste)
ie
cp /sdcard/app/heroled.apk /system/sd/app
Click to expand...
Click to collapse
Im trying to copy a file to system/app/ but it says " read only file system"
So i type in a command i found " mount -o rw, remount -t yaffs2 /dev/black/mtdblock3 /system"
But then after i put in the command it stills says read only. Is there a non pc method to remount the system as read/write ? Or should that code work? Another thread said it should change the system
Im trying to copy a file to system/app/ but it says " read only file system"
So i type in a command i found " mount -o rw, remount -t yaffs2 /dev/black/mtdblock3 /system"
But then after i put in the command it stills says read only. Is there a non pc method to remount the system as read/write ? Or should that code work? Another thread said it should change the system
bbbblack said:
Im trying to copy a file to system/app/ but it says " read only file system"
So i type in a command i found " mount -o rw, remount -t yaffs2 /dev/black/mtdblock3 /system"
But then after i put in the command it stills says read only. Is there a non pc method to remount the system as read/write ? Or should that code work? Another thread said it should change the system
Click to expand...
Click to collapse
its block, not black
that should mount as rw

***HELP***

HOW DO I LOAD A CUSTOM LAUNCHER?????CAN SOMEONE HELP ME PLZ
Jerzdre said:
HOW DO I LOAD A CUSTOM LAUNCHER?????CAN SOMEONE HELP ME PLZ
Click to expand...
Click to collapse
You can use adb: (enter after each line) Put Launcher.apk in C: 1st.
adb shell
rwsystem or mount -o rw,remount /dev/block/mtdblock3 /system
exit
adb push C:\Launcher.apk /system/app
or you can use terminal: (enter after each line) Make sure Launcher.apk is on the root of your sd card 1st
su
rwsystem or mount -o rw,remount /dev/block/mtdblock3 /system
rm system/app/Launcher.apk
cp sdcard/Launcher.apk /system/app
exit
exit
Hope this helped.
Exiting out will cause problems. A lot!
Rather than typing exit type reboot instead.

Removing thru Term Emulator

I am attempting to remove a couple of .apk's through terminal emulator but keep getting the Read-only file system error.
I searched and found a bunch of instances where remount is used through ./adb, and knew that, but not sure about how that error is fixed or handled through the emulator on the phone...
Anyone know if you can remove .apk's in /system/app thru Terminal Emulator, and if you can, can you tell me or point me in the right direction on where to find the answer?
I use Better Terminal Emulator. I would recommend Root Explorer for this though. It works great for me. Both apps cost money but are well worth it. I get a lot of use out of them.
Open up terminal emulator:
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cd /system/app
ls (this lists all the .apks in the directory so you know the name)
rm XXXXX.apk (case sensitive)

How can I run 'adb root' on Nexus One

Hi,
I have rooted Nexus One which runs on GingerBread. I can open 'adb shell' and then execute 'su' there.
But when I try to 'adb remount', it fails.
Code:
$ adb root
adbd cannot run as root in production builds
$ adb remount
remount failed: Operation not permitted
Basically, I want to copy a file from my Desktop (MacOSX) to /system/bin on the device, is there anyway to do that on my Nexus One?
You rooted a stock OS - it doesn't have insecure boot, so ADB doesn't allow remount and other root commands.
hap497 said:
Hi,
I have rooted Nexus One which runs on GingerBread. I can open 'adb shell' and then execute 'su' there.
But when I try to 'adb remount', it fails.
Code:
$ adb root
adbd cannot run as root in production builds
$ adb remount
remount failed: Operation not permitted
Basically, I want to copy a file from my Desktop (MacOSX) to /system/bin on the device, is there anyway to do that on my Nexus One?
Click to expand...
Click to collapse
It seems like you are trying a bunch of things without reading beforehand, and understanding what you are doing. As has been said to you before, you cannot use the adb remount command with a secure boot image. If you want read/write access to the /system partition, you need to do the following:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Now you have read/write access to the /system partition. No you can copy files from your sdcard to the system partition if you want. When you are finished with whatever you have to do, don't forget to issue the following command:
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
There you have it. However, if you would have read a bit, instead of starting a new thread for each question you had, you would already have found what to do...

Categories

Resources