How to root HTC Desire 626s step-by-step procedure
Credits
- I did not come up with the procedure to root this phone - that work was done by member @hackvcs - I just put this guide together using the method that he developed (and using the custom recovery that he put together). Please give all credit to @hackvcs!!! Also, the links to the files below are not my links - they are links that other members provided (member who provided them is listed below).
Pre-requistes/Downloads:
- HTC Desire 626s phone
- Official TWRP Recovery Images: https://twrp.me/devices/htcdesire626s.html - Thanks @Captain_Throwback!
- Recovery images (custom CyanogenMod recovery and stock recovery image) - provided by @hackvcs(https://mega.nz/#!sp0wCThZ!MQVTq6y_8...hnaLRq8UiqLruQ)
- SuperSU binary .zip file - link provided by @mussio (https://download.chainfire.eu/696/SuperSU)
1. Unlock bootloader
- Enable "Unknown Sources" on your phone:
- Settings->Security: Check "Unknown Sources" checkbox
- Enable "Developer Mode" and enable "USB Debugging" and "OEM Unlocking" settings
- Settings->About->Software Information->More: Tap on "Build Number" until it tells you that Developer Mode is enabled.
- Settings->Developer Options: Enable "OEM Unlocking" and "USB Debugging" options.
- Actually unlock the bootloader by going to the HTCdev "Unlock Bootloader" website (www.htcdev.com/bootloader) and following the directions to unlock your bootloader. You will need to create an account on this website before being able to unlock the bootloader. I'm not going to provide step-by-step instructions for the bootloader unlock procedure since the HTCdev website already provides a step-by-step procedure. However, here are a few key notes regarding this procedure:
- The bootloader unlock procedure will reset your phone back to factory defaults. Make sure to backup anything that you need on the phone before unlocking the bootloader. You can optionally install the "HTC Sync Manager" (link provided on HTCdev website) to backup your phone before starting the process.
- In the "Select your device" box on the first screen of the bootloader unlock procedure, select "HTC Desire *" as the device type.
- If you are running the latest firmware on your phone, you do not need to worry about the phone update page when you first start the unlock process - just scroll to the bottom of the screen and click the "Proceed to Step 1" button to start the procedure.
- You will need to install Java if you don't already have it installed - there is a link to download Java right on the same page as the bootloader unlock procedure.
- You will need to download and install the fastboot binaries provided in step 4 of the bootloader unlock procedure. Unzip the fastboot.exe file included in the zip to a directory that you will use to root your HTC Desire 626s (I recommend creating a new directory for this - something like "C:\HTC626s") - later, you will also put the other files you need (recovery image file and SuperSU binary .zip file) into this same directory so that everything is in one place.
2. Install custom recovery
Once you have successfully unlocked your bootloader, you will need to flash a custom recovery (TWRP recommended). This recovery image will replace the stock recovery on your phone and allow to flash the SuperSU binaries in the next step.
- Connect your phone to the PC via USB cable and let the PC install the necessary drivers for the phone.
- Reboot the phone into "Download" mode:
- Power off phone
- While holding the Volume Down button, press the device Power button. Continue to hold the Volume Down button until the phone boots into "Download" mode. To confirm that the bootloader is unlocked and that you are in "Download" mode, you should see the following two lines at the top of the screen:
- "hTC download mode"
- "*** Unlocked ***"
- Once you have confirmed that you are in download mode and the bootloader is unlocked, it's time to flash the custom recovery:
- Open a Command Prompt (aka DOS prompt) window and change to the directory where you put the fastboot.exe file. If using the recommended directory, you would type this command in the Command Prompt window to change to that directory:
- Type "cd \HTC626s" and press [ENTER]
- Make sure that the recovery file is in the same directory (type "DIR" and press [ENTER] to see the files in the current directory). If it is not in the current directory, put it there before continuing (via Windows Explorer). Also, I'd recommend renaming the recovery image to "recovery.img" - it makes typing the commands a little easier and reduces the likleyhood of a typo. So before continuing, you should have both "fastboot.exe" and "recovery.img" in the current directory.
- In the command prompt window, type "fastboot flash recovery recovery.img" and press [ENTER] - this will flash the custom recovery to your device.
3. Install SuperSU superuser binaries
Now that we have the bootloader unlocked and the CyanogenMod recovery installed, we are set to flash the SuperSU binaries to actually root the device. Before continuing, make sure that you have copied the SuperSU binary .zip file to the internal storage on your phone! Once we boot into CyanogenMod, you will have to navigate to this .zip file in order to install it. It MUST be on the *internal* phone storage (not on the MicroSD card).
- Reboot your phone into recovery:
- Power off the phone
- Power on the phone while holding the "Volume Down" button. Keep holding "Volume Down" until the phone boots into Download mode.
- Scroll down to "Reboot to bootloader" and press the power button.
- Once in bootloader mode, scroll down to "Boot to recovery mode" and press the power button. At this point, you should be in the CyanogenMod recovery menu.
- Scroll down to "Apply Update" and press the power button
- Scroll down to "Choose from internal storage" and press the power button
- Navigate to where you stored the SuperSU .zip file and select it - the SuperSU binaries will be installed on thephone.
That should do it! You should now have a rooted HTC Desire 626s. Reboot the phone into Android and confirm that you have a SuperSU icon in your app drawer and then confirm that the device is actually rooted.
NOTES:
- Your phone MUST be in "Download" mode when flashing the custom recovery! You CANNOT install the recovery image when the phone is in "Bootloader" mode. If you receive this message: "remote: cannot flash this partition in s-on state", that means that you are trying to flash the recovery image while the phone is in "Bootloader" mode - you MUST be "Download" mode when flashing the recovery image!
- Bootloader MUST be unlocked before attempting to install a custom recovery. Verify that you bootloader is unlocked by checking for "*** Unlocked ***" text at top of the screen when the phone is in "Download" mode.
- After rooting, you can always revert back to the stock recovery if you'd like - the stock recovery image is provided in the same .zip file that contained the CyanogenMod recovery image (provided by @hackvcs).
How To Install Google Play On Amazon Fire Phone Without Rooting
In this short tutorial, you will learn how to make your Fire phone look and behave like a standard Android phone.
As you probably know, Fire OS is a slight modification of Android OS. With Fire phone, however, Amazon created its own look (the carousel and the center, right and left panel) that is much different from what you know from Android phones.
If you happen to dislike Fire OS and want to make your Fire phone look and act more like an Android phone, you are just in the right place. All you have to do is follow the instructions below.
Before I begin, I want to thank Brett for giving me most of the materials and resources for this tutorial.
Installing The Play Store On Fire Phone
The first thing you need to do is install the Play store and have it up & running properly. Here’s what you need to do step by step:
1) Allow installation of apps not from the Amazon Appstore. To do this, go to Settings > Applications > Allow installation of applications not from the Amazon Appstore and turn the option App Installation ON.
2) Download and copy the folder containing these four Google files to your Fire Phone. You can use the included USB Cable, or a cloud storage app. What you will basically need to do is sideload these four Google apps to your Fire phone.
3) Install the apps: ES File Explorer and APK Installer. Both are available on the Amazon Appstore. You will need one of these apps to open and install the Google files on your Fire phone.
4) Navigate to the folder with Google files you downloaded in step two using one of the two apps above. If using cloud storage, you can do this from the app itself, and don’t even need to use ES File Explorer.
5) Install the files from the folder in THE FOLLOWING order (tap on the files, accept app permissions and tell them to install):
- Google Account Manager
- Google Play Services
- Google Services Framework
- Google Play Store
6) Congratulations, you now have the PLAY STORE and GOOGLE SERVICES installed and working on your Amazon Fire phone.
Now you can download and use the apps from the Play store, including those that require a Gmail account (such as Google Calendar, Gmail, Google Chrome, Snapchat and so on) as if it was any other Android device.
7) You might need to update the Play store, so look out for updates to any of the files you just manually installed. To check of the Google Play store is up to date, open it, go to Settings and click on Build version.
8) In order to avoid future problems, you should turn off auto update for the Amazon store, which you probably won’t be using anymore.
To do this, go to Settings >Applications > Manage the settings for individual Amazon Applications on your phone. OpenAppstore and disable Automatic Updates.
It’s also a good idea to uninstall all of the apps you installed when using the Amazon store, and re-install them using the Play store.
Unlock/Root/Flash for OnePlus Two [GUIDE]
Intro
This post will serve as a location for basic how-to guides for the OnePlus Two. I'm going to start off with a couple of the more obvious ones and go from there. If anyone has any suggestions for additions please feel free to let me know.
Prerequisites:
You'll need a working adb/fastboot environment on your PC to get through some of these guides. Go here to download the Android SDK, which will give you most updated version of adb and fastboot. Scroll to the bottom of the page and find Other Download Options>SDK Tools Only, and grab the right version for your OS. While it's downloading create a folder in C:\ called SDK (C:\SDK). Once you've downloaded the zip you can extract it into your C:\SDK folder. Navigate to C:\SDK\android-sdk-windows and open SDK Manager.exe. In SDK Manager you need to install the following packages:
Tools> Android SDK Tools, Android SDK Platform-tools
Extras> Android Support Library
Once you have installed those, inside C:\SDK you should see some new folders, one of them will be called platform-tools, within that folder you should see fastboot.exe and adb.exe. I'll refer to this as your fastboot folder/directory or working folder/directory during this guide. To make sure adb is correctly installed, open a command prompt from within your fastboot folder (hold shift + right click, select open command prompt here) and issue this command:
Code:
adb version
You'll find universal adb/fastboot drivers here, download it and follow the installer, then reboot your PC.
You can test adb by connecting your device to your PC while booted into Android (making sure that adb/usb debugging is enabled in Settings>Developer Options) with the screen unlocked and issuing this command:
Code:
adb devices
You can test fastboot by connecting your device to your PC while booted into fastboot mode (power + volume up) and issuing this command:
Code:
fastboot devices
By attempting any of the processes listed this thread you accept full responsibility for your actions. I will not be held responsible if your device stops working, catches on fire, or turns into a hipster and claims to have been modified before it was cool.
Index
- How To Unlock Your Bootloader
- How To Install A Custom Recovery On Your Device
- How To Make A Nandroid Backup With TWRP Recovery
- How To Root Your Stock Rom
- How To Install A ROM with TWRP Recovery
- How To Install A Custom Kernel With TWRP Recovery
- How To Make Sure You Can Pretty Much Always Recover From An Accidentally Wiped System
1. How To Unlock Your Bootloader
- If you're on Hydrogen OS you'll need to go into Developer Options and enable unlocking first.
- Power off your phone then boot into fastboot mode (power + volume up).
- Connect your phone to your PC via usb cable.
- Open a command prompt from within your fastboot folder (navigate to where you have fastboot.exe located on your PC, shift + right click anywhere within that folder, select open command prompt here).
- Check your fastboot connection by issuing this command:Code:
fastboot devices
It should return your device serial number, if not you need to make sure your drivers are installed correctly.
- Once you've confirmed your fastboot connection issue this command:Code:
fastboot oem unlock
The device will now go through the automated unlocking process, just let it do its thing and it'll boot up into Android.
Depending on the model of your device you may be greeted with a screen displaying Chinese text after issuing the fastboot oem unlock command. This screen requires your input to continue, the top option translates to proceed and the bottom option translates to cancel. Choose the appropriate option. - Go back to fastboot mode and issue this command to ensure that it worked:Code:
fastboot oem device-info
You'll see multiple lines of text on the screen, this is the one you need to pay attention to:
Code:(bootloader) Device unlocked: true
- You can now reboot your phone using this command:Code:
fastboot reboot
- It's now safe to disconnect your usb cable.
Please note: this will erase all user data from your device, it is best to do this before you really start using the device and installing apps or putting data on the internal storage
2. How To Install A Custom Recovery On Your Device
Prerequisites: unlocked bootloader.
- Download the recovery of your choice. Here's a link for official TWRP:
https://dl.twrp.me/oneplus2 - Make sure you check the md5 to verify its integrity.
- Place the file in your fastboot folder (this is where fastboot.exe is located on your PC).
- Put the phone in fastboot mode and connect it to your PC via usb cable.
- Open a command prompt from within your fastboot folder (shift + right click, select open command prompt here), and enter the following commands:Code:
fastboot flash recovery <filename>.img
- Wait for the recovery to flash, it'll only take a few seconds, you'll get a finished message in your command prompt window once it's done. It's now safe to disconnect your usb cable.
- Use the recovery button combo (power + volume down) to boot directly into recovery now, once you've booted into TWRP once you can reboot the phone as normal.
3. How To Make A Nandroid Backup With TWRP Recovery
Prerequisites: unlocked bootloader, TWRP recovery.
A nandroid backup is a very important thing to have before installing any custom software on your device. It's basically a backup of your stock system that you can fall back on if anything goes wrong or if you just want your stock ROM back. You can also use the backup tool to create a backup of your favourite ROM set up exactly the way you like it. The backup you create can be easily restored using the restore tool in TWRP recovery.
All you need to do is enter TWRP recovery, select the backup option from the TWRP home screen, check the system/data/boot boxes, and swipe to backup. The process will take a few minutes.
4. How To Root Your Stock Rom
Prerequisites: unlocked bootloader, TWRP recovery.
- First you need to download SuperSU.
- Enter TWRP recovery via the advanced power menu (or power + volume down).
- Select the install option from the TWRP home screen.
- Navigate to where you have SuperSU stored on your sd card and select it.
- Swipe to install.
- Once you've installed SuperSU you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button. That's it.
5. How To Install A ROM with TWRP Recovery
Prerequisites: unlocked bootloader, TWRP recovery.
Installing a ROM is a pretty straight forward and easy process. Before you install anything you should make a nandroid backup (instructions above).
- Download a ROM and appropriate Gapps package and place on your device.
- Boot into your custom recovery.
- Perform a full wipe.
- Select the wipe option from the TWRP home screen.
- Select advanced wipe.
- Check the system, data, cache, and dalvik cache options.
- Swipe to wipe.
- Install the ROM.
- Select the install option from the TWRP home screen.
- Navigate to where you have the ROM zip stored on your sd card and select it.
- Swipe to install.
Most ROMs will run an installer script at this point but some ROMs have what is called an Aroma Installer which allow you to choose some install options before the script runs.
- You will also need to install the appropriate gapps package directly after installing the ROM.
- Once you've installed all necessary zips you'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.
6. How To Install A Custom Kernel With TWRP Recovery
Prerequisites: unlocked bootloader, TWRP recovery.
A custom kernel can open up a new level of control over your device, such as overclocking/underclocking, undervolting, changing governors, changing I/O schedulers, adjusting colour calibrations, adjusting sound calibrations, and many other options.
- Download a kernel that is compatible with your current ROM.
- Check the md5 to verify its integrity.
- Enter TWRP recovery.
- Select the install option from the TWRP home screen.
- Navigate to the kernel and select it.
- Swipe to install.
- You'll have an option to wipe cache/dalvik and an option to reboot system. Wipe the cache/dalvik, hit the back button, and hit the reboot system button.
Once your phone has booted up you can use a kernel tuning app to change governors, I/O scheduler, clock speed, and other options. Some of the popular kernel apps are Trickster Mod, No Frills, Kernel Tuner, Kernel Auditor, and many more.
7. How To Make Sure You Can Pretty Much Always Recover From An Accidentally Wiped System
Prerequisites: unlocked bootloader, TWRP recovery.
There may come a time when you accidentally wipe your OS while trying to perform a basic cache wipe in recovery. Don't laugh, it can happen to the best of us. The best way to insure yourself against being stuck in recovery is to keep a ROM zip or a TWRP/CWM backup (a nandroid backup) on your sd card at all times.
This solution seems like common sense but apparently there are quite a few people out there who don't store a ROM or backup on their phone. You might think it's easy to just mount the OTG storage and copy a ROM across to your phone from your PC (which is definitely an option), but there's always a chance that you won't be near your HDD or sd card at the time, or it won't recognise your phone properly. Basically you need to insure yourself against Murphy's law.
How to unlock your Droid Turbo bootloader, install TWRP and gain root access
READ THIS FIRST
Please consider the following:
- Ask yourself these two questions: "Why do I want to unlock my bootloader? Why do I need root access?" If the answer to either one of those is "I don't know," don't do it. Both of these actions weaken the security of your phone, and there's no reason to do that if you're not sure why.
- This guide is for the Droid Turbo, model XT1254. It is not for the Droid Turbo 2, and it is not for any phone that is not named Droid Turbo.
- Standard XDA rules apply. I'm not responsible for anything you do, and neither is anyone else other than you.
- I'm assuming that you are running a Windows PC. If you have a Mac, I can't help you. If you're running Linux, you shouldn't need help.
- This method is not free. It costs $25 (USD). If that's not okay with you, don't do this.
- Once your bootloader is unlocked, you CANNOT safely re-lock and unlock it again. See this thread for what happens when you try to do that:http://forum.xda-developers.com/droi...1#post65095391
Still here? Cool.
Section 0: Installing Firmware Version SU4TL-44
1. Go to Settings -> About Phone
2. Look at your Build Number. Is it SU4TL-44? Look at your System Version. Is it 23.21.44.quark_verizon.verizon.en.US vzw? Look at your Kernel Version. Is it 3.10.40-perf-g90ddf4a? If the answer to all of these questions is yes, skip to section 1. If the answer is no, keep reading.
3. Is your Build Number higher than SU4TL-44? If so, you may be out of luck. This guide will probably not work for you. In the future, please remember that the cardinal rule of unlocking anything is never, ever take the OTA unless someone knowledgeable tells you to.
BACKUP YOUR DATA IF YOU NEED TO PERFORM THE FOLLOWING STEPS! ALL DATA ON YOUR PHONE WILL BE ERASED!
4. Download and install Minimal ADB and Fastboot from here: Link.
5. Download and install the Motorola Device Manager from here: https://motorola-global-portal.custh...ail/a_id/88481
6. Download the SU4TL-44 firmware package from here: http://rootjunkysdl.com/getdownload....44_CFC.xml.zip
7. Extract the contents of the firmware package to the installation directory of Minimal ADB and Fastboot. The default install directory on 64-bit Windows is C:\Program Files (x86)\Minimal ADB and Fastboot.
8. Power off your phone.
9. Hold the volume down button and press the power button to boot into bootloader mode. You should see a green android lying on his back with his chest open, and some information about your phone. It's much less gruesome than it sounds.
10. Plug your phone into your PC.
11. Navigate to the Minimal ADB and Fastboot installation directory.
12. Double click on VRZ_XT1254_SU4TL-44_44_CFC.bat.
13. You should see a command prompt pop up, and the script will use Fastboot to flash all of the SU4TL-44 firmware images. When it finishes, it will say "press any key to continue." Press the "any" key to continue. Where's the "any" key, you ask? Keep looking. You'll find it.
Section 1: Unlocking the Bootloader
1. Download Sunshine from here: http://theroot.ninja/download.html
2. Move the apk file to a convenient location on your phone. If you downloaded it with your phone, it's in your downloads folder already, so leave it there.
3. Use any file browser on your phone to navigate to the folder that contains the Sunshine apk file. Tap on it to install it.
4. If a message comes up and says that you need to enable installation of apps from unknown sources, follow the instructions on that message to enable it.
5. Enable Wi-Fi on your phone if it is disabled. Even if you aren't connected to a Wi-Fi network, it still needs to be on.
6. Open your app drawer and start Sunshine.
7. Follow the instructions.
8. If, when your phone reboots, you see a "Warning: The bootloader is unlocked" message, you have successfully unlocked your bootloader. If you do not see this message, open Sunshine again and follow the directions again.
Section 2: Installing TWRP
Team Win Recovery Project is arguably the most important tool to have on a bootloader-unlocked phone. This is how you install it:
METHOD 1: Using Fastboot
This is the method that I prefer. If you can't get TWRP working properly using this method, skip to method 2 below.
1. Download and install Minimal ADB and Fastboot from here: http://forum.xda-developers.com/show....php?t=2317790. If you already did this in section 0, you don't have to do it again.
2. Download the latest TWRP .img file from here: https://dl.twrp.me/quark/
3. Download and install the Motorola Device Manager from here: https://motorola-global-portal.custh...ail/a_id/88481. If you already did this in section 0, you don't have to do it again.
3. Rename the file that you downloaded in step 2 to TWRP.img
4. Copy TWRP.img to the directory that you installed Minimal ADB and Fastboot to. The default location on an installation of 64-bit Windows is C:\Program Files (x86)\Minimal ADB and Fastboot.
5. Turn off your phone.
6. Hold the volume down button and press the power button to boot into bootloader mode. You should see a green android lying on his back with his chest open, and some information about your phone. Poor little guy...
7. Plug your phone into your PC.
8. Double click on the Minimal ADB and Fastboot shortcut that's on your desktop. It will open a command prompt.
9. Type "fastboot devices" without quotes and press enter. If it gives you your phone's serial number, you're good to go. If it gives you nothing, your device is not detected. This can happen for several reasons, and I won't discuss them here. However, if you followed these directions and all of your hardware is functioning properly, you should be good to go.
10. Type "fastboot flash recovery TWRP.img" without quotes and press enter. It should tell you that the flash was successful.
11. Highlight Recovery on your phone using the volume up and down buttons.
12. Press the power button to boot into TWRP.
13. TWRP will boot, and it will ask you if you want to allow write access to the system partition. IT IS VERY IMPORTANT THAT YOU ALLOW THIS. Check the box that says to never ask this question again.
14. Select Reboot, followed by System to boot the phone normally.
METHOD 2: Using Sunshine and TWRP Manager
1. Download TWRP Manager from the Google Play Store.
2. Open Sunshine.
3. Follow the instructions until Sunshine tells you that it has obtained root access.
4. Open TWRP Manager.
5. Tap Device Name and select Motorola Moto MAXX (quark).
6. Tap Install Recovery.
7. Hold the volume down button and press the power button to boot into bootloader mode.
8. Highlight Recovery with the volume buttons and press the power button to select it.
9. TWRP will boot, and it will ask you if you want to allow write access to the system partition. IT IS VERY IMPORTANT THAT YOU ALLOW THIS. Check the box that says to never ask this question again.
10. Select Reboot, followed by System to boot the phone normally.
Section 3: Gaining Root Access
If you intend to install a custom rom, these steps are not necessary. Custom roms almost always come with root access built in. Refer to the thread of your custom rom of choice for installation instructions.
If you do not want a custom rom, and you simply want root access on the stock Droid Turbo rom, continue reading.
1. Download SuperSU from here: http://download.chainfire.eu/supersu-stable
2. Transfer that file to a convenient location on your phone. If you downloaded the file with your phone, it's in your downloads folder. You can keep it there.
3. Turn off your phone.
4. Hold the volume down button and press the power button to boot into bootloader mode. You should see a green android lying on his back with his chest open, and some information about your phone. Andy, what have they done to you?
5. Use the volume up and down buttons to highlight "Recovery mode."
6. Press the power button to select Recovery mode.
7. Select Install from the TWRP main menu.
8. Navigate to the location where you saved the file that you downloaded in step 1, and select it.
9. Swipe the bar at the bottom of the screen to flash this zip file.
10. When it finishes, select Reboot System to boot your phone normally.
Section 4: Miscellaneous
Here are some links to stuff you can flash now that your bootloader is unlocked:
Official Cyanogenmod 12.1 (Android 5.1.1): https://download.cyanogenmod.org/?device=quark
Official Cyanogenmod 13.0 (Android 6.0.1) Preview Build: http://forum.xda-developers.com/moto...t1254-t3315912
Resurrection Remix (a great Cyanogenmod-based rom, Android 5.1.1): http://forum.xda-developers.com/moto...5-5-5-t3197643
Resurrection Remix Work in Progress (Android 6.0.1): http://forum.xda-developers.com/moto...remix-t3316232
Computerfreek274's optimized stock rom: http://forum.xda-developers.com/droi...ed1-0-t3255945
Change the splash screen (the bootloader unlocked warning message) that you see when you first start your phone: http://forum.xda-developers.com/droi...uests-t3262873
Xposed framework and installer (make sure to use the sdk22-arm version if you're running a lollipop rom, sdk23-arm if you're running marshmallow): Click Here
Pon-3 Audio Mod (modified and improved Viper4Android. It makes your phone sound better.): http://forum.xda-developers.com/show....php?t=2530976
Theme your TWRP with different colors: http://forum.xda-developers.com/andr...olors-t3310235
Section 5: Troubleshooting
Issue: When you try to boot TWRP, you see a screen that says "no command." TWRP does not boot.
Solution: The screen you are seeing is the stock Droid Turbo recovery menu (the menu that you're trying to replace with TWRP). If you see this after flashing TWRP, one of two things happened:
-You did not boot into the recovery menu immediately after flashing TWRP, and it was therefore replaced by the stock recovery menu.
-When you flashed TWRP, the process did not complete successfully.
The solution to both of these problems is to repeat section 2 and follow the instructions more carefully. If you used method 1 before, try method 2.
Issue: When TWRP asked you if you wanted to allow write access to the system partition, you selected no. Now you cannot flash anything.
Solution: At the main TWRP menu, select Mount. Uncheck the box that says "Mount system partition as read-only."