1. Are you ready for the Galaxy S20? Here is everything we know so far!

Trying to install TWRP but 'waiting for any device'

Discussion in 'Android Lounge' started by pooksahib, Oct 8, 2020.

  1. pooksahib

    pooksahib Member
    Thread Starter

    Hi. I have my phone set to Developer and USB Debugging enabled. I have a folder on my PC which contains 'minimal_adb_fastboot_1.4.3_portable' and a TWRP.img.

    I've opened a cmd window as Admin and the command 'adb devices' brings up an attached device. The next command, 'adb reboot bootloader', gives me the 'android on back with belly open' picture plus a load of text which I think is the bootloader.

    So far so good, but when I then enter 'fastboot flash recovery twrp.img' the cmd screen says <waiting for any device> and stays that way. The phone eventually changes to the battery charging screen and turns off. I have to disconnect it from the PC and then it powers on as normal.

    Any ideas as to why I can't install TWRP? Thank you so much.
     


  2. pooksahib

    pooksahib Member
    Thread Starter

    Aha, I installed USB drivers from Motorola and that's helped a bit. My CMD screen (see picture) seems to suggest it went well but my phone is doing absolutely nothing - just sitting on the 'robot with belly open' screen. Any ideas? My twrp.img is in the same folder as Minimal adb and fastboot.
    Further info: 'adb devices' brings up a serial number but 'fastboot devices' does nothing. Presumably that means fastboot can't see my phone? How to fix that?

    Doing 'fastboot reboot' only resulted in the phone rebooting as normal so clearly there's no TWRP on it despite the earlier CMD message saying 'finished total time 1.834s'...

    Thanks again.
    twrp problem.jpg
     
    #2 pooksahib, Oct 8, 2020
    Last edited: Oct 8, 2020
  3. bcrichster

    bcrichster ROMinator
    Moderator

    Code (Text):
    1. fastboot reboot bootloader
    ..then try your fastboot flashing cmds.
     
    MrJavi and ocnbrze like this.
  4. bcrichster

    bcrichster ROMinator
    Moderator

    Code (Text):
    1. fastboot boot twrp.img
    Will make you boot straight to the recovery also
     
    MrJavi and ocnbrze like this.
  5. pooksahib

    pooksahib Member
    Thread Starter

    Hello again, bcrichster. Okay, I've kind of gone back to square one. Instead of the portable '15 second ADB installer' I've done a full installation of it. I then replaced the files in ‘ADB’ with new files from the current ‘platform tools’. Happily, both 'adb devices' and 'fastboot devices' can 'see' the phone.
    I then ran:
    adb reboot bootloader
    fastboot flash recovery twrp.img

    I had no luck with this and so tried your suggestion of 'fastboot boot twrp.img' and it worked – TWRP appeared on my phone. I didn't want to do anything with it right away so I tapped (if I recall correctly) Reboot/System and my phone is now as it was.

    I powered off and then booted into recovery and the standard bootloader screen appeared. I went to Recovery but all I got was the dead robot. Where is TWRP? (When TWRP appeared at the beginning, I didn't elect to install the 'Official TWRP App' – should I have done?)

    My thanks!
     
    #5 pooksahib, Oct 8, 2020
    Last edited: Oct 8, 2020
  6. bcrichster

    bcrichster ROMinator
    Moderator

    Ok.. that means you aren't in any fastboot cmd modes to begin with. Try
    Code (Text):
    1. adb reboot bootloader
    to get where fastboot may work
     
    MrJavi and ocnbrze like this.
  7. pooksahib

    pooksahib Member
    Thread Starter

    Hi again. You must have read a post that I later edited. Fastboot HAS worked inasmuch as the commands 'adb reboot bootloader' followed by 'fastboot boot twrp.img' gave me the TWRP screen on my phone. Does that mean TWRP should be INSTALLED on my phone at this stage? Because when I disconnect it and reboot, there's no sign of it...
     
    #7 pooksahib, Oct 8, 2020
    Last edited: Oct 8, 2020
  8. MrJavi

    MrJavi Android Expert

    #8 MrJavi, Oct 8, 2020
    Last edited: Oct 8, 2020
    ocnbrze, pooksahib and bcrichster like this.
  9. bcrichster

    bcrichster ROMinator
    Moderator

    That cmd I gave allows you to directly boot into TWRP recover, using the TWRP.img itself aside from the device in order to make a backup of stock recovery. Some ppl like it, some don't. But when you install TWRP (at all), ya usually need to also flash Magisk if still on stock OS. If going straight custom ROMs, Magisk is simply an optional superuser mgr at that point. Ok, so if you use @MrJavi 's suggestion of
    Code (Text):
    1. fastboot flash recovery twrp.img
    , may need use the phone's volume button to select recovery setting and the pwr button to confirm it, should boot right to twrp recovery.. go from there
     
    ocnbrze, pooksahib and MrJavi like this.
  10. pooksahib

    pooksahib Member
    Thread Starter

    Thanks guys, things are becoming a bit clearer to me now. The first couple of times that I tried 'fastboot flash recovery twrp.img' my cmd screen suggested it had been done in a second or two (see 2nd post above) but my phone just sat on the Android bootloader screen with no indication that anything was happening. Does that sound normal? How long does a permanent flash of TWRP take and should I be seeing some kind of progress indicator on the phone?

    But that may be irrelevant if I understand this correctly: you can use TWRP to install your new ROM without actually installing TWRP (fastboot boot twrp.img) is that right? If so, that seems to be ideal as I daresay I wouldn't have any use for it once the new ROM's in place.

    One daft question to end with: with a custom ROM installed, can I install all the same apps I had before (banking apps etc?). Thanks so much.
     
    ocnbrze, bcrichster and MrJavi like this.
  11. MrJavi

    MrJavi Android Expert

    Hello @pooksahib :)

    My experience is with Samsungs and not Motorolas. With that being said, I'd advice making a full backup in twrp of all you partitions and save them to external sd, otg flash drive and/or PC.

    From reading your previous thread I'm assuming you wish to update your OS by flashing a custom rom inorder to run banking apps that will no longer support 6.0 MM. There are a number of variables to take into consideration.

    https://www.google.com/amp/s/amp.re...you_use_banking_apps_or_apps_like_netflix_on/

    It's my understanding that

    code

    fastboot flash recovery twrp.img

    will replace your stock recovery with TWRP custom recovery. If that is the case, I say again make a backup. I do this before flashing anything else. Its good to have in case you have to start over.

    Did you successfully unlock the bootloader?

    https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a

    XDA

    https://forum.xda-developers.com/mo.../twrp-squid-twrp-recovery-moto-e-lte-t3137649

    Squid TWRP

    https://forum.xda-developers.com/devdb/project/?id=10398#downloads

    At this point, I suggest you wait for @bcrichster guidance beforehand. :) After all, I've never owned an android Motorola .
     
    #11 MrJavi, Oct 9, 2020
    Last edited: Oct 9, 2020
    ocnbrze, pooksahib and bcrichster like this.
  12. bcrichster

    bcrichster ROMinator
    Moderator

    No problem.
    • Phone will show no changes when flashing anything in fastboot untill you give it a reboot cmd. Just manually use device volume buttons (like arrow keys) to select RECOVERY option, then hit pwr (like Enter) to boot into the recovery you installed (just flashed).
    • Theoretically, yes you can flash a whole ROM set and never install TWRP itself. Realistically: usually only works like that without errors for making backups and manually flashing kernels / recovery images. If you wanna flash a ROM, it's usually best to install/flash the TWRP and go from there. I was just providing multiple options to accomplish the same things.
    • As for installing banking apps and stuff: usually problem free, so long as:
    • You have an SELinux Enforcing kernel instead of Permissive. (Official status ROMs usually requires kernels to be Enforcing anyways)
    • You don't Root the ROM. Rooting can still be done however on some devices (unsure which).. with some caveats and extensive trial & error, up to you whether you'd wanna persue it tho.
     
    ocnbrze, pooksahib and MrJavi like this.
  13. pooksahib

    pooksahib Member
    Thread Starter

    That's really helpful advice and I'm so grateful to you both for taking the time and trouble to assist me. I've read a lot of posts about banking apps and there seems to be an equal split between those with no issues and those who run into problems, maybe not at first but when updates come along. I'll have to think about this - might be easier to buy a new phone...

    But if I do go ahead with a custom ROM:
    How would I check that I have an SELinux Enforcing kernel?
    Would an 'Official' ROM from the XDA site be guaranteed not to root the ROM? (I read that some ROMs will root as a matter of course.)

    Again, my thanks, you guys have been great.
     
    ocnbrze and MrJavi like this.
  14. bcrichster

    bcrichster ROMinator
    Moderator

    Your best option for that answer would be to read the threads of the ROM in question. :specsdroid:
     
    ocnbrze and MrJavi like this.
  15. pooksahib

    pooksahib Member
    Thread Starter

    Makes sense...

    OK, my phone is primed with Squid TWRP and this is the ROM bcrichster kindly pointed me to in a previous thread:
    https://forum.xda-developers.com/moto-e-2015/development/9-0-resurrection-remix-v7-0-t3899373
    Clicking ROM Download gives a choice of Android versions - Pre-8, 8, 9 and 10. I think I'll try Android 9 (pie) but clicking it gives a huge list of (presumably) codenames. Why so many and how do I choose which one to take? Thanks for any advice offered.
     
    MrJavi likes this.
  16. bcrichster

    bcrichster ROMinator
    Moderator

    I think yours is called "surnia", download that one
     
    ocnbrze, MrJavi and pooksahib like this.
  17. pooksahib

    pooksahib Member
    Thread Starter

    Thanks, didn't realise they were THOSE kind of names. Spot of luck, too - there's a pie surnia (the one I was planning) but no surnia for oreo or ten. Odd...
     
    ocnbrze and bcrichster like this.
  18. bcrichster

    bcrichster ROMinator
    Moderator

    A lot of ROM developers had trouble with everything Oreo 8.x changed and basically dropped the ball on finishing their repo's, going straight to pie 9.0. should be a good choice with many apps in Playstore still usable
     
    ocnbrze and MrJavi like this.
  19. pooksahib

    pooksahib Member
    Thread Starter

    Installation went very smoothly indeed. Quick, too - I'd been warned that first boot could take up to 10 minutes but it was just a normal boot time. I use 2 banking apps and the first one works fine. The second one doesn't due to it having detected non-standard firmware so I installed Magisk and MagiskManager. Although I pass the SafetyNet check, that app still won't work.

    According to some tutorials, I should be able to use 'Magisk Hide' to select specific apps. I can't find anything like this. If I open Magisk Manager then tap the gear icon (settings) all I get is a swipe button for MagiskHide - 'on' or 'off'. Any idea as to what I need to do to get both banking apps working?

    Meantime, my sincere thanks for all the help given to me when installing TWRP and my new ROM, esp bcrichster.
     
    bcrichster, ocnbrze and MrJavi like this.
  20. MrJavi

    MrJavi Android Expert

    Thats great :)

    Maybe, try force stop, clear data, reboot and run the banking app again and se if that works.
     
    ocnbrze likes this.
  21. pooksahib

    pooksahib Member
    Thread Starter

    Hi Mr Javi. Yes, I'd already tried that but with no success. I've since noticed that SELinux is 'disabled' and bcrichster said it should be Enforcing. So I flashed 'The SELinux Switch' but I can't find that app anywhere! Could it be because my Root access is disabled? Some advice on this latest matter would be much appreciated, thanks.
     
    MrJavi likes this.
  22. bcrichster

    bcrichster ROMinator
    Moderator

    Your Root access may not be disabled, but merely nothing might have been properly given Root access yet.
    • Have you tried installing the MagiskHide module found in the downloads section in Magisk manager?
    • Once installed, you'll have to manually select which apps you wish to use the Hide command on.
    • The SELinux switch may be related to a specific kernel mod app.. like KernelAdiutor.apk or mTweaks.apk
    And lastly but certainly not least of mentions is that your RR9 ROM may have indeed just been a rare Official with Permissive built kernel.. which no SELinux switch flashing can really fix properly and may need do some more digging to see if anyone released any Surnia 9.0+ ROMs with an Enforcing kernel. I do know that LineageOS requires an Official labeled ROM to have an Enforcing kernel, just never kept up on the individual charter requirements of the others too well (hence the research recommend).
     
    MrJavi likes this.
  23. pooksahib

    pooksahib Member
    Thread Starter

    Hi bcrichster and thanks for your continued input. My Magisk Manager has very little in the way of options and I certainly couldn't find a Downloads section. I wasn't too bothered, though, given your later comments and so I went looking for a Lineage ROM. I found one which was an Android 10 and it flashed easily. I then rebooted and tried to flash Gapps (using the same Gapps as before only this time the '10' version). For some reason, TWRP rejected it as soon as I tried the flash - no error code, just back to TWRP home screen.

    As a result, I'm losing heart and considering just getting a new phone. Black Friday's coming up, I'm bound to get a bargain. In the meantime, I've restored the phone to the original Android 6...
     
    MrJavi and bcrichster like this.
  24. bcrichster

    bcrichster ROMinator
    Moderator

    2 things with gapps and flashing process with many newer OS'.. a lot of times with Android 9 -10+ is that you need read their flashing instructions to the letter. No offenses if you've already gone through said procedures already, just pointing out possibilities..
    • One of the common changes is about flashing ROM and then doing a FULL boot up.. then going back into TWRP and flashing gapps and Magisk.
    • If you can't access Magisk modules, you may not have it installed properly or their new layout is a new pain for you.
    • Also, you may need use a really small gapps set, like Pico or Nano since the gapps sizes have grown a lot since Surnia was originally released, (and your system remains the same size).
    • Lastly, make sure you know the difference of whether your ROM is 32bit or 64bit (arm64), selecting proper gapps structure is also important.
     
    #24 bcrichster, Oct 14, 2020
    Last edited: Oct 14, 2020
    MrJavi likes this.
  25. pooksahib

    pooksahib Member
    Thread Starter

    Thanks again. It's 32-bit and I used ARM/pico for both pie (successful) and ten (unsuccessful). I flashed ten and let TWRP do a reboot when done. I presume it would have been a full reboot. We may never know why it then rejected Gapps. Ah well...
     
    bcrichster and MrJavi like this.
Loading...

Share This Page

Loading...