How to flash only stock recovery? how to convert "recovery.img.lz4" to "recovery.tar" - Android Q&A, Help & Troubleshooting

How to flash only stock recovery? how to convert "recovery.img.lz4" to "recovery.tar"
Hi all,
I am fairly newb in installing custom ROMs, so apologies if Im misusing any terms. Some time ago I wanted to move a priv-app to system-app, without rooting. I managed to flash TWRP on my Samsung S8 G-950F, and from there moved private app to system app.
Now I would like to go back to the stock recovery img, but I don't know how or if it's even possible. The reason behind this is that my company is deploying Android Work Profile and it is detecting the custom ROM (I assume it is specifically detecting the custom recovery partition)
I tried to find the respective recovery.img for my current stock ROM, but was unable to find it. I can only find for older versions, and from what I read, you can't install older recovery with newer ROM
I can only find the full stock ROM, in .tar.md5 format. opening this with 7zip, I can see the recovery.img.lz4
How do I flash this without altering the OS partition?
Thank you in advance,
Rhaswar

@Rhaswar
Look inside here.

thank you @jwoegerbauer, I have seen this article and it mentions a file called recovery.tar
I don't have that, what I have is the recovery.img.lz4
Is there a conversion that can be done?
Thank you

@Rhaswar
Watch this video: https://www.youtube.com/watch?v=OfrMo1_Rgxc

Related

ROMs dont have an update.zip

Hey Guys,
I'm in need of some really n00b friendly advice.
When you flash a new ROM (i.e. CM9) in CWM the tutorials tell you to flash the file named Update.zip. My problem is that I can't seem to find one in the zip file I downloaded for my xperia mini.
I downloaded FXP131, and found the zip file to contain a boot.img, which will be the kernel. And 2 other folders named META-INF and System.
I know how to flash the kernel and expect it was just left in there for easy transportation.
But where in the world is 'update.zip'?
Am I meant to unpackage the kernel then re-zip the META-INF and System folder and then call that 'Update.zip'?
I've flashed roms for some of my other devices before, but they've always used flashtool or samsungs flashtool.
Please help me guys, I don't like sounding this inexperienced
update.zip
I'm wondering if the ROM I am trying to flash needs to be renamed as update.zip in order to work. It is krook's v.6 of JB for the Lenovo K1 tablet. Since the download site has to distinguish between wifi and 3G versions, as well as nvflash versions there are a number of different filenames, however does it need to be renamed after putting it on my SD card?
Generally speaking "update.zip" is used as a generic name. For example the update.zip I just flashed is actually named "rascarlo_maguro_ota_2012-11-01.zip". When you flash a custom ROM in a custom recovery you should be able to browse & flash whichever file you need.
The FXP131.zip file that contains the boot.img and 2 other folders named META-INF and System is the "update.zip"
solved
My problem was an incomplete download. I compared file sizes, and checked md5sums and determined the correct ROM and it is now in the middle of finishing the upgrade/optimization process.
Thx

Disabling secure boot

firstly i request all moderators of xda in grand 2 forum,
as i am unable to post on developement section,
i am posting the thread here..
plz move it to developement section.
ok now back to topic,
try at your own risk!
i will not be responsible if anything happens to your phone
To all the users who have succesfully rooted grand 2,
there can be a way to install (flash) recovery on your phone!
i was exploring the system and i found a file in "/system" folder
called "recovery-from-boot.p"
i THINK this is the file that causes problem!
you may delete it or rename it...(renaming is safer)
once you delete it, you may flash custom recovery via ODIN
and even if the recovery gets currupted or if you cant boot into recovery, you can simply boot normally and restore the renamed or deleted file!!!
and then once again you may try to flash custom recovery from ODIN (as stock gets deleted as soon as you modify recovery-from-boot.p file)
press thanks if this post helped!
dindt find any file like u wrote.... plss provide specific path.. so we can try
Rakesh251 said:
dindt find any file like u wrote.... plss provide specific path.. so we can try
Click to expand...
Click to collapse
Its located here:
bro no such file is available.. this wont help to solve .and still custom recovery not available for grand2
how would u know that it won't help..
i only post threads as i know what i am doing.
the file which i uploaded up there is taken from MY PHONE ITSELF i.e galaxy GRAND 2..
and That FILE (recovery-from-boot.p) IS present on my phone and i m using Stock rom and not any other rom..
Same with me... none of them named exactly like you mention above.
Sent from my SM-G7102 using XDA Premium 4 mobile app
it only appears on a Stock UN-ROOTED firmware..
In order to inject custom CWM there isnt a necessity to root device.
so firstly we need to remove file that I mentioned in my previous post and inject recovery.
and via that recovery,
we can flash a custom kernel that automatically roots device!
vrushabh sutar said:
it only appears on a Stock UN-ROOTED firmware..
In order to inject custom CWM there isnt a necessity to root device.
so firstly we need to remove file that I mentioned in my previous post and inject recovery.
and via that recovery,
we can flash a custom kernel that automatically roots device!
Click to expand...
Click to collapse
Dude, if the FILE just appears in STOCK UNROOTED FIRMWARE , so how can we delete that.
Coz, to delete a /system file, we need ROOT access.
NOT POSSIBLE.
And in rooted version, the FILE is not available :victory:
00hacktheworld00 said:
Dude, if the FILE just appears in STOCK UNROOTED FIRMWARE , so how can we delete that.
Coz, to delete a /system file, we need ROOT access.
NOT POSSIBLE.
And in rooted version, the FILE is not available :victory:
Click to expand...
Click to collapse
Thank you for replying.
I know that it can't be deleted,
but one may understand the importance of that ".p" file and understand its working, as it plays a vital role in booting up recovery...
the only thing I wanna let users understand is that,
stock recovery includes that file and
it got deleted when rooted because the rooting package (eg. CF root) didnt contain the .p file
when I studied that strange file,
it consisted of mapping and accurate memory address as well as accurate size of stock recovery image in bytes,
so that whn new recovery gets flashed, it verifies with the .p file!
and talking abt modifying the .p file,
we must create a custom linux binary with zerglings and packed into .tar file which gets flashed to phone via Odin!
for build creation you can use this tool..
http://www.xda-developers.com/android/comprehensive-guide-to-the-android-build-process/?__utma=60652090.747738090.1398670920.1400078979.1400132113.21&__utmb=60652090.0.10.1400132113&__utmc=60652090&__utmx=-&__utmz=60652090.1400132113.21.12.utmcsr=google|utmccn=%28organic%29|utmcmd=organic|utmctr=%28not%20provided%29&__utmv=-&__utmk=163283131
So I found the reason behind this
It is a file used by Software Update Application to flash updates.
If you want proof go-to the data folder of the SOFTWARE UPDATER and there will be a 3mb file. Copy it to pc and open using winrar. You can see many files including boot.img.
So the author of this thread was about to update his/her phone when he found the file :thumbdown:
SO MYSTERY SOLVED
SCOOBY DOOBY DOOO
Sent from my SM-G7102
i didnt't get what you are on to...
i noticed that the Update Package (i.e the OTA) easily jumps over all the restrictions imposed by Bootloader(locked one) and gets easily flashed to the phone...
therefore the whole matter is now pointing out to the 'ro.build.fingerprint' as well as Verification of MD5 hashes linked directly to Flashing InstructionSet

[Q] create flashable zip from rom dump?

DEVICE: LG REVOLUTION (VS910V6)
MY RECOVERY PARTITION IS GONE, BUT I DID FIND A ROM DUMP OF THE SHIPPING ROM FOR MY DEVICE. ITS A ZIP FILE. IS THERE SOME WAY THAT I CAN SOMEHOW CREATE A FLASHABLE ZIP FROM THE DUMP FILE TO BE ABLE TO FIX MY PHONE? MY PHONE IS PRETTY OLD. I HAVE TRACKED DOWN A HANDFUL OF DIFFERENT FILES FOR MY PHONE AND I WOULD HAVE FLASHED ANY OF THE OTHER POSSIBILITIES OF COMPATIBLE ROMS, FACTORY FIRMWARE, ETC. THE PROBLEM WITH THAT IS FOR EVERY FILE I FOUND THE DOWNLOAD LINK FOR, IT'S OUTDATED AND DOENS'T WORK ANYMORE. SO I'M HOPING THERE MIGHT BE A POSSIBILITY GOING THIS ROUTE.....? ANY SUGGESTIONS WOULD SURELY BE APPRECIATED!! :fingers-crossed:

[Q] Cube U27GT - Help with Rooting a Stock Rom and can we get a forum?

Dear Admins,
Could we get a forum setup for the Cube U27GT WiFi version? I dug around on the site a bit beforehand but didn't see one, I apologize if I missed it and please direct me there if I did.
I have this tablet and I am doing some initial basic firmware development for it and want a proper place to start putting threads.
Dear Dev Community,
I can't root this bloody thing... At least, not the rom itself. Let me explain...
I can flash the stock rom from Cube and that can be rooted using Kango Root. --Fine...
However, I can't figure out how to replicate this when I make my own rom.
Thus far, here is what I have attempted...
1. Setup dsixda's excellent kitchen on my Ubuntu workstation.
2. Unpack the rom, clean things up, manually put the boot image into the dsixda unpacked working rom folder, run dsixda's root functionality (which add SU binary to xbin and SuperSu apk file to app folder as well as do some things with the boot image file).
3. Rather than using repack with Dsixda (which makes an update.zip image which I can't use because the stock recovery environment on this device can't flash zip update files and I can't for the life of me figure out how to get and or make a working CWM or TWRP recovery image for this unit)...
4. What I do is I run commands in linux to unpack the stock rom to another directory and mount that directory, then clear out a bunch of folders and then manually copy in my files from dsixda's working folder, then repackage up my unpacked stock rom into a new system.img file.
5. Then copy my now modified boot image, system image, and also userdata image (I modify that as well as that is where most all of the chinese bloatware is loaded from) to my SP_Flash_Tool, generate new checksum.ini file and flash normally...
What I get as a result...
1. As long as I am really careful with how I copy files into my new image, the new system flashes okay (if I am not careful, after flash USB storage for some reason has a format error and the system will boot but can't mount USB storage and other odd issues ensue as a result).
2. Assuming everything flashes okay, and no issue with USB storage partition, I have SuperSU installed and when I go to use an app (ES File Explorer or Root Checker) that require's root, I do get the prompt. However none of the root functions actually work and Root Checker tells me I am not rooted.
That is as far as I have got. So as a result, I have a really nice, westernized, cleaned up rom but with no root.
Anyone have any ideas?
This is my first adventure into mod'ing MTK roms so I am sure I am doing all kinds of things wrong . I had a good bit of experience on Rockchip SoC's before this though.
Kind regards and thanks in advance!
Roman
Figured it out!
So I finally did the following rather hackish work-around...
1. Flash stock firmware...
2. Root with Kingo Root
3. Enabled ADB
4. Attach to PC and fire up MTK Droid Tools
5. Take a full backup
6. Modify the system image from the backup and make changes
7. Put that in new firmware flash package
8. Flash new firmware
YAY - Cleaned up rom, modified, with root!
Once I get it all packaged up and uploaded to mtkfirmware.com I will post a link for anyone that wants a cleaned up rom with root!
The only downfall of the above method is that it absolutely requires that the developer have a device on hand because you can't just root the stock image file (at least, I couldn't figure out how... - bleh...
Kind Regards,
Roman
Dear roman,
Thanks for your hard work.
I have a simple question (I think) and if you have the time to reply or -any other android guru- I would be thankful.
My later issue was with a U27GT cube tablet, but I have others, one for each kid, and this is more of general question.
I am reading this and other forums about how to flash tablets from PC. My question is:
Can the flashing process be done from a SD card?
Thanks a lot and regards,
Fernando
SKorea

How to create flashable zip from system.img?

I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Just off the subject slightly...but Eliminater74 already has a flashable zip (thought TWRP) for the 20J release. Its a 2 Part System.
Eliminator74's zip is modified. I want to take a 100% pure stock system.img (extracted from stock firmware) and put it into a zip that can be flashed in TWRP. When I say stock, that's what I mean. No root, no Xposed, no BusyBox, nothing. This has already been done for Lollipop on the v10, but I have MM. I have already explained why I want to do this. I'm currently looking into whether Superr's Kitchen can accomplish this.
He has a Fully Stock 20J release..just gotta read the thread..
AnonVendetta said:
I have a system.img file, which I extracted from a 20J KDZ. I would now like to convert it into a flashable zip. I have 2 reasons for this. One, I dont want to have to use LGUP to revert my phone to a 100% stock system. It is much easier to just flash a zip of the system partition. Two, I would like to get into modding and ROM development. I believe that it is best to start from pure stock and make changes from there, instead of basing your work off of something that someone else has already modded.
I found these threads but they're a bit old (Lollipop):
1. http://forum.xda-developers.com/lg-v10/development/lg-h901-stock-img-files-boot-recovery-t3238638
2. http://forum.xda-developers.com/tmobile-lg-v10/development/lg-h901-stock-images-device-restore-t3241170
In one of them a member provided img's for recovery, boot, and system. In the other thread flashable zips of these img's were posted. These are for the Tmo v10. So it's not a matter of whether it can be done, but how. What tools are needed?
I downloaded the zip from one of the aforementioned threads, deleted the boot.img, replaced his system.img with mine, edited updater-script, and zipped up the meta-inf and system.img files with 7zip. I also checked to be sure that the block to be flashed was correct, it is the same (even though my img is for MM). I tried flashing with TWRP, I immediately get an error code 6.
What should I do?
Click to expand...
Click to collapse
What tool did you use to extract the KDZ? I am trying to get a stock boot.img for the H901J build and I cannot seem to find it. I used the WindowsLGFirmwareExtract 1.2.5.0 release and all I see are a ton of .bin files and system.img. Is boot.img inside system.img?
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
AnonVendetta said:
@Sippi4x4man: I also used WindowsLGFirmwareExtract. Inside the KDZ there is a DZ and DLL file. Just extract the DZ, then you see lots of BINs. The system.img is split up (since it's around 4GB alone), but the tool can combine the pieces into one file. I was able to figure out how to manually flash the IMG, by running a dd command with TWRP's terminal emulator.
dd if=/external_sd/system.img of=/dev/block/platform/f9824900.sdhci/by-name/system
It takes a few minutes to finish, followed by a message that says no more space is available (I guess /system got filled up). I think when you dd anything you are copying both free and used space, since an IMG is usually just a (sometimes raw) disk image. TWRP will also initially say that no system is installed, I just ignored it, the device boots fine, everything is pure stock, no issues at all. System is mountable after subsequent boots into recovery. I used Magisk and the phh Superuser Magisk module to gain root without modding system partition, and the Magisk version of Xposed. But I would still like to create a flashable zip to automate this. If I figure it out I don't mind uploading it so the community can benefit.
As for the stock boot.img, I would imagine that the boot.bin inside the DZ is probably what you're after. The file size seems about right. However, I tried renaming boot.bin to boot.img and flashing from TWRP. Device wouldn't boot. So maybe there is some other conversion process that needs to be done. I can't think of any other way to obtain a pure stock boot image, extracting it from stock firmware seems like a sure way. If you ever figure it out then please provide a copy. Make sure it isn't patched by SuperSU, Xposed, Magisk, etc. I could maybe merge it into a stock zip.
Click to expand...
Click to collapse
It's been a while from this post... But I'm looking after the same goal you were and got the same error 6 trying the same things you described in your previous posts. Despite of these long 4 years, let me try: did you finally achieve to make the flashable zip with system.img?
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
AnonVendetta said:
I do not own an LG V10 anymore.....it is the most garbage phone I've ever had.
I now use SuperR's Kitchen to create flashable zip from system.img. Works like a charm every time. Downside is that you need a PC to use it. It works for all phones (but you must also have an unlocked bootloader and custom recovery, or you will not be able to flash the zip). There are both free and donate versions, both will work fine.
Click to expand...
Click to collapse
Thank you for your reply. My device is Lenovo Z6 Pro but I thought this wouldn't make a difference.
Just to be sure, what you get with SuperR's Kitchen is a zip including system.img file and not the /system folder, right? Thank you in advance.
Edit: I had tried with other kitchen softwares with no success but SuperR's Kitchen did the job as you said, like a charm. Tons of thanks.
@descarao81: No, SuperR's Kitchen does not include system.img/boot.img, you must provide them yourself. They are device-specific. And system.img is a very large file, so it cannot reasonably be included in the Kitchen zip.
Yeah, maybe I wasn't clear, I meant if the resultant zip would include those raw image files being the original image files provided by the user. It's clear now. Thank you.
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Upytry2 said:
Here is how to do it...
1. Go to:
https://forum.xda-developers.com/tm.../lg-h901-stock-images-device-restore-t3241170
Download from the link he provided.
2. Extract the .zip file that you downloaded.
3. Make a new folder called "rom"
4. Copy the META-INF folder from the folder you extracted and place it into the "rom" folder.
5. Download any other flashable rom for your device. Extract it.
6. Go to {EXTRACTED_FLASHABLE_ROM}\META-INF\com\google\android\update-binary in your flashable extracted rom folder. Copy the "update-binary" . Got to the "rom" folder and go to META-INF\com\google\android. Delete the update-binary there and replace it with the one you have copied.
7. Now copy the boot.img from the other rom that is for your device. And place it into the "rom" folder.
8. Now Finally Compress the all the files.
9. Now you will have a flashable system.img.
10. Go to TWRP and flash the .zip that you have just made!
Click to expand...
Click to collapse
Trying that exactly when im home! Thank you!

Categories

Resources