How to unpack recovery.img? - Android Q&A, Help & Troubleshooting

How can I unpack recovery.img? I am running linux on my PC.

Well I found a way, so thought that I should share it with all.
You need dsixda's Android Kitchen and recovery.img of any phone you want to unpack.
I am running a linux pc.
You can look for installation steps in following thread:
https://forum.xda-developers.com/showthread.php?t=633246
Open a terminal.
Type the following command to go into the directory of android kitchen
For example, I have to go in this path using terminal
/home/augustoandro/Android/android-kitchen , then I type
cd /home/augustoandro/Android/android-kitchen
Click to expand...
Click to collapse
After that
./menu
Click to expand...
Click to collapse
Now choose ADVANCED OPTIONS by entering the no. in front of the option.
Now, select "unpack/repack boot.img" option in the same way.
Now, enter "a".
A folder would be created in the android kitchen folder. In my case, /home/augustoandro/Android/android-kitchen/boot-img-64647470
Copy and paste the recovery.img file in the new folder.
Go back to the terminal and press enter.
The recovery.img file would be unpacked in the same folder.
You can look for it using the file explorer.
Hit thanks button if found useful

Related

help with recovery

an anyone tell me what im doing wrong
I download the zip file and unzipped it to the C drive
The image files name is recovery-en-goapk
I have placed it inside C\android-sdk-windows\tools
then i type the following code
C:\Users\Mike>cd C:\android-sdk-windows\tools
then
C:\android-sdk-windows\tools>fastboot flash recovery C:\recovery-en-go-apk
then i get: error cannot load 'C:\recovery-en-goapk
http://forum.xda-developers.com/showthread.php?t=1138541
Make sure the recovery file is in the same directory as your fastboot.exe if using windows. The same goes for the moto-fastboot if using that one.
jra89027 said:
an anyone tell me what im doing wrong
I download the zip file and unzipped it to the C drive
The image files name is recovery-en-goapk
I have placed it inside C\android-sdk-windows\tools
then i type the following code
C:\Users\Mike>cd C:\android-sdk-windows\tools
then
C:\android-sdk-windows\tools>fastboot flash recovery C:\recovery-en-go-apk
then i get: error cannot load 'C:\recovery-en-goapk
Click to expand...
Click to collapse
SGTShark said:
http://forum.xda-developers.com/showthread.php?t=1138541
Make sure the recovery file is in the same directory as your fastboot.exe if using windows. The same goes for the moto-fastboot if using that one.
Click to expand...
Click to collapse
if you placed the recovery-en-go-apk file INSIDE the tools directory why would you be trying to point it to the root of C:\ ????
lets make a small attempt at logic. i damn sure would not be doing this to my device if i wasnt sure of the path of the file......

[HOW TO] Get custom recovery extremely noob proof.

THINGS TO NOTE:
1. YOU MUST UNLOCK BOOTLOADER FIRST, THEN FOLLOW THESE INSTRUCTIONS
2. AFTER YOU FOLLOW THESE INSTRUCTIONS YOU STILL NEED TO GET ROOT, YOU ARE NOT ROOTED, YOU JUST HAVE A CUSTOM RECOVERY
3.BEFORE YOU DO ANYTHING DO THIS ON YOUR PHONE
1. Go to Settings --> Applications --> Development --> Check Dubugging
2. Take out the battery from the back of your phone and insert it back in
3. hold down volume down and power button. wait until you see a screen with options
4. Use the volume buttons to go up and down...go down and select fastboot, and press power button to select it.
5. plug in your usb to your phone.
how to use command prompt:
-windows 7: start button > type in "cmd" without quotes
-windows vista and xp: start button > Run type in "cmd" without quotes
You need to be familiar with windows file system. There are directories and files
now you can go to any directory you want. Let say you want to go to your android directory that's in c:\user\seansk\android\
type: cd c:\user\seansk\android\
if you want to go back to c:\ directory
type: cd c:\
How to get custom recovery using command prompt:
download the attached .zip file provided by Binary I have also attached it here
PUT ALL THE FILES INSIDE THE ZIP FILE INTO C:\Android
to do this: click start click on "computer" or "my computer" depending on your windows version.
Then click on the main drive usually it is c:
right click in an empty area and create a new folder and call it android
now take all the files inside the zip file i have attatched and put them in the android folder
go to command prompt like showed you above: go to c:\android directory like I showed you above: if you forgot here's how AGAIN
type cd c:\android
now type this: fastboot flash recovery recovery-cwm-ruby-5.0.2.7.img
your command prompt should now look like this:
c:\Android>fastboot flash recovery recovery-cwm-ruby-5.0.2.7.img
PRESS ENTER, your phone will install the custom recovery
once it is done
type: fastboot reboot
Done.
seansk said:
how to use command prompt:
-windows 7: start button > type in "cmd" without quotes
-windows vista and xp: start button > Run type in "cmd" without quotes
You need to be familiar with windows file system. There are directories and files
now you can go to any directory you want. Let say you want to go to your android directory that's in c:\user\seansk\android\
type: cd c:\user\seansk\android\
if you want to go back to c:\ directory
type: cd c:\
How to get custom recovery using command prompt:
download the attached .zip file provided by Binary I have also attached it here
PUT ALL THOSE FILES INSIDE THE ZIP FILE INTO C:\Android
to do this: click start click on "computer" or "my computer" depending on your windows version.
Then click on the main drive usually it is c:
right click in an empty area and create a new folder and call it android
now take all the files inside the zip file i have attatched and put them in the android folder
go to command prompt like showed you above: go to c:\android directory like I showed you above: if you forgot here's how AGAIN
type cd c:\android
now type this: fastboot flash recovery recovery-cwm-ruby-5.0.2.7.img
your command prompt should now look like this:
c:\Android>fastboot flash recovery recovery-cwm-ruby-5.0.2.7.img
PRESS ENTER, your phone will install the custom recovery
once it is done
type: fastboot reboot
Done.
Click to expand...
Click to collapse
Nice but I can't find the seansk directory. What am I doing wrong?
Binary100100 said:
Nice but I can't find the seansk directory. What am I doing wrong?
Click to expand...
Click to collapse
You should try to find it by looking around your bedroom...maybe you'l find a folder named seansk on it!!! feel free to add it to your how to pages!!!
seansk said:
You should try to find it by looking around your bedroom...maybe you'l find a folder named seansk on it!!! feel free to add it to your how to pages!!!
Click to expand...
Click to collapse
Nevermind. I found it. It was the one with your mothers pictures in it.
Yeah I went there. LOL!
Binary100100 said:
Nevermind. I found it. It was the one with your mothers pictures in it.
Yeah I went there. LOL!
Click to expand...
Click to collapse
you have the wrong folder start over you need to unlock the drawer[bootloader] first
seansk said:
you have the wrong folder start over you need to unlock the drawer[bootloader] first
Click to expand...
Click to collapse
Oh no I don't. This works just fine.
Binary100100 said:
Oh no I don't. This works just fine.
Click to expand...
Click to collapse
crap I forgot to add they should start fastboot...time to edit again

How to build your own rom using stock rom/firmware(noob friendly guide)

HERE IS A GUIDE FOR YOU ALL YOU CAN CREATE YOUR OWN ROM BY THIS METHOD.I AM NOT RESPONSIBLE FOR BRICKED DEVICES.
Click to expand...
Click to collapse
Requirement to make a custom rom
*JAVA JDK installed on your SYSTEM
*WIN XP/ 7/8/8.1.
*package given in download section
Who is this kitchen for ?
Those who are brand new to
creating custom ROMs and
want an easy place to start
learning
Those who just want to modify
shipped ROMs or someone
else's custom ROMs to their
liking
Those who are confused by all
those scripts and complex
commands required for
building and extracting
This is NOT a tool to
automatically turn you into a
full-fledged ROM developer.
ROM development normally
involves work from the ground
up and involves time , research
and patience .
Click to expand...
Click to collapse
PRESS THANKS IF YOU LIKE MY WORK..
Kitchen setup
setting up dsixda kitchen
1.download all the three link and unzip kitchen.rar and cywin package.
2.open cywin_package then open folder now, you can see 3 icons, a read-
me,a setup, and a folder. Choose
the setup. Here you will choose
install from local directory. Next,
navigate to the the folder of
extraction of cygwin and choose
the folder cygwin_packages inside
the cygwin extraction folder. Wait
for some time. Then, you will come
across a list of file. Click the 2-
circle-arrows,untill, it displays
“install”
after the procedure is complete,
run the batch file cygwin.bat . Now, minimise
it and copy kitchen folder,
keep it in some location where you have installed your cygwin package open home/ajay-pc(in my case this is administrator name of my pc)kitchen
now, open the batch file window
and type
cd c:\kitchen
wait for some time and then when
the location the changed, type
./menu
Click to expand...
Click to collapse
press thanks if you like my work
GUIDE
now minimize the batch file and extract official rom there you will find system.img then extract it using magic iso or flash
the official stock rom using odin the take a nandroid backup u will get system.rfs.tar in your sd card extract it using magic iso then make a folder in called rom and open it. again create a folder called system and copy all data from system.rfs.tar which u have extracted(do drag and dropping).
Now copy meta-inf of any stock rom and copy and kernel to rom folder.
Now you will get two folder and one file in your rom folder zip the folder content and copy the file where you have installed cygwin/home/ajay/kitchen/original update folder.
now open command shell which you have minimized 1st create working folder then add root permission,deodex your rom.
and at last press 99 to build your rom..
note-if it ask you to change updater script to update script change it but dont forget to change it back to updater script.now you will get your rom in output folder copy it to your sd card flash it if error occur unzip the zip file and delete meta-inf and boot.img and again copy meta-inf of any rom and kernel to it and zip it..again flash the rom..
PRESS THANKS IF YOU LIKE MY WORK
DOWNLOADS
Downloads​
Link for cygwin click here :good:​link for kitchen click here :good:​link for magic iso click here :good:​
Link for official firmware click here :good:​
PRESS THANKS IF YOU LIKE MY WORK
CREDIT
DSIXDA for Android Kitchen
Samsung for this awesome device
ME for this Guide

Systemless root step-by-step procedure

Thanks to HypoTurtle for providing the .img files! I used them for this, and please give him thanks too. Here is the link to his post: http://forum.xda-developers.com/remix/remix-os/systemless-root-remixos-64bit-t3368131
Looking for a step-by-step to root the most recent .205 Remix OS? I have tried here to put together a procedure that most can follow. Please let me know how it works for you.
PLEASE REMEMBER THAT MESSING AROUND MIGHT RESULT IN PROBLEMS IF YOU DO NOT FOLLOW INSTRUCTIONS EXACTLY.
This is only for 64 bit. Please note that you MUST type all command line commands Exactly as shown (including spaces and caps)
 First, download and install Remix OS from their website. Go through the complete installation.
 Next, using the Remix Browser, download the following four files:
https://drive.google.com/folderview?id=0B3gcDbDvV4MkVWRxU3pYMzVUWEU
To substitute the new ramdisk.img:
 Open the File Manager twice from the file launcher. You should now have two windows open. You can move them around and resize as needed.
 From one File Manager window, click on the Drive# with your Remix OS folder (Usually it it the bottom drive on the lower left). You will see a Remix OS folder.
 Click on it to open it. Now you should see the files including one named ramdisk.img.
 Click on the ramdisk.img and select Rename from the upper right menu (you should see a check symbol... click on this and then click on the three dots to bring up the Rename command). Rename the ramdisk.img to ramdiskorig.img (this will save it in case you want to accept OTA (just rename ramdisk.img to ramdiskroot.img and rename ramdiskorig.img to ramdisk.img))
 Tap on the Download Folder of the other File Manager window to open it. You should see the four files you downloaded.
 Drag ramdisk.img from Download Folder on the first File Manager window to the Remix OS folder in the other window. You have now replaced the original ramdisk with the "rooted" one.
Now you need to transfer the su.img file into the /data partition:
 Press Alt-F1 to open the command line. You should see a line of text with the # symbol.
 To copy su.imginto /data, at the command line type: cp /data/media/0/Download/su.img /data/su.img and press ENTER. Note the locations of the spaces after cp and img. If you receive no error statement then you did it correctly.
While you are here, you can activate Google Play store:
 type sh /data/media/0/Download/Playenable.sh and press ENTER. You should get an acknowledgement that files are being disabled and enabled.
 Press Alt-F7 to exit the command line
 Reboot your computer again into Remix OS. You should be rooted, and have Play Store if you did everything correctly. Don't be concerned if you have a little trouble getting Play Store to work at first. Just be patient and keep trying. You may need to go to Setup/Accounts and delete and reenter your Google account.
Many users want to have a different launcher from the one in Remix OS. If you wish to use your launcher of choice:
 Download your launcher from Play store
 Press Alt-F1 to open the command line
 Type sh /data/media/0/Download/Launcherenable.sh and press ENTER. You should see an acknowledgement if you did this correctly.
 Now follow these steps to activate the new launcher:
 Press Alt-F1 to exit the command line.
 You will be prompted to select your launcher. You will have to minimize the launcher (in upper right corner) in order to click the prompt. After enabling your launcher, be sure to go to the Settings/Applications and set your launcher to Open in full screen mode.
Set to go! Have fun.
Where is the ramdisk.img?
64bit or 32bit
thanx
c0dex said:
Where is the ramdisk.img?
Click to expand...
Click to collapse
You should see 4 files. Are they there?
Sent from my on Z00A using XDA Labs
deaakl said:
64bit or 32bit
thanx
Click to expand...
Click to collapse
Thanks for the question. 64 bit. I'll update the OP.
Sent from my on Z00A using XDA Labs
lollyjay said:
Thanks for the question. 64 bit. I'll update the OP.
Sent from my on Z00A using XDA Labs
Click to expand...
Click to collapse
worked and solve my problem with usb host controller : (sh: [2]: /data/data/hu.sztupy.android.usbhostcontroller/files/your_binary: permission denied)
thanx
deaakl said:
worked and solve my problem with usb host controller : (sh: [2]: /data/data/hu.sztupy.android.usbhostcontroller/files/your_binary: permission denied)
thanx
Click to expand...
Click to collapse
Good to hear.
hi I just modified the op to make the root process easier.
Sent from my LENOVO 33476WU using XDA Labs
Hi, with this root method, cannot edit init.sh?
RoboR1 said:
Hi, with this root method, cannot edit init.sh?
Click to expand...
Click to collapse
Not directly without also replacing initrd.img to mount /system rw (and break OTA).
Fairly sure these are my unaltered files so there are other options.
1. You could add a su.d script into /su/su.d to do what you need
2. I added a script that mounts files from /su/vendor/ over /system so - /su/vendor/etc/init.sh would be /system/etc/init.sh (not sure if it's there by default - if you add the path to /su/systemfiles.txt it will be)
ok thank you.

Help! Need to go back to stock!

Please Help!
I did something very stupid today.
Unlocked my RMX2170, got into fastboot.
Tried to flash PBRP as recovery, and some vbmeta.img image as vbmeta of my phone.
Disaster! My phone got stuck in a bootloop of just repeatedly booting into fastboot.
No recovery, nothing.
From there, I installed SHRP using the fasboot flash recovery command, and now I have SHRP.
SHRP, however, cannot flash ANYTHING as a result of an error that it "failed to mount /system_root and /vendor"
The phone can effectively boot into Qualcomm EDL and fastboot.
I've tried countless tools and software to get back to stock. Nothing works. MSM requires a login to function, so it won't work.
Anyone at all, please, can you tell me how to get back to FULL stock?
Through sheer trial and error,
Procedure:
1. Downloaded A37 ofp file from www.gsmmafia.com/realme-7-pro-rmx2170-flash-file/ (or mediafire download)
2. Extracted it using bkerler/oppo_decrypt's ofp_qc_extract.py into a folder:
Code:
py -3 -m pip install -r requirements.txt
py -3 ofp_qc_extract.py a37_ofp_file.ofp .\extracted
3. Rebooted the phone into fastboot, ready for flashing (Power + Volume Down for me)
5. Ran:
Code:
fastboot flash vbmeta vbmeta.img
fastboot flash vbmeta_system vbmeta_system.img
fastboot flash vbmeta_vendor vbmeta_vendor.img
fastboot flash super super.img
fastboot flash boot boot.img
(keep in mind these .img files came from the extracted ofp's folder!)
6. Rebooted into system using the fastboot menu (START)
7. I'm pretty sure my phone ran A41 before today... so I gave the phone an update from inside Android, that seemed to work fine.
As a bonus, my bootloader seems to have remained unlocked? Nice!
Also interesting: holding volume up does not boot into recovery. This is an issue for another day lads.
Can you explain me step 2? I have bootloped phone and I don't understand how to use oppo decrypt
Domac5 said:
Can you explain me step 2? I have bootloped phone and I don't understand how to use oppo decrypt
Click to expand...
Click to collapse
1. Download and install Python on your computer.
2. Press Windows + R, then type cmd, hit enter to access a terminal.
3. Make sure Python works by trying py -3 in the terminal. (Type exit() to exit the Python shell)
4. Download oppo_decrypt's repository zip and extract it in a folder anywhere.
5. Use cd in the terminal to navigate to the extracted folder.
6. Run this command to install the dependencies of oppo_decrypt:
Bash:
py -3 -m pip install -r requirements.txt
7. You should have already downloaded the ofp file for the phone. If not, get it from here.
8. You need to run the Python script in order to extract the images you need, so, you should copy it to the folder where your ofp file is.
Bash:
cp ofp_qc_decrypt.py /where/the/ofp/file/is/ofp_qc_decrypt.py
9. Go into the directory with the script and ofp file, and extract it.
Bash:
py -3 ofp_qc_extract.py the_ofp_file.ofp .\extracted
The extracted images you need, if you were on Android 10, should be in the extracted folder in the terminal's working directory.
Best of luck, although I can't really help you step-by-step for everything, so I suggest you visit r/realme's Discord.
Go to the Discord for more help!
Codian said:
1. Download and install Python on your computer.
2. Press Windows + R, then type cmd, hit enter to access a terminal.
3. Make sure Python works by trying py -3 in the terminal. (Type exit() to exit the Python shell)
4. Download oppo_decrypt's repository zip and extract it in a folder anywhere.
5. Use cd in the terminal to navigate to the extracted folder.
6. Run this command to install the dependencies of oppo_decrypt:
Bash:
py -3 -m pip install -r requirements.txt
7. You should have already downloaded the ofp file for the phone. If not, get it from here.
8. You need to run the Python script in order to extract the images you need, so, you should copy it to the folder where your ofp file is.
Bash:
cp ofp_qc_decrypt.py /where/the/ofp/file/is/ofp_qc_decrypt.py
9. Go into the directory with the script and ofp file, and extract it.
Bash:
py -3 ofp_qc_extract.py the_ofp_file.ofp .\extracted
The extracted images you need, if you were on Android 10, should be in the extracted folder in the terminal's working directory.
Best of luck, although I can't really help you step-by-step for everything, so I suggest you visit r/realme's Discord.
Go to the Discord for more help!
Click to expand...
Click to collapse
Step 8 not working for me
Do you have original recovery.img file,please send me? I just can't extract it from ofp file, 2 days trying and just can't
Domac5 said:
Step 8 not working for me
Click to expand...
Click to collapse
Sorry, instead of "cp" the command is "copy", my mistake.
Domac5 said:
Do you have original recovery.img file,please send me? I just can't extract it from ofp file, 2 days trying and just can't
Click to expand...
Click to collapse
You can't flash recovery.img. It won't work, I tried. You need to re-flash all of the system partitions like in my post.
I don't have the files anymore, as I did this a while ago. Sorry.
Codian said:
Sorry, instead of "cp" the command is "copy", my mistake.
Click to expand...
Click to collapse
Still doesnt work
I did it, problem was in python3 comand, that one should be typed without number 3 because that doesn't work in windows. Now it's extracting
did you had these problem?

Categories

Resources