Terminal Screw up - Nexus S General

Well.. I heard about Updating Ubuntu, and I've decided to go ahead and take a shot at it. and So one of the requirements for installing ubuntu is that you need to install Busybox. I downloaded an app to install busybox for me. I believe it was called BusyBox Installer. During the install.. (To install the actual busy box) It froze.. So i had to terminate the app.. so then I went back into the Application and tried installing again, it worked. but when I opened up the terminal To try and execute commands, some wouldn't work. Like "ls" wouldn't give me any result. After that, I went on the internet and Tried searching for this error, I was told to reset the path variable. I do not know how to do that and so I was given this command to execute:
Code:
export PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11/bin
Tried that, and it wouldn't work for me. So I'm out of options. Is there anything I can do to fix this problem? It would be greatly appreciated. Thanks
I have an Nexus S, With ICS (4.0.3) Rooted. I am using the Android SDK to run each of my commands.
Edit:
Apparently my path environment variable is changed. all commands are executed in /system/bin/sh/ I'm assuming that I need to remove the /sh/ out of the path environment variable.

Related

problems installing anything

I try to install apk packages like godzson dialer and clear_keyboard and i get errors.
I used apps installer and android dev
apps installer tells me It cannot install the app
android dev I run
adb install C:\clear_keyboard\system\app\HTC_IME.apk
I get
failure [install_parse_failed_unexpected_exception]
I searched for hours finding solutions that say i need to push the files to /system/apps and doing that there is permissions involved and I cant seem to touch anything in /system.
When I run chmod 777 /system i get an error saying unable to change read only file system.
I thought all of this was going to be simple tasks but it's getting really annoying any help would be greatly appreciated. Thanks for everything.
if yr installing through and use
Make sure phone is synced
Make sure app is in tool file I'd adk file
Make sure when at command prompt Ur in adk/tools file first
Adb remount
Adb push (app.apk) /system/(app/framework)
ok I figured out my problem but fixing it is going to be quite confusing. Looks like I would have to know a lot more than I do to fix it. Basically the adb is not reading the phone as root (or something like that). And the ro.secure is set to 1 which it should be set to 0 to be considerd root. So therefore I have to reinstall a bootimg. Ive been reading it on another forum page but i cant post it cause my account hasn't been verified yet. but it's this forum and here is the thread showthread.php?t=443041&page=2
but it's like french to me!!! If anyone can dumb this down for me I would really appreciate it lol thanks a lot you guys have been so much help in the little amount of time ive been a member to this forum. Thank you
redlinethecar said:
I try to install apk packages like godzson dialer and clear_keyboard and i get errors.
I used apps installer and android dev
apps installer tells me It cannot install the app
android dev I run
adb install C:\clear_keyboard\system\app\HTC_IME.apk
I get
failure [install_parse_failed_unexpected_exception]
I searched for hours finding solutions that say i need to push the files to /system/apps and doing that there is permissions involved and I cant seem to touch anything in /system.
When I run chmod 777 /system i get an error saying unable to change read only file system.
I thought all of this was going to be simple tasks but it's getting really annoying any help would be greatly appreciated. Thanks for everything.
Click to expand...
Click to collapse
First, put your apk's in your "C:\AndroidSDK\Tools\" Folder
Second open the cmd window and do "cd C:\AndroidSDK\Tools\"
Third do "adb remount"
Fourth "adb push xxxx.apk /system/app/"
that will install them
When remounting I get error
Code:
remount failed: Operation not permitted
but I continue anyway and the
Code:
adb push HTC_IME.apk /system/app
sends the file with no problem but it doesn't install it though.
Here are steps to do if it is not already installed on your phone. However, if it is you can not install when it is already there. I'm not sure how to remove in terminal and everything I've tried it tells me read only blah, blah, blah...
I tried mount -o remount,rw /system---that is suppose to work.
1.Make sure anything you want installed is in
the root of the sdcard..(/sdcard/nameoffile.apk)
2. Download a terminal emulator from the market.
If it installs continue..If not then continue on back to the thread.
3. Open up the terminal emulator. It should ask permission from SU. >Always allow
4. Now type the following
su (hit enter)
install /sdcard/name_of_file.apk /system/app/name_of_file.apk----if it is a system app
If it is a downloaded app then use /data/app
Ok.... well I tried that way also and I get the error
Code:
install: not found
I downloaded the terminal app from the market and entered the commands as you said for ex.
Code:
install /sdcard/HTC_IME.apk /system/app/HTC_IME.apk
Thanks a lot though I wish it could have been that easy.

[Q] Command Prompt Issue When Trying To Exit ADB Shell?

Hi this is my first post on the site and i would appreciate it if anyone could help me with this problem. (I know your probably fed up of hearing about rooting problems but anyway!)
I have succesfully installed ADB and as far as i know it seems to be working properley as i can access the ADB shell on my device.
However when i get to a certain stage of the rooting process it all seems to go wrong.
wiki.cyanogenmod.com/index.php?title=HTC_Tattoo:_Full_Update_Guide
I have been using the above rooting guide (can't hyperlink first post!) and i cannot get past stage 7 of the process because the 'exit' command doesnt seem to work in Command Prompt (Windows 7) and it is stopping me from being able to exit the ADB Shell. I have tried other ways of exiting the shell such as ctrl+C but this kills ADB completely and i think that it is undoing the previous steps of the guide.
I do get the message:
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
so i think that i have successfully rooted the device but i cannot proceed to push the 'su' file to the device as i can't exit the adb shell, i just keep getting lists of text saying reboot (-n) (-p) and everytime i use the exit command nothing seems to happen and the flashing # symbol keeps coming back.
Has anybody else had this problem? or have any idea of how to stop the ADB Shell with any other commands other than 'exi't or Ctrl+C?
Cheers.
If device is rooted, by writing in command prompt the command "adb shell", must appear the symbol #, if the symbol $ appears the device isn't rooted.
If you cannot use adb from pc, run on device a terminal emulator(you can find one on market) the above command to see if you're rooted. Then you can give the next commands from terminal emulator(maybe you need to copy the nessecary files on sd card and change the related paths to point to sd card)
I'm having the exact same problem while rooting my HTC Tattoo (on Windows 7).
I have Android 1.6 (Donut), the baseband is 13.29a.55.13H_3.35.07.33, kernel is 2.6.29-gf922713 and build is 1.67.173.37.
Please help and thanks in advance . I really want to install CyanogenMod 7...
more info
When i say i have rooted the device i mean temporarily by pushing and changing the 'm7' file, the problem is pushing the 'su' file to the device to make the root permanent.
I do get the # symbol when in ADB Shell but only after changing m7 on the device. As i cannot complete the whole rooting process the # is not there permanently and it returns to the $ symbol.
Thanks for the reply, i will try and do it using a terminal on the device. Do you not need root access to use a terminal app?
I'm having the same issue. When I input exit it stucks into that loop and then I got to ctrl+c, and of course the root does not stick
From that point forward I can't do anything else...
If someone overcome the problem please post.
I just used this app to root a zte blade with a new greek stock rom:
http://forum.xda-developers.com/showthread.php?t=803682
Seems to work for almost all devices and in first post have some info about root levels and links to a workaround for devices that have some lock which prevents the full rooting.
I didn't tried anythink cause the rooting process was successful, but you can try this app and if still have problems try to follow the instructions given.
Good luck.
If you have your mobile rooted can you just use this commands:
cd /data/local/bin/
chmod 755 flash_image
flash_image recovery /sdcard/recovery-clockwork-x.x.x.x-click.img
to perform a recovery flash? Without using the su command?
I don't remember if I tried it, but, if it works I recommend using Androot for rooting the device, it worked for me(checked by Root Checker ).
I'm mentioning this just because you recommended the SuperOneClick app.
Update:
For all trying to get thing done, follow the instructions on 1Click modified by tenis and flash the latest cyanogenmod.
It worked!!!
I got it to work using androot. Cm7 is awesome
Sent from my HTC click using XDA App
exit command in adb seems to lock up
like omgsufc, I also reach this stage and can see the message:
uid=0(root) gid=1000(shell) groups=1003(graphics),1004(input),1007(log),1011(a db),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt ),3003(inet)
Again, like omgsufc, when I issue the command:
# exit
ADB shell seems to go into some kind of loop. Pressing ctrl-c or ctrl-d also give the same results. I thus can't go to the next stage. Any help or clues would be greatly appreciated.
I'm on Ubuntu 11.04.
TIA for any help.
Finally got it to work
No matter what I did, rooting using m7 just didn't work for me (Ubuntu 11.04). Running 'while ./m7 ; do : ; done' got me temporarily rooted as issuing 'id' shows me at 'uid=0(root)'. However, issuing 'exit' just left me in a long loop in the terminal from which it never recovers, and hence I could not complete the root process this way.
So I tried androot, which appeared to root me right away. Issuing 'su' in Android Terminal worked, and doing the same in ADB Shell also gets me to the # prompt. However, issuing the 'flash_image recovery' failed no matter what I did. I tried ROM Manager after this initial androot root: it gives me a success message after flashing ClockworkMod recovery, but when I reboot into recovery it just fails. Fastboot also failed consistently.
Finally, when I tried Terminal Emulator to get root access by issuing the command 'su', it says permission denied, even though Terminal Emulator gave me root access.
So... I unrooted Androot. Again trying to root using m7 I got the same problems as before.
I didn't bother trying flash_image or fastboot and instead tried rooting with androot. After doing so, this time Terminal Emulator allowed root access, which gave me some hope.
So I pulled out ROM Manager again, and woot! My Tattoo is on CyanogenMod 7 and am I a happy camper! I like what Cyanogen has given us: ADW Launcher is as good for me as Sense ever was... actually it's better. And finally I get to use all the new apps I've been wanting to use but wouldn't run on Android 1.6.
So thank you Cyanogen, thank you xda-developers, particularly KalimochoAz, thank you Koushik Dutta for ROM Manager, and thank you, whorever developed androot!

Permission denied though phone is rooted

I am trying to get lynx text based browser working on my phone.
I extracted from the lynx.tar.gz file by using -
tar -xzvf foo.tar.gz
This works fine but when I try to run the configuration script using -
./configure
I get a permission denied error though I am logged in as root user. Can anyone help me with this?
Did you mark it executable? (chmod +x configure)
Regardless, automake, autoconf, make, gcc, etc... aren't on Android, so you won't be able to build anyway. You will need to try and setup a cross compile setup using the NDK and/or sources.
Yes I did mark it as an executable. But, no luck.
And, meanwhile I dug in deeper and read about how to get these to work on android and well it wasn't as straight forward as I thought it would be Thanks kllrnohj.

Trying to root but can't get ADB working

I've finally decided to try to root my G2 but can't get past the ADB setup. I downloaded the SDK, but when I open the manager and try to install platform tools it goes through the motions and then tells me nothing was installed. When I open a command prompt and type "ADB devices" it doesn't recognize anything. What am I doing wrong??
EDIT: specifically, when I try to install platform-tools it tells me it couldn't create a directory and nothing was installed.
66 people have read this and nobody has any suggestions to help?
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
I have a problem after rebooting my PC: <Java not found...> Reinstalling doesn't help, adding environment variables too. Any idea?
Just root using the rage/visionary method. No adb needed and very easy to do. Here is the linkhttp://forum.xda-developers.com/showthread.php?t=834228
Sent from my SilverBullet 'HTCDesireZ running CM7'
juvanni said:
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
Click to expand...
Click to collapse
I don't understand? I'm trying to root following the recommended wiki instructions, and I haven't been able to get adb to work so I haven't gotten past that step.
Are you running windows x64? Cause the android installer has issues detecting java on x64 systems.
When it says 'Can't find java' or whatever the error is, click back, then next again, it should find it the second time around. Well thats what happened for me anyway.
-Nipqer
If you're on froyo just use the app z4 root or universal androot
You can also use superoneclick root 2.11
Its very easy and it only take about 3 minutes
Stewie just said that!
I appreciate the help so far, but my problem is I have gingerbread and everything I've read requires froyo for root, and the only way I've read to downgrade uses ADB, so any non-ADB rooting method still won't work for me. I've followed the "ADB for dummies" thread and the other instruction thread and everything seems fine, but when I type in the first command for the downgrading it says adb isn't a recognized command. Am I in the wrong command prompt? I feel like its probably something really dumb I'm doing or not doing but for the life of me I can't figure it out.
Navigate to the folder adb is in.
Hold shift, right click in the folder (make sure nothing is selected)
select 'Open command window here' (or something along those lines)
Adb should work.
-Nipqer
OK, so I'm definitely in the right folder, I read and followed ADB for Dummies thread. Trying to follow this direction:
"Run the following command to verify the exploit has access to what it needs. (Only the first line is the command. The second line should be the result returned if all goes well.)
Code:
$ adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length"
When I type that in, should there be spaces between the "adb" and "shell"? Should there be a space after the command prompt and before "adb"? I've tried several variations of it and it keeps telling me "adb is not recognized as an internal or external operable program or batch file."
ok you need to run the command from the folder with adb.exe in it, type it as adb<space>shell<space>cat<space>/dev/msm_rotator
If you are getting an error search for adb.exe and once found try the command again from this folder,if as you say you are in the right folder then I think you will have to reinstall adb as I just ran the command in the form above and it works so if you still get an error then something has gone wrong with the install
P.S Another way to make sure that adb is working and recognises your phone is to type adb devices, if your phone is attached and recognised then it will return a number
Thank you! I had to uninstall and reinstall the package, I don't know what was wrong but it seems to be working now. Also, I knew I was probably doing something stupid, and I was. I wasn't in the platform-tools directory for my command prompt, I was in the TOOLs directory. Just so I'm clear, every command I type into the terminal should be in the Platform-tools directory, correct?
Now, assuming I can follow all the other directions with no problems, once I get to the downgrade pushing steps, I will lose all my current settings, right? It will be a fresh froyo 2.2 like it came to me originally? Other than using Appbrain to back up my current apps, how else should I make a backup?
Final question, do I need to follow the temp root directions and push the downgrade all at one time? Or can I do the temp root and come back at a later time to push the downgrade?
First problem solved then!
Yes but follow this Step 4
Now we need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)if you want to.
Once done you can use ADB from the command prompt in ANY folder,very handy IMO.
If I was you I would set aside enough time and see it through,no point to temp rooting alone.
Get Titanium backup from the market an absolute essential app with this you can backup,upload to dropbox(Another essential app) uninstall apps and a host of other useful tools.
Read the guide first as well,good luck.

Temporary Magisk Root on VZW Pixel 2 (XL)

I have moved this from here https://forum.xda-developers.com/pixel-2-xl/how-to/zero-day-vzw-pixel-2-xl-root-t3977851/
Hey everyone!
I am here to post some good news. I have made a set of scripts that can give you temporary root through Magisk. It persists until the next reboot, but setting it up after the initial setup is a lot easier.
The script requires that it be run as root, which means that you need to run the temproot binary provided earlier.
Big thank you to Elliwigy for walking me through the initial process and for providing the commands.
Source code for the "exploit" binary can be found here, and compiled from source if you so desire.
This script is provided with no warranty whatsoever. This script may brick your phone. YOU ARE RUNNING THIS AT YOUR OWN RISK. I ACCEPT NO RESPONSIBILITY FOR WHAT THIS SCRIPT DOES TO YOUR PHONE.
Click to expand...
Click to collapse
IF YOU DO NOT WANT TO RISK YOUR PHONE BEING BRICKED, DO NOT CONTINUE!
Requirements:
A Verizon Pixel 2 (XL) on the September 2019 Security Patch
A computer with ADB If you need ADB, it can be found here
A USB cable
Appropriate USB drivers USB drivers can be found here if needed
Some knowledge of how to use the terminal
The taimentempmagisk.zip file (attached)
The APK for Magisk Manager (included in the zip)
Hope
Magisk and MagiskManager can also be downloaded from here if you wish.
If Magisk Manager prompts you to perform additional setup, DO NOT ACCEPT. (unless you like having a bricked phone)
Install the Magisk Manager APK onto your phone
Use ADB to push the attached ZIP file (taimentempmagisk.zip) to /data/local/tmp
Open an ADB shell and navigate to /data/local/tmp
Extract the ZIP file with the unzip command
Navigate into the scripts folder
Run ./exploit (If this step fails, repeat until you have a root shell)
Run ./installtemproot.sh magiskinit64
After you have done this, you now have root!
If you reboot and want root back, just run /data/local/tmp/scripts/exploit in an adb shell, then run /data/local/tmp/scripts/temproot.sh
Enjoy your root!
Does not work
Hexlay said:
Does not work
Click to expand...
Click to collapse
I'm currently working on a solution, it seems some terminal emulators error out on the mount command.
EDIT: Instructions updated.
logan2611 said:
I'm currently working on a solution, it seems some terminal emulators error out on the mount command.
EDIT: Instructions updated.
Click to expand...
Click to collapse
I'v tried, everything went fine, however magisk still does not detect root
Hexlay said:
I'v tried, everything went fine, however magisk still does not detect root
Click to expand...
Click to collapse
did u install magisk manager? if u dont have it installed then u womt b able to grant su permissions.. it does work as we spent hours testing and ensuring it works before he posted it.. id triple check each instruction and make sure u have magisk apk installed.. if not then reboot and try again from the beginning
elliwigy said:
did u install magisk manager? if u dont have it installed then u womt b able to grant su permissions.. it does work as we spent hours testing and ensuring it works before he posted it.. id triple check each instruction and make sure u have magisk apk installed.. if not then reboot and try again from the beginning
Click to expand...
Click to collapse
Yep, i have it pre-installed, i did follow every step provided, but prompt is not showing up and afterwards it does not detect root... Well, i'v done it several times, i tried ./temproot.sh after install script, but still same...
Well, i guess i have to reboot
Edit: tried reboot, still same.... i'll write down what i have done exactly.
Rebooted dvice
Went into terminal emulator and executed ./taimen
After that went one step back with cd .. and executed chmod -R 777 scripts
Then went to pc and entered ADB shell and executed ./taimen there too, because otherwise i was getting This script must be run as root. Exiting. on install script
Then ran install script. Process did complete successfully, however no magisk prompt was fired and afterwards root was not detected
I'v tried chmod -R 777 . even from adb shell, tried opening magisk app and then doing these whole process... no luck
First, thanks for your supporting and your instruction
I just install October(6/10) update so any risk if i follow your instruction
Anyone know how to delete the update? I've downloaded and refuse to restart my device in the wake of these new development
enigma2446 said:
Anyone know how to delete the update? I've downloaded and refuse to restart my device in the wake of these new development
Click to expand...
Click to collapse
I also want to know this. I need to reboot but I don't want to move to the October patch.
Hexlay said:
Yep, i have it pre-installed, i did follow every step provided, but prompt is not showing up and afterwards it does not detect root... Well, i'v done it several times, i tried ./temproot.sh after install script, but still same...
Well, i guess i have to reboot
Edit: tried reboot, still same.... i'll write down what i have done exactly.
Rebooted dvice
Went into terminal emulator and executed ./taimen
After that went one step back with cd .. and executed chmod -R 777 scripts
Then went to pc and entered ADB shell and executed ./taimen there too, because otherwise i was getting This script must be run as root. Exiting. on install script
Then ran install script. Process did complete successfully, however no magisk prompt was fired and afterwards root was not detected
I'v tried chmod -R 777 . even from adb shell, tried opening magisk app and then doing these whole process... no luck
Click to expand...
Click to collapse
Can you post the output of the script?
logan2611 said:
Can you post the output of the script?
Click to expand...
Click to collapse
That's output every time, it finishes script successfully
Hexlay said:
That's output every time, it finishes script successfully
Click to expand...
Click to collapse
Sorry, screenshot didn't load the first time. Looks like all the files are already in place, try rebooting and running temproot.sh
running ./taimen just gives a "permission denied" error
Some1CP said:
running ./taimen just gives a "permission denied" error
Click to expand...
Click to collapse
If you are getting this on the phone, you need to use a terminal emulator with access to a directory in /data. I used Termux in my example.
If you want to use Termux, here is how to get taimen running:
Install Termux
Open Termux and let it install
Run termux-setup-storage
Push the ZIP to /sdcard/Download
On the phone, move the ZIP file from ~/storage/downloads to ~
Continue from step 4 in OP
logan2611 said:
If you are getting this on the phone, you need to use a terminal emulator with access to a directory in /data. I used Termux in my example.
If you want to use Termux, here is how to get taimen running:
Install Termux
Open Termux and let it install
Run termux-setup-storage
Push the ZIP to /sdcard/Download
On the phone, move the ZIP file from ~/storage/downloads to ~
Continue from step 4 in OP
Click to expand...
Click to collapse
How would I move it to ~ without root?
Edit: nevermind, got it to run.
Just need to figure out how to make the temproot work.
Some1CP said:
How would I move it to ~ without root?
Click to expand...
Click to collapse
In Linux ~ is a shortcut for the home directory, which is always owned by the current user. Root is not required to move the ZIP from ~/storage/downloads to ~ on Termux.
Ok I can't run installtemproot.sh in adb, and neither on the phone itself through termux. Is there something I'm missing? su can't be find on the phone.
Edit: It works if you use Jack Pal's terminal emulator and you cd into its directory on adb. Sadly magisk doesn't recognize it's installed.
I'm on October 5 2018 security update and should flash September 5 2019 try temp root?I know stay away October's 2019 that's patch,sean
logan2611 said:
Sorry, screenshot didn't load the first time. Looks like all the files are already in place, try rebooting and running temproot.sh
Click to expand...
Click to collapse
Sorry for wait time, literally had to wait for type-c to type-c connection -_- it's pain....
Anyway i did reboot and tried again with just temproot.sh, without repeating previous stuff. No prompt is fired, but output is success
Hexlay said:
Sorry for wait time, literally had to wait for type-c to type-c connection -_- it's pain....
Anyway i did reboot and tried again with just temproot.sh, without repeating previous stuff. No prompt is fired, but output is success
Click to expand...
Click to collapse
client: launching new main daemon process
Click to expand...
Click to collapse
The output suggests that Magisk started successfully. What does Magisk Manager look like after running that script?

Categories

Resources