[GUIDE]Flashing a Custom Recovery with or without PC - Android General

Flashing a custom recovery is the epitome of Android Hacking and Rooting. But it is always not a straightforward process. Here I am going to share three different methods for flashing a custom recovery. But first let us understand what a custom recovery is.
CUSTOM RECOVERY
Traditionally every android phone comes equipped with some sort of "recovery" program which is used for, well, recovery[emoji14]. It was intended to be used as a fallback measure in case you ended up messing with your phone. But these recoveries were (and are) terribly underpowered and offered a very basic set of features. Here comes in the topic of "Custom Recoveries". Exactly what it means, it means a recovery that has been customised or/and tweaked for some added features. The three big and famous names in the custom recovery circles are:
TeamWin Recovery Project (TWRP)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Features
Completely Touch-Driven and User Friendly UI
Fully Customizable XML-Driven Interface
Officially supports most Android devices
Has a good and extensive feature set
Supports ADB Sideload
Is a personal choice
ClockWorkMod Recovery (CWM)
Features
The First (most probably) custom recovery for android
Volume Rocker and Power Button Controllable UI
Can perform all sort of wipes including /boot and/devlog
Unofficial Versions available for most devices
Officially available only through Koushik Dutta's ROM Manager Premium app available here
Not very user friendly
Philz Touch Recovery
Features
CWM based recovery
Features three interaction modes - Full Touch, Partial Touch, Only Rockers(Non-Touch)
Everything pretty much the same as CWM including UI (though it has a okayish background)
Now after your little tuition session let's get our hands dirty and flash some recoveries!!!
As for every tutorial you will need some tools set up. They are:
Working ADB and Fastboot (only for 1st method) refer here for help in setting up adb and fastboot.
Rashr from here (only for 2nd method)
Terminal Emulator for Android by Jack Palevich from here (only for method 3)
Any Recovery image for your phone (Search "name_recovery model_name image XDA" on Google)
Rooted device for method 2 and 3
First Method - Fastboot Method
First set up ADB and Fastboot if you haven't already done so. Windows users can follow my guide here
Place the downloaded recovery.img or whateveritisidontcare.img in the same place you put your adb and fastboot if you haven't added adb directory to the PATH variable
Press Shift and rightclick on your anywhere in the white area of the screen. A popup will come up with an option "Open Command Window here". Select it
A Command Prompt shall open up. Make sure your device is connected and USB Debugging is enabled
Type the following commands one by one
Code:
adb reboot bootloader
fastboot flash recovery recovery.img
If successful your command prompt should look something like this.
Done!
Second Method - Using Rashr
Ensure you have Rashr installed and have root access
Open Rashr, grant it root acess, then close it.
Download the recovery image on to the root of your sdcard.
Use a root explorer to copy the image to "/data/data/de.mkrtchyan.recoverytools/files"
Open Rashr, select Recovery from Storage browse to the recovery on the sdcard and continue. IMPORTANT : Rashr may seem to be unresponsive for some time after selecting recovery image. IT IS NOT. Do not FC it or do anything, just keep your device aside and wait for it to report success or failure.
Rashr will take some time and hopefully won't throw up any error and show success
That's it. Enjoy !!!
Third Method - Terminal Flashing Method
This one's relatively simple. Here it goes
Open terminal emulator and type the following commands. Be sure to hit grant on the superuser prompt
Code:
cd /sdcard #type the address of the file directory, i am assuming it to be /sdcard
su
flash_image recovery recovery.img #replace recovery.img with whatever is the name of the downloaded file
If it says "Not found" or some such bull****, It's probably because Busybox isn't installed. Stock ROMs do not have busybox so you'll need @Stericson's BusyBox Free installer. It's available on the play store for free.
Done !!!
Hopefully you will be able to use these guides as a stepping stone to the world of android hacking...:victory:

Related

[ROOT] Zopo ZP950+ ver. 16GB - Androd 4.2.1

The following procedure has been tested by me only on ZP950 + 16GB model. Although the procedure is created generally for the MTK6589 processor and it has been already tested on other devices, could / should also work for other devices based on MTK quad-core processor.
!! Important !!
Success with this application void warranty on your device.
The procedure is based on exploits found by motochopper and the necessary files can be downloaded from here
The procedure works on both linux (run.sh) and Windows (run.bat).
Here are the steps to follow:
Download and unzip the package into a folder
Enable USB debugging on your device. Check that using the command adb devices your device is seen.
Open a DOS window (or in case of linux the unix shell) on the new extracted folder
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Disconnect the device from the PC, run the run.bat command and press enter.
The program will wait for the device. Then connect your device to the PC
The program will upload the necessary programs, install the exploit and SuperSU.apk and after will launch the exploit to enable root permissions.
When the process is finished, press a button and the program will restart the phone
When the phone is rebooted you will have the root permission and SuperSU application installed.
At first launch of the program will ask you to perform an upgrade to a newer version.
To test whether the procedure for root works, connect the terminal to the PC and type the commands
Code:
adb shell
at the shell prompt given command
Code:
su
The SuperSU app will ask you whether to grant root permissions or not, and once accepted, the shell prompt will change from $ to #.
Tested on my zp950+ Build number 20130427-162946
Reserved for future use
Recovery
The recovery partition is only 6 mb so, some latest recovery don't fit in partition and cant'be installed.
(To be honest, there is a procedure that allow you to increase the recovery partition but you must shift all other partitions and reflash all, but is very dangerous and i am not sure about it).
Here there is an adapted version of CWM (6.0.3.0) that works with the default partion size.
PS: Your device must be rooted, and i am not resposabile of damage to your phone.
The steps are:
Downloa the recovery from here
Conncet the device to pc, open a shell (or dos) where you have downloaded the recovery and run this commands:
Code:
adb push cwm-6.0.3.0-zp950.img /sdcard/
adb shell
su
dd if=/sdcard/cwm-6.0.3.0-zp950.img of=/dev/recovery
This will copy the new recovery on your sdcard,
open a shell on your phone and get the root grants
flash (manually) the new recovery into recovery partition
After the operation ends, you can type
Code:
adb reboot recovery
to reboot the phone in recovery mode, on power off it and restart it pressing POWER_ON and VOLUME_UP together.
PS: here there is the default (stock) recovery for who wants to restore it.

First time flashing a ROM using adb/fastboot (help)

So I'm trying to flash a ROM that will grant me root access and the person who made the ROM doesn't explain how to flash it.
I've heard of ADB and Fastboot before but I have no idea where to even start. This is the contents of the .zip:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This is the original thread: http://www.needrom.com/download/infocus-m512
Thanks
I tried searching for a guide on how to flash a ROM with adb/fastboot but I'm not even sure if im searching for the right things
Anyone?
Before you flash a custom ROM, make sure you have a custom recovery installed. This is the part where ASB/FastBoot comes in.
The custom recovery may be CWM or TWRP, or anything at all which supports your device, look on the website of the recovery you want to use if they support your device or seach the XDA forums for one.
After downloading the recovery image, you can optionally rename it to recovery.img.
You can use the zip file you curently have, but I'll advice to use the adb installer which I've included as attachment.
Once you have ADB installed with the installer you can omen op a command promt (cmd.exe).
Make sure your device is turned on and USB debugging is enabled!
After ADB sees your device (with the command: adb devices), boot into fastboot using adb reboot bootloader.
After your phone has rebooted into the bootloader(fastboot), use the command: fastboot flash recovery (path/filename to recovery).img
Following these steps should allow you to install a custom ROM through the recovery you justs installed. if you also want to include superSU(if it's not included into the ROM you're using), flash the SuperSU2.02 falshable zip from chainfire.
But before you do anything of this, make sure you've got a compatible recovery and ROM!
Khatarian said:
Before you flash a custom ROM, make sure you have a custom recovery installed. This is the part where ASB/FastBoot comes in.
The custom recovery may be CWM or TWRP, or anything at all which supports your device, look on the website of the recovery you want to use if they support your device or seach the XDA forums for one.
After downloading the recovery image, you can optionally rename it to recovery.img.
You can use the zip file you curently have, but I'll advice to use the adb installer which I've included as attachment.
Once you have ADB installed with the installer you can omen op a command promt (cmd.exe).
Make sure your device is turned on and USB debugging is enabled!
After ADB sees your device (with the command: adb devices), boot into fastboot using adb reboot bootloader.
After your phone has rebooted into the bootloader(fastboot), use the command: fastboot flash recovery (path/filename to recovery).img
Following these steps should allow you to install a custom ROM through the recovery you justs installed. if you also want to include superSU(if it's not included into the ROM you're using), flash the SuperSU2.02 falshable zip from chainfire.
But before you do anything of this, make sure you've got a compatible recovery and ROM!
Click to expand...
Click to collapse
Thanks for your help, I got it working. Much appreciated

[X553] recowvery, unlock, root Infinix HOT 3 LTE potential - with TWRP

Team Win Recovery Project 3.0.2-0
How it looks :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Notice : I don't own the device my self, so i need some one to test this method.
This will allow you to install TWRP and flash SuperSU!
Step 1 : Unlocking your bootloader
You need unlock bootloader first before installing twrp.
You will also need adb and fastboot. You can download them in a portable small form factor here :
[ADB FASTBOOT][LINUX&WINDOWS]
Start by turning on developer options in Settings -> About device -> Software info -> Build number. (tap 7 times until it's enabled)
Now navigate to Settings -> Developer options -> OEM unlock. (turn it on)
Don't ever turn OEM unlock or Developer options off when using a custom ROM or recovery. This could lose to loss of all your data.
Enable usb debugging on developer option, and extract adb and fastboot to a folder on your PC.
Type adb start-server and make sure to check the notification on your phone to accept debugging authorization.
You can reboot into fastboot mode with adb reboot bootloader once authorized.
If it fails to authorize or show the notification on your phone, you may need to try other USB ports.
You can check the status of your bootloader lock with the fastboot getvar all command.
ex. (bootloader) unlocked:yes
Step 2 : Running recowvery
You can find the recowvery binaries (you need to download all of these) at :
Here
You're now ready to follow the recowvery installation instructions.
See here (running section)
Bonus: There's also a full write up on that page on how recowvery works if you're into that kind of stuff.
Step 3 : Flashing TWRP & Rooting
Once you've got your permissive shell in adb, you will have access to your partitions via dd.
You should transfer TWRP to your internal storage (name in twrp.img) using MTP, or you can also just use adb push. (mentioned here)
Download TWRP build here.
This step requires that you've used dirtycow to replace /system/bin/run-as with recowvery-run-as. If you've rebooted since doing that, you will need to go back and do that again.
Code:
adb push twrp-3.0.2-x-xxxx.img /sdcard/twrp.img
adb shell
$ run-as exec dd if=/sdcard/twrp.img of=/dev/block/bootdevice/by-name/recovery
"<wait for it to complete>"
$ reboot recovery
You should be inside TWRP now. It will ask you if you want to enable system modifications. You should swipe yes, otherwise your OS will replace TWRP on next boot.
Flash the latest zip from here to turn off forced encryption at boot and allow you to boot a modified system. If you're flashing SuperSU.zip, it will also do this for you so this won't be necessary.
Warning: If you don't flash either no-verity-opt-encrypt or SuperSU, you will probably end up in a horrifying never-ending boot loop of "corruption"!
Latest SuperSU : here
To disable encryption after flashing SuperSU or the no-verity-opt-encrypt zip, you must use the [Format Data] button on the Wipe page in TWRP. No other options will work.
Back up all your internal storage and apps data that you can to your PC. You can use Titanium Backup with SuperSU before doing this step if you like.
Warning: Using [Format Data] will wipe all your apps and data (including internal storage) off the phone, giving you the out-of-the-box experience of a new phone!
Once this is done, you should be able to backup/restore/use any function of TWRP without any issues.
Flashed SuperSU? You're done! Boot up (it will reboot a few times) and set up your SuperSU Manager to your liking and give this post a thanks!
Step 4 : Have fun!
Thanks for this great work brother
But sorry i can't try any thing right now because I have exams nowadays
I want to tell you also that I just rooted successfully my hot 3 lte now using kingoroot apk with out using pc 😄😄😄
ModaAli said:
Thanks for this great work brother
But sorry i can't try any thing right now because I have exams nowadays
I want to tell you also that I just rooted successfully my hot 3 lte now using kingoroot apk with out using pc 😄😄😄
Click to expand...
Click to collapse
so root is done, then time to try twrp just if u not busy
And then for custom rom ??
But later, I'm so busy sorry ? ?
ModaAli said:
And then for custom rom ??
But later, I'm so busy sorry ? ?
Click to expand...
Click to collapse
Don't hope too much this is still for testing but probably soon will have a custom rom, well good luck for your exam bro :good:
It will be sure
Thanks bro ?
Thread closed per OP request.

[AIO][ROOT][MODS] All-in-one thread for the Starmobile Up Prime

Starmobile Up Prime
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
SOME INFO:
MT6737/M (they seem to be the same thing)
Antutu Score: 30052 [source]
As of Jan 6 2018, latest official firmware is v13 06292017.
A. Root
Disclaimer: YOU ARE DOING THIS AT YOUR OWN RISK. I will not assume any responsibility for your own actions on your phone. Follow the instructions carefully, and ask questions if you're unsure.
Tested way: Magisk Manager patched boot method
Other option: SRS Root reports to root the v12 firmware, though I didn't use this method so I don't know if it works.
Magisk Manager Patched Boot Method
1. Unlock your bootloader (Note: this will factory reset your phone and you will lose all your personal data) To do this:
Enable bootloader unlock inside developer options, accessed by pressing build number 7 times in settings. Thanks @Nao Tomori !
Install adb and fastboot on a computer (Search it, it's available)
Reboot to fastboot mode (Switch off phone, press power and volume up simultaneously. Choose fastboot mode from the menu that appears)
Connect to computer by USB Cable provided
Open a command prompt or terminal and check if fastboot detects your device by typing
Code:
fastboot devices
A device number should appear. If nothing appears, it's a most likely driver problem. Click this button to know more.
Linux doesn't need drivers so try using fastboot in linux. If you really want to do it in windows, try PDANET drivers while connected in fastboot mode. No guarantees. I'm using a linux machine to specifically avoid this hassle
​
We're now gonna unlock your bootloader. Type
Code:
fastboot oem unlock
and confirm unlock by clicking volume up on your phone.
Reboot and go through all the necessary set-up.​2. Download Magisk Manager from here and install the APK.
Make sure you download the latest apk version provided.
Note it says that Magisk itself is not yet installed.
We've only installed the helper app.
3. Flash Patched Boot Image
At this point you have two options: extract and patch your own boot image, or just use my patched boot image. I will assume you pick the second but this REQUIRES that you are on the same v13 06292017 official firmware. PM me if you want to do the first one. Download my patched boot image.
Download​
Move the file to a known location that's easy to type (home directory or C Drive)
Reboot to fastboot mode, same as before
Flash with fastboot then reboot
Code:
fastboot flash boot /path/to/patched_boot.img
Code:
fastboot reboot
​CONGRATS! Magisk should now be installed and along with it, Magisk's Superuser
Press thanks if it helped you! And/or leave feedback if it worked for you, and if your setup differed from mine. Thanks
MODS
B. Mods
1. Xposed Framework (systemless)
Install Xposed framework from within Magisk. Install API24.
Then reboot. This first boot takes really long. I pulled out my battery once, then the next time it successfully booted after a while.
Install topjohnwu's Xposed apk from his systemless Xposed thread.
It will tell you that Xposed is installed but not active yet.
Reboot one last time
2. Dolby Atmos (systemless)
Install from within Magisk. Confirmed working!
RECOVERY
Reserved
If you get fail operation
If you get
Code:
FAILED (remote:
Unlock operation is not allowed
)
Just go to Developer Settings > OEM Unlocking and enable it.
I used PDAnet for Windows and it worked
Nao Tomori said:
If you get
Code:
FAILED (remote:
Unlock operation is not allowed
)
Just go to Developer Settings > OEM Unlocking and enable it.
I used PDAnet for Windows and it worked
Click to expand...
Click to collapse
Oh yes, I forgot about that! Thanks. Will add and credit you
hi there bro. i just want to know, is there a custom rom that we can use for this phone? i have the same exact phone but i cannot find any articles about any other custom roms that has been used on this phone. hoping to hear from you. thanks.
And another thing, can we use TWRP for this phone?
Hello. Is there anyone here who has a clean stock rom for Starmobile UP Prime? The phone keeps popping up ads and redirecting to chrome/google play. Contact names sometimes disappear too. I ran the malwarebytes app and it said that "Settings" app is the malware. I downloaded and flashed another rom before (I forgot from what website), but same experience. Hoping for helpful response.

Can recover data/restore factory rom via adb/fastboot/PC only (w bootloader locked)?

in brief:
the data should be there on the phone, so there's hope it should be easier to recover than deleted data but i run out of ideas how to get adb to find and pull it... maybe a more advanced user has better knowledge (better commands or tools)
adb devices and fastboot devices communicate with phone, so i have all drivers installed, i can only tackle with it via usb from windows 7 based computer
the detailed story:
i have a huawei g620s-L01, stuck in bootloop (just loading huawei logo forever or until battery empty but does not restart) and also "volume down" button does nothing... the bootloader is locked and huawei seems to have stopped providing unlock codes...the touch works but is shattered so i was told repair the button is not an option...
i can boot it into recovery mode using "volume up + power" but i can't use the recovery menu due to the dead "volume down"
from recovery menu i can only "reboot system now" but that re-enters the bootloop,
also i get bootloop if i try to boot into download mode via adb command
i can use some adb commands (i say some because some return errors, others say i don't have permissions)
i can boot into fastboot via adb command too...i can not find my dcim folder or any data folder to use the pull commnad, i tried the generic commands to pull sdcrd or dcim or all files with *.jpg
the user data is not accesible, i could browse some system directories but they did not contain my files via cd commands
i found some threads saying maybe i need mount or root commands
but trying to mount partitions or access su via adb also gives errors
su is not found, i do remember there was a su when android was working on the devices but is useless if i can't find/access it
i found the factory rom and some tools to try to restore rom to the phone due to claims that same rom might find my data, but the tools failed to start due to locked bootloader
i also tried several versions of full android sdk (old and new) trying to find "monitor or file browser" tools but the menu is not there...perhaps it will not activate those tools when device is in fastboot/recovery modes
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
i also found a 3rd party full android browser but can't connect with it either
also recovery softs are useless, they need a working android to try to recover anything...some recovery softs claimed they can fix bootloop but don't support my device
free tools that try to unlock bootloader also failed
so at this point i am running out of things to try
this is what i figured so far: i can see my data but can't touch it
i seem to have 4 partitions on the device:
1 is called sdcard but has nothing accesible on it, could be the feature for external card
2 is called ext , total size is 711,49mb , used 124,98 and available 586,5
3 is called system , total size 1,64 gb, used 1,23gb, available 418,1mb
4 is called data, total size 3,96gb, used 3,75gb, available 218,16mb
clearly the data partition is still keeping my data
i can not see my installed apps, so i guess they are also on that partition
i can see some system apps, namely 49 out of 146
so i'm guessing the issue is with one application, likely system app since i can't see them all
the phone may be partly rooted, the android may have some rooted features but the adb on it is not rooted
so i can not use the adb root command to get to my data
and i can not try to flash recovery or rom or custom boot img from adb due to bootloader locked and asking for unknown code

Categories

Resources