[Q] a little question about autoroot batch - General Questions and Answers

Sorry for silly question
I have not studied anything about programming
I am trying to make a autoroot batch for myself and the bat was stopped at here (after the "adb shell" with A "#")
adb shell
/data/local/tmp/sh
echo 'ro.kernel.qemu=1' > /data/local.prop
I have used few hours to try to solve this myself but seems its too difficult for someone have not studied anything about programming

Related

Noob guide: how to start terminal emulator as root.

The way to start the terminal as root is pretty easy.
Open term emulator and then hit the menu button and go into preferences. You need to go down to the bottom where it says something like initial command. Click that and at the end of the export command you see (I think the end is after $PATH) type ;su then hit enter. Now whenever you start TE you get su immediately.
Sent by breaking the sound barrier
Indirect said:
The way to start the terminal as root is pretty easy.
Open term emulator and then hit the menu button and go into preferences. You need to go down to the bottom where it says something like initial command. Click that and at the end of the export command you see (I think the end is after $PATH) type ;su then hit enter. Now whenever you start TE you get su immediately.
...
Click to expand...
Click to collapse
Sorry to re-open this old thread, but can anyone suggest modification to the terminal emulator that may allow it to START as root. Typing "su" afterwards switches the user, however the app DOESN'T start initially as root.
There's a better way to do it. Allow me to elaborate some logic:
In Terminal Emulator, whatever you set as the 'shell command line', basically is nothing more than the command you set as the 'initial shell command'. The key difference is that the 'shell command line' is initiated prior to the 'initial shell command'. Therefore, anything set as 'initial shell command' to automate root access comes secondary to the shell you have already started (through the 'shell command line'), which will cause you opening a shell in a shell and thus having to exit two shells. This is dirty. You could work around that with an 'initial shell command' like "su && exit", but it'll remain to be a dirty solution.
If you want the shell in Terminal Emulator to start as root, then set the following 'shell command line' (personally I prefer bash):
Code:
[SIZE="3"]/system/xbin/su -c "/system/xbin/bash -"[/SIZE]
That way only, Terminal Emulator will actually start your session as root and nothing more but root. When you exit the shell, you exit the one and only shell initiated as root ending your session at once.
Now for the 'initial shell command', which you no longer require to obtain root using the above method, I personally have the following set to keep things consistent and give the shell a nice looking start:
Code:
[SIZE="2"]mkdir -p /data/local/bin && export PATH=/data/local/bin:$PATH && clear && uname -a && echo[/SIZE]
I hope this clarified things a bit.
Albert
bitmaster2000 said:
There's a better way to do it. Allow me to elaborate some logic:
In Terminal Emulator, whatever you set as the 'shell command line', basically is nothing more than the command you set as the 'initial shell command'. The key difference is that the 'shell command line' is initiated prior to the 'initial shell command'. Therefore, anything set as 'initial shell command' to automate root access comes secondary to the shell you have already started (through the 'shell command line'), which will cause you opening a shell in a shell and thus having to exit two shells. This is dirty. You could work around that with an 'initial shell command' like "su && exit", but it'll remain to be a dirty solution.
If you want the shell in Terminal Emulator to start as root, then set the following 'shell command line' (personally I prefer bash):
Code:
[SIZE="3"]/system/xbin/su -c "/system/xbin/bash -"[/SIZE]
That way only, Terminal Emulator will actually start your session as root and nothing more but root. When you exit the shell, you exit the one and only shell initiated as root ending your session at once.
Now for the 'initial shell command', which you no longer require to obtain root using the above method, I personally have the following set to keep things consistent and give the shell a nice looking start (think twice before commenting about the mkdir if you don't like it):
Code:
[SIZE="2"]mkdir -p /data/local/bin && export PATH=/data/local/bin:$PATH && clear && uname -a && echo[/SIZE]
I hope this clarified things a bit.
Albert
Click to expand...
Click to collapse
Thanks a lot, I solved the problem somewhat differently, in a way that may cause some raised eyebrows from people concerned with security. I created a copy of "sh", did a chmod 6755 on it, and set it as the shell. The reason for this is that I don't have superuser installed on my phone.
Off topic, it's all moot now because I managed to drop it again and the LCD detached from the gorilla glass. Happens once every 9 months. I came to XDA to see from my old posts where I bought the screen before.
Initial Command not working in cm11 (s7262).
Entering su in Initial Command in Terminal Emulator Preferences get this result:
Code:
[email protected]:/ $ 8;53R
Entering manually su command get OK., but initial command is not working.
How can I fix this problem?
Thanks.

[Q] Need help after rooting followed by reset, BADLY!!!!!!!

Okay, So I have a Samsung Admire running 2.3.4 and has a kernel of 2.6.35.7. Purchased 3 weeks ago. I rooted the phone and within a day I had lost the ability to make or receive calls. the phone app crashes every time.and I thought that I had deleted some vital file and thus ruined the phone. After a couple days and nights reading and experimenting I believe that that changing the screen density with Rom Toolbox from 160 to 167 is causing the app to fail. Now the problem is my inability to get rooted again, after resetting back to factory. Nothing I have tried will work and what may, seems baffling. I tried multiply times the original method that was successful, Admire_Root_Windows, Super one click, I tried running both from the SD card, I even downloaded a handful of Android Development programs because I read somewhere that I had to, I'm desperate here. I even came across this :
This was successful with: (I bought the phone 3 days ago)
Android: 2.3.4
Kernel: 2.6.35.7
You need a copy of su, and superuser. (If you have superone click, its all there, just run it adb from that directory)
adb shell "rm /data/log/dumpState_app_native.log 2>/dev/null"
adb shell "ln -s /data/local.prop /data/log/dumpState_app_native.log 2>/dev/null"
adb shell "app_process /dev/null"
REM This command may take a while.
adb shell "echo "ro.kernel.qemu=1" > /data/local.prop 2>/dev/null"
adb reboot
REM Device vibrates (kinda pulses) This is good.
adb wait-for-device
adb shell "rm /data/local.prop 2>/dev/null"
adb shell "rm /data/log/dumpState_app_native.log 2>/dev/null"
adb remount
Thats it, your device is rooted. Now to install the goodies...
adb push su /system/xbin/su
adb shell "chmod 4755 /system/xbin/su"
adb shell "ln -s /system/xbin/su /system/bin/su"
adb install Superuser.apk
Now, before anything else happens, I was having issues with full root. (Root checker claimed everything was fine.. titanium backup worked, but could not remove some crapware..) so at this point, you can go into /system/app and remove the Metro apks. I'd recommend clearing Dalvik cache after you're done as well.
adb reboot
That looks great but there are no instructions and in where does that get typed?
I will have to go buy another at some point tomorrow if I dont get this phone fixed. All I need to do is change the screen res back to 160 and I "think" it will be fine. Everything else runs like a champ. BTW, I do have a LG Optimus T / LG P509 running 2.2. maybe I can use it to fix the other. It's inactive and I have no plans to call tmobile and have it turned on. Please make your answers as though you are dealing with someone who's had a lobotomy, seriously.
How can I reroot?
Thanks,
Zeke
Well...Never mind, I managed to get it figured out...
Thanks,
Zeke

[Q] ATT Avail root

I been looking for an ATT Avail root guide since january, I found this page today and I am wondering if anyone has done this successfully?
if you google "root att avail" it is the top search result link right now and it is at a site called android police.
here is a copy/paste of the article:
New root methods show up all the time, so it's not a huge deal that a rather unknown phone on AT&T is now rooted. So why are we posting about it? Because the root method used is, well... interesting.
It was uncovered by our own Justin Case from TeamAndIRC, and while a big part of the process will look very familiar to some of you, there is one step that induces a wait, what? moment.
Before you get started throwing commands at the little guy, though, you need to grab this file. After that, commence command throwing.
adb shell rm -r /data/local/logs (if this command gives you an error, do not worry, it is precautionary)
adb shell mkdir /data/local/logs
adb shell ln -s /data/local.prop /data/local/logs/loglast1.tar.gz
Dial *983*7668# on your phone. This does a few things, it mounts /system as writable on boot, and creates the loglast1.tar.gz.
Wait about 10 seconds, then continue.
adb shell echo 'ro.kernel.qemu=1' > /data/local.prop (Nod to Rosenberg here)
adb reboot
Once the phone reboots, continue
adb push su /system/xbin/su
adb shell chown 0.0 /system/xbin/su
adb shell chmod 06755 /system/xbin/su
adb shell rm -r /data/local/logs
adb shell rm /data/local.prop
adb shell rm /data/property/persist.sys.ztelog.enable
adb shell rm -r /data/local/rwsystag
Head into the Market and grab the Superuser app.
Done.
Catch that bold part? Looks like someone at ZTE dropped the ball and left seventy-nine developer codes in the retail version of the device. Oops.
Of course, their mistake is your gain. Hell, there's even a code to disable Carrier IQ: *983*24737#. Enter the code, ???, profit.
While this is definitely an unusual and unique find, it's also quite dangerous. This means that any app can mount the system as writable and, from there, basically control everything. As a result, JCase contacted ZTE to let them know of their oversight.
Click to expand...
Click to collapse
if someone could let me know if this is legit, that would be a fantasticism.
yes that is legit.
see my thread:
http://forum.xda-developers.com/showthread.php?t=1437032
Jcase broke it, the loon created a batch file to make it easier
http://forum.xda-developers.com/showpost.php?p=21627136&postcount=37
thats the last version of the batch file
Cool, thanks, for some reason I cannot connect to my avail via usb, I have it in developer mode and unknown sources checked, I ran adb devices command and it does not find my phone and when I try to run or debug in eclipse it does not find my phone there either.
I used it, and now have root. I wish all phones were this easy to root.

I have bricked my phone I think please help.

Hello I have a HOX from att with the 1.85 software number.
I attempted to use this method to root my phone. http://forum.xda-developers.com/showthread.php?t=1709296
I proceeded with the instructions as followed and was sucessfully able to run these commands:
adb shell rm /data/data/com.redbend.vdmc/lib/libvd*
adb reboot
adb shell ln -s /data/local.prop /data/data/com.redbend.vdmc/lib/libvdmscomo.so
adb shell ls -l /data/local.prop
adb shell "echo 'ro.kernel.qemu=1' > /data/local.prop"
Now it's time to reboot
adb reboot
After phones reboots
adb remount
The command prompt indicated a successful remount. (At this point on the phone only the notification bar was working and nothing else was on the screen and right now that is where my phone is stuck, but i proceeded on)
I entered this command adb push su /system/xbin/su
and recieved a error
failed to copy 'su' to '/system/xbin/su': Read-only file system
At this point I did not know what to do I proceeded to reboot and then remount again.
Now I am stuck with just the notification bar responding and the settings not opening.
I am hoping anyone can help me also please PM me. I would appreciate any help with my situation.
If possible could someone g chat with me as typing and waiting for replies is taking to long.
Sorry if I come off as needy but the possiblity of losing the phone I recently bought is scaring me
sunny342 said:
Hello I have a HOX from att with the 1.85 software number.
I attempted to use this method to root my phone. http://forum.xda-developers.com/showthread.php?t=1709296
I proceeded with the instructions as followed and was sucessfully able to run these commands:
adb shell rm /data/data/com.redbend.vdmc/lib/libvd*
adb reboot
adb shell ln -s /data/local.prop /data/data/com.redbend.vdmc/lib/libvdmscomo.so
adb shell ls -l /data/local.prop
adb shell "echo 'ro.kernel.qemu=1' > /data/local.prop"
Now it's time to reboot
adb reboot
After phones reboots
adb remount
The command prompt indicated a successful remount. (At this point on the phone only the notification bar was working and nothing else was on the screen and right now that is where my phone is stuck, but i proceeded on)
I entered this command adb push su /system/xbin/su
and recieved a error
failed to copy 'su' to '/system/xbin/su': Read-only file system
At this point I did not know what to do I proceeded to reboot and then remount again.
Now I am stuck with just the notification bar responding and the settings not opening.
I am hoping anyone can help me also please PM me. I would appreciate any help with my situation.
If possible could someone g chat with me as typing and waiting for replies is taking to long.
Sorry if I come off as needy but the possiblity of losing the phone I recently bought is scaring me
Click to expand...
Click to collapse
I ended up just turning off the phone and then opening hboot and doing a factory reset. It got me back to stock so at least I can use my phone
sunny342 said:
I ended up just turning off the phone and then opening hboot and doing a factory reset. It got me back to stock so at least I can use my phone
Click to expand...
Click to collapse
When you try and mount your phone, since you factory reset through Hboot, you'll need to reformat your SD card because you corrupted it. Just some information for you.
Factory reset in bootloader, plug it in to comp, bring up "my computer" on your computer. Right click removable storage and choose "format"
Sent from my One X using Tapatalk 2

The Linux shell for beginners.

I just wanted to share some links to help out some of the users who may already use Linux from time to time. Linux can be a very intimidating sometimes.
I finaly left Windows for good and was having trouble remembering shell commands. Thought I would post some refrences to maybe help some of you guys out who are new to the Linux shell as well. Good luck!
http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://bash.cyberciti.biz/guide/Main_Page
http://linuxcommand.org/learning_the_shell.php
http://www.fortystones.com/40-linux-shell-commands-beginners/
http://community.linuxmint.com/tutorial/view/100
Another one... Thank you Jim!
http://sunsite.utk.edu/UNIX-help/quickref.html
Maribou said:
I just wanted to share some links to help out some of the users who may already use Linux from time to time. Linux can be a very intimidating sometimes.
I finaly left Windows for good and was having trouble remembering shell commands. Thought I would post some refrences to maybe help some of you guys out who are new to the Linux shell as well. Good luck!
http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://bash.cyberciti.biz/guide/Main_Page
http://linuxcommand.org/learning_the_shell.php
http://www.fortystones.com/40-linux-shell-commands-beginners/
http://community.linuxmint.com/tutorial/view/100
Click to expand...
Click to collapse
This is another one, and it is a great reference:
http://sunsite.utk.edu/UNIX-help/quickref.html
I like this idea and think this should be a sticky! Great idea!
jimbridgman said:
This is another one, and it is a great reference:
http://sunsite.utk.edu/UNIX-help/quickref.html
I like this idea and think this should be a sticky! Great idea!
Click to expand...
Click to collapse
Thank you for the link Jim! I added it to the original post.:good:
+1 Been going to this guide for quite a while now has most everything you need to get started.....
The shell is really cool. Once you get the commands down you can start learning shell scripting. It automates processes and make some things easier. Like for example I am really rusty when it comes to Linux and I was getting tired of having to Cd into my sdk tools directory every time I wanted to mess around with Adb. So I created a little shell script that automates the process for me. Like I said, I am new to all of this and I am sure there is a much easier way, but it was fun learning how to do it. This is just a really really simple shell script to change in to my /android-sdk-linux/platform-tools directory, then start the Adb server and list my device. Here is my script...
Code:
#!/bin/bash
#Intro
echo "::::::::::::::::::::::::::"
echo ":: Maribou's Adb Script ::"
echo "::::::::::::::::::::::::::"
sleep 3
#Changing directory
echo "::::::::::::::::::"
echo ":: Locating Adb ::"
echo "::::::::::::::::::"
cd /usr/bin/android-sdk-linux/platform-tools
sleep 3
echo ""
echo ""
#Starting adb
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
echo ":: Starting Adb services and connecting device::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
sleep 2
./adb start-server
echo ""
echo ""
sleep 2
./adb devices
sleep 3
#Connection Message
echo ":::::::::::::::::::::::"
echo ":: Atrix 2 connected ::"
echo ":::::::::::::::::::::::"
sleep 3
echo ""
echo ""
#Goodbye
echo ":::::::::::::::::::::::::"
echo ":: Have a nice day! :D ::"
echo ":::::::::::::::::::::::::"
Maribou said:
The shell is really cool. Once you get the commands down you can start learning shell scripting. It automates processes and make some things easier. Like for example I am really rusty when it comes to Linux and I was getting tired of having to Cd into my sdk tools directory every time I wanted to mess around with Adb. So I created a little shell script that automates the process for me. Like I said, I am new to all of this and I am sure there is a much easier way, but it was fun learning how to do it. This is just a really really simple shell script to change in to my /android-sdk-linux/platform-tools directory, then start the Adb server and list my device. Here is my script...
Code:
#!/bin/bash
#Intro
echo "::::::::::::::::::::::::::"
echo ":: Maribou's Adb Script ::"
echo "::::::::::::::::::::::::::"
sleep 3
#Changing directory
echo "::::::::::::::::::"
echo ":: Locating Adb ::"
echo "::::::::::::::::::"
cd /usr/bin/android-sdk-linux/platform-tools
sleep 3
echo ""
echo ""
#Starting adb
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
echo ":: Starting Adb services and connecting device::"
echo "::::::::::::::::::::::::::::::::::::::::::::::::"
sleep 2
./adb start-server
echo ""
echo ""
sleep 2
./adb devices
sleep 3
#Connection Message
echo ":::::::::::::::::::::::"
echo ":: Atrix 2 connected ::"
echo ":::::::::::::::::::::::"
sleep 3
echo ""
echo ""
#Goodbye
echo ":::::::::::::::::::::::::"
echo ":: Have a nice day! :D ::"
echo ":::::::::::::::::::::::::"
Click to expand...
Click to collapse
Better yet, you could
Code:
sudo gedit .bashrc
, scroll to the bottom, and add that directory to your path (google how, you need to know!), and use it anywhere you want.
then add some aliases to make things shorter. some I use are:
ins= sudo apt-get install
swp= whatever the heck mounts my swap file I use.
Also I would recommend ditching the stock terminal of ubuntu for something better like the life-hacker acclaimed terminator.
lkrasner said:
Better yet, you could
Code:
sudo gedit .bashrc
, scroll to the bottom, and add that directory to your path (google how, you need to know!), and use it anywhere you want.
then add some aliases to make things shorter. some I use are:
ins= sudo apt-get install
swp= whatever the heck mounts my swap file I use.
Also I would recommend ditching the stock terminal of ubuntu for something better like the life-hacker acclaimed terminator.
Click to expand...
Click to collapse
Awesome! thank you for the sugesstions! I thought there was an easier way of doing things I just couldn't remember at the time.
Installing Terminator now... :good:
lkrasner.... YOU ROCK MAN! Totally saved me from all of the typing. And I had no idea about the alises. Thank you!

Categories

Resources