What would happen if I use dd to flash updates? - Moto E5 Questions & Answers

I'm wondering what could happen if I just use dd out of recovery to flash all the partition files from my firmware package?

Related

Restoring

First off....Everything is fine with my phone. I am not rooted using the update that was released. I was rooted at one time before the update and I made a dd backup image after root but before I made any changes. I also dumped the /system using adb pull.
I can use dd and fastboot with my android tablet to backup and restore images. Can we do the same here if someone is bricked? On my Droid 3 I backed up using
dd if=/dev/block/system of=/mnt/sdcard/system.img after I rooted.
On my tablet I can
fastboot image system system.img using images that I make for the tablet.
to restore a system image. Anyone know if that will work here with the droid 3 image that I created from my droid 3? Any bricked person try it?
betolley said:
First off....Everything is fine with my phone. I am not rooted using the update that was released. I was rooted at one time before the update and I made a dd backup image after root but before I made any changes. I also dumped the /system using adb pull.
I can use dd and fastboot with my android tablet to backup and restore images. Can we do the same here if someone is bricked? On my Droid 3 I backed up using
dd if=/dev/block/system of=/mnt/sdcard/system.img after I rooted.
On my tablet I can
fastboot image system system.img using images that I make for the tablet.
to restore a system image. Anyone know if that will work here with the droid 3 image that I created from my droid 3? Any bricked person try it?
Click to expand...
Click to collapse
I think anything you flash to your phone has to be signed by motorola and your provider. I read in the "virgin system" thread someone was trying to use this method to restore but it failed on checks, can't find the exact post because I'm pretty lazy but if you search it, it's there.
You can't because the partitions are signed.
http://forum.xda-developers.com/showthread.php?p=17427668#post17427668
Fastboot/xml flash package for repairs.

[Q] How make file .kdz or CP AP for CWM

I flash my OB with v20o (smartflash - root), its ok, root,
Now i can flash with v20C.kdz , original p970H.
I used tool to extrat files ap and cp.
Root is a big problem.
Flash smartflash or kdz, bam my root bye.
How i can make file .zip to flash for CWM.
FLash it with R&D testtool + workaround, use cwm injection method (search for it).
Thats how you ll get your phone with the correct software + root
I found use cwm injection method, but is not clear to me.
When i flash with V20o - rooted, i used smartflash, after process reboot in cwm and install from zip superuser. Thats it i do.
After flash using smartflash phone reboot in cwm, send superuser and ok.
the question is how inject cwm. I read topic about this but is not clear for me.
Can you help me?
I can only guide you here again: http://forum.xda-developers.com/showthread.php?t=1512203
I think it doesnt work with smartflash. But if you use an already rooted version, there also is no need to inject
If you are in CWM, simply make a full wipe and you can install any custom ROM you want already.
Then there is no need to really root and boot it
in this topic
http://forum.xda-developers.com/showpost.php?p=23788913&postcount=170
File cp ap, flash smartflash, auto reboot in cwm mode, install SU.
how make cwm inject in file to flash? is the question.
Phone simple reboot in cwm after flash witch SF.
And don't send SU to phone in first boot, bye bye root, need flash again and send zip SU.
I want make this in other V20XX, its cool.
When you are in CWM, you need to flash superuser.zip, then you can restart.
And dont forget to wipe
How inject cwm in my files, i have files and i need how inject cwm. that it
N00BY0815 said:
When you are in CWM, you need to flash superuser.zip, then you can restart.
And dont forget to wipe
Click to expand...
Click to collapse
All this ok for me.
Simple i do, in my files, i want inject cwm. Only this so
I think is that
Op afraid that lg might know this and patch it. I call that's a bull. I don't think lg engineer didn't know how to use dd. As long as we have unecrypted bin file we can patch it. Btw, how can one conceal a patching method using simple dd when you have unpatch file and patched file to compare? Even I managed to figure it out. Op true intention known only to himself.
So, to patch your bin file: (this is done on ubuntu, i don't know if windows got dd)
1. Download cwm at http://download.clockworkmod.com/rec...8.1.3-p970.img to the folder where you keep your bin file.
2. Open terminal and cd to the same folder as above
3. What we need to find is the location where we're suppose to copy cwm into the bin file. dd is bit-stream reader and it will show us the location in term of bytes. We need to search for ANDROID! string. So type:
dd if=LGP970AT-00-V20b-SEA-XXX-JAN-02-2012+0_AP.bin| strings -n 8 -t d| grep ANDROID!
result:
1436661 ANDROID!
1703936 ANDROID!
6422528 ANDROID!
bla..bla..bla...
4. Look of the last entry which contain the ANDROID! string and take note of its byte location (6422528 in this case)
5. Now it's time to copy cwm into the bin file. Type:
dd if=<cwm.img> bs=1 seek=<byte location> conv=notrunc of=<rom.bin>
So in this case:
dd if=recovery-clockwork-touch-5.8.1.3-p970.img bs=1 seek=6422528 conv=notrunc of=LGP970AT-00-V20b-SEA-XXX-JAN-02-2012+0_AP.bin
6. That's it. Your rom is ready to be flash using smartflash tool. You can run the same command in step 3 to verify that cwm is succesfully copied into the bin file. If at the same byte location the ANDROID! string change to [email protected] then you're good to go.
Don't waste your bandwidth to download the op's file if you can do this yourself and beside there's nothing to test, not that op modified the rom in any way. You would be better off testing huexxx zues rom imho.
Savvy?
Edit: Forgot to add. Credit goes to people who found this rooting method. I didn't found it only take a look at it.
Sent from my LG-P970 using XDA App

[DEV][Q] How can i make a odin package of a modifidy stock rom?

Hi Guys,
I Have a rooted Galaxy s advanced. I have modified the stock rom (build I9070XXLQE) android 4.1.2. and now i'm trying to make a flashable odin pakage. after exporting the data and system block to a .img file. and putting them in a md5sum file. Odin get stuck on initializing. does someone know how how to make a working odin pakage for the i9070?
And why would you like to do that?
Isn't it easier to rather make a nand backup?
I do not respond to tech support via PM
dikkekip said:
Hi Guys,
I Have a rooted Galaxy s advanced. I have modified the stock rom (build I9070XXLQE) android 4.1.2. and now i'm trying to make a flashable odin pakage. after exporting the data and system block to a .img file. and putting them in a md5sum file. Odin get stuck on initializing. does someone know how how to make a working odin pakage for the i9070?
Click to expand...
Click to collapse
Do this in windows:
tar -H ustar -c nameofthefile.img > nameofthefile.tar
md5sum -t nameofthefile.tar >> nameofthefile.tar
rename nameofthefile.tar nameofthefile.tar.md5
You need in the same folder md5sum.exe and tar.exe
Sent from my GT-I9070
rolling out on 350 devices
Shaaan said:
And why would you like to do that?
Isn't it easier to rather make a nand backup?
I do not respond to tech support via PM
Click to expand...
Click to collapse
Naidroid backup is nice and works great. the problem is I have to roll out the modified rom on 350 i9070 android devices. so a odin package would be nice. Do I have to flash the data package with the odin files to copy everything ?
still no luck, I'm able to make a odin package now. the only problem is the device that I flash. has no system applications, problems like no keyboard and a crashing google services..
plz help ?
I'm using
adb shell
dd if=/dev/block/mmcblk0p3 of=/mnt/extSdCard/system.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/mnt/extSdCard/userdata.img bs=4096
dd if=/dev/block/mmcblk0p3 of=/mnt/extSdCard/system.img bs=4096
dikkekip said:
still no luck, I'm able to make a odin package now. the only problem is the device that I flash. has no system applications, problems like no keyboard and a crashing google services..
plz help ?
I'm using
adb shell
dd if=/dev/block/mmcblk0p3 of=/mnt/extSdCard/system.img bs=4096
dd if=/dev/block/mmcblk0p5 of=/mnt/extSdCard/userdata.img bs=4096
dd if=/dev/block/mmcblk0p3 of=/mnt/extSdCard/system.img bs=4096
Click to expand...
Click to collapse
Are u missing /preload partition?
Sent from my GT-I9070 using xda app-developers app
I've solved the problem,
i have fixed the premission of the systemapps
I think the app does something like chmod 777
anyway after using the premmision fix app.
the new odin package worked good!
tnx for the feedback

[Q] Flashed recovery to boot partition, how to fix?

I feel like a dummy.
I ran fastboot flash boot openrcovery-twrp-2.8.0.1-ghost.img on my unlocked Moto X.
I can boot into TRWP and stock recovery, but not the bootloader or system. I haven't been able to get to anywhere that I can run fastboot to reflash the bootloader, but I'm not an expert.
How can I restore my stock bootloader? (I have the boot.img)
Update 1: I can access adb shell so I'm considering:
dd if=/sdcard/boot.img /dev/block/mmcblk0p33
I know this is the bootloader partition, but I don't want to make things even harder on myself, so I am being cautious.
Update 2: Fixed!
It worked. Triple checked the target partition. The best way to check is :
ls -al /dev/block/platform/msm_sdcc.1/by-name/
Looked at the contents of /dev/block/mmcblk0p33 and compared to twrp image file. Made sure it looked like boot.img would be good to flash straight into the partition. Then ran the dd, said a little prayer and rebooted.
Have you tried "fastboot flash boot boot.img" by using cmd?
Well, first, boot isn't the bootloader, it is the kernel. If you flashed the bootloader with recovery, you couldn't do anything. Next, if you have recovery access and adb access, why not do "adb reboot bootloader"? Or send the stock kernel to your phone in a flashable zip and flash it via recovery? My advice after you get it fixed would be to leave your phone alone, and ideally, flash it to stock. If you don't know how to fix it, and aren't sure what partition does what, that is a recipe for disaster. The partitions have been named the same thing since the Nexus S (possibly earlier), so this is something that is fairly fundamental to Android.

[ROM][STOCK][FASTBOOT][OP6T] Stock Fastboot ROMs for OnePlus 6T

Things are changing with the advent of project treble and seamless updates. OnePlus will no longer release ROMs flashable via recovery (either stock or twrp) because is no more needed. The updates will be done on the slot not used for example if you are using slot a the update will be installed on slot b and the slot b will be set as default. If you brick and you are in bootloop how you can restore the rom? You can't with Stock ROM you have, because the zip can be only installed via Update Engine, so what can you do? Flash a stock rom via fastboot. I have extracted all images from the stock zip and i have made a new zip with the Fastboot ROM with a flash-all.bat included. This will work only if your bootloader is unlocked. This will erase all your data and will wipe your internal storage.
HOW TO FLASH
This version is only for not branded devices
Download the zip;
Unpack the zip in a folder;
Reboot the OnePlus 6T in fastboot mode (Power and volume-);
Connect the OnePlus 6T to PC;
Run flash-all.bat flasher you need;
Wait until the process end;
The phone will automatically reboot.
FLASHER ADVANCED GUIDE
flash-all-partitions-fastboot.bat : this .bat will flash all possible partitions through fastboot (Except persist) , there are some criticals partitions that can't be flashed through fastboot;
flash-only-persist.bat : this .bat will flash only persist partition in fastboot mode (This is good for people that have problems with sensor);
flash-all-partitions-recovery-criticals.bat : this .bat will boot the twrp and will flash criticals partitions, use this carefully;
flash-system-boot-vendor.bat : this .bat is the same of older flash-all.bat and so it will flash only vendor, system and boot;
flash-all-partitions.bat : this .bat will run flash-all-partitions-fastboot.bat , then flash-only-persist.bat and then flash-all-partitions-recovery-criticals.bat .
Now usually the one needed is only the first "flash-all-partitions-fastboot.bat" but if you are badly bricked i recommend to use flash-all-partitions.bat .
DOWNLOAD
All roms on AFH: https://www.androidfilehost.com/?w=files&flid=284914
All roms on Sourceforge: https://sourceforge.net/projects/fastbootroms/files/OnePlus 6T
BRANDED PHONE
GUIDE: https://forum.xda-developers.com/on...-t-mobile-oneplus-6t-to-t3865966/post78131430
T-Mobile OnePlus 6T Internationa ROM: https://www.androidfilehost.com/?fid=11410963190603845445
MANUAL FLASH: Windows - OSX - Linux
If you want to manual flash these roms these are the commands (you need to extract images.zip before proceed)
Fastboot Partitions:
Code:
fastboot flash aop_a aop.img
fastboot flash aop_b aop.img
fastboot flash bluetooth_a bluetooth.img
fastboot flash bluetooth_b bluetooth.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dsp_a dsp.img
fastboot flash dsp_b dsp.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash fw_4j1ed_a fw_4j1ed.img
fastboot flash fw_4j1ed_b fw_4j1ed.img
fastboot flash fw_4u1ea_a fw_4u1ea.img
fastboot flash fw_4u1ea_b fw_4u1ea.img
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw_a qupfw.img
fastboot flash qupfw_b qupfw.img
fastboot flash storsec_a storsec.img
fastboot flash storsec_b storsec.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash LOGO_a LOGO.img
fastboot flash LOGO_b LOGO.img
If you need also persist partition, this is the command:
Code:
fastboot flash persist persist.img
Criticals Partitions, for these you need to boot the TWRP:
Code:
fastboot boot TWRP.img
When you are in TWRP you need to run these commands to push and flash all criticals partitions:
Code:
adb push abl.img /sdcard/abl.img
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_a
adb shell dd if=/sdcard/abl.img of=/dev/block/bootdevice/by-name/abl_b
adb push cmnlib.img /sdcard/cmnlib.img
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_a
adb shell dd if=/sdcard/cmnlib.img of=/dev/block/bootdevice/by-name/cmnlib_b
adb push cmnlib64.img /sdcard/cmnlib64.img
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_a
adb shell dd if=/sdcard/cmnlib64.img of=/dev/block/bootdevice/by-name/cmnlib64_b
adb push devcfg.img /sdcard/devcfg.img
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_a
adb shell dd if=/sdcard/devcfg.img of=/dev/block/bootdevice/by-name/devcfg_b
adb push hyp.img /sdcard/hyp.img
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_a
adb shell dd if=/sdcard/hyp.img of=/dev/block/bootdevice/by-name/hyp_b
adb push keymaster.img /sdcard/keymaster.img
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_a
adb shell dd if=/sdcard/keymaster.img of=/dev/block/bootdevice/by-name/keymaster_b
adb push xbl.img /sdcard/xbl.img
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_a
adb shell dd if=/sdcard/xbl.img of=/dev/block/bootdevice/by-name/xbl_b
adb push xbl_config.img /sdcard/xbl_config.img
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_a
adb shell dd if=/sdcard/xbl_config.img of=/dev/block/bootdevice/by-name/xbl_config_b
REMEMBER
"Invalid sparce file format at header magic" is not an error, you need to wait a bit when you see that string, just wait.
These ROMs can't be used to update or downgrade your phone but just to restore your phone, so don't use them to come back to oreo or to update from oreo to pie.
If you want to rebrand your phone from HydrogenOS to OxygenOS you can follow this guide: Rebrand Guide
If you want you can use also my tool to flash Factory Images, unlock bootloader, flash twrp or to understand if the device is recognized: https://toolaio.tk/
Thanks to @SaiBork for first time tested
If you got some problems like write error or no partition, check this: https://forum.xda-developers.com/showpost.php?p=76658555&postcount=34
Thanks to @Dark Nightmare for T-Mobile Rom Version
DONATE LINK
If you want to support this and others my projects please consider making a donation, thanks.
If you are unable to use pools or moneybox, you can also make a normal donation, all private donations will be added in the moneybox:
​
Thanks Mister :good:
Great work, thx
This is great work. Thanks!
If anyone has the T-Mobile firmware or OTA captured, please post it.
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
shizat63 said:
Would it be wise to extract the zip to the 6T prior to rooting just in case something goes wrong?
Click to expand...
Click to collapse
This fastboot rom are completely stock rom, not modified
mauronofrio said:
This fastboot rom are completely stock rom, not modified
Click to expand...
Click to collapse
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
shizat63 said:
Right.
So before rooting the device, would it be good to copy the images from this zip to a dir on the 6T in case something goes wrong with the rooting process? For example if Magisk or TWRP mess something up, and the 6T is in a bootloop.
Or are the images in the zip only for flashing from your PC to the 6T? So it would be of no use to have the images sitting on the 6T as a backup.
Click to expand...
Click to collapse
Actually there is not a twrp that support decryption so if you also have the images on the phone you can't flash it in twrp mode. At this moment these roms can be only flashed through fastboot with a pc
Seoyoon said:
Hello. after flashing with flash-all.bat, my 6T just boots to the bootloader unlocked warning and stays there. I don't know what to do next.
EDIT: Nevermind, after trying again it worked.
Click to expand...
Click to collapse
Perfect:good:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Perfect:good:
If you want to support this and others my projects please consider making a donation, thanks.
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
nhshah7 said:
thank you thank you thank you OP! Nearly bricked my phone while trying to install root (something got messed up with TWRP) and I couldn't even get out of bootloader into recovery. I just got my phone a few hours ago, that would have been sad
Click to expand...
Click to collapse
Just for the sake of your sanity in the future, if you can get to bootloader and device files are available, you can always get it up and running. I learned that very quickly way back in the day
iaTa said:
After using flash-all.bat I'm getting the "Your device is corrupt" red error message on boot. I can skip by pressing power twice and phone boots normally.
I see people with 6 had to use MSM download tool to get rid of the error.
Is there any solution for 6T?
Click to expand...
Click to collapse
Only msm tool i think
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
_BГ@ckθut said:
Well same situation here got boot loop trying to root then after install using flashall.bat now I can't get a VOLTE and now I complete lost signal but when I swap my sim card to sim slot 2 everything work...kinda weir but does anyone know how to fix it?
Click to expand...
Click to collapse
Did you have a branded version?
mauronofrio said:
Did you have a branded version?
Click to expand...
Click to collapse
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Edit: I try to do fastboot flash modem A and B also factory reset but seem not work...
_BГ@ckθut said:
Oh I has unlock one from on plus website and use it on Verizon...is that what u mean...sorry I'm new to OP device
Click to expand...
Click to collapse
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
mauronofrio said:
Branded version are different, they have a particoular partitions for volte, i think the only.method to solve your problem is to find another person with the same branded device and make a partitions backup that you can restore
Click to expand...
Click to collapse
So how do I make that? Do I need provide any information or anything?

Categories

Resources