How to save current partitions to flashable fastboot image? - Huawei Ascend P7

In order to avoid future problems, I would like to save partitions to images that could be flashed by fastboot.
Does someone know how to do it?

Related

[Q] Is there a guide for nvflash to flash IMG?

Hi I have an LG Optimus 2x SU660 and I am having a problem on upgrading it.
It don't have a adb boot-loader so I can flash IMG files to it.
Is there a guide so I can flash IMG files using nvflash? Or some one who know how to do it.
Thanks.
It is possible to use fastboot, but it's more awkward than other phones.
The thing with NVFlash is you need to be sure of your partition layout, NVFlash uses a number to identify which partition to write the .img too, if you don't know what the numbers are, you'll have some difficulty.
Thank you. I am also unable to access the fastboot.
I think its because I used LG-P993 rom that is compatible with SU660.
Never heard of the P993 before, but looked it up and it appears to be another variant of the Optimus 2X. Great, that'll confuse people.
To use fastboot you have to wipe your boot partition, if you have to ask, then I don't recommend it.
What might be best is if you can get someone to make a NAND backup of a stock SU660 and then you restore it.
Can you still get into (custom) recovery? If so then I don't see why you couldn't DD the image files, you can get the partition layout from /etc/recovery.fstab
I am now stuck again on fastboot. any fix can you recommend?
Oh bloody hell, what have you gone and done?
If (as I'm assuming) you've got into fastboot, then the best thing you can do is get a recovery.img and use: fastboot boot recovery.img, at which point you can flash something.
Did fastboot flash recovery c:/recovery.img but still it won't boot.
Don't worry because I can return it to its original state by flashing the old nvflash rom.
Of course it wont boot, you've wiped your boot partition remember
You will now have to tell it to boot from something, so as above, try: fastboot boot c:\recovery.img and you should be in recovery. Now from there you can flash a .zip (which will replace your missing boot partition) or restore a backup.
OR
If you have the right bootimage handy, you can use fastboot boot c:\boot.img and the phone will fire up, after that you need to use DD to permantly install the boot image you booted.
That you do from ADB shell or the terminal: dd if=/sdcard/boot.img of=/dev/block/mmcblk0pX (where X is the boot partition)
what is dd?
---------- Post added at 06:43 PM ---------- Previous post was at 06:42 PM ----------
Sir may i requrest for your YM id?
If I knew what a YM ID was I'd tell you lol
dd is basically a *nix copy command, did you not use it to wipe the boot partition?
Yahoo Messenger Id.
No sir.
Oooh there's something I've not used in a while!
[email protected]

Partition files for 24a

I was able to extract the partition files from the 24A kdz file and figured I'd post them for anyone that needs access to them (especially those that are stuck in fastboot mode). These are all the partition files except for system and userdata.
http://goo.gl/bLLmse
Thanks for this. Doesn't hurt to have as a backup.

[Q] How to properly make a total backup of your current ROM

I have a very decent working ROM at the moment (4.4.4 rooted xposed gravitybox etc.) and I'm not sure I can live with Lollipop without al those tweaks. So before upgrading to Lollipop (whenever that may be), I want to make a decent backup of my current ROM.
Normally I would do this with TWRP, but the backup doesn't seem to work at the moment. And there doesn't seem to be a properly working version of TWRP.
So how do I make a proper backup of my ROM?
Adb?
A confirmed working version of TWRP?
CWM?
Another?
Jeltel said:
I have a very decent working ROM at the moment (4.4.4 rooted xposed gravitybox etc.) and I'm not sure I can live with Lollipop without al those tweaks. So before upgrading to Lollipop (whenever that may be), I want to make a decent backup of my current ROM.
Normally I would do this with TWRP, but the backup doesn't seem to work at the moment. And there doesn't seem to be a properly working version of TWRP.
So how do I make a proper backup of my ROM?
Adb?
A confirmed working version of TWRP?
CWM?
Another?
Click to expand...
Click to collapse
You can use standard tools installed on the phone to dump your partitions. See here for a rundown. I'd recommend backing up /boot, /recovery, /system, /pds, /modem and /fsg.
Ah yes, that's what I was looking for. Thanks
When I restore the mentioned items, will I get back my old installation? Or should I backup more? i.e. userdata for example?
And how to restore all these items? (I know to flash the boot, recovery and system.img via adb).
Yeah, you'd need to backup the data partition too, if you want to keep settings and user data. Remember, dd produces a 1:1 copy of the partition... I prefer to backup personal data selectively. The quick way to do it is by using a backup app: Most use Titanium Backup, but I find Chainfire's Helium does the job well, too. The other way is to use the built-in 'backup' command directly to select a range of files to save (i.e. 'adb backup')...
The partition images can be restored from adb using the reverse version of the command you used to make to the backup, i.e. use dd but with the 'if' and 'of' parameters switched:
Code:
dd if=/path/to/source.img of=/path/to/block/device
Be careful though; if you write the wrong image to the wrong partition, you can damage -- or even hose -- your software environment.
In the case of most partitions, restoring images should be done whilst booted into recovery for safety reasons, rather than overwriting a filesystem whilst it is mounted and in use. If you have the stock recovery installed, you can temporarily boot into TWRP or CWM recovery from a recovery image stored on your computer (i.e. 'adb boot /path/to/recovery.img') and then enable adb from within the custom recovery environment. Then you just use 'adb shell', followed by the 'su' command to switch to the root user account.
For the same reason, you should write the recovery partition backup back to disk from adb within the normal android environment. Again, you must do this after switching to the root user account by issuing the 'su' comand.
Alternatively, you should be able to write all the images from fastboot mode (i.e. 'adb reboot lootloader'). For example:
Code:
adb fastboot flash recovery recovery.img
AFAIK, fastboot will accept standard images created with dd, but I have never tried it on a Moto G, so YMMV... Maybe someone else would care to comment on this?

[Q] Creating Backup: motoboot.img & gpt.bin from another Firmware? Nextel Mex XT1064

[Q] Creating Backup: motoboot.img & gpt.bin from another Firmware? Nextel Mex XT1064
Hi everyone! I need your help! I'm dumping the Firmware of my XT1064 Nextel México to share it with everyone in the community. I dumped almost all the partitions of my device, excluding "motoboot" (In another firmwares Dumps is motoboot.img) which I can not find it, and the "system" partition, which I can not flash it in the device because the file (system.img) is too big and I don't know how to divide it. Finally, I want to know if I can use the motoboot.bin and the gpt.bin from another firmware like the XT1064 Retail from USA.
Sorry for my bad english! I hope someone can help me!
Here I put the files I've already uploaded! USE AT YOUR OWN RISK!
https://mega.co.nz/#F!VMQHFJxB!7aSAkqkYI1SX7GI_S5yItw
USE AT YOUR OWN RISK! YOU MUST HAVE UNLOCKED BOOTLOADER
How-to:
-Copy all the files from the IMG's And BIN folder and the TWRP Recovery "twrp-2.8.3.0-titan.img" to your "platform-tools" folder
-Copy the TWRP Backup to your SD Card Backup's folder
Enter to fastboot in your device and run this commands in order (I exclude "fastboot flash partition gpt.bin" and
"fastboot flash motoboot motoboot.img")
fastboot flash logo logo.bin <--- From Retail US Firmware
fastboot flash boot boot.img <--- From XT1064 Nextel México
fastboot flash recovery twrp-2.8.3.0-titan.img <--- Flash TWRP Recovery include in the Link
-Enter to TWRP Recovery using your device, Wipe System/Data/Cache and Restore the System Partition from the Backup.
-Power Off the Device and enter to Fastboot again.
fastboot flash recovery recovery.img <--- Original Recovery from Retail US Firmware
fastboot flash modem NON-HLOS.bin <--- Modem from XT1064 Nextel México
fastboot erase modemst1
fastboot erase modemst2
fastboot flash fsg fsg.mbn <--- From XT1064 Nextel México
fastboot erase cache
fastboot erase userdata
ejsmsupersoyelm said:
Hi everyone! I need your help! I'm dumping the Firmware of my XT1064 Nextel México to share it with everyone in the community. I dumped almost all the partitions of my device, excluding "motoboot" (In another firmwares Dumps is motoboot.img) which I can not find it, and the "system" partition, which I can not flash it in the device because the file (system.img) is too big and I don't know how to divide it. Finally, I want to know if I can use the motoboot.bin and the gpt.bin from another firmware like the XT1064 Retail from USA.
Click to expand...
Click to collapse
Ok Lets just say this clearly 'STOP NOW' CALM DOWN AND LEARN A BIT MORE...... flashing images can and will brick your phone.
'I've dumped all most all the partitions of my device' -- Not really you have made TWPR backup of your Android Partitions (there are many more hidden partitions) some common android partitions are /boot /cache /data /system /recovery. these are the ones normally backed up with TWRP etc. A basic TWRP flashable custom rom can be made of as little as (boot.img, system folder and a META-INFO folder ) zipped up
You are mixing and matching 2 separate Flashing Methods - yes it can be done, but it can Also go badly wrong.
motoboot.img is your bootloader IT IS NOT the same as boot.img
forget flashing anything with fastboot or mfastboot untill you learn more. stick to TWRP backups (full all partitions for you. and just boot and system to share)
you can only upgrade (at moment) your gpt.bin and motoboot.img - so just leave them as they are.
reefuge said:
Ok Lets just say this clearly 'STOP NOW' CALM DOWN AND LEARN A BIT MORE...... flashing images can and will brick your phone.
'I've dumped all most all the partitions of my device' -- Not really you have made TWPR backup of your Android Partitions (there are many more hidden partitions) some common android partitions are /boot /cache /data /system /recovery. these are the ones normally backed up with TWRP etc. A basic TWRP flashable custom rom can be made of as little as (boot.img, system folder and a META-INFO folder ) zipped up
You are mixing and matching 2 separate Flashing Methods - yes it can be done, but it can Also go badly wrong.
motoboot.img is your bootloader IT IS NOT the same as boot.img
forget flashing anything with fastboot or mfastboot untill you learn more. stick to TWRP backups (full all partitions for you. and just boot and system to share)
you can only upgrade (at moment) your gpt.bin and motoboot.img - so just leave them as they are.
Click to expand...
Click to collapse
Yes, I learned a lot in another devices, I'm just Asking if I can use motoboot.img (Bootloader) and the gpt.bin of another variant of my phone... I made a Backup of all the partitions included in the Factory Firmware Images of another Variants (In specific, the Xt1064 from USA and the one of Canada. and the Xt1063 Retail... I don't know if you have checked all the files that I upload, but all dumps that I did are from the ADB method, it's universal, works with every device... I tested all the dumps (fsg.mbn, boot.img, logo.bin, NON-HLOS.bin, recovery.img) in my device and it worked, except the system.img dump, because is too big, And I had the idea of adding the step of the Custom Recovery just to flash System... and then, continue with all the remaining partitions...
ejsmsupersoyelm said:
Yes, I learned a lot in another devices, I'm just Asking if I can use motoboot.img (Bootloader) and the gpt.bin of another variant of my phone... I made a Backup of all the partitions included in the Factory Firmware Images of another Variants (In specific, the Xt1064 from USA and the one of Canada. and the Xt1063 Retail... I don't know if you have checked all the files that I upload, but all dumps that I did are from the ADB method, it's universal, works with every device... I tested all the dumps (fsg.mbn, boot.img, logo.bin, NON-HLOS.bin, recovery.img) in my device and it worked, except the system.img dump, because is too big, And I had the idea of adding the step of the Custom Recovery just to flash System... and then, continue with all the remaining partitions...
Click to expand...
Click to collapse
It's hard to say but motoboot.img and gpt.bin it's normally a one way upgrade only, if you flash newest, it can be hard to go back. Yes the should flash but you wont gain much and may lose OTA updates in future.
So there is no need to flash these for restoring TWRP back ups, I strongly suggest you leave yours alone.
ADB flashing really is just for OTA upgrades and using to get a custom recovery on phone, once you have a custom recovery you can make custom roms to flash from that.
Adb flashes system from OTA as 4 parts that combine into /system folder - so thats why you cant flash 1 big img via adb
again you need to learn how to make a flashable custom rom to use via TWRP, look for a guide there are many.
but i will give you a idea how to do
using your xt1064 mexcio TWRP back up - ALL you need for now is Boot.emmc.win and system.ext4.win nothing else
rename boot.emmc.win to boot.img and change system.ext4.win to system.ext4.tar and find a guide on how to extract the tar to a system folder ( I use cygwin )
then take a meta-info folder from a custom xt1064 rom and adjust the updater-script to work with your rom - zip these 3 files up into your new custom rom.
this is a very simple idea, there are more steps so search for a guide on here
I just need the motoboot.img file, would provide for me?

Install stock rom via fastboot - what files to install?

Hi all, I want to clean install stock rom via fastboot. I used to do this on my oneplus one a while back. I think that I need to install img files to five partitions (boot.img, recovery.img, system.img, userdata.img and cache.img). Are there any other files that need to installed (eg bin or mbn files)?
I think I should be able to get the img files by unzipping the stock rom files. Has anyone tried to get the img files from unzipped stock rom and install via fastboot?
Any help is greatly appreciated.
Thanks
Don't know exactly, but also interested to learn about this!
OnePlus does not provide fastboot flashable roms, the only way to get them would be to update uusing the recovery first and extracting the .img files afterwards, but then you don't need them anymore since you are already upgraded.
Jo_Jo_2000 said:
OnePlus does not provide fastboot flashable roms, the only way to get them would be to update uusing the recovery first and extracting the .img files afterwards, but then you don't need them anymore since you are already upgraded.
Click to expand...
Click to collapse
The system.new.dat format is not unique to oneplus, but the standard for flashable android zips since version 6 (aka marshmellow). The system.new.dat, system.patch.dat and system.transfare.list are build from system.img while building a rom (aka compile rom from source). This process is NOT unidirectional; you can easily revert it. I'm on linux, so you have to google, how this is accomblished on win or darwin. For linux users:
https://github.com/xpirt/sdat2img

Categories

Resources