[HOW TO] Root, Flash TWRP & Install busybox in YUOS Official - Android 6.0.1 Build - YU Yureka Q&A, Help & Troubleshooting

[HOW TO] Root, Flash TWRP & Install busybox in YUOS Official - Android 6.0.1 Build
First Flash YUOS from here
How to flash YUOS.
Flash images with Fastboot
Code:
Execute below commands in terminal
Connect device in fastboot mode
adb reboot bootloader
Check if device is detecting in fastboot mode
fastboot -i 0x1ebf devices
Unlock bootloader fastboot -i 0x1ebf oem unlock
Format User data
fastboot -i 0x1ebf format userdata
Flash kernel
fastboot -i 0x1ebf flash boot boot.img
Flash recovery
fastboot -i 0x1ebf flash recovery recovery.img
Flash system partition
fastboot -i 0x1ebf flash system system.img
Flash data partition
fastboot -i 0x1ebf flash userdata userdata.img
Reboot device
fastboot -i 0x1ebf reboot
WARNING: The stock boot image has dm-verity, which prevents you from booting if you swipe to enable system modifications!
Follow YU bootloader unlocking instructions here before you begin!
Download the latest TWRP .img for your device from twrp.me.
Use the same fastboot tool you downloaded in theYU unlock instructions to flash TWRP using the command:
fastboot flash recovery twrp-x.x.x-x.img
Click to expand...
Click to collapse
* Replace x.x.x-x with the actual version you are flashing!
Now you can either power off your phone and boot into recovery using the button combo [Volume Down] + [Power], or you can run this command in fastboot:
fastboot boot twrp-x.x.x-x.img
Click to expand...
Click to collapse
1. At this point, you will see the TWRP splash and reach a screen asking you if you want to allow system modifications.
By swiping right, you will trigger dm-verity, and if you don't follow step 4 you will be unable to boot!
If you are going to root your device or follow the rest of these steps, then it is safe to swipe right and enable modifications.
2. Only if you want internal storage or data to work in TWRP:
Go to [Wipe] -> [Format Data] (not advanced wipe) -> type "yes".WARNING: This will wipe your internal storage, disable encryption, and factory reset your phone!
Go to [Reboot] -> [Recovery].
3. Please consider backing up your stock boot partition in TWRP before proceeding to te next steps!
4. If you want to be rooted with SuperSU:
Download the latest SuperSU by Chainfire. OR Flash through TWRP this file.
Without exiting TWRP, transfer the SuperSU zip to your device over MTP* and flash it using [Install] in TWRP.-or-
If you only want a bootable system partition or writable data in TWRP:
Download dm-verity and force encryption disabler.
Without exiting TWRP, transfer no-verity-opt-encrypt.zip to your device over MTP* and flash it using [Install] in TWRP.
Go to [Reboot] -> [System].
Wait 2-5 minutes for your device to finish setting itself up.
To install busybox flash through TWRP this file >>>> this is recommended.
After rebooting to TWRP it will not ask for any password.
Took help from here & @h2o64 for guiding me.
This has been tried & tested by me on yureka.
Suggestions welcomed
YU FORUMS link

one million thank yous
thank you so much
I can confirm this is working on my moto e3 ( non-power )
keep doing what your doing you really helped
now I can get down to business with some cool root modifications!!!

Can we use Magisk instead of supersu.

Related

Going back to Stock

Hi!
I'm trying to go back to stock+locked rom.
I have seen instructions with a lot of steps, but when I downloaded the rom from googe developers page, i noticed there is a flash-all.sh file that seems to do all the process...
Is this safe?
Code:
fastboot flash bootloader bootloader-mako-makoz10o.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.48.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-occam-jdq39.zip
I don't want to brick the phone
Guide by efrant:
D. Type in the commands into the command prompt
1) Make sure your computer recognizes your device by typing: fastboot devices
2) Unlock your bootloader (if you have not already done so): fastboot oem unlock
3) You will see a prompt on your device. This will wipe your entire device (including the /sdcard folder). Accept. Note: you use the volume keys to change the option and the power button to accept. You cannot use the touch screen.
4) Reboot by typing: fastboot reboot-bootloader
5) Flash the bootloader: fastboot flash bootloader bootloader-mako-makoz10l.img (or whatever the name of the bootloader image that you downloaded).
6) Reboot: fastboot reboot-bootloader
7) Flash the radio: fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.33.img (or whatever the name is of the radio image that you downloaded).
8) Reboot: fastboot reboot-bootloader
9) Flash the system partition: fastboot flash system system.img
10) Optional (NOT optional for n00bs) -- Flash the data partition: fastboot flash userdata userdata.img Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked. See note 2 below.
11) Flash the kernel/ramdisk: fastboot flash boot boot.img
12) Optional (NOT optional for n00bs) -- Flash the recovery partition: fastboot flash recovery recovery.img
13) Erase the cache partition: fastboot erase cache
14) Reboot: fastboot reboot
15) Done! The first boot will likely take quite a bit longer than you are used to, as Android builds the Dalvik cache.
Now you have a fully stock image on your device. The only thing that is different from out-of-the-box condition is that your bootloader is unlocked. See the notes section at the end of this post for information on re-locking the bootloader.
You have to unpack the system.image file as you can only flash .img files in fastboot. What`s with the sleep 5?
Good luck.
I've seen some youtube tutos that use that .sh file and it does flash the .zip with fastboot......
That's why I ask, I mean: The previous thread, which i already read before, is like a step-by-step process, when this .sh file would do it all for you!!
The sleep command gives 5 seconds of grace time for the device to reboot.....
GFXi0N said:
I've seen some youtube tutos that use that .sh file and it does flash the .zip with fastboot......
That's why I ask, I mean: The previous thread, which i already read before, is like a step-by-step process, when this .sh file would do it all for you!!
The sleep command gives 5 seconds of grace time for the device to reboot.....
Click to expand...
Click to collapse
Haven`t used that method myself, but if you think it will work go ahead
WOrst case scenario, the console woud throw me out to the command prompt and I would have to do it by hand......

Error on Android 5.0.2 OTA Update

Well i'm trying to update my Nexus 7 2012 to Android 5.0.2, after receiving the OTA update but keep getting an error.
I rooted my Nexus 7, and been thinking that's the problem, since it restarts to install the OTA update but goes to Recovery mode, and when i try to manually install the file get the following error :
https://www.dropbox.com/s/dqjc2ztzfbkvnuy/IMAG0897.jpg?dl=0
Any tips or solution for the problem?
Thanks in advance
Go here and flash the full image: https://developers.google.com/android/nexus/images
Skeetch79 said:
Go here and flash the full image: https://developers.google.com/android/nexus/images
Click to expand...
Click to collapse
Didn't want to do that, because means i'm going to loose everything
lmcmil said:
Didn't want to do that, because means i'm going to loose everything
Click to expand...
Click to collapse
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Thanks for the tip and explanation Skeetch79, will try to do like you wrote.
lmcmil said:
Thanks for the tip and explanation Skeetch79, will try to do like you wrote.
Click to expand...
Click to collapse
Np. Keep me posted
Sent from my XT1096 using Tapatalk
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
This method works great! I was in the same boat. I analyzed the updater script and then analyzed the ro.build.fingerprint from my system, and it doesn't contain the weird one that it errors out on. I debated just removing the build prop check and repackaging it as an update, but decided against it.
@lmcmil - per chance, did you flash a different kernel and/or switch to F2FS before this happened? If so, that might correlate to mine, since I did do that....
Either way, I'm gonna run stock again for a while and see how it feels.
EDIT:
I think these lines:
Code:
mount("ext4", "EMMC", "/dev/block/platform/sdhci-tegra.3/by-name/APP", "/system", "max_batch_time=0,commit=1,data=ordered,barrier=1,errors=panic,nodelalloc");
getprop("ro.build.fingerprint") == "google/nakasi/grouper:5.0/LRX21P/1570855:user/release-keys" ||
getprop("ro.build.fingerprint") == "google/nakasi/grouper:5.0.2/LRX22G/1649326:user/release-keys" ||
abort("Package expects build fingerprint of google/nakasi/grouper:5.0/LRX21P/1570855:user/release-keys or google/nakasi/grouper:5.0.2/LRX22G/1649326:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
are what causes it to explode. First, it tries to mount ext4 instead of F2FS, which makes sense, but would cause the system partition to be unreadable if you converted it to F2FS. That COULD explain the odd "deestroy" build prop it thinks it got when it pulled ro.build.fingerprint, since when my system was fully booted mine matched the stock LRX21P using getprop from adb.
toastido i tryied to load the OTA using the Nexus Root Toolkit and the error i got was regarding missing calculator, wich i removed after installing "Calculator ++" app
Still haven't had time to try this method, i'm working this weekend so only next week i can give it a try and post the result.
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Good Man !!!
Thanks Very Much for that one,
I got stuck on the boot after performing the advised but a quick Cache Wipe sorted that out.
Once again Much Obliged !!!
Yeah forgot to mention the above. if you are stuck in a boot loop: shut down. reboot to recovery. wipe cache and dalvic. Reboot. Profit.
Sent from my XT1096 using Tapatalk
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Does this also work if I want to go back to Kitkat? I am asking, because I've tried the following:
Code:
@echo off
echo. listing devices:
fastboot devices
echo. To continue press Enter
pause
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
REM adopt the following line according to the bootloader image filename
fastboot flash bootloader bootloader-flo-flo-04.02.img
fastboot reboot-bootloader
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot reboot
And no matter, if I do a wipe cache afterwards or not, I end up in a boot-loop.
Do you know a way to keep apps and settings while going back to Kitkat?
nieroster
lmcmil said:
toastido i tryied to load the OTA using the Nexus Root Toolkit and the error i got was regarding missing calculator, wich i removed after installing "Calculator ++" app
Still haven't had time to try this method, i'm working this weekend so only next week i can give it a try and post the result.
Click to expand...
Click to collapse
lmcmil said:
Well i'm trying to update my Nexus 7 2012 to Android 5.0.2, after receiving the OTA update but keep getting an error.
I rooted my Nexus 7, and been thinking that's the problem, since it restarts to install the OTA update but goes to Recovery mode, and when i try to manually install the file get the following error :
https://www.dropbox.com/s/dqjc2ztzfbkvnuy/IMAG0897.jpg?dl=0
Any tips or solution for the problem?
Thanks in advance
Click to expand...
Click to collapse
TWRP is incompatible with 5.x OTA: it uses its own moronic default.prop instead of importing the device build.prop (or something like that) . It needs to be fixed.
You have to bother flashing the full image (minus the wiping eventually) and reinstall root & TWRP with every update, just like the rest of us
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
lmcmil said:
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
Click to expand...
Click to collapse
Well decided to use the Nexus Root Kit and flash the full image LRX22G, doing it now.
Will post how it went.
lmcmil said:
Got an Failed error at fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>.
So now i don't have a valid bootloader and also can't enter recovery because it was erased at fastboot erase recovery <hit enter> step
And also typing fastboot devices my Nexus 7 isn't detected, what can i do now?
Click to expand...
Click to collapse
I had the 2012 Nexus 7 WiFi before I picked up the 2013 model. I had the same issue with that bootloader. Seems to be a common issue. Here are articles discussing the issue and fixes.
http://android.stackexchange.com/qu...t-flash-bootloader-failed-remote-invalidstate
https://code.google.com/p/android/issues/detail?id=62198&
http://forum.xda-developers.com/showthread.php?t=2573015
I remember flashing a modified bootloader to resolve the issue, since as you can see the bootloader packaged with the images is borked.
EDIT: try flashing the appropriate bootloader from this thread: http://forum.xda-developers.com/showthread.php?t=2417097
lmcmil said:
Well decided to use the Nexus Root Kit and flash the full image LRX22G, doing it now.
Will post how it went.
Click to expand...
Click to collapse
So my Nexus 7 is now running with 5.0.2, and did not loose any apps since i chose the "No wipe mode"
Going to root it again, and install latest TWRP Recovery
lmcmil said:
So my Nexus 7 is now running with 5.0.2, and did not loose any apps since i chose the "No wipe mode"
Going to root it again, and install latest TWRP Recovery
Click to expand...
Click to collapse
So i have now a Nexus 7 running 5.0.2, already rooted again and with TWRP 2.8.4.1.
Thanks a lot!
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- ...
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
Thanks for the great tutorial! Used it yesterday on my rooted Nexus 7 to upgrade to 5.0.2, worked like a breeze! :good:
Afterwards I used WugFresh's Nexus Root Toolkit to regain root.
Skeetch79 said:
Thought you would say that! .
You can always:
- download the image for your device from the google nexus website I gave you
- unzip the tgz file
- Find the resulting tar file and unzip it
- you will now have a folder
- inside the folder will be a bootloader-grouper-4.23.img file, image-nakasi-lrx22g.zip file, flash-all.bat file and two .sh files
- unzip the zip file to the same directory as the bootloader-grouper-4.23.img file
- reboot your nexus into bootloader mode
- plug the nexus into your PC
- open a command prompt in the same directory as the image, sh and bat files (on windows 7 hold the shift key and right click on an empty space within the folder and choose open command window here)
- in the command window type fastboot devices, make sure device is recognized
- if not, set up your pc for adb and fastboot, if so, continue
- type in the command prompt:
fastboot erase boot <hit enter>
fastboot erase cache <hit enter>
fastboot erase recovery <hit enter>
fastboot erase system <hit enter>
fastboot flash bootloader bootloader-grouper-4.23.img <hit enter>
fastboot reboot-bootloader <hit enter>
fastboot flash boot boot.img <hit enter>
fastboot flash recovery recovery.img <hit enter>
fastboot flash system system.img <hit enter>
fastboot reboot <hit enter>
This will preserve your app and data settings.
If you had custom recovery installed just reboot into fastboot and flash the recovery of your choice. example: fastboot flash recovery ,recovery image name>
If you want to reroot, download a superuser zip file to your device, reboot back into your custom recovery and then install the SuperUser zip of your choice (i.e. chainfire's SuperSu)
Hopefully this is straightforward and self explanatory
Click to expand...
Click to collapse
I followed this tutorial yesterday and everything went great I now have 5.0.2 working on my Nexus 7 2013, with no problems I can detect at the moment. Thank you, because I was just frustrated I saw the OTA notification without being able to do anything.
Cheers.
I try it too 5.0.2 ota update and nothing still on 4.4.4 I guess on Lollypops for me

[Q] yu yureka not rooting after yesterday update of 73 mb

Dear Developers
Please help me, i really need yur help
yesterday i got my new yu yureka, around 7 pm i root my phone by unlocking bootloader and flashing twrp recovery and flashing super user by twrp
using cmand prompt
fastboot -i 0x1ebf devices
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf flash recovery yu-twrp-recovery.img
fastboot -i 0x1ebf reboot
all done and phone root
but this monday morning when i saw a update of 73 mb , i update my phone and it come to know, now my phone is unroot again, super user app gone
then i again become developer--mode and click usb dibbuging
doing all this commands as i mentioned above...it said..ok ok ok ok
but when i go to recovery mode to flash super user.......it shows ....cyanogen recovery mode..not twrp recovery
i changed recovery file and use cwm recovery and flash it using command prompt..but in recovery mode it shown only cyanogen mode
fastboot -i 0x1ebf oem lock....................using this command..i lock my bootloader again and fastboot -i 0x1ebf oem unlock...again unlock ....but nothing happens....plzzzz tell me...how to root
harish joshi said:
Dear Developers
Please help me, i really need yur help
yesterday i got my new yu yureka, around 7 pm i root my phone by unlocking bootloader and flashing twrp recovery and flashing super user by twrp
using cmand prompt
fastboot -i 0x1ebf devices
fastboot -i 0x1ebf oem unlock
fastboot -i 0x1ebf flash recovery yu-twrp-recovery.img
fastboot -i 0x1ebf reboot
all done and phone root
but this monday morning when i saw a update of 73 mb , i update my phone and it come to know, now my phone is unroot again, super user app gone
then i again become developer--mode and click usb dibbuging
doing all this commands as i mentioned above...it said..ok ok ok ok
but when i go to recovery mode to flash super user.......it shows ....cyanogen recovery mode..not twrp recovery
i changed recovery file and use cwm recovery and flash it using command prompt..but in recovery mode it shown only cyanogen mode
fastboot -i 0x1ebf oem lock....................using this command..i lock my bootloader again and fastboot -i 0x1ebf oem unlock...again unlock ....but nothing happens....plzzzz tell me...how to root
Click to expand...
Click to collapse
Yes after update there is some problem in installing recovery and rooting.
So after unlocking the bootloader do the following steps
1. Download superuser. zip and place it in your external sd-card
2. Now flash the recovery.img using fastboot
3. Now boot into recovery using "vol up+vol down+power"
4. Flash the superuser. zip
*note: please don't do normal reboot after flashing recovery because it will write the stock recovery again into recovery partition.
Regards,
aashking
Enable developer mode & enter developer menu
Go to -> update CM recovery.
That was ticked by default, untick it and then flash custom recovery.

Moto G4 only boots in fastboot

Hi,
I have a problem with a Moto G4. I tried to root the device and think I f***** up a bit.
After successfully installing TWRP I tried to install SuperSu using adb sideload and afterwards the device wouldn't boot anymore. Only fastboot and the recovery are still working. If I try to boot the device it just turns off. A factory reset didn't help.
I tried installing a LineageOS but nothing changed. It still boots into fastboot.
Can anybody help?
squanch123 said:
Hi,
I have a problem with a Moto G4. I tried to root the device and think I f***** up a bit.
After successfully installing TWRP I tried to install SuperSu using adb sideload and afterwards the device wouldn't boot anymore. Only fastboot and the recovery are still working. If I try to boot the device it just turns off. A factory reset didn't help.
I tried installing a LineageOS but nothing changed. It still boots into fastboot.
Can anybody help?
Click to expand...
Click to collapse
I forgot to say that I at first didn't install supersu systemless.
After I noticed that the device wouldn't boot anymore I tried installing it again systemless.
squanch123 said:
I forgot to say that I at first didn't install supersu systemless.
After I noticed that the device wouldn't boot anymore I tried installing it again systemless.
Click to expand...
Click to collapse
Hmm, did you wipe your system and data in TWRP before flashing LineageOS? You do not require root to flash LineageOS, just an unlocked bootloader and a compatible TWRP recovery (taking care to note if you need the 32 bit or 64 bit TWRP recovery for the respective custom ROM).
Also, with rooting on our G4/Plus, if you are on stock Nougat, you must flash a custom kernel (e.g. ElementalX) before you root. You'll otherwise experience the boot failures you're experiencing. Thus, to root on stock Nougat, unlock bootloader, flash/boot TWRP, backup, then flash ElementalX, then flash SuperSU/magisk.
Without knowing the current state of your device, I would suggest re-flashing your device with the stock firmware. Can you remember what stock firmware you had on your device before rooting initially?
echo92 said:
Hmm, did you wipe your system and data in TWRP before flashing LineageOS? You do not require root to flash LineageOS, just an unlocked bootloader and a compatible TWRP recovery (taking care to note if you need the 32 bit or 64 bit TWRP recovery for the respective custom ROM).
Also, with rooting on our G4/Plus, if you are on stock Nougat, you must flash a custom kernel (e.g. ElementalX) before you root. You'll otherwise experience the boot failures you're experiencing. Thus, to root on stock Nougat, unlock bootloader, flash/boot TWRP, backup, then flash ElementalX, then flash SuperSU/magisk.
Without knowing the current state of your device, I would suggest re-flashing your device with the stock firmware. Can you remember what stock firmware you had on your device before rooting initially?
Click to expand...
Click to collapse
Hi, thanks for your reply
Yes, I wiped system data and cache before flashing lineage. I just tried it again and I am still stuck in fastboot.
Unfortunately I don't remember the stock firmware version. Should I just try to flush the custom kernel and supersu afterwards?
squanch123 said:
Hi, thanks for your reply
Yes, I wiped system data and cache before flashing lineage. I just tried it again and I am still stuck in fastboot.
Unfortunately I don't remember the stock firmware version. Should I just try to flush the custom kernel and supersu afterwards?
Click to expand...
Click to collapse
Hmm, did you know if the flash of LineageOS reported okay within TWRP? Just out of interest, which TWRP and which build of LineageOS are you flashing (e.g. are you using the 32 bit TWRP or 64 bit TWRP, and are you flashing the 32 or 64 bit Lineage OS)?
That's confusing that even pressing 'start' in fastboot reboots your device rather than booting, even with a custom ROM... What happens if you boot to TWRP and try to reboot via TWRP? Is there a system to boot to?
Without the stock system on your device, there's no point to re-flashing the custom kernel/SuperSU, since you should have LineageOS on your device. Do you have a TWRP backup you could restore before you tried to root? If not, then what's your device model number (and if you can remember it, what software channel you're on, e.g. retus, reteu etc). ?
echo92 said:
Hmm, did you know if the flash of LineageOS reported okay within TWRP? Just out of interest, which TWRP and which build of LineageOS are you flashing (e.g. are you using the 32 bit TWRP or 64 bit TWRP, and are you flashing the 32 or 64 bit Lineage OS)?
That's confusing that even pressing 'start' in fastboot reboots your device rather than booting, even with a custom ROM... What happens if you boot to TWRP and try to reboot via TWRP? Is there a system to boot to?
Without the stock system on your device, there's no point to re-flashing the custom kernel/SuperSU, since you should have LineageOS on your device. Do you have a TWRP backup you could restore before you tried to root? If not, then what's your device model number (and if you can remember it, what software channel you're on, e.g. retus, reteu etc). ?
Click to expand...
Click to collapse
Yes, everything was ok with the flash.
I am using lineage-14.1-20180516-nightly-athene-signed and twrp-3.2.1-0-athene. I didn't see any options to choose between 32 and 64 bit. (Download pages: https://download.lineageos.org/athene#!name https://eu.dl.twrp.me/athene/)
It doesn't matter how I try to boot (powerbutton, fastboot, recovery) I always directly end up in fastboot.
No I don't have a backup. When I got the device it was resetted so I saw no point in making one :/ It is an XT1622 and it should be reteu.
squanch123 said:
Yes, everything was ok with the flash.
I am using lineage-14.1-20180516-nightly-athene-signed and twrp-3.2.1-0-athene. I didn't see any options to choose between 32 and 64 bit. (Download pages: https://download.lineageos.org/athene#!name https://eu.dl.twrp.me/athene/)
It doesn't matter how I try to boot (powerbutton, fastboot, recovery) I always directly end up in fastboot.
No I don't have a backup. When I got the device it was resetted so I saw no point in making one :/ It is an XT1622 and it should be reteu.
Click to expand...
Click to collapse
Okay, so they should both be 32 bit, so no worries there. There do seem to be a few reports of boot issues on the more recent official LineageOS builds https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101/page280 but I don't know if they are still existing on the build you've flashed.
As it's likely your device has been reset when you flashed LineageOS (I don't know if there are still files on your internal storage, which you can view in TWRP, so back up if you do have files), you may wish to look into a stock firmware flash. Here's the April 2018 NPJS25.93-14-18 firmware, which appears to be the build released to EU devices: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You do not have to re-lock your bootloader if you don't wish to - if you wish to leave your bootloader unlocked, then flash the stock firmware via fastboot with the following flashing commands:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Flashing these files via ADB should put a fresh copy of the latest firmware onto your device, which should then boot. If it does boot, then you can proceed with rooting (flash TWRP, then back up, then flash ElementalX or vegito, then flash SuperSU or magisk).
echo92 said:
Okay, so they should both be 32 bit, so no worries there. There do seem to be a few reports of boot issues on the more recent official LineageOS builds https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101/page280 but I don't know if they are still existing on the build you've flashed.
As it's likely your device has been reset when you flashed LineageOS (I don't know if there are still files on your internal storage, which you can view in TWRP, so back up if you do have files), you may wish to look into a stock firmware flash. Here's the April 2018 NPJS25.93-14-18 firmware, which appears to be the build released to EU devices: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138 You do not have to re-lock your bootloader if you don't wish to - if you wish to leave your bootloader unlocked, then flash the stock firmware via fastboot with the following flashing commands:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash modem NON-HLOS.bin
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot reboot
Flashing these files via ADB should put a fresh copy of the latest firmware onto your device, which should then boot. If it does boot, then you can proceed with rooting (flash TWRP, then back up, then flash ElementalX or vegito, then flash SuperSU or magisk).
Click to expand...
Click to collapse
Thanks for the help!
I can boot the stock rom and I have root access. However if I start or shut down the device it goes to fastboot. From there I can boot or shut down the device and everything seems to work Do you know how I can boot directly without fastboot?
squanch123 said:
Thanks for the help!
I can boot the stock rom and I have root access. However if I start or shut down the device it goes to fastboot. From there I can boot or shut down the device and everything seems to work Do you know how I can boot directly without fastboot?
Click to expand...
Click to collapse
Hmm, try booting back to the bootloader, attach your device to your computer, then open ADB. In ADB, type 'fastboot oem fb_mode_clear' without the quotes. Press enter to submit, then reboot and see if your device boots to system rather than to fastboot.
This command should clear fastboot mode (though useful when flashing).
echo92 said:
Hmm, try booting back to the bootloader, attach your device to your computer, then open ADB. In ADB, type 'fastboot oem fb_mode_clear' without the quotes. Press enter to submit, then reboot and see if your device boots to system rather than to fastboot.
This command should clear fastboot mode (though useful when flashing).
Click to expand...
Click to collapse
Yes that worked
Thank you very much for your help :victory:

[Q] OTA Update with Root; is it this hard?

I feel like I'm overthinking this, and doing it so much more difficult than it should be. I have stock ROM, patched boot (with Magisk), and unlocked bootloader. When I try using the default update from my phone's "check update", it'll show "Installation Failed" error. This error still occurs with clean boot file as well.
So I had to do the following steps to actually get the update, and I feel like I'm over-complicating things:
1) Download SIDELOAD update from Essential and put it into the platform-tools directory (named OTAUpdate.zip for this post's purpose).
2) Download STOCK of the corresponding version here and pull out HYP, RPM, and BOOT files.
3) Remove PIN, enable USB debugging, and boot into bootloader:
adb reboot bootloader
4) Flash TWRP:
fastboot flash boot_a twrp-3.2.3-0-mata.img
fastboot flash boot_b twrp-3.2.3-0-mata.img
5) Flash old HYP and RPM from pre September 2018 patches (so TWRP touchscreen works):
fastboot flash hyp_a hyp_old
fastboot flash hyp_b hyp_old
fastboot flash rpm_a rpm_old
fastboot flash rpm_b rpm_old
6) Boot into TWRP:
fastboot reboot recovery
7) Go into: Advanced -> ADB Sideload -> Swipe to Start Sideload
8) Sideload the update on command prompt:
adb sideload OTAUpdate.zip
9) Boot into Bootloader:
adb reboot bootloader
10) Flash the new HYP, RPM, and Boot:
fastboot flash hyp_a hyp.mbn
fastboot flash hyp_b hyp.mbn
fastboot flash rpm_a rpm.mbn
fastboot flash rpm_b rpm.mbn
fastboot flash boot_a boot
fastboot flash boot_b boot
11) Copy over the boot file from Step 2 to the phone, and rename to boot.img.
12) Install/open Magisk Manager, then:
Install -> Install -> Patch Boot Image File -> Select the boot.img from Step 11
13) Copy the patched_boot.img file back to the platform-tools directory on PC.
14) Reboot into bootloader.
adb reboot bootloader
15) Flash the patched boot file:
fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img
16) Reboot.
fastboot reboot
17) Open Magisk Manager and check if all is okay. Then add PIN and disable USB debugging mode.
Click to expand...
Click to collapse
What am I doing wrong // what is a more simpler method?
Printerscape said:
What am I doing wrong // what is a more simpler method?
Click to expand...
Click to collapse
Assumption: You have TWRP recovery installed.
Download the OTA zip from Essential website to the internal phone storage
*Optional* Remove lockscreen security (PIN/Password/Pattern)
Ensure that you have TWRP zip and Magisk zip files on internal phone storage
Reboot to TWRP recovery
Install OTA zip, and then TWRP zip.
Reboot back to OS, to ensure that everything is loaded properly and device is up to date
Reboot back to recovery and then install Magisk
Reboot and all should be good.
You could probably amalgamate the last 3 steps and install Magisk right after TWRP but I like to ensure that the OTA worked.
You could also add in the step to perform a TWRP backup before flashing the OTA zip, if you wish.
goofball2k said:
Assumption: You have TWRP recovery installed.
Download the OTA zip from Essential website to the internal phone storage
*Optional* Remove lockscreen security (PIN/Password/Pattern)
Ensure that you have TWRP zip and Magisk zip files on internal phone storage
Reboot to TWRP recovery
Install OTA zip, and then TWRP zip.
Reboot back to OS, to ensure that everything is loaded properly and device is up to date
Reboot back to recovery and then install Magisk
Reboot and all should be good.
You could probably amalgamate the last 3 steps and install Magisk right after TWRP but I like to ensure that the OTA worked.
You could also add in the step to perform a TWRP backup before flashing the OTA zip, if you wish.
Click to expand...
Click to collapse
But when I flash TWRP by itself to boot (TWRP-3.2.3-0-mata.img), touch doesn't work, thus I have to flash the older hyp/rpm files.
If you have that problem, this img could be used to boot from, then you can flash the OTA and twrp zip file.
https://drive.google.com/open?id=1YxJJj96Web0ikHXdHf_zboZT_KSYl7Nj
If you have Magisk, it's even easier than others have said. Before taking the Ota, have Magisk Manager uninstall Magisk. It should restore the stock boot image. If you started with a patched boot image, this won't work though. Magisk backs up the stock boot image when you install Magisk either in TWRP or when you have it patch the boot image manually.
Then take the OTA. Before restarting, go back to Magisk Manager and install Magisk again, use the Direct method. If it says it was successful, reboot and you should be good.

Categories

Resources