Flash ext3_system.img with recovery - LG Optimus 2x

LGExtract(http://forum.xda-developers.com/showthread.php?t=1566532) is an excellent tool, with which we can get ext3_system.img and ext3_flashboot.img from KDZ file easily.
In fact, the img file is just standard format of ext3, if we use command
Code:
dd if=/sdcard/ext3_system.img of=/dev/block/mmcblk0p1
dd if=/sdcard/ext3_flashboot.img of=/dev/block/mmcblk0p5
to write them to 2x with recovery, it will work too, and this process is very easy and fast.
View attachment img-updater.zip
img-updater.zip: put ext3_system.img, ext3_flashboot.img and img-updater.zip to sdcard root directory, then flash img-updater.zip with recovery will update and root the new ROM.
View attachment LG-2X.zip
LG-2X.zip: add ext3_system.img and ext3_flashboot.img to LG-2X.zip then flash new LG-2X.zip with recovery will update and root the new ROM.

Related

[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

[RECOVERY][v500][CM12] Cyanogen Recovery

Cyanogen Recovery (20150313) for LG G Pad 8.3 v500. This custom recovery installation package is for v500 models only. Built from source on 2015-03-13 by Jenkins.
Installation: Flash zip file with any custom recovery and reboot into updated Cyanogen recovery.
v500-cyanogen-recovery-20150313-signed.zip
MD5: 7c63b9ecb88eb4bd49a7ef56e1ff137e
Note #1: An advantage to using the official Cyanogen Recovery with CM 12 is that the Cyanogen Recovery can be automatically updated with the CM Update tool, if "update recovery" is enabled in the CM 12 developer options.
Note #2: Cyanogen Recovery *requires* properly signed flashable zip packages in order for them to pass the signature verification integrity check and complete the install process. Below is an example of how flashable zip file packages must be signed in order to pass the verification integrity check within the Cyanogen Recovery:
Code:
java -jar signapk.jar -w testkey.x509.pem testkey.pk8 GApps.zip GApps-signed.zip
Notice that the "-w" option is required for properly signing zip file packages with signapk.jar.
Manual Installation (first time installing custom recovery):
1) Gain root permission (ie; with Stumproot) and install SuperSU and Busybox.
2) Install Terminal Emulator or use ADB for opening up a shell (this example is using ADB).
Note: If using Terminal Emulator, make sure root access is given via SuperSU.
3) Download Cyanogen Recovery installation zip file from the link above and manually extract it. Also, download the loki_tool binary from https://github.com/djrbliss/loki/archive/master.zip. The loki_tool binary is found in the "bin" folder of loki-master.zip after the file is extracted.
4) Copy recovery.img (contained in the Cyanogen Recovery installation zip file from step #3) and the loki_tool binary (contained in the loki-master.zip file from step #3) to /data/local/tmp on your LG G Pad 8.3 v500 tablet with either ADB or a root explorer application and make loki_tool executable.
Code:
adb push recovery.img /data/local/tmp
adb push loki_tool /data/local/tmp
adb shell
su
chmod 755 /data/local/tmp/loki_tool
Note: Since the command "su" was entered, the shell has root permissions to proceed.
5) Patch the recovery.img into recovery.lok using loki_tool:
Code:
dd if=/dev/block/platform/msm_sdcc.1/by-name/aboot of=/data/local/tmp/aboot.img
/data/local/tmp/loki_tool patch recovery /data/local/tmp/aboot.img /data/local/tmp/recovery.img /data/local/tmp/recovery.lok
Note #1: At this point in the installation procedure, there have been no permanent changes to the system. If there is an error or warning while patching recovery.img and creating recovery.lok, then stop this manual installation procedure. In most cases, the problem is that the version of aboot.img found on the device is probably not exploitable with loki_tool. This manual custom recovery installation procedure must be started over again from the beginning after flashing a loki exploitable aboot.img to the device (downgrading firmware should help).
Note #2: If recovery.lok is created successfully without any errors or warnings, then continue with the final step. The shell should still be open with root (su) permissions enabled from the previous steps.
6) Flash recovery.lok file with loki_tool and reboot to new custom recovery.
Code:
/data/local/tmp/loki_tool flash recovery /data/local/tmp/recovery.lok
exit
exit
adb reboot recovery
@Deltadroid You are really on fire! Nice work!
I understand this is official recovery, but what format is it?
Is it like TWRP?
Thank you for your great work! I'm now back from 'unofficial' releases to official.
Cal
It's just like cwm, but for cm12.
The only caveat is that all the packages you install must be signed properly to pass verification process.The signing signature is used like a md5sum to check the integrity.
I have an LG GPAD V410 Verizon that boots only to recovery. One of the things I did to try to get out of it was to install cm-12.1-20150901-SNAPSHOT-YOG4PAO23D-v410. From this I got a Cyanogen Recovery. Now adb devices command tells me that my Windows 7 computer is unauthorized for the tablet. I tried a factory reset and reboot and was still unauthorized. I thought if I got back to twrp, i could unlock adb. I used zipme apk to make TWRP_2.8.5.0_v410_bumped.img into a flashable zip, but it flunked Cyanogen's security check. All of the ways to get out of this involve using adb, like http://forum.xda-developers.com/lg-g-pad-83/help/soft-bricked-lg-g-pad-7-0-v410-boots-to-t3094137. I either need a way to get the proper signature on the zip file to install twrp, or I need a way to get adb authorized for my Windows 7 machine. Help!

AutoBoot on Power not quite working

I am having some trouble getting my auto boot script to work. Doing an in-car install so power up on usb is critical.
The method im using is by editing /system/bin/lpm to execute a script.
I edited the lpm file to read as such:
Code:
#!/system/bin/sh
/system/bin/reboot
But the code doesn't execute as expected. The code works. BUT it boots into recovery mode (TWRP) Is there any shell command i can force a boot to regular system?
Well, almost 20 hours of pain but i found a solution!
For anyone else looking here is what worked:
Fresh install of Stock Lite v7
Extract the boot image. Load TWRP > Backup Boot. Then you will find this file \Internal Storage\TWRP\BACKUPS\***\***\boot.emmc.win
Rename the file to boot.img. Use Carliv+Image+Kitchen+Windows+v1.3 to extract the image.
Open ramdisk/init.rc
Search for on charger and add at the end of this section:
Code:
setprop ro.bootmode "normal"
setprop sys.powerctl "reboot"
Repack the image with the same tool. Copy back to device.
Install new boot.img with TWRP. Install > Install image
@Svan987 if you were curious

Stock 10 + Rooted

Anyone here on stock Android 10 March patch and rooted? can you extract your splash img using terminal
Create Folder /sdcard/splash/
Run Terminal Emulator
Code:
su
dd if=/dev/block/bootdevice/by-name/splash of=/sdcard/splash/splash.img
exit
i wanted to see if the stock image of bootloader still uses 1080x1920 because i was making an splash.img

Is there a way to save a modified boot image from within the booted ROM which is rooted with magisk

I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
devsk said:
I don't have the original boot.img. I want to unroot temporarily. But want to re-root afterward.
I was wondering if I can save a modified_boot.img somehow and flash that later once I am done. Is it possible?
Click to expand...
Click to collapse
What ROM and device are you using?
How did you root it in the first place?
What OS are you running?
Heres my 30 second version of how id do it on my Pixel 2 XL an a/b device....ymmv, depending on device
Download latest platform tools from Google for your OS, if necessary: https://developer.android.com/studio/releases/platform-tools
Next you'll need dd, if you're on Linux, you can skip ahead
For Windows....go to http://gnuwin32.sourceforge.net/packages/coreutils.htm
Download Binaries & Dependencies zips
Extract dd.exe from coreutils-5.3.0-bin.zip /bin to platform tools path
Extract all .dll's from coreutils-5.3.0-dep.zip /bin to platform tools path
Enable USB Debugging & ABD access on device
Boot device to recovery (usually TWRP)
on PC and prompt in platform tools folder:
if you have recovery (usually TWRP) installed:
adb reboot recovery
if you DONT have recovery (usually TWRP) installed, but instead fastboot it via bootloader (as i do on my Pixel 2XL):
adb reboot bootloader
fastboot boot twrp-xxx.img
swipe into twrp
back to PC prompt:
adb shell
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
adb pull /sdcard/boot.img magisk_boot.img
Uninstall magisk
When you need to flash magisk boot image back:
Boot to bootloader..
on PC and prompt in platform tools folder:
adb reboot bootloader
fastboot flash boot magisk_boot.img
fastboot reboot
Note: You can of course use the same first process to backup (and extract) the stock boot.img before rooting ....and the latter to reflash it if needed if rooting goes wrong
Sorry, I should update my profile. My device is OnePlus 8 Pro.
> dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/magisk_boot.img
@73sydney why would this not work from within a rooted device? Its not like some process is holding a read lock on that partition or something else is also writing to it. Its a partition persisted in the NAND, which is not being touched by anything.
The only thing is that there are 2 partitions on the NAND: boot_a and boot_b. I need to know which one is the current one.
And this tells me slot B:
cat /proc/cmdline | tr ' ' '\n' | grep --color slot
androidboot.slot_suffix=_b
For flashing back, I obviously need to be in bootloader because I won't have the root to write to the partition.

Categories

Resources