This is for windows but it should be adaptable to other operating systems.
Here is a quick "how to" restore your su on stock if you dont have a backup, when you have lost it for what ever reason.
To confirm you have have lost su from your system, connect your device, open up a cmd window and type or copy and paste the following one at a time:
Code:
adb shell
Code:
su
If su "#" isnt retured then do the following:
Download the LATEST OTA update zip from here-
https://ouyafw.skumler.net/
and place in your adb folder for ease of use.
Connect a wired USB keyboard to the OUYA.
Boot into recovery using -
Code:
adb reboot recovery
Upon reboot, you will likely be presented with a black screen and an Ouya icon with "!". Press the home button on your keyboard.
Using the keyboard, navigate using "up","down" and "enter" to select update from adb.
When prompted, open a cmd and enter the following-
Code:
adb sideload RC-OUYA-1.0.346-r1_ota.zip
Replace the file name above as appropriate.
Upon completion reboot system and you will have regained su.:fingers-crossed:
NOTE: When sideloading the OTA firmware the build dates are compared to one another. If you try to sideload an older version you will receive a fail. Use the same build version or above.
F.A.Q.
Q. I recieve an error stating device not found in recovery.
A. You need to install the drivers for the recovery as you did for adb.
Q. I receive an error due to build.prop
A. When sideloading the OTA firmware the build dates are compared to one another. If you try to sideload an older version you will receive a fail. Use the same build version or above.
This is tried and tested on my device.
Thanks to
@rayman for the firmware link.
Timothy Graupmann for Youtube video.
Thank you, as i have a lost su and i don't want to wait for the next OTA update i will follow this method.
tonyeltriton said:
Thank you, as i have a lost su and i don't want to wait for the next OTA update i will follow this method.
Click to expand...
Click to collapse
No problem.
Did you lose su with the ouya toolbox or via something else.
dully79 said:
No problem.
Did you lose su with the ouya toolbox or via something else.
Click to expand...
Click to collapse
Well i think i have messed up with adb commands, after that i tried ouya toolbox with luck because the program said that my ouya should be rooted but it wasn't. I will restore lost su and then try again ouya toolbox.
Adb reboot recovery takes me to a black screen with ouya logo and " ! " under it.
tonyeltriton said:
Adb reboot recovery takes me to a black screen with ouya logo and " ! " under it.
Click to expand...
Click to collapse
Thats where you press "Home" on your attached usb wired keyboard to enter the options.
dully79 said:
No problem.
Did you lose su with the ouya toolbox or via something else.
Click to expand...
Click to collapse
Lol i did and this would have came in handy if I found it earlier but I figured it out and install the proper su file
I can confirm these instructions work perfectly. I factory defaulted my Ouya after rooting it and lost access to su in the shell even. These steps fixed my Ouya!
Sent from my Nexus 10 using Tapatalk 4 Beta
Related
So here's an odd one i can't put my finger on.
So i used the RUU to go back to stock unrooted, to install the leaked OTA for the radio update. It all worked properly.
I used unrevoked3 to root the phone again. Also worked perfectly.
When using a terminal emulator on the phone i can issue the "su" command and all is well, however when i reboot into recovery and try to issue the "su" command it wonderfully tells me that it cannot find the "su" command.
What step did i miss guys, i've been over this a few times, now trying to get things pinned down, but i just can't figure this one out.
obsidianblackhawk said:
So here's an odd one i can't put my finger on.
So i used the RUU to go back to stock unrooted, to install the leaked OTA for the radio update. It all worked properly.
I used unrevoked3 to root the phone again. Also worked perfectly.
When using a terminal emulator on the phone i can issue the "su" command and all is well, however when i reboot into recovery and try to issue the "su" command it wonderfully tells me that it cannot find the "su" command.
What step did i miss guys, i've been over this a few times, now trying to get things pinned down, but i just can't figure this one out.
Click to expand...
Click to collapse
You are fine. By default, you are already SU in an adb recovery shell, if booted into CWM. If you want to actually do things with SU, you want to mount your system partition.
Oh, and BTW, this belongs in general.
ah ha that's what i was missing. Thanks!!!!
MODS: Can someone please move this to general.
Edit: Interestingly enough, i have mounted the system partition in recovery, and am still getting the same error. /sbin/sh: su: not found.
There should be no need to execute su in recovery as you are already su when in recovery (as shown by the hash sign at the prompt, #).
What is it you're trying to accomplish? Try doing it without explicitly using su as a command?
Sent from my ADR6300 using XDA App
bcgaynor82 said:
There should be no need to execute su in recovery as you are already su when in recovery (as shown by the hash sign at the prompt, #).
What is it you're trying to accomplish? Try doing it without explicitly using su as a command?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
lolol, linux on a desktop i can handle. Linux on a phone for some reason though is confusing me. I did end up trying to do what i was after without issuing a su command and whoa it worked. Thanks for the advise.
Hello,
I've rooted my device and installed the hellfire Kitkat rom. Since I was not fully satisfied I wanted to go back to stock rom and then install the latest update from LG.
But now the device only boots into recovery (CWM V6.0.4.7)
I can install a backup ROM but when I reboot it enters recovery again.
I tried entering download mode by pressing "volume UP key" and then plugin usb but it enters recovery again.
Can someone help me please?!
sander-w said:
Hello,
I've rooted my device and installed the hellfire Kitkat rom. Since I was not fully satisfied I wanted to go back to stock rom and then install the latest update from LG.
But now the device only boots into recovery (CWM V6.0.4.7)
I can install a backup ROM but when I reboot it enters recovery again.
I tried entering download mode by pressing "volume UP key" and then plugin usb but it enters recovery again.
Can someone help me please?!
Click to expand...
Click to collapse
I'm going to be cautious replying here because I'm a noob, but did you try using ADB to issue commands through adb sideload in cwm? If you go to "load zip" (or something along those lines) then "load using adb" (or something similar) in CWM, you can use adb to issue these commands with your computer and it should fix it (at least, it fixed a boot loop for me when I was stuck with TWRP). Here's the link:
http://forum.xda-developers.com/showthread.php?t=2451696
First of all. DON'T PANIC!
And even before that - make a nandroid backup! Go in CWM and make a full backup.
You have recovery working so you should be able to load System on it ok.
I am not an expert but let me try to guide you step by step.
1. Make a backup!
2. Download a rom on your computer. MAKE SURE ITS FOR YOUR MODEL # of LG G2
List of roms here:
3. Make sure you have over 70% battery
4. Go into recovery CWM
5. Use Wipe > Swipe to Factory Wipe
(go back on bottom right corner)
6. Go Advanced from HOME screen of CWM
7. Click ADB sideload
7b. (I assume you have the drivers loaded. If not make sure ADB is loaded in windows and device manager shows it. Download basic ADB package so you have "adb.exe" file in it)
8. put your rom in the same folder where you have "Adb.exe"
9. Open command prompt on windows. Goto the folder where ADB.exe is. Then Type "adb push (filename) /sdcard/(filename)". Example, "adb push rom.zip /sdcard/rom.zip"
10. Wait until it finishes its transfer(a message will appear saying the filename, file size and the speed of the transfer per sec when it finishes)
11. Wait for a while or reboot your cwm so that the filename will appear
12. just reflash the file in CWM (Install > choose file). Wipe after again.
13. Voila!
By any chance did you successfully go back to stock 4.2.2 and then took the OTA and then got the recovery loop? If so this will help http://forum.xda-developers.com/showthread.php?t=2451696
Drachenminister said:
By any chance did you successfully go back to stock 4.2.2 and then took the OTA and then got the recovery loop? If so this will help http://forum.xda-developers.com/showthread.php?t=2451696
Click to expand...
Click to collapse
I did manage to restore the backup rom of 4.2.2 Then I downloaded the 4.4 OTA update and installed it. Then it hangs in recovery.
Do I need to have TWRP installed or does this work with CWM too?!
sander-w said:
I did manage to restore the backup rom of 4.2.2 Then I downloaded the 4.4 OTA update and installed it. Then it hangs in recovery.
Do I need to have TWRP installed or does this work with CWM too?!
Click to expand...
Click to collapse
Basically what you need is a root shell whether it's via adb or built into recovery (cwm or twrp)
Searching the forum for "cwm bootloop ota" might give you detailed instructions for your case
Drachenminister said:
By any chance did you successfully go back to stock 4.2.2 and then took the OTA and then got the recovery loop? If so this will help http://forum.xda-developers.com/showthread.php?t=2451696
Click to expand...
Click to collapse
When I try to run "adb shell" I get a message "error: closed" what does it mean?
When I run adb devices it returns a serial number. so it looks like it is able to communicate with my g2.
sander-w said:
When I try to run "adb shell" I get a message "error: closed" what does it mean?
When I run adb devices it returns a serial number. so it looks like it is able to communicate with my g2.
Click to expand...
Click to collapse
Weird, you can try and add the commands directly enclosed in parentheses like adb shell "dd if=...."
Drachenminister said:
Weird, you can try and add the commands directly enclosed in parentheses like adb shell "dd if=...."
Click to expand...
Click to collapse
It seems that my device was in sideload mode. when I disabled sideload mode I followed the instructions on this pag
http://forum.xda-developers.com/showthread.php?t=2451696
And it worked!!!
Thanks for your help all!!!!
I'm stuck right here as far as download mode goes.
I installed TWRP on a d800 rooted with stock 4.2.2. The TWRP install went ok but it never booted afterward.
I can get into twrp, but can't sideload anything because the computer does not connect to the device, I hear the connection noise the computer makes but nothing in the device manager.
any ideas?
May I suggest you use "adb push rom.zip /sdcard/rom.zip" instead of sideload (the sideload doesn't have to be enabled)
bender_007 said:
May I suggest you use "adb push rom.zip /sdcard/rom.zip" instead of sideload (the sideload doesn't have to be enabled)
Click to expand...
Click to collapse
Thanks, I get
error: closed
I was wrong about my computer not seeing my device, it's in the device manager under Android and the adb drivers are installed.
I also renamed the rom to "update" to make it simpler
What's up now ?
Sorted it out or still issues there ?
I also tried the adb shell method.
I also tried this method through TWRP terminal and nada.
If I did something wrong here let me know, hopefully I can get it up and going
bender_007 said:
May I suggest you use "adb push rom.zip /sdcard/rom.zip" instead of sideload (the sideload doesn't have to be enabled)
Click to expand...
Click to collapse
This is what I get when I do the above. The CMD prompt in located in the same directory as the adb files
ADB sees my device as this #
Gabriel51 said:
This is what I get when I do the above. The CMD prompt in located in the same directory as the adb files
ADB sees my device as this #
Click to expand...
Click to collapse
ok, let's do it like this
1. copy rom to c:\rom.zip
2. while in adb folder "adb push c:\rom.zip /sdcard/rom.zip"
that should work, you don't need sideload to be enabled.
Please test and report.
bender_007 said:
ok, let's do it like this
1. copy rom to c:\rom.zip
2. while in adb folder "adb push c:\rom.zip /sdcard/rom.zip"
that should work, you don't need sideload to be enabled.
Please test and report.
Click to expand...
Click to collapse
I moved the file to the root of my C drive changed the name to "rom.zip"
Copied the command you supplied and got this result
I know my phone is connected because I can reboot it by using the command " adb reboot"
I used this;
adb push C:\Android\sdk\platform-tools\rom.zip
And it is now ready to install through TWRP!
Hold your breath.......
Edit;
Failed but at least it's in the twrp list
"unable to open zip"
I think I got it, I was able to access the firmware update screen.
Sorry fir these incomplete responses, I don't want you to keep looking for a resolve while I do this.
If your still here?
I'll be back!
Success!
After nothing would work except for loading the rom through adb I decided to wipe the whole thing.
I reloaded the rom and when selected for install it opened instead of preparing for install so I thought I would reboot and when I did I was prompted by su that my device may have lost root and gave me the option to reinstall it, I chose yes and when rebooting it hung (normal) at the LG logo, however this time the charge light was flashing! I attempted to access "download" and was successful in loading the stock rom.
In the end it looks like TWRP was the culprit, it used to be my favorite but not for this device
All is well, thanks for your help...
Q&A for [ROOT][LOLLIPOP] Root Mi2 with Lollipop 5.0 !!
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [ROOT][LOLLIPOP] Root Mi2 with Lollipop 5.0 !!. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
problems with wi-fi after root lollipop mi2
I have a problem.
After flashing "bottinsecure.img" in the fastboot mode, the Wi-Fi doesn't work anymore!
Suggestions?
ferrets said:
I have a problem.
After flashing "bottinsecure.img" in the fastboot mode, the Wi-Fi doesn't work anymore!
Suggestions?
Click to expand...
Click to collapse
Um... I'm not sure whether it is the problem of flashing bottinsecure.img... It's because I flashed it before and succeeded without problems...
I think you should complete the whole guide first, to make sure that rooting is complete.
BTW, how is the WIFI not working? Can you turn it on/off or can you scan for available WiFi networks?
P.S. You can ask here for answers too. Just if you know Chinese or I can help you to ask.
problems with wi-fi after root lollipop mi2
henry0504 said:
Um... I'm not sure whether it is the problem of flashing bottinsecure.img... It's because I flashed it before and succeeded without problems...
I think you should complete the whole guide first, to make sure that rooting is complete.
BTW, how is the WIFI not working? Can you turn it on/off or can you scan for available WiFi networks?
.
Click to expand...
Click to collapse
Sorry, I don't know chinese.
The first two times I follow all the guide, to the end. Root works perfectly, but Wi-Fi doesn't turn on.
The third time I noticed that Wi-Fi stops working as soon as I flash the bootinsecure.img.
Now I'm trying to reflash ROM and follow the second part of the part without flashing bootinsecure.img
Ok I can confirm that the problem is in the file bootinsecure.img.
After rooting and confirming the wi-fi doesn't work, I reflash the originale boot.img of my ROM from fastboot with the same procedure.
The Wi-Fi work again and the root disappared..
With 4-11-28 wifi disapear if install this busybox, hard choise, root or wifi
I cannot even root my device, even though I followed every step carefully. six times.
every time, I did a factory reset and tried the order of the translated post and the order of the original Chinese post. (they paste the BETASuperSu in the beginning)
nothing works. I use the 4.11.28 by Ivan and can't open Google search app. other than that, it works fine
can anyone help me? thx in advance
kokoparkletal said:
With 4-11-28 wifi disapear if install this busybox, hard choise, root or wifi
Click to expand...
Click to collapse
helped you ask in chinese here http://geek.miui.com/content-14-964-1.html
henry0504 said:
helped you ask in chinese here
Click to expand...
Click to collapse
Thanks, but the same result, or root or wifi, with 4-11-28 and Mi2S
kokoparkletal said:
Thanks, but the same result, or root or wifi, with 4-11-28 and Mi2S
Click to expand...
Click to collapse
According to this http://www.miui.com/forum.php?mod=viewthread&tid=2119701&page=60, a new version of Lollipop for Mi 2 has been released. It said with the latest version, bugs will be cleared. Check it out!
henry0504 said:
According to this, a new version of Lollipop for Mi 2 has been released. It said with the latest version, bugs will be cleared. Check it out!
Click to expand...
Click to collapse
Working perfectly now, Thanks!:victory:
"No space left on device" ?
At the step
cp /data/local/busybox /system/xbin
I get
cp: /system/xbin/busybox: No space left on device
I tried executing this script to enlarge my partition maybe, but this script didn't work either (http://forum.xda-developers.com/mi-...ript-fix-partition-table-android-4-4-t2878553).
What can I do?
Root Xiaomi Mi 2
Hi,
I was trying to root my new Mi 2 - and this is the first time for me, so having no knowledge i tried to do it following the guide...
downloaded some of the apps to use after it had been rooted to update it to lollipop from kitkat.
first thing i did was follow this guide here:
Root Mi2 with Lollipop 5.0 !!
In Xiaomi 2, you need to carry out special procedures to root with the Android Lollilpop (5.0) version.
***This root kit is not made by me. I just translated it.***
1. Download the Root Mi2 Lollipop.zip (9.17 MB) in the attachments of this thread.
2. Unzip it in a location you like.
3. Open the "Command Prompt.bat" in the folder.
4. Enter fastboot mode in your Mi2 by shutting down and then long-press VOLUME - AND POWER BUTTON.
5. Connect it to your PC with USB CABLE.
6. In "Command_Prompt.bat" in Root Mi2 Lollipop, enter followings:
Code:
fastboot flash boot bootinsecure.img
fastboot reboot
7. It will then reboot. After boot, Open "Command Prompt.bat" and enter followings:
Code:
adb kill-server
adb root
adb remount
adb push busybox /data/local/busybox
adb shell
su
cd /data/local
chmod 755 busybox
./busybox
mount -o remount,rw /system
mkdir /system/xbin
cp /data/local/busybox /system/xbin
cp /data/local/busybox /system/bin
cd /system/xbin
busybox --install .
sync
reboot
8. This will install the busybox and reboot. After it boots, copy the "BETA-SuperSU-v2.19.zip" into the root directory(/sdcard0). Rename it "update.zip"
9. Shut the phone down. Long-press VOLUME+ AND POWER to open recovery. In recovery, choose the "update.zip" to flash.
10. Reboot and you are done!!
You now has root access on L on your Mi2!!
[EDIT] Thanks to zipalign, pointing out the second edition of the tool kit.
As the attachment is over sized, please use the external link below, thanks
I got as far as finishing number 6 where I went to reboot it from the command prompt and it went to reboot but doesnt at all...
now all i can get from a working phone is starting it up like normal and it only gets to the first screen where it just shows the letter m. So I cant actually do anything and it no longer works. I cant go to reset it either - that doesnt work.
The only thing I can access is Fastboot mode...
any help? or have i ruined the phone already??
thanks!
Use MiFlash to recover your phone.
Than you probably have to reuse MiFlash to install CWM.
SuperSU works well for a long time.
Fortinho said:
Use MiFlash to recover your phone.
Than you probably have to reuse MiFlash to install CWM.
Click to expand...
Click to collapse
hey, so ive tried to use MiFlash to recover, installed all the drivers and set it up with Mi Flash, plugged it in in fastboot mode and my computer picked it up, clicked on flash and after about 3 seconds it gave me an error in the status saying "Unspecidied error(0xffffffff: )"
any help?
thanks!
raab93 said:
hey, so ive tried to use MiFlash to recover, installed all the drivers and set it up with Mi Flash, plugged it in in fastboot mode and my computer picked it up, clicked on flash and after about 3 seconds it gave me an error in the status saying "Unspecidied error(0xffffffff: )"
any help?
thanks!
Click to expand...
Click to collapse
Have you selected a MIUI fastboot package to flash?
Fortinho said:
Have you selected a MIUI fastboot package to flash?
Click to expand...
Click to collapse
yea, i downloaded it all and then in MiFlash from my computer selected the right one and checked it all out in the advanced settings...
had a look round online as to what else could be wrong, so got rid of all spaces in the files, changed the directory to C:\ and such...
not sure what else?
MI2 not booting
Thank You for the post,
I tried to root my MI2 device, it got failed at below step
adb root
error: device not found
PLEASE HELP
Everything I've seen so far has resulted in someone bricking their phones, including somehow deleting their IMEI numbers or somehow resulting in their BT/WiFi not working. There were so many threads that it's hard to remember which one is which.
I've decided it's time to unlock/root my phone but I don't want to make the same mistakes and somehow brick my phone. Why was it that the partition with the IMEI was written over? What about the other bricks? What is the best method to unlock/root right now?
Often times mixing firmware from other regions will cause issues. For example flashing the US version with the G or international versions. By firmware, I'm referring to other system components besides /system and kernel. Radio/baseband, BT firmware, etc.
The other issue has to do with the axon7backup program. For greatest safety, this really should only be used to backup and flash recovery while the bootloader is still locked only.
I see, thanks.
I followed these guides:
- https://forum.xda-developers.com/axon-7/development/recovery-official-twrp-zte-axon-7-t3515715
- https://forum.xda-developers.com/axon-7/how-to/guide-root-xposed-safetynet-stock-rom-t3530906
Now my phone is unlocked and rooted... but after each reboot the annoying system apps I uninstalled return. I'm guessing this is because I have a systemless root?
So I guess my questions are now:
- Most importantly if a system root is required to keep changes such uninstalling system apps, how can I switch to that and is there anything I should be wary of? Is a system root guaranteed to be seen even with SUhide/whatever?
- How can I even know if the SafetyNet program is even working if according to that guide I can't even use it's check app to test it?
- What about SUhide? Like SafetyNet I don't seem to have a way to see anything regarding it.
There is no way to fully brick a device with the Qualcomm 820 SoC. It is more or less complicated, but even deleting the bootloader it is possible to recover the device with the appropriate Qualcomm flashing tools.
Regarding "easy" bricks, you will be able to recover any brick by using tenfar's Axon7tools, and DrakenFX guides. Also Just keep on had a backup of your boot.bin, recovery.bin (both using Axon7Tool), and the full ZIP for your device model in a FAT formatted SDcard.
The recovery process is just to flash back the boot.bin, then recovery.bin (using the same tool Axon7tool) and then from the stock recovery reinstall the full zip and optionals OTA.
Cyrus D. said:
I see, thanks.
I followed these guides:
- https://forum.xda-developers.com/axon-7/development/recovery-official-twrp-zte-axon-7-t3515715
- https://forum.xda-developers.com/axon-7/how-to/guide-root-xposed-safetynet-stock-rom-t3530906
Now my phone is unlocked and rooted... but after each reboot the annoying system apps I uninstalled return. I'm guessing this is because I have a systemless root?
So I guess my questions are now:
- Most importantly if a system root is required to keep changes such uninstalling system apps, how can I switch to that and is there anything I should be wary of? Is a system root guaranteed to be seen even with SUhide/whatever?
- How can I even know if the SafetyNet program is even working if according to that guide I can't even use it's check app to test it?
- What about SUhide? Like SafetyNet I don't seem to have a way to see anything regarding it.
Click to expand...
Click to collapse
You missed a step. Use Terminal or Terminal Emulator , type SU, then reboot disemmcwp
or
Go to adb shell while in TWRP and enter adb reboot disemmcwp
This will reset settings to allow system changes so they will "stick".
Good luck!
amphi66 said:
You missed a step. Use Terminal or Terminal Emulator , type SU, then reboot disemmcwp
or
Go to adb shell while in TWRP and enter adb reboot disemmcwp
This will reset settings to allow system changes so they will "stick".
Good luck!
Click to expand...
Click to collapse
Sorry I'm new to all this, I'm doing something wrong here.
So just to be clear it's:
- Type in "SU", enter it, then type "reboot disemmcwp", in TWRP's terminal?
That results in "SU not found" for me.
or
- Type in "adb reboot disemmcwp" in a command window opened in the adb folder on my PC while TWRP is running adb sideload?
That resulted in "* daemon not running. starting it now on port 5037 * * daemon started successfully * error: closed"
Edit: Just "reboot disemmcwp" in the terminal without SU first worked. So... what was I doing wrong?
Cyrus D. said:
Edit: Just "reboot disemmcwp" in the terminal without SU first worked. So... what was I doing wrong?
Click to expand...
Click to collapse
The su binary only exists if you open a terminal in an android app because apps do not have root permission. TWRP and adb shell automatically have root privileges.